From 702978398573a652fb5df5540669424d3fa54c78 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 8 Mar 2021 18:55:05 -0500 Subject: [PATCH 001/261] funhouse board --- .github/workflows/build.yml | 1 + .../esp32s2/boards/adafruit_funhouse/board.c | 117 ++++++++++++++++++ .../boards/adafruit_funhouse/mpconfigboard.h | 42 +++++++ .../boards/adafruit_funhouse/mpconfigboard.mk | 17 +++ ports/esp32s2/boards/adafruit_funhouse/pins.c | 53 ++++++++ .../boards/adafruit_funhouse/sdkconfig | 33 +++++ 6 files changed, 263 insertions(+) create mode 100644 ports/esp32s2/boards/adafruit_funhouse/board.c create mode 100644 ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h create mode 100644 ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/adafruit_funhouse/pins.c create mode 100644 ports/esp32s2/boards/adafruit_funhouse/sdkconfig diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32e3bc900c..2a94b4043e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -444,6 +444,7 @@ jobs: board: - "adafruit_feather_esp32s2_nopsram" - "adafruit_feather_esp32s2_tftback_nopsram" + - "adafruit_funhouse" - "adafruit_magtag_2.9_grayscale" - "adafruit_metro_esp32s2" - "electroniccats_bastwifi" diff --git a/ports/esp32s2/boards/adafruit_funhouse/board.c b/ports/esp32s2/boards/adafruit_funhouse/board.c new file mode 100644 index 0000000000..1b3505378d --- /dev/null +++ b/ports/esp32s2/boards/adafruit_funhouse/board.c @@ -0,0 +1,117 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" + +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" + +displayio_fourwire_obj_t board_display_obj; + +#define DELAY 0x80 + +uint8_t display_init_sequence[] = { + 0x01, 0 | DELAY, 150, // SWRESET + 0x11, 0 | DELAY, 255, // SLPOUT + 0x36, 1, 0b10100000, // _MADCTL for rotation 0 + 0x3a, 1, 0x55, // COLMOD - 16bit color + 0x21, 0 | DELAY, 10, // _INVON + 0x13, 0 | DELAY, 10, // _NORON + 0x29, 0 | DELAY, 255, // _DISPON +}; + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART +#ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); +#endif /* DEBUG */ + + busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; + common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL); + common_hal_busio_spi_never_reset(spi); + + displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; + bus->base.type = &displayio_fourwire_type; + common_hal_displayio_fourwire_construct(bus, + spi, + &pin_GPIO38, // TFT_DC Command or data + &pin_GPIO39, // TFT_CS Chip select + &pin_GPIO40, // TFT_RESET Reset + 60000000, // Baudrate + 0, // Polarity + 0); // Phase + + displayio_display_obj_t* display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, + 240, // Width (after rotation) + 240, // Height (after rotation) + 0, // column start + 0, // row start + 180, // rotation + 16, // Color depth + false, // Grayscale + false, // Pixels in a byte share a row. Only used for depth < 8 + 1, // bytes per cell. Only valid for depths < 8 + false, // reverse_pixels_in_byte. Only valid for depths < 8 + true, // reverse_pixels_in_word + MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command + MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command + 0x37, // set vertical scroll command + display_init_sequence, + sizeof(display_init_sequence), + &pin_GPIO21, // backlight pin + NO_BRIGHTNESS_COMMAND, + 1.0f, // brightness (ignored) + true, // auto_brightness + false, // single_byte_bounds + false, // data_as_commands + true, // auto_refresh + 60, // native_frames_per_second + true, // backlight_on_high + false); // not SH1107 +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h b/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h new file mode 100644 index 0000000000..99cb0982c9 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h @@ -0,0 +1,42 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +//Micropython setup + +#define MICROPY_HW_BOARD_NAME "Adafruit FunHome" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_APA_MOSI (&pin_GPIO14) +#define MICROPY_HW_APA_SCK (&pin_GPIO15) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO33) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO34) diff --git a/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk b/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk new file mode 100644 index 0000000000..509893bc9f --- /dev/null +++ b/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x239A +USB_PID = 0x80E6 +USB_PRODUCT = "FunHouse" +USB_MANUFACTURER = "Adafruit" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/boards/adafruit_funhouse/pins.c b/ports/esp32s2/boards/adafruit_funhouse/pins.c new file mode 100644 index 0000000000..2721a301c1 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_funhouse/pins.c @@ -0,0 +1,53 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + + { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON_DOWN), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_SELECT), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_UP), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_CAP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_CAP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_CAP8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_CAP9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_CAP10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_CAP11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_CAP12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_CAP13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_DOTSTAR_DATA), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_DOTSTAR_CLOCK), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_DOTSTAR_LIGHT_POWER), MP_ROM_PTR(&pin_GPIO41) }, + + { MP_ROM_QSTR(MP_QSTR_PIR_SENSE), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO46) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO37) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO34) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO37) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO38) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/adafruit_funhouse/sdkconfig b/ports/esp32s2/boards/adafruit_funhouse/sdkconfig new file mode 100644 index 0000000000..9d8bbde967 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_funhouse/sdkconfig @@ -0,0 +1,33 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config From 08c5dbb0033c2f3838d7d52f98d3844a56253f81 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 11 Mar 2021 08:52:47 -0500 Subject: [PATCH 002/261] use return values in STM PWMOut constructor, not exceptions --- .../esp32s2/boards/adafruit_funhouse/board.c | 10 ++++-- ports/esp32s2/boards/adafruit_funhouse/pins.c | 2 +- ports/esp32s2/common-hal/pwmio/PWMOut.c | 6 ++-- ports/stm/common-hal/pwmio/PWMOut.c | 29 ++++++++-------- shared-bindings/pwmio/PWMOut.c | 34 ++++++++++++++----- shared-bindings/pwmio/PWMOut.h | 6 +++- 6 files changed, 56 insertions(+), 31 deletions(-) diff --git a/ports/esp32s2/boards/adafruit_funhouse/board.c b/ports/esp32s2/boards/adafruit_funhouse/board.c index 1b3505378d..09eb9266eb 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/board.c +++ b/ports/esp32s2/boards/adafruit_funhouse/board.c @@ -54,8 +54,8 @@ void board_init(void) { // Debug UART #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); + common_hal_never_reset_pin(&pin_GPIO37); + common_hal_never_reset_pin(&pin_GPIO38); #endif /* DEBUG */ busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; @@ -73,9 +73,13 @@ void board_init(void) { 0, // Polarity 0); // Phase + // workaround as board_init() is called before reset_port() in main.c + pwmout_reset(); + displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; - common_hal_displayio_display_construct(display, + common_hal_displayio_display_construct( + display, bus, 240, // Width (after rotation) 240, // Height (after rotation) diff --git a/ports/esp32s2/boards/adafruit_funhouse/pins.c b/ports/esp32s2/boards/adafruit_funhouse/pins.c index 2721a301c1..0ad5beb6c5 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/pins.c +++ b/ports/esp32s2/boards/adafruit_funhouse/pins.c @@ -33,7 +33,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO46) }, +// { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO46) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO37) }, diff --git a/ports/esp32s2/common-hal/pwmio/PWMOut.c b/ports/esp32s2/common-hal/pwmio/PWMOut.c index e1fdd4760a..dfba42bb80 100644 --- a/ports/esp32s2/common-hal/pwmio/PWMOut.c +++ b/ports/esp32s2/common-hal/pwmio/PWMOut.c @@ -93,7 +93,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self, } if (timer_index == INDEX_EMPTY) { // Running out of timers isn't pin related on ESP32S2 so we can't re-use error messages - mp_raise_ValueError(translate("No more timers available")); + return PWMOUT_ALL_TIMERS_IN_USE; } // Find a viable channel @@ -104,7 +104,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self, } } if (channel_index == INDEX_EMPTY) { - mp_raise_ValueError(translate("No more channels available")); + return PWMOUT_ALL_CHANNELS_IN_USE; } // Run configuration @@ -126,7 +126,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self, self->chan_handle.timer_sel = timer_index; if (ledc_channel_config(&(self->chan_handle))) { - mp_raise_ValueError(translate("Could not initialize channel")); + return PWMOUT_INITIALIZATION_ERROR; } // Make reservations diff --git a/ports/stm/common-hal/pwmio/PWMOut.c b/ports/stm/common-hal/pwmio/PWMOut.c index 85427185e5..9514883250 100644 --- a/ports/stm/common-hal/pwmio/PWMOut.c +++ b/ports/stm/common-hal/pwmio/PWMOut.c @@ -48,7 +48,7 @@ STATIC uint32_t timer_get_internal_duty(uint16_t duty, uint32_t period) { return (duty*period) / ((1 << 16) - 1); } -STATIC void timer_get_optimal_divisors(uint32_t*period, uint32_t*prescaler, +STATIC bool timer_get_optimal_divisors(uint32_t*period, uint32_t*prescaler, uint32_t frequency, uint32_t source_freq) { //Find the largest possible period supported by this frequency for (int i = 0; i < (1 << 16); i++) { @@ -58,9 +58,8 @@ STATIC void timer_get_optimal_divisors(uint32_t*period, uint32_t*prescaler, break; } } - if (*prescaler == 0) { - mp_raise_ValueError(translate("Invalid frequency supplied")); - } + // Return successor failure. + return *prescaler != 0; } void pwmout_reset(void) { @@ -138,16 +137,14 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self, tim_frequencies[self->tim->tim_index - 1] = frequency; stm_peripherals_timer_reserve(TIMx); } else { //no match found - if (tim_chan_taken) { - mp_raise_ValueError(translate("No more timers available on this pin.")); - } else if (tim_taken_internal) { - mp_raise_ValueError(translate("Timer was reserved for internal use - declare PWM pins earlier in the program")); + if (tim_chan_taken || tim_taken_internal) { + return PWMOUT_ALL_TIMERS_ON_PIN_IN_USE; } else if (tim_taken_f_mismatch) { - mp_raise_ValueError(translate("Frequency must match existing PWMOut using this timer")); + return PWMOUT_INVALID_FREQUENCY_ON_PIN; } else if (var_freq_mismatch) { - mp_raise_ValueError(translate("Cannot vary frequency on a timer that is already in use")); + return PWMOUT_VARIABLE_FREQUENCY_NOT_AVAILABLE; } else { - mp_raise_ValueError(translate("Invalid pins for PWMOut")); + return PWMOUT_INVALID_PIN; } } @@ -167,7 +164,9 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self, uint32_t prescaler = 0; //prescaler is 15 bit uint32_t period = 0; //period is 16 bit uint32_t source_freq = stm_peripherals_timer_get_source_freq(TIMx); - timer_get_optimal_divisors(&period, &prescaler, frequency, source_freq); + if (!timer_get_optimal_divisors(&period, &prescaler, frequency, source_freq)) { + return PWMOUT_INVALID_FREQUENCY; + } //Timer init self->handle.Instance = TIMx; @@ -180,7 +179,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self, //only run init if this is the first instance of this timer if (first_time_setup) { if (HAL_TIM_PWM_Init(&self->handle) != HAL_OK) { - mp_raise_ValueError(translate("Could not initialize timer")); + return PWMOUT_INITIALIZATION_ERROR; } } @@ -190,10 +189,10 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self, self->chan_handle.OCPolarity = TIM_OCPOLARITY_HIGH; self->chan_handle.OCFastMode = TIM_OCFAST_DISABLE; if (HAL_TIM_PWM_ConfigChannel(&self->handle, &self->chan_handle, self->channel) != HAL_OK) { - mp_raise_ValueError(translate("Could not initialize channel")); + return PWMOUT_INITIALIZATION_ERROR; } if (HAL_TIM_PWM_Start(&self->handle, self->channel) != HAL_OK) { - mp_raise_ValueError(translate("Could not start PWM")); + return PWMOUT_INITIALIZATION_ERROR; } self->variable_frequency = variable_frequency; diff --git a/shared-bindings/pwmio/PWMOut.c b/shared-bindings/pwmio/PWMOut.c index da07555928..43944977e3 100644 --- a/shared-bindings/pwmio/PWMOut.c +++ b/shared-bindings/pwmio/PWMOut.c @@ -102,14 +102,32 @@ STATIC mp_obj_t pwmio_pwmout_make_new(const mp_obj_type_t *type, size_t n_args, pwmio_pwmout_obj_t *self = m_new_obj(pwmio_pwmout_obj_t); self->base.type = &pwmio_pwmout_type; pwmout_result_t result = common_hal_pwmio_pwmout_construct(self, pin, duty_cycle, frequency, variable_frequency); - if (result == PWMOUT_INVALID_PIN) { - mp_raise_ValueError(translate("Invalid pin")); - } else if (result == PWMOUT_INVALID_FREQUENCY) { - mp_raise_ValueError(translate("Invalid PWM frequency")); - } else if (result == PWMOUT_ALL_TIMERS_ON_PIN_IN_USE) { - mp_raise_ValueError(translate("All timers for this pin are in use")); - } else if (result == PWMOUT_ALL_TIMERS_IN_USE) { - mp_raise_RuntimeError(translate("All timers in use")); + switch (result) { + case PWMOUT_INVALID_PIN: + mp_raise_ValueError(translate("Invalid pin")); + break; + case PWMOUT_INVALID_FREQUENCY: + mp_raise_ValueError(translate("Invalid PWM frequency")); + break; + case PWMOUT_INVALID_FREQUENCY_ON_PIN: + mp_raise_ValueError(translate("Frequency must match existing PWMOut using this timer")); + break; + case PWMOUT_VARIABLE_FREQUENCY_NOT_AVAILABLE: + mp_raise_ValueError(translate("Cannot vary frequency on a timer that is already in use")); + break; + case PWMOUT_ALL_TIMERS_ON_PIN_IN_USE: + mp_raise_ValueError(translate("All timers for this pin are in use")); + break; + case PWMOUT_ALL_TIMERS_IN_USE: + mp_raise_RuntimeError(translate("All timers in use")); + break; + case PWMOUT_ALL_CHANNELS_IN_USE: + mp_raise_RuntimeError(translate("All channels in use")); + break; + default: + case PWMOUT_INITIALIZATION_ERROR: + mp_raise_RuntimeError(translate("Could not start PWM")); + break; } return MP_OBJ_FROM_PTR(self); diff --git a/shared-bindings/pwmio/PWMOut.h b/shared-bindings/pwmio/PWMOut.h index de2ebd1cf4..69e7249e79 100644 --- a/shared-bindings/pwmio/PWMOut.h +++ b/shared-bindings/pwmio/PWMOut.h @@ -36,8 +36,12 @@ typedef enum pwmout_result_t { PWMOUT_OK, PWMOUT_INVALID_PIN, PWMOUT_INVALID_FREQUENCY, + PWMOUT_INVALID_FREQUENCY_ON_PIN, + PWMOUT_VARIABLE_FREQUENCY_NOT_AVAILABLE, PWMOUT_ALL_TIMERS_ON_PIN_IN_USE, - PWMOUT_ALL_TIMERS_IN_USE + PWMOUT_ALL_TIMERS_IN_USE, + PWMOUT_ALL_CHANNELS_IN_USE, + PWMOUT_INITIALIZATION_ERROR, } pwmout_result_t; extern pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self, From c6aaab6f644964e2de2a2f6dd2d06da903a7ecce Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Wed, 3 Feb 2021 16:30:29 -0600 Subject: [PATCH 003/261] Initial commit --- .../common-hal/displayio/ParallelBus.c | 152 +++++++++++++++++- .../common-hal/displayio/ParallelBus.h | 9 ++ 2 files changed, 155 insertions(+), 6 deletions(-) diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/displayio/ParallelBus.c index 57b2ffc36b..133382c21b 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -32,37 +32,177 @@ #include "py/runtime.h" #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/microcontroller/__init__.h" +#include "bindings/rp2pio/StateMachine.h" +#include "common-hal/rp2pio/StateMachine.h" + +static const uint16_t parallel_program[] = { +// .wrap_target +// out pins, 8 +// set pins 0 + //0x6008, + //0xe001 +// .wrap + 0x6008, + 0xB042 +}; void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { - mp_raise_NotImplementedError(translate("ParallelBus not yet supported")); // TODO: Implement with PIO and DMA. + + uint8_t data_pin = data0->number; + mp_printf(&mp_plat_print, "data pin %d\n", data_pin); + for (uint8_t i = 0; i < 8; i++) { + if (!pin_number_is_free(data_pin + i)) { + mp_raise_ValueError_varg(translate("Bus pin %d is already in use"), i); + } + } + + uint8_t write_pin = write->number; + mp_printf(&mp_plat_print, "write pin %d\n", write_pin); + if (!pin_number_is_free(write_pin)) { + mp_raise_ValueError_varg(translate("Bus pin %d is already in use"), write_pin); + } + + + self->command.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->command, command); + common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL); + + self->chip_select.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select); + common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL); + + //self->write.base.type = &digitalio_digitalinout_type; + //common_hal_digitalio_digitalinout_construct(&self->write, write); + //common_hal_digitalio_digitalinout_switch_to_output(&self->write, true, DRIVE_MODE_PUSH_PULL); + + self->read.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->read, read); + common_hal_digitalio_digitalinout_switch_to_output(&self->read, true, DRIVE_MODE_PUSH_PULL); + + self->data0_pin = data_pin; + + self->reset.base.type = &mp_type_NoneType; + if (reset != NULL) { + self->reset.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->reset, reset); + common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); + never_reset_pin_number(reset->number); + common_hal_displayio_parallelbus_reset(self); + } + + never_reset_pin_number(command->number); + never_reset_pin_number(chip_select->number); + never_reset_pin_number(write->number); + never_reset_pin_number(read->number); + for (uint8_t i = 0; i < 8; i++) { + never_reset_pin_number(data_pin + i); + } + + uint32_t pin_usage = 0; + for (int pin_number = 2; pin_number < 10; pin_number ++) { + pin_usage += (1 << pin_number); + } + pin_usage += (1 << write_pin); + mp_printf(&mp_plat_print, "pin usage %x\n", pin_usage); + + //uint8_t pin_number = digitalinout->pin->number; + bool ok = rp2pio_statemachine_construct(&self->state_machine, + parallel_program, sizeof(parallel_program) / sizeof(parallel_program[0]), + 48000000, //125000000, // freq 24Mhz + NULL, 0, // init + data0, 8, // first out pin, # out pins + NULL, 0, // first in pin, # in pins + NULL, 0, // first set pin + write, 1, // first sideset pin + pin_usage, // pins we use + true, // tx fifo + false, // rx fifo + true, 8, true, // TX, auto pull every 8 bits. shift left to output msb first + false, 32, true, // RX setting we don't use + false); // claim pins + if (!ok) { + // Do nothing. Maybe bitbang? + return; + } + mp_printf(&mp_plat_print, "ok %d\n", ok); + mp_printf(&mp_plat_print, "smvalues: %d %d %d\n", self->state_machine.state_machine, self->state_machine.pins, self->state_machine.actual_frequency); + } void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) { + for (uint8_t i = 0; i < 8; i++) { + reset_pin_number(self->data0_pin + i); + } + reset_pin_number(self->command.pin->number); + reset_pin_number(self->chip_select.pin->number); + reset_pin_number(self->write.pin->number); + reset_pin_number(self->read.pin->number); + reset_pin_number(self->reset.pin->number); } bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { - return false; + displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + if (self->reset.base.type == &mp_type_NoneType) { + return false; + } + + common_hal_digitalio_digitalinout_set_value(&self->reset, false); + common_hal_mcu_delay_us(4); + common_hal_digitalio_digitalinout_set_value(&self->reset, true); + return true; } bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) { - return false; + return true; } bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { - - return false; + displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); + return true; } void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { + displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + + /*mp_printf(&mp_plat_print, "send bt %d cs %d dl %d data: ", byte_type, chip_select, data_length); + int max = 8; + if (data_length < max) + max = data_length; + for (int i = 0; i < max; i++) { + mp_printf(&mp_plat_print, "%x ", data[i]); + }*/ + + common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA); + //mp_printf(&mp_plat_print, "."); + + //for (int i = 0; i < data_length; i++) { + //common_hal_digitalio_digitalinout_set_value(&self->write, 0); + //pio_sm_put_blocking(self->state_machine.pio, self->state_machine.state_machine, *data); + //common_hal_digitalio_digitalinout_set_value(&self->write, 1); + //mp_printf(&mp_plat_print, "%x", *data); + //data++; + //} + //pio_sm_put_blocking(self->state_machine.pio, self->state_machine.state_machine, 255); + //bool success = common_hal_rp2pio_statemachine_write(&self->state_machine, data, data_length); + //common_hal_mcu_delay_us(50000); + //pio_sm_put_blocking(self->state_machine.pio, self->state_machine.state_machine, 0); + //common_hal_mcu_delay_us(50000); + + bool success = common_hal_rp2pio_statemachine_write(&self->state_machine, data, data_length); + + //mp_printf(&mp_plat_print, "%d", success); + //mp_printf(&mp_plat_print, ","); } void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { - + displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); } diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.h b/ports/raspberrypi/common-hal/displayio/ParallelBus.h index 45989d9900..b2b1d02604 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.h +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.h @@ -28,9 +28,18 @@ #define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELBUS_H #include "common-hal/digitalio/DigitalInOut.h" +#include "bindings/rp2pio/StateMachine.h" +#include "common-hal/rp2pio/StateMachine.h" typedef struct { mp_obj_base_t base; + digitalio_digitalinout_obj_t command; + digitalio_digitalinout_obj_t chip_select; + digitalio_digitalinout_obj_t reset; + digitalio_digitalinout_obj_t write; + digitalio_digitalinout_obj_t read; + uint8_t data0_pin; + rp2pio_statemachine_obj_t state_machine; } displayio_parallelbus_obj_t; #endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELBUS_H From b080d6207b568f1ec1d701efcca240b1ae924040 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Thu, 4 Feb 2021 16:57:12 -0600 Subject: [PATCH 004/261] Removing debug info and clean up --- .../common-hal/displayio/ParallelBus.c | 61 +++---------------- .../common-hal/displayio/ParallelBus.h | 2 +- 2 files changed, 11 insertions(+), 52 deletions(-) diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/displayio/ParallelBus.c index 133382c21b..e8302571d0 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -36,24 +36,18 @@ #include "common-hal/rp2pio/StateMachine.h" static const uint16_t parallel_program[] = { +// .side_set 1 // .wrap_target -// out pins, 8 -// set pins 0 - //0x6008, - //0xe001 + 0x6008, // out pins, 8 side 0 + 0xB042 // nop side 1 // .wrap - 0x6008, - 0xB042 }; void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { - // TODO: Implement with PIO and DMA. - uint8_t data_pin = data0->number; - mp_printf(&mp_plat_print, "data pin %d\n", data_pin); for (uint8_t i = 0; i < 8; i++) { if (!pin_number_is_free(data_pin + i)) { mp_raise_ValueError_varg(translate("Bus pin %d is already in use"), i); @@ -61,12 +55,10 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel } uint8_t write_pin = write->number; - mp_printf(&mp_plat_print, "write pin %d\n", write_pin); if (!pin_number_is_free(write_pin)) { mp_raise_ValueError_varg(translate("Bus pin %d is already in use"), write_pin); } - self->command.base.type = &digitalio_digitalinout_type; common_hal_digitalio_digitalinout_construct(&self->command, command); common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL); @@ -75,15 +67,12 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select); common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL); - //self->write.base.type = &digitalio_digitalinout_type; - //common_hal_digitalio_digitalinout_construct(&self->write, write); - //common_hal_digitalio_digitalinout_switch_to_output(&self->write, true, DRIVE_MODE_PUSH_PULL); - self->read.base.type = &digitalio_digitalinout_type; common_hal_digitalio_digitalinout_construct(&self->read, read); common_hal_digitalio_digitalinout_switch_to_output(&self->read, true, DRIVE_MODE_PUSH_PULL); self->data0_pin = data_pin; + self->write = write_pin; self->reset.base.type = &mp_type_NoneType; if (reset != NULL) { @@ -96,23 +85,22 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel never_reset_pin_number(command->number); never_reset_pin_number(chip_select->number); - never_reset_pin_number(write->number); + never_reset_pin_number(write_pin); never_reset_pin_number(read->number); for (uint8_t i = 0; i < 8; i++) { never_reset_pin_number(data_pin + i); } + // Calculate pin usage all data pins + write pin uint32_t pin_usage = 0; - for (int pin_number = 2; pin_number < 10; pin_number ++) { + for (uint8_t pin_number = data_pin; pin_number < data_pin+8; pin_number++) { pin_usage += (1 << pin_number); } pin_usage += (1 << write_pin); - mp_printf(&mp_plat_print, "pin usage %x\n", pin_usage); - //uint8_t pin_number = digitalinout->pin->number; bool ok = rp2pio_statemachine_construct(&self->state_machine, parallel_program, sizeof(parallel_program) / sizeof(parallel_program[0]), - 48000000, //125000000, // freq 24Mhz + 60000000, //48000000, //125000000, // freq 24Mhz NULL, 0, // init data0, 8, // first out pin, # out pins NULL, 0, // first in pin, # in pins @@ -128,9 +116,6 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel // Do nothing. Maybe bitbang? return; } - mp_printf(&mp_plat_print, "ok %d\n", ok); - mp_printf(&mp_plat_print, "smvalues: %d %d %d\n", self->state_machine.state_machine, self->state_machine.pins, self->state_machine.actual_frequency); - } void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) { @@ -140,7 +125,7 @@ void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) reset_pin_number(self->command.pin->number); reset_pin_number(self->chip_select.pin->number); - reset_pin_number(self->write.pin->number); + reset_pin_number(self->write); reset_pin_number(self->read.pin->number); reset_pin_number(self->reset.pin->number); } @@ -172,34 +157,8 @@ void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byt displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); - /*mp_printf(&mp_plat_print, "send bt %d cs %d dl %d data: ", byte_type, chip_select, data_length); - int max = 8; - if (data_length < max) - max = data_length; - for (int i = 0; i < max; i++) { - mp_printf(&mp_plat_print, "%x ", data[i]); - }*/ - common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA); - //mp_printf(&mp_plat_print, "."); - - //for (int i = 0; i < data_length; i++) { - //common_hal_digitalio_digitalinout_set_value(&self->write, 0); - //pio_sm_put_blocking(self->state_machine.pio, self->state_machine.state_machine, *data); - //common_hal_digitalio_digitalinout_set_value(&self->write, 1); - //mp_printf(&mp_plat_print, "%x", *data); - //data++; - //} - //pio_sm_put_blocking(self->state_machine.pio, self->state_machine.state_machine, 255); - //bool success = common_hal_rp2pio_statemachine_write(&self->state_machine, data, data_length); - //common_hal_mcu_delay_us(50000); - //pio_sm_put_blocking(self->state_machine.pio, self->state_machine.state_machine, 0); - //common_hal_mcu_delay_us(50000); - - bool success = common_hal_rp2pio_statemachine_write(&self->state_machine, data, data_length); - - //mp_printf(&mp_plat_print, "%d", success); - //mp_printf(&mp_plat_print, ","); + common_hal_rp2pio_statemachine_write(&self->state_machine, data, data_length); } void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.h b/ports/raspberrypi/common-hal/displayio/ParallelBus.h index b2b1d02604..3d83c8fca7 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.h +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.h @@ -36,8 +36,8 @@ typedef struct { digitalio_digitalinout_obj_t command; digitalio_digitalinout_obj_t chip_select; digitalio_digitalinout_obj_t reset; - digitalio_digitalinout_obj_t write; digitalio_digitalinout_obj_t read; + uint8_t write; uint8_t data0_pin; rp2pio_statemachine_obj_t state_machine; } displayio_parallelbus_obj_t; From 56a219911f11eab590d34fc6e32dee0fc3151705 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Thu, 4 Feb 2021 17:33:23 -0600 Subject: [PATCH 005/261] Add frequency support to parallel bus --- ports/atmel-samd/common-hal/displayio/ParallelBus.c | 2 +- ports/esp32s2/common-hal/displayio/ParallelBus.c | 2 +- ports/mimxrt10xx/common-hal/displayio/ParallelBus.c | 2 +- ports/nrf/common-hal/displayio/ParallelBus.c | 2 +- ports/raspberrypi/common-hal/displayio/ParallelBus.c | 8 ++++++-- ports/stm/common-hal/displayio/ParallelBus.c | 2 +- shared-bindings/displayio/ParallelBus.c | 5 +++-- shared-bindings/displayio/ParallelBus.h | 2 +- 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.c b/ports/atmel-samd/common-hal/displayio/ParallelBus.c index f10dd2993b..841edef24a 100644 --- a/ports/atmel-samd/common-hal/displayio/ParallelBus.c +++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.c @@ -35,7 +35,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { + const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { uint8_t data_pin = data0->number; if (data_pin % 8 != 0) { diff --git a/ports/esp32s2/common-hal/displayio/ParallelBus.c b/ports/esp32s2/common-hal/displayio/ParallelBus.c index f77b37b57c..44f7b0a0cd 100644 --- a/ports/esp32s2/common-hal/displayio/ParallelBus.c +++ b/ports/esp32s2/common-hal/displayio/ParallelBus.c @@ -40,7 +40,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { + const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { uint8_t data_pin = data0->number; if (data_pin % 8 != 0) { diff --git a/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c b/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c index 0fdf4413b6..84cee20c77 100644 --- a/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c +++ b/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c @@ -35,7 +35,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { + const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { mp_raise_NotImplementedError(translate("ParallelBus not yet supported")); } diff --git a/ports/nrf/common-hal/displayio/ParallelBus.c b/ports/nrf/common-hal/displayio/ParallelBus.c index 31ee1f48e4..8de3cf6259 100644 --- a/ports/nrf/common-hal/displayio/ParallelBus.c +++ b/ports/nrf/common-hal/displayio/ParallelBus.c @@ -35,7 +35,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { + const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { uint8_t data_pin = data0->number; if (data_pin % 8 != 0) { diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/displayio/ParallelBus.c index e8302571d0..dd722a5870 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -45,7 +45,11 @@ static const uint16_t parallel_program[] = { void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { + const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { + + // If we did not set frequency guess at 60Mhz + if (frequency == 0) + frequency = 60000000; uint8_t data_pin = data0->number; for (uint8_t i = 0; i < 8; i++) { @@ -100,7 +104,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel bool ok = rp2pio_statemachine_construct(&self->state_machine, parallel_program, sizeof(parallel_program) / sizeof(parallel_program[0]), - 60000000, //48000000, //125000000, // freq 24Mhz + frequency, // frequency NULL, 0, // init data0, 8, // first out pin, # out pins NULL, 0, // first in pin, # in pins diff --git a/ports/stm/common-hal/displayio/ParallelBus.c b/ports/stm/common-hal/displayio/ParallelBus.c index fd07d38af4..600d62e6ac 100644 --- a/ports/stm/common-hal/displayio/ParallelBus.c +++ b/ports/stm/common-hal/displayio/ParallelBus.c @@ -35,7 +35,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { + const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { mp_raise_NotImplementedError(translate("ParallelBus not yet supported")); } diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c index 30c9d373c8..5b34334242 100644 --- a/shared-bindings/displayio/ParallelBus.c +++ b/shared-bindings/displayio/ParallelBus.c @@ -60,7 +60,7 @@ //| ... //| STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_data0, ARG_command, ARG_chip_select, ARG_write, ARG_read, ARG_reset }; + enum { ARG_data0, ARG_command, ARG_chip_select, ARG_write, ARG_read, ARG_reset, ARG_frequency }; static const mp_arg_t allowed_args[] = { { MP_QSTR_data0, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_command, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, @@ -68,6 +68,7 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t { MP_QSTR_write, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_read, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_reset, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, + { MP_QSTR_frequency, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0 } }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -82,7 +83,7 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t displayio_parallelbus_obj_t* self = &allocate_display_bus_or_raise()->parallel_bus; self->base.type = &displayio_parallelbus_type; - common_hal_displayio_parallelbus_construct(self, data0, command, chip_select, write, read, reset); + common_hal_displayio_parallelbus_construct(self, data0, command, chip_select, write, read, reset, args[ARG_frequency].u_int); return self; } diff --git a/shared-bindings/displayio/ParallelBus.h b/shared-bindings/displayio/ParallelBus.h index 1e74e3a0ac..0d91b441f6 100644 --- a/shared-bindings/displayio/ParallelBus.h +++ b/shared-bindings/displayio/ParallelBus.h @@ -37,7 +37,7 @@ extern const mp_obj_type_t displayio_parallelbus_type; void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset); + const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency); void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self); From 73214119624a7823fe49f64c24e7e766557d8c53 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Thu, 4 Feb 2021 20:06:20 -0600 Subject: [PATCH 006/261] Added frequency to parallel display --- ports/atmel-samd/boards/pyportal/board.c | 3 ++- ports/atmel-samd/boards/pyportal_titano/board.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/boards/pyportal/board.c b/ports/atmel-samd/boards/pyportal/board.c index db474a8209..3e08dd500d 100644 --- a/ports/atmel-samd/boards/pyportal/board.c +++ b/ports/atmel-samd/boards/pyportal/board.c @@ -69,7 +69,8 @@ void board_init(void) { &pin_PB06, // Chip select &pin_PB09, // Write &pin_PB04, // Read - &pin_PA00); // Reset + &pin_PA00, // Reset + 0); // Frequency displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; diff --git a/ports/atmel-samd/boards/pyportal_titano/board.c b/ports/atmel-samd/boards/pyportal_titano/board.c index 59a25c4acf..a0ea859af2 100644 --- a/ports/atmel-samd/boards/pyportal_titano/board.c +++ b/ports/atmel-samd/boards/pyportal_titano/board.c @@ -86,7 +86,8 @@ void board_init(void) { &pin_PB06, // Chip select &pin_PB09, // Write &pin_PB04, // Read - &pin_PA00); // Reset + &pin_PA00, // Reset + 0); // Frequency displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; From c384ebe5c0b9c99cc0ab0cebcb9436fcafe8cd6e Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Thu, 4 Mar 2021 18:06:14 -0600 Subject: [PATCH 007/261] Updated to initalize pindirs --- .../common-hal/displayio/ParallelBus.c | 30 ++++++------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/displayio/ParallelBus.c index dd722a5870..5db8c47093 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -95,31 +95,19 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel never_reset_pin_number(data_pin + i); } - // Calculate pin usage all data pins + write pin - uint32_t pin_usage = 0; - for (uint8_t pin_number = data_pin; pin_number < data_pin+8; pin_number++) { - pin_usage += (1 << pin_number); - } - pin_usage += (1 << write_pin); - - bool ok = rp2pio_statemachine_construct(&self->state_machine, + common_hal_rp2pio_statemachine_construct(&self->state_machine, parallel_program, sizeof(parallel_program) / sizeof(parallel_program[0]), frequency, // frequency NULL, 0, // init - data0, 8, // first out pin, # out pins + data0, 8, 0, 255, // first out pin, # out pins NULL, 0, // first in pin, # in pins - NULL, 0, // first set pin - write, 1, // first sideset pin - pin_usage, // pins we use - true, // tx fifo - false, // rx fifo + NULL, 0, 0, 0, // first set pin + write, 1, 0, 1, // first sideset pin + true, // exclusive pin usage true, 8, true, // TX, auto pull every 8 bits. shift left to output msb first - false, 32, true, // RX setting we don't use - false); // claim pins - if (!ok) { - // Do nothing. Maybe bitbang? - return; - } + false, // wait for TX stall + false, 32, true // RX setting we don't use + ); } void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) { @@ -162,7 +150,7 @@ void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byt displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA); - common_hal_rp2pio_statemachine_write(&self->state_machine, data, data_length); + common_hal_rp2pio_statemachine_write(&self->state_machine, data, data_length, 1); } void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { From 1658fe04f9b4fe0ac07d105e3123c263d36a2a42 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Thu, 4 Mar 2021 20:48:24 -0600 Subject: [PATCH 008/261] Set the statemachine to never reset so REPL works --- ports/raspberrypi/bindings/rp2pio/StateMachine.h | 2 ++ ports/raspberrypi/common-hal/displayio/ParallelBus.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.h b/ports/raspberrypi/bindings/rp2pio/StateMachine.h index 3a0d4290d5..975fca3864 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.h +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.h @@ -52,6 +52,8 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, void common_hal_rp2pio_statemachine_deinit(rp2pio_statemachine_obj_t *self); bool common_hal_rp2pio_statemachine_deinited(rp2pio_statemachine_obj_t *self); +void common_hal_rp2pio_statemachine_never_reset(rp2pio_statemachine_obj_t *self); + void common_hal_rp2pio_statemachine_restart(rp2pio_statemachine_obj_t *self); void common_hal_rp2pio_statemachine_stop(rp2pio_statemachine_obj_t *self); void common_hal_rp2pio_statemachine_run(rp2pio_statemachine_obj_t *self, const uint16_t *instructions, size_t len); diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/displayio/ParallelBus.c index 5db8c47093..f955215593 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -108,9 +108,13 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel false, // wait for TX stall false, 32, true // RX setting we don't use ); + + common_hal_rp2pio_statemachine_never_reset(&self->state_machine); } void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) { + common_hal_rp2pio_statemachine_deinit(&self->state_machine); + for (uint8_t i = 0; i < 8; i++) { reset_pin_number(self->data0_pin + i); } From b02b1e9979c40461b08780d47c6d4466094c069a Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Sun, 7 Mar 2021 12:12:25 -0600 Subject: [PATCH 009/261] Set frequency default 60Mhz --- ports/raspberrypi/common-hal/displayio/ParallelBus.c | 4 ---- shared-bindings/displayio/ParallelBus.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/displayio/ParallelBus.c index f955215593..ede7cf5e40 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -47,10 +47,6 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { - // If we did not set frequency guess at 60Mhz - if (frequency == 0) - frequency = 60000000; - uint8_t data_pin = data0->number; for (uint8_t i = 0; i < 8; i++) { if (!pin_number_is_free(data_pin + i)) { diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c index 5b34334242..66b7cd764f 100644 --- a/shared-bindings/displayio/ParallelBus.c +++ b/shared-bindings/displayio/ParallelBus.c @@ -68,7 +68,7 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t { MP_QSTR_write, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_read, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_reset, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, - { MP_QSTR_frequency, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0 } }, + { MP_QSTR_frequency, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 60000000 } }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); From 5689307798e6231526c33b67806e47cbc0eedcb5 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Thu, 11 Mar 2021 18:58:09 -0600 Subject: [PATCH 010/261] Changed frequency to match PIO having 2 instructions --- ports/raspberrypi/common-hal/displayio/ParallelBus.c | 2 +- shared-bindings/displayio/ParallelBus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/displayio/ParallelBus.c index ede7cf5e40..d4d1a9f0ec 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -93,7 +93,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel common_hal_rp2pio_statemachine_construct(&self->state_machine, parallel_program, sizeof(parallel_program) / sizeof(parallel_program[0]), - frequency, // frequency + frequency * 2, // frequency multiplied by 2 as 2 PIO instructions NULL, 0, // init data0, 8, 0, 255, // first out pin, # out pins NULL, 0, // first in pin, # in pins diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c index 66b7cd764f..58c4639fd9 100644 --- a/shared-bindings/displayio/ParallelBus.c +++ b/shared-bindings/displayio/ParallelBus.c @@ -68,7 +68,7 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t { MP_QSTR_write, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_read, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_reset, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, - { MP_QSTR_frequency, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 60000000 } }, + { MP_QSTR_frequency, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 30000000 } }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); From 307d2a99febbf6cdff824131dddc2ef938f5ea13 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Thu, 11 Mar 2021 20:06:50 -0600 Subject: [PATCH 011/261] Fix after rebase --- ports/raspberrypi/common-hal/displayio/ParallelBus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/displayio/ParallelBus.c index d4d1a9f0ec..427b68b503 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -96,7 +96,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel frequency * 2, // frequency multiplied by 2 as 2 PIO instructions NULL, 0, // init data0, 8, 0, 255, // first out pin, # out pins - NULL, 0, // first in pin, # in pins + NULL, 0, 0, 0, // first in pin, # in pins NULL, 0, 0, 0, // first set pin write, 1, 0, 1, // first sideset pin true, // exclusive pin usage From de93df64447f77c69c8b879c36712dd0e5bceac4 Mon Sep 17 00:00:00 2001 From: felixerdy Date: Fri, 12 Mar 2021 17:57:55 +0100 Subject: [PATCH 012/261] add senseBox MCU --- .github/workflows/build.yml | 1 + ports/atmel-samd/boards/sensebox_mcu/board.c | 39 ++++++++++++ .../boards/sensebox_mcu/mpconfigboard.h | 22 +++++++ .../boards/sensebox_mcu/mpconfigboard.mk | 14 +++++ ports/atmel-samd/boards/sensebox_mcu/pins.c | 60 +++++++++++++++++++ 5 files changed, 136 insertions(+) create mode 100644 ports/atmel-samd/boards/sensebox_mcu/board.c create mode 100644 ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/sensebox_mcu/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f65618b40d..158e3dc6cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -308,6 +308,7 @@ jobs: - "same54_xplained" - "seeeduino_wio_terminal" - "seeeduino_xiao" + - "sensebox_mcu" - "serpente" - "shirtty" - "silicognition-m4-shim" diff --git a/ports/atmel-samd/boards/sensebox_mcu/board.c b/ports/atmel-samd/boards/sensebox_mcu/board.c new file mode 100644 index 0000000000..7af05ba45a --- /dev/null +++ b/ports/atmel-samd/boards/sensebox_mcu/board.c @@ -0,0 +1,39 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "hal/include/hal_gpio.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h new file mode 100644 index 0000000000..96d11bbeea --- /dev/null +++ b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h @@ -0,0 +1,22 @@ +#define MICROPY_HW_BOARD_NAME "senseBox MCU" +#define MICROPY_HW_MCU_NAME "senseBox" + +#define MICROPY_HW_LED_STATUS (&pin_PA27) + +#define MICROPY_PORT_A (0) +#define MICROPY_PORT_B (0) +#define MICROPY_PORT_C (0) + +#define DEFAULT_I2C_BUS_SCL (&pin_PA09) +#define DEFAULT_I2C_BUS_SDA (&pin_PA08) + +#define DEFAULT_SPI_BUS_SCK (&pin_PA17) +#define DEFAULT_SPI_BUS_MOSI (&pin_PA16) +#define DEFAULT_SPI_BUS_MISO (&pin_PA19) + +#define DEFAULT_UART_BUS_RX (&pin_PA23) +#define DEFAULT_UART_BUS_TX (&pin_PA22) + +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 diff --git a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk new file mode 100644 index 0000000000..f5ce4a5d13 --- /dev/null +++ b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk @@ -0,0 +1,14 @@ +USB_VID = 0x04D8 +USB_PID = 0xEF67 +USB_PRODUCT = "senseBox MCU" +USB_MANUFACTURER = "senseBox" + +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE +CIRCUITPY_FULL_BUILD = 0 + +SUPEROPT_GC = 0 +SUPEROPT_VM = 0 diff --git a/ports/atmel-samd/boards/sensebox_mcu/pins.c b/ports/atmel-samd/boards/sensebox_mcu/pins.c new file mode 100644 index 0000000000..6204ff9a7b --- /dev/null +++ b/ports/atmel-samd/boards/sensebox_mcu/pins.c @@ -0,0 +1,60 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + + // Analog pins + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA04) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA03) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA02) }, + + // Digital pins + // { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA20) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA04) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA03) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA27) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA28) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB09) }, + + // UART pins + { MP_ROM_QSTR(MP_QSTR_UART_PWR), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_PB09) }, + + // SPI pins + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA19) }, + + // I2C pins + { MP_ROM_QSTR(MP_QSTR_I2C_PWR), MP_ROM_PTR(&pin_PB11) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, + + // LED pins + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA27) }, + { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_PA27) }, + { MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_PA28) }, + + // XBEE pins + { MP_ROM_QSTR(MP_QSTR_XB1_PWR), MP_ROM_PTR(&pin_PB03) }, + { MP_ROM_QSTR(MP_QSTR_XB2_PWR), MP_ROM_PTR(&pin_PB10) }, + + // Comm objects + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 9133b23a37649cc53568f8208c2493348441d700 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 14 Mar 2021 13:27:28 -0500 Subject: [PATCH 013/261] bitmaptools: Add readinto When reading uncompressed bitmap data directly, readinto can work much more quickly than a Python-coded loop. On a Raspberry Pi Pico, I benchmarked a modified version of adafruit_bitmap_font's pcf reader which uses readinto instead of the existing code. My test font was a 72-point file created from Arial. This decreased the time to load all the ASCII glyphs from 4.9 seconds to just 0.44 seconds. While this attempts to support many pixel configurations (1/2/4/8/16/24/32 bpp; swapped words and pixels) only the single combination used by PCF fonts was tested. --- shared-bindings/bitmaptools/__init__.c | 76 ++++++++++++++++++++++ shared-bindings/bitmaptools/__init__.h | 4 ++ shared-module/bitmaptools/__init__.c | 90 ++++++++++++++++++++++++++ 3 files changed, 170 insertions(+) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 118564ff85..0e655d5bfb 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -357,7 +357,83 @@ STATIC mp_obj_t bitmaptools_obj_draw_line(size_t n_args, const mp_obj_t *pos_arg MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_line); // requires all 6 arguments +//| def readinto(bitmap: displayio.Bitmap, file: typing.BinaryIO, bits_per_pixel: int, element_size: int = 1, reverse_pixels_in_element: bool = False, swap_bytes_in_element: bool = False): +//| """Read from a binary file into a bitmap +//| The file must be positioned so that it consists of ``bitmap.height`` rows of pixel data, where each row is the smallest multiple of ``element_size`` bytes that can hold ``bitmap.width`` pixels. +//| +//| The bytes in an element can be optionally swapped, and the pixels in an element can be reversed. +//| +//| This function doesn't parse image headers, but is useful to speed up loading of uncompressed image formats such as PCF glyph data. +//| +//| :param displayio.Bitmap bitmap: A writable bitmap +//| :param typing.BinaryIO file: A file opened in binary mode +//| :param int bits_per_pixel: Number of bits per pixel. Values 1, 2, 4, 8, 16, 24, and 32 are supported; +//| :param int element_size: Number of bytes per element. Values of 1, 2, and 4 are supported, except that 24 ``bits_per_pixel`` requires 1 byte per element. +//| :param bool reverse_pixels_in_element: If set, the first pixel in a word is taken from the Most Signficant Bits; otherwise, it is taken from the Least Significant Bits. +//| :param bool swap_bytes_in_element: If the ``element_size`` is not 1, then reverse the byte order of each element read. +//| """ +//| ... +//| + +STATIC mp_obj_t bitmaptools_readinto(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_bitmap, ARG_file, ARG_bits_per_pixel, ARG_element_size, ARG_reverse_pixels_in_element, ARG_swap_bytes_in_element }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_file, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_bits_per_pixel, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_element_size, MP_ARG_INT, { .u_int = 1 } }, + { MP_QSTR_reverse_pixels_in_element, MP_ARG_BOOL, { .u_bool = false } }, + { MP_QSTR_swap_bytes_in_element, MP_ARG_BOOL, { .u_bool = false } }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + if (!MP_OBJ_IS_TYPE(args[ARG_bitmap].u_obj, &displayio_bitmap_type)) { + mp_raise_TypeError(NULL); + } + displayio_bitmap_t *bitmap = MP_OBJ_TO_PTR(args[ARG_bitmap].u_obj); + + if (!MP_OBJ_IS_TYPE(args[ARG_file].u_obj, &mp_type_fileio)) { + mp_raise_TypeError(NULL); + } + pyb_file_obj_t* file = MP_OBJ_TO_PTR(args[ARG_file].u_obj); + + int element_size = args[ARG_element_size].u_int; + if (element_size != 1 && element_size != 2 && element_size != 4) { + mp_raise_ValueError_varg(translate("invalid element_size %d, must be, 1, 2, or 4"), element_size); + } + + int bits_per_pixel = args[ARG_bits_per_pixel].u_int; + switch (bits_per_pixel) { + case 24: + if (element_size != 1) { + mp_raise_ValueError_varg(translate("invalid element size %d for bits_per_pixel %d\n"), element_size, bits_per_pixel); + } + break; + case 1: + case 2: + case 4: + case 8: + case 16: + case 32: + break; + default: + mp_raise_ValueError_varg(translate("invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32"), bits_per_pixel); + } + + bool reverse_pixels_in_element = args[ARG_reverse_pixels_in_element].u_bool; + bool swap_bytes_in_element = args[ARG_swap_bytes_in_element].u_bool; + + common_hal_bitmaptools_readinto(bitmap, file, element_size, bits_per_pixel, reverse_pixels_in_element, swap_bytes_in_element); + + return mp_const_none; +} + +MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_readinto_obj, 0, bitmaptools_readinto); + STATIC const mp_rom_map_elem_t bitmaptools_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&bitmaptools_readinto_obj) }, { MP_ROM_QSTR(MP_QSTR_rotozoom), MP_ROM_PTR(&bitmaptools_rotozoom_obj) }, { MP_ROM_QSTR(MP_QSTR_fill_region), MP_ROM_PTR(&bitmaptools_fill_region_obj) }, { MP_ROM_QSTR(MP_QSTR_draw_line), MP_ROM_PTR(&bitmaptools_draw_line_obj) }, diff --git a/shared-bindings/bitmaptools/__init__.h b/shared-bindings/bitmaptools/__init__.h index 1ab6e41293..50ad7f5264 100644 --- a/shared-bindings/bitmaptools/__init__.h +++ b/shared-bindings/bitmaptools/__init__.h @@ -27,7 +27,9 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_BITMAPTOOLS__INIT__H #define MICROPY_INCLUDED_SHARED_BINDINGS_BITMAPTOOLS__INIT__H +#include "shared-module/displayio/Bitmap.h" #include "py/obj.h" +#include "extmod/vfs_fat.h" void common_hal_bitmaptools_rotozoom(displayio_bitmap_t *self, int16_t ox, int16_t oy, int16_t dest_clip0_x, int16_t dest_clip0_y, @@ -49,4 +51,6 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, int16_t x1, int16_t y1, uint32_t value); +void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_BITMAPTOOLS__INIT__H diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 6f168b5552..a41b5007c2 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -25,10 +25,12 @@ */ +#include "shared-bindings/bitmaptools/__init__.h" #include "shared-bindings/displayio/Bitmap.h" #include "shared-module/displayio/Bitmap.h" #include "py/runtime.h" +#include "py/mperrno.h" #include "math.h" #include "stdlib.h" @@ -336,3 +338,91 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, } } } + +void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* file, int element_size, int bits_per_pixel, bool reverse_pixels_in_element, bool swap_bytes) { + if (self->read_only) { + mp_raise_RuntimeError(translate("Read-only object")); + } + + size_t elements_per_row = (self->width * bits_per_pixel + element_size * 8 - 1) / (element_size * 8); + size_t rowsize = element_size * elements_per_row; + size_t rowsize_in_u32 = (rowsize + sizeof(uint32_t) - 1) / sizeof(uint32_t); + size_t rowsize_in_u16 = (rowsize + sizeof(uint16_t) - 1) / sizeof(uint16_t); + for(int y=0; yheight; y++) { + uint32_t rowdata32[rowsize_in_u32]; + uint16_t *rowdata16 = (uint16_t*)rowdata32; + uint8_t *rowdata8 = (uint8_t*)rowdata32; + + UINT bytes_read = 0; + if (f_read(&file->fp, rowdata32, rowsize, &bytes_read) != FR_OK || bytes_read != rowsize) { + mp_raise_OSError(MP_EIO); + } + + if (swap_bytes) { + switch(element_size) { + case 2: + { + for(int i=0; i< rowsize_in_u16; i++) { + rowdata16[i] = __builtin_bswap16(rowdata16[i]); + } + } + break; + case 4: + for(int i=0; i< rowsize_in_u32; i++) { + rowdata32[i] = __builtin_bswap32(rowdata32[i]); + } + default: + break; + } + } + + for(int x=0; xwidth; x++) { + int value = 0; + switch(bits_per_pixel) { + case 1: + { + int byte_offset = x / 8; + int bit_offset = reverse_pixels_in_element ? (7 - x % 8) : x % 8; + + value = (rowdata8[byte_offset] >> bit_offset) & 1; + break; + } + case 2: + { + int byte_offset = x / 4; + int bit_offset = 2 * (reverse_pixels_in_element ? (3 - x % 4) : x % 4); + + value = (rowdata8[byte_offset] >> bit_offset) & 3; + break; + } + case 4: + { + int byte_offset = x / 2; + int bit_offset = 4 * (reverse_pixels_in_element ? (1 - x % 2) : x % 2); + + value = (rowdata8[byte_offset] >> bit_offset) & 7; + break; + } + case 8: + value = rowdata8[x]; + break; + + case 16: + value = rowdata16[x]; + break; + + case 24: + value = (rowdata8[x * 3] << 16) | (rowdata8[x * 3 + 1] << 8) | (rowdata8[x * 3 + 2] << 8); + break; + + case 32: + value = rowdata32[x]; + break; + } + + displayio_bitmap_write_pixel(self, x, y, value); + } + } + + displayio_bitmap_set_dirty_area(self, 0, 0, self->width, self->height); +} From 6e9a44bbfdeeebde8fb553b86dac3b15c3ab8318 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 14 Mar 2021 15:03:00 -0500 Subject: [PATCH 014/261] make translate --- locale/circuitpython.pot | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 2f15d70b12..7aaf1bfabb 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -73,6 +73,7 @@ msgstr "" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -962,6 +963,7 @@ msgstr "" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1247,7 +1249,7 @@ msgstr "" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "" @@ -2291,7 +2293,7 @@ msgstr "" msgid "Unsupported format" msgstr "" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "" @@ -3206,6 +3208,11 @@ msgstr "" msgid "invalid arguments" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "" @@ -3214,6 +3221,16 @@ msgstr "" msgid "invalid dupterm index" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3699,6 +3716,7 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3724,6 +3742,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h From 094265cb866fa60e1018bb36a4675de0169418a1 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 14 Mar 2021 15:36:20 -0500 Subject: [PATCH 015/261] bitmaptools.readinto: Fix diagnostics on atmel-samd builds --- shared-module/bitmaptools/__init__.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index a41b5007c2..1997076514 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -361,14 +361,12 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* f if (swap_bytes) { switch(element_size) { case 2: - { - for(int i=0; i< rowsize_in_u16; i++) { - rowdata16[i] = __builtin_bswap16(rowdata16[i]); - } + for(size_t i=0; i< rowsize_in_u16; i++) { + rowdata16[i] = __builtin_bswap16(rowdata16[i]); } break; case 4: - for(int i=0; i< rowsize_in_u32; i++) { + for(size_t i=0; i< rowsize_in_u32; i++) { rowdata32[i] = __builtin_bswap32(rowdata32[i]); } default: From 651f54b4ccc7b35aa17f3e1498043aaea96a690f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 14 Mar 2021 15:47:15 -0500 Subject: [PATCH 016/261] fix docs --- shared-bindings/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 0e655d5bfb..2780680d00 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -357,7 +357,7 @@ STATIC mp_obj_t bitmaptools_obj_draw_line(size_t n_args, const mp_obj_t *pos_arg MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_line); // requires all 6 arguments -//| def readinto(bitmap: displayio.Bitmap, file: typing.BinaryIO, bits_per_pixel: int, element_size: int = 1, reverse_pixels_in_element: bool = False, swap_bytes_in_element: bool = False): +//| def readinto(bitmap: displayio.Bitmap, file: typing.BinaryIO, bits_per_pixel: int, element_size: int = 1, reverse_pixels_in_element: bool = False, swap_bytes_in_element: bool = False) -> None: //| """Read from a binary file into a bitmap //| The file must be positioned so that it consists of ``bitmap.height`` rows of pixel data, where each row is the smallest multiple of ``element_size`` bytes that can hold ``bitmap.width`` pixels. //| From b33d77bfe86d2ae5ef86ab0153a55e903cd1134b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 14 Mar 2021 20:08:09 -0500 Subject: [PATCH 017/261] disable bitmaptools on over-full board --- .../atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk index 2f4db69b45..29774db742 100755 --- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk @@ -15,6 +15,7 @@ CIRCUITPY_AUDIOBUSIO = 0 # No DAC on SAMR21G CIRCUITPY_AUDIOIO = 0 CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_RTC = 0 CIRCUITPY_FREQUENCYIO = 0 From 6c32a1f67fa52fe65cddd18df4b3070b68a1713a Mon Sep 17 00:00:00 2001 From: felixerdy Date: Mon, 15 Mar 2021 10:27:50 +0100 Subject: [PATCH 018/261] update pins of senseBox MCU --- ports/atmel-samd/boards/sensebox_mcu/pins.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ports/atmel-samd/boards/sensebox_mcu/pins.c b/ports/atmel-samd/boards/sensebox_mcu/pins.c index 6204ff9a7b..7c1aafcc89 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/pins.c +++ b/ports/atmel-samd/boards/sensebox_mcu/pins.c @@ -51,6 +51,15 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // XBEE pins { MP_ROM_QSTR(MP_QSTR_XB1_PWR), MP_ROM_PTR(&pin_PB03) }, { MP_ROM_QSTR(MP_QSTR_XB2_PWR), MP_ROM_PTR(&pin_PB10) }, + { MP_ROM_QSTR(MP_QSTR_XB1_CS), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_XB2_CS), MP_ROM_PTR(&pin_PA14) }, + { MP_ROM_QSTR(MP_QSTR_XB1_INT), MP_ROM_PTR(&pin_PA21) }, + { MP_ROM_QSTR(MP_QSTR_XB2_INT), MP_ROM_PTR(&pin_PA15) }, + { MP_ROM_QSTR(MP_QSTR_XB1_RX), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_XB1_TX), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_XB2_RX), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_XB2_TX), MP_ROM_PTR(&pin_PA10) }, + // Comm objects { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, From 0567d069369a1dfa47910c55ad05d7dbe512c43c Mon Sep 17 00:00:00 2001 From: mintakka Date: Mon, 15 Mar 2021 10:27:21 -0400 Subject: [PATCH 019/261] added board configuration for Sparkfun ThingPlus RP2040 --- .../boards/sparkfun_thingplus/board.c | 40 +++++++++++++++++++ .../boards/sparkfun_thingplus/mpconfigboard.h | 17 ++++++++ .../sparkfun_thingplus/mpconfigboard.mk | 9 +++++ .../boards/sparkfun_thingplus/pins.c | 37 +++++++++++++++++ 4 files changed, 103 insertions(+) create mode 100644 ports/raspberrypi/boards/sparkfun_thingplus/board.c create mode 100644 ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/sparkfun_thingplus/pins.c diff --git a/ports/raspberrypi/boards/sparkfun_thingplus/board.c b/ports/raspberrypi/boards/sparkfun_thingplus/board.c new file mode 100644 index 0000000000..c4021a83e9 --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_thingplus/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +#include "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h b/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h new file mode 100644 index 0000000000..2c229e3898 --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h @@ -0,0 +1,17 @@ +#define MICROPY_HW_BOARD_NAME "Sparkfun ThingPlus RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO8) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO7) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO6) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO14) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO15) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO12) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) + +// Flash chip is GD25Q64 connected over QSPI +#define TOTAL_FLASH_SIZE (16 * 1024 * 1024) diff --git a/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk new file mode 100644 index 0000000000..cb9468167a --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x239A +USB_PID = 0x80F2 +USB_PRODUCT = "ThingPlus RP2040" +USB_MANUFACTURER = "Sparkfun" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/raspberrypi/boards/sparkfun_thingplus/pins.c b/ports/raspberrypi/boards/sparkfun_thingplus/pins.c new file mode 100644 index 0000000000..8f63a9bdf2 --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_thingplus/pins.c @@ -0,0 +1,37 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO9)}, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From c2ed1b0942740cf6a6d061f1a058245d31490521 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 15:13:10 -0500 Subject: [PATCH 020/261] pre-commit: only run uncrustify if changed files are detected This adds the "no-run-if-empty" flag to the xargs invocation. Otherwise, if git diff names no files, the command is run once with no agument specified which leads to running on a default list of files that appears to include ignored files and files in submodules. I am uneasy about how this works (it means that `pre-commit run --all` doesn't actually check all files) but that's a separate issue. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f7fc8c12a..aa6bda102c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,6 +21,6 @@ repos: language: system - id: formatting name: Formatting - entry: sh -c "git diff --staged --name-only | xargs python3 tools/codeformat.py" + entry: sh -c "git diff --staged --name-only | xargs -r python3 tools/codeformat.py" types_or: [c, python] language: system From 4538d973d28e7ddf037d743ab016cee43209a713 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 15 Mar 2021 13:23:15 -0700 Subject: [PATCH 021/261] Add Sourcegraph link and raspberrypi port --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 27e420e845..4e617ed6d5 100644 --- a/README.rst +++ b/README.rst @@ -50,6 +50,9 @@ Specifically useful documentation when starting out: - `Welcome to CircuitPython `__ - `CircuitPython Essentials `__ - `Example Code `__ +Code Search +------------ +GitHub doesn't currently support code search on forks. Therefore, CircuitPython doesn't have code search through GitHub because it is a fork of MicroPython. Luckily, `SourceGraph `_ has free code search for public repos like CircuitPython. So, visit `sourcegraph.com/github.com/adafruit/circuitpython `_ to search the CircuitPython codebase online. Contributing ------------ @@ -207,6 +210,7 @@ esp32s2 beta litex alpha mimxrt10xx alpha nrf stable +raspberrypi beta stm ``F4`` stable | ``others`` beta unix alpha ================ ============================================================ From cc1dd73e942ed8a5d335391e3bb6dc206576d993 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 15:32:26 -0500 Subject: [PATCH 022/261] pre-commit: Have pre-commit pass the list of files to codeformat.py --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aa6bda102c..a6ad210f7a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,6 +21,6 @@ repos: language: system - id: formatting name: Formatting - entry: sh -c "git diff --staged --name-only | xargs -r python3 tools/codeformat.py" + entry: python3 tools/codeformat.py types_or: [c, python] language: system From d0e3848b24fcc058a1c23b3f8236a7b21992ece5 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 17:25:15 -0500 Subject: [PATCH 023/261] codeformat: Exclude specified files even from commandline, for pre-commit --- tools/codeformat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/codeformat.py b/tools/codeformat.py index 389bda8772..eef4682be0 100644 --- a/tools/codeformat.py +++ b/tools/codeformat.py @@ -142,7 +142,7 @@ def main(): # Expand the globs passed on the command line, or use the default globs above. files = [] if args.files: - files = list_files(args.files) + files = list_files(args.files, EXCLUSIONS) else: files = list_files(PATHS, EXCLUSIONS, TOP) From ed61e8955d37bf4780c04130f05302d85314ef1b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 17:53:18 -0500 Subject: [PATCH 024/261] codeformat: require filenames, filter them by include/exclude lists --- tools/codeformat.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tools/codeformat.py b/tools/codeformat.py index eef4682be0..fb2a94e49b 100644 --- a/tools/codeformat.py +++ b/tools/codeformat.py @@ -27,6 +27,7 @@ import argparse import glob +import fnmatch import itertools import os import re @@ -75,12 +76,13 @@ C_EXTS = (".c", ".h") PY_EXTS = (".py",) -def list_files(paths, exclusions=None, prefix=""): +def list_files(args, paths, exclusions=None, prefix=""): files = set() + args = [os.path.join(prefix, arg) for arg in args] for pattern in paths: - files.update(glob.glob(os.path.join(prefix, pattern), recursive=True)) + files.update(fnmatch.filter(args, os.path.join(prefix, pattern))) for pattern in exclusions or []: - files.difference_update(glob.fnmatch.filter(files, os.path.join(prefix, pattern))) + files.difference_update(fnmatch.filter(files, os.path.join(prefix, pattern))) return sorted(files) @@ -128,23 +130,19 @@ def fixup_c(filename): def main(): - cmd_parser = argparse.ArgumentParser(description="Auto-format C and Python files.") + cmd_parser = argparse.ArgumentParser(description="Auto-format C and Python files -- to be used via pre-commit only.") cmd_parser.add_argument("-c", action="store_true", help="Format C code only") cmd_parser.add_argument("-p", action="store_true", help="Format Python code only") cmd_parser.add_argument("-v", action="store_true", help="Enable verbose output") - cmd_parser.add_argument("files", nargs="*", help="Run on specific globs") + cmd_parser.add_argument("files", nargs="+", help="Run on specific globs") args = cmd_parser.parse_args() # Setting only one of -c or -p disables the other. If both or neither are set, then do both. format_c = args.c or not args.p format_py = args.p or not args.c - # Expand the globs passed on the command line, or use the default globs above. - files = [] - if args.files: - files = list_files(args.files, EXCLUSIONS) - else: - files = list_files(PATHS, EXCLUSIONS, TOP) + # Expand the arguments passed on the command line, subject to the PATHS and EXCLUSIONS + files = list_files(args.files, PATHS, EXCLUSIONS, TOP) # Extract files matching a specific language. def lang_files(exts): From 0403a2cca59ed24c0a71486e29d701220e8c4cf7 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 17:53:49 -0500 Subject: [PATCH 025/261] codeformat: Run sed only on requested files When running from pre-commit, we believe the different invocations of sed were racing with each other, sometimes leaving zero-byte files in the filesystem (ow) --- tools/codeformat.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/codeformat.py b/tools/codeformat.py index fb2a94e49b..e9615ae560 100644 --- a/tools/codeformat.py +++ b/tools/codeformat.py @@ -167,10 +167,7 @@ def main(): for file in lang_files(C_EXTS): fixup_c(file) # Revert "// |" back to "//|" - subprocess.call( - "find shared-bindings ports/*/bindings -name '*.c' -exec sed -i 's/\/ |/\/|/' {} \;", - shell=True, - ) + batch(["sed", "-i", "s,^// |,//|,"], lang_files(C_EXTS)) # Format Python files with black. if format_py: From 253385d9b76cf364808e88b9b84b94d5bf22ef7b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 18:07:51 -0500 Subject: [PATCH 026/261] codeformat: use pathlib for correct(-er) processing of * vs ** in globs --- tools/codeformat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/codeformat.py b/tools/codeformat.py index e9615ae560..141ad71124 100644 --- a/tools/codeformat.py +++ b/tools/codeformat.py @@ -30,6 +30,7 @@ import glob import fnmatch import itertools import os +import pathlib import re import subprocess @@ -80,7 +81,7 @@ def list_files(args, paths, exclusions=None, prefix=""): files = set() args = [os.path.join(prefix, arg) for arg in args] for pattern in paths: - files.update(fnmatch.filter(args, os.path.join(prefix, pattern))) + files.update(arg for arg in args if pathlib.Path(arg).match(pattern)) for pattern in exclusions or []: files.difference_update(fnmatch.filter(files, os.path.join(prefix, pattern))) return sorted(files) From d3bf1fe15dd3720d6566e061a0d315add550b248 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 18:11:00 -0500 Subject: [PATCH 027/261] modifications by pre-commit --- ports/atmel-samd/eic_handler.c | 46 ++++++++++++++++---------------- ports/atmel-samd/fatfs_port.c | 8 +++--- ports/atmel-samd/ld_defines.c | 24 ++++++++--------- ports/atmel-samd/mpconfigport.h | 10 +++---- ports/atmel-samd/mphalport.c | 8 +++--- ports/atmel-samd/mphalport.h | 2 +- ports/atmel-samd/timer_handler.c | 22 +++++++-------- ports/cxd56/background.c | 9 ++++--- 8 files changed, 66 insertions(+), 63 deletions(-) diff --git a/ports/atmel-samd/eic_handler.c b/ports/atmel-samd/eic_handler.c index 7f26bdefbf..226dafc765 100644 --- a/ports/atmel-samd/eic_handler.c +++ b/ports/atmel-samd/eic_handler.c @@ -29,7 +29,7 @@ #include "common-hal/rotaryio/IncrementalEncoder.h" #include "common-hal/countio/Counter.h" #include "shared-bindings/microcontroller/__init__.h" -//#include "samd/external_interrupts.h" +// #include "samd/external_interrupts.h" #include "eic_handler.h" // Which handler should be called for a particular channel? @@ -42,31 +42,31 @@ void set_eic_handler(uint8_t channel, uint8_t eic_handler) { void shared_eic_handler(uint8_t channel) { uint8_t handler = eic_channel_handler[channel]; switch (handler) { -#if CIRCUITPY_PULSEIO - case EIC_HANDLER_PULSEIN: - pulsein_interrupt_handler(channel); - break; -#endif + #if CIRCUITPY_PULSEIO + case EIC_HANDLER_PULSEIN: + pulsein_interrupt_handler(channel); + break; + #endif -#if CIRCUITPY_PS2IO - case EIC_HANDLER_PS2: - ps2_interrupt_handler(channel); - break; -#endif + #if CIRCUITPY_PS2IO + case EIC_HANDLER_PS2: + ps2_interrupt_handler(channel); + break; + #endif -#if CIRCUITPY_ROTARYIO - case EIC_HANDLER_INCREMENTAL_ENCODER: - incrementalencoder_interrupt_handler(channel); - break; -#endif + #if CIRCUITPY_ROTARYIO + case EIC_HANDLER_INCREMENTAL_ENCODER: + incrementalencoder_interrupt_handler(channel); + break; + #endif -#if CIRCUITPY_COUNTIO - case EIC_HANDLER_COUNTER: - counter_interrupt_handler(channel); - break; -#endif + #if CIRCUITPY_COUNTIO + case EIC_HANDLER_COUNTER: + counter_interrupt_handler(channel); + break; + #endif - default: - break; + default: + break; } } diff --git a/ports/atmel-samd/fatfs_port.c b/ports/atmel-samd/fatfs_port.c index c65a73a428..e6eee20495 100644 --- a/ports/atmel-samd/fatfs_port.c +++ b/ports/atmel-samd/fatfs_port.c @@ -35,14 +35,14 @@ #endif DWORD get_fattime(void) { -#if CIRCUITPY_RTC + #if CIRCUITPY_RTC timeutils_struct_time_t tm; common_hal_rtc_get_time(&tm); return ((tm.tm_year - 1980) << 25) | (tm.tm_mon << 21) | (tm.tm_mday << 16) | - (tm.tm_hour << 11) | (tm.tm_min << 5) | (tm.tm_sec >> 1); -#else + (tm.tm_hour << 11) | (tm.tm_min << 5) | (tm.tm_sec >> 1); + #else return ((2016 - 1980) << 25) | ((9) << 21) | ((1) << 16) | ((16) << 11) | ((43) << 5) | (35 / 2); -#endif + #endif } diff --git a/ports/atmel-samd/ld_defines.c b/ports/atmel-samd/ld_defines.c index 18f49d42c6..56e26d8dca 100644 --- a/ports/atmel-samd/ld_defines.c +++ b/ports/atmel-samd/ld_defines.c @@ -9,22 +9,22 @@ // The next line is a marker to start looking for definitions. Lines above the next line are ignored. // START_LD_DEFINES -/*RAM_SIZE=*/ RAM_SIZE; -/*FLASH_SIZE=*/ FLASH_SIZE; +/*RAM_SIZE=*/ RAM_SIZE; +/*FLASH_SIZE=*/ FLASH_SIZE; -/*BOOTLOADER_SIZE=*/ BOOTLOADER_SIZE; -/*BOOTLOADER_START_ADDR=*/ BOOTLOADER_START_ADDR; +/*BOOTLOADER_SIZE=*/ BOOTLOADER_SIZE; +/*BOOTLOADER_START_ADDR=*/ BOOTLOADER_START_ADDR; -/*CIRCUITPY_DEFAULT_STACK_SIZE=*/ CIRCUITPY_DEFAULT_STACK_SIZE; +/*CIRCUITPY_DEFAULT_STACK_SIZE=*/ CIRCUITPY_DEFAULT_STACK_SIZE; -/*CIRCUITPY_FIRMWARE_START_ADDR=*/ CIRCUITPY_FIRMWARE_START_ADDR; -/*CIRCUITPY_FIRMWARE_SIZE=*/ CIRCUITPY_FIRMWARE_SIZE; +/*CIRCUITPY_FIRMWARE_START_ADDR=*/ CIRCUITPY_FIRMWARE_START_ADDR; +/*CIRCUITPY_FIRMWARE_SIZE=*/ CIRCUITPY_FIRMWARE_SIZE; -/*CIRCUITPY_INTERNAL_CONFIG_START_ADDR=*/ CIRCUITPY_INTERNAL_CONFIG_START_ADDR; -/*CIRCUITPY_INTERNAL_CONFIG_SIZE=*/ CIRCUITPY_INTERNAL_CONFIG_SIZE; +/*CIRCUITPY_INTERNAL_CONFIG_START_ADDR=*/ CIRCUITPY_INTERNAL_CONFIG_START_ADDR; +/*CIRCUITPY_INTERNAL_CONFIG_SIZE=*/ CIRCUITPY_INTERNAL_CONFIG_SIZE; -/*CIRCUITPY_INTERNAL_NVM_START_ADDR=*/ CIRCUITPY_INTERNAL_NVM_START_ADDR; -/*CIRCUITPY_INTERNAL_NVM_SIZE=*/ CIRCUITPY_INTERNAL_NVM_SIZE; +/*CIRCUITPY_INTERNAL_NVM_START_ADDR=*/ CIRCUITPY_INTERNAL_NVM_START_ADDR; +/*CIRCUITPY_INTERNAL_NVM_SIZE=*/ CIRCUITPY_INTERNAL_NVM_SIZE; /*CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR=*/ CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR; -/*CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE=*/ CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE; +/*CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE=*/ CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE; diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index d2a529485e..c66ab99ab2 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -38,7 +38,7 @@ // HMCRAMC0_SIZE is defined in the ASF4 include files for each SAMD21 chip. #define RAM_SIZE HMCRAMC0_SIZE -#define BOOTLOADER_SIZE (8*1024) +#define BOOTLOADER_SIZE (8 * 1024) #define CIRCUITPY_MCU_FAMILY samd21 #define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21" #define SPI_FLASH_MAX_BAUDRATE 8000000 @@ -67,7 +67,7 @@ // HSRAM_SIZE is defined in the ASF4 include files for each SAM_D5X_E5X chip. #define RAM_SIZE HSRAM_SIZE -#define BOOTLOADER_SIZE (16*1024) +#define BOOTLOADER_SIZE (16 * 1024) #define CIRCUITPY_MCU_FAMILY samd51 #ifdef SAMD51 #define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51" @@ -96,7 +96,7 @@ #ifdef SAMD21 #if INTERNAL_FLASH_FILESYSTEM -#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (64*1024) +#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (64 * 1024) #else #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0) #endif @@ -131,7 +131,7 @@ #endif #ifndef CIRCUITPY_DEFAULT_STACK_SIZE -#define CIRCUITPY_DEFAULT_STACK_SIZE (24*1024) +#define CIRCUITPY_DEFAULT_STACK_SIZE (24 * 1024) #endif #ifndef SAMD5x_E5x_BOD33_LEVEL @@ -148,7 +148,7 @@ // If CIRCUITPY is internal, use half of flash for it. #if INTERNAL_FLASH_FILESYSTEM #ifndef CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE - #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (FLASH_SIZE/2) + #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (FLASH_SIZE / 2) #endif #else #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0) diff --git a/ports/atmel-samd/mphalport.c b/ports/atmel-samd/mphalport.c index b497b89cd8..5ebce1a857 100644 --- a/ports/atmel-samd/mphalport.c +++ b/ports/atmel-samd/mphalport.c @@ -56,15 +56,15 @@ extern uint32_t common_hal_mcu_processor_get_frequency(void); // Testing done at 48 MHz on SAMD21 and 120 MHz on SAMD51, multiplication and division cancel out. // But get the frequency just in case. #ifdef SAMD21 -#define DELAY_LOOP_ITERATIONS_PER_US ( (10U*48000000U) / common_hal_mcu_processor_get_frequency()) +#define DELAY_LOOP_ITERATIONS_PER_US ((10U * 48000000U) / common_hal_mcu_processor_get_frequency()) #endif #ifdef SAM_D5X_E5X -#define DELAY_LOOP_ITERATIONS_PER_US ( (30U*120000000U) / common_hal_mcu_processor_get_frequency()) +#define DELAY_LOOP_ITERATIONS_PER_US ((30U * 120000000U) / common_hal_mcu_processor_get_frequency()) #endif void mp_hal_delay_us(mp_uint_t delay) { - for (uint32_t i = delay*DELAY_LOOP_ITERATIONS_PER_US; i > 0; i--) { - asm volatile("nop"); + for (uint32_t i = delay * DELAY_LOOP_ITERATIONS_PER_US; i > 0; i--) { + asm volatile ("nop"); } } diff --git a/ports/atmel-samd/mphalport.h b/ports/atmel-samd/mphalport.h index adc65ade53..8b9b7fd14c 100644 --- a/ports/atmel-samd/mphalport.h +++ b/ports/atmel-samd/mphalport.h @@ -34,7 +34,7 @@ #include "supervisor/shared/tick.h" // Global millisecond tick count (driven by SysTick interrupt). -#define mp_hal_ticks_ms() ((mp_uint_t) supervisor_ticks_ms32()) +#define mp_hal_ticks_ms() ((mp_uint_t)supervisor_ticks_ms32()) // Number of bytes in receive buffer extern volatile uint8_t usb_rx_count; diff --git a/ports/atmel-samd/timer_handler.c b/ports/atmel-samd/timer_handler.c index 16d65334e0..eab9311d6a 100644 --- a/ports/atmel-samd/timer_handler.c +++ b/ports/atmel-samd/timer_handler.c @@ -49,31 +49,31 @@ void shared_timer_handler(bool is_tc, uint8_t index) { // Make sure to add the handler #define to timer_handler.h if (is_tc) { uint8_t handler = tc_handler[index]; - switch(handler) { + switch (handler) { case TC_HANDLER_PULSEIN: - #if CIRCUITPY_PULSEIO + #if CIRCUITPY_PULSEIO pulsein_timer_interrupt_handler(index); - #endif + #endif break; case TC_HANDLER_PULSEOUT: - #if CIRCUITPY_PULSEIO + #if CIRCUITPY_PULSEIO pulseout_interrupt_handler(index); - #endif + #endif break; case TC_HANDLER_PEW: - #if CIRCUITPY_PEW + #if CIRCUITPY_PEW pewpew_interrupt_handler(index); - #endif + #endif break; case TC_HANDLER_FREQUENCYIN: - #if CIRCUITPY_FREQUENCYIO + #if CIRCUITPY_FREQUENCYIO frequencyin_interrupt_handler(index); - #endif + #endif break; case TC_HANDLER_RGBMATRIX: - #if CIRCUITPY_RGBMATRIX + #if CIRCUITPY_RGBMATRIX _PM_IRQ_HANDLER(); - #endif + #endif break; default: break; diff --git a/ports/cxd56/background.c b/ports/cxd56/background.c index 6de6d7275b..644a5d7b0b 100644 --- a/ports/cxd56/background.c +++ b/ports/cxd56/background.c @@ -30,6 +30,9 @@ #include "supervisor/filesystem.h" #include "supervisor/shared/stack.h" -void port_background_task(void) {} -void port_start_background_task(void) {} -void port_finish_background_task(void) {} +void port_background_task(void) { +} +void port_start_background_task(void) { +} +void port_finish_background_task(void) { +} From 921bf6de7ce020b1be0c6525881225280060ca64 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 15 Mar 2021 16:12:51 -0700 Subject: [PATCH 028/261] Add back empty line --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 4e617ed6d5..b71ad005e6 100644 --- a/README.rst +++ b/README.rst @@ -50,6 +50,7 @@ Specifically useful documentation when starting out: - `Welcome to CircuitPython `__ - `CircuitPython Essentials `__ - `Example Code `__ + Code Search ------------ GitHub doesn't currently support code search on forks. Therefore, CircuitPython doesn't have code search through GitHub because it is a fork of MicroPython. Luckily, `SourceGraph `_ has free code search for public repos like CircuitPython. So, visit `sourcegraph.com/github.com/adafruit/circuitpython `_ to search the CircuitPython codebase online. From b9a973c8e0f7287874d56ce043ed814a823b53ed Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 19:22:48 -0500 Subject: [PATCH 029/261] codeformat: Do search&replace without sed --- tools/codeformat.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/codeformat.py b/tools/codeformat.py index 141ad71124..58c5a8e39f 100644 --- a/tools/codeformat.py +++ b/tools/codeformat.py @@ -99,6 +99,10 @@ def fixup_c(filename): # Get next line. l = lines.pop(0) + # Revert "// |" back to "//| " + if l.startswith("// |"): + l = "//|" + l[4:] + # Dedent #'s to match indent of following line (not previous line). m = re.match(r"( +)#(if |ifdef |ifndef |elif |else|endif)", l) if m: @@ -167,8 +171,6 @@ def main(): batch(command, lang_files(C_EXTS)) for file in lang_files(C_EXTS): fixup_c(file) - # Revert "// |" back to "//|" - batch(["sed", "-i", "s,^// |,//|,"], lang_files(C_EXTS)) # Format Python files with black. if format_py: From 3963031ef926e0a0156a94a079d82ee4e3a38081 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 19:30:53 -0500 Subject: [PATCH 030/261] cursory documentation of pre-commit --- BUILDING.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index 10d7d8f4af..4738d13500 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -85,3 +85,21 @@ Example: If your port/build includes `arm-none-eabi-gdb-py`, consider using it instead, as it can be used for better register debugging with https://github.com/bnahill/PyCortexMDebug + +# Code Quality Checks + +We apply code quality checks using pre-commit. Install pre-commit once per system with + + python3 -mpip install pre-commit + +Activate it once per git clone with + + pre-commit --install + +Pre-commit also requires some additional programs to be installed through your package manager: + + * Standard Unix tools such as make, find, etc + * The gettext package, any modern version + * uncrustify version 0.71 (0.72 is also tested) + +Some pre-commit quality checks require your active attention to resolve, others (such as the formatting checks of uncrustify) are made automatically and must simply be incorporated into your code changes by committing them. From 1af6aa25ce5f2c7258d5316bc8c9f310c0374706 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 19:32:40 -0500 Subject: [PATCH 031/261] ok it would be nice to know how to run it --- BUILDING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index 4738d13500..256996807d 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -102,4 +102,6 @@ Pre-commit also requires some additional programs to be installed through your p * The gettext package, any modern version * uncrustify version 0.71 (0.72 is also tested) +Each time you create a git commit, the pre-commit quality checks will be run. You can also run them e.g., with `pre-commit run foo.c` or `pre-commit run --all` to run on all files whether modified or not. + Some pre-commit quality checks require your active attention to resolve, others (such as the formatting checks of uncrustify) are made automatically and must simply be incorporated into your code changes by committing them. From 477a58f8bfea6509652a3d753fdffd4da5a10c7f Mon Sep 17 00:00:00 2001 From: Daniel Glocker Date: Mon, 15 Mar 2021 09:47:00 +0000 Subject: [PATCH 032/261] Translated using Weblate (German) Currently translated at 80.3% (783 of 975 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/de/ --- locale/de_DE.po | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/locale/de_DE.po b/locale/de_DE.po index ff37ab3e4b..76690adcb3 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -6,14 +6,14 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-02-25 00:24+0000\n" +"PO-Revision-Date: 2021-03-16 00:47+0000\n" "Last-Translator: Daniel Glocker \n" "Language: de_DE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.5\n" +"X-Generator: Weblate 4.5.2-dev\n" #: main.c msgid "" @@ -1645,7 +1645,7 @@ msgstr "Spielt nicht ab" #: main.c msgid "Not running saved code.\n" -msgstr "" +msgstr "Gespeicherter Code wird nicht ausgeführt.\n" #: shared-bindings/_bleio/__init__.c msgid "Not settable" @@ -1857,6 +1857,8 @@ msgstr "Der Präfixbuffer muss sich auf dem Heap befinden" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" +"Drücke eine beliebige Taste um REPL zu betreten. Drücke STRG-D zum neuladen." +"\n" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" From c560e79a31982239e23eba2b345fb83a64c4bdc2 Mon Sep 17 00:00:00 2001 From: Noel Gaetan Date: Mon, 15 Mar 2021 21:30:06 +0000 Subject: [PATCH 033/261] Translated using Weblate (French) Currently translated at 98.8% (964 of 975 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index e04aeb5726..dd4fa522fe 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-03-14 23:02+0000\n" -"Last-Translator: Hugo Dahl \n" +"PO-Revision-Date: 2021-03-16 00:47+0000\n" +"Last-Translator: Noel Gaetan \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -358,7 +358,7 @@ msgstr "Tous les automates finis sont utilisés" #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "All sync event channels in use" -msgstr "Tout canaux d'événements sync (sync event channels) sont utilisés" +msgstr "Tout les canaux d'événements sync sont utilisés" #: shared-bindings/pwmio/PWMOut.c msgid "All timers for this pin are in use" @@ -1775,7 +1775,7 @@ msgstr "" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice already in use" -msgstr "" +msgstr "PWM slice déja utilisée" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice channel A already in use" @@ -1820,7 +1820,7 @@ msgstr "La broche est entrée uniquement" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "Pin must be on PWM Channel B" -msgstr "" +msgstr "La broche doit être sur le canal B du PWM" #: ports/atmel-samd/common-hal/countio/Counter.c msgid "Pin must support hardware interrupts" @@ -1843,7 +1843,7 @@ msgstr "" #: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c msgid "Pins must be sequential" -msgstr "" +msgstr "Les broches doivent être séquentielles" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" @@ -2594,7 +2594,7 @@ msgstr "opération binaire '%q' non implémentée" #: shared-bindings/busio/UART.c msgid "bits must be in range 5 to 9" -msgstr "" +msgstr "les bits doivent être compris entre 5 et 9" #: shared-bindings/audiomixer/Mixer.c msgid "bits_per_sample must be 8 or 16" From a5e2b7393676253cc4348977c5a82216b0c48d03 Mon Sep 17 00:00:00 2001 From: hexthat Date: Mon, 15 Mar 2021 05:52:27 +0000 Subject: [PATCH 034/261] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (975 of 975 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 4e1d1a12b6..bf2015a358 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-09 01:49+0000\n" +"PO-Revision-Date: 2021-03-16 00:47+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.5.1\n" +"X-Generator: Weblate 4.5.2-dev\n" #: main.c msgid "" @@ -1818,7 +1818,7 @@ msgstr "" #: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c msgid "Pins must be sequential" -msgstr "" +msgstr "yǐn jiǎo bì xū shì lián xù de" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" @@ -3806,7 +3806,7 @@ msgstr "zài qǐdòng shí tóngshí àn xià liǎng gè ànniǔ.\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" -msgstr "" +msgstr "lā kǒu zhào yǔ fāng xiàng miàn mó chōng tū" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" From 65cc95da3fc93347c75f49b6214597aa8522f91e Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 16 Mar 2021 01:47:06 +0100 Subject: [PATCH 035/261] 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 | 21 +++++++++++---------- locale/cs.po | 21 +++++++++++---------- locale/de_DE.po | 31 +++++++++++++++++++------------ locale/el.po | 21 +++++++++++---------- locale/en_GB.po | 21 +++++++++++---------- locale/es.po | 27 +++++++++++++++++---------- locale/fil.po | 21 +++++++++++---------- locale/fr.po | 27 +++++++++++++++++---------- locale/hi.po | 21 +++++++++++---------- locale/it_IT.po | 21 +++++++++++---------- locale/ja.po | 24 ++++++++++++++---------- locale/ko.po | 21 +++++++++++---------- locale/nl.po | 27 +++++++++++++++++---------- locale/pl.po | 24 ++++++++++++++---------- locale/pt_BR.po | 27 +++++++++++++++++---------- locale/sv.po | 27 +++++++++++++++++---------- locale/zh_Latn_pinyin.po | 27 +++++++++++++++++---------- 17 files changed, 237 insertions(+), 172 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 77a7b32072..55b02fea1f 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -78,6 +78,7 @@ msgstr "%q sedang digunakan" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -981,6 +982,7 @@ msgstr "Gagal untuk mengalokasikan buffer RX" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1268,7 +1270,7 @@ msgstr "File tidak valid" msgid "Invalid format chunk size" msgstr "Ukuran potongan format tidak valid" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "" @@ -2335,7 +2337,7 @@ msgstr "Baudrate tidak didukung" msgid "Unsupported format" msgstr "Format tidak didukung" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Operasi yang tidak didukung" @@ -2900,6 +2902,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3390,10 +3396,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3751,6 +3753,7 @@ msgstr "Muncul dari PulseIn yang kosong" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3776,6 +3779,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4207,10 +4212,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index d7658965f7..1cac959b84 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -76,6 +76,7 @@ msgstr "Používá se %q" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -965,6 +966,7 @@ msgstr "" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1250,7 +1252,7 @@ msgstr "" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "" @@ -2294,7 +2296,7 @@ msgstr "" msgid "Unsupported format" msgstr "" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "" @@ -2852,6 +2854,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3342,10 +3348,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3702,6 +3704,7 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3727,6 +3730,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4157,10 +4162,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 76690adcb3..2bd7fc998e 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -81,6 +81,7 @@ msgstr "%q in Benutzung" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -983,6 +984,7 @@ msgstr "Konnte keinen RX Buffer allozieren" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1272,7 +1274,7 @@ msgstr "Ungültige Datei" msgid "Invalid format chunk size" msgstr "Ungültige format chunk size" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "Ungültige Frequenz" @@ -1857,8 +1859,8 @@ msgstr "Der Präfixbuffer muss sich auf dem Heap befinden" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" -"Drücke eine beliebige Taste um REPL zu betreten. Drücke STRG-D zum neuladen." -"\n" +"Drücke eine beliebige Taste um REPL zu betreten. Drücke STRG-D zum " +"neuladen.\n" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" @@ -2347,7 +2349,7 @@ msgstr "Nicht unterstützter display bus type" msgid "Unsupported format" msgstr "Nicht unterstütztes Format" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Nicht unterstützte Operation" @@ -2928,6 +2930,10 @@ msgstr "diff Argument muss ein ndarray sein" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3426,10 +3432,6 @@ msgstr "map buffer zu klein" msgid "math domain error" msgstr "Mathe-Domain-Fehler" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "Matrix Dimensionen stimmen nicht überein" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "Matrix ist nicht positiv definitiv" @@ -3790,6 +3792,7 @@ msgstr "pop von einem leeren PulseIn" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3815,6 +3818,8 @@ msgstr "pow () mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4252,10 +4257,6 @@ msgstr "Wert muss in %d Byte(s) passen" msgid "value_count must be > 0" msgstr "value_count muss größer als 0 sein" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "Vektoren müssen die selbe Länge haben" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4345,6 +4346,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "matrix dimensions do not match" +#~ msgstr "Matrix Dimensionen stimmen nicht überein" + +#~ msgid "vectors must have same lengths" +#~ msgstr "Vektoren müssen die selbe Länge haben" + #~ msgid "Group full" #~ msgstr "Gruppe voll" diff --git a/locale/el.po b/locale/el.po index 3e2e896a09..578c18739d 100644 --- a/locale/el.po +++ b/locale/el.po @@ -73,6 +73,7 @@ msgstr "" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -962,6 +963,7 @@ msgstr "" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1247,7 +1249,7 @@ msgstr "" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "" @@ -2291,7 +2293,7 @@ msgstr "" msgid "Unsupported format" msgstr "" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "" @@ -2849,6 +2851,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3339,10 +3345,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3699,6 +3701,7 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3724,6 +3727,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4154,10 +4159,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index e192b0eaf2..8ee2da6c3f 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -72,6 +72,7 @@ msgstr "" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -961,6 +962,7 @@ msgstr "" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1246,7 +1248,7 @@ msgstr "" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "" @@ -2290,7 +2292,7 @@ msgstr "" msgid "Unsupported format" msgstr "" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "" @@ -2848,6 +2850,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3338,10 +3344,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3698,6 +3700,7 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3723,6 +3726,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4153,10 +4158,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" diff --git a/locale/es.po b/locale/es.po index 529c987dab..bcf4dfc798 100644 --- a/locale/es.po +++ b/locale/es.po @@ -84,6 +84,7 @@ msgstr "%q está siendo utilizado" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -988,6 +989,7 @@ msgstr "Ha fallado la asignación del buffer RX" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1283,7 +1285,7 @@ msgstr "Archivo inválido" msgid "Invalid format chunk size" msgstr "Formato de fragmento de formato no válido" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "Frecuencia inválida" @@ -2364,7 +2366,7 @@ msgstr "Sin capacidad de bus tipo display" msgid "Unsupported format" msgstr "Formato no soportado" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Operación no soportada" @@ -2938,6 +2940,10 @@ msgstr "El argumento diff debe ser un ndarray" msgid "differentiation order out of range" msgstr "Orden de diferenciación fuera de rango" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3431,10 +3437,6 @@ msgstr "map buffer muy pequeño" msgid "math domain error" msgstr "error de dominio matemático" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "las dimensiones de la matriz no coinciden" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrix no es definida positiva" @@ -3795,6 +3797,7 @@ msgstr "pop de un PulseIn vacío" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3820,6 +3823,8 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4253,10 +4258,6 @@ msgstr "el valor debe caber en %d byte(s)" msgid "value_count must be > 0" msgstr "value_count debe ser > 0" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "los vectores deben tener el mismo tamaño" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflicto de wakeup" @@ -4346,6 +4347,12 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "matrix dimensions do not match" +#~ msgstr "las dimensiones de la matriz no coinciden" + +#~ msgid "vectors must have same lengths" +#~ msgstr "los vectores deben tener el mismo tamaño" + #~ msgid "Group full" #~ msgstr "Group lleno" diff --git a/locale/fil.po b/locale/fil.po index b49fd072f9..ce194d7334 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -72,6 +72,7 @@ msgstr "%q ay ginagamit" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -975,6 +976,7 @@ msgstr "Nabigong ilaan ang RX buffer" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1262,7 +1264,7 @@ msgstr "Mali ang file" msgid "Invalid format chunk size" msgstr "Mali ang format ng chunk size" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "" @@ -2313,7 +2315,7 @@ msgstr "Hindi supportadong tipo ng bitmap" msgid "Unsupported format" msgstr "Hindi supportadong format" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Hindi sinusuportahang operasyon" @@ -2890,6 +2892,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3386,10 +3392,6 @@ msgstr "masyadong maliit ang buffer map" msgid "math domain error" msgstr "may pagkakamali sa math domain" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3748,6 +3750,7 @@ msgstr "pop mula sa walang laman na PulseIn" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3773,6 +3776,8 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4207,10 +4212,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index dd4fa522fe..2f0b26da79 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -84,6 +84,7 @@ msgstr "%q en cours d'utilisation" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -995,6 +996,7 @@ msgstr "Echec de l'allocation du tampon RX" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1290,7 +1292,7 @@ msgstr "Fichier invalide" msgid "Invalid format chunk size" msgstr "Taille de bloc de formatage invalide" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "Fréquence non valide" @@ -2374,7 +2376,7 @@ msgstr "Type de bus d'affichage non supporté" msgid "Unsupported format" msgstr "Format non supporté" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Opération non supportée" @@ -2955,6 +2957,10 @@ msgstr "l'argument diff doit être un ndarray" msgid "differentiation order out of range" msgstr "differentiation order hors de portée" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3452,10 +3458,6 @@ msgstr "tampon trop petit" msgid "math domain error" msgstr "erreur de domaine math" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "les dimensions de la matrice ne correspondent pas" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "la matrice n'est pas définie positive" @@ -3817,6 +3819,7 @@ msgstr "'pop' d'une entrée PulseIn vide" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3842,6 +3845,8 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4275,10 +4280,6 @@ msgstr "la valeur doit tenir dans %d octet(s)" msgid "value_count must be > 0" msgstr "'value_count' doit être > 0" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "les vecteurs doivent avoir la même longueur" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflit au réveil" @@ -4368,6 +4369,12 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "matrix dimensions do not match" +#~ msgstr "les dimensions de la matrice ne correspondent pas" + +#~ msgid "vectors must have same lengths" +#~ msgstr "les vecteurs doivent avoir la même longueur" + #~ msgid "Group full" #~ msgstr "Groupe plein" diff --git a/locale/hi.po b/locale/hi.po index e20c4a5e26..7f6273974d 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -73,6 +73,7 @@ msgstr "" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -962,6 +963,7 @@ msgstr "" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1247,7 +1249,7 @@ msgstr "" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "" @@ -2291,7 +2293,7 @@ msgstr "" msgid "Unsupported format" msgstr "" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "" @@ -2849,6 +2851,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3339,10 +3345,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3699,6 +3701,7 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3724,6 +3727,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4154,10 +4159,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 7e13fa0eff..e74432a370 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -82,6 +82,7 @@ msgstr "%q in uso" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -984,6 +985,7 @@ msgstr "Impossibile allocare buffer RX" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1273,7 +1275,7 @@ msgstr "File non valido" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "" @@ -2334,7 +2336,7 @@ msgstr "tipo di bitmap non supportato" msgid "Unsupported format" msgstr "Formato non supportato" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Operazione non supportata" @@ -2901,6 +2903,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3398,10 +3404,6 @@ msgstr "map buffer troppo piccolo" msgid "math domain error" msgstr "errore di dominio matematico" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3765,6 +3767,7 @@ msgstr "pop sun un PulseIn vuoto" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3790,6 +3793,8 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4224,10 +4229,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 7555843857..5e5da8e9ed 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -78,6 +78,7 @@ msgstr "%qは使用中" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -973,6 +974,7 @@ msgstr "RXバッファの確保に失敗" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1260,7 +1262,7 @@ msgstr "不正なファイル" msgid "Invalid format chunk size" msgstr "フォーマットチャンクのサイズが不正" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "不正な周波数" @@ -2314,7 +2316,7 @@ msgstr "" msgid "Unsupported format" msgstr "非対応の形式" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "非対応の操作" @@ -2876,6 +2878,10 @@ msgstr "引数はndarrayでなければなりません" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3367,10 +3373,6 @@ msgstr "" msgid "math domain error" msgstr "定義域エラー" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "行列の次元が一致しません" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "正定値行列ではありません" @@ -3729,6 +3731,7 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3754,6 +3757,8 @@ msgstr "pow()の第3引数には整数が必要" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4185,10 +4190,6 @@ msgstr "値は%dバイトに収まらなければなりません" msgid "value_count must be > 0" msgstr "value_countは0より大きくなければなりません" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4278,6 +4279,9 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "matrix dimensions do not match" +#~ msgstr "行列の次元が一致しません" + #~ msgid "Group full" #~ msgstr "グループが一杯" diff --git a/locale/ko.po b/locale/ko.po index 77a145dba4..c480466c45 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -74,6 +74,7 @@ msgstr "%q 사용 중입니다" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -965,6 +966,7 @@ msgstr "" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1250,7 +1252,7 @@ msgstr "파일이 유효하지 않습니다" msgid "Invalid format chunk size" msgstr "형식 청크 크기가 잘못되었습니다" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "" @@ -2295,7 +2297,7 @@ msgstr "" msgid "Unsupported format" msgstr "" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "" @@ -2853,6 +2855,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3343,10 +3349,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3703,6 +3705,7 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3728,6 +3731,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4158,10 +4163,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index e839699efd..851b9ac236 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -76,6 +76,7 @@ msgstr "%q in gebruik" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -973,6 +974,7 @@ msgstr "RX buffer alloceren mislukt" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1261,7 +1263,7 @@ msgstr "Ongeldig bestand" msgid "Invalid format chunk size" msgstr "Ongeldig formaat stuk grootte" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "Onjuiste frequentie" @@ -2335,7 +2337,7 @@ msgstr "Niet-ondersteund beeldscherm bus type" msgid "Unsupported format" msgstr "Niet-ondersteunde format" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Niet-ondersteunde operatie" @@ -2906,6 +2908,10 @@ msgstr "diff argument moet een ndarray zijn" msgid "differentiation order out of range" msgstr "differentiatievolgorde buiten bereik" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3400,10 +3406,6 @@ msgstr "map buffer te klein" msgid "math domain error" msgstr "fout in het wiskundig domein (math domain error)" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "matrix afmetingen komen niet overeen" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrix is niet positief-definiet" @@ -3761,6 +3763,7 @@ msgstr "pop van een lege PulseIn" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3786,6 +3789,8 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4218,10 +4223,6 @@ msgstr "waarde moet in %d byte(s) passen" msgid "value_count must be > 0" msgstr "value_count moet groter dan 0 zijn" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "vectoren moeten van gelijke lengte zijn" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflict bij ontwaken" @@ -4311,6 +4312,12 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "matrix dimensions do not match" +#~ msgstr "matrix afmetingen komen niet overeen" + +#~ msgid "vectors must have same lengths" +#~ msgstr "vectoren moeten van gelijke lengte zijn" + #~ msgid "Group full" #~ msgstr "Groep is vol" diff --git a/locale/pl.po b/locale/pl.po index c4ce7ea7a7..77ffa25cdb 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -78,6 +78,7 @@ msgstr "%q w użyciu" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -973,6 +974,7 @@ msgstr "Nie udała się alokacja bufora RX" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1260,7 +1262,7 @@ msgstr "Zły plik" msgid "Invalid format chunk size" msgstr "Zła wielkość fragmentu formatu" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "Nieprawidłowa częstotliwość" @@ -2305,7 +2307,7 @@ msgstr "Zły typ magistrali wyświetlaczy" msgid "Unsupported format" msgstr "Zły format" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Zła operacja" @@ -2870,6 +2872,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3360,10 +3366,6 @@ msgstr "bufor mapy zbyt mały" msgid "math domain error" msgstr "błąd domeny" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3721,6 +3723,7 @@ msgstr "pop z pustego PulseIn" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3746,6 +3749,8 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4177,10 +4182,6 @@ msgstr "wartość musi mieścić się w %d bajtach" msgid "value_count must be > 0" msgstr "value_count musi być > 0" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "wektory muszą mieć identyczną długość" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4270,6 +4271,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "vectors must have same lengths" +#~ msgstr "wektory muszą mieć identyczną długość" + #~ msgid "Group full" #~ msgstr "Grupa pełna" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index fcc9dc602a..a08582903e 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -82,6 +82,7 @@ msgstr "%q em uso" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -991,6 +992,7 @@ msgstr "Falha ao alocar buffer RX" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1285,7 +1287,7 @@ msgstr "Arquivo inválido" msgid "Invalid format chunk size" msgstr "Tamanho do pedaço de formato inválido" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "Frequência inválida" @@ -2369,7 +2371,7 @@ msgstr "Não há suporte para o tipo do display bus" msgid "Unsupported format" msgstr "Formato não suportado" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Operação não suportada" @@ -2946,6 +2948,10 @@ msgstr "O argumento diff deve ser um ndarray" msgid "differentiation order out of range" msgstr "ordem de diferenciação fora do alcance" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3440,10 +3446,6 @@ msgstr "o mapa do buffer é muito pequeno" msgid "math domain error" msgstr "erro de domínio matemático" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "as dimensões da matriz não coincidem" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "a matriz não é definitiva positiva" @@ -3807,6 +3809,7 @@ msgstr "pop a partir de um PulseIn vazio" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3832,6 +3835,8 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4264,10 +4269,6 @@ msgstr "o valor deve caber em %d byte(s)" msgid "value_count must be > 0" msgstr "o value_count deve ser > 0" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "os vetores devem ter os mesmos comprimentos" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflito de wakeup" @@ -4357,6 +4358,12 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "matrix dimensions do not match" +#~ msgstr "as dimensões da matriz não coincidem" + +#~ msgid "vectors must have same lengths" +#~ msgstr "os vetores devem ter os mesmos comprimentos" + #~ msgid "Group full" #~ msgstr "Grupo cheio" diff --git a/locale/sv.po b/locale/sv.po index 00d4ce6de1..a9d6914ca5 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -81,6 +81,7 @@ msgstr "%q används redan" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -979,6 +980,7 @@ msgstr "Det gick inte att tilldela RX-buffert" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1268,7 +1270,7 @@ msgstr "Felaktig fil" msgid "Invalid format chunk size" msgstr "Ogiltig formatsegmentstorlek" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "Ogiltig frekvens" @@ -2341,7 +2343,7 @@ msgstr "Busstyp för display stöds inte" msgid "Unsupported format" msgstr "Formatet stöds inte" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Åtgärd som inte stöds" @@ -2910,6 +2912,10 @@ msgstr "argumentet diff måste vara en ndarray" msgid "differentiation order out of range" msgstr "differentieringsordning utanför intervallet" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3403,10 +3409,6 @@ msgstr "map-buffert för liten" msgid "math domain error" msgstr "matematikdomänfel" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "matrisdimensioner matchar inte" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrisen är inte positiv bestämd" @@ -3764,6 +3766,7 @@ msgstr "pop från en tom PulseIn" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3789,6 +3792,8 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4221,10 +4226,6 @@ msgstr "värdet måste passa i %d byte(s)" msgid "value_count must be > 0" msgstr "value_count måste vara > 0" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "vektorer måste ha samma längd" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "wakeup-konflikt" @@ -4314,6 +4315,12 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "matrix dimensions do not match" +#~ msgstr "matrisdimensioner matchar inte" + +#~ msgid "vectors must have same lengths" +#~ msgstr "vektorer måste ha samma längd" + #~ msgid "Group full" #~ msgstr "Gruppen är full" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index bf2015a358..de00758dd9 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -83,6 +83,7 @@ msgstr "%q zhèngzài shǐyòng" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" @@ -978,6 +979,7 @@ msgstr "Fēnpèi RX huǎnchōng shībài" #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" @@ -1270,7 +1272,7 @@ msgstr "Wúxiào de wénjiàn" msgid "Invalid format chunk size" msgstr "Géshì kuài dàxiǎo wúxiào" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" msgstr "Wúxiào de pínlǜ" @@ -2338,7 +2340,7 @@ msgstr "Bù zhīchí de gōnggòng qìchē lèixíng" msgid "Unsupported format" msgstr "Bù zhīchí de géshì" -#: py/moduerrno.c +#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" msgstr "Bù zhīchí de cāozuò" @@ -2909,6 +2911,10 @@ msgstr "bùtóng de cānshù bìxū shì ndarray" msgid "differentiation order out of range" msgstr "chā yì shùn xù fàn wéi" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3400,10 +3406,6 @@ msgstr "dìtú huǎnchōng qū tài xiǎo" msgid "math domain error" msgstr "shùxué yù cuòwù" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "jǔzhèn chǐcùn bù pǐpèi" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "jǔzhèn bùshì zhèngdìng de" @@ -3760,6 +3762,7 @@ msgstr "cóng kōng mài chōng tán chū" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" @@ -3785,6 +3788,8 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h @@ -4217,10 +4222,6 @@ msgstr "Zhí bìxū fúhé %d zì jié" msgid "value_count must be > 0" msgstr "zhí jìshù bìxū wèi > 0" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "xiàngliàng bìxū jùyǒu xiāngtóng de chángdù" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "huàn xǐng chōng tū" @@ -4310,6 +4311,12 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "matrix dimensions do not match" +#~ msgstr "jǔzhèn chǐcùn bù pǐpèi" + +#~ msgid "vectors must have same lengths" +#~ msgstr "xiàngliàng bìxū jùyǒu xiāngtóng de chángdù" + #~ msgid "Group full" #~ msgstr "Fēnzǔ yǐ mǎn" From 30a74b3d922a8a9e944595a9572847c6b0fa8586 Mon Sep 17 00:00:00 2001 From: mintakka Date: Mon, 15 Mar 2021 21:07:24 -0400 Subject: [PATCH 036/261] Update ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk Co-authored-by: Scott Shawcroft --- ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk index cb9468167a..fc6c37dc3b 100644 --- a/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk +++ b/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk @@ -1,5 +1,5 @@ -USB_VID = 0x239A -USB_PID = 0x80F2 +USB_VID = 0x1B4F +USB_PID = 0x0025 USB_PRODUCT = "ThingPlus RP2040" USB_MANUFACTURER = "Sparkfun" From 288415f86760cf84d71c8ddd15327790b1b51a2f Mon Sep 17 00:00:00 2001 From: mintakka Date: Mon, 15 Mar 2021 21:07:31 -0400 Subject: [PATCH 037/261] Update ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h Co-authored-by: Scott Shawcroft --- ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h b/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h index 2c229e3898..82327c5d93 100644 --- a/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h +++ b/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h @@ -13,5 +13,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) -// Flash chip is GD25Q64 connected over QSPI +// Flash chip is GD25Q128 connected over QSPI #define TOTAL_FLASH_SIZE (16 * 1024 * 1024) From 542fb58673954be992e274b065425e4de2aea178 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 15 Mar 2021 20:19:45 -0500 Subject: [PATCH 038/261] add arrayblit --- shared-bindings/bitmaptools/__init__.c | 81 ++++++++++++++++++++++++++ shared-bindings/bitmaptools/__init__.h | 1 + shared-module/bitmaptools/__init__.c | 32 +++++++++- 3 files changed, 113 insertions(+), 1 deletion(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 2780680d00..5de85156a1 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -29,6 +29,7 @@ #include +#include "py/binary.h" #include "py/obj.h" #include "py/runtime.h" @@ -357,6 +358,85 @@ STATIC mp_obj_t bitmaptools_obj_draw_line(size_t n_args, const mp_obj_t *pos_arg MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_line); // requires all 6 arguments +//| def arrayblit(bitmap: display.Bitmap, data: ReadableBuffer, x1: int=0, y1: int=0, x2: Optional[int]=None, y2: Optional[int]=None, skip_index:Optional[int]=None) -> None: +//| """Inserts pixels from ``data`` into the rectangle of width×height pixels with the upper left corner at ``(x,y)`` +//| +//| The values from ``data`` are taken modulo the number of color values +//| avalable in the destintaion bitmap. +//| +//| If x1 or y1 are not specified, they are taken as 0. If x2 or y2 +//| are not specified, or are given as -1, they are taken as the width +//| and height of the image. +//| +//| The coordinates affected by the blit are ``x1 <= x < x2`` and ``y1 < +//| y < y2``. +//| +//| ``data`` must contain at least as many elements as required. If it +//| contains excess elements, they are ignored. +//| +//| The blit takes place by rows, so the first elements of ``data`` go +//| to the first row, the next elements to the next row, and so on. +//| +//| :param displayio.Bitmap bitmap: A writable bitmap +//| :param ReadableBuffer data: Buffer containing the source pixel values +//| :param int x1: The left corner of the area to blit into (inclusive) +//| :param int y1: The top corner of the area to blit into (inclusive) +//| :param int x2: The right of the area to blit into (exclusive) +//| :param int y2: The bottom corner of the area to blit into (exclusive) +//| :param int skip_index: Bitmap palette index in the source that will not be copied, +//| set to None to copy all pixels""" +//| """ +//| ... +//| +STATIC mp_obj_t bitmaptools_arrayblit(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_bitmap, ARG_data, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_skip_index }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_data, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_x1, MP_ARG_INT, {.u_int = 0} }, + { MP_QSTR_y1, MP_ARG_INT, {.u_int = 0} }, + { MP_QSTR_x2, MP_ARG_INT, {.u_int = -1} }, + { MP_QSTR_y2, MP_ARG_INT, {.u_int = -1} }, + { MP_QSTR_skip_index, MP_ARG_OBJ, {.u_obj = mp_const_none } }, + } +; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + if (!MP_OBJ_IS_TYPE(args[ARG_bitmap].u_obj, &displayio_bitmap_type)) { + mp_raise_TypeError(NULL); + } + displayio_bitmap_t *bitmap = MP_OBJ_TO_PTR(args[ARG_bitmap].u_obj); + + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(args[ARG_data].u_obj, &bufinfo, MP_BUFFER_READ); + + int x1 = args[ARG_x1].u_int; + int y1 = args[ARG_y1].u_int; + int x2 = args[ARG_x2].u_int == -1 ? bitmap->width : args[ARG_x2].u_int; + int y2 = args[ARG_y2].u_int == -1 ? bitmap->height : args[ARG_y2].u_int; + + if ((x1 < 0) || (y1 < 0) || (x1 > x2) || (y1 > y2) || (x2 > bitmap->width) || (y2 > bitmap->height)) { + mp_raise_IndexError(translate("pixel coordinates out of bounds")); + } + + size_t output_element_count = (x2-x1) * (y2-y1); + size_t element_size = mp_binary_get_size('@', bufinfo.typecode, NULL); + size_t input_element_count = bufinfo.len / element_size; + + bool skip_specified = args[ARG_skip_index].u_obj != mp_const_none; + uint32_t skip_index = skip_specified ? mp_obj_get_int(args[ARG_skip_index].u_obj) : 0; + if (input_element_count < output_element_count) { + mp_raise_IndexError(translate("index out of range")); + } + + common_hal_bitmaptools_arrayblit(bitmap, bufinfo.buf, element_size, x1, y1, x2, y2, skip_specified, skip_index); + + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_arrayblit_obj, 0, bitmaptools_arrayblit); + + //| def readinto(bitmap: displayio.Bitmap, file: typing.BinaryIO, bits_per_pixel: int, element_size: int = 1, reverse_pixels_in_element: bool = False, swap_bytes_in_element: bool = False) -> None: //| """Read from a binary file into a bitmap //| The file must be positioned so that it consists of ``bitmap.height`` rows of pixel data, where each row is the smallest multiple of ``element_size`` bytes that can hold ``bitmap.width`` pixels. @@ -435,6 +515,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_readinto_obj, 0, bitmaptools_readinto); STATIC const mp_rom_map_elem_t bitmaptools_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&bitmaptools_readinto_obj) }, { MP_ROM_QSTR(MP_QSTR_rotozoom), MP_ROM_PTR(&bitmaptools_rotozoom_obj) }, + { MP_ROM_QSTR(MP_QSTR_arrayblit), MP_ROM_PTR(&bitmaptools_arrayblit_obj) }, { MP_ROM_QSTR(MP_QSTR_fill_region), MP_ROM_PTR(&bitmaptools_fill_region_obj) }, { MP_ROM_QSTR(MP_QSTR_draw_line), MP_ROM_PTR(&bitmaptools_draw_line_obj) }, }; diff --git a/shared-bindings/bitmaptools/__init__.h b/shared-bindings/bitmaptools/__init__.h index 50ad7f5264..bb89cd7321 100644 --- a/shared-bindings/bitmaptools/__init__.h +++ b/shared-bindings/bitmaptools/__init__.h @@ -52,5 +52,6 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, uint32_t value); void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes); +void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int element_size, int x1, int y1, int x2, int y2, bool skip_specified, uint32_t skip_index); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_BITMAPTOOLS__INIT__H diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 1997076514..e18b8b1779 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -339,7 +339,37 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, } } +void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int element_size, int x1, int y1, int x2, int y2, bool skip_specified, uint32_t skip_value) { + uint32_t mask = (1 << common_hal_displayio_bitmap_get_bits_per_value(self)) - 1; + + for (int y=y1; yread_only) { mp_raise_RuntimeError(translate("Read-only object")); } @@ -418,7 +448,7 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* f break; } - displayio_bitmap_write_pixel(self, x, y, value); + displayio_bitmap_write_pixel(self, x, y, value & mask); } } From 49baa94446a8cb6dc3f946b921fd351372e4f681 Mon Sep 17 00:00:00 2001 From: mintakka Date: Mon, 15 Mar 2021 23:00:24 -0400 Subject: [PATCH 039/261] added sparkfun_thingplus_rp2040 to .github/workflows/boards.yml and renamed board folder to include chip --- .github/workflows/build.yml | 1 + .../{sparkfun_thingplus => sparkfun_thingplus_rp2040}/board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../{sparkfun_thingplus => sparkfun_thingplus_rp2040}/pins.c | 0 5 files changed, 1 insertion(+) rename ports/raspberrypi/boards/{sparkfun_thingplus => sparkfun_thingplus_rp2040}/board.c (100%) rename ports/raspberrypi/boards/{sparkfun_thingplus => sparkfun_thingplus_rp2040}/mpconfigboard.h (100%) rename ports/raspberrypi/boards/{sparkfun_thingplus => sparkfun_thingplus_rp2040}/mpconfigboard.mk (100%) rename ports/raspberrypi/boards/{sparkfun_thingplus => sparkfun_thingplus_rp2040}/pins.c (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f65618b40d..9044fb18d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -322,6 +322,7 @@ jobs: - "sparkfun_samd21_dev" - "sparkfun_samd21_mini" - "sparkfun_samd51_thing_plus" + - "sparkfun_thingplus_rp2040" - "spresense" - "stackrduino_m0_pro" - "stm32f411ce_blackpill" diff --git a/ports/raspberrypi/boards/sparkfun_thingplus/board.c b/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/board.c similarity index 100% rename from ports/raspberrypi/boards/sparkfun_thingplus/board.c rename to ports/raspberrypi/boards/sparkfun_thingplus_rp2040/board.c diff --git a/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h b/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.h similarity index 100% rename from ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.h rename to ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.h diff --git a/ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.mk similarity index 100% rename from ports/raspberrypi/boards/sparkfun_thingplus/mpconfigboard.mk rename to ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.mk diff --git a/ports/raspberrypi/boards/sparkfun_thingplus/pins.c b/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/pins.c similarity index 100% rename from ports/raspberrypi/boards/sparkfun_thingplus/pins.c rename to ports/raspberrypi/boards/sparkfun_thingplus_rp2040/pins.c From ea578a10a67b90fdf16c62ad96cf0cb3660fb5c3 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 15 Mar 2021 21:19:51 -0600 Subject: [PATCH 040/261] Update build.yml Add Pro Micro RP2040 to build.yml. --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29d3d5b281..729d3ca723 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -314,6 +314,7 @@ jobs: - "sparkfun_lumidrive" - "sparkfun_nrf52840_micromod" - "sparkfun_nrf52840_mini" + - "sparkfun_pro_micro_rp2040" - "sparkfun_qwiic_micro_no_flash" - "sparkfun_qwiic_micro_with_flash" - "sparkfun_redboard_turbo" From c9427780b3444611aab12f3ff102e8208fc1d728 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 15 Mar 2021 22:07:24 -0600 Subject: [PATCH 041/261] Create pins.c --- .../boards/sparkfun_pro_micro_rp2040/pins.c | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c new file mode 100644 index 0000000000..b372fcb862 --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c @@ -0,0 +1,44 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 9de40f56f37222eb120602f8cacb00aa46fc1d6f Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 15 Mar 2021 22:08:19 -0600 Subject: [PATCH 042/261] Add board config files --- .../boards/sparkfun_pro_micro_rp2040/board.c | 40 +++++++++++++++++++ .../sparkfun_pro_micro_rp2040/mpconfigboard.h | 17 ++++++++ .../mpconfigboard.mk | 9 +++++ 3 files changed, 66 insertions(+) create mode 100644 ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/board.c create mode 100644 ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/board.c b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/board.c new file mode 100644 index 0000000000..c4021a83e9 --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +#include "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h new file mode 100644 index 0000000000..370a1b0ea8 --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h @@ -0,0 +1,17 @@ +#define MICROPY_HW_BOARD_NAME "Sparkfun Pro Micro RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO25) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO17) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO16) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO22) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO23) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO20) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) + +// Flash chip is GD25Q128 connected over QSPI +#define TOTAL_FLASH_SIZE (16 * 1024 * 1024) diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk new file mode 100644 index 0000000000..6bd5988532 --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x1B4F +USB_PID = 0x0026 +USB_PRODUCT = "Pro Micro RP2040" +USB_MANUFACTURER = "Sparkfun" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +INTERNAL_FLASH_FILESYSTEM = 1 From 3b01a657435228ec96f932d99e6cba1c960717f5 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Tue, 16 Mar 2021 08:14:49 -0500 Subject: [PATCH 043/261] Fixed formatting --- .../common-hal/displayio/ParallelBus.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/displayio/ParallelBus.c index fc462667ef..8a976fb251 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -43,9 +43,9 @@ static const uint16_t parallel_program[] = { // .wrap }; -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, - const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { +void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, + const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, + const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { uint8_t data_pin = data0->number; for (uint8_t i = 0; i < 8; i++) { @@ -108,7 +108,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel common_hal_rp2pio_statemachine_never_reset(&self->state_machine); } -void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) { +void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) { common_hal_rp2pio_statemachine_deinit(&self->state_machine); for (uint8_t i = 0; i < 8; i++) { @@ -123,7 +123,7 @@ void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) } bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { - displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); if (self->reset.base.type == &mp_type_NoneType) { return false; } @@ -139,7 +139,7 @@ bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) { } bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { - displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); return true; } @@ -147,13 +147,13 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { - displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA); common_hal_rp2pio_statemachine_write(&self->state_machine, data, data_length, 1); } void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { - displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); } From fb437d8280f6e7e4cc4b9e34c9ae9b34a6b9005a Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Tue, 16 Mar 2021 08:22:02 -0500 Subject: [PATCH 044/261] Formatting fixes --- .../common-hal/displayio/ParallelBus.c | 24 +++++++++---------- .../common-hal/displayio/ParallelBus.c | 8 +++---- .../common-hal/displayio/ParallelBus.c | 6 ++--- ports/nrf/common-hal/displayio/ParallelBus.c | 8 +++---- ports/stm/common-hal/displayio/ParallelBus.c | 8 +++---- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.c b/ports/atmel-samd/common-hal/displayio/ParallelBus.c index 841edef24a..4872fbdf10 100644 --- a/ports/atmel-samd/common-hal/displayio/ParallelBus.c +++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.c @@ -21,7 +21,7 @@ * 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. + * THE SOFTWARE . */ #include "shared-bindings/displayio/ParallelBus.h" @@ -33,9 +33,9 @@ #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/microcontroller/__init__.h" -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, - const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { +void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, + const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, + const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { uint8_t data_pin = data0->number; if (data_pin % 8 != 0) { @@ -55,7 +55,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel wrconfig |= 0xff << (data_pin % 32); } g->WRCONFIG.reg = wrconfig; - self->bus = ((uint8_t*) &g->OUT.reg) + (data0->number % 32 / 8); + self->bus = ((uint8_t *)&g->OUT.reg) + (data0->number % 32 / 8); self->command.base.type = &digitalio_digitalinout_type; common_hal_digitalio_digitalinout_construct(&self->command, command); @@ -95,7 +95,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel } } -void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) { +void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) { for (uint8_t i = 0; i < 8; i++) { reset_pin_number(self->data0_pin + i); } @@ -108,7 +108,7 @@ void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) } bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { - displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); if (self->reset.base.type == &mp_type_NoneType) { return false; } @@ -124,17 +124,17 @@ bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) { } bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { - displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); return true; } void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { - displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA); - uint32_t* clear_write = (uint32_t*) &self->write_group->OUTCLR.reg; - uint32_t* set_write = (uint32_t*) &self->write_group->OUTSET.reg; + uint32_t *clear_write = (uint32_t *)&self->write_group->OUTCLR.reg; + uint32_t *set_write = (uint32_t *)&self->write_group->OUTSET.reg; uint32_t mask = self->write_mask; for (uint32_t i = 0; i < data_length; i++) { *clear_write = mask; @@ -144,6 +144,6 @@ void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byt } void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { - displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); } diff --git a/ports/esp32s2/common-hal/displayio/ParallelBus.c b/ports/esp32s2/common-hal/displayio/ParallelBus.c index 3d39dc656a..e76272abac 100644 --- a/ports/esp32s2/common-hal/displayio/ParallelBus.c +++ b/ports/esp32s2/common-hal/displayio/ParallelBus.c @@ -21,7 +21,7 @@ * 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. + * THE SOFTWARE . */ #include "shared-bindings/displayio/ParallelBus.h" @@ -38,9 +38,9 @@ * - data0 pin must be byte aligned */ -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, - const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { +void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, + const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, + const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { uint8_t data_pin = data0->number; if (data_pin % 8 != 0) { diff --git a/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c b/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c index 4f028a47df..f7889c70f4 100644 --- a/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c +++ b/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c @@ -33,9 +33,9 @@ #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/microcontroller/__init__.h" -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, - const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { +void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, + const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, + const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { mp_raise_NotImplementedError(translate("ParallelBus not yet supported")); } diff --git a/ports/nrf/common-hal/displayio/ParallelBus.c b/ports/nrf/common-hal/displayio/ParallelBus.c index bb906d4f0c..6339da59ca 100644 --- a/ports/nrf/common-hal/displayio/ParallelBus.c +++ b/ports/nrf/common-hal/displayio/ParallelBus.c @@ -21,7 +21,7 @@ * 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. + * THE SOFTWARE . */ #include "shared-bindings/displayio/ParallelBus.h" @@ -33,9 +33,9 @@ #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/microcontroller/__init__.h" -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, - const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { +void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, + const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, + const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { uint8_t data_pin = data0->number; if (data_pin % 8 != 0) { diff --git a/ports/stm/common-hal/displayio/ParallelBus.c b/ports/stm/common-hal/displayio/ParallelBus.c index 5a79e90cca..2b24bc5fa5 100644 --- a/ports/stm/common-hal/displayio/ParallelBus.c +++ b/ports/stm/common-hal/displayio/ParallelBus.c @@ -21,7 +21,7 @@ * 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. + * THE SOFTWARE . */ #include "shared-bindings/displayio/ParallelBus.h" @@ -33,9 +33,9 @@ #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/microcontroller/__init__.h" -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, - const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency) { +void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, + const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, + const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { mp_raise_NotImplementedError(translate("ParallelBus not yet supported")); } From 0890b54cd96531799afd204075664ce384887168 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Tue, 16 Mar 2021 08:29:04 -0500 Subject: [PATCH 045/261] More formatting --- ports/atmel-samd/common-hal/displayio/ParallelBus.c | 2 +- ports/esp32s2/common-hal/displayio/ParallelBus.c | 2 +- ports/nrf/common-hal/displayio/ParallelBus.c | 2 +- ports/stm/common-hal/displayio/ParallelBus.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.c b/ports/atmel-samd/common-hal/displayio/ParallelBus.c index 4872fbdf10..e5575f8dc2 100644 --- a/ports/atmel-samd/common-hal/displayio/ParallelBus.c +++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.c @@ -21,7 +21,7 @@ * 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 . + * THE SOFTWARE. */ #include "shared-bindings/displayio/ParallelBus.h" diff --git a/ports/esp32s2/common-hal/displayio/ParallelBus.c b/ports/esp32s2/common-hal/displayio/ParallelBus.c index e76272abac..cbe093164f 100644 --- a/ports/esp32s2/common-hal/displayio/ParallelBus.c +++ b/ports/esp32s2/common-hal/displayio/ParallelBus.c @@ -21,7 +21,7 @@ * 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 . + * THE SOFTWARE. */ #include "shared-bindings/displayio/ParallelBus.h" diff --git a/ports/nrf/common-hal/displayio/ParallelBus.c b/ports/nrf/common-hal/displayio/ParallelBus.c index 6339da59ca..7e0aea0d63 100644 --- a/ports/nrf/common-hal/displayio/ParallelBus.c +++ b/ports/nrf/common-hal/displayio/ParallelBus.c @@ -21,7 +21,7 @@ * 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 . + * THE SOFTWARE. */ #include "shared-bindings/displayio/ParallelBus.h" diff --git a/ports/stm/common-hal/displayio/ParallelBus.c b/ports/stm/common-hal/displayio/ParallelBus.c index 2b24bc5fa5..d36d8ad64a 100644 --- a/ports/stm/common-hal/displayio/ParallelBus.c +++ b/ports/stm/common-hal/displayio/ParallelBus.c @@ -21,7 +21,7 @@ * 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 . + * THE SOFTWARE. */ #include "shared-bindings/displayio/ParallelBus.h" From bdc368895f751491d95edfa3de1c1cb1d9f8ff9b Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Tue, 16 Mar 2021 08:39:44 -0500 Subject: [PATCH 046/261] Formatting --- shared-bindings/displayio/ParallelBus.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared-bindings/displayio/ParallelBus.h b/shared-bindings/displayio/ParallelBus.h index d06b774803..1a61aae0af 100644 --- a/shared-bindings/displayio/ParallelBus.h +++ b/shared-bindings/displayio/ParallelBus.h @@ -35,9 +35,9 @@ extern const mp_obj_type_t displayio_parallelbus_type; -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, - const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, - const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset, uint32_t frequency); +void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, + const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, + const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency); void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self); From c6e696ae11f402c97d65316b146da381c5405836 Mon Sep 17 00:00:00 2001 From: Hugo Dahl Date: Tue, 16 Mar 2021 01:11:47 +0000 Subject: [PATCH 047/261] Translated using Weblate (French) Currently translated at 99.4% (969 of 974 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 2f0b26da79..d535345796 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-03-16 00:47+0000\n" -"Last-Translator: Noel Gaetan \n" +"PO-Revision-Date: 2021-03-16 14:54+0000\n" +"Last-Translator: Hugo Dahl \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -520,7 +520,7 @@ msgstr "Tampon + décalage trop petit %d %d %d" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Buffer elements must be 4 bytes long or less" -msgstr "" +msgstr "Éléments du tampon doit être 4 octets ou moins" #: shared-module/usb_hid/Device.c #, c-format @@ -1120,7 +1120,7 @@ msgstr "IV doit être de longueur de %d octets" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "In-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "Éléments dans le tampon doivent être <= à 4 octets" #: py/persistentcode.c msgid "" @@ -1589,11 +1589,11 @@ msgstr "Pas de support matériel pour cette broche" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No in in program" -msgstr "" +msgstr "Programme n'a pas de \"in\"" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No in or out in program" -msgstr "" +msgstr "Programme n'a aucun \"in\" ni \"out\"" #: shared-bindings/aesio/aes.c msgid "No key was specified" @@ -1746,7 +1746,7 @@ msgstr "Plus de sockets" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Out-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "Éléments du tampon de sortie doivent être <= à 4 octets" #: shared-bindings/bitops/__init__.c #, c-format @@ -2834,7 +2834,7 @@ msgstr "le cercle ne peut être enregistré que dans un seul parent" #: shared-bindings/bitmaptools/__init__.c msgid "clip point must be (x,y) tuple" -msgstr "" +msgstr "point de coupure doît être un tuple (x,y)" #: shared-bindings/msgpack/ExtType.c msgid "code outside range 0~127" @@ -2959,7 +2959,7 @@ msgstr "differentiation order hors de portée" #: extmod/ulab/code/linalg/linalg.c msgid "dimensions do not match" -msgstr "" +msgstr "les dimensions ne correspondent pas" #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c From 9d523fd6da62d220d6778e6b6a1f02aa02387e61 Mon Sep 17 00:00:00 2001 From: Alessandro Mandelli Date: Tue, 16 Mar 2021 08:23:05 +0000 Subject: [PATCH 048/261] Translated using Weblate (Italian) Currently translated at 44.4% (433 of 974 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/it/ --- locale/it_IT.po | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/locale/it_IT.po b/locale/it_IT.po index e74432a370..35e90056db 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-02-18 15:50+0000\n" -"Last-Translator: Luca De Filippo \n" +"PO-Revision-Date: 2021-03-16 14:54+0000\n" +"Last-Translator: Alessandro Mandelli \n" "Language-Team: \n" "Language: it_IT\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.5\n" +"X-Generator: Weblate 4.5.2-dev\n" #: main.c msgid "" @@ -971,9 +971,9 @@ msgid "Failed sending command." msgstr "" #: ports/nrf/sd_mutex.c -#, fuzzy, c-format +#, c-format msgid "Failed to acquire mutex, err 0x%04x" -msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" +msgstr "Impossibile acquisire il mutex, err 0x%04x" #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c @@ -1016,9 +1016,9 @@ msgid "Failed to parse MP3 file" msgstr "" #: ports/nrf/sd_mutex.c -#, fuzzy, c-format +#, c-format msgid "Failed to release mutex, err 0x%04x" -msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" +msgstr "Impossibile rilasciare il mutex, err 0x%04x" #: supervisor/shared/safe_mode.c msgid "Failed to write internal flash." @@ -4164,9 +4164,9 @@ msgid "unindent does not match any outer indentation level" msgstr "" #: py/objstr.c -#, fuzzy, c-format +#, c-format msgid "unknown conversion specifier %c" -msgstr "specificatore di conversione %s sconosciuto" +msgstr "specificatore di conversione %c sconosciuto" #: py/objstr.c msgid "unknown format code '%c' for object of type '%q'" From cd108e50bad5740f1e29791333e94f923c47e206 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Tue, 16 Mar 2021 01:35:22 +0000 Subject: [PATCH 049/261] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (974 of 974 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index a08582903e..ea11928017 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-03-09 16:55+0000\n" +"PO-Revision-Date: 2021-03-16 14:54+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -2950,7 +2950,7 @@ msgstr "ordem de diferenciação fora do alcance" #: extmod/ulab/code/linalg/linalg.c msgid "dimensions do not match" -msgstr "" +msgstr "as dimensões não coincidem" #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c From 4a5df5ab9bbac21794788098ccb691948d6bb44c Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 16 Mar 2021 09:25:22 +0000 Subject: [PATCH 050/261] Translated using Weblate (Swedish) Currently translated at 100.0% (974 of 974 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index a9d6914ca5..bd4e7b78e4 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-03-09 16:55+0000\n" +"PO-Revision-Date: 2021-03-16 14:54+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -2914,7 +2914,7 @@ msgstr "differentieringsordning utanför intervallet" #: extmod/ulab/code/linalg/linalg.c msgid "dimensions do not match" -msgstr "" +msgstr "dimensioner matchar inte" #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c From 227ac674639fa9df071ca7c8b2373029cc0b4618 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Tue, 16 Mar 2021 10:01:12 -0500 Subject: [PATCH 051/261] Add reverse_rows option to bitmaptools.readinto --- shared-bindings/bitmaptools/__init__.c | 6 ++++-- shared-bindings/bitmaptools/__init__.h | 2 +- shared-module/bitmaptools/__init__.c | 7 ++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 5de85156a1..ab462093c9 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -456,7 +456,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_arrayblit_obj, 0, bitmaptools_arrayblit); //| STATIC mp_obj_t bitmaptools_readinto(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_bitmap, ARG_file, ARG_bits_per_pixel, ARG_element_size, ARG_reverse_pixels_in_element, ARG_swap_bytes_in_element }; + enum { ARG_bitmap, ARG_file, ARG_bits_per_pixel, ARG_element_size, ARG_reverse_pixels_in_element, ARG_swap_bytes_in_element, ARG_reverse_rows }; static const mp_arg_t allowed_args[] = { { MP_QSTR_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_file, MP_ARG_REQUIRED | MP_ARG_OBJ }, @@ -464,6 +464,7 @@ STATIC mp_obj_t bitmaptools_readinto(size_t n_args, const mp_obj_t *pos_args, mp { MP_QSTR_element_size, MP_ARG_INT, { .u_int = 1 } }, { MP_QSTR_reverse_pixels_in_element, MP_ARG_BOOL, { .u_bool = false } }, { MP_QSTR_swap_bytes_in_element, MP_ARG_BOOL, { .u_bool = false } }, + { MP_QSTR_reverse_rows, MP_ARG_BOOL, { .u_bool = false } }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -504,8 +505,9 @@ STATIC mp_obj_t bitmaptools_readinto(size_t n_args, const mp_obj_t *pos_args, mp bool reverse_pixels_in_element = args[ARG_reverse_pixels_in_element].u_bool; bool swap_bytes_in_element = args[ARG_swap_bytes_in_element].u_bool; + bool reverse_rows = args[ARG_reverse_rows].u_bool; - common_hal_bitmaptools_readinto(bitmap, file, element_size, bits_per_pixel, reverse_pixels_in_element, swap_bytes_in_element); + common_hal_bitmaptools_readinto(bitmap, file, element_size, bits_per_pixel, reverse_pixels_in_element, swap_bytes_in_element, reverse_rows); return mp_const_none; } diff --git a/shared-bindings/bitmaptools/__init__.h b/shared-bindings/bitmaptools/__init__.h index bb89cd7321..ec0b052446 100644 --- a/shared-bindings/bitmaptools/__init__.h +++ b/shared-bindings/bitmaptools/__init__.h @@ -51,7 +51,7 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, int16_t x1, int16_t y1, uint32_t value); -void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes); +void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes, bool reverse_rows); void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int element_size, int x1, int y1, int x2, int y2, bool skip_specified, uint32_t skip_index); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_BITMAPTOOLS__INIT__H diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index e18b8b1779..044600aca2 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -367,7 +367,7 @@ void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int } } -void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* file, int element_size, int bits_per_pixel, bool reverse_pixels_in_element, bool swap_bytes) { +void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* file, int element_size, int bits_per_pixel, bool reverse_pixels_in_element, bool swap_bytes, bool reverse_rows) { uint32_t mask = (1 << common_hal_displayio_bitmap_get_bits_per_value(self)) - 1; if (self->read_only) { @@ -378,10 +378,12 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* f size_t rowsize = element_size * elements_per_row; size_t rowsize_in_u32 = (rowsize + sizeof(uint32_t) - 1) / sizeof(uint32_t); size_t rowsize_in_u16 = (rowsize + sizeof(uint16_t) - 1) / sizeof(uint16_t); + for(int y=0; yheight; y++) { uint32_t rowdata32[rowsize_in_u32]; uint16_t *rowdata16 = (uint16_t*)rowdata32; uint8_t *rowdata8 = (uint8_t*)rowdata32; + const int y_draw = reverse_rows ? (self->height) - 1 - y : y; UINT bytes_read = 0; if (f_read(&file->fp, rowdata32, rowsize, &bytes_read) != FR_OK || bytes_read != rowsize) { @@ -447,8 +449,7 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* f value = rowdata32[x]; break; } - - displayio_bitmap_write_pixel(self, x, y, value & mask); + displayio_bitmap_write_pixel(self, x, y_draw, value & mask); } } From a367e84ceae8e01176da46ee7f43d223376a56c0 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Tue, 16 Mar 2021 10:35:40 -0500 Subject: [PATCH 052/261] update docstrings --- shared-bindings/bitmaptools/__init__.c | 33 +++++++++++++------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index ab462093c9..af30bc9aa3 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -361,21 +361,20 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_li //| def arrayblit(bitmap: display.Bitmap, data: ReadableBuffer, x1: int=0, y1: int=0, x2: Optional[int]=None, y2: Optional[int]=None, skip_index:Optional[int]=None) -> None: //| """Inserts pixels from ``data`` into the rectangle of width×height pixels with the upper left corner at ``(x,y)`` //| -//| The values from ``data`` are taken modulo the number of color values -//| avalable in the destintaion bitmap. +//| The values from ``data`` are taken modulo the number of color values +//| avalable in the destintaion bitmap. //| -//| If x1 or y1 are not specified, they are taken as 0. If x2 or y2 -//| are not specified, or are given as -1, they are taken as the width -//| and height of the image. +//| If x1 or y1 are not specified, they are taken as 0. If x2 or y2 +//| are not specified, or are given as -1, they are taken as the width +//| and height of the image. //| -//| The coordinates affected by the blit are ``x1 <= x < x2`` and ``y1 < -//| y < y2``. +//| The coordinates affected by the blit are ``x1 <= x < x2`` and ``y1 <= y < y2``. //| -//| ``data`` must contain at least as many elements as required. If it -//| contains excess elements, they are ignored. +//| ``data`` must contain at least as many elements as required. If it +//| contains excess elements, they are ignored. //| -//| The blit takes place by rows, so the first elements of ``data`` go -//| to the first row, the next elements to the next row, and so on. +//| The blit takes place by rows, so the first elements of ``data`` go +//| to the first row, the next elements to the next row, and so on. //| //| :param displayio.Bitmap bitmap: A writable bitmap //| :param ReadableBuffer data: Buffer containing the source pixel values @@ -385,7 +384,6 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_li //| :param int y2: The bottom corner of the area to blit into (exclusive) //| :param int skip_index: Bitmap palette index in the source that will not be copied, //| set to None to copy all pixels""" -//| """ //| ... //| STATIC mp_obj_t bitmaptools_arrayblit(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { @@ -438,12 +436,13 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_arrayblit_obj, 0, bitmaptools_arrayblit); //| def readinto(bitmap: displayio.Bitmap, file: typing.BinaryIO, bits_per_pixel: int, element_size: int = 1, reverse_pixels_in_element: bool = False, swap_bytes_in_element: bool = False) -> None: -//| """Read from a binary file into a bitmap -//| The file must be positioned so that it consists of ``bitmap.height`` rows of pixel data, where each row is the smallest multiple of ``element_size`` bytes that can hold ``bitmap.width`` pixels. +//| """Reads from a binary file into a bitmap. //| -//| The bytes in an element can be optionally swapped, and the pixels in an element can be reversed. +//| The file must be positioned so that it consists of ``bitmap.height`` rows of pixel data, where each row is the smallest multiple of ``element_size`` bytes that can hold ``bitmap.width`` pixels. //| -//| This function doesn't parse image headers, but is useful to speed up loading of uncompressed image formats such as PCF glyph data. +//| The bytes in an element can be optionally swapped, and the pixels in an element can be reversed. +//| +//| This function doesn't parse image headers, but is useful to speed up loading of uncompressed image formats such as PCF glyph data. //| //| :param displayio.Bitmap bitmap: A writable bitmap //| :param typing.BinaryIO file: A file opened in binary mode @@ -451,7 +450,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_arrayblit_obj, 0, bitmaptools_arrayblit); //| :param int element_size: Number of bytes per element. Values of 1, 2, and 4 are supported, except that 24 ``bits_per_pixel`` requires 1 byte per element. //| :param bool reverse_pixels_in_element: If set, the first pixel in a word is taken from the Most Signficant Bits; otherwise, it is taken from the Least Significant Bits. //| :param bool swap_bytes_in_element: If the ``element_size`` is not 1, then reverse the byte order of each element read. -//| """ +//| :param bool reverse_rows: Reverse the direction of the row loading.""" //| ... //| From e16c0f38e8728b1ee7d8d9b78163d9a20e8febf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=A7=D9=85=D9=8A=D8=B1=20=D9=85=D8=AD=D9=85=D8=AF=20?= =?UTF-8?q?=D8=A7=D9=84=D8=B9=D9=85=D8=B1=D9=8A?= Date: Tue, 16 Mar 2021 15:40:17 +0000 Subject: [PATCH 053/261] Translated using Weblate (Swedish) Currently translated at 100.0% (974 of 974 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 bd4e7b78e4..62d2204e8e 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,8 +6,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-16 14:54+0000\n" -"Last-Translator: Jonny Bergdahl \n" +"PO-Revision-Date: 2021-03-16 15:42+0000\n" +"Last-Translator: امير محمد العمري \n" "Language-Team: LANGUAGE \n" "Language: sv\n" "MIME-Version: 1.0\n" @@ -126,7 +126,7 @@ msgstr "%q ska vara en int" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" -msgstr "%q() kräver %d positionsargument men %d gavs" +msgstr "% q () tar% d positionsargument men% d gavs" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format From 870dadc85adce4f10fa57dda1d11dda48b25dbc1 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Tue, 16 Mar 2021 10:42:46 -0500 Subject: [PATCH 054/261] update more docstrings --- shared-bindings/bitmaptools/__init__.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index af30bc9aa3..d812af870a 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -440,7 +440,8 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_arrayblit_obj, 0, bitmaptools_arrayblit); //| //| The file must be positioned so that it consists of ``bitmap.height`` rows of pixel data, where each row is the smallest multiple of ``element_size`` bytes that can hold ``bitmap.width`` pixels. //| -//| The bytes in an element can be optionally swapped, and the pixels in an element can be reversed. +//| The bytes in an element can be optionally swapped, and the pixels in an element can be reversed. Also, the +//| row loading direction can be reversed, which may be requires for loading certain bitmap files. //| //| This function doesn't parse image headers, but is useful to speed up loading of uncompressed image formats such as PCF glyph data. //| From 2b910b7292393598d0fb6a1903ba3708c0d25716 Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Tue, 16 Mar 2021 12:14:40 -0400 Subject: [PATCH 055/261] Adding LED for D13/L pin name. --- ports/atmel-samd/boards/blm_badge/pins.c | 1 + ports/atmel-samd/boards/circuitplayground_express/pins.c | 1 + ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c | 1 + .../atmel-samd/boards/circuitplayground_express_displayio/pins.c | 1 + ports/atmel-samd/boards/gemma_m0/pins.c | 1 + ports/nrf/boards/circuitplayground_bluefruit/pins.c | 1 + 6 files changed, 6 insertions(+) diff --git a/ports/atmel-samd/boards/blm_badge/pins.c b/ports/atmel-samd/boards/blm_badge/pins.c index 6e7d8da754..805a713893 100644 --- a/ports/atmel-samd/boards/blm_badge/pins.c +++ b/ports/atmel-samd/boards/blm_badge/pins.c @@ -37,6 +37,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA03) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express/pins.c b/ports/atmel-samd/boards/circuitplayground_express/pins.c index 6fc46bd216..1c14ee2322 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express/pins.c @@ -36,6 +36,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_REMOTEIN), MP_ROM_PTR(&pin_PA12) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c index 6fc46bd216..1c14ee2322 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c @@ -36,6 +36,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_REMOTEIN), MP_ROM_PTR(&pin_PA12) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c b/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c index 6fc46bd216..1c14ee2322 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c @@ -36,6 +36,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_REMOTEIN), MP_ROM_PTR(&pin_PA12) }, diff --git a/ports/atmel-samd/boards/gemma_m0/pins.c b/ports/atmel-samd/boards/gemma_m0/pins.c index 9aecd5d84e..63e2ec54a0 100644 --- a/ports/atmel-samd/boards/gemma_m0/pins.c +++ b/ports/atmel-samd/boards/gemma_m0/pins.c @@ -14,6 +14,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23) }, diff --git a/ports/nrf/boards/circuitplayground_bluefruit/pins.c b/ports/nrf/boards/circuitplayground_bluefruit/pins.c index d0d9659db7..f600282528 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/pins.c +++ b/ports/nrf/boards/circuitplayground_bluefruit/pins.c @@ -52,6 +52,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_POWER_SWITCH), MP_ROM_PTR(&pin_P0_06) }, { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_14) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P1_14) }, { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P1_14) }, From 97b6664201de2530c9b92957a5e8d2a68524fa7e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 16 Mar 2021 12:20:09 -0500 Subject: [PATCH 056/261] re-format with uncrustify --- shared-bindings/bitmaptools/__init__.c | 86 ++++----- shared-bindings/bitmaptools/__init__.h | 30 +-- shared-module/bitmaptools/__init__.c | 247 ++++++++++++++----------- 3 files changed, 198 insertions(+), 165 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 5de85156a1..0edbe135d5 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -38,7 +38,7 @@ STATIC int16_t validate_point(mp_obj_t point, int16_t default_value) { // Checks if point is None and returns default_value, otherwise decodes integer value - if ( point == mp_const_none ) { + if (point == mp_const_none) { return default_value; } return mp_obj_get_int(point); @@ -47,13 +47,13 @@ STATIC int16_t validate_point(mp_obj_t point, int16_t default_value) { STATIC void extract_tuple(mp_obj_t xy_tuple, int16_t *x, int16_t *y, int16_t x_default, int16_t y_default) { // Helper function for rotozoom // Extract x,y values from a tuple or default if None - if ( xy_tuple == mp_const_none ) { + if (xy_tuple == mp_const_none) { *x = x_default; *y = y_default; - } else if ( !MP_OBJ_IS_OBJ(xy_tuple) ) { + } else if (!MP_OBJ_IS_OBJ(xy_tuple)) { mp_raise_ValueError(translate("clip point must be (x,y) tuple")); } else { - mp_obj_t* items; + mp_obj_t *items; mp_obj_get_array_fixed_n(xy_tuple, 2, &items); *x = mp_obj_get_int(items[0]); *y = mp_obj_get_int(items[1]); @@ -61,7 +61,7 @@ STATIC void extract_tuple(mp_obj_t xy_tuple, int16_t *x, int16_t *y, int16_t x_d } STATIC void validate_clip_region(displayio_bitmap_t *bitmap, mp_obj_t clip0_tuple, int16_t *clip0_x, int16_t *clip0_y, - mp_obj_t clip1_tuple, int16_t *clip1_x, int16_t *clip1_y) { + mp_obj_t clip1_tuple, int16_t *clip1_x, int16_t *clip1_y) { // Helper function for rotozoom // 1. Extract the clip x,y points from the two clip tuples // 2. Rearrange values such that clip0_ < clip1_ @@ -71,12 +71,12 @@ STATIC void validate_clip_region(displayio_bitmap_t *bitmap, mp_obj_t clip0_tupl extract_tuple(clip1_tuple, clip1_x, clip1_y, bitmap->width, bitmap->height); // Ensure the value for clip0 is less than clip1 (for both x and y) - if ( *clip0_x > *clip1_x ) { + if (*clip0_x > *clip1_x) { int16_t temp_value = *clip0_x; // swap values *clip0_x = *clip1_x; *clip1_x = temp_value; } - if ( *clip0_y > *clip1_y ) { + if (*clip0_y > *clip1_y) { int16_t temp_value = *clip0_y; // swap values *clip0_y = *clip1_y; *clip1_y = temp_value; @@ -144,11 +144,11 @@ STATIC void validate_clip_region(displayio_bitmap_t *bitmap, mp_obj_t clip0_tupl //| set to None to copy all pixels""" //| ... //| -STATIC mp_obj_t bitmaptools_obj_rotozoom(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args){ +STATIC mp_obj_t bitmaptools_obj_rotozoom(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum {ARG_dest_bitmap, ARG_source_bitmap, - ARG_ox, ARG_oy, ARG_dest_clip0, ARG_dest_clip1, - ARG_px, ARG_py, ARG_source_clip0, ARG_source_clip1, - ARG_angle, ARG_scale, ARG_skip_index}; + ARG_ox, ARG_oy, ARG_dest_clip0, ARG_dest_clip1, + ARG_px, ARG_py, ARG_source_clip0, ARG_source_clip1, + ARG_angle, ARG_scale, ARG_skip_index}; static const mp_arg_t allowed_args[] = { {MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ}, @@ -166,7 +166,7 @@ STATIC mp_obj_t bitmaptools_obj_rotozoom(size_t n_args, const mp_obj_t *pos_args {MP_QSTR_angle, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, // None convert to 0.0 {MP_QSTR_scale, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, // None convert to 1.0 - {MP_QSTR_skip_index, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj=mp_const_none} }, + {MP_QSTR_skip_index, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -183,35 +183,35 @@ STATIC mp_obj_t bitmaptools_obj_rotozoom(size_t n_args, const mp_obj_t *pos_args // Confirm the destination location target (ox,oy); if None, default to bitmap midpoint int16_t ox, oy; - ox = validate_point(args[ARG_ox].u_obj, destination->width / 2); + ox = validate_point(args[ARG_ox].u_obj, destination->width / 2); oy = validate_point(args[ARG_oy].u_obj, destination->height / 2); // Confirm the source location target (px,py); if None, default to bitmap midpoint int16_t px, py; - px = validate_point(args[ARG_px].u_obj, source->width / 2); + px = validate_point(args[ARG_px].u_obj, source->width / 2); py = validate_point(args[ARG_py].u_obj, source->height / 2); // Validate the clipping regions for the destination bitmap int16_t dest_clip0_x, dest_clip0_y, dest_clip1_x, dest_clip1_y; validate_clip_region(destination, args[ARG_dest_clip0].u_obj, &dest_clip0_x, &dest_clip0_y, - args[ARG_dest_clip1].u_obj, &dest_clip1_x, &dest_clip1_y); + args[ARG_dest_clip1].u_obj, &dest_clip1_x, &dest_clip1_y); // Validate the clipping regions for the source bitmap int16_t source_clip0_x, source_clip0_y, source_clip1_x, source_clip1_y; validate_clip_region(source, args[ARG_source_clip0].u_obj, &source_clip0_x, &source_clip0_y, - args[ARG_source_clip1].u_obj, &source_clip1_x, &source_clip1_y); + args[ARG_source_clip1].u_obj, &source_clip1_x, &source_clip1_y); // Confirm the angle value - float angle=0.0; - if ( args[ARG_angle].u_obj != mp_const_none ) { + float angle = 0.0; + if (args[ARG_angle].u_obj != mp_const_none) { angle = mp_obj_get_float(args[ARG_angle].u_obj); } // Confirm the scale value - float scale=1.0; - if ( args[ARG_scale].u_obj != mp_const_none ) { + float scale = 1.0; + if (args[ARG_scale].u_obj != mp_const_none) { scale = mp_obj_get_float(args[ARG_scale].u_obj); } if (scale < 0) { // ensure scale >= 0 @@ -220,7 +220,7 @@ STATIC mp_obj_t bitmaptools_obj_rotozoom(size_t n_args, const mp_obj_t *pos_args uint32_t skip_index; bool skip_index_none; // Flag whether input skip_value was None - if (args[ARG_skip_index].u_obj == mp_const_none ) { + if (args[ARG_skip_index].u_obj == mp_const_none) { skip_index = 0; skip_index_none = true; } else { @@ -229,14 +229,14 @@ STATIC mp_obj_t bitmaptools_obj_rotozoom(size_t n_args, const mp_obj_t *pos_args } common_hal_bitmaptools_rotozoom(destination, ox, oy, - dest_clip0_x, dest_clip0_y, - dest_clip1_x, dest_clip1_y, - source, px, py, - source_clip0_x, source_clip0_y, - source_clip1_x, source_clip1_y, - angle, - scale, - skip_index, skip_index_none); + dest_clip0_x, dest_clip0_y, + dest_clip1_x, dest_clip1_y, + source, px, py, + source_clip0_x, source_clip0_y, + source_clip1_x, source_clip1_y, + angle, + scale, + skip_index, skip_index_none); return mp_const_none; } @@ -262,7 +262,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_rotozoom_obj, 0, bitmaptools_obj_rotozoom //| fill region in the destination bitmap""" //| ... //| -STATIC mp_obj_t bitmaptools_obj_fill_region(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args){ +STATIC mp_obj_t bitmaptools_obj_fill_region(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum {ARG_dest_bitmap, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_value}; static const mp_arg_t allowed_args[] = { @@ -282,8 +282,8 @@ STATIC mp_obj_t bitmaptools_obj_fill_region(size_t n_args, const mp_obj_t *pos_a value = args[ARG_value].u_int; color_depth = (1 << destination->bits_per_value); if (color_depth <= value) { - mp_raise_ValueError(translate("out of range of target")); - } + mp_raise_ValueError(translate("out of range of target")); + } int16_t x1 = args[ARG_x1].u_int; int16_t y1 = args[ARG_y1].u_int; @@ -315,7 +315,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_fill_region_obj, 0, bitmaptools_obj_fill_ //| line in the destination bitmap""" //| ... //| -STATIC mp_obj_t bitmaptools_obj_draw_line(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args){ +STATIC mp_obj_t bitmaptools_obj_draw_line(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum {ARG_dest_bitmap, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_value}; static const mp_arg_t allowed_args[] = { @@ -335,8 +335,8 @@ STATIC mp_obj_t bitmaptools_obj_draw_line(size_t n_args, const mp_obj_t *pos_arg value = args[ARG_value].u_int; color_depth = (1 << destination->bits_per_value); if (color_depth <= value) { - mp_raise_ValueError(translate("out of range of target")); - } + mp_raise_ValueError(translate("out of range of target")); + } int16_t x1 = args[ARG_x1].u_int; int16_t y1 = args[ARG_y1].u_int; @@ -344,9 +344,9 @@ STATIC mp_obj_t bitmaptools_obj_draw_line(size_t n_args, const mp_obj_t *pos_arg int16_t y2 = args[ARG_y2].u_int; // verify points are within the bitmap boundary (inclusive) - if ( (x1 < 0) || (x2 < 0) || (y1 < 0) || (y2 < 0) || - (x1 >= destination->width) || (x2 >= destination->width) || - (y1 >= destination->height) || (y2 >= destination->height) ) { + if ((x1 < 0) || (x2 < 0) || (y1 < 0) || (y2 < 0) || + (x1 >= destination->width) || (x2 >= destination->width) || + (y1 >= destination->height) || (y2 >= destination->height)) { mp_raise_ValueError(translate("out of range of target")); } @@ -399,7 +399,7 @@ STATIC mp_obj_t bitmaptools_arrayblit(size_t n_args, const mp_obj_t *pos_args, m { MP_QSTR_y2, MP_ARG_INT, {.u_int = -1} }, { MP_QSTR_skip_index, MP_ARG_OBJ, {.u_obj = mp_const_none } }, } -; + ; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -420,7 +420,7 @@ STATIC mp_obj_t bitmaptools_arrayblit(size_t n_args, const mp_obj_t *pos_args, m mp_raise_IndexError(translate("pixel coordinates out of bounds")); } - size_t output_element_count = (x2-x1) * (y2-y1); + size_t output_element_count = (x2 - x1) * (y2 - y1); size_t element_size = mp_binary_get_size('@', bufinfo.typecode, NULL); size_t input_element_count = bufinfo.len / element_size; @@ -477,11 +477,11 @@ STATIC mp_obj_t bitmaptools_readinto(size_t n_args, const mp_obj_t *pos_args, mp if (!MP_OBJ_IS_TYPE(args[ARG_file].u_obj, &mp_type_fileio)) { mp_raise_TypeError(NULL); } - pyb_file_obj_t* file = MP_OBJ_TO_PTR(args[ARG_file].u_obj); + pyb_file_obj_t *file = MP_OBJ_TO_PTR(args[ARG_file].u_obj); int element_size = args[ARG_element_size].u_int; if (element_size != 1 && element_size != 2 && element_size != 4) { - mp_raise_ValueError_varg(translate("invalid element_size %d, must be, 1, 2, or 4"), element_size); + mp_raise_ValueError_varg(translate("invalid element_size %d, must be, 1, 2, or 4"), element_size); } int bits_per_pixel = args[ARG_bits_per_pixel].u_int; @@ -523,5 +523,5 @@ STATIC MP_DEFINE_CONST_DICT(bitmaptools_module_globals, bitmaptools_module_globa const mp_obj_module_t bitmaptools_module = { .base = {&mp_type_module }, - .globals = (mp_obj_dict_t*)&bitmaptools_module_globals, + .globals = (mp_obj_dict_t *)&bitmaptools_module_globals, }; diff --git a/shared-bindings/bitmaptools/__init__.h b/shared-bindings/bitmaptools/__init__.h index bb89cd7321..6b80f98f53 100644 --- a/shared-bindings/bitmaptools/__init__.h +++ b/shared-bindings/bitmaptools/__init__.h @@ -32,26 +32,26 @@ #include "extmod/vfs_fat.h" void common_hal_bitmaptools_rotozoom(displayio_bitmap_t *self, int16_t ox, int16_t oy, - int16_t dest_clip0_x, int16_t dest_clip0_y, - int16_t dest_clip1_x, int16_t dest_clip1_y, - displayio_bitmap_t *source, int16_t px, int16_t py, - int16_t source_clip0_x, int16_t source_clip0_y, - int16_t source_clip1_x, int16_t source_clip1_y, - float angle, - float scale, - uint32_t skip_index, bool skip_index_none); + int16_t dest_clip0_x, int16_t dest_clip0_y, + int16_t dest_clip1_x, int16_t dest_clip1_y, + displayio_bitmap_t *source, int16_t px, int16_t py, + int16_t source_clip0_x, int16_t source_clip0_y, + int16_t source_clip1_x, int16_t source_clip1_y, + float angle, + float scale, + uint32_t skip_index, bool skip_index_none); void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, - int16_t x1, int16_t y1, - int16_t x2, int16_t y2, - uint32_t value); + int16_t x1, int16_t y1, + int16_t x2, int16_t y2, + uint32_t value); void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, - int16_t x0, int16_t y0, - int16_t x1, int16_t y1, - uint32_t value); + int16_t x0, int16_t y0, + int16_t x1, int16_t y1, + uint32_t value); -void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes); +void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes); void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int element_size, int x1, int y1, int x2, int y2, bool skip_specified, uint32_t skip_index); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_BITMAPTOOLS__INIT__H diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index e18b8b1779..4e0d72452d 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -36,14 +36,14 @@ #include "stdlib.h" void common_hal_bitmaptools_rotozoom(displayio_bitmap_t *self, int16_t ox, int16_t oy, - int16_t dest_clip0_x, int16_t dest_clip0_y, - int16_t dest_clip1_x, int16_t dest_clip1_y, - displayio_bitmap_t *source, int16_t px, int16_t py, - int16_t source_clip0_x, int16_t source_clip0_y, - int16_t source_clip1_x, int16_t source_clip1_y, - float angle, - float scale, - uint32_t skip_index, bool skip_index_none) { + int16_t dest_clip0_x, int16_t dest_clip0_y, + int16_t dest_clip1_x, int16_t dest_clip1_y, + displayio_bitmap_t *source, int16_t px, int16_t py, + int16_t source_clip0_x, int16_t source_clip0_y, + int16_t source_clip1_x, int16_t source_clip1_y, + float angle, + float scale, + uint32_t skip_index, bool skip_index_none) { // Copies region from source to the destination bitmap, including rotation, // scaling and clipping of either the source or destination regions @@ -115,37 +115,77 @@ void common_hal_bitmaptools_rotozoom(displayio_bitmap_t *self, int16_t ox, int16 will be on the destination to get a bounding box for scanning */ dx = -cosAngle * px * scale + sinAngle * py * scale + ox; dy = -sinAngle * px * scale - cosAngle * py * scale + oy; - if(dx < minx) minx = (int16_t)dx; - if(dx > maxx) maxx = (int16_t)dx; - if(dy < miny) miny = (int16_t)dy; - if(dy > maxy) maxy = (int16_t)dy; + if (dx < minx) { + minx = (int16_t)dx; + } + if (dx > maxx) { + maxx = (int16_t)dx; + } + if (dy < miny) { + miny = (int16_t)dy; + } + if (dy > maxy) { + maxy = (int16_t)dy; + } dx = cosAngle * (source->width - px) * scale + sinAngle * py * scale + ox; dy = sinAngle * (source->width - px) * scale - cosAngle * py * scale + oy; - if(dx < minx) minx = (int16_t)dx; - if(dx > maxx) maxx = (int16_t)dx; - if(dy < miny) miny = (int16_t)dy; - if(dy > maxy) maxy = (int16_t)dy; + if (dx < minx) { + minx = (int16_t)dx; + } + if (dx > maxx) { + maxx = (int16_t)dx; + } + if (dy < miny) { + miny = (int16_t)dy; + } + if (dy > maxy) { + maxy = (int16_t)dy; + } dx = cosAngle * (source->width - px) * scale - sinAngle * (source->height - py) * scale + ox; dy = sinAngle * (source->width - px) * scale + cosAngle * (source->height - py) * scale + oy; - if(dx < minx) minx = (int16_t)dx; - if(dx > maxx) maxx = (int16_t)dx; - if(dy < miny) miny = (int16_t)dy; - if(dy > maxy) maxy = (int16_t)dy; + if (dx < minx) { + minx = (int16_t)dx; + } + if (dx > maxx) { + maxx = (int16_t)dx; + } + if (dy < miny) { + miny = (int16_t)dy; + } + if (dy > maxy) { + maxy = (int16_t)dy; + } dx = -cosAngle * px * scale - sinAngle * (source->height - py) * scale + ox; dy = -sinAngle * px * scale + cosAngle * (source->height - py) * scale + oy; - if(dx < minx) minx = (int16_t)dx; - if(dx > maxx) maxx = (int16_t)dx; - if(dy < miny) miny = (int16_t)dy; - if(dy > maxy) maxy = (int16_t)dy; + if (dx < minx) { + minx = (int16_t)dx; + } + if (dx > maxx) { + maxx = (int16_t)dx; + } + if (dy < miny) { + miny = (int16_t)dy; + } + if (dy > maxy) { + maxy = (int16_t)dy; + } /* Clipping */ - if(minx < dest_clip0_x) minx = dest_clip0_x; - if(maxx > dest_clip1_x - 1) maxx = dest_clip1_x - 1; - if(miny < dest_clip0_y) miny = dest_clip0_y; - if(maxy > dest_clip1_y - 1) maxy = dest_clip1_y - 1; + if (minx < dest_clip0_x) { + minx = dest_clip0_x; + } + if (maxx > dest_clip1_x - 1) { + maxx = dest_clip1_x - 1; + } + if (miny < dest_clip0_y) { + miny = dest_clip0_y; + } + if (maxy > dest_clip1_y - 1) { + maxy = dest_clip1_y - 1; + } float dvCol = cosAngle / scale; float duCol = sinAngle / scale; @@ -159,13 +199,13 @@ void common_hal_bitmaptools_rotozoom(displayio_bitmap_t *self, int16_t ox, int16 float rowu = startu + miny * duCol; float rowv = startv + miny * dvCol; - for(y = miny; y <= maxy; y++) { + for (y = miny; y <= maxy; y++) { float u = rowu + minx * duRow; float v = rowv + minx * dvRow; - for(x = minx; x <= maxx; x++) { - if(u >= source_clip0_x && u < source_clip1_x && v >= source_clip0_y && v < source_clip1_y) { + for (x = minx; x <= maxx; x++) { + if (u >= source_clip0_x && u < source_clip1_x && v >= source_clip0_y && v < source_clip1_y) { uint32_t c = common_hal_displayio_bitmap_get_pixel(source, u, v); - if( (skip_index_none) || (c != skip_index) ) { + if ((skip_index_none) || (c != skip_index)) { common_hal_displayio_bitmap_set_pixel(self, x, y, c); } } @@ -189,9 +229,9 @@ int16_t constrain(int16_t input, int16_t min, int16_t max) { } void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, - int16_t x1, int16_t y1, - int16_t x2, int16_t y2, - uint32_t value) { + int16_t x1, int16_t y1, + int16_t x2, int16_t y2, + uint32_t value) { // writes the value (a bitmap color index) into a bitmap in the specified rectangular region // // input checks should ensure that x1 < x2 and y1 < y2 and are within the bitmap region @@ -202,14 +242,14 @@ void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, // Ensure x1 < x2 and y1 < y2 if (x1 > x2) { - int16_t temp=x2; - x2=x1; - x1=temp; + int16_t temp = x2; + x2 = x1; + x1 = temp; } if (y1 > y2) { - int16_t temp=y2; - y2=y1; - y1=temp; + int16_t temp = y2; + y2 = y1; + y1 = temp; } // constrain to bitmap dimensions @@ -223,16 +263,16 @@ void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, int16_t x, y; for (x = x1; x < x2; x++) { - for (y = y1; y < y2; y++ ) { + for (y = y1; y < y2; y++) { displayio_bitmap_write_pixel(destination, x, y, value); } } } void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, - int16_t x0, int16_t y0, - int16_t x1, int16_t y1, - uint32_t value) { + int16_t x0, int16_t y0, + int16_t x1, int16_t y1, + uint32_t value) { if (destination->read_only) { mp_raise_RuntimeError(translate("Read-only object")); @@ -277,8 +317,7 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, for (y = y0; y < (y1 + 1); y++) { // write a horizontal line displayio_bitmap_write_pixel(destination, x0, y, value); } - } - else if (y0 == y1) { // horizontal line + } else if (y0 == y1) { // horizontal line if (x0 > x1) { // ensure y1 > y0 temp = x0; x0 = x1; @@ -287,12 +326,11 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, for (x = x0; x < (x1 + 1); x++) { // write a horizontal line displayio_bitmap_write_pixel(destination, x, y0, value); } - } - else { + } else { bool steep; - steep = ( abs(y1 - y0) > abs(x1 - x0) ); + steep = (abs(y1 - y0) > abs(x1 - x0)); - if ( steep ) { // flip x0<->y0 and x1<->y1 + if (steep) { // flip x0<->y0 and x1<->y1 temp = x0; x0 = y0; y0 = temp; @@ -318,16 +356,14 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, if (y0 < y1) { ystep = 1; - } - else { + } else { ystep = -1; } for (x = x0; x < (x1 + 1); x++) { if (steep) { displayio_bitmap_write_pixel(destination, y0, x, value); - } - else { + } else { displayio_bitmap_write_pixel(destination, x, y0, value); } err -= dy; @@ -342,23 +378,23 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int element_size, int x1, int y1, int x2, int y2, bool skip_specified, uint32_t skip_value) { uint32_t mask = (1 << common_hal_displayio_bitmap_get_bits_per_value(self)) - 1; - for (int y=y1; yread_only) { @@ -378,10 +414,10 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* f size_t rowsize = element_size * elements_per_row; size_t rowsize_in_u32 = (rowsize + sizeof(uint32_t) - 1) / sizeof(uint32_t); size_t rowsize_in_u16 = (rowsize + sizeof(uint16_t) - 1) / sizeof(uint16_t); - for(int y=0; yheight; y++) { + for (int y = 0; y < self->height; y++) { uint32_t rowdata32[rowsize_in_u32]; - uint16_t *rowdata16 = (uint16_t*)rowdata32; - uint8_t *rowdata8 = (uint8_t*)rowdata32; + uint16_t *rowdata16 = (uint16_t *)rowdata32; + uint8_t *rowdata8 = (uint8_t *)rowdata32; UINT bytes_read = 0; if (f_read(&file->fp, rowdata32, rowsize, &bytes_read) != FR_OK || bytes_read != rowsize) { @@ -389,63 +425,60 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* f } if (swap_bytes) { - switch(element_size) { - case 2: - for(size_t i=0; i< rowsize_in_u16; i++) { - rowdata16[i] = __builtin_bswap16(rowdata16[i]); - } - break; - case 4: - for(size_t i=0; i< rowsize_in_u32; i++) { - rowdata32[i] = __builtin_bswap32(rowdata32[i]); - } - default: - break; + switch (element_size) { + case 2: + for (size_t i = 0; i < rowsize_in_u16; i++) { + rowdata16[i] = __builtin_bswap16(rowdata16[i]); + } + break; + case 4: + for (size_t i = 0; i < rowsize_in_u32; i++) { + rowdata32[i] = __builtin_bswap32(rowdata32[i]); + } + default: + break; } } - for(int x=0; xwidth; x++) { + for (int x = 0; x < self->width; x++) { int value = 0; - switch(bits_per_pixel) { - case 1: - { + switch (bits_per_pixel) { + case 1: { int byte_offset = x / 8; int bit_offset = reverse_pixels_in_element ? (7 - x % 8) : x % 8; value = (rowdata8[byte_offset] >> bit_offset) & 1; break; } - case 2: - { + case 2: { int byte_offset = x / 4; int bit_offset = 2 * (reverse_pixels_in_element ? (3 - x % 4) : x % 4); value = (rowdata8[byte_offset] >> bit_offset) & 3; break; } - case 4: - { + case 4: { int byte_offset = x / 2; int bit_offset = 4 * (reverse_pixels_in_element ? (1 - x % 2) : x % 2); value = (rowdata8[byte_offset] >> bit_offset) & 7; break; } - case 8: - value = rowdata8[x]; - break; + case 8: + value = rowdata8[x]; + break; - case 16: - value = rowdata16[x]; - break; + case 16: + value = rowdata16[x]; + break; - case 24: - value = (rowdata8[x * 3] << 16) | (rowdata8[x * 3 + 1] << 8) | (rowdata8[x * 3 + 2] << 8); - break; + case 24: + value = (rowdata8[x * 3] << 16) | (rowdata8[x * 3 + 1] << 8) | (rowdata8[x * 3 + 2] << 8); + break; - case 32: - value = rowdata32[x]; - break; + case 32: + value = rowdata32[x]; + break; } displayio_bitmap_write_pixel(self, x, y, value & mask); From cae3397ea09dd85b83f7d2b9f52b7ed27198c2be Mon Sep 17 00:00:00 2001 From: mintakka Date: Tue, 16 Mar 2021 13:47:10 -0400 Subject: [PATCH 057/261] Update .github/workflows/build.yml Co-authored-by: Scott Shawcroft --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9044fb18d1..1adc141c8c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -322,7 +322,7 @@ jobs: - "sparkfun_samd21_dev" - "sparkfun_samd21_mini" - "sparkfun_samd51_thing_plus" - - "sparkfun_thingplus_rp2040" + - "sparkfun_thing_plus_rp2040" - "spresense" - "stackrduino_m0_pro" - "stm32f411ce_blackpill" From 3d15877639c70316b6f085b40a8f49ac56da3b5c Mon Sep 17 00:00:00 2001 From: mintakka Date: Tue, 16 Mar 2021 13:47:21 -0400 Subject: [PATCH 058/261] Update ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.mk Co-authored-by: Scott Shawcroft --- .../boards/sparkfun_thingplus_rp2040/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.mk index fc6c37dc3b..aaa26dc744 100644 --- a/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.mk @@ -1,7 +1,7 @@ USB_VID = 0x1B4F USB_PID = 0x0025 USB_PRODUCT = "ThingPlus RP2040" -USB_MANUFACTURER = "Sparkfun" +USB_MANUFACTURER = "SparkFun" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 From b5333f2bdf58f8af13167ea172e366bd5c78fa26 Mon Sep 17 00:00:00 2001 From: mintakka Date: Tue, 16 Mar 2021 13:47:33 -0400 Subject: [PATCH 059/261] Update ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.h Co-authored-by: Scott Shawcroft --- .../boards/sparkfun_thingplus_rp2040/mpconfigboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.h index 82327c5d93..564e41a651 100644 --- a/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "Sparkfun ThingPlus RP2040" +#define MICROPY_HW_BOARD_NAME "SparkFun Thing Plus - RP2040" #define MICROPY_HW_MCU_NAME "rp2040" #define MICROPY_HW_NEOPIXEL (&pin_GPIO8) From 5bc132a209e91ed6450ce5f9ca8f7b0eaf6f7270 Mon Sep 17 00:00:00 2001 From: spe2 Date: Tue, 16 Mar 2021 10:54:15 -0700 Subject: [PATCH 060/261] Update ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h Co-authored-by: Scott Shawcroft --- .../boards/sparkfun_pro_micro_rp2040/mpconfigboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h index 370a1b0ea8..8ceab9caa9 100644 --- a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "Sparkfun Pro Micro RP2040" +#define MICROPY_HW_BOARD_NAME "SparkFun Pro Micro RP2040" #define MICROPY_HW_MCU_NAME "rp2040" #define MICROPY_HW_NEOPIXEL (&pin_GPIO25) From dcd9a8ab911513b0c06d3541d08fa8f2a18b5f9b Mon Sep 17 00:00:00 2001 From: spe2 Date: Tue, 16 Mar 2021 10:54:20 -0700 Subject: [PATCH 061/261] Update ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk Co-authored-by: Scott Shawcroft --- .../boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk index 6bd5988532..6f758cd8f0 100644 --- a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk @@ -1,7 +1,7 @@ USB_VID = 0x1B4F USB_PID = 0x0026 USB_PRODUCT = "Pro Micro RP2040" -USB_MANUFACTURER = "Sparkfun" +USB_MANUFACTURER = "SparkFun" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 From e1dd396de7fc489bb5b4fa8d08f36ab6480063dc Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 16 Mar 2021 13:37:04 -0500 Subject: [PATCH 062/261] fix stub docs --- shared-bindings/bitmaptools/__init__.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 0edbe135d5..ae1787439f 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -358,7 +358,7 @@ STATIC mp_obj_t bitmaptools_obj_draw_line(size_t n_args, const mp_obj_t *pos_arg MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_line); // requires all 6 arguments -//| def arrayblit(bitmap: display.Bitmap, data: ReadableBuffer, x1: int=0, y1: int=0, x2: Optional[int]=None, y2: Optional[int]=None, skip_index:Optional[int]=None) -> None: +//| def arrayblit(bitmap: displayio.Bitmap, data: ReadableBuffer, x1: int=0, y1: int=0, x2: Optional[int]=None, y2: Optional[int]=None, skip_index:Optional[int]=None) -> None: //| """Inserts pixels from ``data`` into the rectangle of width×height pixels with the upper left corner at ``(x,y)`` //| //| The values from ``data`` are taken modulo the number of color values @@ -384,7 +384,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_li //| :param int x2: The right of the area to blit into (exclusive) //| :param int y2: The bottom corner of the area to blit into (exclusive) //| :param int skip_index: Bitmap palette index in the source that will not be copied, -//| set to None to copy all pixels""" +//| set to None to copy all pixels //| """ //| ... //| From df2d08366afa14f52e537d267bd4f75032865f2a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 16 Mar 2021 13:37:19 -0500 Subject: [PATCH 063/261] make translate --- locale/circuitpython.pot | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 53c8ed2cec..bc084219f6 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -2851,6 +2851,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/linalg/linalg.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3357,10 +3361,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -4175,10 +4175,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" From 5810004bc9b4e50d6e21abf361d280d4046a5ca5 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 16 Mar 2021 19:01:38 -0500 Subject: [PATCH 064/261] fix doc error --- shared-bindings/bitmaptools/__init__.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index ae1787439f..7d89ec252c 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -368,8 +368,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_li //| are not specified, or are given as -1, they are taken as the width //| and height of the image. //| -//| The coordinates affected by the blit are ``x1 <= x < x2`` and ``y1 < -//| y < y2``. +//| The coordinates affected by the blit are ``x1 <= x < x2`` and ``y1 <= y < y2``. //| //| ``data`` must contain at least as many elements as required. If it //| contains excess elements, they are ignored. From 94fa8e8a606352ad3eb7c5986e62d9850ceeb865 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 16 Mar 2021 19:04:21 -0500 Subject: [PATCH 065/261] disable bitmaptools on small board --- ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk index 48b22b394e..1a1bf8cc79 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk @@ -14,6 +14,7 @@ EXTERNAL_FLASH_DEVICES = AT25DF081A CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 From 074ba1daff2c188d1aef278833982016da49f403 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 16 Mar 2021 19:05:06 -0500 Subject: [PATCH 066/261] more doc fixes --- shared-bindings/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 7d89ec252c..bdd4d3e676 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -362,7 +362,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_li //| """Inserts pixels from ``data`` into the rectangle of width×height pixels with the upper left corner at ``(x,y)`` //| //| The values from ``data`` are taken modulo the number of color values -//| avalable in the destintaion bitmap. +//| avalable in the destination bitmap. //| //| If x1 or y1 are not specified, they are taken as 0. If x2 or y2 //| are not specified, or are given as -1, they are taken as the width From 337727ba0ce1c31bb334c34fbd2b74f2447a2b62 Mon Sep 17 00:00:00 2001 From: mintakka Date: Tue, 16 Mar 2021 21:10:10 -0400 Subject: [PATCH 067/261] renamed board folder to match board name in boards.yml --- .../board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 2 +- .../pins.c | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename ports/raspberrypi/boards/{sparkfun_thingplus_rp2040 => sparkfun_thing_plus_rp2040}/board.c (100%) rename ports/raspberrypi/boards/{sparkfun_thingplus_rp2040 => sparkfun_thing_plus_rp2040}/mpconfigboard.h (100%) rename ports/raspberrypi/boards/{sparkfun_thingplus_rp2040 => sparkfun_thing_plus_rp2040}/mpconfigboard.mk (80%) rename ports/raspberrypi/boards/{sparkfun_thingplus_rp2040 => sparkfun_thing_plus_rp2040}/pins.c (100%) diff --git a/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/board.c b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/board.c similarity index 100% rename from ports/raspberrypi/boards/sparkfun_thingplus_rp2040/board.c rename to ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/board.c diff --git a/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.h similarity index 100% rename from ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.h rename to ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.h diff --git a/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk similarity index 80% rename from ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.mk rename to ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk index aaa26dc744..f7369ab37e 100644 --- a/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x1B4F USB_PID = 0x0025 -USB_PRODUCT = "ThingPlus RP2040" +USB_PRODUCT = "Thing Plus RP2040" USB_MANUFACTURER = "SparkFun" CHIP_VARIANT = RP2040 diff --git a/ports/raspberrypi/boards/sparkfun_thingplus_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c similarity index 100% rename from ports/raspberrypi/boards/sparkfun_thingplus_rp2040/pins.c rename to ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c From 5c3cce6f5d8ca15aeef486f903da6531f5d53ba5 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Tue, 16 Mar 2021 20:43:23 -0500 Subject: [PATCH 068/261] add is_transparent getter to displayio.Palette --- shared-bindings/displayio/Palette.c | 18 +++++++++++++++++- shared-bindings/displayio/Palette.h | 1 + shared-module/displayio/Palette.c | 4 ++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/shared-bindings/displayio/Palette.c b/shared-bindings/displayio/Palette.c index d5acf1ed60..01c7000706 100644 --- a/shared-bindings/displayio/Palette.c +++ b/shared-bindings/displayio/Palette.c @@ -84,7 +84,7 @@ STATIC mp_obj_t group_unary_op(mp_unary_op_t op, mp_obj_t self_in) { } //| def __getitem__(self, index: int) -> Optional[int]: -//| r"""Return the pixel color at the given index as an integer.""" +//| """Return the pixel color at the given index as an integer.""" //| ... //| //| def __setitem__(self, index: int, value: Union[int, ReadableBuffer, Tuple[int, int, int]]) -> None: @@ -180,9 +180,25 @@ STATIC mp_obj_t displayio_palette_obj_make_opaque(mp_obj_t self_in, mp_obj_t pal } MP_DEFINE_CONST_FUN_OBJ_2(displayio_palette_make_opaque_obj, displayio_palette_obj_make_opaque); +//| def is_transparent(self, palette_index: int) -> bool: +//| """Returns `True` if the palette index is transparent. Returns `False` if opaque.""" +//| ... +//| +STATIC mp_obj_t displayio_palette_obj_is_transparent(mp_obj_t self_in, mp_obj_t palette_index_obj) { + displayio_palette_t *self = MP_OBJ_TO_PTR(self_in); + + mp_int_t palette_index; + if (!mp_obj_get_int_maybe(palette_index_obj, &palette_index)) { + mp_raise_ValueError(translate("palette_index should be an int")); + } + return mp_obj_new_bool(common_hal_displayio_palette_is_transparent(self, palette_index)); +} +MP_DEFINE_CONST_FUN_OBJ_2(displayio_palette_is_transparent_obj, displayio_palette_obj_is_transparent); + STATIC const mp_rom_map_elem_t displayio_palette_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_make_transparent), MP_ROM_PTR(&displayio_palette_make_transparent_obj) }, { MP_ROM_QSTR(MP_QSTR_make_opaque), MP_ROM_PTR(&displayio_palette_make_opaque_obj) }, + { MP_ROM_QSTR(MP_QSTR_is_transparent), MP_ROM_PTR(&displayio_palette_is_transparent_obj) }, }; STATIC MP_DEFINE_CONST_DICT(displayio_palette_locals_dict, displayio_palette_locals_dict_table); diff --git a/shared-bindings/displayio/Palette.h b/shared-bindings/displayio/Palette.h index 62b8f36009..d9a798016c 100644 --- a/shared-bindings/displayio/Palette.h +++ b/shared-bindings/displayio/Palette.h @@ -38,5 +38,6 @@ uint32_t common_hal_displayio_palette_get_len(displayio_palette_t *self); void common_hal_displayio_palette_make_opaque(displayio_palette_t *self, uint32_t palette_index); void common_hal_displayio_palette_make_transparent(displayio_palette_t *self, uint32_t palette_index); +bool common_hal_displayio_palette_is_transparent(displayio_palette_t *self, uint32_t palette_index); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO_PALETTE_H diff --git a/shared-module/displayio/Palette.c b/shared-module/displayio/Palette.c index 6dde3a80f1..9b6374ac38 100644 --- a/shared-module/displayio/Palette.c +++ b/shared-module/displayio/Palette.c @@ -43,6 +43,10 @@ void common_hal_displayio_palette_make_transparent(displayio_palette_t *self, ui self->needs_refresh = true; } +bool common_hal_displayio_palette_is_transparent(displayio_palette_t *self, uint32_t palette_index) { + return self->colors[palette_index].transparent; +} + uint32_t common_hal_displayio_palette_get_len(displayio_palette_t *self) { return self->color_count; } From 592f89f6aeab6f19835baa01cc9b1db12009505a Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Tue, 16 Mar 2021 20:45:55 -0500 Subject: [PATCH 069/261] add back peculiar r to docstring --- shared-bindings/displayio/Palette.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/displayio/Palette.c b/shared-bindings/displayio/Palette.c index 01c7000706..dc71c0560c 100644 --- a/shared-bindings/displayio/Palette.c +++ b/shared-bindings/displayio/Palette.c @@ -84,7 +84,7 @@ STATIC mp_obj_t group_unary_op(mp_unary_op_t op, mp_obj_t self_in) { } //| def __getitem__(self, index: int) -> Optional[int]: -//| """Return the pixel color at the given index as an integer.""" +//| r"""Return the pixel color at the given index as an integer.""" //| ... //| //| def __setitem__(self, index: int, value: Union[int, ReadableBuffer, Tuple[int, int, int]]) -> None: From f6cabccd9e74462f927bb48f48569f07c136d8d9 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 17 Mar 2021 13:57:41 +0100 Subject: [PATCH 070/261] 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 | 18 +++++++++++++++++- locale/cs.po | 18 +++++++++++++++++- locale/de_DE.po | 18 +++++++++++++++++- locale/el.po | 18 +++++++++++++++++- locale/en_GB.po | 18 +++++++++++++++++- locale/es.po | 18 +++++++++++++++++- locale/fil.po | 18 +++++++++++++++++- locale/fr.po | 18 +++++++++++++++++- locale/hi.po | 18 +++++++++++++++++- locale/it_IT.po | 18 +++++++++++++++++- locale/ja.po | 18 +++++++++++++++++- locale/ko.po | 18 +++++++++++++++++- locale/nl.po | 18 +++++++++++++++++- locale/pl.po | 18 +++++++++++++++++- locale/pt_BR.po | 18 +++++++++++++++++- locale/sv.po | 18 +++++++++++++++++- locale/zh_Latn_pinyin.po | 18 +++++++++++++++++- 17 files changed, 289 insertions(+), 17 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 55b02fea1f..d40a485f27 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -3159,6 +3159,7 @@ msgstr "" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index keluar dari jangkauan" @@ -3263,6 +3264,11 @@ msgstr "" msgid "invalid arguments" msgstr "argumen-argumen tidak valid" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "cert tidak valid" @@ -3271,6 +3277,16 @@ msgstr "cert tidak valid" msgid "invalid dupterm index" msgstr "indeks dupterm tidak valid" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "format tidak valid" @@ -3730,7 +3746,7 @@ msgstr "" msgid "parameters must be registers in sequence r0 to r3" msgstr "parameter harus menjadi register dalam urutan r0 sampai r3" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 1cac959b84..8f89ec9ede 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -3111,6 +3111,7 @@ msgstr "" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "" @@ -3215,6 +3216,11 @@ msgstr "" msgid "invalid arguments" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "" @@ -3223,6 +3229,16 @@ msgstr "" msgid "invalid dupterm index" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3681,7 +3697,7 @@ msgstr "" msgid "parameters must be registers in sequence r0 to r3" msgstr "" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 2bd7fc998e..9218f9ff61 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -3189,6 +3189,7 @@ msgstr "Index ist außerhalb der Grenzen" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index außerhalb der Reichweite" @@ -3293,6 +3294,11 @@ msgstr "Das Intervall muss im Bereich %s-%s sein" msgid "invalid arguments" msgstr "ungültige argumente" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "ungültiges cert" @@ -3301,6 +3307,16 @@ msgstr "ungültiges cert" msgid "invalid dupterm index" msgstr "ungültiger dupterm index" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "ungültiges Format" @@ -3769,7 +3785,7 @@ msgstr "Die Parameter müssen Register der Reihenfolge a2 bis a5 sein" msgid "parameters must be registers in sequence r0 to r3" msgstr "Die Parameter müssen Register der Reihenfolge r0 bis r3 sein" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "Pixelkoordinaten außerhalb der Grenzen" diff --git a/locale/el.po b/locale/el.po index 578c18739d..3a324c1b53 100644 --- a/locale/el.po +++ b/locale/el.po @@ -3108,6 +3108,7 @@ msgstr "" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "" @@ -3212,6 +3213,11 @@ msgstr "" msgid "invalid arguments" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "" @@ -3220,6 +3226,16 @@ msgstr "" msgid "invalid dupterm index" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3678,7 +3694,7 @@ msgstr "" msgid "parameters must be registers in sequence r0 to r3" msgstr "" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 8ee2da6c3f..88ee7dc608 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -3107,6 +3107,7 @@ msgstr "" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "" @@ -3211,6 +3212,11 @@ msgstr "" msgid "invalid arguments" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "" @@ -3219,6 +3225,16 @@ msgstr "" msgid "invalid dupterm index" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3677,7 +3693,7 @@ msgstr "" msgid "parameters must be registers in sequence r0 to r3" msgstr "" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "" diff --git a/locale/es.po b/locale/es.po index bcf4dfc798..9150440f34 100644 --- a/locale/es.po +++ b/locale/es.po @@ -3197,6 +3197,7 @@ msgstr "el índice está fuera de límites" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index fuera de rango" @@ -3301,6 +3302,11 @@ msgstr "el intervalo debe ser der rango %s-%s" msgid "invalid arguments" msgstr "argumentos inválidos" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "certificado inválido" @@ -3309,6 +3315,16 @@ msgstr "certificado inválido" msgid "invalid dupterm index" msgstr "index dupterm inválido" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "formato inválido" @@ -3774,7 +3790,7 @@ msgstr "los parámetros deben ser registros en secuencia de a2 a a5" msgid "parameters must be registers in sequence r0 to r3" msgstr "los parametros deben ser registros en secuencia del r0 al r3" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "coordenadas del pixel fuera de límites" diff --git a/locale/fil.po b/locale/fil.po index ce194d7334..2c2a118790 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -3151,6 +3151,7 @@ msgstr "" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index wala sa sakop" @@ -3255,6 +3256,11 @@ msgstr "" msgid "invalid arguments" msgstr "mali ang mga argumento" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "mali ang cert" @@ -3263,6 +3269,16 @@ msgstr "mali ang cert" msgid "invalid dupterm index" msgstr "mali ang dupterm index" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "hindi wastong pag-format" @@ -3726,7 +3742,7 @@ msgstr "ang mga parameter ay dapat na nagrerehistro sa sequence a2 hanggang a5" msgid "parameters must be registers in sequence r0 to r3" msgstr "ang mga parameter ay dapat na nagrerehistro sa sequence r0 hanggang r3" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c #, fuzzy msgid "pixel coordinates out of bounds" msgstr "wala sa sakop ang address" diff --git a/locale/fr.po b/locale/fr.po index d535345796..a6b66ece5b 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -3216,6 +3216,7 @@ msgstr "l'index est hors limites" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index est hors bornes" @@ -3321,6 +3322,11 @@ msgstr "interval doit être dans la portée %s-%s" msgid "invalid arguments" msgstr "arguments invalides" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "certificat invalide" @@ -3329,6 +3335,16 @@ msgstr "certificat invalide" msgid "invalid dupterm index" msgstr "index invalide pour dupterm" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "format invalide" @@ -3795,7 +3811,7 @@ msgstr "les paramètres doivent être des registres dans la séquence a2 à a5" msgid "parameters must be registers in sequence r0 to r3" msgstr "les paramètres doivent être des registres dans la séquence r0 à r3" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "coordonnées de pixel hors limites" diff --git a/locale/hi.po b/locale/hi.po index 7f6273974d..d2de579a58 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -3108,6 +3108,7 @@ msgstr "" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "" @@ -3212,6 +3213,11 @@ msgstr "" msgid "invalid arguments" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "" @@ -3220,6 +3226,16 @@ msgstr "" msgid "invalid dupterm index" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3678,7 +3694,7 @@ msgstr "" msgid "parameters must be registers in sequence r0 to r3" msgstr "" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 35e90056db..16f89c2b9b 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -3162,6 +3162,7 @@ msgstr "" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "indice fuori intervallo" @@ -3266,6 +3267,11 @@ msgstr "" msgid "invalid arguments" msgstr "argomenti non validi" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "certificato non valido" @@ -3274,6 +3280,16 @@ msgstr "certificato non valido" msgid "invalid dupterm index" msgstr "indice dupterm non valido" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "formato non valido" @@ -3743,7 +3759,7 @@ msgstr "parametri devono essere i registri in sequenza da a2 a a5" msgid "parameters must be registers in sequence r0 to r3" msgstr "parametri devono essere i registri in sequenza da a2 a a5" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c #, fuzzy msgid "pixel coordinates out of bounds" msgstr "indirizzo fuori limite" diff --git a/locale/ja.po b/locale/ja.po index 5e5da8e9ed..f95b4e0dd8 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -3135,6 +3135,7 @@ msgstr "" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "インデクスが範囲外" @@ -3240,6 +3241,11 @@ msgstr "intervalは%s-%sの範囲でなければなりません" msgid "invalid arguments" msgstr "不正な引数" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "不正な証明書" @@ -3248,6 +3254,16 @@ msgstr "不正な証明書" msgid "invalid dupterm index" msgstr "不正なduptermインデクス" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3706,7 +3722,7 @@ msgstr "" msgid "parameters must be registers in sequence r0 to r3" msgstr "" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index c480466c45..354881acd9 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -3112,6 +3112,7 @@ msgstr "" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "" @@ -3216,6 +3217,11 @@ msgstr "" msgid "invalid arguments" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "cert가 유효하지 않습니다" @@ -3224,6 +3230,16 @@ msgstr "cert가 유효하지 않습니다" msgid "invalid dupterm index" msgstr "Dupterm index가 유효하지 않습니다" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "형식가 유효하지 않습니다" @@ -3682,7 +3698,7 @@ msgstr "" msgid "parameters must be registers in sequence r0 to r3" msgstr "" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 851b9ac236..4547438fbe 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -3166,6 +3166,7 @@ msgstr "index is buiten bereik" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index is buiten bereik" @@ -3270,6 +3271,11 @@ msgstr "interval moet binnen bereik %s-%s vallen" msgid "invalid arguments" msgstr "ongeldige argumenten" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "ongeldig certificaat" @@ -3278,6 +3284,16 @@ msgstr "ongeldig certificaat" msgid "invalid dupterm index" msgstr "ongeldige dupterm index" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "ongeldig formaat" @@ -3739,7 +3755,7 @@ msgstr "parameters moeten registers zijn in de volgorde a2 tot a5" msgid "parameters must be registers in sequence r0 to r3" msgstr "parameters moeten registers zijn in de volgorde r0 tot r3" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "pixel coördinaten buiten bereik" diff --git a/locale/pl.po b/locale/pl.po index 77ffa25cdb..9b32eb7944 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -3129,6 +3129,7 @@ msgstr "indeks jest poza zakresem" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "indeks poza zakresem" @@ -3233,6 +3234,11 @@ msgstr "interwał musi mieścić się w zakresie %s-%s" msgid "invalid arguments" msgstr "złe arguemnty" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "zły ceryfikat" @@ -3241,6 +3247,16 @@ msgstr "zły ceryfikat" msgid "invalid dupterm index" msgstr "zły indeks dupterm" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "zły format" @@ -3699,7 +3715,7 @@ msgstr "parametry muszą być rejestrami w kolejności a2 do a5" msgid "parameters must be registers in sequence r0 to r3" msgstr "parametry muszą być rejestrami w kolejności r0 do r3" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "współrzędne piksela poza zakresem" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index ea11928017..7efd211757 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -3205,6 +3205,7 @@ msgstr "o índice está fora dos limites" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "Índice fora do intervalo" @@ -3310,6 +3311,11 @@ msgstr "o intervalo deve estar entre %s-%s" msgid "invalid arguments" msgstr "argumentos inválidos" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "certificado inválido" @@ -3318,6 +3324,16 @@ msgstr "certificado inválido" msgid "invalid dupterm index" msgstr "Índice de dupterm inválido" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "formato inválido" @@ -3786,7 +3802,7 @@ msgstr "os parâmetros devem ser registradores na sequência a2 até a5" msgid "parameters must be registers in sequence r0 to r3" msgstr "os parâmetros devem ser registradores na sequência r0 até r3" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "as coordenadas do pixel estão fora dos limites" diff --git a/locale/sv.po b/locale/sv.po index 62d2204e8e..d83435c8d4 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -3169,6 +3169,7 @@ msgstr "index är utanför gränserna" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index utanför intervallet" @@ -3273,6 +3274,11 @@ msgstr "interval måste vara i intervallet %s-%s" msgid "invalid arguments" msgstr "ogiltiga argument" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "ogiltigt certifikat" @@ -3281,6 +3287,16 @@ msgstr "ogiltigt certifikat" msgid "invalid dupterm index" msgstr "ogiltigt dupterm index" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "ogiltigt format" @@ -3742,7 +3758,7 @@ msgstr "parametrarna måste registreras i följd a2-a5" msgid "parameters must be registers in sequence r0 to r3" msgstr "parametrarna måste registreras i följd r0-r3" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "pixelkoordinater utanför gränserna" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index de00758dd9..6a44136f30 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -3168,6 +3168,7 @@ msgstr "suǒyǐn chāochū fànwéi" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "suǒyǐn chāochū fànwéi" @@ -3272,6 +3273,11 @@ msgstr "Jiàngé bìxū zài %s-%s fànwéi nèi" msgid "invalid arguments" msgstr "wúxiào de cānshù" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid cert" msgstr "zhèngshū wúxiào" @@ -3280,6 +3286,16 @@ msgstr "zhèngshū wúxiào" msgid "invalid dupterm index" msgstr "dupterm suǒyǐn wúxiào" +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "wúxiào géshì" @@ -3739,7 +3755,7 @@ msgstr "cānshù bìxū shì xùliè a2 zhì a5 de dēngjì shù" msgid "parameters must be registers in sequence r0 to r3" msgstr "cānshù bìxū shì xùliè r0 zhì r3 de dēngjì qì" -#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" msgstr "xiàngsù zuòbiāo chāochū biānjiè" From 580121d46e30dde49b2e0648cb71f811d2eade84 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Wed, 17 Mar 2021 09:38:53 -0500 Subject: [PATCH 071/261] minor formatting --- shared-module/bitmaptools/__init__.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 2d6aadee7e..3363f35a68 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -403,7 +403,7 @@ void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int } } -void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* file, int element_size, int bits_per_pixel, bool reverse_pixels_in_element, bool swap_bytes, bool reverse_rows) { +void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *file, int element_size, int bits_per_pixel, bool reverse_pixels_in_element, bool swap_bytes, bool reverse_rows) { uint32_t mask = (1 << common_hal_displayio_bitmap_get_bits_per_value(self)) - 1; if (self->read_only) { @@ -415,10 +415,10 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* f size_t rowsize_in_u32 = (rowsize + sizeof(uint32_t) - 1) / sizeof(uint32_t); size_t rowsize_in_u16 = (rowsize + sizeof(uint16_t) - 1) / sizeof(uint16_t); - for(int y=0; yheight; y++) { + for(int y = 0; y < self->height; y++) { uint32_t rowdata32[rowsize_in_u32]; - uint16_t *rowdata16 = (uint16_t*)rowdata32; - uint8_t *rowdata8 = (uint8_t*)rowdata32; + uint16_t *rowdata16 = (uint16_t *)rowdata32; + uint8_t *rowdata8 = (uint8_t *)rowdata32; const int y_draw = reverse_rows ? (self->height) - 1 - y : y; UINT bytes_read = 0; From c37a1f45f3f03652ec9b9e998e4c1b3a50b2303e Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Wed, 17 Mar 2021 11:00:32 -0500 Subject: [PATCH 072/261] ran pre-commit for formatting fixes --- locale/circuitpython.pot | 2 +- shared-bindings/bitmaptools/__init__.h | 2 +- shared-module/bitmaptools/__init__.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index bc084219f6..eea693dc62 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -550,6 +550,7 @@ msgstr "" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -1729,7 +1730,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" diff --git a/shared-bindings/bitmaptools/__init__.h b/shared-bindings/bitmaptools/__init__.h index a377d84000..fc1eb59068 100644 --- a/shared-bindings/bitmaptools/__init__.h +++ b/shared-bindings/bitmaptools/__init__.h @@ -51,7 +51,7 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, int16_t x1, int16_t y1, uint32_t value); -void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t* file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes, bool reverse_rows); +void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes, bool reverse_rows); void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int element_size, int x1, int y1, int x2, int y2, bool skip_specified, uint32_t skip_index); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_BITMAPTOOLS__INIT__H diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 3363f35a68..224184145c 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -415,7 +415,7 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *f size_t rowsize_in_u32 = (rowsize + sizeof(uint32_t) - 1) / sizeof(uint32_t); size_t rowsize_in_u16 = (rowsize + sizeof(uint16_t) - 1) / sizeof(uint16_t); - for(int y = 0; y < self->height; y++) { + for (int y = 0; y < self->height; y++) { uint32_t rowdata32[rowsize_in_u32]; uint16_t *rowdata16 = (uint16_t *)rowdata32; uint8_t *rowdata8 = (uint8_t *)rowdata32; From b8d4f9655f62f05e650a5baa256c8310aaa3f5dd Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Wed, 10 Mar 2021 19:58:09 +0000 Subject: [PATCH 073/261] RP2040: Only bitbang 0-byte writes The I2C.c for RP2040 included a special case for writes <=2 bytes to match the MicroPython implementation, however RP2040 does support 1 and 2 byte reads, with only 0 bytes being the exception. Signed-off-by: Philip Howard --- ports/raspberrypi/common-hal/busio/I2C.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ports/raspberrypi/common-hal/busio/I2C.c b/ports/raspberrypi/common-hal/busio/I2C.c index c9f89fadd8..0190959f87 100644 --- a/ports/raspberrypi/common-hal/busio/I2C.c +++ b/ports/raspberrypi/common-hal/busio/I2C.c @@ -98,7 +98,12 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, } #endif - // Create a bitbangio.I2C object to do short writes. + // Create a bitbangio.I2C object to do 0 byte writes. + // + // These are used to non-invasively detect I2C devices by sending + // the address and confirming an ACK. + // They are not supported by the RP2040 hardware. + // // Must be done before setting up the I2C pins, since they will be // set up as GPIO by the bitbangio.I2C object. // @@ -157,9 +162,9 @@ void common_hal_busio_i2c_unlock(busio_i2c_obj_t *self) { } uint8_t common_hal_busio_i2c_write(busio_i2c_obj_t *self, uint16_t addr, - const uint8_t *data, size_t len, bool transmit_stop_bit) { - if (len <= 2) { - // The RP2040 I2C peripheral will not do writes 2 bytes or less long. + const uint8_t *data, size_t len, bool transmit_stop_bit) { + if (len == 0) { + // The RP2040 I2C peripheral will not perform 0 byte writes. // So use bitbangio.I2C to do the write. gpio_set_function(self->scl_pin, GPIO_FUNC_SIO); From 4d89893aff7ea9e7f8bcf38ffaa53b8209668373 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Wed, 17 Mar 2021 20:13:59 +0000 Subject: [PATCH 074/261] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (977 of 977 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 7efd211757..cc17785741 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-03-16 14:54+0000\n" +"PO-Revision-Date: 2021-03-17 21:24+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -3314,7 +3314,7 @@ msgstr "argumentos inválidos" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" -msgstr "" +msgstr "bits_per_pixel %d é inválido, deve ser, 1, 4, 8, 16, 24, ou 32" #: extmod/modussl_axtls.c msgid "invalid cert" @@ -3327,12 +3327,12 @@ msgstr "Índice de dupterm inválido" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element size %d for bits_per_pixel %d\n" -msgstr "" +msgstr "tamanho do elemento %d é inválido para bits_per_pixel %d\n" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element_size %d, must be, 1, 2, or 4" -msgstr "" +msgstr "element_size %d é inválido, deve ser, 1, 2, ou 4" #: extmod/modframebuf.c msgid "invalid format" From 36aa86145857bcd88350a89db684f3dfae5d2330 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Wed, 17 Mar 2021 18:27:45 +0000 Subject: [PATCH 075/261] Translated using Weblate (Swedish) Currently translated at 100.0% (977 of 977 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index d83435c8d4..2b7ddf5ddc 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,8 +6,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-16 15:42+0000\n" -"Last-Translator: امير محمد العمري \n" +"PO-Revision-Date: 2021-03-17 21:24+0000\n" +"Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" "MIME-Version: 1.0\n" @@ -3277,7 +3277,7 @@ msgstr "ogiltiga argument" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" -msgstr "" +msgstr "ogiltig bits_per_pixel %d, måste vara 1, 4, 8, 16, 24 eller 32" #: extmod/modussl_axtls.c msgid "invalid cert" @@ -3290,12 +3290,12 @@ msgstr "ogiltigt dupterm index" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element size %d for bits_per_pixel %d\n" -msgstr "" +msgstr "ogiltig elementstorlek %d för bits_per_pixel %d\n" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element_size %d, must be, 1, 2, or 4" -msgstr "" +msgstr "ogiltig element_size %d, måste vara, 1, 2 eller 4" #: extmod/modframebuf.c msgid "invalid format" From c157ada90c3dabbb005b431f98e5c81e57e8a4bc Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 17 Mar 2021 16:11:04 -0500 Subject: [PATCH 076/261] displayio.Bitmap: Make memoryview()able --- shared-bindings/displayio/Bitmap.c | 17 ++++++++++++++++- shared-bindings/displayio/Bitmap.h | 1 + shared-module/displayio/Bitmap.c | 20 ++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c index f906be2f97..491b4e6ddf 100644 --- a/shared-bindings/displayio/Bitmap.c +++ b/shared-bindings/displayio/Bitmap.c @@ -37,7 +37,15 @@ #include "supervisor/shared/translate.h" //| class Bitmap: -//| """Stores values of a certain size in a 2D array""" +//| """Stores values of a certain size in a 2D array +//| +//| Bitmaps can be treated as read-only buffers. If the number of bits in a pixel is 8, 16, or 32; and the number of bytes +//| per row is a multiple of 4, then the resulting memoryview will correspond directly with the bitmap's contents. Otherwise, +//| the bitmap data is packed into the memoryview with unspecified padding. +//| +//| A read-only buffer can be used e.g., with `ulab.fromarray` to efficiently create an array with the same content as a Bitmap; +//| to move data efficiently from ulab back into a Bitmap, use `bitmaptools.arrayblit`. +//| """ //| //| def __init__(self, width: int, height: int, value_count: int) -> None: //| """Create a Bitmap object with the given fixed size. Each pixel stores a value that is used to @@ -300,10 +308,17 @@ STATIC const mp_rom_map_elem_t displayio_bitmap_locals_dict_table[] = { }; STATIC MP_DEFINE_CONST_DICT(displayio_bitmap_locals_dict, displayio_bitmap_locals_dict_table); +// (the get_buffer protocol returns 0 for success, 1 for failure) +STATIC mp_int_t bitmap_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) { + displayio_bitmap_t *self = MP_OBJ_TO_PTR(self_in); + return common_hal_displayio_bitmap_get_buffer(self, bufinfo, flags); +} + const mp_obj_type_t displayio_bitmap_type = { { &mp_type_type }, .name = MP_QSTR_Bitmap, .make_new = displayio_bitmap_make_new, .subscr = bitmap_subscr, .locals_dict = (mp_obj_dict_t *)&displayio_bitmap_locals_dict, + .buffer_p = { .get_buffer = bitmap_get_buffer }, }; diff --git a/shared-bindings/displayio/Bitmap.h b/shared-bindings/displayio/Bitmap.h index 1f74c31fc5..458047510a 100644 --- a/shared-bindings/displayio/Bitmap.h +++ b/shared-bindings/displayio/Bitmap.h @@ -45,5 +45,6 @@ void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16 uint32_t skip_index, bool skip_index_none); uint32_t common_hal_displayio_bitmap_get_pixel(displayio_bitmap_t *bitmap, int16_t x, int16_t y); void common_hal_displayio_bitmap_fill(displayio_bitmap_t *bitmap, uint32_t value); +int common_hal_displayio_bitmap_get_buffer(displayio_bitmap_t *self, mp_buffer_info_t *bufinfo, mp_uint_t flags); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO_BITMAP_H diff --git a/shared-module/displayio/Bitmap.c b/shared-module/displayio/Bitmap.c index f03ade84b1..5da196d9fb 100644 --- a/shared-module/displayio/Bitmap.c +++ b/shared-module/displayio/Bitmap.c @@ -271,3 +271,23 @@ void common_hal_displayio_bitmap_fill(displayio_bitmap_t *self, uint32_t value) self->data[i] = word; } } + +int common_hal_displayio_bitmap_get_buffer(displayio_bitmap_t *self, mp_buffer_info_t *bufinfo, mp_uint_t flags) { + if (flags & MP_BUFFER_WRITE) { + return 1; + } + bufinfo->len = self->stride * self->height * sizeof(size_t); + bufinfo->buf = self->data; + switch (self->bits_per_value) { + case 32: + bufinfo->typecode = 'I'; + break; + case 16: + bufinfo->typecode = 'H'; + break; + default: + bufinfo->typecode = 'B'; + break; + } + return 0; +} From 720d242b4f522b4424ab6ac6df8385c5c23eaba0 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 17 Mar 2021 16:38:10 -0500 Subject: [PATCH 077/261] doc fix --- shared-bindings/displayio/Bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c index 491b4e6ddf..ebe2946091 100644 --- a/shared-bindings/displayio/Bitmap.c +++ b/shared-bindings/displayio/Bitmap.c @@ -43,7 +43,7 @@ //| per row is a multiple of 4, then the resulting memoryview will correspond directly with the bitmap's contents. Otherwise, //| the bitmap data is packed into the memoryview with unspecified padding. //| -//| A read-only buffer can be used e.g., with `ulab.fromarray` to efficiently create an array with the same content as a Bitmap; +//| A read-only buffer can be used e.g., with `ulab.frombuffer` to efficiently create an array with the same content as a Bitmap; //| to move data efficiently from ulab back into a Bitmap, use `bitmaptools.arrayblit`. //| """ //| From 47ca7927659946115f3667a5e6f2da29abf5882e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 17 Mar 2021 20:25:22 -0500 Subject: [PATCH 078/261] arrayblit: mark bitmap area as dirty --- shared-module/bitmaptools/__init__.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 4e0d72452d..73c8e2f909 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -401,6 +401,7 @@ void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int } } } + displayio_bitmap_set_dirty_area(self, x1, y1, x2, y2); } void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *file, int element_size, int bits_per_pixel, bool reverse_pixels_in_element, bool swap_bytes) { From bd95914e887fc3d92b9ee7f7ca8fef32fe25a578 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Thu, 18 Mar 2021 10:00:01 +0530 Subject: [PATCH 079/261] implement function to check usb connection --- shared-bindings/supervisor/Runtime.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/shared-bindings/supervisor/Runtime.c b/shared-bindings/supervisor/Runtime.c index 4c004e092b..26036e0d5a 100644 --- a/shared-bindings/supervisor/Runtime.c +++ b/shared-bindings/supervisor/Runtime.c @@ -33,9 +33,12 @@ #include "shared-bindings/supervisor/RunReason.h" #include "shared-bindings/supervisor/Runtime.h" +#include "tusb.h" + STATIC supervisor_run_reason_t _run_reason; -// TODO: add USB, REPL to description once they're operational +// TODO: add REPL to description once it is operational + //| class Runtime: //| """Current status of runtime objects. //| @@ -52,6 +55,21 @@ STATIC supervisor_run_reason_t _run_reason; //| ... //| +//| usb_connected: bool +//| """Returns the USB enumeration status (read-only).""" +//| +STATIC mp_obj_t supervisor_runtime_get_usb_connected(mp_obj_t self) { + return mp_obj_new_bool(tud_ready()); +} +MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_usb_connected_obj, supervisor_runtime_get_usb_connected); + +const mp_obj_property_t supervisor_runtime_usb_connected_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&supervisor_runtime_get_usb_connected_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj}, +}; + //| serial_connected: bool //| """Returns the USB serial communication status (read-only).""" //| @@ -104,6 +122,7 @@ void supervisor_set_run_reason(supervisor_run_reason_t run_reason) { } STATIC const mp_rom_map_elem_t supervisor_runtime_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_usb_connected), MP_ROM_PTR(&supervisor_runtime_usb_connected_obj) }, { MP_ROM_QSTR(MP_QSTR_serial_connected), MP_ROM_PTR(&supervisor_runtime_serial_connected_obj) }, { MP_ROM_QSTR(MP_QSTR_serial_bytes_available), MP_ROM_PTR(&supervisor_runtime_serial_bytes_available_obj) }, { MP_ROM_QSTR(MP_QSTR_run_reason), MP_ROM_PTR(&supervisor_runtime_run_reason_obj) }, From f40c0c13adacf39bc9a21afd2d9ebbf29135e0f0 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 18 Mar 2021 09:04:53 -0500 Subject: [PATCH 080/261] displayio: area: add displayo_area_copy_coords, displayio_area_empty .. and simplify the implmentation of displayio_area_union This _slightly_ changes the behavior of displayio_area_union: Formerly, if one of the areas was empty, its coordinates were still used in the min/max calculations. Now, if one of the areas is empty, the result gets the other area's coords In particular, taking the union of the empty area with coords (0,0,0,0) with the non-empty area (x1,y1,x2,y2) would give the area (0,0,x2,y2) before, and (x1,y1,x2,y2) after the change. --- shared-module/displayio/__init__.c | 35 ++++++++++++++++++------------ shared-module/displayio/area.h | 2 ++ 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index 3c9c2cc3ac..07fd603861 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -309,26 +309,33 @@ bool displayio_area_compute_overlap(const displayio_area_t *a, return true; } +void displayio_copy_coords(const displayio_area_t *src, displayio_area_t *dest) { + dest->x1 = src->x1; + dest->y1 = src->y1; + dest->x2 = src->x2; + dest->y2 = src->y2; +} + +bool displayio_area_empty(const displayio_area_t *a) { + return (a->x1 == a->x2) || (a->y1 == a->y2); +} + void displayio_area_union(const displayio_area_t *a, const displayio_area_t *b, displayio_area_t *u) { - u->x1 = a->x1; - if (b->x1 < u->x1) { - u->x1 = b->x1; - } - u->x2 = a->x2; - if (b->x2 > u->x2) { - u->x2 = b->x2; - } - u->y1 = a->y1; - if (b->y1 < u->y1) { - u->y1 = b->y1; + if (displayio_area_empty(a)) { + displayio_copy_coords(b, u); + return; } - u->y2 = a->y2; - if (b->y2 > u->y2) { - u->y2 = b->y2; + if (displayio_area_empty(b)) { + displayio_copy_coords(a, u); + return; } + u->x1 = MIN(a->x1, b->x1); + u->y1 = MIN(a->y1, b->y1); + u->x2 = MAX(a->x2, b->x2); + u->y2 = MAX(a->y2, b->y2); } uint16_t displayio_area_width(const displayio_area_t *area) { diff --git a/shared-module/displayio/area.h b/shared-module/displayio/area.h index 21bf2f8b25..1b30ce96fe 100644 --- a/shared-module/displayio/area.h +++ b/shared-module/displayio/area.h @@ -53,6 +53,8 @@ typedef struct { extern displayio_buffer_transform_t null_transform; +bool displayio_area_empty(const displayio_area_t *a); +void displayio_area_copy_coords(const displayio_area_t *src, displayio_area_t *dest); void displayio_area_union(const displayio_area_t *a, const displayio_area_t *b, displayio_area_t *u); From 3b506f0fa59872916b617083a3dad9cadd07c428 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 18 Mar 2021 09:06:00 -0500 Subject: [PATCH 081/261] displayio: area: add displayio_area_canon This routine will be used to simplify code that deals with ranges of bitmap coordinates. --- shared-module/displayio/__init__.c | 13 +++++++++++++ shared-module/displayio/area.h | 1 + 2 files changed, 14 insertions(+) diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index 07fd603861..18d08c530e 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -320,6 +320,19 @@ bool displayio_area_empty(const displayio_area_t *a) { return (a->x1 == a->x2) || (a->y1 == a->y2); } +void displayio_area_canon(displayio_area_t *a) { + if (a->x1 < a->x2) { + int16_t t = a->x1; + a->x1 = a->x2; + a->x2 = t; + } + if (a->y1 < a->y2) { + int16_t t = a->y1; + a->y1 = a->y2; + a->y2 = t; + } +} + void displayio_area_union(const displayio_area_t *a, const displayio_area_t *b, displayio_area_t *u) { diff --git a/shared-module/displayio/area.h b/shared-module/displayio/area.h index 1b30ce96fe..b6ff1dcd29 100644 --- a/shared-module/displayio/area.h +++ b/shared-module/displayio/area.h @@ -55,6 +55,7 @@ extern displayio_buffer_transform_t null_transform; bool displayio_area_empty(const displayio_area_t *a); void displayio_area_copy_coords(const displayio_area_t *src, displayio_area_t *dest); +void displayio_area_canon(displayio_area_t *a); void displayio_area_union(const displayio_area_t *a, const displayio_area_t *b, displayio_area_t *u); From 36d608aa67229653c0be12fab407533d0d8b7d32 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 18 Mar 2021 09:09:29 -0500 Subject: [PATCH 082/261] displayio_bitmap_set_dirty_area: rewrite in terms of displayio_area .. simplifying code in the process. For instance, now fill_region uses area routines to order and constrain its coordinates. Happily, this change also frees a modest amount of code space. --- shared-module/bitmaptools/__init__.c | 42 +++++++++---------------- shared-module/displayio/Bitmap.c | 47 ++++++---------------------- shared-module/displayio/Bitmap.h | 2 +- 3 files changed, 26 insertions(+), 65 deletions(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 73c8e2f909..604c1a16a1 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -240,30 +240,18 @@ void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, mp_raise_RuntimeError(translate("Read-only object")); } - // Ensure x1 < x2 and y1 < y2 - if (x1 > x2) { - int16_t temp = x2; - x2 = x1; - x1 = temp; - } - if (y1 > y2) { - int16_t temp = y2; - y2 = y1; - y1 = temp; - } + displayio_area_t area = { x1, y1, x2, y2 }; + displayio_area_canon(&area); - // constrain to bitmap dimensions - x1 = constrain(x1, 0, destination->width); - x2 = constrain(x2, 0, destination->width); - y1 = constrain(y1, 0, destination->height); - y2 = constrain(y2, 0, destination->height); + displayio_area_t bitmap_area = { 0, 0, destination->width, destination->height }; + displayio_area_compute_overlap(&area, &bitmap_area, &area); // update the dirty rectangle - displayio_bitmap_set_dirty_area(destination, x1, y1, x2, y2); + displayio_bitmap_set_dirty_area(destination, &area); int16_t x, y; - for (x = x1; x < x2; x++) { - for (y = y1; y < y2; y++) { + for (x = area.x1; x < area.x2; x++) { + for (y = area.y1; y < area.y2; y++) { displayio_bitmap_write_pixel(destination, x, y, value); } } @@ -298,13 +286,11 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, ybb0 = y1; ybb1 = y0 + 1; } + displayio_area_t area = { xbb0, ybb0, xbb1, ybb1 }; + displayio_area_t bitmap_area = { 0, 0, destination->width, destination->height }; + displayio_area_compute_overlap(&area, &bitmap_area, &area); - xbb0 = constrain(xbb0, 0, destination->width); - xbb1 = constrain(xbb1, 0, destination->width); - ybb0 = constrain(ybb0, 0, destination->height); - ybb1 = constrain(ybb1, 0, destination->height); - - displayio_bitmap_set_dirty_area(destination, xbb0, ybb0, xbb1, ybb1); + displayio_bitmap_set_dirty_area(destination, &area); int16_t temp, x, y; @@ -401,7 +387,8 @@ void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int } } } - displayio_bitmap_set_dirty_area(self, x1, y1, x2, y2); + displayio_area_t area = { x1, y1, x2, y2 }; + displayio_bitmap_set_dirty_area(self, &area); } void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *file, int element_size, int bits_per_pixel, bool reverse_pixels_in_element, bool swap_bytes) { @@ -486,5 +473,6 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *f } } - displayio_bitmap_set_dirty_area(self, 0, 0, self->width, self->height); + displayio_area_t a = {0, 0, self->width, self->height}; + displayio_bitmap_set_dirty_area(self, &a); } diff --git a/shared-module/displayio/Bitmap.c b/shared-module/displayio/Bitmap.c index f03ade84b1..d93338dc43 100644 --- a/shared-module/displayio/Bitmap.c +++ b/shared-module/displayio/Bitmap.c @@ -105,41 +105,12 @@ uint32_t common_hal_displayio_bitmap_get_pixel(displayio_bitmap_t *self, int16_t return 0; } -void displayio_bitmap_set_dirty_area(displayio_bitmap_t *self, int16_t x1, int16_t y1, int16_t x2, int16_t y2) { - // Update the bitmap's dirty region with the rectangle bounded by (x1,y1) and (x2, y2) - - // Arrange x1 < x2, y1 < y2 - if (x1 > x2) { - int16_t temp = x1; - x1 = x2; - x2 = temp; - } - if (y1 > y2) { - int16_t temp = y1; - y1 = y2; - y2 = temp; - } - - // Update the dirty area. - if (self->dirty_area.x1 == self->dirty_area.x2) { - self->dirty_area.x1 = x1; - self->dirty_area.x2 = x2; - self->dirty_area.y1 = y1; - self->dirty_area.y2 = y2; - } else { - if (x1 < self->dirty_area.x1) { - self->dirty_area.x1 = x1; - } - if (x2 > self->dirty_area.x2) { - self->dirty_area.x2 = x2; - } - if (y1 < self->dirty_area.y1) { - self->dirty_area.y1 = y1; - } - if (y2 > self->dirty_area.y2) { - self->dirty_area.y2 = y2; - } - } +void displayio_bitmap_set_dirty_area(displayio_bitmap_t *self, const displayio_area_t *dirty_area) { + displayio_area_t area = *dirty_area; + displayio_area_canon(&area); + displayio_area_union(&area, &self->dirty_area, &area); + displayio_area_t bitmap_area = {0, 0, self->width, self->height}; + displayio_area_compute_overlap(&area, &bitmap_area, &self->dirty_area); } void displayio_bitmap_write_pixel(displayio_bitmap_t *self, int16_t x, int16_t y, uint32_t value) { @@ -189,7 +160,8 @@ void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16 dirty_y_max = self->height; } - displayio_bitmap_set_dirty_area(self, x, y, dirty_x_max, dirty_y_max); + displayio_area_t a = { x, y, dirty_x_max, dirty_y_max}; + displayio_bitmap_set_dirty_area(self, &a); bool x_reverse = false; bool y_reverse = false; @@ -231,7 +203,8 @@ void common_hal_displayio_bitmap_set_pixel(displayio_bitmap_t *self, int16_t x, } // update the dirty region - displayio_bitmap_set_dirty_area(self, x, y, x + 1, y + 1); + displayio_area_t a = {x, y, x + 1, y + 1}; + displayio_bitmap_set_dirty_area(self, &a); // write the pixel displayio_bitmap_write_pixel(self, x, y, value); diff --git a/shared-module/displayio/Bitmap.h b/shared-module/displayio/Bitmap.h index c1ce9612b1..82a3de631a 100644 --- a/shared-module/displayio/Bitmap.h +++ b/shared-module/displayio/Bitmap.h @@ -49,7 +49,7 @@ typedef struct { void displayio_bitmap_finish_refresh(displayio_bitmap_t *self); displayio_area_t *displayio_bitmap_get_refresh_areas(displayio_bitmap_t *self, displayio_area_t *tail); -void displayio_bitmap_set_dirty_area(displayio_bitmap_t *self, int16_t x1, int16_t y1, int16_t x2, int16_t y2); +void displayio_bitmap_set_dirty_area(displayio_bitmap_t *self, const displayio_area_t *area); void displayio_bitmap_write_pixel(displayio_bitmap_t *self, int16_t x, int16_t y, uint32_t value); #endif // MICROPY_INCLUDED_SHARED_MODULE_DISPLAYIO_BITMAP_H From f5fd42c39340483bc781746fd0acd304abd888ae Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 18 Mar 2021 09:20:21 -0500 Subject: [PATCH 083/261] displayio: Move bitmap read-only checking to displayio_bitmap_set_dirty_area This is a modest code savings, but more importantly it reduces boilerplate in bitmap-modifying routines. Callers need only ensure they call displayio_bitmap_set_dirty_area in advance of the bitmap modifications they perform. (note that this assumes that no bitmap operation can enter background tasks. If an operation COULD enter background tasks, it MUST re-dirty the area it touches when it exits, simply by a fresh call to set_dirty_area with the same area as before) --- shared-module/bitmaptools/__init__.c | 23 +++++------------------ shared-module/displayio/Bitmap.c | 22 ++++++---------------- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 604c1a16a1..1c7f36ca2e 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -95,10 +95,6 @@ void common_hal_bitmaptools_rotozoom(displayio_bitmap_t *self, int16_t ox, int16 // # */ - if (self->read_only) { - mp_raise_RuntimeError(translate("Read-only object")); - } - int16_t x,y; int16_t minx = dest_clip1_x; @@ -199,6 +195,9 @@ void common_hal_bitmaptools_rotozoom(displayio_bitmap_t *self, int16_t ox, int16 float rowu = startu + miny * duCol; float rowv = startv + miny * dvCol; + displayio_area_t dirty_area = {minx, miny, maxx, maxy}; + displayio_bitmap_set_dirty_area(self, &dirty_area); + for (y = miny; y <= maxy; y++) { float u = rowu + minx * duRow; float v = rowv + minx * dvRow; @@ -236,10 +235,6 @@ void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, // // input checks should ensure that x1 < x2 and y1 < y2 and are within the bitmap region - if (destination->read_only) { - mp_raise_RuntimeError(translate("Read-only object")); - } - displayio_area_t area = { x1, y1, x2, y2 }; displayio_area_canon(&area); @@ -262,10 +257,6 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, int16_t x1, int16_t y1, uint32_t value) { - if (destination->read_only) { - mp_raise_RuntimeError(translate("Read-only object")); - } - // // adapted from Adafruit_CircuitPython_Display_Shapes.Polygon._line // @@ -394,9 +385,8 @@ void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *file, int element_size, int bits_per_pixel, bool reverse_pixels_in_element, bool swap_bytes) { uint32_t mask = (1 << common_hal_displayio_bitmap_get_bits_per_value(self)) - 1; - if (self->read_only) { - mp_raise_RuntimeError(translate("Read-only object")); - } + displayio_area_t a = {0, 0, self->width, self->height}; + displayio_bitmap_set_dirty_area(self, &a); size_t elements_per_row = (self->width * bits_per_pixel + element_size * 8 - 1) / (element_size * 8); size_t rowsize = element_size * elements_per_row; @@ -472,7 +462,4 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *f displayio_bitmap_write_pixel(self, x, y, value & mask); } } - - displayio_area_t a = {0, 0, self->width, self->height}; - displayio_bitmap_set_dirty_area(self, &a); } diff --git a/shared-module/displayio/Bitmap.c b/shared-module/displayio/Bitmap.c index d93338dc43..7b916bb36d 100644 --- a/shared-module/displayio/Bitmap.c +++ b/shared-module/displayio/Bitmap.c @@ -106,6 +106,10 @@ uint32_t common_hal_displayio_bitmap_get_pixel(displayio_bitmap_t *self, int16_t } void displayio_bitmap_set_dirty_area(displayio_bitmap_t *self, const displayio_area_t *dirty_area) { + if (self->read_only) { + mp_raise_RuntimeError(translate("Read-only object")); + } + displayio_area_t area = *dirty_area; displayio_area_canon(&area); displayio_area_union(&area, &self->dirty_area, &area); @@ -146,10 +150,6 @@ void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16 // If skip_value is `None`, then all pixels are copied. // This function assumes input checks were performed for pixel index entries. - if (self->read_only) { - mp_raise_RuntimeError(translate("Read-only object")); - } - // Update the dirty area int16_t dirty_x_max = (x + (x2 - x1)); if (dirty_x_max > self->width) { @@ -198,10 +198,6 @@ void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16 } void common_hal_displayio_bitmap_set_pixel(displayio_bitmap_t *self, int16_t x, int16_t y, uint32_t value) { - if (self->read_only) { - mp_raise_RuntimeError(translate("Read-only object")); - } - // update the dirty region displayio_area_t a = {x, y, x + 1, y + 1}; displayio_bitmap_set_dirty_area(self, &a); @@ -225,14 +221,8 @@ void displayio_bitmap_finish_refresh(displayio_bitmap_t *self) { } void common_hal_displayio_bitmap_fill(displayio_bitmap_t *self, uint32_t value) { - if (self->read_only) { - mp_raise_RuntimeError(translate("Read-only object")); - } - // Update the dirty area. - self->dirty_area.x1 = 0; - self->dirty_area.x2 = self->width; - self->dirty_area.y1 = 0; - self->dirty_area.y2 = self->height; + displayio_area_t a = {0, 0, self->width, self->height}; + displayio_bitmap_set_dirty_area(self, &a); // build the packed word uint32_t word = 0; From 74243fd71af80e69c5f8fd1371fe6291e1f587a5 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 18 Mar 2021 16:47:16 -0500 Subject: [PATCH 084/261] metro_m7: Update board name, flash chip size --- ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.mk b/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.mk index 1a3f7e766c..2655217c78 100644 --- a/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.mk +++ b/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.mk @@ -1,11 +1,11 @@ USB_VID = 0x239A USB_PID = 0x80E2 -USB_PRODUCT = "Metro M7 1011" +USB_PRODUCT = "Metro M7 iMX RT1011" USB_MANUFACTURER = "Adafruit" CHIP_VARIANT = MIMXRT1011DAE5A CHIP_FAMILY = MIMXRT1011 -FLASH = W25Q16JV +FLASH = W25Q32JV # Include these Python libraries in the firmware FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ESP32SPI From 0ba0fae4951428eb2abc3dbbb027b2f140d34302 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 18 Mar 2021 16:51:47 -0500 Subject: [PATCH 085/261] mimxrt: Enable USB Midi Closes #2473 --- ports/mimxrt10xx/mpconfigport.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mimxrt10xx/mpconfigport.mk b/ports/mimxrt10xx/mpconfigport.mk index de594b14be..89c6d8c941 100644 --- a/ports/mimxrt10xx/mpconfigport.mk +++ b/ports/mimxrt10xx/mpconfigport.mk @@ -29,5 +29,5 @@ CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NVM = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_COUNTIO = 0 -CIRCUITPY_USB_MIDI = 0 +CIRCUITPY_USB_MIDI = 1 LONGINT_IMPL = MPZ From 0b22a9397a853ae985925664efbbae3c95088ee8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 18 Mar 2021 16:52:07 -0500 Subject: [PATCH 086/261] mimxrt: Quiet some warnings down in the sdk Closes #2487 --- ports/mimxrt10xx/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/mimxrt10xx/Makefile b/ports/mimxrt10xx/Makefile index 04949bf01c..33507086ea 100644 --- a/ports/mimxrt10xx/Makefile +++ b/ports/mimxrt10xx/Makefile @@ -146,6 +146,7 @@ SRC_SDK := \ system_$(CHIP_FAMILY).c \ SRC_SDK := $(addprefix sdk/devices/$(CHIP_FAMILY)/, $(SRC_SDK)) +$(addprefix $(BUILD)/, $(SRC_SDK:.c=.o)): CFLAGS += -Wno-undef SRC_C += \ background.c \ From 768c9db0589c24c6f97268289a759cc74af9190d Mon Sep 17 00:00:00 2001 From: Jose David M Date: Thu, 18 Mar 2021 23:40:45 +0000 Subject: [PATCH 087/261] Translated using Weblate (Spanish) Currently translated at 99.7% (975 of 977 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/es.po b/locale/es.po index 9150440f34..fdf4c8160d 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-12 02:03+0000\n" -"Last-Translator: Alvaro Figueroa \n" +"PO-Revision-Date: 2021-03-18 23:41+0000\n" +"Last-Translator: Jose David M \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" @@ -2942,7 +2942,7 @@ msgstr "Orden de diferenciación fuera de rango" #: extmod/ulab/code/linalg/linalg.c msgid "dimensions do not match" -msgstr "" +msgstr "las dimensiones no concuerdan" #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c @@ -3305,7 +3305,7 @@ msgstr "argumentos inválidos" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" -msgstr "" +msgstr "los bits_per_pixel %d no son validos, deben ser 1, 4, 8, 16, 24 o 32" #: extmod/modussl_axtls.c msgid "invalid cert" From 0d52725b3636253aa415c35f916f52ab70cbea62 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Fri, 19 Mar 2021 00:41:42 +0100 Subject: [PATCH 088/261] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 2 +- locale/cs.po | 2 +- locale/de_DE.po | 2 +- locale/el.po | 2 +- locale/en_GB.po | 2 +- locale/es.po | 2 +- locale/fil.po | 2 +- locale/fr.po | 2 +- locale/hi.po | 2 +- locale/it_IT.po | 2 +- locale/ja.po | 2 +- locale/ko.po | 2 +- locale/nl.po | 2 +- locale/pl.po | 2 +- locale/pt_BR.po | 2 +- locale/sv.po | 2 +- locale/zh_Latn_pinyin.po | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index d40a485f27..a2af79e7c2 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -557,6 +557,7 @@ msgstr "Buffer terlalu pendek untuk %d byte" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Pin bus %d sudah digunakan" @@ -1758,7 +1759,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "ParallelBus belum didukung" diff --git a/locale/cs.po b/locale/cs.po index 8f89ec9ede..43af808ac4 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -553,6 +553,7 @@ msgstr "" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -1732,7 +1733,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 9218f9ff61..894c308033 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -563,6 +563,7 @@ msgstr "Puffer um %d Bytes zu kurz" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Bus pin %d wird schon benutzt" @@ -1762,7 +1763,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "ParallelBus wird noch nicht unterstützt" diff --git a/locale/el.po b/locale/el.po index 3a324c1b53..5bba4f38ed 100644 --- a/locale/el.po +++ b/locale/el.po @@ -550,6 +550,7 @@ msgstr "" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -1729,7 +1730,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 88ee7dc608..8db1bf6792 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -549,6 +549,7 @@ msgstr "" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -1728,7 +1729,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" diff --git a/locale/es.po b/locale/es.po index fdf4c8160d..510a644315 100644 --- a/locale/es.po +++ b/locale/es.po @@ -568,6 +568,7 @@ msgstr "Búffer muy corto por %d bytes" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Bus pin %d ya está siendo utilizado" @@ -1777,7 +1778,6 @@ msgid "PWM slice channel A already in use" msgstr "Segmento del PWM canal A ya esta en uso" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "ParallelBus todavía no soportado" diff --git a/locale/fil.po b/locale/fil.po index 2c2a118790..67cdf90d04 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -555,6 +555,7 @@ msgstr "" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, fuzzy, c-format msgid "Bus pin %d is already in use" msgstr "Ginagamit na ang DAC" @@ -1748,7 +1749,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index a6b66ece5b..a5d6927b36 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -567,6 +567,7 @@ msgstr "Tampon trop court de %d octets" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "La broche %d du bus est déjà utilisée" @@ -1784,7 +1785,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "ParallelBus pas encore supporté" diff --git a/locale/hi.po b/locale/hi.po index d2de579a58..822d42348f 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -550,6 +550,7 @@ msgstr "" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -1729,7 +1730,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 16f89c2b9b..87717adf4c 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -565,6 +565,7 @@ msgstr "Buffer troppo piccolo di %d bytes" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Bus pin %d è già in uso" @@ -1766,7 +1767,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index f95b4e0dd8..5eafbc3d54 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -557,6 +557,7 @@ msgstr "バッファが %d バイト足りません" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Busピン%dはすでに使用中" @@ -1745,7 +1746,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "ParallelBusにはまだ対応していません" diff --git a/locale/ko.po b/locale/ko.po index 354881acd9..5e03f8467c 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -553,6 +553,7 @@ msgstr "" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -1732,7 +1733,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 4547438fbe..7f04122108 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -555,6 +555,7 @@ msgstr "Buffer is %d bytes te klein" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Bus pin %d al in gebruik" @@ -1752,7 +1753,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "ParallelBus nog niet ondersteund" diff --git a/locale/pl.po b/locale/pl.po index 9b32eb7944..7011f75924 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -557,6 +557,7 @@ msgstr "Bufor za krótki o %d bajtów" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Nóżka magistrali %d jest w użyciu" @@ -1743,7 +1744,6 @@ msgid "PWM slice channel A already in use" msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "ParallelBus nie jest jeszcze obsługiwany" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index cc17785741..8476d9812e 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -569,6 +569,7 @@ msgstr "O buffer é muito curto em %d bytes" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "O pino bus %d já está em uso" @@ -1778,7 +1779,6 @@ msgid "PWM slice channel A already in use" msgstr "O canal A da fatia do PWM já está em uso" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "O ParallelBus ainda não é compatível" diff --git a/locale/sv.po b/locale/sv.po index 2b7ddf5ddc..28b89da2be 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -560,6 +560,7 @@ msgstr "Buffert är %d bytes för kort" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Busspinne %d används redan" @@ -1758,7 +1759,6 @@ msgid "PWM slice channel A already in use" msgstr "PWM-segmentkanal A används redan" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "ParallelBus stöds ännu inte" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 6a44136f30..8eb8435f2e 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -562,6 +562,7 @@ msgstr "Huǎn chōng qū tài duǎn , àn %d zì jié" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Zǒngxiàn yǐn jiǎo %d yǐ zài shǐyòng zhōng" @@ -1759,7 +1760,6 @@ msgid "PWM slice channel A already in use" msgstr "PWM qiē piàn tōng dào A yǐ zài shǐ yòng zhōng" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" msgstr "Shàng bù zhīchí ParallelBus" From 5d2b60cbf69c99abd6984c298d4f052514221177 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 4 Mar 2021 13:12:24 -0800 Subject: [PATCH 089/261] Redo RP2040 flash settings This switches stage2 to C and uses Jinja to change the C code based on flash settings from https://github.com/adafruit/nvm.toml. It produces the fastest settings for the given set of external flashes. Flash size is no longer hard coded so switching flashes with similar capabilities but different sizes should *just work*. This PR also places "ITCM" code in RAM to save the XIP cache for code execution. Further optimization is possible. A blink code.py still requires a number of flash fetches every blink. Fixes #4041 --- .gitmodules | 6 +- data/nvm.toml | 1 + ports/raspberrypi/Makefile | 16 +- .../adafruit_feather_rp2040/mpconfigboard.h | 3 - .../adafruit_feather_rp2040/mpconfigboard.mk | 2 +- .../pimoroni_keybow2040/mpconfigboard.h | 2 - .../pimoroni_keybow2040/mpconfigboard.mk | 2 +- .../pimoroni_picosystem/mpconfigboard.h | 2 - .../pimoroni_picosystem/mpconfigboard.mk | 2 +- .../boards/pimoroni_tiny2040/mpconfigboard.h | 2 - .../boards/pimoroni_tiny2040/mpconfigboard.mk | 2 +- .../boards/qtpy_rp2040/mpconfigboard.h | 3 - .../boards/qtpy_rp2040/mpconfigboard.mk | 2 +- .../boards/raspberry_pi_pico/mpconfigboard.h | 16 -- .../boards/raspberry_pi_pico/mpconfigboard.mk | 4 +- .../sparkfun_pro_micro_rp2040/mpconfigboard.h | 3 - .../mpconfigboard.mk | 2 +- .../mpconfigboard.h | 3 - .../mpconfigboard.mk | 2 +- ports/raspberrypi/boot_stage2.ld | 13 ++ ports/raspberrypi/gen_stage2.py | 82 ++++++++ ports/raspberrypi/link.ld | 34 +++ ports/raspberrypi/mpconfigport.mk | 2 + ports/raspberrypi/sdk | 2 +- ports/raspberrypi/stage2.c.jinja | 197 ++++++++++++++++++ ports/raspberrypi/supervisor/internal_flash.c | 15 +- ports/raspberrypi/supervisor/port.c | 32 +++ supervisor/flash.h | 6 +- supervisor/linker.h | 2 +- supervisor/shared/memory.c | 2 +- supervisor/supervisor.mk | 14 +- 31 files changed, 411 insertions(+), 65 deletions(-) create mode 160000 data/nvm.toml create mode 100644 ports/raspberrypi/boot_stage2.ld create mode 100644 ports/raspberrypi/gen_stage2.py create mode 100644 ports/raspberrypi/stage2.c.jinja diff --git a/.gitmodules b/.gitmodules index 99de2c9186..52abb02a99 100644 --- a/.gitmodules +++ b/.gitmodules @@ -173,4 +173,8 @@ url = https://github.com/adafruit/Adafruit_CircuitPython_LC709203F [submodule "ports/raspberrypi/sdk"] path = ports/raspberrypi/sdk - url = https://github.com/raspberrypi/pico-sdk.git + url = https://github.com/adafruit/pico-sdk.git +[submodule "data/nvm.toml"] + path = data/nvm.toml + url = https://github.com/adafruit/nvm.toml.git + branch = main diff --git a/data/nvm.toml b/data/nvm.toml new file mode 160000 index 0000000000..da5054787d --- /dev/null +++ b/data/nvm.toml @@ -0,0 +1 @@ +Subproject commit da5054787d5a428823b5bd032e810edf8105fc02 diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 2c1a13a8b2..bae5ced98b 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -106,7 +106,7 @@ INC += -I. \ -I$(BUILD) # Pico specific configuration -CFLAGS += -DPICO_ON_DEVICE=1 -DPICO_NO_BINARY_INFO=0 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1 -DPICO_DIVIDER_CALL_IDIV0=0 -DPICO_DIVIDER_CALL_LDIV0=0 -DPICO_DIVIDER_HARDWARE=1 -DPICO_DOUBLE_ROM=1 -DPICO_FLOAT_ROM=1 -DPICO_MULTICORE=1 -DPICO_BITS_IN_RAM=0 -DPICO_DIVIDER_IN_RAM=0 -DPICO_DOUBLE_PROPAGATE_NANS=0 -DPICO_DOUBLE_IN_RAM=0 -DPICO_MEM_IN_RAM=0 -DPICO_FLOAT_IN_RAM=0 -DPICO_FLOAT_PROPAGATE_NANS=1 -DPICO_NO_FLASH=0 -DPICO_COPY_TO_RAM=0 -DPICO_DISABLE_SHARED_IRQ_HANDLERS=0 -DPICO_NO_BI_BOOTSEL_VIA_DOUBLE_RESET=0 +CFLAGS += -DRASPBERRYPI -DPICO_ON_DEVICE=1 -DPICO_NO_BINARY_INFO=0 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1 -DPICO_DIVIDER_CALL_IDIV0=0 -DPICO_DIVIDER_CALL_LDIV0=0 -DPICO_DIVIDER_HARDWARE=1 -DPICO_DOUBLE_ROM=1 -DPICO_FLOAT_ROM=1 -DPICO_MULTICORE=1 -DPICO_BITS_IN_RAM=0 -DPICO_DIVIDER_IN_RAM=0 -DPICO_DOUBLE_PROPAGATE_NANS=0 -DPICO_DOUBLE_IN_RAM=0 -DPICO_MEM_IN_RAM=0 -DPICO_FLOAT_IN_RAM=0 -DPICO_FLOAT_PROPAGATE_NANS=1 -DPICO_NO_FLASH=0 -DPICO_COPY_TO_RAM=0 -DPICO_DISABLE_SHARED_IRQ_HANDLERS=0 -DPICO_NO_BI_BOOTSEL_VIA_DOUBLE_RESET=0 OPTIMIZATION_FLAGS ?= -O3 # TinyUSB defines CFLAGS += -DTUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024 @@ -169,7 +169,7 @@ SRC_SDK := \ src/rp2_common/hardware_irq/irq.c \ src/rp2_common/hardware_pio/pio.c \ src/rp2_common/hardware_pll/pll.c \ - src/rp2_common/hardware_rtc/rtc.c \ + src/rp2_common/hardware_rtc/rtc.c \ src/rp2_common/hardware_spi/spi.c \ src/rp2_common/hardware_sync/sync.c \ src/rp2_common/hardware_timer/timer.c \ @@ -270,9 +270,15 @@ $(BUILD)/boot2.bin: $(BUILD)/boot2.elf $(STEPECHO) "OBJCOPY $<" $(Q)$(OBJCOPY) -O binary $< $@ -$(BUILD)/boot2.elf: $(BOOT2_S_UPPER) | $(BUILD)/ + +$(BUILD)/stage2.c: stage2.c.jinja gen_stage2.py | $(BUILD)/ + $(STEPECHO) "GEN $<" + $(Q)$(PYTHON3) gen_stage2.py $< $@ $(EXTERNAL_FLASH_DEVICES) + +$(BUILD)/boot2.elf: $(BUILD)/stage2.c $(STEPECHO) "BOOT $<" - $(Q)$(CC) $(CFLAGS) $(BOOT2_S_CFLAGS) -Isdk/src/rp2_common/boot_stage2/asminclude --specs=nosys.specs -nostartfiles -Wl,-T,sdk/src/rp2_common/boot_stage2/boot_stage2.ld -o $@ $< + $(Q)$(CC) $(CFLAGS) $(BOOT2_S_CFLAGS) -Os -ggdb3 -I. -fPIC --specs=nosys.specs -nostartfiles -Wl,-T,boot_stage2.ld -Wl,-Map=$@.map -o $@ $< + $(Q)$(SIZE) $@ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) @@ -285,7 +291,7 @@ $(BUILD)/firmware.elf: $(OBJ) link.ld $(BUILD)/firmware.bin: $(BUILD)/firmware.elf $(STEPECHO) "Create $@" - $(Q)$(OBJCOPY) -O binary $^ $@ + $(Q)$(OBJCOPY) -O binary -R .dtcm_bss $^ $@ $(BUILD)/firmware.uf2: $(BUILD)/firmware.bin $(STEPECHO) "Create $@" diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.h index a594e6a55e..fba7dc3b19 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.h @@ -12,6 +12,3 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) - -// Flash chip is GD25Q64 connected over QSPI -#define TOTAL_FLASH_SIZE (8 * 1024 * 1024) diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk index f4106b94a2..84c4adabb7 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -INTERNAL_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "GD25Q64C" diff --git a/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.h index 234be27c2c..ecc127db68 100644 --- a/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.h @@ -28,8 +28,6 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) -#define TOTAL_FLASH_SIZE (2 * 1024 * 1024) - // These pins are unconnected #define IGNORE_PIN_GPIO2 1 #define IGNORE_PIN_GPIO22 1 diff --git a/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.mk index cf74294315..97ce534cbe 100644 --- a/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.mk @@ -6,6 +6,6 @@ USB_MANUFACTURER = "Pimoroni" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -INTERNAL_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.h index a1395f17d8..8a61d6a76d 100644 --- a/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.h @@ -38,8 +38,6 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) -#define TOTAL_FLASH_SIZE (16 * 1024 * 1024) - // These pins are unconnected #define IGNORE_PIN_GPIO3 1 #define IGNORE_PIN_GPIO10 1 diff --git a/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk index c9d22549ba..ec71b4c895 100644 --- a/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk @@ -6,6 +6,6 @@ USB_MANUFACTURER = "Pimoroni" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -INTERNAL_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "W25Q128JV_IQ" CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h index 965dd0e042..8f188959cb 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h @@ -7,8 +7,6 @@ #define MICROPY_HW_USER_SW (&pin_GPIO23) -#define TOTAL_FLASH_SIZE (8 * 1024 * 1024) - // These pins are unconnected #define IGNORE_PIN_GPIO8 1 #define IGNORE_PIN_GPIO9 1 diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk index 75fe36a29d..ffb8dce40a 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk @@ -6,6 +6,6 @@ USB_MANUFACTURER = "Pimoroni" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -INTERNAL_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h index f5734b5131..26abe8a835 100644 --- a/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h @@ -12,6 +12,3 @@ // #define DEFAULT_UART_BUS_RX (&pin_PA11) // #define DEFAULT_UART_BUS_TX (&pin_PA10) - -// Flash chip is GD25Q64 connected over QSPI -#define TOTAL_FLASH_SIZE (8 * 1024 * 1024) diff --git a/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.mk index 5e454e312e..a041d30e7e 100644 --- a/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -INTERNAL_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ" diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h index a506fec49e..efb2fc3402 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h +++ b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h @@ -1,18 +1,2 @@ -// LEDs -// #define MICROPY_HW_LED_STATUS (&pin_PA17) - #define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico" #define MICROPY_HW_MCU_NAME "rp2040" - -// #define DEFAULT_I2C_BUS_SCL (&pin_PA23) -// #define DEFAULT_I2C_BUS_SDA (&pin_PA22) - -// #define DEFAULT_SPI_BUS_SCK (&pin_PB11) -// #define DEFAULT_SPI_BUS_MOSI (&pin_PB10) -// #define DEFAULT_SPI_BUS_MISO (&pin_PA12) - -// #define DEFAULT_UART_BUS_RX (&pin_PA11) -// #define DEFAULT_UART_BUS_TX (&pin_PA10) - -// Flash chip is W25Q16JVUXIQ connected over QSPI -#define TOTAL_FLASH_SIZE (2 * 1024 * 1024) diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk index 8d6ca53305..cce83ba153 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk +++ b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk @@ -6,8 +6,6 @@ USB_MANUFACTURER = "Raspberry Pi" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -INTERNAL_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" CIRCUITPY__EVE = 1 - -BOOT2_S_UPPER = sdk/src/rp2_common/boot_stage2/boot2_w25q080.S diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h index 8ceab9caa9..eb807097b5 100644 --- a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.h @@ -12,6 +12,3 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) - -// Flash chip is GD25Q128 connected over QSPI -#define TOTAL_FLASH_SIZE (16 * 1024 * 1024) diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk index 6f758cd8f0..0f32d5c06f 100644 --- a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "SparkFun" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -INTERNAL_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "W25Q128JV_IM" diff --git a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.h index 564e41a651..6c307ec890 100644 --- a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.h @@ -12,6 +12,3 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) - -// Flash chip is GD25Q128 connected over QSPI -#define TOTAL_FLASH_SIZE (16 * 1024 * 1024) diff --git a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk index f7369ab37e..caffdf85c8 100644 --- a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "SparkFun" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -INTERNAL_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "W25Q128JV_IM" diff --git a/ports/raspberrypi/boot_stage2.ld b/ports/raspberrypi/boot_stage2.ld new file mode 100644 index 0000000000..c29429062c --- /dev/null +++ b/ports/raspberrypi/boot_stage2.ld @@ -0,0 +1,13 @@ +MEMORY { + /* We are loaded to the top 256 bytes of SRAM, which is above the bootrom + stack. Note 4 bytes occupied by checksum. */ + SRAM(rx) : ORIGIN = 0x20041f00, LENGTH = 252 +} + +SECTIONS { + . = ORIGIN(SRAM); + .text : { + *(.entry.*) + *(.text.*) + } >SRAM +} diff --git a/ports/raspberrypi/gen_stage2.py b/ports/raspberrypi/gen_stage2.py new file mode 100644 index 0000000000..d552bfc88a --- /dev/null +++ b/ports/raspberrypi/gen_stage2.py @@ -0,0 +1,82 @@ +import sys +import cascadetoml +import pathlib +import typer +from jinja2 import Template + + +def main(input_template: pathlib.Path, output_path: pathlib.Path, skus: str = typer.Argument("")): + if ", " in skus: + skus = skus.split(", ") + else: + skus = [skus] + skus = ['sku="{}"'.format(f) for f in skus] + flashes = cascadetoml.filter_toml(pathlib.Path("../../data/nvm.toml"), skus) + + if len(skus) == 0: + print("Set EXTERNAL_FLASH_DEVICES in mpconfigboard.mk with all possible flash skus") + raise typer.Exit(code=1) + + def all_have(nvms, key): + for nvm in nvms: + if not nvm.get(key, False): + return False + return True + + def all_match(nvms, key, default=None): + shared_value = nvms[0].get(key, default) + for nvm in nvms: + this_value = nvm.get(key, default) + if this_value != shared_value: + print( + "{}.{} = {} does not match {}".format( + nvm["sku"], key, this_value, shared_value + ) + ) + return None + return shared_value + + quad_enable_status_byte = all_match(flashes["nvm"], "quad_enable_status_byte", 0) + quad_enable_bit_mask = all_match(flashes["nvm"], "quad_enable_bit_mask") + continuous_status_write = all_have(flashes["nvm"], "01_continuous_status_write") + split_status_write = all_have(flashes["nvm"], "write_status_register_split") + e7_quad_word_read = all_have(flashes["nvm"], "e7_quad_word_read") + + quad_ok = quad_enable_status_byte is not None and quad_enable_bit_mask is not None + + max_clock_speed_mhz = min((x.get("max_clock_speed_mhz", 1000) for x in flashes["nvm"])) + + # Check that we have a consistent way to set quad enable. + if continuous_status_write is None and split_status_write is None: + print("quad not ok", continuous_status_write, split_status_write) + quad_ok = False + + clock_divider = 4 + + read_command = 0x03 + wait_cycles = 0 + if quad_ok: + if e7_quad_word_read: + read_command = 0xE7 + wait_cycles = 2 + else: + read_command = 0xEB + wait_cycles = 4 + + flash_settings = { + "quad_ok": quad_ok, + "quad_enable_status_byte": quad_enable_status_byte, + "quad_enable_bit_mask": quad_enable_bit_mask, + "split_status_write": split_status_write, + "clock_divider": clock_divider, + "read_command": read_command, + "wait_cycles": wait_cycles, + } + + template = Template(input_template.read_text()) + + output_path.write_text(template.render(flash_settings)) + + +if __name__ == "__main__": + typer.run(main) diff --git a/ports/raspberrypi/link.ld b/ports/raspberrypi/link.ld index 653408d4e5..62b1bd04b6 100644 --- a/ports/raspberrypi/link.ld +++ b/ports/raspberrypi/link.ld @@ -174,6 +174,40 @@ SECTIONS __data_end__ = .; } > RAM AT> FLASH_FIRMWARE + .itcm : + { + . = ALIGN(4); + *(.itcm.*) + + . = ALIGN(4); + } > RAM AT> FLASH_FIRMWARE + _ld_itcm_destination = ADDR(.itcm); + _ld_itcm_flash_copy = LOADADDR(.itcm); + _ld_itcm_size = SIZEOF(.itcm); + + .dtcm_data : + { + . = ALIGN(4); + + *(.dtcm_data.*) + + . = ALIGN(4); + } > RAM AT> FLASH_FIRMWARE + _ld_dtcm_data_destination = ADDR(.dtcm_data); + _ld_dtcm_data_flash_copy = LOADADDR(.dtcm_data); + _ld_dtcm_data_size = SIZEOF(.dtcm_data); + + .dtcm_bss : + { + . = ALIGN(4); + + *(.dtcm_bss.*) + + . = ALIGN(4); + } > RAM AT> RAM + _ld_dtcm_bss_start = ADDR(.dtcm_bss); + _ld_dtcm_bss_size = SIZEOF(.dtcm_bss); + .uninitialized_data (COPY): { . = ALIGN(4); *(.uninitialized_data*) diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index bcfe3efd1e..395948a514 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -55,3 +55,5 @@ USB_SERIAL_NUMBER_LENGTH = 16 # Number of USB endpoint pairs. USB_NUM_EP = 8 + +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/raspberrypi/sdk b/ports/raspberrypi/sdk index fc10a97c38..12538a7c45 160000 --- a/ports/raspberrypi/sdk +++ b/ports/raspberrypi/sdk @@ -1 +1 @@ -Subproject commit fc10a97c386f65c1a44c68684fe52a56aaf50df0 +Subproject commit 12538a7c456607b7abe3b88c606c62b6f7342b46 diff --git a/ports/raspberrypi/stage2.c.jinja b/ports/raspberrypi/stage2.c.jinja new file mode 100644 index 0000000000..6cdfc095d1 --- /dev/null +++ b/ports/raspberrypi/stage2.c.jinja @@ -0,0 +1,197 @@ +#include "sdk/src/rp2040/hardware_structs/include/hardware/structs/ssi.h" +#include "sdk/src/rp2040/hardware_structs/include/hardware/structs/pads_qspi.h" +#include "sdk/src/rp2040/hardware_structs/include/hardware/structs/watchdog.h" +#include "sdk/src/rp2040/hardware_regs/include/hardware/regs/addressmap.h" +#include "sdk/src/rp2040/hardware_regs/include/hardware/regs/m0plus.h" + +// "Mode bits" are 8 special bits sent immediately after +// the address bits in a "Read Data Fast Quad I/O" command sequence. +// On W25Q080, the four LSBs are don't care, and if MSBs == 0xa, the +// next read does not require the 0xeb instruction prefix. +#define MODE_CONTINUOUS_READ 0xa0 + +// Define interface width: single/dual/quad IO +{% if quad_ok %} +#define FRAME_FORMAT SSI_CTRLR0_SPI_FRF_VALUE_QUAD +#define TRANSACTION_TYPE SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_2C2A +// Note that the INST_L field is used to select what XIP data gets pushed into +// the TX FIFO: +// INST_L_0_BITS {ADDR[23:0],XIP_CMD[7:0]} Load "mode bits" into XIP_CMD +// Anything else {XIP_CMD[7:0],ADDR[23:0]} Load SPI command into XIP_CMD +#define INSTRUCTION_LENGTH SSI_SPI_CTRLR0_INST_L_VALUE_NONE +#define READ_INSTRUCTION MODE_CONTINUOUS_READ +#define ADDR_L 8 // 6 for address, 2 for mode +{% else %} +#define FRAME_FORMAT SSI_CTRLR0_SPI_FRF_VALUE_STD +#define TRANSACTION_TYPE SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_1C1A +#define INSTRUCTION_LENGTH SSI_SPI_CTRLR0_INST_L_VALUE_8B +#define READ_INSTRUCTION (0x{{ '%02x' % read_command }}) +#define ADDR_L 6 // * 4 = 24 +{% endif %} + +#define CMD_READ_STATUS1 0x05 +#define CMD_READ_STATUS2 0x35 +#define CMD_WRITE_ENABLE 0x06 +#define CMD_WRITE_STATUS1 0x01 +#define CMD_WRITE_STATUS2 0x31 + +#define SREG_DATA 0x02 + +static uint32_t wait_and_read(uint8_t); +static uint8_t read_flash_sreg(uint8_t status_command); + +// This function is use by the bootloader to enable the XIP flash. It is also +// used by the SDK to reinit XIP after doing non-read flash interactions such as +// writing or erasing. This code must compile down to position independent +// assembly because we don't know where in RAM it'll be when run. + +// This must be the first defined function so that it is placed at the start of +// memory where the bootloader jumps to! +void __attribute__((section(".entry._stage2_boot"), used)) _stage2_boot(void) { + uint32_t lr; + asm ("MOV %0, LR\n" : "=r" (lr) ); + + // Set aggressive pad configuration for QSPI + // - SCLK 8mA drive, no slew limiting + // - SDx disable input Schmitt to reduce delay + + // SCLK + pads_qspi_hw->io[0] = PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_VALUE_8MA << PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_LSB | + PADS_QSPI_GPIO_QSPI_SCLK_SLEWFAST_BITS; + + // Data lines + uint32_t data_settings = pads_qspi_hw->io[1]; + data_settings &= ~PADS_QSPI_GPIO_QSPI_SCLK_SCHMITT_BITS; + pads_qspi_hw->io[2] = data_settings; + {% if quad_ok %} + pads_qspi_hw->io[1] = data_settings; + pads_qspi_hw->io[3] = data_settings; + pads_qspi_hw->io[4] = data_settings; + {% endif %} + + // Disable the SSI so we can change the settings. + ssi_hw->ssienr = 0; + + // QSPI config + ssi_hw->baudr = {{ clock_divider }}; // 125 mhz / clock divider + + // Set 1-cycle sample delay. If PICO_FLASH_SPI_CLKDIV == 2 then this means, + // if the flash launches data on SCLK posedge, we capture it at the time that + // the next SCLK posedge is launched. This is shortly before that posedge + // arrives at the flash, so data hold time should be ok. For + // PICO_FLASH_SPI_CLKDIV > 2 this pretty much has no effect. + ssi_hw->rx_sample_dly = 1; + + // Set a temporary mode for doing simple commands. + ssi_hw->ctrlr0 = (7 << SSI_CTRLR0_DFS_32_LSB) | // 8 bits per data frame + (SSI_CTRLR0_TMOD_VALUE_TX_AND_RX << SSI_CTRLR0_TMOD_LSB); + + ssi_hw->ssienr = 0x1; + + {% if quad_ok %} + // Program status register. + // Enable SSI and select slave 0 + {% if quad_enable_status_byte == 1 %} + uint8_t result = read_flash_sreg(CMD_READ_STATUS1); + {% elif quad_enable_status_byte == 2 %} + uint8_t result = read_flash_sreg(CMD_READ_STATUS2); + {% endif %} + if (result != {{ quad_enable_bit_mask }}) { + ssi_hw->dr0 = (uint8_t) CMD_WRITE_ENABLE; + wait_and_read(1); + + {% if split_status_write %} + {% if quad_enable_status_byte == 1 %} + ssi_hw->dr0 = (uint8_t) CMD_WRITE_STATUS1; + {% elif quad_enable_status_byte == 2 %} + ssi_hw->dr0 = (uint8_t) CMD_WRITE_STATUS2; + {% endif %} + ssi_hw->dr0 = {{ quad_enable_bit_mask }}; + wait_and_read(2); + {% else %} + ssi_hw->dr0 = (uint8_t) CMD_WRITE_STATUS1; + {% if quad_enable_status_byte == 2 %} + ssi_hw->dr0 = 0x0; + {% endif %} + ssi_hw->dr0 = {{ quad_enable_bit_mask }}; + wait_and_read({{ quad_enable_status_byte + 1 }}); + {% endif %} + // Wait for the write to complete. + while ((read_flash_sreg(CMD_READ_STATUS1) & 0x1) != 0) {} + } + {% endif %} + + // Disable SSI again so that it can be reconfigured + ssi_hw->ssienr = 0; + + // Do a single read to get us in continuous mode. + + // Final SSI ctrlr0 settings. We only change the SPI specific settings later. + ssi_hw->ctrlr0 = (FRAME_FORMAT << SSI_CTRLR0_SPI_FRF_LSB) | // Quad I/O mode + (31 << SSI_CTRLR0_DFS_32_LSB) | // 32 data bits + (SSI_CTRLR0_TMOD_VALUE_EEPROM_READ << SSI_CTRLR0_TMOD_LSB); // Send INST/ADDR, Receive Data + + ssi_hw->ctrlr1 = 0; // Single 32b read + + {% if quad_ok %} + ssi_hw->spi_ctrlr0 = (ADDR_L << SSI_SPI_CTRLR0_ADDR_L_LSB) | // Address + mode bits + // Hi-Z dummy clocks following address + mode + ({{ wait_cycles }} << SSI_SPI_CTRLR0_WAIT_CYCLES_LSB) | + // 8-bit instruction + (SSI_SPI_CTRLR0_INST_L_VALUE_8B << SSI_SPI_CTRLR0_INST_L_LSB) | + // Send Command in serial mode then address in Quad I/O mode + (SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_1C2A << SSI_SPI_CTRLR0_TRANS_TYPE_LSB); + + // Re-enable the SSI + ssi_hw->ssienr = 1; + + // Do a single read to get us in continuous mode. + ssi_hw->dr0 = 0x{{ '%02x' % read_command }}; + ssi_hw->dr0 = MODE_CONTINUOUS_READ; + wait_and_read(2); + + // Disable the SSI to switch to no-command mode (because we're setup for continuous.) + ssi_hw->ssienr = 0; + {% endif %} + + // Final SPI ctrlr0 settings. + ssi_hw->spi_ctrlr0 = (READ_INSTRUCTION << SSI_SPI_CTRLR0_XIP_CMD_LSB) | // Mode bits to keep flash in continuous read mode + (ADDR_L << SSI_SPI_CTRLR0_ADDR_L_LSB) | // Total number of address + mode bits + ({{ wait_cycles }} << SSI_SPI_CTRLR0_WAIT_CYCLES_LSB) | // Hi-Z dummy clocks following address + mode + (INSTRUCTION_LENGTH << SSI_SPI_CTRLR0_INST_L_LSB) | // Do not send a command, instead send XIP_CMD as mode bits after address + (TRANSACTION_TYPE << SSI_SPI_CTRLR0_TRANS_TYPE_LSB); // Send Address in Quad I/O mode (and Command but that is zero bits long) + + // Re-enable the SSI + ssi_hw->ssienr = 1; + + // If lr is 0, then we came from the bootloader. + if (lr == 0) { + uint32_t* vector_table = (uint32_t*) (XIP_BASE + 0x100); + // Switch the vector table to immediately after the stage 2 area. + *((uint32_t *) (PPB_BASE + M0PLUS_VTOR_OFFSET)) = (uint32_t) vector_table; + // Set the top of the stack according to the vector table. + asm volatile ("MSR msp, %0" : : "r" (vector_table[0]) : ); + // The reset handler is the second entry in the vector table + asm volatile ("bx %0" : : "r" (vector_table[1]) : ); + // Doesn't return. It jumps to the reset handler instead. + } + // Otherwise we return. +} + +static uint32_t wait_and_read(uint8_t count) { + while ((ssi_hw->sr & SSI_SR_TFE_BITS) == 0) {} + while ((ssi_hw->sr & SSI_SR_BUSY_BITS) != 0) {} + uint32_t result = 0; + while (count > 0) { + result = ssi_hw->dr0; + count--; + } + return result; +} + +static uint8_t read_flash_sreg(uint8_t status_command) { + ssi_hw->dr0 = status_command; + ssi_hw->dr0 = status_command; + + return wait_and_read(2); +} diff --git a/ports/raspberrypi/supervisor/internal_flash.c b/ports/raspberrypi/supervisor/internal_flash.c index 81f26967e3..03ba2af123 100644 --- a/ports/raspberrypi/supervisor/internal_flash.c +++ b/ports/raspberrypi/supervisor/internal_flash.c @@ -51,17 +51,28 @@ #define NO_CACHE 0xffffffff STATIC uint8_t _cache[SECTOR_SIZE]; STATIC uint32_t _cache_lba = NO_CACHE; +STATIC uint32_t _flash_size = 0; void supervisor_flash_init(void) { bi_decl_if_func_used(bi_block_device( BINARY_INFO_MAKE_TAG('C', 'P'), "CircuitPython", RESERVED_FLASH, - TOTAL_FLASH_SIZE - RESERVED_FLASH, + (1 * 1024 * 1024), // This is a minimum. We can't set it dynamically. NULL, BINARY_INFO_BLOCK_DEV_FLAG_READ | BINARY_INFO_BLOCK_DEV_FLAG_WRITE | BINARY_INFO_BLOCK_DEV_FLAG_PT_UNKNOWN)); + + // Read the RDID register to get the flash capacity. + uint8_t cmd[] = {0x9f, 0, 0, 0}; + uint8_t data[4]; + flash_do_cmd(cmd, data, 4); + uint8_t power_of_two = 21; + if (data[3] >= 20 && data[3] < 30) { + power_of_two = data[3]; + } + _flash_size = 1 << power_of_two; } uint32_t supervisor_flash_get_block_size(void) { @@ -69,7 +80,7 @@ uint32_t supervisor_flash_get_block_size(void) { } uint32_t supervisor_flash_get_block_count(void) { - return (TOTAL_FLASH_SIZE - RESERVED_FLASH) / FILESYSTEM_BLOCK_SIZE; + return (_flash_size - RESERVED_FLASH) / FILESYSTEM_BLOCK_SIZE; } void port_internal_flash_flush(void) { diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index cf4c05f81f..794db41dc9 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -74,10 +74,42 @@ STATIC void _binary_info(void) { // TODO: Add build attribute for debug builds. Needs newer CircuitPython with CIRCUITPY_DEBUG. } +extern uint32_t _ld_dtcm_bss_start; +extern uint32_t _ld_dtcm_bss_size; +extern uint32_t _ld_dtcm_data_destination; +extern uint32_t _ld_dtcm_data_size; +extern uint32_t _ld_dtcm_data_flash_copy; +extern uint32_t _ld_itcm_destination; +extern uint32_t _ld_itcm_size; +extern uint32_t _ld_itcm_flash_copy; + safe_mode_t port_init(void) { _binary_info(); // Set brown out. + // Copy all of the "tightly coupled memory" code and data to run from RAM. + // This let's us use the 16k cache for dynamically used data and code. + // We must do this before we try and call any of its code or load the data. + for (uint32_t i = 0; i < ((size_t)&_ld_itcm_size) / 4; i++) { + (&_ld_itcm_destination)[i] = (&_ld_itcm_flash_copy)[i]; + // Now zero it out to evict the line from the XIP cache. Without this, + // it'll stay in the XIP cache anyway. + (&_ld_itcm_flash_copy)[i] = 0x0; + } + + // Copy all of the data to run from DTCM. + for (uint32_t i = 0; i < ((size_t)&_ld_dtcm_data_size) / 4; i++) { + (&_ld_dtcm_data_destination)[i] = (&_ld_dtcm_data_flash_copy)[i]; + // Now zero it out to evict the line from the XIP cache. Without this, + // it'll stay in the XIP cache anyway. + (&_ld_dtcm_data_flash_copy)[i] = 0x0; + } + + // Clear DTCM bss. + for (uint32_t i = 0; i < ((size_t)&_ld_dtcm_bss_size) / 4; i++) { + (&_ld_dtcm_bss_start)[i] = 0; + } + // Reset everything into a known state before board_init. reset_port(); diff --git a/supervisor/flash.h b/supervisor/flash.h index 289c76c2d0..21d76c9984 100644 --- a/supervisor/flash.h +++ b/supervisor/flash.h @@ -31,10 +31,10 @@ #include "py/mpconfig.h" -#ifdef EXTERNAL_FLASH_DEVICES -#include "supervisor/shared/external_flash/external_flash.h" -#else +#if INTERNAL_FLASH_FILESYSTEM #include "supervisor/shared/internal_flash.h" +#else +#include "supervisor/shared/external_flash/external_flash.h" #endif void supervisor_flash_init(void); diff --git a/supervisor/linker.h b/supervisor/linker.h index 43050b907a..58068c1a4b 100644 --- a/supervisor/linker.h +++ b/supervisor/linker.h @@ -29,7 +29,7 @@ #ifndef MICROPY_INCLUDED_SUPERVISOR_LINKER_H #define MICROPY_INCLUDED_SUPERVISOR_LINKER_H -#if defined(IMXRT10XX) || defined(FOMU) || defined(STM32H7) +#if defined(IMXRT10XX) || defined(FOMU) || defined(STM32H7) || defined(RASPBERRYPI) #define PLACE_IN_DTCM_DATA(name) name __attribute__((section(".dtcm_data." #name))) #define PLACE_IN_DTCM_BSS(name) name __attribute__((section(".dtcm_bss." #name))) #define PLACE_IN_ITCM(name) __attribute__((section(".itcm." #name))) name diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c index 83c9d63236..30482ea7b9 100644 --- a/supervisor/shared/memory.c +++ b/supervisor/shared/memory.c @@ -36,7 +36,7 @@ enum { CIRCUITPY_SUPERVISOR_IMMOVABLE_ALLOC_COUNT = // stack + heap 2 - #ifdef EXTERNAL_FLASH_DEVICES + #if INTERNAL_FLASH_FILESYSTEM == 0 + 1 #endif #if CIRCUITPY_USB_MIDI diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 083e7fb354..946b4b0bfc 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -32,7 +32,13 @@ endif # Choose which flash filesystem impl to use. # (Right now INTERNAL_FLASH_FILESYSTEM and (Q)SPI_FLASH_FILESYSTEM are mutually exclusive. # But that might not be true in the future.) -ifdef EXTERNAL_FLASH_DEVICES +ifeq ($(INTERNAL_FLASH_FILESYSTEM),1) + ifeq ($(DISABLE_FILESYSTEM),1) + SRC_SUPERVISOR += supervisor/stub/internal_flash.c + else + SRC_SUPERVISOR += supervisor/internal_flash.c + endif +else CFLAGS += -DEXTERNAL_FLASH_DEVICES=$(EXTERNAL_FLASH_DEVICES) \ SRC_SUPERVISOR += supervisor/shared/external_flash/external_flash.c @@ -42,12 +48,6 @@ ifdef EXTERNAL_FLASH_DEVICES ifeq ($(QSPI_FLASH_FILESYSTEM),1) SRC_SUPERVISOR += supervisor/qspi_flash.c supervisor/shared/external_flash/qspi_flash.c endif -else - ifeq ($(DISABLE_FILESYSTEM),1) - SRC_SUPERVISOR += supervisor/stub/internal_flash.c - else - SRC_SUPERVISOR += supervisor/internal_flash.c - endif endif ifeq ($(USB),FALSE) From 21c55f8e75777d70e62e5afe164623b2fd5a5546 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 18 Mar 2021 23:14:59 -0400 Subject: [PATCH 090/261] update funhouse pins for latest rev b --- ports/esp32s2/boards/adafruit_funhouse/pins.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ports/esp32s2/boards/adafruit_funhouse/pins.c b/ports/esp32s2/boards/adafruit_funhouse/pins.c index 0ad5beb6c5..9728512c0e 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/pins.c +++ b/ports/esp32s2/boards/adafruit_funhouse/pins.c @@ -5,10 +5,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO39) }, - { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO39) }, { MP_ROM_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_GPIO36) }, { MP_ROM_QSTR(MP_QSTR_BUTTON_DOWN), MP_ROM_PTR(&pin_GPIO3) }, @@ -27,19 +27,17 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DOTSTAR_DATA), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_DOTSTAR_CLOCK), MP_ROM_PTR(&pin_GPIO15) }, - { MP_ROM_QSTR(MP_QSTR_DOTSTAR_LIGHT_POWER), MP_ROM_PTR(&pin_GPIO41) }, - { MP_ROM_QSTR(MP_QSTR_PIR_SENSE), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_GPIO18) }, -// { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO1) }, - { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO34) }, From ea82ca1d029b11612d7cff2817f85f6663170564 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 18 Mar 2021 23:24:20 -0400 Subject: [PATCH 091/261] correct PID --- ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk b/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk index 509893bc9f..b71ff9e558 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk +++ b/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x239A -USB_PID = 0x80E6 +USB_PID = 0x80FA USB_PRODUCT = "FunHouse" USB_MANUFACTURER = "Adafruit" From 47437cb415252b1aaf8a061988072eabe35b04c7 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 18 Mar 2021 23:42:24 -0400 Subject: [PATCH 092/261] make translate; fix display pins --- .gitignore | 3 ++ locale/circuitpython.pot | 42 ++++--------------- .../esp32s2/boards/adafruit_funhouse/board.c | 6 +-- 3 files changed, 15 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index a8814be45e..54e23c379f 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,6 @@ TAGS #################### .venv .env + +# Uncrustify formatting +*.uncrustify diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index eea693dc62..97d46debd2 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -338,6 +338,10 @@ msgstr "" msgid "All UART peripherals are in use" msgstr "" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "" @@ -667,7 +671,7 @@ msgstr "" msgid "Cannot unambiguously get sizeof scalar" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -749,11 +753,7 @@ msgstr "" msgid "Could not initialize UART" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Could not initialize timer" msgstr "" @@ -777,7 +777,7 @@ msgstr "" msgid "Could not set address" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -1026,7 +1026,7 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -1254,10 +1254,6 @@ msgstr "" msgid "Invalid frequency" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "" @@ -1303,10 +1299,6 @@ msgstr "" msgid "Invalid pins" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1559,18 +1551,6 @@ msgstr "" msgid "No long integer support" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "" - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2124,11 +2104,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "" @@ -3737,6 +3712,7 @@ msgstr "" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h diff --git a/ports/esp32s2/boards/adafruit_funhouse/board.c b/ports/esp32s2/boards/adafruit_funhouse/board.c index 09eb9266eb..8f5e6120a0 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/board.c +++ b/ports/esp32s2/boards/adafruit_funhouse/board.c @@ -66,9 +66,9 @@ void board_init(void) { bus->base.type = &displayio_fourwire_type; common_hal_displayio_fourwire_construct(bus, spi, - &pin_GPIO38, // TFT_DC Command or data - &pin_GPIO39, // TFT_CS Chip select - &pin_GPIO40, // TFT_RESET Reset + &pin_GPIO39, // TFT_DC Command or data + &pin_GPIO40, // TFT_CS Chip select + &pin_GPIO41, // TFT_RESET Reset 60000000, // Baudrate 0, // Polarity 0); // Phase From 8293e1eedc300a5198dd8c20dea61539c3bd8dcc Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 19 Mar 2021 00:09:48 -0400 Subject: [PATCH 093/261] fix display rotation and position --- ports/esp32s2/boards/adafruit_funhouse/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/boards/adafruit_funhouse/board.c b/ports/esp32s2/boards/adafruit_funhouse/board.c index 8f5e6120a0..b1f685d030 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/board.c +++ b/ports/esp32s2/boards/adafruit_funhouse/board.c @@ -83,9 +83,9 @@ void board_init(void) { bus, 240, // Width (after rotation) 240, // Height (after rotation) - 0, // column start + 80, // column start 0, // row start - 180, // rotation + 270, // rotation 16, // Color depth false, // Grayscale false, // Pixels in a byte share a row. Only used for depth < 8 From 6abea8a4aaf683aa4a7e1edbfe2f38e87a8f327f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 19 Mar 2021 08:41:28 -0500 Subject: [PATCH 094/261] another place to fix flash capacity --- ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.h b/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.h index b11edb18b4..23009f353f 100644 --- a/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.h +++ b/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.h @@ -7,7 +7,7 @@ // make sure you don't overwrite code #define CIRCUITPY_INTERNAL_NVM_SIZE 0 -#define BOARD_FLASH_SIZE (2 * 1024 * 1024) +#define BOARD_FLASH_SIZE (4 * 1024 * 1024) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO_02) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO_01) From 1512ca520b3e78ebc5cf6d9e031ac24c9206f1bb Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 19 Mar 2021 09:57:21 -0400 Subject: [PATCH 095/261] Fix PWMOut non-error handling and never reset --- locale/circuitpython.pot | 4 ---- ports/esp32s2/boards/adafruit_funhouse/board.c | 2 ++ ports/esp32s2/common-hal/pwmio/PWMOut.c | 6 ++++-- shared-bindings/pwmio/PWMOut.c | 2 ++ shared-module/displayio/Display.c | 10 +++++----- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 97d46debd2..9148569ecd 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -753,10 +753,6 @@ msgstr "" msgid "Could not initialize UART" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "" diff --git a/ports/esp32s2/boards/adafruit_funhouse/board.c b/ports/esp32s2/boards/adafruit_funhouse/board.c index b1f685d030..810b61dbe0 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/board.c +++ b/ports/esp32s2/boards/adafruit_funhouse/board.c @@ -33,6 +33,8 @@ #include "shared-module/displayio/__init__.h" #include "shared-module/displayio/mipi_constants.h" +#include "esp_log.h" + displayio_fourwire_obj_t board_display_obj; #define DELAY 0x80 diff --git a/ports/esp32s2/common-hal/pwmio/PWMOut.c b/ports/esp32s2/common-hal/pwmio/PWMOut.c index 84b2ef658e..d662e1dbef 100644 --- a/ports/esp32s2/common-hal/pwmio/PWMOut.c +++ b/ports/esp32s2/common-hal/pwmio/PWMOut.c @@ -92,7 +92,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, } } if (timer_index == INDEX_EMPTY) { - // Running out of timers isn't pin related on ESP32S2 so we can't re-use error messages + // Running out of timers isn't pin related on ESP32S2. return PWMOUT_ALL_TIMERS_IN_USE; } @@ -115,7 +115,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, self->tim_handle.clk_cfg = LEDC_AUTO_CLK; if (ledc_timer_config(&(self->tim_handle)) != ESP_OK) { - mp_raise_ValueError(translate("Could not initialize timer")); + return PWMOUT_INITIALIZATION_ERROR; } self->chan_handle.channel = channel_index; @@ -148,6 +148,8 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, void common_hal_pwmio_pwmout_never_reset(pwmio_pwmout_obj_t *self) { never_reset_tim[self->tim_handle.timer_num] = true; never_reset_chan[self->chan_handle.channel] = true; + + never_reset_pin_number(self->pin_number); } void common_hal_pwmio_pwmout_reset_ok(pwmio_pwmout_obj_t *self) { diff --git a/shared-bindings/pwmio/PWMOut.c b/shared-bindings/pwmio/PWMOut.c index b70b0c7418..01b5bf77ac 100644 --- a/shared-bindings/pwmio/PWMOut.c +++ b/shared-bindings/pwmio/PWMOut.c @@ -103,6 +103,8 @@ STATIC mp_obj_t pwmio_pwmout_make_new(const mp_obj_type_t *type, size_t n_args, self->base.type = &pwmio_pwmout_type; pwmout_result_t result = common_hal_pwmio_pwmout_construct(self, pin, duty_cycle, frequency, variable_frequency); switch (result) { + case PWMOUT_OK: + break; case PWMOUT_INVALID_PIN: mp_raise_ValueError(translate("Invalid pin")); break; diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 63e098e081..9117a50b78 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -111,7 +111,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self, self->backlight_inout.base.type = &mp_type_NoneType; if (backlight_pin != NULL && common_hal_mcu_pin_is_free(backlight_pin)) { // Avoid PWM types and functions when the module isn't enabled - #if (CIRCUITPY_PULSEIO) + #if (CIRCUITPY_PWMIO) pwmout_result_t result = common_hal_pwmio_pwmout_construct(&self->backlight_pwm, backlight_pin, 0, 50000, false); if (result != PWMOUT_OK) { self->backlight_inout.base.type = &digitalio_digitalinout_type; @@ -173,14 +173,14 @@ bool common_hal_displayio_display_set_brightness(displayio_display_obj_t *self, bool ok = false; // Avoid PWM types and functions when the module isn't enabled - #if (CIRCUITPY_PULSEIO) + #if (CIRCUITPY_PWMIO) bool ispwm = (self->backlight_pwm.base.type == &pwmio_pwmout_type) ? true : false; #else bool ispwm = false; #endif if (ispwm) { - #if (CIRCUITPY_PULSEIO) + #if (CIRCUITPY_PWMIO) common_hal_pwmio_pwmout_set_duty_cycle(&self->backlight_pwm, (uint16_t)(0xffff * brightness)); ok = true; #else @@ -410,7 +410,7 @@ STATIC void _update_backlight(displayio_display_obj_t *self) { if (supervisor_ticks_ms64() - self->last_backlight_refresh < 100) { return; } - // TODO(tannewt): Fade the backlight based on it's existing value and a target value. The target + // TODO(tannewt): Fade the backlight based on its existing value and a target value. The target // should account for ambient light when possible. common_hal_displayio_display_set_brightness(self, 1.0); @@ -428,7 +428,7 @@ void displayio_display_background(displayio_display_obj_t *self) { void release_display(displayio_display_obj_t *self) { common_hal_displayio_display_set_auto_refresh(self, false); release_display_core(&self->core); - #if (CIRCUITPY_PULSEIO) + #if (CIRCUITPY_PWMIO) if (self->backlight_pwm.base.type == &pwmio_pwmout_type) { common_hal_pwmio_pwmout_reset_ok(&self->backlight_pwm); common_hal_pwmio_pwmout_deinit(&self->backlight_pwm); From 01a1cdf13a0c5385df3ff396f4ccaf5a1c6c597c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 19 Mar 2021 09:50:26 -0500 Subject: [PATCH 096/261] update flash chip comment --- ports/mimxrt10xx/boards/metro_m7_1011/flash_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mimxrt10xx/boards/metro_m7_1011/flash_config.c b/ports/mimxrt10xx/boards/metro_m7_1011/flash_config.c index 3f4ab0271d..b2894d7669 100644 --- a/ports/mimxrt10xx/boards/metro_m7_1011/flash_config.c +++ b/ports/mimxrt10xx/boards/metro_m7_1011/flash_config.c @@ -36,7 +36,7 @@ const BOOT_DATA_T boot_data = { 0xFFFFFFFF /* empty - extra data word */ }; -// Config for W25Q16JV with QSPI routed. +// Config for W25Q32JV with QSPI routed. (compatible with GD25Q32) __attribute__((section(".boot_hdr.conf"))) const flexspi_nor_config_t qspiflash_config = { .pageSize = 256u, From d7a2ae9df7c4b4f007e1298088b69d40e724e6b7 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 19 Mar 2021 11:04:46 -0400 Subject: [PATCH 097/261] fix stm compiler error --- ports/stm/common-hal/pwmio/PWMOut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/stm/common-hal/pwmio/PWMOut.c b/ports/stm/common-hal/pwmio/PWMOut.c index 45ce03d8f0..beb6e44aa4 100644 --- a/ports/stm/common-hal/pwmio/PWMOut.c +++ b/ports/stm/common-hal/pwmio/PWMOut.c @@ -48,7 +48,7 @@ STATIC uint32_t timer_get_internal_duty(uint16_t duty, uint32_t period) { return (duty * period) / ((1 << 16) - 1); } -STATIC void timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler, +STATIC bool timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler, uint32_t frequency, uint32_t source_freq) { // Find the largest possible period supported by this frequency for (int i = 0; i < (1 << 16); i++) { @@ -58,7 +58,7 @@ STATIC void timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler, break; } } - // Return successor failure. + // Return success or failure. return *prescaler != 0; } From 06743d91ed0df5c73fe9554dc05e47a6eeec1414 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 19 Mar 2021 10:11:24 -0500 Subject: [PATCH 098/261] mimxrt1011: Fix reset-to-bootloader The definition of DBL_TAP_REG must match tinyuf2 --- ports/mimxrt10xx/common-hal/microcontroller/__init__.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/mimxrt10xx/common-hal/microcontroller/__init__.c b/ports/mimxrt10xx/common-hal/microcontroller/__init__.c index 2daf108af3..3f638dc039 100644 --- a/ports/mimxrt10xx/common-hal/microcontroller/__init__.c +++ b/ports/mimxrt10xx/common-hal/microcontroller/__init__.c @@ -39,6 +39,8 @@ #include "supervisor/shared/safe_mode.h" #include "supervisor/shared/translate.h" +#define DBL_TAP_REG SNVS->LPGPR[3] + void common_hal_mcu_delay_us(uint32_t delay) { mp_hal_delay_us(delay); } @@ -72,10 +74,10 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) { } // Pretend to be the first of the two reset presses needed to enter the // bootloader. That way one reset will end in the bootloader. - SNVS->LPGPR[0] = DBL_TAP_MAGIC; + DBL_TAP_REG = DBL_TAP_MAGIC; } else { // Set up the default. - SNVS->LPGPR[0] = DBL_TAP_MAGIC_QUICK_BOOT; + DBL_TAP_REG = DBL_TAP_MAGIC_QUICK_BOOT; } if (runmode == RUNMODE_SAFE_MODE) { safe_mode_on_next_reset(PROGRAMMATIC_SAFE_MODE); From ee59c75f62521d7299bff64e15a57d42bc5751f1 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 19 Mar 2021 11:29:10 -0500 Subject: [PATCH 099/261] imxrt1010_evk: Delete pins that are not connected There are DNP resistors on the MIMXRT1010-EVK board (see SCH-45852) that lead to these pins on the arduino-style header not being connected through. In theory someone could populate them, but as it the presence of these names in the pins module caused problems when they didn't work as expected. Closes #3012 --- ports/mimxrt10xx/boards/imxrt1010_evk/pins.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c index 4aad9aaeb3..dac4fc0d6e 100644 --- a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c @@ -7,12 +7,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_10) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO_AD_05) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO_AD_06) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO_08) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO_AD_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO_AD_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO_SD_02) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_AD_05) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_AD_04) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_AD_03) }, From 38e791381e60f09bcb8005bdb1b8a4c82b037668 Mon Sep 17 00:00:00 2001 From: Jose David M Date: Thu, 18 Mar 2021 23:44:33 +0000 Subject: [PATCH 100/261] Translated using Weblate (Spanish) Currently translated at 100.0% (977 of 977 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/es.po b/locale/es.po index 510a644315..1abefd5d7b 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-18 23:41+0000\n" +"PO-Revision-Date: 2021-03-19 16:35+0000\n" "Last-Translator: Jose David M \n" "Language-Team: \n" "Language: es\n" @@ -3318,12 +3318,12 @@ msgstr "index dupterm inválido" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element size %d for bits_per_pixel %d\n" -msgstr "" +msgstr "el tamaño del elemento no es valido%d por bits_per_pixel %d\n" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element_size %d, must be, 1, 2, or 4" -msgstr "" +msgstr "el element_size %d,no es valido, debe ser 1,2 ó 4" #: extmod/modframebuf.c msgid "invalid format" From 7ae7bf68c08423d077748d907ef6a185482e68d4 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Fri, 19 Mar 2021 17:35:06 +0100 Subject: [PATCH 101/261] 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 | 59 +++++++++++++------------------- locale/cs.po | 44 +++++------------------- locale/de_DE.po | 59 +++++++++++++------------------- locale/el.po | 44 +++++------------------- locale/en_GB.po | 44 +++++------------------- locale/es.po | 74 +++++++++++++++++++--------------------- locale/fil.po | 44 +++++------------------- locale/fr.po | 74 +++++++++++++++++++--------------------- locale/hi.po | 44 +++++------------------- locale/it_IT.po | 44 +++++------------------- locale/ja.po | 65 ++++++++++++++++------------------- locale/ko.po | 44 +++++------------------- locale/nl.po | 74 +++++++++++++++++++--------------------- locale/pl.po | 59 +++++++++++++------------------- locale/pt_BR.po | 74 +++++++++++++++++++--------------------- locale/sv.po | 74 +++++++++++++++++++--------------------- locale/zh_Latn_pinyin.po | 74 +++++++++++++++++++--------------------- 17 files changed, 370 insertions(+), 624 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index a2af79e7c2..495c1337b8 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -343,6 +343,10 @@ msgstr "Semua perangkat SPI sedang digunakan" msgid "All UART peripherals are in use" msgstr "Semua perangkat UART sedang digunakan" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Semua channel event sedang digunakan" @@ -680,7 +684,7 @@ msgstr "Tidak dapat transfer tanpa pin MOSI dan MISO." msgid "Cannot unambiguously get sizeof scalar" msgstr "tidak dapat mendapatkan ukuran scalar secara tidak ambigu" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" "Tidak dapat membuat variasi frekuensi pada penghitung waktu yang sudah " @@ -767,14 +771,6 @@ msgstr "" msgid "Could not initialize UART" msgstr "Tidak dapat menginisialisasi UART" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "Tidak dapat menginisialisasi kanal" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "Tidak dapat menginisialisasi timer" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "Tidak dapat menginisialisasi ulang kanal" @@ -795,7 +791,7 @@ msgstr "" msgid "Could not set address" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "Tidak dapat memulai PWM" @@ -1045,7 +1041,7 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "Frekuensi harus cocok dengan PWMOut yang ada menggunakan timer ini" @@ -1275,10 +1271,6 @@ msgstr "Ukuran potongan format tidak valid" msgid "Invalid frequency" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "Frekuensi yang diberikan tidak valid" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "Akses memori tidak valid." @@ -1324,10 +1316,6 @@ msgstr "Pin untuk channel kanan tidak valid" msgid "Invalid pins" msgstr "Pin-pin tidak valid" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "Pin untuk PWMOut tidak valid" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1580,18 +1568,6 @@ msgstr "Tidak ada kunci yang ditentukan" msgid "No long integer support" msgstr "Tidak ada dukungan bilangan bulat yang panjang" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "Tidak ada lagi penghitung waktu yang tersedia pada pin ini." - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2164,11 +2140,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "Untuk keluar, silahkan reset board tanpa " @@ -3789,6 +3760,7 @@ msgstr "" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h @@ -4317,6 +4289,21 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Could not initialize channel" +#~ msgstr "Tidak dapat menginisialisasi kanal" + +#~ msgid "Could not initialize timer" +#~ msgstr "Tidak dapat menginisialisasi timer" + +#~ msgid "Invalid frequency supplied" +#~ msgstr "Frekuensi yang diberikan tidak valid" + +#~ msgid "Invalid pins for PWMOut" +#~ msgstr "Pin untuk PWMOut tidak valid" + +#~ msgid "No more timers available on this pin." +#~ msgstr "Tidak ada lagi penghitung waktu yang tersedia pada pin ini." + #~ msgid "Group full" #~ msgstr "Grup penuh" diff --git a/locale/cs.po b/locale/cs.po index 43af808ac4..cd9b848f4c 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -341,6 +341,10 @@ msgstr "" msgid "All UART peripherals are in use" msgstr "" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "" @@ -670,7 +674,7 @@ msgstr "" msgid "Cannot unambiguously get sizeof scalar" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -752,14 +756,6 @@ msgstr "" msgid "Could not initialize UART" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "" @@ -780,7 +776,7 @@ msgstr "" msgid "Could not set address" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -1029,7 +1025,7 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -1257,10 +1253,6 @@ msgstr "" msgid "Invalid frequency" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "" @@ -1306,10 +1298,6 @@ msgstr "" msgid "Invalid pins" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1562,18 +1550,6 @@ msgstr "" msgid "No long integer support" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "" - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2127,11 +2103,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "" @@ -3740,6 +3711,7 @@ msgstr "" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h diff --git a/locale/de_DE.po b/locale/de_DE.po index 894c308033..4c1eca799a 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -347,6 +347,10 @@ msgstr "Alle SPI-Peripheriegeräte sind in Benutzung" msgid "All UART peripherals are in use" msgstr "Alle UART-Peripheriegeräte sind in Benutzung" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Alle event Kanäle werden benutzt" @@ -681,7 +685,7 @@ msgstr "Übertragung ohne MOSI- und MISO-Pins nicht möglich." msgid "Cannot unambiguously get sizeof scalar" msgstr "sizeof scalar kann nicht eindeutig bestimmt werden" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" "Die Frequenz eines bereits verwendeten Timers kann nicht variiert werden" @@ -769,14 +773,6 @@ msgstr "Konnte SDKarte nicht initialisieren" msgid "Could not initialize UART" msgstr "Konnte UART nicht initialisieren" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "Kanal konnte nicht initialisiert werden" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "Timer konnte nicht initialisiert werden" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "Kanal konnte nicht neu initiiert werden" @@ -797,7 +793,7 @@ msgstr "Clock konnte nicht ermittelt werden" msgid "Could not set address" msgstr "Konnte Adresse nicht setzen" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "PWM konnte nicht gestartet werden" @@ -1047,7 +1043,7 @@ msgstr "Format nicht unterstützt" msgid "Framebuffer requires %d bytes" msgstr "Framepuffer benötigt %d bytes" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" "Die Frequenz muss mit dem vorhandenen PWMOut unter Verwendung dieses Timers " @@ -1279,10 +1275,6 @@ msgstr "Ungültige format chunk size" msgid "Invalid frequency" msgstr "Ungültige Frequenz" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "Ungültige Frequenz geliefert" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "Ungültiger Speicherzugriff." @@ -1328,10 +1320,6 @@ msgstr "Ungültiger Pin für rechten Kanal" msgid "Invalid pins" msgstr "Ungültige Pins" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "Ungültige Pins für PWMOut" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1586,18 +1574,6 @@ msgstr "Es wurde kein Schlüssel angegeben" msgid "No long integer support" msgstr "Keine langen Integer (long) unterstützt" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "An diesem Pin sind keine Timer mehr verfügbar." - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2174,11 +2150,6 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" "Zeitbeschränkung ist zu groß: Maximale Zeitbeschränkung ist %d Sekunden" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "Zum beenden, resette bitte das board ohne " @@ -3828,6 +3799,7 @@ msgstr "pow () mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h @@ -4362,6 +4334,21 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Could not initialize channel" +#~ msgstr "Kanal konnte nicht initialisiert werden" + +#~ msgid "Could not initialize timer" +#~ msgstr "Timer konnte nicht initialisiert werden" + +#~ msgid "Invalid frequency supplied" +#~ msgstr "Ungültige Frequenz geliefert" + +#~ msgid "Invalid pins for PWMOut" +#~ msgstr "Ungültige Pins für PWMOut" + +#~ msgid "No more timers available on this pin." +#~ msgstr "An diesem Pin sind keine Timer mehr verfügbar." + #~ msgid "matrix dimensions do not match" #~ msgstr "Matrix Dimensionen stimmen nicht überein" diff --git a/locale/el.po b/locale/el.po index 5bba4f38ed..969817d348 100644 --- a/locale/el.po +++ b/locale/el.po @@ -338,6 +338,10 @@ msgstr "" msgid "All UART peripherals are in use" msgstr "" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "" @@ -667,7 +671,7 @@ msgstr "" msgid "Cannot unambiguously get sizeof scalar" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -749,14 +753,6 @@ msgstr "" msgid "Could not initialize UART" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "" @@ -777,7 +773,7 @@ msgstr "" msgid "Could not set address" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -1026,7 +1022,7 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -1254,10 +1250,6 @@ msgstr "" msgid "Invalid frequency" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "" @@ -1303,10 +1295,6 @@ msgstr "" msgid "Invalid pins" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1559,18 +1547,6 @@ msgstr "" msgid "No long integer support" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "" - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2124,11 +2100,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "" @@ -3737,6 +3708,7 @@ msgstr "" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h diff --git a/locale/en_GB.po b/locale/en_GB.po index 8db1bf6792..0e9d28fd89 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -337,6 +337,10 @@ msgstr "" msgid "All UART peripherals are in use" msgstr "" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "" @@ -666,7 +670,7 @@ msgstr "" msgid "Cannot unambiguously get sizeof scalar" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -748,14 +752,6 @@ msgstr "" msgid "Could not initialize UART" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "" @@ -776,7 +772,7 @@ msgstr "" msgid "Could not set address" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -1025,7 +1021,7 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -1253,10 +1249,6 @@ msgstr "" msgid "Invalid frequency" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "" @@ -1302,10 +1294,6 @@ msgstr "" msgid "Invalid pins" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1558,18 +1546,6 @@ msgstr "" msgid "No long integer support" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "" - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2123,11 +2099,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "" @@ -3736,6 +3707,7 @@ msgstr "" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h diff --git a/locale/es.po b/locale/es.po index 1abefd5d7b..d5b28217bc 100644 --- a/locale/es.po +++ b/locale/es.po @@ -349,6 +349,10 @@ msgstr "Todos los periféricos SPI están siendo usados" msgid "All UART peripherals are in use" msgstr "Todos los periféricos UART están siendo usados" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Todos los canales de eventos estan siendo usados" @@ -689,7 +693,7 @@ msgstr "No se puede transmitir sin pines MOSI y MISO." msgid "Cannot unambiguously get sizeof scalar" msgstr "No se puede obtener inequívocamente sizeof escalar" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "No puede variar la frecuencia en un temporizador que ya está en uso" @@ -775,14 +779,6 @@ msgstr "No se pudo inicializar SDCard" msgid "Could not initialize UART" msgstr "No se puede inicializar la UART" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "No se pudo inicializar el canal" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "No se pudo inicializar el temporizador" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "No se pudo reiniciar el canal" @@ -803,7 +799,7 @@ msgstr "No puedo traer el reloj" msgid "Could not set address" msgstr "No se puede definir la dirección" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "No se pudo iniciar PWM" @@ -1052,7 +1048,7 @@ msgstr "Sin capacidades para el formato" msgid "Framebuffer requires %d bytes" msgstr "Framebuffer requiere %d bytes" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" "La frecuencia debe coincidir con PWMOut existente usando este temporizador" @@ -1290,10 +1286,6 @@ msgstr "Formato de fragmento de formato no válido" msgid "Invalid frequency" msgstr "Frecuencia inválida" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "Frecuencia suministrada no válida" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "Acceso a memoria no válido." @@ -1339,10 +1331,6 @@ msgstr "Pin inválido para canal derecho" msgid "Invalid pins" msgstr "pines inválidos" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "Pines inválidos para PWMOut" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1599,18 +1587,6 @@ msgstr "No se especificó ninguna llave" msgid "No long integer support" msgstr "No hay soporte de entero largo" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "No hay más canales disponibles" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "No hay más temporizadores disponibles" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "No hay más temporizadores disponibles en este pin." - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "No hay una red con ese ssid" @@ -2192,13 +2168,6 @@ msgstr "" "Tiempo de espera demasiado largo: El tiempo máximo de espera es de %d " "segundos" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" -"El temporizador es utilizado para uso interno - declare los pines para PWM " -"más temprano en el programa" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "Para salir, por favor reinicia la tarjeta sin " @@ -3833,6 +3802,7 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h @@ -4363,6 +4333,34 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "Could not initialize channel" +#~ msgstr "No se pudo inicializar el canal" + +#~ msgid "Could not initialize timer" +#~ msgstr "No se pudo inicializar el temporizador" + +#~ msgid "Invalid frequency supplied" +#~ msgstr "Frecuencia suministrada no válida" + +#~ msgid "Invalid pins for PWMOut" +#~ msgstr "Pines inválidos para PWMOut" + +#~ msgid "No more channels available" +#~ msgstr "No hay más canales disponibles" + +#~ msgid "No more timers available" +#~ msgstr "No hay más temporizadores disponibles" + +#~ msgid "No more timers available on this pin." +#~ msgstr "No hay más temporizadores disponibles en este pin." + +#~ msgid "" +#~ "Timer was reserved for internal use - declare PWM pins earlier in the " +#~ "program" +#~ msgstr "" +#~ "El temporizador es utilizado para uso interno - declare los pines para " +#~ "PWM más temprano en el programa" + #~ msgid "matrix dimensions do not match" #~ msgstr "las dimensiones de la matriz no coinciden" diff --git a/locale/fil.po b/locale/fil.po index 67cdf90d04..7310108c8a 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -341,6 +341,10 @@ msgstr "Lahat ng SPI peripherals ay ginagamit" msgid "All UART peripherals are in use" msgstr "Lahat ng I2C peripherals ginagamit" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Lahat ng event channels ginagamit" @@ -674,7 +678,7 @@ msgstr "Hindi maaaring ilipat kapag walang MOSI at MISO pin." msgid "Cannot unambiguously get sizeof scalar" msgstr "Hindi puedeng hindi sigurado ang get sizeof scalar" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -757,14 +761,6 @@ msgstr "" msgid "Could not initialize UART" msgstr "Hindi ma-initialize ang UART" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "" @@ -785,7 +781,7 @@ msgstr "" msgid "Could not set address" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -1039,7 +1035,7 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -1269,10 +1265,6 @@ msgstr "Mali ang format ng chunk size" msgid "Invalid frequency" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "" @@ -1318,10 +1310,6 @@ msgstr "Mali ang pin para sa kanang channel" msgid "Invalid pins" msgstr "Mali ang pins" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1574,18 +1562,6 @@ msgstr "" msgid "No long integer support" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "" - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2144,11 +2120,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "Para lumabas, paki-reset ang board na wala ang " @@ -3786,6 +3757,7 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h diff --git a/locale/fr.po b/locale/fr.po index a5d6927b36..f62a5d634d 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -349,6 +349,10 @@ msgstr "Tous les périphériques SPI sont utilisés" msgid "All UART peripherals are in use" msgstr "Tous les périphériques UART sont utilisés" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Tous les canaux d'événements sont utilisés" @@ -693,7 +697,7 @@ msgstr "Pas de transfert sans broches MOSI et MISO." msgid "Cannot unambiguously get sizeof scalar" msgstr "Impossible d'obtenir la taille (sizeof) du scalaire sans ambigüité" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Impossible de faire varier la fréquence sur un minuteur déjà utilisée" @@ -780,14 +784,6 @@ msgstr "Impossible d'initialiser la carte SD" msgid "Could not initialize UART" msgstr "Impossible d'initialiser UART" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "Impossible d'initialiser le canal" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "Impossible d'initialiser le minuteur" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "Impossible de réinitialiser le canal" @@ -808,7 +804,7 @@ msgstr "Impossible d’obtenir l’horloge" msgid "Could not set address" msgstr "Impossible de définir l’adresse" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "Impossible de démarrer PWM" @@ -1059,7 +1055,7 @@ msgstr "Format non supporté" msgid "Framebuffer requires %d bytes" msgstr "FrameBuffer nécessite %d octets" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" "La fréquence doit correspondre à PWMOut existant à l'utilisation de ce " @@ -1297,10 +1293,6 @@ msgstr "Taille de bloc de formatage invalide" msgid "Invalid frequency" msgstr "Fréquence non valide" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "Fréquence invalide fournie" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "Accès à la mémoire invalide." @@ -1346,10 +1338,6 @@ msgstr "Broche invalide pour le canal droit" msgid "Invalid pins" msgstr "Broches invalides" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "Broches invalides pour PWMOut" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1604,18 +1592,6 @@ msgstr "Aucune clé n'a été spécifiée" msgid "No long integer support" msgstr "Pas de support pour chiffre entier long" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "Pas de canal supplémentaire disponible" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "Plus de minuteurs disponibles" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "Plus de minuteurs disponibles sur cette broche." - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "Aucun réseau avec ce ssid" @@ -2198,13 +2174,6 @@ msgstr "L'heure est dans le passé." msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "Le délai est trop long : le délai maximal est de %d secondes" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" -"Le minuteur est reservé pour un usage interne - déclarez la broche PWM plus " -"tôt dans le programme" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "Pour quitter, SVP redémarrez la carte sans " @@ -3855,6 +3824,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h @@ -4385,6 +4355,34 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "Could not initialize channel" +#~ msgstr "Impossible d'initialiser le canal" + +#~ msgid "Could not initialize timer" +#~ msgstr "Impossible d'initialiser le minuteur" + +#~ msgid "Invalid frequency supplied" +#~ msgstr "Fréquence invalide fournie" + +#~ msgid "Invalid pins for PWMOut" +#~ msgstr "Broches invalides pour PWMOut" + +#~ msgid "No more channels available" +#~ msgstr "Pas de canal supplémentaire disponible" + +#~ msgid "No more timers available" +#~ msgstr "Plus de minuteurs disponibles" + +#~ msgid "No more timers available on this pin." +#~ msgstr "Plus de minuteurs disponibles sur cette broche." + +#~ msgid "" +#~ "Timer was reserved for internal use - declare PWM pins earlier in the " +#~ "program" +#~ msgstr "" +#~ "Le minuteur est reservé pour un usage interne - déclarez la broche PWM " +#~ "plus tôt dans le programme" + #~ msgid "matrix dimensions do not match" #~ msgstr "les dimensions de la matrice ne correspondent pas" diff --git a/locale/hi.po b/locale/hi.po index 822d42348f..91233d0eff 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -338,6 +338,10 @@ msgstr "" msgid "All UART peripherals are in use" msgstr "" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "" @@ -667,7 +671,7 @@ msgstr "" msgid "Cannot unambiguously get sizeof scalar" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -749,14 +753,6 @@ msgstr "" msgid "Could not initialize UART" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "" @@ -777,7 +773,7 @@ msgstr "" msgid "Could not set address" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -1026,7 +1022,7 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -1254,10 +1250,6 @@ msgstr "" msgid "Invalid frequency" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "" @@ -1303,10 +1295,6 @@ msgstr "" msgid "Invalid pins" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1559,18 +1547,6 @@ msgstr "" msgid "No long integer support" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "" - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2124,11 +2100,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "" @@ -3737,6 +3708,7 @@ msgstr "" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h diff --git a/locale/it_IT.po b/locale/it_IT.po index 87717adf4c..66f45c615a 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -350,6 +350,10 @@ msgstr "Tutte le periferiche SPI sono in uso" msgid "All UART peripherals are in use" msgstr "Tutte le periferiche I2C sono in uso" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Tutti i canali eventi utilizati" @@ -684,7 +688,7 @@ msgstr "Impossibile trasferire senza i pin MOSI e MISO." msgid "Cannot unambiguously get sizeof scalar" msgstr "Impossibile ricavare la grandezza scalare di sizeof inequivocabilmente" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -767,14 +771,6 @@ msgstr "" msgid "Could not initialize UART" msgstr "Impossibile inizializzare l'UART" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "" @@ -795,7 +791,7 @@ msgstr "" msgid "Could not set address" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -1048,7 +1044,7 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -1280,10 +1276,6 @@ msgstr "" msgid "Invalid frequency" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "" @@ -1329,10 +1321,6 @@ msgstr "Pin non valido per il canale destro" msgid "Invalid pins" msgstr "Pin non validi" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1587,18 +1575,6 @@ msgstr "" msgid "No long integer support" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "" - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2165,11 +2141,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "Per uscire resettare la scheda senza " @@ -3803,6 +3774,7 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h diff --git a/locale/ja.po b/locale/ja.po index 5eafbc3d54..1a1a2d7bec 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -343,6 +343,10 @@ msgstr "全てのSPI周辺機器が使用中" msgid "All UART peripherals are in use" msgstr "全てのUART周辺機器が使用中" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "全てのイベントチャネルが使用中" @@ -676,7 +680,7 @@ msgstr "MOSIピンとMISOピンなしに転送できません" msgid "Cannot unambiguously get sizeof scalar" msgstr "スカラのサイズを曖昧さなしに取得できません" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "使用中のタイマー上では周波数を変えられません" @@ -760,14 +764,6 @@ msgstr "SDカードを初期化できません" msgid "Could not initialize UART" msgstr "UARTを初期化できません" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "チャネルを初期化できません" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "タイマーを初期化できません" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "チャネルを再初期化できません" @@ -788,7 +784,7 @@ msgstr "" msgid "Could not set address" msgstr "アドレスをセットできません" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "PWMをスタートできません" @@ -1037,7 +1033,7 @@ msgstr "非対応の形式" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "このタイマーを使う既存のPWMOutと周波数を一致させる必要があります" @@ -1267,10 +1263,6 @@ msgstr "フォーマットチャンクのサイズが不正" msgid "Invalid frequency" msgstr "不正な周波数" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "不正な周波数が与えられました" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "不正なメモリアクセス" @@ -1316,10 +1308,6 @@ msgstr "右チャネルのピンが不正" msgid "Invalid pins" msgstr "ピンが不正" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "PWMOutのピンが不正" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1572,18 +1560,6 @@ msgstr "キーが指定されていません" msgid "No long integer support" msgstr "long integerに対応していません" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "使えるチャネルがもうありません" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "使えるタイマーがもうありません" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "このピンには使えるタイマーがもうありません" - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2146,11 +2122,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "タイムアウトが長すぎです。最大のタイムアウト長は%d秒" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "" @@ -3767,6 +3738,7 @@ msgstr "pow()の第3引数には整数が必要" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h @@ -4295,6 +4267,27 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Could not initialize channel" +#~ msgstr "チャネルを初期化できません" + +#~ msgid "Could not initialize timer" +#~ msgstr "タイマーを初期化できません" + +#~ msgid "Invalid frequency supplied" +#~ msgstr "不正な周波数が与えられました" + +#~ msgid "Invalid pins for PWMOut" +#~ msgstr "PWMOutのピンが不正" + +#~ msgid "No more channels available" +#~ msgstr "使えるチャネルがもうありません" + +#~ msgid "No more timers available" +#~ msgstr "使えるタイマーがもうありません" + +#~ msgid "No more timers available on this pin." +#~ msgstr "このピンには使えるタイマーがもうありません" + #~ msgid "matrix dimensions do not match" #~ msgstr "行列の次元が一致しません" diff --git a/locale/ko.po b/locale/ko.po index 5e03f8467c..fd945991ec 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -339,6 +339,10 @@ msgstr "사용중인 모든 SPI주변 기기" msgid "All UART peripherals are in use" msgstr "사용중인 모든 UART주변 기기" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "" @@ -670,7 +674,7 @@ msgstr "" msgid "Cannot unambiguously get sizeof scalar" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -752,14 +756,6 @@ msgstr "" msgid "Could not initialize UART" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "" @@ -780,7 +776,7 @@ msgstr "" msgid "Could not set address" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -1029,7 +1025,7 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -1257,10 +1253,6 @@ msgstr "형식 청크 크기가 잘못되었습니다" msgid "Invalid frequency" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "" @@ -1306,10 +1298,6 @@ msgstr "오른쪽 채널 핀이 잘못되었습니다" msgid "Invalid pins" msgstr "핀이 유효하지 않습니다" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1562,18 +1550,6 @@ msgstr "" msgid "No long integer support" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "" - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2127,11 +2103,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "" @@ -3741,6 +3712,7 @@ msgstr "" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h diff --git a/locale/nl.po b/locale/nl.po index 7f04122108..4eca409ee4 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -341,6 +341,10 @@ msgstr "Alle SPI peripherals zijn in gebruik" msgid "All UART peripherals are in use" msgstr "Alle UART peripherals zijn in gebruik" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Alle event kanalen zijn in gebruik" @@ -674,7 +678,7 @@ msgstr "Kan niet overdragen zonder MOSI en MISO pinnen." msgid "Cannot unambiguously get sizeof scalar" msgstr "Kan niet ondubbelzinning sizeof scalar verkrijgen" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Kan de frequentie van een timer die al in gebruik is niet variëren" @@ -760,14 +764,6 @@ msgstr "Kan SDCard niet initialiseren" msgid "Could not initialize UART" msgstr "Kan UART niet initialiseren" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "Kan kanaal niet initialiseren" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "Kan timer niet initialiseren" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "Kan kanaal niet her-initialiseren" @@ -788,7 +784,7 @@ msgstr "Kon klok niet ophalen" msgid "Could not set address" msgstr "Kan adres niet zetten" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "Kan PWM niet starten" @@ -1037,7 +1033,7 @@ msgstr "Formaat wordt niet ondersteund" msgid "Framebuffer requires %d bytes" msgstr "Framebuffer benodigd %d bytes" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" "Frequentie moet overeenkomen met bestaande PWMOut bij gebruik van deze timer" @@ -1268,10 +1264,6 @@ msgstr "Ongeldig formaat stuk grootte" msgid "Invalid frequency" msgstr "Onjuiste frequentie" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "Ongeldige frequentie opgegeven" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "Ongeldig geheugen adres." @@ -1317,10 +1309,6 @@ msgstr "Ongeldige pin voor rechter kanaal" msgid "Invalid pins" msgstr "Ongeldige pinnen" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "Ongeldige pinnen voor PWMOut" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1573,18 +1561,6 @@ msgstr "Een sleutel was niet gespecificeerd" msgid "No long integer support" msgstr "Geen lange integer ondersteuning" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "Geen kanalen meer beschikbaar" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "Geen timers meer beschikbaar" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "Geen timers meer beschikbaar op deze pin." - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "Geen netwerk met dat SSID gevonden" @@ -2164,13 +2140,6 @@ msgstr "Tijdstip ligt in het verleden." msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "Time-out is te lang. Maximale time-out lengte is %d seconden" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" -"Timer is gereserveerd voor intern gebruik - wijs PWM pins eerder in het " -"programma toe" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "Om te beëindigen, reset het bord zonder " @@ -3799,6 +3768,7 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h @@ -4328,6 +4298,34 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "Could not initialize channel" +#~ msgstr "Kan kanaal niet initialiseren" + +#~ msgid "Could not initialize timer" +#~ msgstr "Kan timer niet initialiseren" + +#~ msgid "Invalid frequency supplied" +#~ msgstr "Ongeldige frequentie opgegeven" + +#~ msgid "Invalid pins for PWMOut" +#~ msgstr "Ongeldige pinnen voor PWMOut" + +#~ msgid "No more channels available" +#~ msgstr "Geen kanalen meer beschikbaar" + +#~ msgid "No more timers available" +#~ msgstr "Geen timers meer beschikbaar" + +#~ msgid "No more timers available on this pin." +#~ msgstr "Geen timers meer beschikbaar op deze pin." + +#~ msgid "" +#~ "Timer was reserved for internal use - declare PWM pins earlier in the " +#~ "program" +#~ msgstr "" +#~ "Timer is gereserveerd voor intern gebruik - wijs PWM pins eerder in het " +#~ "programma toe" + #~ msgid "matrix dimensions do not match" #~ msgstr "matrix afmetingen komen niet overeen" diff --git a/locale/pl.po b/locale/pl.po index 7011f75924..73b167ebfc 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -343,6 +343,10 @@ msgstr "Wszystkie peryferia SPI w użyciu" msgid "All UART peripherals are in use" msgstr "Wszystkie peryferia UART w użyciu" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Wszystkie kanały zdarzeń w użyciu" @@ -674,7 +678,7 @@ msgstr "Nie można przesyłać bez nóżek MOSI i MISO." msgid "Cannot unambiguously get sizeof scalar" msgstr "Wielkość skalara jest niejednoznaczna" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Nie można zmieniać częstotliwości timera, który jest już używany" @@ -760,14 +764,6 @@ msgstr "Nie można zainicjować SDCard" msgid "Could not initialize UART" msgstr "Ustawienie UART nie powiodło się" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "Nie można zainicjować kanału" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "Nie można zainicjować timera" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "Nie można ponownie zainicjować kanału" @@ -788,7 +784,7 @@ msgstr "" msgid "Could not set address" msgstr "Nie można ustawić adresu" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "Nie można uruchomić PWM" @@ -1037,7 +1033,7 @@ msgstr "Nie wspierany format" msgid "Framebuffer requires %d bytes" msgstr "Bufor ramki wymaga %d bajtów" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -1267,10 +1263,6 @@ msgstr "Zła wielkość fragmentu formatu" msgid "Invalid frequency" msgstr "Nieprawidłowa częstotliwość" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "Podano nieprawidłową częstotliwość" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "Nieprawidłowy dostęp do pamięci." @@ -1316,10 +1308,6 @@ msgstr "Zła nóżka dla prawego kanału" msgid "Invalid pins" msgstr "Złe nóżki" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "Nieprawidłowe piny dla PWMOut" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1573,18 +1561,6 @@ msgstr "Nie określono klucza" msgid "No long integer support" msgstr "" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "Brak dostępnych kanałów" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "" - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "" @@ -2138,11 +2114,6 @@ msgstr "" msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "By wyjść, proszę zresetować płytkę bez " @@ -3759,6 +3730,7 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h @@ -4287,6 +4259,21 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Could not initialize channel" +#~ msgstr "Nie można zainicjować kanału" + +#~ msgid "Could not initialize timer" +#~ msgstr "Nie można zainicjować timera" + +#~ msgid "Invalid frequency supplied" +#~ msgstr "Podano nieprawidłową częstotliwość" + +#~ msgid "Invalid pins for PWMOut" +#~ msgstr "Nieprawidłowe piny dla PWMOut" + +#~ msgid "No more channels available" +#~ msgstr "Brak dostępnych kanałów" + #~ msgid "vectors must have same lengths" #~ msgstr "wektory muszą mieć identyczną długość" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 8476d9812e..8cbb739c4a 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -351,6 +351,10 @@ msgstr "Todos os periféricos SPI estão em uso" msgid "All UART peripherals are in use" msgstr "Todos os periféricos UART estão em uso" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Todos os canais de eventos em uso" @@ -692,7 +696,7 @@ msgstr "Não é possível transferir sem os pinos MOSI e MISO." msgid "Cannot unambiguously get sizeof scalar" msgstr "Não é possível obter inequivocamente o tamanho do escalar" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Não é possível variar a frequência em um timer que já esteja em uso" @@ -778,14 +782,6 @@ msgstr "Não foi possível inicializar o SDCard" msgid "Could not initialize UART" msgstr "Não foi possível inicializar o UART" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "Não foi possível inicializar o canal" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "Não foi possível inicializar o temporizador" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "Não foi possível reiniciar o canal" @@ -806,7 +802,7 @@ msgstr "Não foi possível recuperar o clock" msgid "Could not set address" msgstr "Não foi possível definir o endereço" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "Não foi possível iniciar o PWM" @@ -1055,7 +1051,7 @@ msgstr "O formato não é suportado" msgid "Framebuffer requires %d bytes" msgstr "O Framebuffer requer %d bytes" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" "A frequência deve coincidir com o PWMOut existente usando este temporizador" @@ -1292,10 +1288,6 @@ msgstr "Tamanho do pedaço de formato inválido" msgid "Invalid frequency" msgstr "Frequência inválida" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "A frequência informada é inválida" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "O acesso da memória é inválido." @@ -1341,10 +1333,6 @@ msgstr "Pino inválido para canal direito" msgid "Invalid pins" msgstr "Pinos inválidos" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "Os pinos para o PWMOut são inválidos" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1597,18 +1585,6 @@ msgstr "Nenhuma chave foi definida" msgid "No long integer support" msgstr "Não há compatibilidade com inteiro longo" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "Não há mais canais disponíveis" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "Não há mais temporizadores disponíveis" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "Não há mais temporizadores disponíveis neste pino." - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "Não há rede com este ssid" @@ -2197,13 +2173,6 @@ msgstr "" "O tempo limite é long demais: O comprimento máximo do tempo limite é de %d " "segundos" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" -"O temporizador foi reservado para uso interno - declare os pinos PWM no " -"início do programa" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "Para sair, por favor, reinicie a placa sem " @@ -3845,6 +3814,7 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h @@ -4374,6 +4344,34 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "Could not initialize channel" +#~ msgstr "Não foi possível inicializar o canal" + +#~ msgid "Could not initialize timer" +#~ msgstr "Não foi possível inicializar o temporizador" + +#~ msgid "Invalid frequency supplied" +#~ msgstr "A frequência informada é inválida" + +#~ msgid "Invalid pins for PWMOut" +#~ msgstr "Os pinos para o PWMOut são inválidos" + +#~ msgid "No more channels available" +#~ msgstr "Não há mais canais disponíveis" + +#~ msgid "No more timers available" +#~ msgstr "Não há mais temporizadores disponíveis" + +#~ msgid "No more timers available on this pin." +#~ msgstr "Não há mais temporizadores disponíveis neste pino." + +#~ msgid "" +#~ "Timer was reserved for internal use - declare PWM pins earlier in the " +#~ "program" +#~ msgstr "" +#~ "O temporizador foi reservado para uso interno - declare os pinos PWM no " +#~ "início do programa" + #~ msgid "matrix dimensions do not match" #~ msgstr "as dimensões da matriz não coincidem" diff --git a/locale/sv.po b/locale/sv.po index 28b89da2be..9b6cdda5a2 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -346,6 +346,10 @@ msgstr "All SPI-kringutrustning används" msgid "All UART peripherals are in use" msgstr "Alla UART-kringutrustning används" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Alla händelsekanaler används" @@ -680,7 +684,7 @@ msgstr "Kan inte överföra utan MOSI- och MISO-pinnar." msgid "Cannot unambiguously get sizeof scalar" msgstr "Kan inte entydigt få sizeof scalar" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Det går inte att ändra frekvensen på en timer som redan används" @@ -766,14 +770,6 @@ msgstr "Kan inte initiera SD-kort" msgid "Could not initialize UART" msgstr "Det gick inte att initiera UART" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "Det gick inte att initiera kanalen" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "Det gick inte att initialisera timern" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "Det gick inte att återinitiera kanalen" @@ -794,7 +790,7 @@ msgstr "Kunde inte hämta klocka" msgid "Could not set address" msgstr "Kan inte ange adress" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "Det gick inte att starta PWM" @@ -1043,7 +1039,7 @@ msgstr "Formatet stöds inte" msgid "Framebuffer requires %d bytes" msgstr "Framebuffer kräver %d byte" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "Frekvensen måste matcha befintlig PWMOut med denna timer" @@ -1275,10 +1271,6 @@ msgstr "Ogiltig formatsegmentstorlek" msgid "Invalid frequency" msgstr "Ogiltig frekvens" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "Ogiltig frekvens angiven" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "Ogiltig minnesåtkomst." @@ -1324,10 +1316,6 @@ msgstr "Ogiltig pinne för höger kanal" msgid "Invalid pins" msgstr "Ogiltiga pinnar" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "Ogiltiga pinnar för PWMOut" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1581,18 +1569,6 @@ msgstr "Ingen nyckel angavs" msgid "No long integer support" msgstr "Inget stöd för långt heltal" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "Inga fler kanaler tillgängliga" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "Ingen timer tillgänglig" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "Inga fler timers tillgängliga på denna pinne." - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "Inget nätverk med sådant ssid" @@ -2170,13 +2146,6 @@ msgstr "Tid har passerats." msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "Åtgärden tog för lång tid: Max väntetid är %d sekunder" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" -"Timern är reserverad för internt bruk - deklarera PWM-pinne tidigare i " -"programmet" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "För att avsluta, gör reset på kortet utan " @@ -3802,6 +3771,7 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h @@ -4331,6 +4301,34 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "Could not initialize channel" +#~ msgstr "Det gick inte att initiera kanalen" + +#~ msgid "Could not initialize timer" +#~ msgstr "Det gick inte att initialisera timern" + +#~ msgid "Invalid frequency supplied" +#~ msgstr "Ogiltig frekvens angiven" + +#~ msgid "Invalid pins for PWMOut" +#~ msgstr "Ogiltiga pinnar för PWMOut" + +#~ msgid "No more channels available" +#~ msgstr "Inga fler kanaler tillgängliga" + +#~ msgid "No more timers available" +#~ msgstr "Ingen timer tillgänglig" + +#~ msgid "No more timers available on this pin." +#~ msgstr "Inga fler timers tillgängliga på denna pinne." + +#~ msgid "" +#~ "Timer was reserved for internal use - declare PWM pins earlier in the " +#~ "program" +#~ msgstr "" +#~ "Timern är reserverad för internt bruk - deklarera PWM-pinne tidigare i " +#~ "programmet" + #~ msgid "matrix dimensions do not match" #~ msgstr "matrisdimensioner matchar inte" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 8eb8435f2e..9e18ff3edc 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -348,6 +348,10 @@ msgstr "Suǒyǒu SPI wàiwéi qì zhèngzài shǐyòng" msgid "All UART peripherals are in use" msgstr "Suǒyǒu UART wàiwéi zhèngzài shǐyòng" +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" msgstr "Suǒyǒu shǐyòng de shìjiàn píndào" @@ -681,7 +685,7 @@ msgstr "Méiyǒu MOSI/MISO jiù wúfǎ zhuǎnyí." msgid "Cannot unambiguously get sizeof scalar" msgstr "Wúfǎ míngquè de huòdé biāoliàng de dàxiǎo" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Wúfǎ gēnggǎi yǐ zài shǐyòng de jìshí qì shàng de pínlǜ" @@ -765,14 +769,6 @@ msgstr "wú fǎ chū shǐ huà SDCard" msgid "Could not initialize UART" msgstr "Wúfǎ chūshǐhuà UART" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize channel" -msgstr "Wúfǎ chūshǐhuà píndào" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not initialize timer" -msgstr "Wúfǎ chūshǐhuà jìshí qì" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" msgstr "Wúfǎ chóngxīn chūshǐhuà píndào" @@ -793,7 +789,7 @@ msgstr "Wúfǎ huòqǔ shízhōng" msgid "Could not set address" msgstr "wú fǎ shè zhì dì zhǐ" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" msgstr "Wúfǎ qǐdòng PWM" @@ -1042,7 +1038,7 @@ msgstr "Bù zhīyuán géshì" msgid "Framebuffer requires %d bytes" msgstr "zhēn huǎn chōng qū xū yào %d zì jié" -#: ports/stm/common-hal/pwmio/PWMOut.c +#: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "Pínlǜ bìxū yǔ shǐyòng cǐ jìshí qì de xiàn yǒu PWMOut xiāng pǐpèi" @@ -1277,10 +1273,6 @@ msgstr "Géshì kuài dàxiǎo wúxiào" msgid "Invalid frequency" msgstr "Wúxiào de pínlǜ" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid frequency supplied" -msgstr "Tígōng de pínlǜ wúxiào" - #: supervisor/shared/safe_mode.c msgid "Invalid memory access." msgstr "Wúxiào de nèicún fǎngwèn." @@ -1326,10 +1318,6 @@ msgstr "Yòuxián tōngdào yǐn jiǎo wúxiào" msgid "Invalid pins" msgstr "Wúxiào de yǐn jiǎo" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Invalid pins for PWMOut" -msgstr "PWMOut de yǐn jiǎo wú xiào" - #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" @@ -1583,18 +1571,6 @@ msgstr "Wèi zhǐdìng mì yào" msgid "No long integer support" msgstr "Méiyǒu zhǎng zhěngshù zhīchí" -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more channels available" -msgstr "Méiyǒu gèng duō kěyòng píndào" - -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -msgid "No more timers available" -msgstr "Méiyǒu gèng duō kěyòng de jìshí qì" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "No more timers available on this pin." -msgstr "Gāi yǐn jiǎo shàng méiyǒu kěyòng de dìngshí qì." - #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" msgstr "Méiyǒu wǎngluò yǔ gāi ssid" @@ -2167,13 +2143,6 @@ msgstr "shí jiān yǐ jīng guò qù." msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "Chāoshí shíjiān tài zhǎng: Zuìdà chāoshí shíjiān wèi%d miǎo" -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "" -"Timer was reserved for internal use - declare PWM pins earlier in the program" -msgstr "" -"Dìngshí qì bǎoliú gōng nèibù shǐyòng-zài chéngxù de qiánmiàn shēngmíng PWM " -"yǐn jiǎo" - #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " msgstr "Yào tuìchū, qǐng chóng zhì bǎnkuài ér bùyòng " @@ -3798,6 +3767,7 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h @@ -4327,6 +4297,34 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "Could not initialize channel" +#~ msgstr "Wúfǎ chūshǐhuà píndào" + +#~ msgid "Could not initialize timer" +#~ msgstr "Wúfǎ chūshǐhuà jìshí qì" + +#~ msgid "Invalid frequency supplied" +#~ msgstr "Tígōng de pínlǜ wúxiào" + +#~ msgid "Invalid pins for PWMOut" +#~ msgstr "PWMOut de yǐn jiǎo wú xiào" + +#~ msgid "No more channels available" +#~ msgstr "Méiyǒu gèng duō kěyòng píndào" + +#~ msgid "No more timers available" +#~ msgstr "Méiyǒu gèng duō kěyòng de jìshí qì" + +#~ msgid "No more timers available on this pin." +#~ msgstr "Gāi yǐn jiǎo shàng méiyǒu kěyòng de dìngshí qì." + +#~ msgid "" +#~ "Timer was reserved for internal use - declare PWM pins earlier in the " +#~ "program" +#~ msgstr "" +#~ "Dìngshí qì bǎoliú gōng nèibù shǐyòng-zài chéngxù de qiánmiàn shēngmíng " +#~ "PWM yǐn jiǎo" + #~ msgid "matrix dimensions do not match" #~ msgstr "jǔzhèn chǐcùn bù pǐpèi" From 4e7ad1e59c6518a0fe377657f0cc5e4a9b836855 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Fri, 19 Mar 2021 19:29:27 +0000 Subject: [PATCH 102/261] Translated using Weblate (Swedish) Currently translated at 100.0% (970 of 970 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 9b6cdda5a2..61cb7b4319 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-03-17 21:24+0000\n" +"PO-Revision-Date: 2021-03-19 20:36+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -348,7 +348,7 @@ msgstr "Alla UART-kringutrustning används" #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" -msgstr "" +msgstr "Alla kanaler används" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" From 4aea7f8f521b52fd9160945e8bb0ea1ab2d9e5d0 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 19 Mar 2021 15:22:23 -0700 Subject: [PATCH 103/261] Add requirements-dev.txt for python deps --- .github/workflows/build.yml | 6 ++--- .github/workflows/create_website_pr.yml | 2 +- .github/workflows/pre-commit.yml | 2 +- ports/raspberrypi/sdk | 2 +- requirements-dev.txt | 33 +++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 requirements-dev.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac7814abd0..8a7bf5784e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: sudo apt-get update sudo apt-get install -y eatmydata sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra - pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli mypy + pip install -r requirements-dev.txt - name: Versions run: | gcc --version @@ -356,7 +356,7 @@ jobs: - name: Install deps run: | sudo apt-get install -y gettext - pip install requests sh click setuptools awscli + pip install -r requirements-dev.txt wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 - name: Versions @@ -497,7 +497,7 @@ jobs: - name: Install CircuitPython deps run: | source $IDF_PATH/export.sh - pip install requests sh click setuptools awscli + pip install -r requirements-dev.txt sudo apt-get install -y gettext ninja-build env: IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf diff --git a/.github/workflows/create_website_pr.yml b/.github/workflows/create_website_pr.yml index c8aca30e4a..a66bb161c4 100644 --- a/.github/workflows/create_website_pr.yml +++ b/.github/workflows/create_website_pr.yml @@ -22,7 +22,7 @@ jobs: python-version: 3.8 - name: Install deps run: | - pip install requests sh click + pip install -r requirements-dev.txt - name: Versions run: | gcc --version diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 894e28c0fe..65d5feb68e 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -18,7 +18,7 @@ jobs: run: | sudo apt-add-repository -y -u ppa:pybricks/ppa sudo apt-get install -y black gettext uncrustify - pip3 install polib + pip3 install -r requirements-dev.txt - name: Populate selected submodules run: git submodule update --init extmod/ulab - name: Set PY diff --git a/ports/raspberrypi/sdk b/ports/raspberrypi/sdk index 12538a7c45..9323b67fce 160000 --- a/ports/raspberrypi/sdk +++ b/ports/raspberrypi/sdk @@ -1 +1 @@ -Subproject commit 12538a7c456607b7abe3b88c606c62b6f7342b46 +Subproject commit 9323b67fce48119b0080854d48abc6b1425e327e diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000000..1c956f0f98 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,33 @@ +# For string compression +huffman + +# For nvm.toml +cascadetoml +jinja2 +typer + +requests +sh +click +setuptools +cpp-coveralls + +# For docs +Sphinx<4 +sphinx-rtd-theme +recommonmark +sphinx-autoapi +sphinxcontrib-svg2pdfconverter + +# For translate check +polib + +# For pre-commit +pyyaml +astroid +isort +black +mypy + +# For uploading artifacts +awscli From 40829d4cc85394513ca631cff23254344e29786c Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Fri, 19 Mar 2021 20:30:37 -0500 Subject: [PATCH 104/261] switch to > in displayio_area_canon --- shared-module/displayio/__init__.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index 18d08c530e..d238c28167 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -321,12 +321,12 @@ bool displayio_area_empty(const displayio_area_t *a) { } void displayio_area_canon(displayio_area_t *a) { - if (a->x1 < a->x2) { + if (a->x1 > a->x2) { int16_t t = a->x1; a->x1 = a->x2; a->x2 = t; } - if (a->y1 < a->y2) { + if (a->y1 > a->y2) { int16_t t = a->y1; a->y1 = a->y2; a->y2 = t; From 95ac6c716b1f4e9172005b9f8b287d6a4c31836b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 18 Mar 2021 09:37:57 -0500 Subject: [PATCH 105/261] rotozoom: switch to using set_dirty_area + write_pixel --- shared-module/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 1c7f36ca2e..dd39549993 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -205,7 +205,7 @@ void common_hal_bitmaptools_rotozoom(displayio_bitmap_t *self, int16_t ox, int16 if (u >= source_clip0_x && u < source_clip1_x && v >= source_clip0_y && v < source_clip1_y) { uint32_t c = common_hal_displayio_bitmap_get_pixel(source, u, v); if ((skip_index_none) || (c != skip_index)) { - common_hal_displayio_bitmap_set_pixel(self, x, y, c); + displayio_bitmap_write_pixel(self, x, y, c); } } u += duRow; From 9b188934d1c7d11dbfcfb2131692233690d19e93 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Fri, 19 Mar 2021 21:23:55 -0500 Subject: [PATCH 106/261] off by one error in rotozoom dirty_area --- shared-module/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index dd39549993..2f70e43341 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -195,7 +195,7 @@ void common_hal_bitmaptools_rotozoom(displayio_bitmap_t *self, int16_t ox, int16 float rowu = startu + miny * duCol; float rowv = startv + miny * dvCol; - displayio_area_t dirty_area = {minx, miny, maxx, maxy}; + displayio_area_t dirty_area = {minx, miny, maxx + 1, maxy + 1}; displayio_bitmap_set_dirty_area(self, &dirty_area); for (y = miny; y <= maxy; y++) { From 8884682cacc23ab036ffcfeec0b080b5f0662fd3 Mon Sep 17 00:00:00 2001 From: lady ada Date: Sat, 20 Mar 2021 12:03:51 -0400 Subject: [PATCH 107/261] adventure together with rotary trinkey --- .github/workflows/build.yml | 1 + .../boards/rotary_trinkey_m0/board.c | 40 ++++++++++++++ .../boards/rotary_trinkey_m0/mpconfigboard.h | 54 +++++++++++++++++++ .../boards/rotary_trinkey_m0/mpconfigboard.mk | 34 ++++++++++++ .../boards/rotary_trinkey_m0/pins.c | 9 ++++ 5 files changed, 138 insertions(+) create mode 100644 ports/atmel-samd/boards/rotary_trinkey_m0/board.c create mode 100644 ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/rotary_trinkey_m0/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7d0f8a981..61545f7cc7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -303,6 +303,7 @@ jobs: - "raspberry_pi_pico" - "raytac_mdbt50q-db-40" - "robohatmm1_m4" + - "rotary_trinkey_m0" - "sam32" - "same54_xplained" - "seeeduino_wio_terminal" diff --git a/ports/atmel-samd/boards/rotary_trinkey_m0/board.c b/ports/atmel-samd/boards/rotary_trinkey_m0/board.c new file mode 100644 index 0000000000..cde441b3d9 --- /dev/null +++ b/ports/atmel-samd/boards/rotary_trinkey_m0/board.c @@ -0,0 +1,40 @@ +/* + * 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 "common-hal/microcontroller/Pin.h" +#include "supervisor/shared/board.h" +#include "hal/include/hal_gpio.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.h new file mode 100644 index 0000000000..2b06b31ede --- /dev/null +++ b/ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.h @@ -0,0 +1,54 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit Rotary Trinkey M0" +#define MICROPY_HW_MCU_NAME "samd21e18" + +#define MICROPY_HW_NEOPIXEL (&pin_PA01) + +#define MICROPY_PORT_A (0) +#define MICROPY_PORT_B (0) +#define MICROPY_PORT_C (0) + +#define IGNORE_PIN_PA02 1 +#define IGNORE_PIN_PA03 1 +#define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PA08 1 +#define IGNORE_PIN_PA09 1 +#define IGNORE_PIN_PA10 1 +#define IGNORE_PIN_PA11 1 +#define IGNORE_PIN_PA12 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA15 1 +#define IGNORE_PIN_PA16 1 +#define IGNORE_PIN_PA17 1 +#define IGNORE_PIN_PA18 1 +#define IGNORE_PIN_PA19 1 +#define IGNORE_PIN_PA20 1 +#define IGNORE_PIN_PA21 1 +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 +#define IGNORE_PIN_PA28 1 +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 +#define IGNORE_PIN_PB00 1 +#define IGNORE_PIN_PB01 1 +#define IGNORE_PIN_PB02 1 +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PB04 1 +#define IGNORE_PIN_PB05 1 +#define IGNORE_PIN_PB06 1 +#define IGNORE_PIN_PB07 1 +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB09 1 +#define IGNORE_PIN_PB10 1 +#define IGNORE_PIN_PB11 1 +#define IGNORE_PIN_PB12 1 +#define IGNORE_PIN_PB13 1 +#define IGNORE_PIN_PB14 1 +#define IGNORE_PIN_PB15 1 +#define IGNORE_PIN_PB16 1 +#define IGNORE_PIN_PB17 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PB30 1 +#define IGNORE_PIN_PB31 1 diff --git a/ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.mk new file mode 100644 index 0000000000..b071378c1d --- /dev/null +++ b/ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.mk @@ -0,0 +1,34 @@ +USB_VID = 0x239A +USB_PID = 0x80FC +USB_PRODUCT = "Rotary Trinkey M0" +USB_MANUFACTURER = "Adafruit Industries LLC" + +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE + +CIRCUITPY_ANALOGIO = 0 +CIRCUITPY_ROTARYIO = 1 +CIRCUITPY_RTC = 0 +CIRCUITPY_SAMD = 0 +CIRCUITPY_PS2IO = 0 +CIRCUITPY_PULSEIO = 0 +CIRCUITPY_PWMIO = 0 +CIRCUITPY_AUDIOCORE = 0 +CIRCUITPY_BUSIO = 0 +CIRCUITPY_STORAGE = 0 + +CIRCUITPY_MATH = 0 +CIRCUITPY_PIXELBUF = 1 +CIRCUITPY_USB_MIDI = 1 +CIRCUITPY_TOUCHIO = 0 +CIRCUITPY_FULL_BUILD = 0 + +SUPEROPT_GC = 0 +SUPEROPT_VM = 0 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/atmel-samd/boards/rotary_trinkey_m0/pins.c b/ports/atmel-samd/boards/rotary_trinkey_m0/pins.c new file mode 100644 index 0000000000..cd014fcb64 --- /dev/null +++ b/ports/atmel-samd/boards/rotary_trinkey_m0/pins.c @@ -0,0 +1,9 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA01) }, + { MP_ROM_QSTR(MP_QSTR_ROTB), MP_ROM_PTR(&pin_PA00) }, + { MP_ROM_QSTR(MP_QSTR_ROTA), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_PA27) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 7229fe631d5aa3b2cf7e73948b12ea93ff52587d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 21 Mar 2021 13:37:38 -0500 Subject: [PATCH 108/261] Fix reading 4-bit data --- shared-module/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 5f105ea331..53f5877c32 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -464,7 +464,7 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *f int byte_offset = x / 2; int bit_offset = 4 * (reverse_pixels_in_element ? (1 - x % 2) : x % 2); - value = (rowdata8[byte_offset] >> bit_offset) & 7; + value = (rowdata8[byte_offset] >> bit_offset) & 15; break; } case 8: From c64fccbeeee641f448b14de879ba8b982751ac0f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 21 Mar 2021 13:48:08 -0500 Subject: [PATCH 109/261] hex may be more obvious --- shared-module/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 53f5877c32..ac214a125e 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -464,7 +464,7 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *f int byte_offset = x / 2; int bit_offset = 4 * (reverse_pixels_in_element ? (1 - x % 2) : x % 2); - value = (rowdata8[byte_offset] >> bit_offset) & 15; + value = (rowdata8[byte_offset] >> bit_offset) & 0xf; break; } case 8: From ebd60116336694478fedd3763ec50d24518b21bc Mon Sep 17 00:00:00 2001 From: lady ada Date: Sun, 21 Mar 2021 14:58:18 -0400 Subject: [PATCH 110/261] add USBBOOT switch, move RX pin, re-enable UART (tested) --- ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h | 4 ++-- ports/raspberrypi/boards/qtpy_rp2040/pins.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h index f5734b5131..0ba490e810 100644 --- a/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h @@ -10,8 +10,8 @@ #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO3) #define DEFAULT_SPI_BUS_MISO (&pin_GPIO4) -// #define DEFAULT_UART_BUS_RX (&pin_PA11) -// #define DEFAULT_UART_BUS_TX (&pin_PA10) +#define DEFAULT_UART_BUS_RX (&pin_GPIO5) +#define DEFAULT_UART_BUS_TX (&pin_GPIO20) // Flash chip is GD25Q64 connected over QSPI #define TOTAL_FLASH_SIZE (8 * 1024 * 1024) diff --git a/ports/raspberrypi/boards/qtpy_rp2040/pins.c b/ports/raspberrypi/boards/qtpy_rp2040/pins.c index e0ebd0032b..d7c97560a8 100644 --- a/ports/raspberrypi/boards/qtpy_rp2040/pins.c +++ b/ports/raspberrypi/boards/qtpy_rp2040/pins.c @@ -22,8 +22,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO20) }, - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO9) }, - { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO6) }, @@ -37,13 +37,13 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_GPIO22) }, { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, - // { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From c63093c1302957a86034f58daf16b411814103b4 Mon Sep 17 00:00:00 2001 From: Jose David M Date: Sat, 20 Mar 2021 15:13:51 +0000 Subject: [PATCH 111/261] Translated using Weblate (Spanish) Currently translated at 100.0% (970 of 970 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/es.po b/locale/es.po index d5b28217bc..c51351075f 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-19 16:35+0000\n" +"PO-Revision-Date: 2021-03-21 21:29+0000\n" "Last-Translator: Jose David M \n" "Language-Team: \n" "Language: es\n" @@ -351,7 +351,7 @@ msgstr "Todos los periféricos UART están siendo usados" #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" -msgstr "" +msgstr "Todos los canales esta en uso" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" From 488e20dc43073155be1aaca27d957111328b57e5 Mon Sep 17 00:00:00 2001 From: Hugo Dahl Date: Sat, 20 Mar 2021 15:29:47 +0000 Subject: [PATCH 112/261] Translated using Weblate (French) Currently translated at 100.0% (970 of 970 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index f62a5d634d..301c0bc958 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-16 14:54+0000\n" +"PO-Revision-Date: 2021-03-21 21:29+0000\n" "Last-Translator: Hugo Dahl \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -351,7 +351,7 @@ msgstr "Tous les périphériques UART sont utilisés" #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" -msgstr "" +msgstr "Tout les canaux sont utilisés" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" @@ -479,7 +479,7 @@ msgstr "Au-dessous de la fréquence d'images minimale" #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must be sequential pins" -msgstr "" +msgstr "Bit clock et word select doivent êtres sur des broches séquentielles" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must share a clock unit" @@ -1138,10 +1138,13 @@ msgstr "Taille du programme d'initialisation non valide" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Initial set pin direction conflicts with initial out pin direction" msgstr "" +"Direction initiale de \"set pin\" est en conflit avec la direction initiale " +"de \"out pin\"" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Initial set pin state conflicts with initial out pin state" msgstr "" +"État initial de \"set pin\" est en conflit avec l'état initial de \"out pin\"" #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" @@ -1758,7 +1761,7 @@ msgstr "PWM slice déja utilisée" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice channel A already in use" -msgstr "" +msgstr "Canal A de PWM slice est utilisé" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c @@ -3294,7 +3297,7 @@ msgstr "arguments invalides" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" -msgstr "" +msgstr "bits_per_pixel %d est invalid, doit être 1, 4, 8, 16, 24 ou 32" #: extmod/modussl_axtls.c msgid "invalid cert" @@ -3307,12 +3310,12 @@ msgstr "index invalide pour dupterm" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element size %d for bits_per_pixel %d\n" -msgstr "" +msgstr "taille d'élément %d est invalide pour bits_per_pixel %d\n" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element_size %d, must be, 1, 2, or 4" -msgstr "" +msgstr "element_size %d est invalide, doit être 1, 2 ou 4" #: extmod/modframebuf.c msgid "invalid format" @@ -3854,7 +3857,7 @@ msgstr "les deux boutons appuyés lors du démarrage.\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" -msgstr "" +msgstr "masque pull est en conflit avec les masques de direction" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" From ea23a74d2f82505a16b33eee474a8cb379329a69 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Sat, 20 Mar 2021 20:30:53 +0000 Subject: [PATCH 113/261] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (970 of 970 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 8cbb739c4a..27ec357aea 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-03-17 21:24+0000\n" +"PO-Revision-Date: 2021-03-21 21:29+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -353,7 +353,7 @@ msgstr "Todos os periféricos UART estão em uso" #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" -msgstr "" +msgstr "Todos os canais estão em uso" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" From 36ae69ab6f478b22e3eb8b5c3485b58e16a6671c Mon Sep 17 00:00:00 2001 From: lady ada Date: Sun, 21 Mar 2021 18:44:32 -0400 Subject: [PATCH 114/261] qtpy is more of a button than a switch! add itsybitsy rev C files --- .github/workflows/build.yml | 1 + .../boards/adafruit_itsybitsy_rp2040/board.c | 44 +++++++++++++++++++ .../adafruit_itsybitsy_rp2040/mpconfigboard.h | 17 +++++++ .../mpconfigboard.mk | 9 ++++ .../boards/adafruit_itsybitsy_rp2040/pins.c | 43 ++++++++++++++++++ ports/raspberrypi/boards/qtpy_rp2040/pins.c | 2 +- 6 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/board.c create mode 100644 ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5dae90ccec..f4b80d2a75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -176,6 +176,7 @@ jobs: - "8086_commander" - "ADM_B_NRF52840_1" - "TG-Watch" + - "adafruit_itsybitsy_rp2040" - "adafruit_feather_rp2040" - "aloriumtech_evo_m51" - "aramcon_badge_2019" diff --git a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/board.c b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/board.c new file mode 100644 index 0000000000..e05589883d --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/board.c @@ -0,0 +1,44 @@ +/* + * 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" + +void board_init(void) { + common_hal_never_reset_pin(&pin_GPIO16); + gpio_init(16); + gpio_set_dir(16, GPIO_OUT); + gpio_put(16, true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.h new file mode 100644 index 0000000000..8e36eb1989 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.h @@ -0,0 +1,17 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit ItsyBitsy RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO17) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO18) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO19) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO20) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) + +// Flash chip is W25Q64 connected over QSPI +#define TOTAL_FLASH_SIZE (8 * 1024 * 1024) diff --git a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.mk new file mode 100644 index 0000000000..9d1d151415 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x239A +USB_PID = 0x80FE +USB_PRODUCT = "ItsyBitsy RP2040" +USB_MANUFACTURER = "Adafruit" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c new file mode 100644 index 0000000000..5c83bf3d74 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c @@ -0,0 +1,43 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/raspberrypi/boards/qtpy_rp2040/pins.c b/ports/raspberrypi/boards/qtpy_rp2040/pins.c index d7c97560a8..150aa374ed 100644 --- a/ports/raspberrypi/boards/qtpy_rp2040/pins.c +++ b/ports/raspberrypi/boards/qtpy_rp2040/pins.c @@ -37,7 +37,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_GPIO22) }, { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_GPIO23) }, From 10c9f6135213fb3ee7637c571f2b50c19888b94e Mon Sep 17 00:00:00 2001 From: lady ada Date: Sun, 21 Mar 2021 19:11:15 -0400 Subject: [PATCH 115/261] fix sort --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4b80d2a75..1a74173751 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -176,8 +176,8 @@ jobs: - "8086_commander" - "ADM_B_NRF52840_1" - "TG-Watch" - - "adafruit_itsybitsy_rp2040" - "adafruit_feather_rp2040" + - "adafruit_itsybitsy_rp2040" - "aloriumtech_evo_m51" - "aramcon_badge_2019" - "arduino_mkr1300" From 76c1ae7194327fa377612cc801174adf9c2beedd Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Mon, 22 Mar 2021 09:12:26 +0300 Subject: [PATCH 116/261] fix for MX25R1635F QSPI mode of operation --- supervisor/shared/external_flash/devices.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/supervisor/shared/external_flash/devices.h b/supervisor/shared/external_flash/devices.h index edc6419ef9..ae98065caf 100644 --- a/supervisor/shared/external_flash/devices.h +++ b/supervisor/shared/external_flash/devices.h @@ -568,17 +568,17 @@ typedef struct { .single_status_byte = true, \ } -// Settings for the Macronix MX25R1635F 8MiB SPI flash. +// Settings for the Macronix MX25R1635F 2MiB SPI flash. // Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7595/MX25R1635F,%20Wide%20Range,%2016Mb,%20v1.6.pdf -// In low power mode, quad operations can only run at 8 MHz. +// In low power mode, quad operations can only run at 8 MHz. In high power mode it can do 80 MHz. #define MX25R1635F { \ .total_size = (1 << 21), /* 2 MiB */ \ .start_up_time_us = 800, \ .manufacturer_id = 0xc2, \ .memory_type = 0x28, \ .capacity = 0x15, \ - .max_clock_speed_mhz = 33, /* 8 mhz for dual/quad */ \ - .quad_enable_bit_mask = 0x80, \ + .max_clock_speed_mhz = 8, /* 33 MHz for 1-bit operations */ \ + .quad_enable_bit_mask = 0x40, \ .has_sector_protection = false, \ .supports_fast_read = true, \ .supports_qspi = true, \ From 5a0e9945e6efeebf29a4a63f0424eaed62d02a17 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 22 Mar 2021 11:45:29 -0500 Subject: [PATCH 117/261] storage: Correct when we check for USB mounts Closes #4417 --- shared-module/storage/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/storage/__init__.c b/shared-module/storage/__init__.c index db994158d6..5c743377df 100644 --- a/shared-module/storage/__init__.c +++ b/shared-module/storage/__init__.c @@ -149,7 +149,7 @@ void common_hal_storage_remount(const char *mount_path, bool readonly, bool disa mp_raise_OSError(MP_EINVAL); } - #ifdef USB_AVAILABLE + #if CIRCUITPY_USB_MSC if (!usb_msc_ejected()) { mp_raise_RuntimeError(translate("Cannot remount '/' when USB is active.")); } From 904e94abeb6f5a94f26d4467ce8f69ba00b727e8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 22 Mar 2021 15:04:57 -0500 Subject: [PATCH 118/261] make declatations of usb_msc_ routines conditional .. as suggested by @dhalbert --- supervisor/usb.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/supervisor/usb.h b/supervisor/usb.h index 1c709926a7..f8fd713715 100644 --- a/supervisor/usb.h +++ b/supervisor/usb.h @@ -54,8 +54,10 @@ void usb_init(void); void usb_disconnect(void); // Propagate plug/unplug events to the MSC logic. +#if CIRCUITPY_USB_MSC void usb_msc_mount(void); void usb_msc_umount(void); bool usb_msc_ejected(void); +#endif #endif // MICROPY_INCLUDED_SUPERVISOR_USB_H From 24831a79d3564f88f06ef49093f042919454d06b Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Mon, 22 Mar 2021 16:38:56 -0500 Subject: [PATCH 119/261] update logic for transform_xy --- shared-module/displayio/TileGrid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/displayio/TileGrid.c b/shared-module/displayio/TileGrid.c index 347eba577e..0b0e0479cf 100644 --- a/shared-module/displayio/TileGrid.c +++ b/shared-module/displayio/TileGrid.c @@ -583,7 +583,7 @@ displayio_area_t *displayio_tilegrid_get_refresh_areas(displayio_tilegrid_t *sel } if (self->partial_change) { - if (self->absolute_transform->transpose_xy) { + if (self->transpose_xy != self->absolute_transform->transpose_xy) { int16_t x1 = self->dirty_area.x1; self->dirty_area.x1 = self->absolute_transform->x + self->absolute_transform->dx * (self->y + self->dirty_area.y1); self->dirty_area.y1 = self->absolute_transform->y + self->absolute_transform->dy * (self->x + x1); From f200e6a21e851ab541027d33baf897fa5e5d4b0c Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 22 Mar 2021 15:24:27 -0700 Subject: [PATCH 120/261] Fix doc build and address feedback --- conf.py | 1 + ports/raspberrypi/Makefile | 1 - ports/raspberrypi/gen_stage2.py | 6 +++--- ports/raspberrypi/stage2.c.jinja | 1 - ports/raspberrypi/supervisor/internal_flash.c | 6 +++++- ports/raspberrypi/supervisor/port.c | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/conf.py b/conf.py index 10bd0d9ce0..43ff72d1a2 100644 --- a/conf.py +++ b/conf.py @@ -154,6 +154,7 @@ exclude_patterns = ["**/build*", ".env", ".venv", ".direnv", + "data", "docs/autoapi", "docs/README.md", "drivers", diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index bae5ced98b..30648ba8ee 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -233,7 +233,6 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) SRC_COMMON_HAL_SHARED_MODULE_EXPANDED = $(sort $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)) SRC_S = supervisor/$(CHIP_FAMILY)_cpu.s -BOOT2_S_UPPER ?= sdk/src/rp2_common/boot_stage2/boot2_generic_03h.S BOOT2_S_CFLAGS ?= -DPICO_FLASH_SPI_CLKDIV=4 SRC_S_UPPER = sdk/src/rp2_common/hardware_divider/divider.S \ sdk/src/rp2_common/hardware_irq/irq_handler_chain.S \ diff --git a/ports/raspberrypi/gen_stage2.py b/ports/raspberrypi/gen_stage2.py index d552bfc88a..87580eb87b 100644 --- a/ports/raspberrypi/gen_stage2.py +++ b/ports/raspberrypi/gen_stage2.py @@ -6,11 +6,11 @@ from jinja2 import Template def main(input_template: pathlib.Path, output_path: pathlib.Path, skus: str = typer.Argument("")): - if ", " in skus: - skus = skus.split(", ") + if "," in skus: + skus = skus.split(",") else: skus = [skus] - skus = ['sku="{}"'.format(f) for f in skus] + skus = ['sku="{}"'.format(f.strip()) for f in skus] flashes = cascadetoml.filter_toml(pathlib.Path("../../data/nvm.toml"), skus) if len(skus) == 0: diff --git a/ports/raspberrypi/stage2.c.jinja b/ports/raspberrypi/stage2.c.jinja index 6cdfc095d1..13de7bff9f 100644 --- a/ports/raspberrypi/stage2.c.jinja +++ b/ports/raspberrypi/stage2.c.jinja @@ -1,6 +1,5 @@ #include "sdk/src/rp2040/hardware_structs/include/hardware/structs/ssi.h" #include "sdk/src/rp2040/hardware_structs/include/hardware/structs/pads_qspi.h" -#include "sdk/src/rp2040/hardware_structs/include/hardware/structs/watchdog.h" #include "sdk/src/rp2040/hardware_regs/include/hardware/regs/addressmap.h" #include "sdk/src/rp2040/hardware_regs/include/hardware/regs/m0plus.h" diff --git a/ports/raspberrypi/supervisor/internal_flash.c b/ports/raspberrypi/supervisor/internal_flash.c index 03ba2af123..51068e184a 100644 --- a/ports/raspberrypi/supervisor/internal_flash.c +++ b/ports/raspberrypi/supervisor/internal_flash.c @@ -69,7 +69,11 @@ void supervisor_flash_init(void) { uint8_t data[4]; flash_do_cmd(cmd, data, 4); uint8_t power_of_two = 21; - if (data[3] >= 20 && data[3] < 30) { + // Flash must be at least 2MB (1 << 21) because we use the first 1MB for the + // CircuitPython core. We validate the range because Adesto Tech flash chips + // don't return the correct value. So, we default to 2MB which will work for + // larger chips, it just won't use all of the space. + if (data[3] >= 21 && data[3] < 30) { power_of_two = data[3]; } _flash_size = 1 << power_of_two; diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 794db41dc9..9b3e140a85 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -88,7 +88,7 @@ safe_mode_t port_init(void) { // Set brown out. // Copy all of the "tightly coupled memory" code and data to run from RAM. - // This let's us use the 16k cache for dynamically used data and code. + // This lets us use the 16k cache for dynamically used data and code. // We must do this before we try and call any of its code or load the data. for (uint32_t i = 0; i < ((size_t)&_ld_itcm_size) / 4; i++) { (&_ld_itcm_destination)[i] = (&_ld_itcm_flash_copy)[i]; From 67c039db432394ce89c9b9b1fa1f87372d48230f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 22 Mar 2021 16:15:55 -0700 Subject: [PATCH 121/261] Checkout before installing deps --- .github/workflows/build.yml | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb20754729..e8859ec33e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -132,15 +132,6 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - - name: Install dependencies - run: | - brew install gettext - echo >>$GITHUB_PATH /usr/local/opt/gettext/bin - - name: Versions - run: | - gcc --version - python3 --version - msgfmt --version - uses: actions/checkout@v2.2.0 with: submodules: true @@ -150,6 +141,15 @@ jobs: run: | git describe --dirty --tags echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags) + - name: Install dependencies + run: | + brew install gettext + echo >>$GITHUB_PATH /usr/local/opt/gettext/bin + - name: Versions + run: | + gcc --version + python3 --version + msgfmt --version - name: Build mpy-cross run: make -C mpy-cross -j2 - uses: actions/upload-artifact@v2 @@ -355,6 +355,11 @@ jobs: uses: actions/setup-python@v1 with: python-version: 3.8 + - uses: actions/checkout@v2.2.0 + with: + submodules: true + fetch-depth: 0 + - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* - name: Install deps run: | sudo apt-get install -y gettext @@ -366,11 +371,6 @@ jobs: gcc --version arm-none-eabi-gcc --version python3 --version - - uses: actions/checkout@v2.2.0 - with: - submodules: true - fetch-depth: 0 - - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* - name: mpy-cross run: make -C mpy-cross -j2 - name: build @@ -404,6 +404,11 @@ jobs: uses: actions/setup-python@v1 with: python-version: 3.8 + - uses: actions/checkout@v2.2.0 + with: + submodules: true + fetch-depth: 0 + - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* - name: Install deps run: | sudo apt-get install -y gettext @@ -415,11 +420,6 @@ jobs: gcc --version riscv64-unknown-elf-gcc --version python3 --version - - uses: actions/checkout@v2.2.0 - with: - submodules: true - fetch-depth: 0 - - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* - name: mpy-cross run: make -C mpy-cross -j2 - name: build From c106b432c50130e34da5c9630d3d9aac0d9f88d2 Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Mon, 22 Mar 2021 20:03:26 -0500 Subject: [PATCH 122/261] swap recvfrom_into() port byte-order --- ports/esp32s2/common-hal/socketpool/Socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/common-hal/socketpool/Socket.c b/ports/esp32s2/common-hal/socketpool/Socket.c index 385d71b54d..7c6f66c825 100644 --- a/ports/esp32s2/common-hal/socketpool/Socket.c +++ b/ports/esp32s2/common-hal/socketpool/Socket.c @@ -229,7 +229,7 @@ mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t *se if (!timed_out) { memcpy((void *)ip, (void *)&source_addr.sin_addr.s_addr, sizeof(source_addr.sin_addr.s_addr)); - *port = source_addr.sin_port; + *port = htons(source_addr.sin_port); } else { mp_raise_OSError(ETIMEDOUT); } From 3b613ff97c1e9e96bb71a6685fd19be5049499e0 Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Sat, 13 Mar 2021 07:03:36 -0500 Subject: [PATCH 123/261] [spi_flash] handle reentrance gracefully Report failure instead of deadlocking the device --- supervisor/shared/external_flash/spi_flash.c | 24 +++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/supervisor/shared/external_flash/spi_flash.c b/supervisor/shared/external_flash/spi_flash.c index 3ddd92b5ed..4f7d5f6d3a 100644 --- a/supervisor/shared/external_flash/spi_flash.c +++ b/supervisor/shared/external_flash/spi_flash.c @@ -42,10 +42,12 @@ const external_flash_device *flash_device; uint32_t spi_flash_baudrate; // Enable the flash over SPI. -static void flash_enable(void) { - while (!common_hal_busio_spi_try_lock(&supervisor_flash_spi_bus)) { +static bool flash_enable(void) { + if (common_hal_busio_spi_try_lock(&supervisor_flash_spi_bus)) { + common_hal_digitalio_digitalinout_set_value(&cs_pin, false); + return true; } - common_hal_digitalio_digitalinout_set_value(&cs_pin, false); + return false; } // Disable the flash over SPI. @@ -54,8 +56,10 @@ static void flash_disable(void) { common_hal_busio_spi_unlock(&supervisor_flash_spi_bus); } -static bool transfer(uint8_t *command, uint32_t command_length, uint8_t *data_in, uint8_t *data_out, uint32_t data_length) { - flash_enable(); +static bool transfer(uint8_t* command, uint32_t command_length, uint8_t* data_in, uint8_t* data_out, uint32_t data_length) { + if (!flash_enable()) { + return false; + } bool status = common_hal_busio_spi_write(&supervisor_flash_spi_bus, command, command_length); if (status) { if (data_in != NULL && data_out != NULL) { @@ -103,7 +107,9 @@ bool spi_flash_write_data(uint32_t address, uint8_t *data, uint32_t data_length) uint8_t request[4] = {CMD_PAGE_PROGRAM, 0x00, 0x00, 0x00}; // Write the SPI flash write address into the bytes following the command byte. address_to_bytes(address, request + 1); - flash_enable(); + if (!flash_enable()) { + return false; + } common_hal_busio_spi_configure(&supervisor_flash_spi_bus, spi_flash_baudrate, 0, 0, 8); bool status = common_hal_busio_spi_write(&supervisor_flash_spi_bus, request, 4); if (status) { @@ -120,9 +126,11 @@ bool spi_flash_read_data(uint32_t address, uint8_t *data, uint32_t data_length) request[0] = CMD_FAST_READ_DATA; command_length = 5; } - // Write the SPI flash write address into the bytes following the command byte. + // Write the SPI flash read address into the bytes following the command byte. address_to_bytes(address, request + 1); - flash_enable(); + if (!flash_enable()) { + return false; + } common_hal_busio_spi_configure(&supervisor_flash_spi_bus, spi_flash_baudrate, 0, 0, 8); bool status = common_hal_busio_spi_write(&supervisor_flash_spi_bus, request, command_length); if (status) { From 36edc4bb89a01d3dcb5d7694dc889c91ddbdf50b Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 23 Mar 2021 09:06:48 -0700 Subject: [PATCH 124/261] Improve Winbond naming and correct board settings --- data/nvm.toml | 2 +- .../boards/adafruit_itsybitsy_rp2040/mpconfigboard.mk | 2 +- ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.mk | 2 +- ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.mk | 2 +- ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk | 2 +- ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk | 2 +- ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk | 2 +- .../boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk | 2 +- .../boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk | 2 +- ports/raspberrypi/gen_stage2.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data/nvm.toml b/data/nvm.toml index da5054787d..9b4a5241d8 160000 --- a/data/nvm.toml +++ b/data/nvm.toml @@ -1 +1 @@ -Subproject commit da5054787d5a428823b5bd032e810edf8105fc02 +Subproject commit 9b4a5241d8c3310b31a7925a4f2160743890a2e4 diff --git a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.mk index 60142c8412..965acff277 100644 --- a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ" diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.mk index 4c124a843f..8258f87833 100644 --- a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ" diff --git a/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.mk index 97ce534cbe..ad343c4e0d 100644 --- a/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.mk @@ -6,6 +6,6 @@ USB_MANUFACTURER = "Pimoroni" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk index ec71b4c895..f00fb64cc9 100644 --- a/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk @@ -6,6 +6,6 @@ USB_MANUFACTURER = "Pimoroni" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "W25Q128JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk index ffb8dce40a..7487782237 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk @@ -6,6 +6,6 @@ USB_MANUFACTURER = "Pimoroni" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ" CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk index cce83ba153..608ca280df 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk +++ b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk @@ -6,6 +6,6 @@ USB_MANUFACTURER = "Raspberry Pi" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk index 0f32d5c06f..d02d14267f 100644 --- a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "SparkFun" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "W25Q128JV_IM" +EXTERNAL_FLASH_DEVICES = "W25Q128JVxM" diff --git a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk index caffdf85c8..101adbfa4b 100644 --- a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "SparkFun" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "W25Q128JV_IM" +EXTERNAL_FLASH_DEVICES = "W25Q128JVxM" diff --git a/ports/raspberrypi/gen_stage2.py b/ports/raspberrypi/gen_stage2.py index 87580eb87b..4a67905183 100644 --- a/ports/raspberrypi/gen_stage2.py +++ b/ports/raspberrypi/gen_stage2.py @@ -36,7 +36,7 @@ def main(input_template: pathlib.Path, output_path: pathlib.Path, skus: str = ty return None return shared_value - quad_enable_status_byte = all_match(flashes["nvm"], "quad_enable_status_byte", 0) + quad_enable_status_byte = all_match(flashes["nvm"], "quad_enable_status_byte", None) quad_enable_bit_mask = all_match(flashes["nvm"], "quad_enable_bit_mask") continuous_status_write = all_have(flashes["nvm"], "01_continuous_status_write") split_status_write = all_have(flashes["nvm"], "write_status_register_split") From cde659651be7dd1aeb3fca481229402a7fa284b2 Mon Sep 17 00:00:00 2001 From: felixerdy Date: Tue, 23 Mar 2021 19:17:45 +0100 Subject: [PATCH 125/261] add brown out detect level --- ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h index 96d11bbeea..13aca289f6 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h +++ b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h @@ -17,6 +17,8 @@ #define DEFAULT_UART_BUS_RX (&pin_PA23) #define DEFAULT_UART_BUS_TX (&pin_PA22) +#define SAMD21_BOD33_LEVEL (6) + // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 From 5314fddca0b61efef6b7adab746c74908fd40890 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 23 Mar 2021 16:04:02 -0500 Subject: [PATCH 126/261] remove duplicate RX/TX pin lines --- ports/mimxrt10xx/boards/metro_m7_1011/pins.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/mimxrt10xx/boards/metro_m7_1011/pins.c b/ports/mimxrt10xx/boards/metro_m7_1011/pins.c index ea9ae55290..f79dd21e9c 100644 --- a/ports/mimxrt10xx/boards/metro_m7_1011/pins.c +++ b/ports/mimxrt10xx/boards/metro_m7_1011/pins.c @@ -42,10 +42,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO_AD_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO_AD_04) }, - // UART - { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_10) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_09) }, - // I2C { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_02) }, From b440883fe55666d12f94a6d48513a1a68d218bc4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 24 Mar 2021 13:07:07 -0500 Subject: [PATCH 127/261] mimxrt: SPI: Set the TCR value returned by MasterBaudSetRate without this, the baud rate could be wrong; in my testing, it was low by a factor of 2 when requesating baudrate=1_000_000 (1MHz). When passing the baudrate in to LPSPI_MasterInit, the setting is made automatically, but LPSPI_MAster_SetBaudRate just returns it via the out-parameter tcrPrescaleValue. --- ports/mimxrt10xx/common-hal/busio/SPI.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/mimxrt10xx/common-hal/busio/SPI.c b/ports/mimxrt10xx/common-hal/busio/SPI.c index 3488ac0fbe..1b72921d31 100644 --- a/ports/mimxrt10xx/common-hal/busio/SPI.c +++ b/ports/mimxrt10xx/common-hal/busio/SPI.c @@ -187,6 +187,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self, LPSPI_Enable(self->spi, false); uint32_t tcrPrescaleValue; self->baudrate = LPSPI_MasterSetBaudRate(self->spi, config.baudRate, LPSPI_MASTER_CLK_FREQ, &tcrPrescaleValue); + self->spi->TCR = (self->spi->TCR & ~LPSPI_TCR_PRESCALE_MASK) | LPSPI_TCR_PRESCALE(tcrPrescaleValue); LPSPI_Enable(self->spi, true); claim_pin(self->clock->pin); @@ -236,6 +237,7 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self, LPSPI_Enable(self->spi, false); uint32_t tcrPrescaleValue; self->baudrate = LPSPI_MasterSetBaudRate(self->spi, baudrate, LPSPI_MASTER_CLK_FREQ, &tcrPrescaleValue); + self->spi->TCR = (self->spi->TCR & ~LPSPI_TCR_PRESCALE_MASK) | LPSPI_TCR_PRESCALE(tcrPrescaleValue); LPSPI_Enable(self->spi, true); if ((polarity == common_hal_busio_spi_get_polarity(self)) && From f79d60b20575bc848050ac213b79f86d9c317052 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 24 Mar 2021 15:03:33 -0700 Subject: [PATCH 128/261] Use GCC @file to shorten linker command length This hopefully fixes linking on Windows with cmd.exe --- ports/raspberrypi/Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 30648ba8ee..2a054516be 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -143,15 +143,11 @@ CFLAGS += \ PICO_LDFLAGS = --specs=nosys.specs -Wl,--wrap=__aeabi_ldiv0 -Wl,--wrap=__aeabi_idiv0 -Wl,--wrap=__aeabi_lmul -Wl,--wrap=__clzsi2 -Wl,--wrap=__clzdi2 -Wl,--wrap=__ctzsi2 -Wl,--wrap=__ctzdi2 -Wl,--wrap=__popcountsi2 -Wl,--wrap=__popcountdi2 -Wl,--wrap=__clz -Wl,--wrap=__clzl -Wl,--wrap=__clzll -Wl,--wrap=__aeabi_idiv -Wl,--wrap=__aeabi_idivmod -Wl,--wrap=__aeabi_ldivmod -Wl,--wrap=__aeabi_uidiv -Wl,--wrap=__aeabi_uidivmod -Wl,--wrap=__aeabi_uldivmod -Wl,--wrap=__aeabi_dadd -Wl,--wrap=__aeabi_ddiv -Wl,--wrap=__aeabi_dmul -Wl,--wrap=__aeabi_drsub -Wl,--wrap=__aeabi_dsub -Wl,--wrap=__aeabi_cdcmpeq -Wl,--wrap=__aeabi_cdrcmple -Wl,--wrap=__aeabi_cdcmple -Wl,--wrap=__aeabi_dcmpeq -Wl,--wrap=__aeabi_dcmplt -Wl,--wrap=__aeabi_dcmple -Wl,--wrap=__aeabi_dcmpge -Wl,--wrap=__aeabi_dcmpgt -Wl,--wrap=__aeabi_dcmpun -Wl,--wrap=__aeabi_i2d -Wl,--wrap=__aeabi_l2d -Wl,--wrap=__aeabi_ui2d -Wl,--wrap=__aeabi_ul2d -Wl,--wrap=__aeabi_d2iz -Wl,--wrap=__aeabi_d2lz -Wl,--wrap=__aeabi_d2uiz -Wl,--wrap=__aeabi_d2ulz -Wl,--wrap=__aeabi_d2f -Wl,--wrap=sqrt -Wl,--wrap=cos -Wl,--wrap=sin -Wl,--wrap=tan -Wl,--wrap=atan2 -Wl,--wrap=exp -Wl,--wrap=log -Wl,--wrap=ldexp -Wl,--wrap=copysign -Wl,--wrap=trunc -Wl,--wrap=floor -Wl,--wrap=ceil -Wl,--wrap=round -Wl,--wrap=sincos -Wl,--wrap=asin -Wl,--wrap=acos -Wl,--wrap=atan -Wl,--wrap=sinh -Wl,--wrap=cosh -Wl,--wrap=tanh -Wl,--wrap=asinh -Wl,--wrap=acosh -Wl,--wrap=atanh -Wl,--wrap=exp2 -Wl,--wrap=log2 -Wl,--wrap=exp10 -Wl,--wrap=log10 -Wl,--wrap=pow -Wl,--wrap=powint -Wl,--wrap=hypot -Wl,--wrap=cbrt -Wl,--wrap=fmod -Wl,--wrap=drem -Wl,--wrap=remainder -Wl,--wrap=remquo -Wl,--wrap=expm1 -Wl,--wrap=log1p -Wl,--wrap=fma -Wl,--wrap=__aeabi_fadd -Wl,--wrap=__aeabi_fdiv -Wl,--wrap=__aeabi_fmul -Wl,--wrap=__aeabi_frsub -Wl,--wrap=__aeabi_fsub -Wl,--wrap=__aeabi_cfcmpeq -Wl,--wrap=__aeabi_cfrcmple -Wl,--wrap=__aeabi_cfcmple -Wl,--wrap=__aeabi_fcmpeq -Wl,--wrap=__aeabi_fcmplt -Wl,--wrap=__aeabi_fcmple -Wl,--wrap=__aeabi_fcmpge -Wl,--wrap=__aeabi_fcmpgt -Wl,--wrap=__aeabi_fcmpun -Wl,--wrap=__aeabi_i2f -Wl,--wrap=__aeabi_l2f -Wl,--wrap=__aeabi_ui2f -Wl,--wrap=__aeabi_ul2f -Wl,--wrap=__aeabi_f2iz -Wl,--wrap=__aeabi_f2lz -Wl,--wrap=__aeabi_f2uiz -Wl,--wrap=__aeabi_f2ulz -Wl,--wrap=__aeabi_f2d -Wl,--wrap=sqrtf -Wl,--wrap=cosf -Wl,--wrap=sinf -Wl,--wrap=tanf -Wl,--wrap=atan2f -Wl,--wrap=expf -Wl,--wrap=logf -Wl,--wrap=ldexpf -Wl,--wrap=copysignf -Wl,--wrap=truncf -Wl,--wrap=floorf -Wl,--wrap=ceilf -Wl,--wrap=roundf -Wl,--wrap=sincosf -Wl,--wrap=asinf -Wl,--wrap=acosf -Wl,--wrap=atanf -Wl,--wrap=sinhf -Wl,--wrap=coshf -Wl,--wrap=tanhf -Wl,--wrap=asinhf -Wl,--wrap=acoshf -Wl,--wrap=atanhf -Wl,--wrap=exp2f -Wl,--wrap=log2f -Wl,--wrap=exp10f -Wl,--wrap=log10f -Wl,--wrap=powf -Wl,--wrap=powintf -Wl,--wrap=hypotf -Wl,--wrap=cbrtf -Wl,--wrap=fmodf -Wl,--wrap=dremf -Wl,--wrap=remainderf -Wl,--wrap=remquof -Wl,--wrap=expm1f -Wl,--wrap=log1pf -Wl,--wrap=fmaf -Wl,--wrap=memcpy -Wl,--wrap=memset -Wl,--wrap=__aeabi_memcpy -Wl,--wrap=__aeabi_memset -Wl,--wrap=__aeabi_memcpy4 -Wl,--wrap=__aeabi_memset4 -Wl,--wrap=__aeabi_memcpy8 -Wl,--wrap=__aeabi_memset8 -LDFLAGS = $(CFLAGS) $(PICO_LDFLAGS) -Wl,-T,link.ld -Wl,-Map=$@.map -Wl,-cref -Wl,--gc-sections - # Use toolchain libm if we're not using our own. ifndef INTERNAL_LIBM LIBS += -lm endif -LDFLAGS += -mthumb -mcpu=cortex-m0plus - SRC_SDK := \ src/common/pico_sync/critical_section.c \ src/common/pico_sync/lock_core.c \ @@ -285,7 +281,9 @@ all: $(BUILD)/firmware.uf2 $(BUILD)/firmware.elf: $(OBJ) link.ld $(STEPECHO) "LINK $@" - $(Q)$(CC) -o $@ $(LDFLAGS) $(OBJ) + $(Q)echo $(OBJ) > $(BUILD)/firmware.objs + $(Q)echo $(PICO_LDFLAGS) > $(BUILD)/firmware.ldflags + $(Q)$(CC) -o $@ $(CFLAGS) @$(BUILD)/firmware.ldflags -Wl,-T,link.ld -Wl,-Map=$@.map -Wl,-cref -Wl,--gc-sections @$(BUILD)/firmware.objs $(Q)$(SIZE) $@ | $(PYTHON3) $(TOP)/tools/build_memory_info.py link.ld $(BUILD)/firmware.bin: $(BUILD)/firmware.elf From 36f91fe022aea54a420c8c19461c7d2d151055aa Mon Sep 17 00:00:00 2001 From: Neradoc Date: Wed, 24 Mar 2021 23:39:47 +0100 Subject: [PATCH 129/261] implement issue #4470 move the language allow list to generate_download_info() and use it there too --- tools/build_board_info.py | 41 ++++++++++++++++++++++++++++-------- tools/build_release_files.py | 23 +++++--------------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 30246bd17f..229081c771 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -84,13 +84,32 @@ aliases_by_board = { "pewpew10": ["pewpew13"], } +language_allow_list = set([ + "ID", + "de_DE", + "en_US", + "en_x_pirate", + "es", + "fil", + "fr", + "it_IT", + "ja", + "nl", + "pl", + "pt_BR", + "sv", + "zh_Latn_pinyin", +]) -def get_languages(): - languages = [] + +def get_languages(list_all = False): + languages = set() for f in os.scandir("../locale"): if f.name.endswith(".po"): - languages.append(f.name[:-3]) - return languages + languages.add(f.name[:-3]) + if not list_all: + languages = languages & language_allow_list + return sorted(list(languages)) def get_board_mapping(): @@ -163,10 +182,7 @@ def get_current_info(): return git_info, current_info -def create_pr(changes, updated, git_info, user): - commit_sha, original_blob_sha = git_info - branch_name = "new_release_" + changes["new_release"] - +def create_json(updated): # Convert the dictionary to a list of boards. Liquid templates only handle arrays. updated_list = [] all_ids = sorted(updated.keys()) @@ -174,9 +190,15 @@ def create_pr(changes, updated, git_info, user): info = updated[id] info["id"] = id updated_list.append(info) + return json.dumps(updated_list, sort_keys=True, indent=1).encode("utf-8") + b"\n" - updated = json.dumps(updated_list, sort_keys=True, indent=1).encode("utf-8") + b"\n" + +def create_pr(changes, updated, git_info, user): + commit_sha, original_blob_sha = git_info + branch_name = "new_release_" + changes["new_release"] + updated = create_json(updated) # print(updated.decode("utf-8")) + pr_title = "Automated website update for release {}".format(changes["new_release"]) boards = "" if changes["new_boards"]: @@ -302,6 +324,7 @@ def generate_download_info(): create_pr(changes, current_info, git_info, user) else: print("No new release to update") + # print(create_json(current_info).decode("utf8")) if __name__ == "__main__": diff --git a/tools/build_release_files.py b/tools/build_release_files.py index 4e22e97254..68aa45f0a0 100755 --- a/tools/build_release_files.py +++ b/tools/build_release_files.py @@ -27,23 +27,10 @@ if "BOARDS" in os.environ: sha, version = build_info.get_version_info() languages = build_info.get_languages() -language_allow_list = [ - "ID", - "de_DE", - "en_US", - "en_x_pirate", - "es", - "fil", - "fr", - "it_IT", - "ja", - "nl", - "pl", - "pt_BR", - "sv", - "zh_Latn_pinyin", -] -print("Note: Not building languages", set(languages) - set(language_allow_list)) + +all_languages = build_info.get_languages(list_all=True) + +print("Note: Not building languages", set(all_languages) - set(languages)) exit_status = 0 cores = multiprocessing.cpu_count() @@ -53,7 +40,7 @@ for board in build_boards: os.makedirs(bin_directory, exist_ok=True) board_info = all_boards[board] - for language in language_allow_list: + for language in languages: bin_directory = "../bin/{board}/{language}".format(board=board, language=language) os.makedirs(bin_directory, exist_ok=True) start_time = time.monotonic() From 6b8988379719e38164ade1d89ed10a89fd9d183f Mon Sep 17 00:00:00 2001 From: Neradoc Date: Thu, 25 Mar 2021 02:56:15 +0100 Subject: [PATCH 130/261] sort languages in a way that is not case sensitive --- tools/build_board_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 229081c771..0e62c1de77 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -109,7 +109,7 @@ def get_languages(list_all = False): languages.add(f.name[:-3]) if not list_all: languages = languages & language_allow_list - return sorted(list(languages)) + return sorted(list(languages), key = lambda s: s.casefold()) def get_board_mapping(): From 3785eb7779f24c8195b137e7221fddc921554068 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Thu, 25 Mar 2021 09:36:40 -0500 Subject: [PATCH 131/261] correct rectangle size dimensions --- shared-module/vectorio/Rectangle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared-module/vectorio/Rectangle.c b/shared-module/vectorio/Rectangle.c index 5d48cc6480..56be5ebb5e 100644 --- a/shared-module/vectorio/Rectangle.c +++ b/shared-module/vectorio/Rectangle.c @@ -12,7 +12,7 @@ void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_ uint32_t common_hal_vectorio_rectangle_get_pixel(void *obj, int16_t x, int16_t y) { vectorio_rectangle_t *self = obj; - if (x < 0 || x > self->width || y > self->height || y < 0) { + if (x < 0 || x >= self->width || y >= self->height || y < 0) { return 0; } return 1; @@ -21,8 +21,8 @@ uint32_t common_hal_vectorio_rectangle_get_pixel(void *obj, int16_t x, int16_t y void common_hal_vectorio_rectangle_get_area(void *rectangle, displayio_area_t *out_area) { vectorio_rectangle_t *self = rectangle; - out_area->x1 = -1; - out_area->y1 = -1; + out_area->x1 = 0; + out_area->y1 = 0; out_area->x2 = self->width; out_area->y2 = self->height; } From 9485805b6aa6178f2b4abe0eaefc76c4ebfc4b6d Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Thu, 25 Mar 2021 11:21:39 -0500 Subject: [PATCH 132/261] move to displayio_area_union and away from _expand --- shared-module/displayio/Group.c | 6 +++--- shared-module/displayio/TileGrid.c | 2 +- shared-module/displayio/__init__.c | 15 --------------- shared-module/displayio/area.h | 1 - shared-module/vectorio/VectorShape.c | 2 +- 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/shared-module/displayio/Group.c b/shared-module/displayio/Group.c index c50f034bf0..d1bdae2c33 100644 --- a/shared-module/displayio/Group.c +++ b/shared-module/displayio/Group.c @@ -123,7 +123,7 @@ bool displayio_group_get_previous_area(displayio_group_t *self, displayio_area_t displayio_area_copy(&layer_area, area); first = false; } else { - displayio_area_expand(area, &layer_area); + displayio_area_union(area, &layer_area, area); } } if (self->item_removed) { @@ -131,7 +131,7 @@ bool displayio_group_get_previous_area(displayio_group_t *self, displayio_area_t displayio_area_copy(&self->dirty_area, area); first = false; } else { - displayio_area_expand(area, &self->dirty_area); + displayio_area_union(area, &self->dirty_area, area); } } return !first; @@ -307,7 +307,7 @@ static void _remove_layer(displayio_group_t *self, size_t index) { if (!self->item_removed) { displayio_area_copy(&layer_area, &self->dirty_area); } else { - displayio_area_expand(&self->dirty_area, &layer_area); + displayio_area_union(&self->dirty_area, &layer_area, &self->dirty_area); } self->item_removed = true; } diff --git a/shared-module/displayio/TileGrid.c b/shared-module/displayio/TileGrid.c index 0b0e0479cf..a623a10de5 100644 --- a/shared-module/displayio/TileGrid.c +++ b/shared-module/displayio/TileGrid.c @@ -273,7 +273,7 @@ void common_hal_displayio_tilegrid_set_tile(displayio_tilegrid_t *self, uint16_t tile_area->y2 = tile_area->y1 + self->tile_height; if (self->partial_change) { - displayio_area_expand(&self->dirty_area, &temp_area); + displayio_area_union(&self->dirty_area, &temp_area, &self->dirty_area); } self->partial_change = true; diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index d238c28167..7d9dc26dd3 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -245,21 +245,6 @@ void displayio_gc_collect(void) { } } -void displayio_area_expand(displayio_area_t *original, const displayio_area_t *addition) { - if (addition->x1 < original->x1) { - original->x1 = addition->x1; - } - if (addition->y1 < original->y1) { - original->y1 = addition->y1; - } - if (addition->x2 > original->x2) { - original->x2 = addition->x2; - } - if (addition->y2 > original->y2) { - original->y2 = addition->y2; - } -} - void displayio_area_copy(const displayio_area_t *src, displayio_area_t *dst) { dst->x1 = src->x1; dst->y1 = src->y1; diff --git a/shared-module/displayio/area.h b/shared-module/displayio/area.h index b6ff1dcd29..6a8ad6ceb0 100644 --- a/shared-module/displayio/area.h +++ b/shared-module/displayio/area.h @@ -59,7 +59,6 @@ void displayio_area_canon(displayio_area_t *a); void displayio_area_union(const displayio_area_t *a, const displayio_area_t *b, displayio_area_t *u); -void displayio_area_expand(displayio_area_t *original, const displayio_area_t *addition); void displayio_area_copy(const displayio_area_t *src, displayio_area_t *dst); void displayio_area_scale(displayio_area_t *area, uint16_t scale); void displayio_area_shift(displayio_area_t *area, int16_t dx, int16_t dy); diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index c6524af9d3..62f53668c2 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -88,7 +88,7 @@ void common_hal_vectorio_vector_shape_set_dirty(void *vector_shape) { self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); self->dirty = true; // Dirty area tracks the shape's footprint between draws. It's reset on refresh finish, - displayio_area_expand(&self->ephemeral_dirty_area, ¤t_area); + displayio_area_union(&self->ephemeral_dirty_area, ¤t_area, &self->ephemeral_dirty_area); VECTORIO_SHAPE_DEBUG(" -> expanded:{(%3d,%3d), (%3d,%3d)}\n", self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); } From 56362a9806ab91b8cc9fb2d1d3e829b2ffc3f7c7 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Thu, 25 Mar 2021 11:31:07 -0500 Subject: [PATCH 133/261] remove duplicated code, replace with displayio_area_canon --- shared-module/vectorio/VectorShape.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index 62f53668c2..efc40d0356 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -55,16 +55,7 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou out_area->y2 = (out_area->y2 + self->y) * self->absolute_transform->dy + self->absolute_transform->y; } // We might have mirrored due to dx - if (out_area->x2 < out_area->x1) { - int16_t swap = out_area->x1; - out_area->x1 = out_area->x2; - out_area->x2 = swap; - } - if (out_area->y2 < out_area->y1) { - int16_t swap = out_area->y1; - out_area->y1 = out_area->y2; - out_area->y2 = swap; - } + displayio_area_canon(out_area); VECTORIO_SHAPE_DEBUG(" out:{(%5d,%5d), (%5d,%5d)}\n", out_area->x1, out_area->y1, out_area->x2, out_area->y2); } From aec0ef3cbfafb79c32592c1ee39832c787f4f202 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 24 Mar 2021 17:10:54 -0700 Subject: [PATCH 134/261] Switch devices.h to nvm.toml data --- .../boards/8086_commander/mpconfigboard.mk | 2 +- .../capablerobot_usbhub/mpconfigboard.mk | 2 +- .../circuitbrains_basic_m0/mpconfigboard.mk | 2 +- .../circuitbrains_deluxe_m4/mpconfigboard.mk | 2 +- .../boards/cp32-m4/mpconfigboard.mk | 2 +- .../boards/datalore_ip_m4/mpconfigboard.mk | 2 +- .../grandcentral_m4_express/mpconfigboard.mk | 2 +- .../hallowing_m0_express/mpconfigboard.mk | 2 +- .../boards/mini_sam_m4/mpconfigboard.mk | 2 +- .../boards/pyportal/mpconfigboard.mk | 2 +- .../boards/pyportal_titano/mpconfigboard.mk | 2 +- .../boards/robohatmm1_m4/mpconfigboard.mk | 2 +- .../seeeduino_wio_terminal/mpconfigboard.mk | 2 +- .../boards/snekboard/mpconfigboard.mk | 2 +- .../stackrduino_m0_pro/mpconfigboard.mk | 2 +- .../trellis_m4_express/mpconfigboard.mk | 2 +- .../boards/uartlogger2/mpconfigboard.mk | 2 +- .../boards/winterbloom_sol/mpconfigboard.mk | 2 +- .../nrf/boards/hiibot_bluefi/mpconfigboard.mk | 2 +- .../stm/boards/meowbit_v121/mpconfigboard.mk | 2 +- ports/stm/boards/pyb_nano_v2/mpconfigboard.mk | 2 +- .../mpconfigboard.mk | 2 +- supervisor/shared/external_flash/devices.h | 716 ------------------ .../shared/external_flash/devices.h.jinja | 96 +++ supervisor/spi_flash_api.h | 2 +- supervisor/supervisor.mk | 21 +- tools/gen_nvm_devices.py | 23 + 27 files changed, 157 insertions(+), 745 deletions(-) delete mode 100644 supervisor/shared/external_flash/devices.h create mode 100644 supervisor/shared/external_flash/devices.h.jinja create mode 100644 tools/gen_nvm_devices.py diff --git a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk index dc56219fe1..c7918ad05c 100644 --- a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk +++ b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ" +EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk index 9417c23025..42d302b087 100644 --- a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk +++ b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ" +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ" LONGINT_IMPL = MPZ # No I2S on SAMD51G diff --git a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk index e01e5ca4d5..870edb06ee 100755 --- a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ" LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 diff --git a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk index 40b5815ede..a96326c3b1 100755 --- a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, S25FL064L" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ, S25FL064L" LONGINT_IMPL = MPZ CIRCUITPY_PS2IO = 1 diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk index 9f54bd1182..dfdde0dbb0 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q128JV_PM" +EXTERNAL_FLASH_DEVICES = "W25Q128JVxM" # No I2S on SAMD51G. CIRCUITPY_AUDIOBUSIO = 0 diff --git a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk index 13e0f75c7c..b07f86c160 100644 --- a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk @@ -7,5 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ, W25Q16JV_IM" +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JVxQ, W25Q16JVxM" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk index cd43dd4d67..88c6e9bf16 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51P20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ, GD25Q64C" LONGINT_IMPL = MPZ CIRCUITPY_SDIOIO = 1 diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk index 4661a7acd0..8c51315429 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ, GD25Q64C" LONGINT_IMPL = NONE # To keep the build small diff --git a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk index 8f4c3f8904..c3e21a4c36 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q16JV_IM, W25Q16JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q16JVxM, W25Q16JVxQ" LONGINT_IMPL = MPZ # No I2S on SAMD51G diff --git a/ports/atmel-samd/boards/pyportal/mpconfigboard.mk b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk index e8c27ecbf1..0a70db50c9 100644 --- a/ports/atmel-samd/boards/pyportal/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk @@ -7,5 +7,5 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk index c9ffd09549..2202fca2f7 100644 --- a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk @@ -7,5 +7,5 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk index e964d65d5e..0ae092c693 100644 --- a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk @@ -9,7 +9,7 @@ CHIP_FAMILY = samd51 #QSPI_FLASH_FILESYSTEM = 0 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ" LONGINT_IMPL = MPZ # No I2S on SAMD51G diff --git a/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk b/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk index 7163568374..9788f5ff40 100644 --- a/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk +++ b/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51P19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ" LONGINT_IMPL = MPZ CIRCUITPY_VECTORIO = 1 diff --git a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk index 90bc6076f7..3467ef7578 100644 --- a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk +++ b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 diff --git a/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk b/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk index ee3f21b05a..fb46e99dae 100644 --- a/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk index 59a40d3dcc..81df26b0c6 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk @@ -7,7 +7,7 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ, GD25Q64C" LONGINT_IMPL = MPZ # No I2S on SAMD51G diff --git a/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk b/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk index 373cbba99c..87619b5783 100644 --- a/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk +++ b/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk @@ -7,5 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk index ce9c2585f9..81956a0b80 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk @@ -11,7 +11,7 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q64C, W25Q32JV_IQ" +EXTERNAL_FLASH_DEVICES = "GD25Q64C, W25Q32JVxQ" LONGINT_IMPL = MPZ # Disable modules that are unusable on this special-purpose board. diff --git a/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk b/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk index c85b978944..71e2a9da23 100644 --- a/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk +++ b/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "HiiBot" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" diff --git a/ports/stm/boards/meowbit_v121/mpconfigboard.mk b/ports/stm/boards/meowbit_v121/mpconfigboard.mk index 45a04a3a77..dc44095a31 100644 --- a/ports/stm/boards/meowbit_v121/mpconfigboard.mk +++ b/ports/stm/boards/meowbit_v121/mpconfigboard.mk @@ -4,7 +4,7 @@ USB_PRODUCT = "Meowbit" USB_MANUFACTURER = "Kittenbot" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = W25Q16JV_IQ +EXTERNAL_FLASH_DEVICES = W25Q16JVxQ # INTERNAL_FLASH_FILESYSTEM = 1 BOOTLOADER_OFFSET = 0x8010000 diff --git a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk index cff8eea705..31cc9b4d27 100644 --- a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk +++ b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk @@ -4,7 +4,7 @@ USB_PRODUCT = "PYB LR Nano V2" USB_MANUFACTURER = "MicroPython Chinese Community" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = W25Q64JV_IQ +EXTERNAL_FLASH_DEVICES = W25Q64JVxQ MCU_SERIES = F4 MCU_VARIANT = STM32F411xE diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk index f6fd423271..ed124ce27e 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk @@ -5,7 +5,7 @@ USB_MANUFACTURER = "Unknown" SPI_FLASH_FILESYSTEM = 1 #See supervisor/shared/external_flash/devices.h for options -EXTERNAL_FLASH_DEVICES = GD25Q16C,W25Q64FV,W25Q64JV_IQ +EXTERNAL_FLASH_DEVICES = GD25Q16C,W25Q64FV,W25Q64JVxQ LONGINT_IMPL = MPZ INTERNAL_FLASH_FILESYSTEM = 0 diff --git a/supervisor/shared/external_flash/devices.h b/supervisor/shared/external_flash/devices.h deleted file mode 100644 index ae98065caf..0000000000 --- a/supervisor/shared/external_flash/devices.h +++ /dev/null @@ -1,716 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_EXTERNAL_FLASH_DEVICES_H -#define MICROPY_INCLUDED_ATMEL_SAMD_EXTERNAL_FLASH_DEVICES_H - -#include -#include - -typedef struct { - uint32_t total_size; - uint16_t start_up_time_us; - - // Three response bytes to 0x9f JEDEC ID command. - uint8_t manufacturer_id; - uint8_t memory_type; - uint8_t capacity; - - // Max clock speed for all operations and the fastest read mode. - uint8_t max_clock_speed_mhz; - - // Bitmask for Quad Enable bit if present. 0x00 otherwise. This is for the highest byte in the - // status register. - uint8_t quad_enable_bit_mask; - - bool has_sector_protection : 1; - - // Supports the 0x0b fast read command with 8 dummy cycles. - bool supports_fast_read : 1; - - // Supports the fast read, quad output command 0x6b with 8 dummy cycles. - bool supports_qspi : 1; - - // Supports the quad input page program command 0x32. This is known as 1-1-4 because it only - // uses all four lines for data. - bool supports_qspi_writes : 1; - - // Requires a separate command 0x31 to write to the second byte of the status register. - // Otherwise two byte are written via 0x01. - bool write_status_register_split : 1; - - // True when the status register is a single byte. This implies the Quad Enable bit is in the - // first byte and the Read Status Register 2 command (0x35) is unsupported. - bool single_status_byte : 1; - - // Does not support using a ready bit within the status register - bool no_ready_bit : 1; - - // Does not support the erase command (0x20) - bool no_erase_cmd : 1; - - // Device does not have a reset command - bool no_reset_cmd : 1; -} external_flash_device; - -// Settings for the Adesto Tech AT25DF081A 1MiB SPI flash. It's on the SAMD21 -// Xplained board. -// Datasheet: https://www.adestotech.com/wp-content/uploads/doc8715.pdf -#define AT25DF081A { \ - .total_size = (1 << 20), /* 1 MiB */ \ - .start_up_time_us = 10000, \ - .manufacturer_id = 0x1f, \ - .memory_type = 0x45, \ - .capacity = 0x01, \ - .max_clock_speed_mhz = 85, \ - .quad_enable_bit_mask = 0x00, \ - .has_sector_protection = true, \ - .supports_fast_read = true, \ - .supports_qspi = false, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Adesto Tech AT25DF641-SSHD-T 8MiB SPI flash -// for the Oak Dev Tech Icy Tree M0 (SAMD21) feather board. -// Source: https://www.digikey.com/product-detail/en/adesto-technologies/AT25SF641-SDHD-T/1265-1180-1-ND/ -// Datasheet: https://www.adestotech.com/wp-content/uploads/doc8693.pdf -#define AT25DF641A { \ - .total_size = (1 << 23), /* 8 MiB */ \ - .start_up_time_us = 10000, \ - .manufacturer_id = 0x1f, \ - .memory_type = 0x48, \ - .capacity = 0x00, \ - .max_clock_speed_mhz = 85, \ - .quad_enable_bit_mask = 0x00, \ - .has_sector_protection = true, \ - .supports_fast_read = true, \ - .supports_qspi = false, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Adesto Tech AT25SF161-SSHD-T 2MiB SPI flash -// for the StringCar M0 (SAMD21) Express board. -// Source: https://www.digikey.com/product-detail/en/adesto-technologies/AT25SF161-SDHD-T/1265-1230-1-ND/ -// Datasheet: https://www.adestotech.com/wpo-content/uploads/jDS-AT25SF161_046.pdf -#define AT25SF161 { \ - .total_size = (1 << 21), /* 2 MiB */ \ - .start_up_time_us = 10000, \ - .manufacturer_id = 0x1f, \ - .memory_type = 0x86, \ - .capacity = 0x01, \ - .max_clock_speed_mhz = 85, \ - .quad_enable_bit_mask = 0x00, \ - .has_sector_protection = true, \ - .supports_fast_read = true, \ - .supports_qspi = false, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - - -// Settings for the Adesto Tech AT25SF041 1MiB SPI flash. It's on the SparkFun -// SAMD51 Thing Plus board -// Datasheet: https://www.adestotech.com/wp-content/uploads/DS-AT25SF041_044.pdf -#define AT25SF041A { \ - .total_size = (1 << 19), /* 512 KiB */ \ - .start_up_time_us = 10000, \ - .manufacturer_id = 0x1f, \ - .memory_type = 0x84, \ - .capacity = 0x01, \ - .max_clock_speed_mhz = 85, \ - .quad_enable_bit_mask = 0x00, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = false, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Gigadevice GD25Q16C 2MiB SPI flash. -// Datasheet: http://www.gigadevice.com/datasheet/gd25q16c/ -#define GD25Q16C { \ - .total_size = (1 << 21), /* 2 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xc8, \ - .memory_type = 0x40, \ - .capacity = 0x15, \ - .max_clock_speed_mhz = 104, /* if we need 120 then we can turn on high performance mode */ \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Gigadevice GD25Q32C 4MiB SPI flash. -// Datasheet: http://www.elm-tech.com/en/products/spi-flash-memory/gd25q32/gd25q32.pdf -#define GD25Q32C { \ - .total_size = (1 << 22), /* 4 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xc8, \ - .memory_type = 0x40, \ - .capacity = 0x16, \ - .max_clock_speed_mhz = 104, /* if we need 120 then we can turn on high performance mode */ \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = true, \ - .single_status_byte = false, \ -} - -// Settings for the Gigadevice GD25Q64C 8MiB SPI flash. -// Datasheet: http://www.elm-tech.com/en/products/spi-flash-memory/gd25q64/gd25q64.pdf -#define GD25Q64C { \ - .total_size = (1 << 23), /* 8 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xc8, \ - .memory_type = 0x40, \ - .capacity = 0x17, \ - .max_clock_speed_mhz = 104, /* if we need 120 then we can turn on high performance mode */ \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = true, \ - .single_status_byte = false, \ -} - -// Settings for the Gigadevice GD25S512MD 64MiB SPI flash. -// Datasheet: http://www.gigadevice.com/datasheet/gd25s512md/ -#define GD25S512MD { \ - .total_size = (1 << 26), /* 64 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xc8, \ - .memory_type = 0x40, \ - .capacity = 0x19, \ - .max_clock_speed_mhz = 104, /* if we need 120 then we can turn on high performance mode */ \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = true, \ - .single_status_byte = false, \ -} - -// Settings for the Cypress (was Spansion) S25FL064L 8MiB SPI flash. -// Datasheet: http://www.cypress.com/file/316661/download -#define S25FL064L { \ - .total_size = (1 << 23), /* 8 MiB */ \ - .start_up_time_us = 300, \ - .manufacturer_id = 0x01, \ - .memory_type = 0x60, \ - .capacity = 0x17, \ - .max_clock_speed_mhz = 108, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Cypress (was Spansion) S25FL116K 2MiB SPI flash. -// Datasheet: http://www.cypress.com/file/196886/download -#define S25FL116K { \ - .total_size = (1 << 21), /* 2 MiB */ \ - .start_up_time_us = 10000, \ - .manufacturer_id = 0x01, \ - .memory_type = 0x40, \ - .capacity = 0x15, \ - .max_clock_speed_mhz = 108, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Cypress (was Spansion) S25FL216K 2MiB SPI flash. -// Datasheet: http://www.cypress.com/file/197346/download -#define S25FL216K { \ - .total_size = (1 << 21), /* 2 MiB */ \ - .start_up_time_us = 10000, \ - .manufacturer_id = 0x01, \ - .memory_type = 0x40, \ - .capacity = 0x15, \ - .max_clock_speed_mhz = 65, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = false, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Winbond W25Q16FW 2MiB SPI flash. -// Datasheet: https://www.winbond.com/resource-files/w25q16fw%20revj%2005182017%20sfdp.pdf -#define W25Q16FW { \ - .total_size = (1 << 21), /* 2 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x60, \ - .capacity = 0x15, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Winbond W25Q16JV-IQ 2MiB SPI flash. Note that JV-IM has a different .memory_type (0x70) -// Datasheet: https://www.winbond.com/resource-files/w25q16jv%20spi%20revf%2005092017.pdf -#define W25Q16JV_IQ { \ - .total_size = (1 << 21), /* 2 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x40, \ - .capacity = 0x15, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Winbond W25Q16JV-IM 2MiB SPI flash. Note that JV-IQ has a different .memory_type (0x40) -// Datasheet: https://www.winbond.com/resource-files/w25q16jv%20spi%20revf%2005092017.pdf -#define W25Q16JV_IM { \ - .total_size = (1 << 21), /* 2 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x70, \ - .capacity = 0x15, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ -} - -// Settings for the Winbond W25Q32BV 4MiB SPI flash. -// Datasheet: https://www.winbond.com/resource-files/w25q32bv_revi_100413_wo_automotive.pdf -#define W25Q32BV { \ - .total_size = (1 << 22), /* 4 MiB */ \ - .start_up_time_us = 10000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x60, \ - .capacity = 0x16, \ - .max_clock_speed_mhz = 104, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} -// Settings for the Winbond W25Q32JV-IM 4MiB SPI flash. -// Datasheet: https://www.winbond.com/resource-files/w25q32jv%20revg%2003272018%20plus.pdf -#define W25Q32JV_IM { \ - .total_size = (1 << 22), /* 4 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x70, \ - .capacity = 0x16, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ -} - -// Settings for the Winbond W25Q32JV-IQ 4MiB SPI flash. -// Datasheet: https://www.mouser.com/datasheet/2/949/w25q32jv_revg_03272018_plus-1489806.pdf -#define W25Q32JV_IQ { \ - .total_size = (1 << 22), /* 4 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x40, \ - .capacity = 0x16, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ -} - -// Settings for the Winbond W25Q64FV 8MiB SPI flash. -// Datasheet: https://www.winbond.com/resource-files/w25q64fv%20revs%2007182017.pdf -#define W25Q64FV { \ - .total_size = (1 << 23), /* 8 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x40, \ - .capacity = 0x17, \ - .max_clock_speed_mhz = 104, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Winbond W25Q64JV-IM 8MiB SPI flash. Note that JV-IQ has a different .memory_type (0x40) -// Datasheet: http://www.winbond.com/resource-files/w25q64jv%20revj%2003272018%20plus.pdf -#define W25Q64JV_IM { \ - .total_size = (1 << 23), /* 8 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x70, \ - .capacity = 0x17, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Winbond W25Q64JV-IQ 8MiB SPI flash. Note that JV-IM has a different .memory_type (0x70) -// Datasheet: http://www.winbond.com/resource-files/w25q64jv%20revj%2003272018%20plus.pdf -#define W25Q64JV_IQ { \ - .total_size = (1 << 23), /* 8 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x40, \ - .capacity = 0x17, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Winbond W25Q80DL 1MiB SPI flash. -// Datasheet: https://www.winbond.com/resource-files/w25q80dv%20dl_revh_10022015.pdf -#define W25Q80DL { \ - .total_size = (1 << 20), /* 1 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x60, \ - .capacity = 0x14, \ - .max_clock_speed_mhz = 104, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Winbond W25Q80DV 1MiB SPI flash.. Note that W25Q80DL has a different memory type (0x60) -// Datasheet: https://www.winbond.com/resource-files/w25q80dv%20dl_revh_10022015.pdf -#define W25Q80DV { \ - .total_size = (1 << 20), /* 1 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x40, \ - .capacity = 0x14, \ - .max_clock_speed_mhz = 104, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Winbond W25Q128JV-SQ 16MiB SPI flash. Note that JV-IM has a different .memory_type (0x70) -// Datasheet: https://www.winbond.com/resource-files/w25q128jv%20revf%2003272018%20plus.pdf -#define W25Q128JV_SQ { \ - .total_size = (1 << 24), /* 16 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x40, \ - .capacity = 0x18, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the Everspin MR20H40 / MR25H40 magnetic non-volatile RAM -// Datasheet: https://www.everspin.com/supportdocs/MR25H40CDFR -#define MR2xH40 { \ - .total_size = (1 << 22), /* 4 MiB */ \ - .start_up_time_us = 10000, \ - .manufacturer_id = 0xef, /*no JDEC*/ \ - .memory_type = 0x40, /*no JDEC*/ \ - .capacity = 0x14, /*no JDEC*/ \ - .max_clock_speed_mhz = 10, \ - .quad_enable_bit_mask = 0x00, \ - .has_sector_protection = false, \ - .supports_fast_read = false, \ - .supports_qspi = false, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = true, \ - .no_ready_bit = true, \ - .no_erase_cmd = true, \ - .no_reset_cmd = true, \ -} - -// Settings for the Macronix MX25L1606 2MiB SPI flash. -// Datasheet: -#define MX25L1606 { \ - .total_size = (1 << 21), /* 2 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xc2, \ - .memory_type = 0x20, \ - .capacity = 0x15, \ - .max_clock_speed_mhz = 8, \ - .quad_enable_bit_mask = 0x40, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = true, \ -} - -// Settings for the Macronix MX25L3233F 4MiB SPI flash. -// Datasheet: http://www.macronix.com/Lists/Datasheet/Attachments/7426/MX25L3233F,%203V,%2032Mb,%20v1.6.pdf -#define MX25L3233F { \ - .total_size = (1 << 22), /* 4 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xc2, \ - .memory_type = 0x20, \ - .capacity = 0x16, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x40, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = true, \ -} - -// Settings for the Macronix MX25R6435F 8MiB SPI flash. -// Datasheet: http://www.macronix.com/Lists/Datasheet/Attachments/7428/MX25R6435F,%20Wide%20Range,%2064Mb,%20v1.4.pdf -// By default its in lower power mode which can only do 8mhz. In high power mode it can do 80mhz. -#define MX25R6435F { \ - .total_size = (1 << 23), /* 8 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xc2, \ - .memory_type = 0x28, \ - .capacity = 0x17, \ - .max_clock_speed_mhz = 8, \ - .quad_enable_bit_mask = 0x40, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = true, \ -} - -// Settings for the Macronix MX25R1635F 2MiB SPI flash. -// Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7595/MX25R1635F,%20Wide%20Range,%2016Mb,%20v1.6.pdf -// In low power mode, quad operations can only run at 8 MHz. In high power mode it can do 80 MHz. -#define MX25R1635F { \ - .total_size = (1 << 21), /* 2 MiB */ \ - .start_up_time_us = 800, \ - .manufacturer_id = 0xc2, \ - .memory_type = 0x28, \ - .capacity = 0x15, \ - .max_clock_speed_mhz = 8, /* 33 MHz for 1-bit operations */ \ - .quad_enable_bit_mask = 0x40, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = true, \ -} - -// Settings for the Macronix MX25L51245G 64MiB SPI flash. -// Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7437/MX25L51245G,%203V,%20512Mb,%20v1.6.pdf -#define MX25L51245G { \ - .total_size = (1 << 26), /* 64 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xc2, \ - .memory_type = 0x20, \ - .capacity = 0x1a, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x40, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = true, \ -} - -// Settings for the Macronix MX25L51245G 64MiB SPI flash. -// Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7437/MX25L51245G,%203V,%20512Mb,%20v1.6.pdf -#define MX25L25645G { \ - .total_size = (1 << 25), /* 32 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0x9f, \ - .memory_type = 0xab, \ - .capacity = 0x90, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0xaf, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = true, \ -} - -// Settings for the Macronix MX25L12833F 16MiB SPI flash -// Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7447/MX25L12833F,%203V,%20128Mb,%20v1.0.pdf - -#define MX25L12833F { \ - .total_size = (1UL << 24), /* 16 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xc2, \ - .memory_type = 0x20, \ - .capacity = 0x18, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x40, \ - .has_sector_protection = true, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = true, \ -} - -// Settings for the Winbond W25Q128JV-PM 16MiB SPI flash. Note that JV-IM has a different .memory_type (0x70) -// Datasheet: https://www.winbond.com/resource-files/w25q128jv%20revf%2003272018%20plus.pdf -#define W25Q128JV_PM { \ - .total_size = (1 << 24), /* 16 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x70, \ - .capacity = 0x18, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ -} - -// Settings for the Winbond W25Q32FV 4MiB SPI flash. -// Datasheet:http://www.winbond.com/resource-files/w25q32fv%20revj%2006032016.pdf?__locale=en -#define W25Q32FV { \ - .total_size = (1 << 22), /* 4 MiB */ \ - .start_up_time_us = 5000, \ - .manufacturer_id = 0xef, \ - .memory_type = 0x40, \ - .capacity = 0x16, \ - .max_clock_speed_mhz = 104, \ - .quad_enable_bit_mask = 0x00, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = false, \ - .supports_qspi_writes = false, \ - .write_status_register_split = false, \ - .single_status_byte = false, \ -} - -// Settings for the ISSI IS25LP128F 16MiB SPI flash. -// Datasheet: http://www.issi.com/WW/pdf/25LP-WP128F.pdf -#define IS25LP128F { \ - .total_size = (1 << 24), /* 16 MiB */ \ - .start_up_time_us = 10000, \ - .manufacturer_id = 0x9d, \ - .memory_type = 0x60, \ - .capacity = 0x18, \ - .max_clock_speed_mhz = 133, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = true, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = true, \ -} - -// Settings for the Micron N25Q256A 256Mb (32MiB) QSPI flash. -// Datasheet: https://www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/n25q/n25q_256mb_3v.pdf -#define N25Q256A { \ - /* .total_size = (1 << 25), 32 MiB does not work at this time, as assumptions about 3-byte addresses abound */ \ - .total_size = (1 << 24), /* 16 MiB */ \ - .start_up_time_us = 10000, \ - .manufacturer_id = 0x20, \ - .memory_type = 0xBA, \ - .capacity = 0x19, \ - .max_clock_speed_mhz = 108, \ - .quad_enable_bit_mask = 0x02, \ - .has_sector_protection = false, \ - .supports_fast_read = true, \ - .supports_qspi = true, \ - .supports_qspi_writes = true, \ - .write_status_register_split = false, \ - .single_status_byte = true, \ -} -#endif // MICROPY_INCLUDED_ATMEL_SAMD_EXTERNAL_FLASH_DEVICES_H diff --git a/supervisor/shared/external_flash/devices.h.jinja b/supervisor/shared/external_flash/devices.h.jinja new file mode 100644 index 0000000000..f6bfac613e --- /dev/null +++ b/supervisor/shared/external_flash/devices.h.jinja @@ -0,0 +1,96 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries LLC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +#ifndef MICROPY_INCLUDED_SUPERVISOR_SHARED_EXTERNAL_FLASH_DEVICES_H +#define MICROPY_INCLUDED_SUPERVISOR_SHARED_EXTERNAL_FLASH_DEVICES_H + +#include +#include + +typedef struct { + uint32_t total_size; + uint16_t start_up_time_us; + + // Three response bytes to 0x9f JEDEC ID command. + uint8_t manufacturer_id; + uint8_t memory_type; + uint8_t capacity; + + // Max clock speed for all operations and the fastest read mode. + uint8_t max_clock_speed_mhz; + + // Bitmask for Quad Enable bit if present. 0x00 otherwise. This is for the highest byte in the + // status register. + uint8_t quad_enable_bit_mask; + + bool has_sector_protection : 1; + + // Supports the 0x0b fast read command with 8 dummy cycles. + bool supports_fast_read : 1; + + // Supports the fast read, quad output command 0x6b with 8 dummy cycles. + bool supports_qspi : 1; + + // Supports the quad input page program command 0x32. This is known as 1-1-4 because it only + // uses all four lines for data. + bool supports_qspi_writes : 1; + + // Requires a separate command 0x31 to write to the second byte of the status register. + // Otherwise two byte are written via 0x01. + bool write_status_register_split : 1; + + // True when the status register is a single byte. This implies the Quad Enable bit is in the + // first byte and the Read Status Register 2 command (0x35) is unsupported. + bool single_status_byte : 1; + + // Does not support using a ready bit within the status register + bool no_ready_bit : 1; + + // Does not support the erase command (0x20) + bool no_erase_cmd : 1; + + // Device does not have a reset command + bool no_reset_cmd : 1; +} external_flash_device; + +{% for device in nvms %} +#define {{ device.sku }} { \ + .total_size = {{ device.total_size }}, \ + .start_up_time_us = {{ device.start_up_time_us }}, \ + .manufacturer_id = {{ device.manufacturer_id }}, \ + .memory_type = {{ device.memory_type }}, \ + .capacity = {{ device.capacity }}, \ + .max_clock_speed_mhz = {{ device.max_clock_speed_mhz }}, \ + .quad_enable_bit_mask = {{ device.quad_enable_bit_mask }}, \ + .has_sector_protection = {{ device.has_sector_protection | lower() }}, \ + .supports_fast_read = {{ device.supports_fast_read | lower() }}, \ + .supports_qspi = {{ device["6b_quad_read"] | lower() }}, \ + .supports_qspi_writes = {{ device["32_qspi_write"] | lower() }}, \ + .write_status_register_split = {{ device.write_status_register_split | lower() }}, \ + .single_status_byte = {{ (device.quad_enable_status_byte == 1) | lower() }}, \ +} +{% endfor %} + +#endif // MICROPY_INCLUDED_SUPERVISOR_SHARED_EXTERNAL_FLASH_DEVICES_H diff --git a/supervisor/spi_flash_api.h b/supervisor/spi_flash_api.h index ed80b8207b..9d30c7f2bd 100644 --- a/supervisor/spi_flash_api.h +++ b/supervisor/spi_flash_api.h @@ -29,7 +29,7 @@ #include #include -#include "supervisor/shared/external_flash/devices.h" +#include "genhdr/devices.h" #include "shared-bindings/busio/SPI.h" diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 946b4b0bfc..f295df632b 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -42,12 +42,21 @@ else CFLAGS += -DEXTERNAL_FLASH_DEVICES=$(EXTERNAL_FLASH_DEVICES) \ SRC_SUPERVISOR += supervisor/shared/external_flash/external_flash.c - ifeq ($(SPI_FLASH_FILESYSTEM),1) - SRC_SUPERVISOR += supervisor/shared/external_flash/spi_flash.c - endif - ifeq ($(QSPI_FLASH_FILESYSTEM),1) - SRC_SUPERVISOR += supervisor/qspi_flash.c supervisor/shared/external_flash/qspi_flash.c - endif + ifeq ($(SPI_FLASH_FILESYSTEM),1) + SRC_SUPERVISOR += supervisor/shared/external_flash/spi_flash.c + endif + ifeq ($(QSPI_FLASH_FILESYSTEM),1) + SRC_SUPERVISOR += supervisor/qspi_flash.c supervisor/shared/external_flash/qspi_flash.c + endif + +$(HEADER_BUILD)/devices.h : ../../supervisor/shared/external_flash/devices.h.jinja ../../tools/gen_nvm_devices.py | $(HEADER_BUILD) + $(STEPECHO) "GEN $@" + $(Q)install -d $(BUILD)/genhdr + $(Q)$(PYTHON3) ../../tools/gen_nvm_devices.py $< $@ + +$(BUILD)/supervisor/shared/external_flash/spi_flash.o: $(HEADER_BUILD)/devices.h +$(BUILD)/supervisor/shared/external_flash/external_flash.o: $(HEADER_BUILD)/devices.h + endif ifeq ($(USB),FALSE) diff --git a/tools/gen_nvm_devices.py b/tools/gen_nvm_devices.py new file mode 100644 index 0000000000..3cda8671fd --- /dev/null +++ b/tools/gen_nvm_devices.py @@ -0,0 +1,23 @@ +import sys +import cascadetoml +import pathlib +import typer +from jinja2 import Template + + +def main(input_template: pathlib.Path, output_path: pathlib.Path): + flashes = cascadetoml.filter_toml(pathlib.Path("../../data/nvm.toml"), []) + + template = Template(input_template.read_text()) + + settings = {"nvms": []} + for flash in flashes["nvm"]: + if "sku" not in flash or flash["sku"] == flash["manufacturer"]: + continue + settings["nvms"].append(dict(flash)) + + output_path.write_text(template.render(settings)) + + +if __name__ == "__main__": + typer.run(main) From da4dceea154f05b09e273e03d74e0e2b2a6f5dd5 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 25 Mar 2021 08:43:13 -0700 Subject: [PATCH 135/261] Fix 16MB Winbond names --- ports/nrf/boards/TG-Watch/mpconfigboard.mk | 2 +- ports/nrf/boards/ohs2020_badge/mpconfigboard.mk | 2 +- ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nrf/boards/TG-Watch/mpconfigboard.mk b/ports/nrf/boards/TG-Watch/mpconfigboard.mk index 8407d84877..8a191c1534 100644 --- a/ports/nrf/boards/TG-Watch/mpconfigboard.mk +++ b/ports/nrf/boards/TG-Watch/mpconfigboard.mk @@ -6,7 +6,7 @@ USB_MANUFACTURER = "TG-Techie" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q128JV_SQ" +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q128JVxQ" FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register diff --git a/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk b/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk index 2e6e885f55..045939e652 100644 --- a/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk +++ b/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "OSHWA" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ" +EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk index 4c4bcd0896..21ca20825a 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk @@ -7,4 +7,4 @@ MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 -EXTERNAL_FLASH_DEVICES = "W25Q128JV_PM" +EXTERNAL_FLASH_DEVICES = "W25Q128JVxM" From 01c153cd7e8bace50892050a13b15201a674df37 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 25 Mar 2021 10:03:05 -0700 Subject: [PATCH 136/261] Fix devices include by splitting type from defines --- supervisor/shared/external_flash/device.h | 78 +++++++++++++++++++ .../shared/external_flash/devices.h.jinja | 49 ------------ .../shared/external_flash/external_flash.c | 1 + supervisor/spi_flash_api.h | 2 +- supervisor/supervisor.mk | 1 - 5 files changed, 80 insertions(+), 51 deletions(-) create mode 100644 supervisor/shared/external_flash/device.h diff --git a/supervisor/shared/external_flash/device.h b/supervisor/shared/external_flash/device.h new file mode 100644 index 0000000000..bbf6bfd91b --- /dev/null +++ b/supervisor/shared/external_flash/device.h @@ -0,0 +1,78 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries LLC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +#ifndef MICROPY_INCLUDED_SUPERVISOR_SHARED_EXTERNAL_FLASH_DEVICE_H +#define MICROPY_INCLUDED_SUPERVISOR_SHARED_EXTERNAL_FLASH_DEVICE_H + +#include +#include + +typedef struct { + uint32_t total_size; + uint16_t start_up_time_us; + + // Three response bytes to 0x9f JEDEC ID command. + uint8_t manufacturer_id; + uint8_t memory_type; + uint8_t capacity; + + // Max clock speed for all operations and the fastest read mode. + uint8_t max_clock_speed_mhz; + + // Bitmask for Quad Enable bit if present. 0x00 otherwise. This is for the highest byte in the + // status register. + uint8_t quad_enable_bit_mask; + + bool has_sector_protection : 1; + + // Supports the 0x0b fast read command with 8 dummy cycles. + bool supports_fast_read : 1; + + // Supports the fast read, quad output command 0x6b with 8 dummy cycles. + bool supports_qspi : 1; + + // Supports the quad input page program command 0x32. This is known as 1-1-4 because it only + // uses all four lines for data. + bool supports_qspi_writes : 1; + + // Requires a separate command 0x31 to write to the second byte of the status register. + // Otherwise two byte are written via 0x01. + bool write_status_register_split : 1; + + // True when the status register is a single byte. This implies the Quad Enable bit is in the + // first byte and the Read Status Register 2 command (0x35) is unsupported. + bool single_status_byte : 1; + + // Does not support using a ready bit within the status register + bool no_ready_bit : 1; + + // Does not support the erase command (0x20) + bool no_erase_cmd : 1; + + // Device does not have a reset command + bool no_reset_cmd : 1; +} external_flash_device; + +#endif // MICROPY_INCLUDED_SUPERVISOR_SHARED_EXTERNAL_FLASH_DEVICE_H diff --git a/supervisor/shared/external_flash/devices.h.jinja b/supervisor/shared/external_flash/devices.h.jinja index f6bfac613e..b200b75dca 100644 --- a/supervisor/shared/external_flash/devices.h.jinja +++ b/supervisor/shared/external_flash/devices.h.jinja @@ -26,55 +26,6 @@ #ifndef MICROPY_INCLUDED_SUPERVISOR_SHARED_EXTERNAL_FLASH_DEVICES_H #define MICROPY_INCLUDED_SUPERVISOR_SHARED_EXTERNAL_FLASH_DEVICES_H -#include -#include - -typedef struct { - uint32_t total_size; - uint16_t start_up_time_us; - - // Three response bytes to 0x9f JEDEC ID command. - uint8_t manufacturer_id; - uint8_t memory_type; - uint8_t capacity; - - // Max clock speed for all operations and the fastest read mode. - uint8_t max_clock_speed_mhz; - - // Bitmask for Quad Enable bit if present. 0x00 otherwise. This is for the highest byte in the - // status register. - uint8_t quad_enable_bit_mask; - - bool has_sector_protection : 1; - - // Supports the 0x0b fast read command with 8 dummy cycles. - bool supports_fast_read : 1; - - // Supports the fast read, quad output command 0x6b with 8 dummy cycles. - bool supports_qspi : 1; - - // Supports the quad input page program command 0x32. This is known as 1-1-4 because it only - // uses all four lines for data. - bool supports_qspi_writes : 1; - - // Requires a separate command 0x31 to write to the second byte of the status register. - // Otherwise two byte are written via 0x01. - bool write_status_register_split : 1; - - // True when the status register is a single byte. This implies the Quad Enable bit is in the - // first byte and the Read Status Register 2 command (0x35) is unsupported. - bool single_status_byte : 1; - - // Does not support using a ready bit within the status register - bool no_ready_bit : 1; - - // Does not support the erase command (0x20) - bool no_erase_cmd : 1; - - // Device does not have a reset command - bool no_reset_cmd : 1; -} external_flash_device; - {% for device in nvms %} #define {{ device.sku }} { \ .total_size = {{ device.total_size }}, \ diff --git a/supervisor/shared/external_flash/external_flash.c b/supervisor/shared/external_flash/external_flash.c index f8054a9fe0..722393ce65 100644 --- a/supervisor/shared/external_flash/external_flash.c +++ b/supervisor/shared/external_flash/external_flash.c @@ -27,6 +27,7 @@ #include #include +#include "genhdr/devices.h" #include "supervisor/flash.h" #include "supervisor/spi_flash_api.h" #include "supervisor/shared/external_flash/common_commands.h" diff --git a/supervisor/spi_flash_api.h b/supervisor/spi_flash_api.h index 9d30c7f2bd..1af83736df 100644 --- a/supervisor/spi_flash_api.h +++ b/supervisor/spi_flash_api.h @@ -29,7 +29,7 @@ #include #include -#include "genhdr/devices.h" +#include "shared/external_flash/device.h" #include "shared-bindings/busio/SPI.h" diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index f295df632b..1744c4f47f 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -54,7 +54,6 @@ $(HEADER_BUILD)/devices.h : ../../supervisor/shared/external_flash/devices.h.jin $(Q)install -d $(BUILD)/genhdr $(Q)$(PYTHON3) ../../tools/gen_nvm_devices.py $< $@ -$(BUILD)/supervisor/shared/external_flash/spi_flash.o: $(HEADER_BUILD)/devices.h $(BUILD)/supervisor/shared/external_flash/external_flash.o: $(HEADER_BUILD)/devices.h endif From abdc6d59ec69fa672aaef2b7f3b0ea3859fd0947 Mon Sep 17 00:00:00 2001 From: Gareth Coleman Date: Wed, 24 Mar 2021 18:21:09 +0000 Subject: [PATCH 137/261] Translated using Weblate (English (United Kingdom)) Currently translated at 99.5% (966 of 970 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/en_GB/ --- locale/en_GB.po | 1948 ++++++++++++++++++++++++----------------------- 1 file changed, 1001 insertions(+), 947 deletions(-) diff --git a/locale/en_GB.po b/locale/en_GB.po index 0e9d28fd89..892b357bcc 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -7,25 +7,31 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2021-03-25 23:30+0000\n" +"Last-Translator: Gareth Coleman \n" "Language-Team: none\n" "Language: en_GB\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.5.2-dev\n" #: main.c msgid "" "\n" "Code done running.\n" msgstr "" +"\n" +"Code done running.\n" #: main.c msgid "" "\n" "Code stopped by auto-reload.\n" msgstr "" +"\n" +"Code stopped by auto-reload.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -33,41 +39,45 @@ msgid "" "Please file an issue with the contents of your CIRCUITPY drive at \n" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" #: py/obj.c msgid " File \"%q\"" -msgstr "" +msgstr " File \"%q\"" #: py/obj.c msgid " File \"%q\", line %d" -msgstr "" +msgstr " File \"%q\", line %d" #: py/builtinhelp.c msgid " is of type %q\n" -msgstr "" +msgstr " is of type %q\n" #: main.c msgid " output:\n" -msgstr "" +msgstr " output:\n" #: py/objstr.c #, c-format msgid "%%c requires int or char" -msgstr "" +msgstr "%%c requires int or char" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" -msgstr "" +msgstr "%q failure: %d" #: shared-bindings/microcontroller/Pin.c msgid "%q in use" -msgstr "" +msgstr "%q in use" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c @@ -76,19 +86,19 @@ msgstr "" #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" -msgstr "" +msgstr "%q index out of range" #: py/obj.c msgid "%q indices must be integers, not %q" -msgstr "" +msgstr "%q indices must be integers, not %q" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" -msgstr "" +msgstr "%q list must be a list" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" -msgstr "" +msgstr "%q must be >= 0" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c @@ -96,266 +106,266 @@ msgstr "" #: shared-bindings/memorymonitor/AllocationAlarm.c #: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c msgid "%q must be >= 1" -msgstr "" +msgstr "%q must be >= 1" #: shared-module/vectorio/Polygon.c msgid "%q must be a tuple of length 2" -msgstr "" +msgstr "%q must be a tuple of length 2" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: shared-bindings/canio/Match.c msgid "%q out of range" -msgstr "" +msgstr "%q out of range" #: ports/atmel-samd/common-hal/microcontroller/Pin.c msgid "%q pin invalid" -msgstr "" +msgstr "%q pin invalid" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" -msgstr "" +msgstr "%q should be an int" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" -msgstr "" +msgstr "%q() takes %d positional arguments but %d were given" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" -msgstr "" +msgstr "%s error 0x%x" #: py/argcheck.c msgid "'%q' argument required" -msgstr "" +msgstr "'%q' argument required" #: py/runtime.c msgid "'%q' object cannot assign attribute '%q'" -msgstr "" +msgstr "'%q' object cannot assign attribute '%q'" #: py/proto.c msgid "'%q' object does not support '%q'" -msgstr "" +msgstr "'%q' object does not support '%q'" #: py/obj.c msgid "'%q' object does not support item assignment" -msgstr "" +msgstr "'%q' object does not support item assignment" #: py/obj.c msgid "'%q' object does not support item deletion" -msgstr "" +msgstr "'%q' object does not support item deletion" #: py/runtime.c msgid "'%q' object has no attribute '%q'" -msgstr "" +msgstr "'%q' object has no attribute '%q'" #: py/runtime.c msgid "'%q' object is not an iterator" -msgstr "" +msgstr "'%q' object is not an iterator" #: py/objtype.c py/runtime.c msgid "'%q' object is not callable" -msgstr "" +msgstr "'%q' object is not callable" #: py/runtime.c msgid "'%q' object is not iterable" -msgstr "" +msgstr "'%q' object is not iterable" #: py/obj.c msgid "'%q' object is not subscriptable" -msgstr "" +msgstr "'%q' object is not subscriptable" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" -msgstr "" +msgstr "'%s' expects a label" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a register" -msgstr "" +msgstr "'%s' expects a register" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects a special register" -msgstr "" +msgstr "'%s' expects a special register" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects an FPU register" -msgstr "" +msgstr "'%s' expects an FPU register" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects an address of the form [a, b]" -msgstr "" +msgstr "'%s' expects an address of the form [a, b]" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects an integer" -msgstr "" +msgstr "'%s' expects an integer" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects at most r%d" -msgstr "" +msgstr "'%s' expects at most r%d" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects {r0, r1, ...}" -msgstr "" +msgstr "'%s' expects {r0, r1, ...}" #: py/emitinlinextensa.c #, c-format msgid "'%s' integer %d is not within range %d..%d" -msgstr "" +msgstr "'%s' integer %d is not within range %d..%d" #: py/emitinlinethumb.c #, c-format msgid "'%s' integer 0x%x does not fit in mask 0x%x" -msgstr "" +msgstr "'%s' integer 0x%x does not fit in mask 0x%x" #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" -msgstr "" +msgstr "'=' alignment not allowed in string format specifier" #: shared-module/struct/__init__.c msgid "'S' and 'O' are not supported format types" -msgstr "" +msgstr "'S' and 'O' are not supported format types" #: py/compile.c msgid "'align' requires 1 argument" -msgstr "" +msgstr "'align' requires 1 argument" #: py/compile.c msgid "'await' outside function" -msgstr "" +msgstr "'await' outside function" #: py/compile.c msgid "'await', 'async for' or 'async with' outside async function" -msgstr "" +msgstr "'await', 'async for' or 'async with' outside async function" #: py/compile.c msgid "'break' outside loop" -msgstr "" +msgstr "'break' outside loop" #: py/compile.c msgid "'continue' outside loop" -msgstr "" +msgstr "'continue' outside loop" #: py/objgenerator.c msgid "'coroutine' object is not an iterator" -msgstr "" +msgstr "'coroutine' object is not an iterator" #: py/compile.c msgid "'data' requires at least 2 arguments" -msgstr "" +msgstr "'data' requires at least 2 arguments" #: py/compile.c msgid "'data' requires integer arguments" -msgstr "" +msgstr "'data' requires integer arguments" #: py/compile.c msgid "'label' requires 1 argument" -msgstr "" +msgstr "'label' requires 1 argument" #: py/compile.c msgid "'return' outside function" -msgstr "" +msgstr "'return' outside function" #: py/compile.c msgid "'yield from' inside async function" -msgstr "" +msgstr "'yield from' inside async function" #: py/compile.c msgid "'yield' outside function" -msgstr "" +msgstr "'yield' outside function" #: py/compile.c msgid "*x must be assignment target" -msgstr "" +msgstr "*x must be assignment target" #: py/obj.c msgid ", in %q\n" -msgstr "" +msgstr ", in %q\n" #: py/objcomplex.c msgid "0.0 to a complex power" -msgstr "" +msgstr "0.0 to a complex power" #: py/modbuiltins.c msgid "3-arg pow() not supported" -msgstr "" +msgstr "3-arg pow() not supported" #: shared-module/msgpack/__init__.c msgid "64 bit types" -msgstr "" +msgstr "64 bit types" #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" -msgstr "" +msgstr "A hardware interrupt channel is already in use" #: ports/esp32s2/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" -msgstr "" +msgstr "ADC2 is being used by WiFi" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" -msgstr "" +msgstr "Address must be %d bytes long" #: shared-bindings/_bleio/Address.c msgid "Address type out of range" -msgstr "" +msgstr "Address type out of range" #: ports/esp32s2/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" -msgstr "" +msgstr "All CAN peripherals are in use" #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" -msgstr "" +msgstr "All I2C peripherals are in use" #: ports/esp32s2/common-hal/countio/Counter.c #: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c #: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" -msgstr "" +msgstr "All PCNT units in use" #: ports/atmel-samd/common-hal/canio/Listener.c #: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" -msgstr "" +msgstr "All RX FIFOs in use" #: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" -msgstr "" +msgstr "All SPI peripherals are in use" #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" -msgstr "" +msgstr "All UART peripherals are in use" #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" -msgstr "" +msgstr "All channels in use" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" -msgstr "" +msgstr "All event channels in use" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "All state machines in use" -msgstr "" +msgstr "All state machines in use" #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "All sync event channels in use" -msgstr "" +msgstr "All sync event channels in use" #: shared-bindings/pwmio/PWMOut.c msgid "All timers for this pin are in use" -msgstr "" +msgstr "All timers for this pin are in use" #: ports/atmel-samd/common-hal/_pew/PewPew.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -372,183 +382,186 @@ msgstr "" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c msgid "All timers in use" -msgstr "" +msgstr "All timers in use" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Already advertising." -msgstr "" +msgstr "Already advertising." #: ports/atmel-samd/common-hal/canio/Listener.c msgid "Already have all-matches listener" -msgstr "" +msgstr "Already have all-matches listener" #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c msgid "Already running" -msgstr "" +msgstr "Already running" #: ports/esp32s2/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" -msgstr "" +msgstr "Already scanning for WiFi networks" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" -msgstr "" +msgstr "AnalogIn not supported on given pin" #: ports/cxd56/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/nrf/common-hal/analogio/AnalogOut.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c msgid "AnalogOut functionality not supported" -msgstr "" +msgstr "AnalogOut functionality not supported" #: shared-bindings/analogio/AnalogOut.c msgid "AnalogOut is only 16 bits. Value must be less than 65536." -msgstr "" +msgstr "AnalogOut is only 16 bits. Value must be less than 65536." #: ports/atmel-samd/common-hal/analogio/AnalogOut.c msgid "AnalogOut not supported on given pin" -msgstr "" +msgstr "AnalogOut not supported on given pin" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" -msgstr "" +msgstr "Another send is already active" #: shared-bindings/pulseio/PulseOut.c msgid "Array must contain halfwords (type 'H')" -msgstr "" +msgstr "Array must contain halfwords (type 'H')" #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Array values should be single bytes." -msgstr "" +msgstr "Array values should be single bytes." #: shared-bindings/microcontroller/Pin.c msgid "At most %d %q may be specified (not %d)" -msgstr "" +msgstr "At most %d %q may be specified (not %d)" #: shared-module/memorymonitor/AllocationAlarm.c #, c-format msgid "Attempt to allocate %d blocks" -msgstr "" +msgstr "Attempt to allocate %d blocks" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "Attempted heap allocation when MicroPython VM not running." -msgstr "" +msgstr "Attempted heap allocation when CircuitPython VM not running." #: shared-bindings/wifi/Radio.c msgid "Authentication failure" -msgstr "" +msgstr "Authentication failure" #: main.c msgid "Auto-reload is off.\n" -msgstr "" +msgstr "Auto-reload is off.\n" #: main.c msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" +"Auto-reload is on. Simply save files over USB to run them or enter REPL to " +"disable.\n" #: ports/esp32s2/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" -msgstr "" +msgstr "Baudrate not supported by peripheral" #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" -msgstr "" +msgstr "Below minimum frame rate" #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must be sequential pins" -msgstr "" +msgstr "Bit clock and word select must be sequential pins" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must share a clock unit" -msgstr "" +msgstr "Bit clock and word select must share a clock unit" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Bit depth must be from 1 to 6 inclusive, not %d" -msgstr "" +msgstr "Bit depth must be from 1 to 6 inclusive, not %d" #: shared-bindings/audiobusio/PDMIn.c msgid "Bit depth must be multiple of 8." -msgstr "" +msgstr "Bit depth must be multiple of 8." #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Both RX and TX required for flow control" -msgstr "" +msgstr "Both RX and TX required for flow control" #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" -msgstr "" +msgstr "Both pins must support hardware interrupts" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" -msgstr "" +msgstr "Brightness must be 0-1.0" #: shared-bindings/supervisor/__init__.c msgid "Brightness must be between 0 and 255" -msgstr "" +msgstr "Brightness must be between 0 and 255" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c msgid "Brightness not adjustable" -msgstr "" +msgstr "Brightness not adjustable" #: shared-bindings/_bleio/UUID.c #, c-format msgid "Buffer + offset too small %d %d %d" -msgstr "" +msgstr "Buffer + offset too small %d %d %d" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Buffer elements must be 4 bytes long or less" -msgstr "" +msgstr "Buffer elements must be 4 bytes long or less" #: shared-module/usb_hid/Device.c #, c-format msgid "Buffer incorrect size. Should be %d bytes." -msgstr "" +msgstr "Buffer incorrect size. Should be %d bytes." #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c msgid "Buffer is not a bytearray." -msgstr "" +msgstr "Buffer is not a bytearray." #: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c msgid "Buffer is too small" -msgstr "" +msgstr "Buffer is too small" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" -msgstr "" +msgstr "Buffer length %d too big. It must be less than %d" #: ports/atmel-samd/common-hal/sdioio/SDCard.c #: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c msgid "Buffer length must be a multiple of 512" -msgstr "" +msgstr "Buffer length must be a multiple of 512" #: ports/stm/common-hal/sdioio/SDCard.c msgid "Buffer must be a multiple of 512 bytes" -msgstr "" +msgstr "Buffer must be a multiple of 512 bytes" #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" -msgstr "" +msgstr "Buffer must be at least length 1" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Buffer too large and unable to allocate" -msgstr "" +msgstr "Buffer too large and unable to allocate" #: shared-bindings/_bleio/PacketBuffer.c #, c-format msgid "Buffer too short by %d bytes" -msgstr "" +msgstr "Buffer too short by %d bytes" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c @@ -556,330 +569,334 @@ msgstr "" #: ports/raspberrypi/common-hal/displayio/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" -msgstr "" +msgstr "Bus pin %d is already in use" #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." -msgstr "" +msgstr "Byte buffer must be 16 bytes." #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Bytes must be between 0 and 255." -msgstr "" +msgstr "Bytes must be between 0 and 255." #: shared-bindings/aesio/aes.c msgid "CBC blocks must be multiples of 16 bytes" -msgstr "" +msgstr "CBC blocks must be multiples of 16 bytes" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "CRC or checksum was invalid" -msgstr "" +msgstr "CRC or checksum was invalid" #: py/objtype.c msgid "Call super().__init__() before accessing native object." -msgstr "" +msgstr "Call super().__init__() before accessing native object." #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." -msgstr "" +msgstr "Can only alarm on RTC IO from deep sleep." #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." -msgstr "" +msgstr "Can only alarm on one low pin while others alarm high from deep sleep." #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." -msgstr "" +msgstr "Can only alarm on two low pins from deep sleep." #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" -msgstr "" +msgstr "Can't set CCCD on local Characteristic" #: shared-bindings/_bleio/Adapter.c msgid "Cannot create a new Adapter; use _bleio.adapter;" -msgstr "" +msgstr "Cannot create a new Adapter; use _bleio.adapter;" #: shared-bindings/displayio/Bitmap.c #: shared-bindings/memorymonitor/AllocationSize.c #: shared-bindings/pulseio/PulseIn.c msgid "Cannot delete values" -msgstr "" +msgstr "Cannot delete values" #: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c #: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c #: ports/nrf/common-hal/digitalio/DigitalInOut.c #: ports/raspberrypi/common-hal/digitalio/DigitalInOut.c msgid "Cannot get pull while in output mode" -msgstr "" +msgstr "Cannot get pull while in output mode" #: ports/nrf/common-hal/microcontroller/Processor.c msgid "Cannot get temperature" -msgstr "" +msgstr "Cannot get temperature" #: shared-bindings/_bleio/Adapter.c msgid "Cannot have scan responses for extended, connectable advertisements." -msgstr "" +msgstr "Cannot have scan responses for extended, connectable advertisements." #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" -msgstr "" +msgstr "Cannot output both channels on the same pin" #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." -msgstr "" +msgstr "Cannot pull on input-only pin." #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." -msgstr "" +msgstr "Cannot read without MISO pin." #: shared-bindings/audiobusio/PDMIn.c msgid "Cannot record to a file" -msgstr "" +msgstr "Cannot record to a file" #: shared-module/storage/__init__.c msgid "Cannot remount '/' when USB is active." -msgstr "" +msgstr "Cannot remount '/' when USB is active." #: ports/atmel-samd/common-hal/microcontroller/__init__.c #: ports/cxd56/common-hal/microcontroller/__init__.c #: ports/mimxrt10xx/common-hal/microcontroller/__init__.c msgid "Cannot reset into bootloader because no bootloader is present." -msgstr "" +msgstr "Cannot reset into bootloader because no bootloader is present." #: ports/esp32s2/common-hal/socketpool/Socket.c msgid "Cannot set socket options" -msgstr "" +msgstr "Cannot set socket options" #: shared-bindings/digitalio/DigitalInOut.c msgid "Cannot set value when direction is input." -msgstr "" +msgstr "Cannot set value when direction is input." #: ports/esp32s2/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" -msgstr "" +msgstr "Cannot specify RTS or CTS in RS485 mode" #: py/objslice.c msgid "Cannot subclass slice" -msgstr "" +msgstr "Cannot subclass slice" #: shared-module/bitbangio/SPI.c msgid "Cannot transfer without MOSI and MISO pins." -msgstr "" +msgstr "Cannot transfer without MOSI and MISO pins." #: extmod/moductypes.c msgid "Cannot unambiguously get sizeof scalar" -msgstr "" +msgstr "Cannot unambiguously get sizeof scalar" #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" -msgstr "" +msgstr "Cannot vary frequency on a timer that is already in use" #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." -msgstr "" +msgstr "Cannot wake on pin edge. Only level." #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." -msgstr "" +msgstr "Cannot write without MOSI pin." #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "CharacteristicBuffer writing not provided" -msgstr "" +msgstr "CharacteristicBuffer writing not provided" #: supervisor/shared/safe_mode.c msgid "CircuitPython core code crashed hard. Whoops!\n" -msgstr "" +msgstr "CircuitPython core code crashed hard. Crikey!\n" #: supervisor/shared/safe_mode.c msgid "" "CircuitPython is in safe mode because you pressed the reset button during " "boot. Press again to exit safe mode.\n" msgstr "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "" +msgstr "CircuitPython was unable to allocate the heap.\n" #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." -msgstr "" +msgstr "Clock pin init failed." #: shared-module/bitbangio/I2C.c msgid "Clock stretch too long" -msgstr "" +msgstr "Clock stretch too long" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Clock unit in use" -msgstr "" +msgstr "Clock unit in use" #: shared-bindings/_pew/PewPew.c msgid "Column entry must be digitalio.DigitalInOut" -msgstr "" +msgstr "Column entry must be digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c #: shared-bindings/displayio/ParallelBus.c msgid "Command must be an int between 0 and 255" -msgstr "" +msgstr "Command must be an int between 0 and 255" #: shared-bindings/_bleio/Connection.c msgid "" "Connection has been disconnected and can no longer be used. Create a new " "connection." msgstr "" +"Connection has been disconnected and can no longer be used. Create a new " +"connection." #: py/persistentcode.c msgid "Corrupt .mpy file" -msgstr "" +msgstr "Corrupt .mpy file" #: py/emitglue.c msgid "Corrupt raw code" -msgstr "" +msgstr "Corrupt raw code" #: ports/cxd56/common-hal/camera/Camera.c msgid "Could not initialize Camera" -msgstr "" +msgstr "Could not initialise camera" #: ports/cxd56/common-hal/gnss/GNSS.c msgid "Could not initialize GNSS" -msgstr "" +msgstr "Could not initialise GNSS" #: ports/cxd56/common-hal/sdioio/SDCard.c msgid "Could not initialize SDCard" -msgstr "" +msgstr "Could not initialise SDCard" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c msgid "Could not initialize UART" -msgstr "" +msgstr "Could not initialise UART" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" -msgstr "" +msgstr "Could not reinit channel" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init timer" -msgstr "" +msgstr "Could not reinit timer" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not restart PWM" -msgstr "" +msgstr "Could not restart PWM" #: ports/esp32s2/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" -msgstr "" +msgstr "Could not retrieve clock" #: shared-bindings/_bleio/Adapter.c msgid "Could not set address" -msgstr "" +msgstr "Could not set address" #: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" -msgstr "" +msgstr "Could not start PWM" #: ports/stm/common-hal/busio/UART.c msgid "Could not start interrupt, RX busy" -msgstr "" +msgstr "Could not start interrupt, RX busy" #: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate decoder" -msgstr "" +msgstr "Couldn't allocate decoder" #: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c #: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate first buffer" -msgstr "" +msgstr "Couldn't allocate first buffer" #: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate input buffer" -msgstr "" +msgstr "Couldn't allocate input buffer" #: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c #: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate second buffer" -msgstr "" +msgstr "Couldn't allocate second buffer" #: supervisor/shared/safe_mode.c msgid "Crash into the HardFault_Handler." -msgstr "" +msgstr "Crash into the HardFault_Handler." #: ports/stm/common-hal/analogio/AnalogOut.c msgid "DAC Channel Init Error" -msgstr "" +msgstr "DAC channel init error" #: ports/stm/common-hal/analogio/AnalogOut.c msgid "DAC Device Init Error" -msgstr "" +msgstr "DAC device init error" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" -msgstr "" +msgstr "DAC already in use" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c msgid "Data 0 pin must be byte aligned" -msgstr "" +msgstr "Data 0 pin must be byte aligned" #: ports/esp32s2/common-hal/displayio/ParallelBus.c msgid "Data 0 pin must be byte aligned." -msgstr "" +msgstr "Data 0 pin must be byte aligned." #: shared-module/audiocore/WaveFile.c msgid "Data chunk must follow fmt chunk" -msgstr "" +msgstr "Data chunk must follow fmt chunk" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Data too large for advertisement packet" -msgstr "" +msgstr "Data too large for advertisement packet" #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." -msgstr "" +msgstr "Destination capacity is smaller than destination_length." #: ports/nrf/common-hal/audiobusio/I2SOut.c msgid "Device in use" -msgstr "" +msgstr "Device in use" #: ports/cxd56/common-hal/digitalio/DigitalInOut.c msgid "DigitalInOut not supported on given pin" -msgstr "" +msgstr "DigitalInOut not supported on given pin" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c msgid "Display must have a 16 bit colorspace." -msgstr "" +msgstr "Display must have a 16 bit colourspace." #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c msgid "Display rotation must be in 90 degree increments" -msgstr "" +msgstr "Display rotation must be in 90 degree increments" #: shared-bindings/digitalio/DigitalInOut.c msgid "Drive mode not used when direction is input." -msgstr "" +msgstr "Drive mode not used when direction is input." #: shared-bindings/aesio/aes.c msgid "ECB only operates on 16 bytes at a time" -msgstr "" +msgstr "ECB only operates on 16 bytes at a time" #: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" -msgstr "" +msgstr "ESP-IDF memory allocation failed" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/atmel-samd/common-hal/ps2io/Ps2.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c msgid "EXTINT channel already in use" -msgstr "" +msgstr "EXTINT channel already in use" #: extmod/modure.c msgid "Error in regex" -msgstr "" +msgstr "Error in regex" #: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c msgid "Error: Failure to bind" -msgstr "" +msgstr "Error: Failure to bind" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c py/enum.c #: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c @@ -887,72 +904,72 @@ msgstr "" #: shared-bindings/neopixel_write/__init__.c #: shared-bindings/terminalio/Terminal.c msgid "Expected a %q" -msgstr "" +msgstr "Expected a %q" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c msgid "Expected a Characteristic" -msgstr "" +msgstr "Expected a Characteristic" #: shared-bindings/_bleio/Adapter.c msgid "Expected a DigitalInOut" -msgstr "" +msgstr "Expected a DigitalInOut" #: shared-bindings/_bleio/Characteristic.c msgid "Expected a Service" -msgstr "" +msgstr "Expected a service" #: shared-bindings/_bleio/Adapter.c msgid "Expected a UART" -msgstr "" +msgstr "Expected a UART" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c #: shared-bindings/_bleio/Service.c msgid "Expected a UUID" -msgstr "" +msgstr "Expected a UUID" #: shared-bindings/_bleio/Adapter.c msgid "Expected an Address" -msgstr "" +msgstr "Expected an address" #: shared-bindings/alarm/__init__.c msgid "Expected an alarm" -msgstr "" +msgstr "Expected an alarm" #: shared-module/_pixelbuf/PixelBuf.c #, c-format msgid "Expected tuple of length %d, got %d" -msgstr "" +msgstr "Expected tuple of length %d, got %d" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Extended advertisements with scan response not supported." -msgstr "" +msgstr "Extended advertisements with scan response not supported." #: extmod/ulab/code/fft/fft.c msgid "FFT is defined for ndarrays only" -msgstr "" +msgstr "FFT is defined for ndarrays only" #: extmod/ulab/code/fft/fft.c msgid "FFT is implemented for linear arrays only" -msgstr "" +msgstr "FFT is implemented for linear arrays only" #: ports/esp32s2/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" -msgstr "" +msgstr "Failed SSL handshake" #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." -msgstr "" +msgstr "Failed sending command." #: ports/nrf/sd_mutex.c #, c-format msgid "Failed to acquire mutex, err 0x%04x" -msgstr "" +msgstr "Failed to acquire mutex, err 0x%04x" #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "Failed to allocate RX buffer" -msgstr "" +msgstr "Failed to allocate RX buffer" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c @@ -963,304 +980,306 @@ msgstr "" #: ports/stm/common-hal/pulseio/PulseIn.c #, c-format msgid "Failed to allocate RX buffer of %d bytes" -msgstr "" +msgstr "Failed to allocate RX buffer of %d bytes" #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" -msgstr "" +msgstr "Failed to allocate WiFi memory" #: ports/esp32s2/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" -msgstr "" +msgstr "Failed to allocate WiFi scan memory" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" -msgstr "" +msgstr "Failed to connect: internal error" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: timeout" -msgstr "" +msgstr "Failed to connect: timeout" #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Failed to init wifi" -msgstr "" +msgstr "Failed to init WiFi" #: shared-module/audiomp3/MP3Decoder.c msgid "Failed to parse MP3 file" -msgstr "" +msgstr "Failed to parse MP3 file" #: ports/nrf/sd_mutex.c #, c-format msgid "Failed to release mutex, err 0x%04x" -msgstr "" +msgstr "Failed to release mutex, err 0x%04x" #: supervisor/shared/safe_mode.c msgid "Failed to write internal flash." -msgstr "" +msgstr "Failed to write internal flash." #: py/moduerrno.c msgid "File exists" -msgstr "" +msgstr "File exists" #: ports/atmel-samd/common-hal/canio/Listener.c #: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" -msgstr "" +msgstr "Filters too complex" #: ports/esp32s2/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" -msgstr "" +msgstr "Firmware image is invalid" #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" -msgstr "" +msgstr "Format not supported" #: shared-module/framebufferio/FramebufferDisplay.c #, c-format msgid "Framebuffer requires %d bytes" -msgstr "" +msgstr "Framebuffer requires %d bytes" #: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" -msgstr "" +msgstr "Frequency must match existing PWMOut using this timer" #: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c #: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c msgid "Function requires lock" -msgstr "" +msgstr "Function requires lock" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "Generic Failure" -msgstr "" +msgstr "Generic Failure" #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c msgid "Group already used" -msgstr "" +msgstr "Group already used" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" -msgstr "" +msgstr "Hardware busy, try alternative pins" #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "Hardware in use, try alternative pins" -msgstr "" +msgstr "Hardware in use, try alternative pins" #: shared-bindings/wifi/Radio.c msgid "Hostname must be between 1 and 253 characters" -msgstr "" +msgstr "Hostname must be between 1 and 253 characters" #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" -msgstr "" +msgstr "I/O operation on closed file" #: ports/stm/common-hal/busio/I2C.c msgid "I2C Init Error" -msgstr "" +msgstr "I2C init error" #: ports/raspberrypi/common-hal/busio/I2C.c msgid "I2C peripheral in use" -msgstr "" +msgstr "I2C peripheral in use" #: shared-bindings/audiobusio/I2SOut.c msgid "I2SOut not available" -msgstr "" +msgstr "I2SOut not available" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "IOs 0, 2 & 4 do not support internal pullup in sleep" -msgstr "" +msgstr "IOs 0, 2 & 4 do not support internal pullup in sleep" #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" -msgstr "" +msgstr "IV must be %d bytes long" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "In-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "In-buffer elements must be <= 4 bytes long" #: py/persistentcode.c msgid "" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "mpy-update for more info." msgstr "" +"Incompatible .mpy file. Please update all .mpy files. See https://adafru.it/" +"mpy-update for more info." #: shared-bindings/_pew/PewPew.c msgid "Incorrect buffer size" -msgstr "" +msgstr "Incorrect buffer size" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Init program size invalid" -msgstr "" +msgstr "Init program size invalid" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Initial set pin direction conflicts with initial out pin direction" -msgstr "" +msgstr "Initial set pin direction conflicts with initial out pin direction" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Initial set pin state conflicts with initial out pin state" -msgstr "" +msgstr "Initial set pin state conflicts with initial out pin state" #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" -msgstr "" +msgstr "Initialisation failed due to lack of memory" #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" -msgstr "" +msgstr "Input buffer length (%d) must be a multiple of the strand count (%d)" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "Input taking too long" -msgstr "" +msgstr "Input taking too long" #: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" -msgstr "" +msgstr "Input/output error" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d jumps on pin" -msgstr "" +msgstr "Instruction %d jumps on pin" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" -msgstr "" +msgstr "Instruction %d shifts in more bits than pin count" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts out more bits than pin count" -msgstr "" +msgstr "Instruction %d shifts out more bits than pin count" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d uses extra pin" -msgstr "" +msgstr "Instruction %d uses extra pin" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d waits on input outside of count" -msgstr "" +msgstr "Instruction %d waits on input outside of count" #: ports/nrf/common-hal/_bleio/__init__.c msgid "Insufficient authentication" -msgstr "" +msgstr "Insufficient authentication" #: ports/nrf/common-hal/_bleio/__init__.c msgid "Insufficient encryption" -msgstr "" +msgstr "Insufficient encryption" #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" -msgstr "" +msgstr "Internal define error" #: shared-module/rgbmatrix/RGBMatrix.c #, c-format msgid "Internal error #%d" -msgstr "" +msgstr "Internal error #%d" #: shared-bindings/sdioio/SDCard.c msgid "Invalid %q" -msgstr "" +msgstr "Invalid %q" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Invalid %q pin" -msgstr "" +msgstr "Invalid %q pin" #: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c #: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c msgid "Invalid %q pin selection" -msgstr "" +msgstr "Invalid %q pin selection" #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" -msgstr "" +msgstr "Invalid ADC unit value" #: shared-module/displayio/OnDiskBitmap.c msgid "Invalid BMP file" -msgstr "" +msgstr "Invalid BMP file" #: shared-bindings/wifi/Radio.c msgid "Invalid BSSID" -msgstr "" +msgstr "Invalid BSSID" #: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" -msgstr "" +msgstr "Invalid DAC pin supplied" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" -msgstr "" +msgstr "Invalid PWM frequency" #: ports/esp32s2/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" -msgstr "" +msgstr "Invalid pin" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" -msgstr "" +msgstr "Invalid argument" #: shared-module/displayio/Bitmap.c msgid "Invalid bits per value" -msgstr "" +msgstr "Invalid bits per value" #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c msgid "Invalid buffer size" -msgstr "" +msgstr "Invalid buffer size" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "Invalid byteorder string" -msgstr "" +msgstr "Invalid byteorder string" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" -msgstr "" +msgstr "Invalid capture period. Valid range: 1 - 500" #: shared-bindings/audiomixer/Mixer.c msgid "Invalid channel count" -msgstr "" +msgstr "Invalid channel count" #: shared-bindings/digitalio/DigitalInOut.c msgid "Invalid direction." -msgstr "" +msgstr "Invalid direction." #: shared-module/audiocore/WaveFile.c msgid "Invalid file" -msgstr "" +msgstr "Invalid file" #: shared-module/audiocore/WaveFile.c msgid "Invalid format chunk size" -msgstr "" +msgstr "Invalid format chunk size" #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" -msgstr "" +msgstr "Invalid frequency" #: supervisor/shared/safe_mode.c msgid "Invalid memory access." -msgstr "" +msgstr "Invalid memory access." #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "Invalid number of bits" -msgstr "" +msgstr "Invalid number of bits" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid phase" -msgstr "" +msgstr "Invalid phase" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c @@ -1268,15 +1287,15 @@ msgstr "" #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" -msgstr "" +msgstr "Invalid pin" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Invalid pin for left channel" -msgstr "" +msgstr "Invalid pin for left channel" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Invalid pin for right channel" -msgstr "" +msgstr "Invalid pin for right channel" #: ports/atmel-samd/common-hal/busio/I2C.c #: ports/atmel-samd/common-hal/busio/SPI.c @@ -1292,343 +1311,347 @@ msgstr "" #: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "Invalid pins" -msgstr "" +msgstr "Invalid pins" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c msgid "Invalid polarity" -msgstr "" +msgstr "Invalid polarity" #: shared-bindings/_bleio/Characteristic.c msgid "Invalid properties" -msgstr "" +msgstr "Invalid properties" #: shared-bindings/microcontroller/__init__.c msgid "Invalid run mode." -msgstr "" +msgstr "Invalid run mode." #: shared-module/_bleio/Attribute.c msgid "Invalid security_mode" -msgstr "" +msgstr "Invalid security_mode" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "Invalid size" -msgstr "" +msgstr "Invalid size" #: ports/esp32s2/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" -msgstr "" +msgstr "Invalid socket for TLS" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "Invalid state" -msgstr "" +msgstr "Invalid state" #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" -msgstr "" +msgstr "Invalid voice" #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice count" -msgstr "" +msgstr "Invalid voice count" #: shared-module/audiocore/WaveFile.c msgid "Invalid wave file" -msgstr "" +msgstr "Invalid wave file" #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "Invalid word/bit length" -msgstr "" +msgstr "Invalid word/bit length" #: shared-bindings/aesio/aes.c msgid "Key must be 16, 24, or 32 bytes long" -msgstr "" +msgstr "Key must be 16, 24, or 32 bytes long" #: py/compile.c msgid "LHS of keyword arg must be an id" -msgstr "" +msgstr "LHS of keyword arg must be an id" #: shared-module/displayio/Group.c msgid "Layer already in a group." -msgstr "" +msgstr "Layer already in a group." #: shared-module/displayio/Group.c msgid "Layer must be a Group or TileGrid subclass." -msgstr "" +msgstr "Layer must be a Group or TileGrid subclass." #: py/objslice.c msgid "Length must be an int" -msgstr "" +msgstr "Length must be an int" #: py/objslice.c msgid "Length must be non-negative" -msgstr "" +msgstr "Length must be non-negative" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "MAC address was invalid" -msgstr "" +msgstr "MAC address was invalid" #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." -msgstr "" +msgstr "MISO pin init failed." #: shared-module/bitbangio/SPI.c msgid "MOSI pin init failed." -msgstr "" +msgstr "MOSI pin init failed." #: shared-module/displayio/Shape.c #, c-format msgid "Maximum x value when mirrored is %d" -msgstr "" +msgstr "Maximum x value when mirrored is %d" #: shared-bindings/canio/Message.c msgid "Messages limited to 8 bytes" -msgstr "" +msgstr "Messages limited to 8 bytes" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "" +msgstr "CircuitPython NLR jump failed. Likely memory corruption." #: supervisor/shared/safe_mode.c +#, fuzzy msgid "MicroPython fatal error." -msgstr "" +msgstr "CircuitPython fatal error." #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" -msgstr "" +msgstr "Microphone startup delay must be in range 0.0 to 1.0" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "Missing MISO or MOSI Pin" -msgstr "" +msgstr "Missing MISO or MOSI pin" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" -msgstr "" +msgstr "Missing first_in_pin. Instruction %d reads pin(s)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)" -msgstr "" +msgstr "Missing first_in_pin. Instruction %d shifts in from pin(s)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d waits based on pin" -msgstr "" +msgstr "Missing first_in_pin. Instruction %d waits based on pin" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)" -msgstr "" +msgstr "Missing first_out_pin. Instruction %d shifts out to pin(s)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_out_pin. Instruction %d writes pin(s)" -msgstr "" +msgstr "Missing first_out_pin. Instruction %d writes pin(s)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_set_pin. Instruction %d sets pin(s)" -msgstr "" +msgstr "Missing first_set_pin. Instruction %d sets pin(s)" #: shared-bindings/displayio/Group.c msgid "Must be a %q subclass." -msgstr "" +msgstr "Must be a %q subclass." #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" -msgstr "" +msgstr "Must provide MISO or MOSI pin" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" -msgstr "" +msgstr "Must use a multiple of 6 rgb pins, not %d" #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" -msgstr "" +msgstr "NVS Error" #: py/parse.c msgid "Name too long" -msgstr "" +msgstr "Name too long" #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "No CCCD for this Characteristic" -msgstr "" +msgstr "No CCCD for this Characteristic" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" -msgstr "" +msgstr "No DAC on chip" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "No DMA channel found" -msgstr "" +msgstr "No DMA channel found" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "No DMA pacing timer found" -msgstr "" +msgstr "No DMA pacing timer found" #: shared-module/adafruit_bus_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" -msgstr "" +msgstr "No I2C device at address: %x" #: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" -msgstr "" +msgstr "No MISO pin" #: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" -msgstr "" +msgstr "No MOSI pin" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" -msgstr "" +msgstr "No RX pin" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" -msgstr "" +msgstr "No TX pin" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" -msgstr "" +msgstr "No available clocks" #: shared-bindings/_bleio/PacketBuffer.c msgid "No connection: length cannot be determined" -msgstr "" +msgstr "No connection: length cannot be determined" #: shared-bindings/board/__init__.c msgid "No default %q bus" -msgstr "" +msgstr "No default %q bus" #: ports/atmel-samd/common-hal/touchio/TouchIn.c msgid "No free GCLKs" -msgstr "" +msgstr "No free GCLKs" #: shared-bindings/os/__init__.c msgid "No hardware random available" -msgstr "" +msgstr "No hardware random available" #: ports/atmel-samd/common-hal/ps2io/Ps2.c msgid "No hardware support on clk pin" -msgstr "" +msgstr "No hardware support on clk pin" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "No hardware support on pin" -msgstr "" +msgstr "No hardware support on pin" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No in in program" -msgstr "" +msgstr "No in in program" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No in or out in program" -msgstr "" +msgstr "No in or out in program" #: shared-bindings/aesio/aes.c msgid "No key was specified" -msgstr "" +msgstr "No key was specified" #: shared-bindings/time/__init__.c msgid "No long integer support" -msgstr "" +msgstr "No long integer support" #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" -msgstr "" +msgstr "No network with that ssid" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No out in program" -msgstr "" +msgstr "No out in program" #: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" -msgstr "" +msgstr "No pull up found on SDA or SCL; check your wiring" #: shared-module/touchio/TouchIn.c msgid "No pulldown on pin; 1Mohm recommended" -msgstr "" +msgstr "No pulldown on pin; 1Mohm recommended" #: py/moduerrno.c msgid "No space left on device" -msgstr "" +msgstr "No space left on device" #: py/moduerrno.c msgid "No such file/directory" -msgstr "" +msgstr "No such file/directory" #: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" -msgstr "" +msgstr "No timer available" #: supervisor/shared/safe_mode.c msgid "Nordic Soft Device failure assertion." -msgstr "" +msgstr "Nordic Soft Device failure assertion." #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" -msgstr "" +msgstr "Not a valid IP string" #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "Not connected" -msgstr "" +msgstr "Not connected" #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c #: shared-bindings/audiopwmio/PWMAudioOut.c msgid "Not playing" -msgstr "" +msgstr "Not playing" #: main.c msgid "Not running saved code.\n" -msgstr "" +msgstr "Not running saved code.\n" #: shared-bindings/_bleio/__init__.c msgid "Not settable" -msgstr "" +msgstr "Not settable" #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." msgstr "" +"Object has been deinitialised and can no longer be used. Create a new object." #: ports/nrf/common-hal/busio/UART.c msgid "Odd parity is not supported" -msgstr "" +msgstr "Odd parity is not supported" #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/raspberrypi/common-hal/audiobusio/PDMIn.c msgid "Only 8 or 16 bit mono with " -msgstr "" +msgstr "Only 8 or 16 bit mono with " #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" -msgstr "" +msgstr "Only IPv4 addresses supported" #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" -msgstr "" +msgstr "Only IPv4 sockets supported" #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" +"Only Windows format, uncompressed BMP supported: given header size is %d" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1636,94 +1659,98 @@ msgid "" "Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " "%d bpp given" msgstr "" +"Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " +"%d bpp given" #: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." -msgstr "" +msgstr "Only one TouchAlarm can be set in deep sleep." #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." -msgstr "" +msgstr "Only one alarm.time alarm can be set." #: shared-module/displayio/ColorConverter.c msgid "Only one color can be transparent at a time" -msgstr "" +msgstr "Only one colour can be transparent at a time" #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" -msgstr "" +msgstr "Only raw int supported for ip" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "Operation or feature not supported" -msgstr "" +msgstr "Operation or feature not supported" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "Operation timed out" -msgstr "" +msgstr "Operation timed out" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "Out of memory" -msgstr "" +msgstr "Out of memory" #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" -msgstr "" +msgstr "Out of sockets" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Out-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "Out-buffer elements must be <= 4 bytes long" #: shared-bindings/bitops/__init__.c #, c-format msgid "Output buffer must be at least %d bytes" -msgstr "" +msgstr "Output buffer must be at least %d bytes" #: shared-bindings/audiobusio/PDMIn.c msgid "Oversample must be multiple of 8." -msgstr "" +msgstr "Oversample must be multiple of 8." #: shared-bindings/audiobusio/PDMIn.c msgid "PDMIn not available" -msgstr "" +msgstr "PDMIn not available" #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "" +"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" +"PWM frequency not writable when variable_frequency is False on construction." #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice already in use" -msgstr "" +msgstr "PWM slice already in use" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice channel A already in use" -msgstr "" +msgstr "PWM slice channel A already in use" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" -msgstr "" +msgstr "ParallelBus not yet supported" #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" -msgstr "" +msgstr "Peripheral in use" #: py/moduerrno.c msgid "Permission denied" -msgstr "" +msgstr "Permission denied" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" -msgstr "" +msgstr "Pin count must be at least 1" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Pin count too large" -msgstr "" +msgstr "Pin count too large" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c @@ -1733,24 +1760,24 @@ msgstr "" #: ports/raspberrypi/common-hal/analogio/AnalogIn.c #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Pin does not have ADC capabilities" -msgstr "" +msgstr "Pin does not have ADC capabilities" #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" -msgstr "" +msgstr "Pin is input only" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "Pin must be on PWM Channel B" -msgstr "" +msgstr "Pin must be on PWM Channel B" #: ports/atmel-samd/common-hal/countio/Counter.c msgid "Pin must support hardware interrupts" -msgstr "" +msgstr "Pin must support hardware interrupts" #: ports/stm/common-hal/pulseio/PulseIn.c msgid "Pin number already reserved by EXTI" -msgstr "" +msgstr "Pin number already reserved by EXTI" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -1759,28 +1786,33 @@ msgid "" "bytes. If this cannot be avoided, pass allow_inefficient=True to the " "constructor" msgstr "" +"Pinout uses %d bytes per element, which consumes more than the ideal %d " +"bytes. If this cannot be avoided, pass allow_inefficient=True to the " +"constructor" #: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c msgid "Pins must be sequential" -msgstr "" +msgstr "Pins must be sequential" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" -msgstr "" +msgstr "Pins must share PWM slice" #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" -msgstr "" +msgstr "Plus any modules on the filesystem\n" #: shared-module/vectorio/Polygon.c msgid "Polygon needs at least 3 points" -msgstr "" +msgstr "Polygon needs at least 3 points" #: ports/esp32s2/common-hal/pulseio/PulseOut.c msgid "" "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " "instead" msgstr "" +"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " +"instead" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c @@ -1790,266 +1822,272 @@ msgid "" "Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " "instead" msgstr "" +"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " +"instead" #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" -msgstr "" +msgstr "Prefix buffer must be on the heap" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" -msgstr "" +msgstr "Press any key to enter the REPL. Use CTRL-D to reload.\n" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" -msgstr "" +msgstr "Pretending to deep sleep until alarm, CTRL-C or file write.\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Program does IN without loading ISR" -msgstr "" +msgstr "Program does IN without loading ISR" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Program does OUT without loading OSR" -msgstr "" +msgstr "Program does OUT without loading OSR" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Program must contain at least one 16-bit instruction." -msgstr "" +msgstr "Program must contain at least one 16-bit instruction." #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Program size invalid" -msgstr "" +msgstr "Program size invalid" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Program too large" -msgstr "" +msgstr "Program too large" #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." -msgstr "" +msgstr "Pull not used when direction is output." #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "RAISE mode is not implemented" -msgstr "" +msgstr "RAISE mode is not implemented" #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" -msgstr "" +msgstr "RNG deinit Error" #: ports/stm/common-hal/os/__init__.c msgid "RNG Init Error" -msgstr "" +msgstr "RNG init Error" #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c msgid "RS485 Not yet supported on this device" -msgstr "" +msgstr "RS485 not yet supported on this device" #: ports/esp32s2/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" -msgstr "" +msgstr "RS485 inversion specified when not in RS485 mode" #: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" -msgstr "" +msgstr "RTC calibration is not supported on this board" #: shared-bindings/alarm/time/TimeAlarm.c shared-bindings/time/__init__.c msgid "RTC is not supported on this board" -msgstr "" +msgstr "RTC is not supported on this board" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c msgid "RTS/CTS/RS485 Not yet supported on this device" -msgstr "" +msgstr "RTS/CTS/RS485 not yet supported on this device" #: ports/stm/common-hal/os/__init__.c msgid "Random number generation error" -msgstr "" +msgstr "Random number generation error" #: shared-bindings/memorymonitor/AllocationSize.c #: shared-bindings/pulseio/PulseIn.c msgid "Read-only" -msgstr "" +msgstr "Read-only" #: extmod/vfs_fat.c py/moduerrno.c msgid "Read-only filesystem" -msgstr "" +msgstr "Read-only filesystem" #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c msgid "Read-only object" -msgstr "" +msgstr "Read-only object" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "Received response was invalid" -msgstr "" +msgstr "Received response was invalid" #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" -msgstr "" +msgstr "Refresh too soon" #: shared-bindings/canio/RemoteTransmissionRequest.c msgid "RemoteTransmissionRequests limited to 8 bytes" -msgstr "" +msgstr "RemoteTransmissionRequests limited to 8 bytes" #: shared-bindings/aesio/aes.c msgid "Requested AES mode is unsupported" -msgstr "" +msgstr "Requested AES mode is unsupported" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "Requested resource not found" -msgstr "" +msgstr "Requested resource not found" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" -msgstr "" +msgstr "Right channel unsupported" #: shared-bindings/_pew/PewPew.c msgid "Row entry must be digitalio.DigitalInOut" -msgstr "" +msgstr "Row entry must be digitalio. DigitalInOut" #: main.c msgid "Running in safe mode! " -msgstr "" +msgstr "Running in safe mode! " #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" -msgstr "" +msgstr "SD card CSD format not supported" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format msgid "SDIO GetCardInfo Error %d" -msgstr "" +msgstr "SDIO GetCardInfo error %d" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format msgid "SDIO Init Error %d" -msgstr "" +msgstr "SDIO init error %d" #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" -msgstr "" +msgstr "SPI init error" #: ports/stm/common-hal/busio/SPI.c msgid "SPI Re-initialization error" -msgstr "" +msgstr "SPI reinitialisation error" #: ports/raspberrypi/common-hal/busio/SPI.c msgid "SPI peripheral in use" -msgstr "" +msgstr "SPI peripheral in use" #: shared-bindings/audiomixer/Mixer.c msgid "Sample rate must be positive" -msgstr "" +msgstr "Sample rate must be positive" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #, c-format msgid "Sample rate too high. It must be less than %d" -msgstr "" +msgstr "Sample rate too high. It must be less than %d" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Scan already in progess. Stop with stop_scan." -msgstr "" +msgstr "Scan already in progess. Stop with stop_scan." #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Selected CTS pin not valid" -msgstr "" +msgstr "Selected CTS pin not valid" #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Selected RTS pin not valid" -msgstr "" +msgstr "Selected RTS pin not valid" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" -msgstr "" +msgstr "Serialiser in use" #: shared-bindings/ssl/SSLContext.c msgid "Server side context cannot have hostname" -msgstr "" +msgstr "Server side context cannot have hostname" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Set pin count must be between 1 and 5" -msgstr "" +msgstr "Set pin count must be between 1 and 5" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Side set pin count must be between 1 and 5" -msgstr "" +msgstr "Side set pin count must be between 1 and 5" #: ports/cxd56/common-hal/camera/Camera.c msgid "Size not supported" -msgstr "" +msgstr "Size not supported" #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." -msgstr "" +msgstr "Slice and value different lengths." #: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c #: shared-bindings/displayio/TileGrid.c #: shared-bindings/memorymonitor/AllocationSize.c #: shared-bindings/pulseio/PulseIn.c msgid "Slices not supported" -msgstr "" +msgstr "Slices not supported" #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" -msgstr "" +msgstr "SocketPool can only be used with wifi.radio" #: shared-bindings/aesio/aes.c msgid "Source and destination buffers must be the same length" -msgstr "" +msgstr "Source and destination buffers must be the same length" #: extmod/modure.c msgid "Splitting with sub-captures" -msgstr "" +msgstr "Splitting with sub-captures" #: shared-bindings/supervisor/__init__.c msgid "Stack size must be at least 256" -msgstr "" +msgstr "Stack size must be at least 256" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Stereo left must be on PWM channel A" -msgstr "" +msgstr "Stereo left must be on PWM channel A" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Stereo right must be on PWM channel B" -msgstr "" +msgstr "Stereo right must be on PWM channel B" #: shared-bindings/multiterminal/__init__.c msgid "Stream missing readinto() or write() method." -msgstr "" +msgstr "Stream missing readinto() or write() method." #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "Supply at least one UART pin" -msgstr "" +msgstr "Supply at least one UART pin" #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" -msgstr "" +msgstr "Supply one of monotonic_time or epoch_time" #: shared-bindings/gnss/GNSS.c msgid "System entry must be gnss.SatelliteSystem" -msgstr "" +msgstr "System entry must be gnss.SatelliteSystem" #: ports/stm/common-hal/microcontroller/Processor.c msgid "Temperature read timed out" -msgstr "" +msgstr "Temperature read timed out" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Please increase the stack size if you know how, or if not:" msgstr "" +"The CircuitPython heap was corrupted because the stack was too small.\n" +"Please increase the stack size if you know how, or if not:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode.\n" msgstr "" +"The `microcontroller` module was used to boot into safe mode. Press reset to " +"exit safe mode.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" -msgstr "" +msgstr "The length of rgb_pins must be 6, 12, 18, 24, or 30" #: supervisor/shared/safe_mode.c msgid "" @@ -2057,270 +2095,275 @@ msgid "" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" +"The microcontroller's power dipped. Make sure your power supply provides\n" +"enough power for the whole circuit and press reset (after ejecting " +"CIRCUITPY).\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" -msgstr "" +msgstr "The sample's bits_per_sample does not match the mixer's" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's channel count does not match the mixer's" -msgstr "" +msgstr "The sample's channel count does not match the mixer's" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's sample rate does not match the mixer's" -msgstr "" +msgstr "The sample's sample rate does not match the mixer's" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's signedness does not match the mixer's" -msgstr "" +msgstr "The sample's signedness does not match the mixer's" #: shared-bindings/displayio/TileGrid.c msgid "Tile height must exactly divide bitmap height" -msgstr "" +msgstr "Tile height must exactly divide bitmap height" #: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c msgid "Tile index out of bounds" -msgstr "" +msgstr "Tile index out of bounds" #: shared-bindings/displayio/TileGrid.c msgid "Tile value out of bounds" -msgstr "" +msgstr "Tile value out of bounds" #: shared-bindings/displayio/TileGrid.c msgid "Tile width must exactly divide bitmap width" -msgstr "" +msgstr "Tile width must exactly divide bitmap width" #: shared-bindings/alarm/time/TimeAlarm.c msgid "Time is in the past." -msgstr "" +msgstr "Time is in the past." #: ports/nrf/common-hal/_bleio/Adapter.c #, c-format msgid "Timeout is too long: Maximum timeout length is %d seconds" -msgstr "" +msgstr "Timeout is too long: Maximum timeout length is %d seconds" #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " -msgstr "" +msgstr "To exit, please reset the board without " #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." -msgstr "" +msgstr "Too many channels in sample." #: shared-module/displayio/__init__.c msgid "Too many display busses" -msgstr "" +msgstr "Too many display busses" #: shared-module/displayio/__init__.c msgid "Too many displays" -msgstr "" +msgstr "Too many displays" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Total data to write is larger than outgoing_packet_length" -msgstr "" +msgstr "Total data to write is larger than outgoing_packet_length" #: py/obj.c msgid "Traceback (most recent call last):\n" -msgstr "" +msgstr "Traceback (most recent call last):\n" #: shared-bindings/time/__init__.c msgid "Tuple or struct_time argument required" -msgstr "" +msgstr "Tuple or struct_time argument required" #: ports/stm/common-hal/busio/UART.c msgid "UART Buffer allocation error" -msgstr "" +msgstr "UART buffer allocation error" #: ports/stm/common-hal/busio/UART.c msgid "UART De-init error" -msgstr "" +msgstr "UART deinit error" #: ports/stm/common-hal/busio/UART.c msgid "UART Init Error" -msgstr "" +msgstr "UART init Error" #: ports/stm/common-hal/busio/UART.c msgid "UART Re-init error" -msgstr "" +msgstr "UART reinit error" #: ports/stm/common-hal/busio/UART.c msgid "UART write error" -msgstr "" +msgstr "UART write error" #: shared-module/usb_hid/Device.c msgid "USB Busy" -msgstr "" +msgstr "USB busy" #: shared-module/usb_hid/Device.c msgid "USB Error" -msgstr "" +msgstr "USB error" #: shared-bindings/_bleio/UUID.c msgid "UUID integer value must be 0-0xffff" -msgstr "" +msgstr "UUID integer value must be 0-0xffff" #: shared-bindings/_bleio/UUID.c msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" -msgstr "" +msgstr "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" #: shared-bindings/_bleio/UUID.c msgid "UUID value is not str, int or byte buffer" -msgstr "" +msgstr "UUID value is not str, int or byte buffer" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Unable to allocate buffers for signed conversion" -msgstr "" +msgstr "Unable to allocate buffers for signed conversion" #: ports/esp32s2/common-hal/busio/I2C.c msgid "Unable to create lock" -msgstr "" +msgstr "Unable to create lock" #: shared-module/displayio/I2CDisplay.c #, c-format msgid "Unable to find I2C Display at %x" -msgstr "" +msgstr "Unable to find I2C display at %x" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Unable to find free GCLK" -msgstr "" +msgstr "Unable to find free GCLK" #: py/parse.c msgid "Unable to init parser" -msgstr "" +msgstr "Unable to init parser" #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" -msgstr "" +msgstr "Unable to read colour palette data" #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." -msgstr "" +msgstr "Unable to write to nvm." #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." -msgstr "" +msgstr "Unable to write to sleep_memory." #: ports/nrf/common-hal/_bleio/UUID.c msgid "Unexpected nrfx uuid type" -msgstr "" +msgstr "Unexpected nrfx uuid type" #: ports/esp32s2/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" -msgstr "" +msgstr "Unhandled ESP TLS error %d %d %x %d" #: shared-bindings/wifi/Radio.c #, c-format msgid "Unknown failure %d" -msgstr "" +msgstr "Unknown failure %d" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown gatt error: 0x%04x" -msgstr "" +msgstr "Unknown gatt error: 0x%04x" #: supervisor/shared/safe_mode.c msgid "Unknown reason." -msgstr "" +msgstr "Unknown reason." #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" -msgstr "" +msgstr "Unknown security error: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown soft device error: %04x" -msgstr "" +msgstr "Unknown soft device error: %04x" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format msgid "Unmatched number of items on RHS (expected %d, got %d)." -msgstr "" +msgstr "Unmatched number of items on RHS (expected %d, got %d)." #: ports/nrf/common-hal/_bleio/__init__.c msgid "" "Unspecified issue. Can be that the pairing prompt on the other device was " "declined or ignored." msgstr "" +"Unspecified issue. Can be that the pairing prompt on the other device was " +"declined or ignored." #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c #: ports/esp32s2/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" -msgstr "" +msgstr "Unsupported baudrate" #: shared-module/displayio/display_core.c msgid "Unsupported display bus type" -msgstr "" +msgstr "Unsupported display bus type" #: shared-module/audiocore/WaveFile.c msgid "Unsupported format" -msgstr "" +msgstr "Unsupported format" #: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c msgid "Unsupported operation" -msgstr "" +msgstr "Unsupported operation" #: shared-bindings/digitalio/DigitalInOut.c msgid "Unsupported pull value." -msgstr "" +msgstr "Unsupported pull value." #: ports/esp32s2/common-hal/dualbank/__init__.c msgid "Update Failed" -msgstr "" +msgstr "Update failed" #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" -msgstr "" +msgstr "Value length != required fixed length" #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length > max_length" -msgstr "" +msgstr "Value length > max_length" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "Version was invalid" -msgstr "" +msgstr "Version was invalid" #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" -msgstr "" +msgstr "Viper functions don't currently support more than 4 arguments" #: ports/stm/common-hal/microcontroller/Processor.c msgid "Voltage read timed out" -msgstr "" +msgstr "Voltage read timed out" #: main.c msgid "WARNING: Your code filename has two extensions\n" -msgstr "" +msgstr "WARNING: Your code filename has two extensions\n" #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" -msgstr "" +msgstr "WatchDogTimer cannot be deinitialised once mode is set to RESET" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer is not currently running" -msgstr "" +msgstr "WatchDogTimer is not currently running" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" +msgstr "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.timeout must be greater than 0" -msgstr "" +msgstr "WatchDogTimer.timeout must be greater than 0" #: supervisor/shared/safe_mode.c msgid "Watchdog timer expired." -msgstr "" +msgstr "WatchDog timer expired." #: py/builtinhelp.c #, c-format @@ -2331,1358 +2374,1367 @@ msgid "" "\n" "To list built-in modules please do `help(\"modules\")`.\n" msgstr "" +"Welcome to Adafruit CircuitPython %s!\n" +"\n" +"Please visit learn.adafruit.com/category/circuitpython for project guides.\n" +"\n" +"To list built-in modules please do `help(\"modules\")`.\n" #: shared-bindings/wifi/Radio.c msgid "WiFi password must be between 8 and 63 characters" -msgstr "" +msgstr "WiFi password must be between 8 and 63 characters" #: main.c msgid "Woken up by alarm.\n" -msgstr "" +msgstr "Woken up by alarm.\n" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Writes not supported on Characteristic" -msgstr "" +msgstr "Writes not supported on Characteristic" #: supervisor/shared/safe_mode.c msgid "You are in safe mode: something unanticipated happened.\n" -msgstr "" +msgstr "You are in safe mode: something unanticipated happened.\n" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " -msgstr "" +msgstr "You requested starting safe mode by " #: py/objtype.c msgid "__init__() should return None" -msgstr "" +msgstr "__init__() should return None" #: py/objtype.c msgid "__init__() should return None, not '%q'" -msgstr "" +msgstr "__init__() should return None, not '%q'" #: py/objobject.c msgid "__new__ arg must be a user-type" -msgstr "" +msgstr "__new__ arg must be a user-type" #: extmod/modubinascii.c extmod/moduhashlib.c py/objarray.c msgid "a bytes-like object is required" -msgstr "" +msgstr "a bytes-like object is required" #: lib/embed/abort_.c msgid "abort() called" -msgstr "" +msgstr "abort() called" #: extmod/machine_mem.c #, c-format msgid "address %08x is not aligned to %d bytes" -msgstr "" +msgstr "address %08x is not aligned to %d bytes" #: shared-bindings/i2cperipheral/I2CPeripheral.c msgid "address out of bounds" -msgstr "" +msgstr "address out of bounds" #: shared-bindings/i2cperipheral/I2CPeripheral.c msgid "addresses is empty" -msgstr "" +msgstr "addresses is empty" #: py/modbuiltins.c msgid "arg is an empty sequence" -msgstr "" +msgstr "arg is an empty sequence" #: extmod/ulab/code/numerical/numerical.c msgid "argsort argument must be an ndarray" -msgstr "" +msgstr "argsort argument must be an ndarray" #: extmod/ulab/code/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" -msgstr "" +msgstr "argsort is not implemented for flattened arrays" #: py/runtime.c msgid "argument has wrong type" -msgstr "" +msgstr "argument has wrong type" #: extmod/ulab/code/linalg/linalg.c msgid "argument must be ndarray" -msgstr "" +msgstr "argument must be ndarray" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" -msgstr "" +msgstr "argument num/types mismatch" #: py/runtime.c msgid "argument should be a '%q' not a '%q'" -msgstr "" +msgstr "argument should be a '%q' not a '%q'" #: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c msgid "arguments must be ndarrays" -msgstr "" +msgstr "arguments must be ndarrays" #: extmod/ulab/code/ndarray.c msgid "array and index length must be equal" -msgstr "" +msgstr "array and index length must be equal" #: py/objarray.c shared-bindings/alarm/SleepMemory.c #: shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" -msgstr "" +msgstr "array/bytes required on right side" #: extmod/ulab/code/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" -msgstr "" +msgstr "attempt to get (arg)min/(arg)max of empty sequence" #: extmod/ulab/code/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" -msgstr "" +msgstr "attempt to get argmin/argmax of an empty sequence" #: py/objstr.c msgid "attributes not supported yet" -msgstr "" +msgstr "attributes not supported yet" #: extmod/ulab/code/numerical/numerical.c msgid "axis is out of bounds" -msgstr "" +msgstr "axis is out of bounds" #: extmod/ulab/code/numerical/numerical.c msgid "axis must be None, or an integer" -msgstr "" +msgstr "axis must be None, or an integer" #: extmod/ulab/code/numerical/numerical.c msgid "axis too long" -msgstr "" +msgstr "axis too long" #: py/builtinevex.c msgid "bad compile mode" -msgstr "" +msgstr "bad compile mode" #: py/objstr.c msgid "bad conversion specifier" -msgstr "" +msgstr "bad conversion specifier" #: py/objstr.c msgid "bad format string" -msgstr "" +msgstr "bad format string" #: py/binary.c py/objarray.c msgid "bad typecode" -msgstr "" +msgstr "bad typecode" #: py/emitnative.c msgid "binary op %q not implemented" -msgstr "" +msgstr "binary op %q not implemented" #: shared-bindings/busio/UART.c msgid "bits must be in range 5 to 9" -msgstr "" +msgstr "bits must be in range 5 to 9" #: shared-bindings/audiomixer/Mixer.c msgid "bits_per_sample must be 8 or 16" -msgstr "" +msgstr "bits_per_sample must be 8 or 16" #: py/emitinlinethumb.c msgid "branch not in range" -msgstr "" +msgstr "Branch not in range" #: extmod/ulab/code/ulab_create.c msgid "buffer is smaller than requested size" -msgstr "" +msgstr "Buffer is smaller than requested size" #: shared-bindings/audiocore/RawSample.c msgid "buffer must be a bytes-like object" -msgstr "" +msgstr "Buffer must be a bytes-like object" #: extmod/ulab/code/ulab_create.c msgid "buffer size must be a multiple of element size" -msgstr "" +msgstr "Buffer size must be a multiple of element size" #: shared-module/struct/__init__.c msgid "buffer size must match format" -msgstr "" +msgstr "Buffer size must match format" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "buffer slices must be of equal length" -msgstr "" +msgstr "Buffer slices must be of equal length" #: py/modstruct.c shared-bindings/struct/__init__.c #: shared-module/struct/__init__.c msgid "buffer too small" -msgstr "" +msgstr "Buffer too small" #: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c msgid "buffer too small for requested bytes" -msgstr "" +msgstr "Buffer too small for requested bytes" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" -msgstr "" +msgstr "Buttons must be digitalio.DigitalInOut" #: py/vm.c msgid "byte code not implemented" -msgstr "" +msgstr "Byte code not implemented" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "byteorder is not a string" -msgstr "" +msgstr "Byteorder is not a string" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" -msgstr "" +msgstr "Bytes > 8 bits not supported" #: py/objarray.c msgid "bytes length not a multiple of item size" -msgstr "" +msgstr "Bytes length not a multiple of item size" #: py/objstr.c msgid "bytes value out of range" -msgstr "" +msgstr "Bytes value out of range" #: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" -msgstr "" +msgstr "Calibration is out of range" #: ports/atmel-samd/bindings/samd/Clock.c msgid "calibration is read only" -msgstr "" +msgstr "Calibration is read only" #: ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration value out of range +/-127" -msgstr "" +msgstr "Calibration value out of range +/-127" #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" -msgstr "" +msgstr "Can only have up to 4 parameters to thumb assembly" #: py/emitinlinextensa.c msgid "can only have up to 4 parameters to Xtensa assembly" -msgstr "" +msgstr "Can only have up to 4 parameters to xtensa assembly" #: py/persistentcode.c msgid "can only save bytecode" -msgstr "" +msgstr "Can only save bytecode" #: py/objtype.c msgid "can't add special method to already-subclassed class" -msgstr "" +msgstr "Can't add special method to already-subclassed class" #: py/compile.c msgid "can't assign to expression" -msgstr "" +msgstr "Can't assign to expression" #: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-module/_pixelbuf/PixelBuf.c msgid "can't convert %q to %q" -msgstr "" +msgstr "Can't convert %q to %q" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" -msgstr "" +msgstr "Can't convert '%q' object to %q implicitly" #: py/obj.c msgid "can't convert to %q" -msgstr "" +msgstr "Can't convert to %q" #: py/objstr.c msgid "can't convert to str implicitly" -msgstr "" +msgstr "Can't convert to str implicitly" #: py/compile.c msgid "can't declare nonlocal in outer code" -msgstr "" +msgstr "Can't declare nonlocal in outer code" #: py/compile.c msgid "can't delete expression" -msgstr "" +msgstr "Can't delete expression" #: py/emitnative.c msgid "can't do binary op between '%q' and '%q'" -msgstr "" +msgstr "Can't do binary op between '%q' and '%q'" #: py/objcomplex.c msgid "can't do truncated division of a complex number" -msgstr "" +msgstr "Can't do truncated division of a complex number" #: py/compile.c msgid "can't have multiple **x" -msgstr "" +msgstr "can't have multiple **x" #: py/compile.c msgid "can't have multiple *x" -msgstr "" +msgstr "can't have multiple *x" #: py/emitnative.c msgid "can't implicitly convert '%q' to 'bool'" -msgstr "" +msgstr "can't implicitly convert '%q' to 'bool'" #: py/emitnative.c msgid "can't load from '%q'" -msgstr "" +msgstr "can't load from '%q'" #: py/emitnative.c msgid "can't load with '%q' index" -msgstr "" +msgstr "can't load with '%q' index" #: py/objgenerator.c msgid "can't pend throw to just-started generator" -msgstr "" +msgstr "can't pend throw to just-started generator" #: py/objgenerator.c msgid "can't send non-None value to a just-started generator" -msgstr "" +msgstr "can't send non-None value to a just-started generator" #: shared-module/sdcardio/SDCard.c msgid "can't set 512 block size" -msgstr "" +msgstr "can't set 512 block size" #: py/objnamedtuple.c msgid "can't set attribute" -msgstr "" +msgstr "can't set attribute" #: py/emitnative.c msgid "can't store '%q'" -msgstr "" +msgstr "can't store '%q'" #: py/emitnative.c msgid "can't store to '%q'" -msgstr "" +msgstr "can't store to '%q'" #: py/emitnative.c msgid "can't store with '%q' index" -msgstr "" +msgstr "Can't store with '%q' index" #: py/objstr.c msgid "" "can't switch from automatic field numbering to manual field specification" msgstr "" +"can't switch from automatic field numbering to manual field specification" #: py/objstr.c msgid "" "can't switch from manual field specification to automatic field numbering" msgstr "" +"can't switch from manual field specification to automatic field numbering" #: extmod/ulab/code/ndarray_operators.c msgid "cannot cast output with casting rule" -msgstr "" +msgstr "can't cast output with casting rule" #: py/objtype.c msgid "cannot create '%q' instances" -msgstr "" +msgstr "can't create '%q' instances" #: py/objtype.c msgid "cannot create instance" -msgstr "" +msgstr "can't create instance" #: py/runtime.c msgid "cannot import name %q" -msgstr "" +msgstr "can't import name %q" #: py/builtinimport.c msgid "cannot perform relative import" -msgstr "" +msgstr "can't perform relative import" #: py/emitnative.c msgid "casting" -msgstr "" +msgstr "casting" #: shared-bindings/_stage/Text.c msgid "chars buffer too small" -msgstr "" +msgstr "chars buffer too small" #: py/modbuiltins.c msgid "chr() arg not in range(0x110000)" -msgstr "" +msgstr "chr() arg not in range(0x110000)" #: py/modbuiltins.c msgid "chr() arg not in range(256)" -msgstr "" +msgstr "chr() arg not in range(256)" #: shared-module/vectorio/Circle.c msgid "circle can only be registered in one parent" -msgstr "" +msgstr "circle can only be registered in one parent" #: shared-bindings/bitmaptools/__init__.c msgid "clip point must be (x,y) tuple" -msgstr "" +msgstr "clip point must be (x,y) tuple" #: shared-bindings/msgpack/ExtType.c msgid "code outside range 0~127" -msgstr "" +msgstr "code outside range 0~127" #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" -msgstr "" +msgstr "colour buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" #: shared-bindings/displayio/Palette.c msgid "color buffer must be a buffer, tuple, list, or int" -msgstr "" +msgstr "colour buffer must be a buffer, tuple, list, or int" #: shared-bindings/displayio/Palette.c msgid "color buffer must be a bytearray or array of type 'b' or 'B'" -msgstr "" +msgstr "colour buffer must be a bytearray or array of type 'b' or 'B'" #: shared-bindings/displayio/Palette.c msgid "color must be between 0x000000 and 0xffffff" -msgstr "" +msgstr "colour must be between 0x000000 and 0xffffff" #: shared-bindings/displayio/ColorConverter.c msgid "color should be an int" -msgstr "" +msgstr "colour should be an int" #: py/objcomplex.c msgid "complex division by zero" -msgstr "" +msgstr "complex division by zero" #: py/objfloat.c py/parsenum.c msgid "complex values not supported" -msgstr "" +msgstr "complex values not supported" #: extmod/moduzlib.c msgid "compression header" -msgstr "" +msgstr "compression header" #: py/parse.c msgid "constant must be an integer" -msgstr "" +msgstr "constant must be an integer" #: py/emitnative.c msgid "conversion to object" -msgstr "" +msgstr "conversion to object" #: extmod/ulab/code/filter/filter.c msgid "convolve arguments must be linear arrays" -msgstr "" +msgstr "convolve arguments must be linear arrays" #: extmod/ulab/code/filter/filter.c msgid "convolve arguments must be ndarrays" -msgstr "" +msgstr "convolve arguments must be ndarrays" #: extmod/ulab/code/filter/filter.c msgid "convolve arguments must not be empty" -msgstr "" +msgstr "convolve arguments must not be empty" #: extmod/ulab/code/poly/poly.c msgid "could not invert Vandermonde matrix" -msgstr "" +msgstr "could not invert Vandermonde matrix" #: shared-module/sdcardio/SDCard.c msgid "couldn't determine SD card version" -msgstr "" +msgstr "couldn't determine SD card version" #: extmod/ulab/code/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" -msgstr "" +msgstr "cross is defined for 1D arrays of length 3" #: extmod/ulab/code/approx/approx.c msgid "data must be iterable" -msgstr "" +msgstr "cata must be iterable" #: extmod/ulab/code/approx/approx.c msgid "data must be of equal length" -msgstr "" +msgstr "cata must be of equal length" #: extmod/ulab/code/ndarray.c msgid "data type not understood" -msgstr "" +msgstr "cata type not understood" #: py/parsenum.c msgid "decimal numbers not supported" -msgstr "" +msgstr "cecimal numbers not supported" #: py/compile.c msgid "default 'except' must be last" -msgstr "" +msgstr "default 'except' must be last" #: shared-bindings/msgpack/__init__.c msgid "default is not a function" -msgstr "" +msgstr "default is not a function" #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" msgstr "" +"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" #: shared-bindings/audiobusio/PDMIn.c msgid "destination buffer must be an array of type 'H' for bit_depth = 16" -msgstr "" +msgstr "destination buffer must be an array of type 'H' for bit_depth = 16" #: shared-bindings/audiobusio/PDMIn.c msgid "destination_length must be an int >= 0" -msgstr "" +msgstr "destination_length must be an int >= 0" #: py/objdict.c msgid "dict update sequence has wrong length" -msgstr "" +msgstr "dict update sequence has wrong length" #: extmod/ulab/code/numerical/numerical.c msgid "diff argument must be an ndarray" -msgstr "" +msgstr "diff argument must be an ndarray" #: extmod/ulab/code/numerical/numerical.c msgid "differentiation order out of range" -msgstr "" +msgstr "differentiation order out of range" #: extmod/ulab/code/linalg/linalg.c msgid "dimensions do not match" -msgstr "" +msgstr "dimensions do not match" #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" -msgstr "" +msgstr "division by zero" #: py/objdeque.c msgid "empty" -msgstr "" +msgstr "empty" #: extmod/moduheapq.c extmod/modutimeq.c msgid "empty heap" -msgstr "" +msgstr "empty heap" #: py/objstr.c msgid "empty separator" -msgstr "" +msgstr "empty separator" #: shared-bindings/random/__init__.c msgid "empty sequence" -msgstr "" +msgstr "empty sequence" #: py/objstr.c msgid "end of format while looking for conversion specifier" -msgstr "" +msgstr "end of format while looking for conversion specifier" #: shared-bindings/displayio/Shape.c msgid "end_x should be an int" -msgstr "" +msgstr "end_x should be an int" #: shared-bindings/alarm/time/TimeAlarm.c msgid "epoch_time not supported on this board" -msgstr "" +msgstr "epoch_time not supported on this board" #: ports/nrf/common-hal/busio/UART.c #, c-format msgid "error = 0x%08lX" -msgstr "" +msgstr "error = 0x%08lX" #: py/runtime.c msgid "exceptions must derive from BaseException" -msgstr "" +msgstr "exceptions must derive from BaseException" #: shared-bindings/canio/CAN.c msgid "expected '%q' but got '%q'" -msgstr "" +msgstr "expected '%q' but got '%q'" #: shared-bindings/canio/CAN.c msgid "expected '%q' or '%q' but got '%q'" -msgstr "" +msgstr "expected '%q' or '%q' but got '%q'" #: py/objstr.c msgid "expected ':' after format specifier" -msgstr "" +msgstr "expected ':' after format specifier" #: py/obj.c msgid "expected tuple/list" -msgstr "" +msgstr "expected tuple/list" #: py/modthread.c msgid "expecting a dict for keyword args" -msgstr "" +msgstr "expecting a dict for keyword args" #: py/compile.c msgid "expecting an assembler instruction" -msgstr "" +msgstr "expecting an assembler instruction" #: py/compile.c msgid "expecting just a value for set" -msgstr "" +msgstr "expecting just a value for set" #: py/compile.c msgid "expecting key:value for dict" -msgstr "" +msgstr "expecting key:value for dict" #: shared-bindings/msgpack/__init__.c msgid "ext_hook is not a function" -msgstr "" +msgstr "ext_hook is not a function" #: py/argcheck.c msgid "extra keyword arguments given" -msgstr "" +msgstr "extra keyword arguments given" #: py/argcheck.c msgid "extra positional arguments given" -msgstr "" +msgstr "extra positional arguments given" #: py/parse.c msgid "f-string expression part cannot include a '#'" -msgstr "" +msgstr "f-string expression part cannot include a '#'" #: py/parse.c msgid "f-string expression part cannot include a backslash" -msgstr "" +msgstr "f-string expression part cannot include a backslash" #: py/parse.c msgid "f-string: empty expression not allowed" -msgstr "" +msgstr "f-string: empty expression not allowed" #: py/parse.c msgid "f-string: expecting '}'" -msgstr "" +msgstr "f-string: expecting '}'" #: py/parse.c msgid "f-string: single '}' is not allowed" -msgstr "" +msgstr "f-string: single '}' is not allowed" #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/displayio/OnDiskBitmap.c msgid "file must be a file opened in byte mode" -msgstr "" +msgstr "file must be a file opened in byte mode" #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" -msgstr "" +msgstr "filesystem must provide mount method" #: extmod/ulab/code/vector/vectorise.c msgid "first argument must be a callable" -msgstr "" +msgstr "first argument must be a callable" #: extmod/ulab/code/approx/approx.c msgid "first argument must be a function" -msgstr "" +msgstr "first argument must be a function" #: extmod/ulab/code/ulab_create.c msgid "first argument must be a tuple of ndarrays" -msgstr "" +msgstr "first argument must be a tuple of ndarrays" #: extmod/ulab/code/ndarray.c msgid "first argument must be an iterable" -msgstr "" +msgstr "first argument must be an iterable" #: extmod/ulab/code/vector/vectorise.c msgid "first argument must be an ndarray" -msgstr "" +msgstr "first argument must be an ndarray" #: py/objtype.c msgid "first argument to super() must be type" -msgstr "" +msgstr "first argument to super() must be type" #: extmod/ulab/code/ndarray.c msgid "flattening order must be either 'C', or 'F'" -msgstr "" +msgstr "flattening order must be either 'C', or 'F'" #: extmod/ulab/code/numerical/numerical.c msgid "flip argument must be an ndarray" -msgstr "" +msgstr "flip argument must be an ndarray" #: py/objint.c msgid "float too big" -msgstr "" +msgstr "float too big" #: shared-bindings/_stage/Text.c msgid "font must be 2048 bytes long" -msgstr "" +msgstr "font must be 2048 bytes long" #: py/objstr.c msgid "format requires a dict" -msgstr "" +msgstr "format requires a dict" #: py/objdeque.c msgid "full" -msgstr "" +msgstr "full" #: py/argcheck.c msgid "function does not take keyword arguments" -msgstr "" +msgstr "function does not take keyword arguments" #: py/argcheck.c #, c-format msgid "function expected at most %d arguments, got %d" -msgstr "" +msgstr "function expected at most %d arguments, got %d" #: py/bc.c py/objnamedtuple.c msgid "function got multiple values for argument '%q'" -msgstr "" +msgstr "function got multiple values for argument '%q'" #: extmod/ulab/code/approx/approx.c msgid "function has the same sign at the ends of interval" -msgstr "" +msgstr "function has the same sign at the ends of interval" #: extmod/ulab/code/ndarray.c msgid "function is defined for ndarrays only" -msgstr "" +msgstr "function is defined for ndarrays only" #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" -msgstr "" +msgstr "function missing %d required positional arguments" #: py/bc.c msgid "function missing keyword-only argument" -msgstr "" +msgstr "function missing keyword-only argument" #: py/bc.c msgid "function missing required keyword argument '%q'" -msgstr "" +msgstr "function missing required keyword argument '%q'" #: py/bc.c #, c-format msgid "function missing required positional argument #%d" -msgstr "" +msgstr "function missing required positional argument #%d" #: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" -msgstr "" +msgstr "function takes %d positional arguments but %d were given" #: shared-bindings/time/__init__.c msgid "function takes exactly 9 arguments" -msgstr "" +msgstr "function takes exactly 9 arguments" #: py/objgenerator.c msgid "generator already executing" -msgstr "" +msgstr "generator already executing" #: py/objgenerator.c msgid "generator ignored GeneratorExit" -msgstr "" +msgstr "generator ignored GeneratorExit" #: shared-bindings/_stage/Layer.c msgid "graphic must be 2048 bytes long" -msgstr "" +msgstr "graphic must be 2048 bytes long" #: extmod/moduheapq.c msgid "heap must be a list" -msgstr "" +msgstr "heap must be a list" #: py/compile.c msgid "identifier redefined as global" -msgstr "" +msgstr "identifier redefined as global" #: py/compile.c msgid "identifier redefined as nonlocal" -msgstr "" +msgstr "identifier redefined as nonlocal" #: py/objstr.c msgid "incomplete format" -msgstr "" +msgstr "incomplete format" #: py/objstr.c msgid "incomplete format key" -msgstr "" +msgstr "incomplete format key" #: extmod/modubinascii.c msgid "incorrect padding" -msgstr "" +msgstr "incorrect padding" #: extmod/ulab/code/ndarray.c msgid "index is out of bounds" -msgstr "" +msgstr "index is out of bounds" #: extmod/ulab/code/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" -msgstr "" +msgstr "index out of range" #: py/obj.c msgid "indices must be integers" -msgstr "" +msgstr "indices must be integers" #: extmod/ulab/code/ndarray.c msgid "indices must be integers, slices, or Boolean lists" -msgstr "" +msgstr "indices must be integers, slices, or Boolean lists" #: extmod/ulab/code/approx/approx.c msgid "initial values must be iterable" -msgstr "" +msgstr "initial values must be iterable" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c msgid "initial_value length is wrong" -msgstr "" +msgstr "initial_value length is wrong" #: py/compile.c msgid "inline assembler must be a function" -msgstr "" +msgstr "inline assembler must be a function" #: extmod/ulab/code/ndarray.c msgid "input and output shapes are not compatible" -msgstr "" +msgstr "input and output shapes are not compatible" #: extmod/ulab/code/ulab_create.c msgid "input argument must be an integer, a tuple, or a list" -msgstr "" +msgstr "input argument must be an integer, a tuple, or a list" #: extmod/ulab/code/fft/fft.c msgid "input array length must be power of 2" -msgstr "" +msgstr "input array length must be power of 2" #: extmod/ulab/code/ulab_create.c msgid "input arrays are not compatible" -msgstr "" +msgstr "input arrays are not compatible" #: extmod/ulab/code/poly/poly.c msgid "input data must be an iterable" -msgstr "" +msgstr "input data must be an iterable" #: extmod/ulab/code/linalg/linalg.c msgid "input matrix is asymmetric" -msgstr "" +msgstr "input matrix is asymmetric" #: extmod/ulab/code/linalg/linalg.c msgid "input matrix is singular" -msgstr "" +msgstr "input matrix is singular" #: extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" -msgstr "" +msgstr "input must be a dense ndarray" #: extmod/ulab/code/ulab_create.c msgid "input must be a tensor of rank 2" -msgstr "" +msgstr "input must be a tensor of rank 2" #: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" -msgstr "" +msgstr "input must be an ndarray" #: extmod/ulab/code/filter/filter.c msgid "input must be one-dimensional" -msgstr "" +msgstr "input must be one-dimensional" #: extmod/ulab/code/linalg/linalg.c msgid "input must be square matrix" -msgstr "" +msgstr "input must be square matrix" #: extmod/ulab/code/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" -msgstr "" +msgstr "input must be tuple, list, range, or ndarray" #: extmod/ulab/code/poly/poly.c msgid "input vectors must be of equal length" -msgstr "" +msgstr "input vectors must be of equal length" #: extmod/ulab/code/poly/poly.c msgid "inputs are not iterable" -msgstr "" +msgstr "inputs are not iterable" #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" -msgstr "" +msgstr "int() arg 2 must be >= 2 and <= 36" #: py/objstr.c msgid "integer required" -msgstr "" +msgstr "integer required" #: extmod/ulab/code/approx/approx.c msgid "interp is defined for 1D arrays of equal length" -msgstr "" +msgstr "interp is defined for 1D arrays of equal length" #: shared-bindings/_bleio/Adapter.c #, c-format msgid "interval must be in range %s-%s" -msgstr "" +msgstr "interval must be in range %s-%s" #: lib/netutils/netutils.c msgid "invalid arguments" -msgstr "" +msgstr "invalid arguments" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" -msgstr "" +msgstr "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" #: extmod/modussl_axtls.c msgid "invalid cert" -msgstr "" +msgstr "invalid cert" #: extmod/uos_dupterm.c msgid "invalid dupterm index" -msgstr "" +msgstr "invalid dupterm index" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element size %d for bits_per_pixel %d\n" -msgstr "" +msgstr "invalid element size %d for bits_per_pixel %d\n" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element_size %d, must be, 1, 2, or 4" -msgstr "" +msgstr "invalid element_size %d, must be, 1, 2, or 4" #: extmod/modframebuf.c msgid "invalid format" -msgstr "" +msgstr "invalid format" #: py/objstr.c msgid "invalid format specifier" -msgstr "" +msgstr "invalid format specifier" #: shared-bindings/wifi/Radio.c msgid "invalid hostname" -msgstr "" +msgstr "invalid hostname" #: extmod/modussl_axtls.c msgid "invalid key" -msgstr "" +msgstr "invalid key" #: py/compile.c +#, fuzzy msgid "invalid micropython decorator" -msgstr "" +msgstr "invalid CircuitPython decorator" #: shared-bindings/random/__init__.c msgid "invalid step" -msgstr "" +msgstr "invalid step" #: py/compile.c py/parse.c msgid "invalid syntax" -msgstr "" +msgstr "invalid syntax" #: py/parsenum.c msgid "invalid syntax for integer" -msgstr "" +msgstr "invalid syntax for integer" #: py/parsenum.c #, c-format msgid "invalid syntax for integer with base %d" -msgstr "" +msgstr "invalid syntax for integer with base %d" #: py/parsenum.c msgid "invalid syntax for number" -msgstr "" +msgstr "invalid syntax for number" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "io must be rtc io" -msgstr "" +msgstr "io must be rtc io" #: py/objtype.c msgid "issubclass() arg 1 must be a class" -msgstr "" +msgstr "issubclass() arg 1 must be a class" #: py/objtype.c msgid "issubclass() arg 2 must be a class or a tuple of classes" -msgstr "" +msgstr "issubclass() arg 2 must be a class or a tuple of classes" #: extmod/ulab/code/ndarray.c msgid "iterables are not of the same length" -msgstr "" +msgstr "iterables are not of the same length" #: extmod/ulab/code/linalg/linalg.c msgid "iterations did not converge" -msgstr "" +msgstr "iterations did not converge" #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" -msgstr "" +msgstr "join expects a list of str/bytes objects consistent with self object" #: py/argcheck.c msgid "keyword argument(s) not yet implemented - use normal args instead" -msgstr "" +msgstr "keyword argument(s) not yet implemented - use normal args instead" #: py/bc.c msgid "keywords must be strings" -msgstr "" +msgstr "keywords must be strings" #: py/emitinlinethumb.c py/emitinlinextensa.c msgid "label '%q' not defined" -msgstr "" +msgstr "label '%q' not defined" #: py/compile.c msgid "label redefined" -msgstr "" +msgstr "label redefined" #: py/stream.c msgid "length argument not allowed for this type" -msgstr "" +msgstr "length argument not allowed for this type" #: shared-bindings/audiomixer/MixerVoice.c msgid "level must be between 0 and 1" -msgstr "" +msgstr "level must be between 0 and 1" #: py/objarray.c msgid "lhs and rhs should be compatible" -msgstr "" +msgstr "lhs and rhs should be compatible" #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" -msgstr "" +msgstr "local '%q' has type '%q' but source is '%q'" #: py/emitnative.c msgid "local '%q' used before type known" -msgstr "" +msgstr "local '%q' used before type known" #: py/vm.c msgid "local variable referenced before assignment" -msgstr "" +msgstr "local variable referenced before assignment" #: py/objint.c msgid "long int not supported in this build" -msgstr "" +msgstr "long int not supported in this build" #: ports/esp32s2/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" -msgstr "" +msgstr "loopback + silent mode not supported by peripheral" #: py/parse.c msgid "malformed f-string" -msgstr "" +msgstr "malformed f-string" #: shared-bindings/_stage/Layer.c msgid "map buffer too small" -msgstr "" +msgstr "map buffer too small" #: py/modmath.c shared-bindings/math/__init__.c msgid "math domain error" -msgstr "" +msgstr "math domain error" #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" -msgstr "" +msgstr "matrix is not positive definite" #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format msgid "max_length must be 0-%d when fixed_length is %s" -msgstr "" +msgstr "max_length must be 0-%d when fixed_length is %s" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c msgid "max_length must be >= 0" -msgstr "" +msgstr "max_length must be >= 0" #: extmod/ulab/code/ndarray.c msgid "maximum number of dimensions is 4" -msgstr "" +msgstr "maximum number of dimensions is 4" #: py/runtime.c msgid "maximum recursion depth exceeded" -msgstr "" +msgstr "maximum recursion depth exceeded" #: extmod/ulab/code/approx/approx.c msgid "maxiter must be > 0" -msgstr "" +msgstr "maxiter must be > 0" #: extmod/ulab/code/approx/approx.c msgid "maxiter should be > 0" -msgstr "" +msgstr "maxiter should be > 0" #: extmod/ulab/code/numerical/numerical.c msgid "median argument must be an ndarray" -msgstr "" +msgstr "median argument must be an ndarray" #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" -msgstr "" +msgstr "memory allocation failed, allocating %u bytes" #: py/runtime.c msgid "memory allocation failed, heap is locked" -msgstr "" +msgstr "memory allocation failed, heap is locked" #: py/objarray.c msgid "memoryview: length is not a multiple of itemsize" -msgstr "" +msgstr "memoryview: length is not a multiple of itemsize" #: py/builtinimport.c msgid "module not found" -msgstr "" +msgstr "module not found" #: extmod/ulab/code/poly/poly.c msgid "more degrees of freedom than data points" -msgstr "" +msgstr "more degrees of freedom than data points" #: py/compile.c msgid "multiple *x in assignment" -msgstr "" +msgstr "multiple *x in assignment" #: py/objtype.c msgid "multiple bases have instance lay-out conflict" -msgstr "" +msgstr "multiple bases have instance lay-out conflict" #: py/objtype.c msgid "multiple inheritance not supported" -msgstr "" +msgstr "multiple inheritance not supported" #: py/emitnative.c msgid "must raise an object" -msgstr "" +msgstr "must raise an object" #: py/modbuiltins.c msgid "must use keyword argument for key function" -msgstr "" +msgstr "must use keyword argument for key function" #: py/runtime.c msgid "name '%q' is not defined" -msgstr "" +msgstr "name '%q' is not defined" #: py/runtime.c msgid "name not defined" -msgstr "" +msgstr "name not defined" #: py/compile.c msgid "name reused for argument" -msgstr "" +msgstr "name reused for argument" #: py/emitnative.c msgid "native yield" -msgstr "" +msgstr "native yield" #: py/runtime.c #, c-format msgid "need more than %d values to unpack" -msgstr "" +msgstr "need more than %d values to unpack" #: py/objint_longlong.c py/objint_mpz.c py/runtime.c msgid "negative power with no float support" -msgstr "" +msgstr "negative power with no float support" #: py/objint_mpz.c py/runtime.c msgid "negative shift count" -msgstr "" +msgstr "negative shift count" #: shared-module/sdcardio/SDCard.c msgid "no SD card" -msgstr "" +msgstr "no SD card" #: py/vm.c msgid "no active exception to reraise" -msgstr "" +msgstr "no active exception to reraise" #: shared-bindings/socket/__init__.c shared-module/network/__init__.c msgid "no available NIC" -msgstr "" +msgstr "no available NIC" #: py/compile.c msgid "no binding for nonlocal found" -msgstr "" +msgstr "no binding for nonlocal found" #: shared-module/msgpack/__init__.c msgid "no default packer" -msgstr "" +msgstr "no default packer" #: py/builtinimport.c msgid "no module named '%q'" -msgstr "" +msgstr "no module named '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c #: shared-bindings/displayio/ParallelBus.c msgid "no reset pin available" -msgstr "" +msgstr "no reset pin available" #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" -msgstr "" +msgstr "no response from SD card" #: py/runtime.c msgid "no such attribute" -msgstr "" +msgstr "no such attribute" #: ports/nrf/common-hal/_bleio/Connection.c msgid "non-UUID found in service_uuids_whitelist" -msgstr "" +msgstr "non-UUID found in service_uuids_whitelist" #: py/compile.c msgid "non-default argument follows default argument" -msgstr "" +msgstr "non-default argument follows default argument" #: extmod/modubinascii.c msgid "non-hex digit found" -msgstr "" +msgstr "non-hex digit found" #: py/compile.c msgid "non-keyword arg after */**" -msgstr "" +msgstr "non-keyword arg after */**" #: py/compile.c msgid "non-keyword arg after keyword arg" -msgstr "" +msgstr "non-keyword arg after keyword arg" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "non-zero timeout must be > 0.01" -msgstr "" +msgstr "non-zero timeout must be > 0.01" #: shared-bindings/_bleio/Adapter.c msgid "non-zero timeout must be >= interval" -msgstr "" +msgstr "non-zero timeout must be >= interval" #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" -msgstr "" +msgstr "norm is defined for 1D and 2D arrays" #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" -msgstr "" +msgstr "not a 128-bit UUID" #: py/objstr.c msgid "not all arguments converted during string formatting" -msgstr "" +msgstr "not all arguments converted during string formatting" #: py/objstr.c msgid "not enough arguments for format string" -msgstr "" +msgstr "not enough arguments for format string" #: extmod/ulab/code/ulab_create.c msgid "number of points must be at least 2" -msgstr "" +msgstr "number of points must be at least 2" #: py/builtinhelp.c msgid "object " -msgstr "" +msgstr "object " #: py/obj.c msgid "object '%q' is not a tuple or list" -msgstr "" +msgstr "object '%q' is not a tuple or list" #: py/obj.c msgid "object does not support item assignment" -msgstr "" +msgstr "object does not support item assignment" #: py/obj.c msgid "object does not support item deletion" -msgstr "" +msgstr "object does not support item deletion" #: py/obj.c msgid "object has no len" -msgstr "" +msgstr "object has no len" #: py/obj.c msgid "object is not subscriptable" -msgstr "" +msgstr "object is not subscriptable" #: py/runtime.c msgid "object not an iterator" -msgstr "" +msgstr "object not an iterator" #: py/objtype.c py/runtime.c msgid "object not callable" -msgstr "" +msgstr "object not callable" #: py/sequence.c shared-bindings/displayio/Group.c msgid "object not in sequence" -msgstr "" +msgstr "object not in sequence" #: py/runtime.c msgid "object not iterable" -msgstr "" +msgstr "object not iterable" #: py/obj.c msgid "object of type '%q' has no len()" -msgstr "" +msgstr "object of type '%q' has no len()" #: py/obj.c msgid "object with buffer protocol required" -msgstr "" +msgstr "object with buffer protocol required" #: extmod/modubinascii.c msgid "odd-length string" -msgstr "" +msgstr "odd-length string" #: extmod/ulab/code/ulab_create.c msgid "offset is too large" -msgstr "" +msgstr "offset is too large" #: shared-bindings/dualbank/__init__.c msgid "offset must be >= 0" -msgstr "" +msgstr "offset must be >= 0" #: extmod/ulab/code/ulab_create.c msgid "offset must be non-negative and no greater than buffer length" -msgstr "" +msgstr "offset must be non-negative and not greater than buffer length" #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" -msgstr "" +msgstr "offset out of bounds" #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" -msgstr "" +msgstr "only bit_depth=16 is supported" #: ports/nrf/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" -msgstr "" +msgstr "only sample_rate=16000 is supported" #: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "only slices with step=1 (aka None) are supported" -msgstr "" +msgstr "only slices with step=1 (aka None) are supported" #: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c #: extmod/ulab/code/vector/vectorise.c msgid "operands could not be broadcast together" -msgstr "" +msgstr "operands could not be broadcast together" #: extmod/ulab/code/ndarray.c msgid "operation is implemented for 1D Boolean arrays only" -msgstr "" +msgstr "operation is implemented for 1D Boolean arrays only" #: extmod/ulab/code/numerical/numerical.c msgid "operation is not implemented on ndarrays" -msgstr "" +msgstr "operation is not implemented on ndarrays" #: extmod/ulab/code/ndarray.c msgid "operation is not supported for given type" -msgstr "" +msgstr "operation is not supported for given type" #: py/modbuiltins.c msgid "ord expects a character" -msgstr "" +msgstr "ord expects a character" #: py/modbuiltins.c #, c-format msgid "ord() expected a character, but string of length %d found" -msgstr "" +msgstr "ord() expected a character, but string of length %d found" #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" -msgstr "" +msgstr "out of range of source" #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "out of range of target" -msgstr "" +msgstr "out of range of target" #: py/objint_mpz.c msgid "overflow converting long int to machine word" -msgstr "" +msgstr "overflow converting long int to machine word" #: py/modstruct.c #, c-format msgid "pack expected %d items for packing (got %d)" -msgstr "" +msgstr "pack expected %d items for packing (got %d)" #: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c msgid "palette must be 32 bytes long" -msgstr "" +msgstr "palette must be 32 bytes long" #: shared-bindings/displayio/Palette.c msgid "palette_index should be an int" -msgstr "" +msgstr "palette_index should be an int" #: py/compile.c msgid "parameter annotation must be an identifier" -msgstr "" +msgstr "parameter annotation must be an identifier" #: py/emitinlinextensa.c msgid "parameters must be registers in sequence a2 to a5" -msgstr "" +msgstr "parameters must be registers in sequence a2 to a5" #: py/emitinlinethumb.c msgid "parameters must be registers in sequence r0 to r3" -msgstr "" +msgstr "parameters must be registers in sequence r0 to r3" #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "pixel coordinates out of bounds" -msgstr "" +msgstr "pixel coordinates out of bounds" #: shared-bindings/displayio/Bitmap.c msgid "pixel value requires too many bits" -msgstr "" +msgstr "pixel value requires too many bits" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" +msgstr "pixel_shader must be displayio.Palette or displayio.ColorConverter" #: shared-module/vectorio/Polygon.c msgid "polygon can only be registered in one parent" -msgstr "" +msgstr "polygon can only be registered in one parent" #: ports/esp32s2/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" -msgstr "" +msgstr "pop from an empty PulseIn" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c @@ -3691,19 +3743,19 @@ msgstr "" #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" -msgstr "" +msgstr "pop from empty %q" #: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c msgid "port must be >= 0" -msgstr "" +msgstr "port must be >= 0" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" -msgstr "" +msgstr "pow() 3rd argument cannot be 0" #: py/objint_mpz.c msgid "pow() with 3 arguments requires integers" -msgstr "" +msgstr "pow() with 3 arguments requires integers" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -3725,7 +3777,7 @@ msgstr "" #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" -msgstr "" +msgstr "pressing boot button at start up.\n" #: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h #: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -3733,504 +3785,506 @@ msgstr "" #: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h #: ports/atmel-samd/boards/meowmeow/mpconfigboard.h msgid "pressing both buttons at start up.\n" -msgstr "" +msgstr "pressing both buttons at start up.\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" -msgstr "" +msgstr "pull masks conflict with direction masks" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" -msgstr "" +msgstr "pull_threshold must be between 1 and 32" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "push_threshold must be between 1 and 32" -msgstr "" +msgstr "push_threshold must be between 1 and 32" #: extmod/modutimeq.c msgid "queue overflow" -msgstr "" +msgstr "queue overflow" #: py/parse.c msgid "raw f-strings are not implemented" -msgstr "" +msgstr "raw f-strings are not implemented" #: extmod/ulab/code/fft/fft.c msgid "real and imaginary parts must be of equal length" -msgstr "" +msgstr "real and imaginary parts must be of equal length" #: py/builtinimport.c msgid "relative import" -msgstr "" +msgstr "relative import" #: py/obj.c #, c-format msgid "requested length %d but object has length %d" -msgstr "" +msgstr "requested length %d but object has length %d" #: extmod/ulab/code/ndarray_operators.c msgid "results cannot be cast to specified type" -msgstr "" +msgstr "results cannot be cast to specified type" #: py/compile.c msgid "return annotation must be an identifier" -msgstr "" +msgstr "return annotation must be an identifier" #: py/emitnative.c msgid "return expected '%q' but got '%q'" -msgstr "" +msgstr "return expected '%q' but got '%q'" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" -msgstr "" +msgstr "rgb_pins[%d] duplicates another pin assignment" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" -msgstr "" +msgstr "rgb_pins[%d] is not on the same port as clock" #: extmod/ulab/code/numerical/numerical.c msgid "roll argument must be an ndarray" -msgstr "" +msgstr "roll argument must be an ndarray" #: py/objstr.c msgid "rsplit(None,n)" -msgstr "" +msgstr "rsplit(None,n)" #: shared-bindings/audiocore/RawSample.c msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" msgstr "" +"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " +"'B'" #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/raspberrypi/common-hal/audiobusio/PDMIn.c msgid "sampling rate out of range" -msgstr "" +msgstr "sampling rate out of range" #: py/modmicropython.c msgid "schedule stack full" -msgstr "" +msgstr "schedule stack full" #: lib/utils/pyexec.c py/builtinimport.c msgid "script compilation not supported" -msgstr "" +msgstr "script compilation not supported" #: extmod/ulab/code/ndarray.c msgid "shape must be a tuple" -msgstr "" +msgstr "shape must be a tuple" #: shared-module/msgpack/__init__.c msgid "short read" -msgstr "" +msgstr "short read" #: py/objstr.c msgid "sign not allowed in string format specifier" -msgstr "" +msgstr "sign not allowed in string format specifier" #: py/objstr.c msgid "sign not allowed with integer format specifier 'c'" -msgstr "" +msgstr "sign not allowed with integer format specifier 'c'" #: py/objstr.c msgid "single '}' encountered in format string" -msgstr "" +msgstr "single '}' encountered in format string" #: extmod/ulab/code/linalg/linalg.c msgid "size is defined for ndarrays only" -msgstr "" +msgstr "size is defined for ndarrays only" #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" -msgstr "" +msgstr "sleep length must be non-negative" #: extmod/ulab/code/ndarray.c msgid "slice step can't be zero" -msgstr "" +msgstr "slice step can't be zero" #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" -msgstr "" +msgstr "slice step cannot be zero" #: py/objint.c py/sequence.c msgid "small int overflow" -msgstr "" +msgstr "small int overflow" #: main.c msgid "soft reboot\n" -msgstr "" +msgstr "soft reboot\n" #: extmod/ulab/code/numerical/numerical.c msgid "sort argument must be an ndarray" -msgstr "" +msgstr "sort argument must be an ndarray" #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" -msgstr "" +msgstr "sos array must be of shape (n_section, 6)" #: extmod/ulab/code/filter/filter.c msgid "sos[:, 3] should be all ones" -msgstr "" +msgstr "sos[:, 3] should be all ones" #: extmod/ulab/code/filter/filter.c msgid "sosfilt requires iterable arguments" -msgstr "" +msgstr "sosfilt requires iterable arguments" #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c msgid "source palette too large" -msgstr "" +msgstr "source palette too large" #: py/objstr.c msgid "start/end indices" -msgstr "" +msgstr "start/end indices" #: shared-bindings/displayio/Shape.c msgid "start_x should be an int" -msgstr "" +msgstr "start_x should be an int" #: shared-bindings/random/__init__.c msgid "step must be non-zero" -msgstr "" +msgstr "step must be non-zero" #: shared-bindings/busio/UART.c msgid "stop must be 1 or 2" -msgstr "" +msgstr "stop must be 1 or 2" #: shared-bindings/random/__init__.c msgid "stop not reachable from start" -msgstr "" +msgstr "stop not reachable from start" #: py/stream.c msgid "stream operation not supported" -msgstr "" +msgstr "stream operation not supported" #: py/objstrunicode.c msgid "string indices must be integers, not %q" -msgstr "" +msgstr "string indices must be integers, not %q" #: py/stream.c msgid "string not supported; use bytes or bytearray" -msgstr "" +msgstr "string not supported; use bytes or bytearray" #: extmod/moductypes.c msgid "struct: cannot index" -msgstr "" +msgstr "struct: cannot index" #: extmod/moductypes.c msgid "struct: no fields" -msgstr "" +msgstr "struct: no fields" #: py/objarray.c py/objstr.c msgid "substring not found" -msgstr "" +msgstr "substring not found" #: py/compile.c msgid "super() can't find self" -msgstr "" +msgstr "super() can't find self" #: extmod/modujson.c msgid "syntax error in JSON" -msgstr "" +msgstr "syntax error in JSON" #: extmod/moductypes.c msgid "syntax error in uctypes descriptor" -msgstr "" +msgstr "syntax error in uctypes descriptor" #: shared-bindings/touchio/TouchIn.c msgid "threshold must be in the range 0-65536" -msgstr "" +msgstr "threshold must be in the range 0-65536" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "tile must be greater than zero" -msgstr "" +msgstr "tile must be greater than zero" #: shared-bindings/time/__init__.c msgid "time.struct_time() takes a 9-sequence" -msgstr "" +msgstr "time.struct_time() takes a 9-sequence" #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" -msgstr "" +msgstr "timeout duration exceeded the maximum supported value" #: shared-bindings/busio/UART.c msgid "timeout must be 0.0-100.0 seconds" -msgstr "" +msgstr "timeout must be 0.0-100.0 seconds" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "timeout must be < 655.35 secs" -msgstr "" +msgstr "timeout must be < 655.35 secs" #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" -msgstr "" +msgstr "timeout must be >= 0.0" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v1 card" -msgstr "" +msgstr "timeout waiting for v1 card" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v2 card" -msgstr "" +msgstr "timeout waiting for v2 card" #: shared-bindings/time/__init__.c msgid "timestamp out of range for platform time_t" -msgstr "" +msgstr "timestamp out of range for platform time_t" #: extmod/ulab/code/ndarray.c msgid "tobytes can be invoked for dense arrays only" -msgstr "" +msgstr "tobytes can be invoked for dense arrays only" #: shared-module/struct/__init__.c msgid "too many arguments provided with the given format" -msgstr "" +msgstr "too many arguments provided with the given format" #: extmod/ulab/code/ulab_create.c msgid "too many dimensions" -msgstr "" +msgstr "too many dimensions" #: extmod/ulab/code/ndarray.c msgid "too many indices" -msgstr "" +msgstr "too many indices" #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" -msgstr "" +msgstr "too many values to unpack (expected %d)" #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays" -msgstr "" +msgstr "trapz is defined for 1D arrays" #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" -msgstr "" +msgstr "trapz is defined for 1D arrays of equal length" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "trigger level must be 0 or 1" -msgstr "" +msgstr "trigger level must be 0 or 1" #: py/obj.c msgid "tuple/list has wrong length" -msgstr "" +msgstr "tuple/list has wrong length" #: ports/esp32s2/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" -msgstr "" +msgstr "twai_driver_install returned esp-idf error #%d" #: ports/esp32s2/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" -msgstr "" +msgstr "twai_start returned esp-idf error #%d" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" -msgstr "" +msgstr "tx and rx cannot both be None" #: py/objtype.c msgid "type '%q' is not an acceptable base type" -msgstr "" +msgstr "type '%q' is not an acceptable base type" #: py/objtype.c msgid "type is not an acceptable base type" -msgstr "" +msgstr "type is not an acceptable base type" #: py/runtime.c msgid "type object '%q' has no attribute '%q'" -msgstr "" +msgstr "type object '%q' has no attribute '%q'" #: py/objgenerator.c msgid "type object 'generator' has no attribute '__await__'" -msgstr "" +msgstr "type object 'generator' has no attribute '__await__'" #: py/objtype.c msgid "type takes 1 or 3 arguments" -msgstr "" +msgstr "type takes 1 or 3 arguments" #: py/objint_longlong.c msgid "ulonglong too large" -msgstr "" +msgstr "ulonglong too large" #: py/emitnative.c msgid "unary op %q not implemented" -msgstr "" +msgstr "unary op %q not implemented" #: py/parse.c msgid "unexpected indent" -msgstr "" +msgstr "unexpected indent" #: py/bc.c msgid "unexpected keyword argument" -msgstr "" +msgstr "unexpected keyword argument" #: py/bc.c py/objnamedtuple.c msgid "unexpected keyword argument '%q'" -msgstr "" +msgstr "unexpected keyword argument '%q'" #: py/lexer.c msgid "unicode name escapes" -msgstr "" +msgstr "unicode name escapes" #: py/parse.c msgid "unindent does not match any outer indentation level" -msgstr "" +msgstr "unindent does not match any outer indentation level" #: py/objstr.c #, c-format msgid "unknown conversion specifier %c" -msgstr "" +msgstr "unknown conversion specifier %c" #: py/objstr.c msgid "unknown format code '%c' for object of type '%q'" -msgstr "" +msgstr "unknown format code '%c' for object of type '%q'" #: py/compile.c msgid "unknown type" -msgstr "" +msgstr "unknown type" #: py/emitnative.c msgid "unknown type '%q'" -msgstr "" +msgstr "unknown type '%q'" #: py/objstr.c msgid "unmatched '{' in format" -msgstr "" +msgstr "unmatched '{' in format" #: py/objtype.c py/runtime.c msgid "unreadable attribute" -msgstr "" +msgstr "unreadable attribute" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c #: shared-module/vectorio/Polygon.c msgid "unsupported %q type" -msgstr "" +msgstr "unsupported %q type" #: py/emitinlinethumb.c #, c-format msgid "unsupported Thumb instruction '%s' with %d arguments" -msgstr "" +msgstr "unsupported Thumb instruction '%s' with %d arguments" #: py/emitinlinextensa.c #, c-format msgid "unsupported Xtensa instruction '%s' with %d arguments" -msgstr "" +msgstr "unsupported Xtensa instruction '%s' with %d arguments" #: py/objstr.c #, c-format msgid "unsupported format character '%c' (0x%x) at index %d" -msgstr "" +msgstr "unsupported format character '%c' (0x%x) at index %d" #: py/runtime.c msgid "unsupported type for %q: '%q'" -msgstr "" +msgstr "unsupported type for %q: '%q'" #: py/runtime.c msgid "unsupported type for operator" -msgstr "" +msgstr "unsupported type for operator" #: py/runtime.c msgid "unsupported types for %q: '%q', '%q'" -msgstr "" +msgstr "unsupported types for %q: '%q', '%q'" #: py/objint.c #, c-format msgid "value must fit in %d byte(s)" -msgstr "" +msgstr "value must fit in %d byte(s)" #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" -msgstr "" +msgstr "value_count must be > 0" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" -msgstr "" +msgstr "wakeup conflict" #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" -msgstr "" +msgstr "WatchDog not initialised" #: shared-bindings/watchdog/WatchDogTimer.c msgid "watchdog timeout must be greater than 0" -msgstr "" +msgstr "WatchDog timeout must be greater than 0" #: shared-bindings/bitops/__init__.c #, c-format msgid "width must be from 2 to 8 (inclusive), not %d" -msgstr "" +msgstr "width must be from 2 to 8 (inclusive), not %d" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" -msgstr "" +msgstr "width must be greater than zero" #: ports/esp32s2/common-hal/wifi/Radio.c msgid "wifi is not enabled" -msgstr "" +msgstr "WiFi is not enabled" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" -msgstr "" +msgstr "window must be <= interval" #: extmod/ulab/code/numerical/numerical.c msgid "wrong axis index" -msgstr "" +msgstr "wrong axis index" #: extmod/ulab/code/ulab_create.c msgid "wrong axis specified" -msgstr "" +msgstr "wrong axis specified" #: extmod/ulab/code/vector/vectorise.c msgid "wrong input type" -msgstr "" +msgstr "wrong input type" #: extmod/ulab/code/ulab_create.c py/objstr.c msgid "wrong number of arguments" -msgstr "" +msgstr "wrong number of arguments" #: py/runtime.c msgid "wrong number of values to unpack" -msgstr "" +msgstr "wrong number of values to unpack" #: extmod/ulab/code/ndarray.c msgid "wrong operand type" -msgstr "" +msgstr "wrong operand type" #: extmod/ulab/code/vector/vectorise.c msgid "wrong output type" -msgstr "" +msgstr "wrong output type" #: shared-module/displayio/Shape.c msgid "x value out of bounds" -msgstr "" +msgstr "x value out of bounds" #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" -msgstr "" +msgstr "xTaskCreate failed" #: shared-bindings/displayio/Shape.c msgid "y should be an int" -msgstr "" +msgstr "y should be an int" #: shared-module/displayio/Shape.c msgid "y value out of bounds" -msgstr "" +msgstr "y value out of bounds" #: py/objrange.c msgid "zero step" -msgstr "" +msgstr "zero step" #: extmod/ulab/code/filter/filter.c msgid "zi must be an ndarray" -msgstr "" +msgstr "zi must be an ndarray" #: extmod/ulab/code/filter/filter.c msgid "zi must be of float type" -msgstr "" +msgstr "zi must be of float type" #: extmod/ulab/code/filter/filter.c msgid "zi must be of shape (n_section, 2)" -msgstr "" +msgstr "zi must be of shape (n_section, 2)" From 9e110f120a323eff9989463771d8ea8ece6e8906 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 25 Mar 2021 13:37:37 -0500 Subject: [PATCH 138/261] mimxrt10xx: busio: cap SPI baudrate at 30MHz per datasheet --- ports/mimxrt10xx/common-hal/busio/SPI.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/mimxrt10xx/common-hal/busio/SPI.c b/ports/mimxrt10xx/common-hal/busio/SPI.c index 1b72921d31..13a8086182 100644 --- a/ports/mimxrt10xx/common-hal/busio/SPI.c +++ b/ports/mimxrt10xx/common-hal/busio/SPI.c @@ -234,6 +234,10 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) { bool common_hal_busio_spi_configure(busio_spi_obj_t *self, uint32_t baudrate, uint8_t polarity, uint8_t phase, uint8_t bits) { + if (baudrate > 30000000) { + baudrate = 30000000; // "Absolute maximum frequency of operation (fop) is 30 MHz" -- IMXRT1010CEC.pdf + } + LPSPI_Enable(self->spi, false); uint32_t tcrPrescaleValue; self->baudrate = LPSPI_MasterSetBaudRate(self->spi, baudrate, LPSPI_MASTER_CLK_FREQ, &tcrPrescaleValue); From ffb70a87372d01e0f5d9f547d117cb79636cbf5b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 26 Mar 2021 10:01:20 -0500 Subject: [PATCH 139/261] Freeze ESP32SPI into mimxrt1011_evk .. so that it is more conveniently like the metro m7 for my testing --- ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk b/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk index 81eb635973..09161ece32 100644 --- a/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk +++ b/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk @@ -6,3 +6,7 @@ USB_MANUFACTURER = "NXP" CHIP_VARIANT = MIMXRT1011DAE5A CHIP_FAMILY = MIMXRT1011 FLASH = AT25SF128A + +# Include these Python libraries in the firmware +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ESP32SPI +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests From 1d48054aeaa2762a752462a058a27afb1daac860 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 25 Mar 2021 09:03:42 -0500 Subject: [PATCH 140/261] mimxrt10xx: Factor out "transfer_common" .. and set the "MasterPcsContinuous" flag, which removes some of the gap between bytes of a single SPI transaction --- ports/mimxrt10xx/common-hal/busio/SPI.c | 46 ++++++++++--------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/ports/mimxrt10xx/common-hal/busio/SPI.c b/ports/mimxrt10xx/common-hal/busio/SPI.c index 13a8086182..13cc910d88 100644 --- a/ports/mimxrt10xx/common-hal/busio/SPI.c +++ b/ports/mimxrt10xx/common-hal/busio/SPI.c @@ -283,6 +283,21 @@ void common_hal_busio_spi_unlock(busio_spi_obj_t *self) { self->has_lock = false; } +static status_t transfer_common(busio_spi_obj_t *self, lpspi_transfer_t *xfer) { + xfer->configFlags = kLPSPI_MasterPcsContinuous; + + status_t status; + int retries = MAX_SPI_BUSY_RETRIES; + do { + status = LPSPI_MasterTransferBlocking(self->spi, xfer); + } while (status == kStatus_LPSPI_Busy && --retries > 0); + + if (status != kStatus_Success) { + printf("%s: status %ld\r\n", __func__, status); + } + return status; +} + bool common_hal_busio_spi_write(busio_spi_obj_t *self, const uint8_t *data, size_t len) { if (len == 0) { @@ -295,17 +310,8 @@ bool common_hal_busio_spi_write(busio_spi_obj_t *self, lpspi_transfer_t xfer = { 0 }; xfer.txData = (uint8_t *)data; xfer.dataSize = len; - xfer.configFlags = kLPSPI_MasterPcs0; - status_t status; - int retries = MAX_SPI_BUSY_RETRIES; - do { - status = LPSPI_MasterTransferBlocking(self->spi, &xfer); - } while (status == kStatus_LPSPI_Busy && --retries > 0); - - if (status != kStatus_Success) { - printf("%s: status %ld\r\n", __func__, status); - } + status_t status = transfer_common(self, &xfer); return status == kStatus_Success; } @@ -325,15 +331,7 @@ bool common_hal_busio_spi_read(busio_spi_obj_t *self, xfer.rxData = data; xfer.dataSize = len; - status_t status; - int retries = MAX_SPI_BUSY_RETRIES; - do { - status = LPSPI_MasterTransferBlocking(self->spi, &xfer); - } while (status == kStatus_LPSPI_Busy && --retries > 0); - - if (status != kStatus_Success) { - printf("%s: status %ld\r\n", __func__, status); - } + status_t status = transfer_common(self, &xfer); return status == kStatus_Success; } @@ -353,15 +351,7 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou xfer.rxData = data_in; xfer.dataSize = len; - status_t status; - int retries = MAX_SPI_BUSY_RETRIES; - do { - status = LPSPI_MasterTransferBlocking(self->spi, &xfer); - } while (status == kStatus_LPSPI_Busy && --retries > 0); - - if (status != kStatus_Success) { - printf("%s: status %ld\r\n", __func__, status); - } + status_t status = transfer_common(self, &xfer); return status == kStatus_Success; } From 231cb1ffd954dad45223bcc6fd22f344089536f1 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 26 Mar 2021 10:54:13 -0500 Subject: [PATCH 141/261] mimxrt10xx: Use the proper "betweenTransferDelay" (et al) values Set the betweenTransferDelay to the SCK low-time, to avoid long pauses between bytes (transfers) while preventing the last SCK cycle in a byte from being a runt pulse. Compared to an earlier revision of this change, which just set the delays all to zero, this doesn't break using an AirLift, which was sensitive to the runt pulses (the simple loopback-wire test didn't detect the problem) --- ports/mimxrt10xx/common-hal/busio/SPI.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ports/mimxrt10xx/common-hal/busio/SPI.c b/ports/mimxrt10xx/common-hal/busio/SPI.c index 13cc910d88..0783171c95 100644 --- a/ports/mimxrt10xx/common-hal/busio/SPI.c +++ b/ports/mimxrt10xx/common-hal/busio/SPI.c @@ -238,15 +238,10 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self, baudrate = 30000000; // "Absolute maximum frequency of operation (fop) is 30 MHz" -- IMXRT1010CEC.pdf } - LPSPI_Enable(self->spi, false); - uint32_t tcrPrescaleValue; - self->baudrate = LPSPI_MasterSetBaudRate(self->spi, baudrate, LPSPI_MASTER_CLK_FREQ, &tcrPrescaleValue); - self->spi->TCR = (self->spi->TCR & ~LPSPI_TCR_PRESCALE_MASK) | LPSPI_TCR_PRESCALE(tcrPrescaleValue); - LPSPI_Enable(self->spi, true); - if ((polarity == common_hal_busio_spi_get_polarity(self)) && (phase == common_hal_busio_spi_get_phase(self)) && - (bits == ((self->spi->TCR & LPSPI_TCR_FRAMESZ_MASK) >> LPSPI_TCR_FRAMESZ_SHIFT)) + 1) { + (bits == ((self->spi->TCR & LPSPI_TCR_FRAMESZ_MASK) >> LPSPI_TCR_FRAMESZ_SHIFT)) + 1 && + (baudrate == common_hal_busio_spi_get_frequency(self))) { return true; } @@ -257,10 +252,22 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self, config.cpol = polarity; config.cpha = phase; config.bitsPerFrame = bits; + // The between-transfer-delay must be equal to the SCK low-time. + // Setting it lower introduces runt pulses, while setting it higher + // wastes time. + config.betweenTransferDelayInNanoSec = 1000000000 / config.baudRate / 2; LPSPI_Deinit(self->spi); LPSPI_MasterInit(self->spi, &config, LPSPI_MASTER_CLK_FREQ); + // Recompute the actual baudrate so that we can set the baudrate + // (frequency) property. We don't need to set TCR because it was + // established by LPSPI_MasterInit, above + uint32_t tcrPrescaleValue; + LPSPI_Enable(self->spi, false); + self->baudrate = LPSPI_MasterSetBaudRate(self->spi, baudrate, LPSPI_MASTER_CLK_FREQ, &tcrPrescaleValue); + LPSPI_Enable(self->spi, true); + return true; } From 2bc61b458070f9e1e5a49442a72c43c0d9ea721f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 26 Mar 2021 11:01:22 -0500 Subject: [PATCH 142/261] Parenthesize double-division for clarity --- ports/mimxrt10xx/common-hal/busio/SPI.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mimxrt10xx/common-hal/busio/SPI.c b/ports/mimxrt10xx/common-hal/busio/SPI.c index 0783171c95..88923fe06d 100644 --- a/ports/mimxrt10xx/common-hal/busio/SPI.c +++ b/ports/mimxrt10xx/common-hal/busio/SPI.c @@ -255,7 +255,7 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self, // The between-transfer-delay must be equal to the SCK low-time. // Setting it lower introduces runt pulses, while setting it higher // wastes time. - config.betweenTransferDelayInNanoSec = 1000000000 / config.baudRate / 2; + config.betweenTransferDelayInNanoSec = (1000000000 / config.baudRate) / 2; LPSPI_Deinit(self->spi); LPSPI_MasterInit(self->spi, &config, LPSPI_MASTER_CLK_FREQ); From b40d07264803205d141eecb079de64de55fe8b06 Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Sat, 6 Mar 2021 02:20:16 -0500 Subject: [PATCH 143/261] [stm] implementation of audiopwmio Based on nrf PWMAudioOut by @jepler and stm PulseOut by @hierophect Tested on a Meowbit --- locale/circuitpython.pot | 9 + .../stm/boards/espruino_pico/mpconfigboard.mk | 2 + .../stm/boards/espruino_wifi/mpconfigboard.mk | 4 + ports/stm/boards/pyb_nano_v2/mpconfigboard.mk | 4 + .../stm32f411ce_blackpill/mpconfigboard.mk | 4 + .../stm32f411ve_discovery/mpconfigboard.mk | 4 + ports/stm/common-hal/audiopwmio/PWMAudioOut.c | 376 ++++++++++++++++++ ports/stm/common-hal/audiopwmio/PWMAudioOut.h | 58 +++ ports/stm/common-hal/audiopwmio/__init__.c | 0 ports/stm/mpconfigport.mk | 6 +- ports/stm/supervisor/port.c | 6 + shared-bindings/audiopwmio/PWMAudioOut.c | 3 +- 12 files changed, 473 insertions(+), 3 deletions(-) create mode 100644 ports/stm/common-hal/audiopwmio/PWMAudioOut.c create mode 100644 ports/stm/common-hal/audiopwmio/PWMAudioOut.h create mode 100644 ports/stm/common-hal/audiopwmio/__init__.c diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 9148569ecd..6e58f51627 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -411,6 +411,10 @@ msgstr "" msgid "AnalogOut not supported on given pin" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -525,6 +529,7 @@ msgid "Buffer is too small" msgstr "" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "" @@ -974,6 +979,10 @@ msgstr "" msgid "Failed to allocate wifi scan memory" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "" diff --git a/ports/stm/boards/espruino_pico/mpconfigboard.mk b/ports/stm/boards/espruino_pico/mpconfigboard.mk index d6118adf88..9148160286 100644 --- a/ports/stm/boards/espruino_pico/mpconfigboard.mk +++ b/ports/stm/boards/espruino_pico/mpconfigboard.mk @@ -20,6 +20,8 @@ LD_FILE = boards/STM32F401xd_fs.ld # lto for this port, and if other stuff hasn't been added in the # meantime CIRCUITPY_ULAB = 0 +CIRCUITPY_AUDIOCORE = 0 +CIRCUITPY_AUDIOPWMIO = 0 CIRCUITPY_BUSDEVICE = 0 CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_FRAMEBUFFERIO = 0 diff --git a/ports/stm/boards/espruino_wifi/mpconfigboard.mk b/ports/stm/boards/espruino_wifi/mpconfigboard.mk index 9500a5f185..a2ceb1ae38 100644 --- a/ports/stm/boards/espruino_wifi/mpconfigboard.mk +++ b/ports/stm/boards/espruino_wifi/mpconfigboard.mk @@ -11,3 +11,7 @@ MCU_PACKAGE = UFQFPN48 LD_COMMON = boards/common_default.ld LD_FILE = boards/STM32F411_fs.ld + +# Too big for the flash +CIRCUITPY_AUDIOCORE = 0 +CIRCUITPY_AUDIOPWMIO = 0 diff --git a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk index 31cc9b4d27..5824e65a29 100644 --- a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk +++ b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk @@ -12,3 +12,7 @@ MCU_PACKAGE = UFQFPN48 LD_COMMON = boards/common_default.ld LD_FILE = boards/STM32F411_fs.ld + +# Too big for the flash +CIRCUITPY_AUDIOCORE = 0 +CIRCUITPY_AUDIOPWMIO = 0 diff --git a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk index 1d533e30f3..bfb88ab0ea 100644 --- a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk @@ -15,3 +15,7 @@ MCU_PACKAGE = UFQFPN48 LD_COMMON = boards/common_default.ld LD_FILE = boards/STM32F411_fs.ld + +# Too big for the flash +CIRCUITPY_AUDIOCORE = 0 +CIRCUITPY_AUDIOPWMIO = 0 diff --git a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk index 3cb7162a4a..3180fbd084 100644 --- a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk @@ -11,3 +11,7 @@ MCU_PACKAGE = LQFP100_f4 LD_COMMON = boards/common_default.ld LD_FILE = boards/STM32F411_fs.ld + +# Too big for the flash +CIRCUITPY_AUDIOCORE = 0 +CIRCUITPY_AUDIOPWMIO = 0 diff --git a/ports/stm/common-hal/audiopwmio/PWMAudioOut.c b/ports/stm/common-hal/audiopwmio/PWMAudioOut.c new file mode 100644 index 0000000000..e5c478e632 --- /dev/null +++ b/ports/stm/common-hal/audiopwmio/PWMAudioOut.c @@ -0,0 +1,376 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Artyom Skrobov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +#include + +#include "py/runtime.h" +#include "common-hal/audiopwmio/PWMAudioOut.h" +#include "shared-bindings/audiopwmio/PWMAudioOut.h" + +#include "timers.h" + +// TODO: support multiple concurrently active outputs. +STATIC TIM_HandleTypeDef tim_handle; +STATIC audiopwmio_pwmaudioout_obj_t *active_audio = NULL; + +STATIC void set_pin(uint8_t channel, GPIO_PinState state) { + HAL_GPIO_WritePin(pin_port(active_audio->pin[channel]->port), + pin_mask(active_audio->pin[channel]->number), state); +} + +STATIC void toggle_pin(uint8_t channel) { + HAL_GPIO_TogglePin(pin_port(active_audio->pin[channel]->port), + pin_mask(active_audio->pin[channel]->number)); +} + +STATIC void set_drive_mode(const mcu_pin_obj_t *pin, uint32_t mode) { + GPIO_InitTypeDef GPIO_InitStruct = {0}; + GPIO_InitStruct.Pin = pin_mask(pin->number); + GPIO_InitStruct.Mode = mode; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + HAL_GPIO_Init(pin_port(pin->port), &GPIO_InitStruct); +} + +STATIC void start_timer(audiopwmio_pwmaudioout_obj_t *self) { + if (self->buffer_ptr[0] >= self->buffer_length[0]) { // no more pulses + return; + } + + self->period = self->buffer[0][self->buffer_ptr[0]]; + if (self->pin[1] && self->period > self->buffer[1][self->buffer_ptr[1]]) { + self->period = self->buffer[1][self->buffer_ptr[1]]; + } + + // Set the new period + tim_handle.Init.Period = self->period - 1; + HAL_TIM_Base_Init(&tim_handle); + + // TIM7 has limited HAL support, set registers manually + tim_handle.Instance->SR = 0; // Prevent the SR from triggering an interrupt + tim_handle.Instance->CR1 |= TIM_CR1_CEN; // Resume timer + tim_handle.Instance->CR1 |= TIM_CR1_URS; // Disable non-overflow interrupts + __HAL_TIM_ENABLE_IT(&tim_handle, TIM_IT_UPDATE); +} + +STATIC bool fill_buffers(audiopwmio_pwmaudioout_obj_t *self) { + // Naive PCM-to-PWM conversion + int16_t threshold = 0x666; // 0.05; TODO: make configurable + uint8_t *buffer; + uint32_t buffer_length; + audioio_get_buffer_result_t get_buffer_result; + + bool average = (self->sample_channel_count > 1) && !self->pin[1]; + bool replicate = (self->sample_channel_count == 1) && self->pin[1]; + int8_t effective_channels = average ? 1 : self->sample_channel_count; + + do { + get_buffer_result = audiosample_get_buffer(self->sample, false, 0, &buffer, &buffer_length); + if (get_buffer_result == GET_BUFFER_ERROR) { + return false; + } + + uint32_t num_samples = buffer_length / self->bytes_per_sample / self->sample_channel_count; + int16_t *buffer16 = (int16_t*)buffer; + + while (num_samples--) { + for (int8_t channel=0; channel < effective_channels; channel++) { + int16_t val; + if (self->bytes_per_sample == 1) { + val = *buffer++ << 8; + } else { + val = *buffer16++; + } + val += self->sample_offset; + + if (average) { + int16_t next; + if (self->bytes_per_sample == 1) { + next = *buffer++ << 8; + } else { + next = *buffer16++; + } + next += self->sample_offset; + val += (next - val) / 2; + } + + int8_t new_pos = (val > threshold) - (val < -threshold); + if (new_pos == -self->pos[channel]) { + if (self->len[channel] > 1) { + self->buffer[channel][self->buffer_length[channel]++] = self->len[channel]; + if (replicate) { + self->buffer[1-channel][self->buffer_length[1-channel]++] = self->len[channel]; + } + self->len[channel] = 0; + } + self->pos[channel] = new_pos; + } + self->len[channel]++; + } + } + } while (get_buffer_result == GET_BUFFER_MORE_DATA && + (!self->buffer_length[0] || (self->pin[1] && !self->buffer_length[1]))); + + if (get_buffer_result == GET_BUFFER_DONE) { + // It's the final countdown + for (int8_t channel=0; channel < effective_channels; channel++) { + self->buffer[channel][self->buffer_length[channel]++] = self->len[channel]; + if (replicate) { + self->buffer[1-channel][self->buffer_length[1-channel]++] = self->len[channel]; + } + } + + if (self->loop) { + audiosample_reset_buffer(self->sample, false, 0); + } else { + self->stopping = true; + } + } + return true; +} + +STATIC void move_to_beginning(uint16_t *buffer, uint16_t *buffer_length, uint16_t *buffer_ptr) { + if (*buffer_ptr < *buffer_length) { + memmove(buffer, buffer + *buffer_ptr, *buffer_length - *buffer_ptr); + *buffer_length -= *buffer_ptr; + } else { + *buffer_length = 0; + } + *buffer_ptr = 0; +} + +STATIC void pwmaudioout_event_handler(void) { + // Detect TIM Update event + if (__HAL_TIM_GET_FLAG(&tim_handle, TIM_FLAG_UPDATE) != RESET) + { + if (__HAL_TIM_GET_IT_SOURCE(&tim_handle, TIM_IT_UPDATE) != RESET) + { + __HAL_TIM_CLEAR_IT(&tim_handle, TIM_IT_UPDATE); + if (!active_audio || active_audio->paused) { + __HAL_TIM_DISABLE_IT(&tim_handle, TIM_IT_UPDATE); + return; + } + + bool refill = false; + + active_audio->buffer[0][active_audio->buffer_ptr[0]] -= active_audio->period; + if (!active_audio->buffer[0][active_audio->buffer_ptr[0]]) { + toggle_pin(0); + if (++(active_audio->buffer_ptr[0]) >= active_audio->buffer_length[0]) { + refill = true; + } + } + if (active_audio->pin[1]) { + active_audio->buffer[1][active_audio->buffer_ptr[1]] -= active_audio->period; + if (!active_audio->buffer[1][active_audio->buffer_ptr[1]]) { + toggle_pin(1); + if (++(active_audio->buffer_ptr[1]) >= active_audio->buffer_length[1]) { + refill = true; + } + } + } + + if (refill) { + __HAL_TIM_DISABLE_IT(&tim_handle, TIM_IT_UPDATE); + + move_to_beginning(active_audio->buffer[0], &active_audio->buffer_length[0], &active_audio->buffer_ptr[0]); + if (active_audio->pin[1]) { + move_to_beginning(active_audio->buffer[1], &active_audio->buffer_length[1], &active_audio->buffer_ptr[1]); + } + + if (active_audio->stopping || !fill_buffers(active_audio)) { + // No more audio. Turn off output and don't restart. + common_hal_audiopwmio_pwmaudioout_stop(active_audio); + return; + } + } + + // Count up to the next given value. + start_timer(active_audio); + } + } +} + +void audiopwmout_reset() { + if (active_audio) { + common_hal_audiopwmio_pwmaudioout_stop(active_audio); + } +} + +// Caller validates that pins are free. +void common_hal_audiopwmio_pwmaudioout_construct(audiopwmio_pwmaudioout_obj_t *self, + const mcu_pin_obj_t *left_channel, const mcu_pin_obj_t *right_channel, uint16_t quiescent_value) { + + // Set up the pin(s) for output + self->pin[0] = left_channel; + self->pin[1] = right_channel; + set_drive_mode(left_channel, GPIO_MODE_OUTPUT_PP); + if (right_channel) { + set_drive_mode(right_channel, GPIO_MODE_OUTPUT_PP); + } + + self->buffer[0] = NULL; + self->buffer[1] = NULL; + + self->quiescent_value = quiescent_value; +} + +bool common_hal_audiopwmio_pwmaudioout_deinited(audiopwmio_pwmaudioout_obj_t *self) { + return !self->pin[0]; +} + +STATIC void free_buffers(audiopwmio_pwmaudioout_obj_t *self) { + m_free(self->buffer[0]); + self->buffer[0] = NULL; + m_free(self->buffer[1]); + self->buffer[1] = NULL; +} + +void common_hal_audiopwmio_pwmaudioout_deinit(audiopwmio_pwmaudioout_obj_t *self) { + if (common_hal_audiopwmio_pwmaudioout_deinited(self)) { + return; + } + common_hal_audiopwmio_pwmaudioout_stop(self); + + free_buffers(self); + + self->pin[0] = 0; + self->pin[1] = 0; +} + +void common_hal_audiopwmio_pwmaudioout_play(audiopwmio_pwmaudioout_obj_t *self, mp_obj_t sample, bool loop) { + common_hal_audiopwmio_pwmaudioout_stop(self); + if (active_audio) { + mp_raise_RuntimeError(translate("Another PWMAudioOut is already active")); // TODO + } + self->sample = sample; + self->loop = loop; + + uint32_t sample_rate = audiosample_sample_rate(sample); + self->bytes_per_sample = audiosample_bits_per_sample(sample) / 8; + + uint32_t max_buffer_length; + uint8_t spacing; + bool single_buffer; + bool samples_signed; + audiosample_get_buffer_structure(sample, /* single channel */ false, + &single_buffer, &samples_signed, &max_buffer_length, &spacing); + self->sample_channel_count = audiosample_channel_count(sample); + self->sample_offset = (samples_signed ? 0x8000 : 0) - self->quiescent_value; + + free_buffers(self); + + if (max_buffer_length > UINT16_MAX) { + mp_raise_ValueError_varg(translate("Buffer length %d too big. It must be less than %d"), max_buffer_length, UINT16_MAX); + } + uint16_t buffer_length = (uint16_t)max_buffer_length / self->bytes_per_sample; + self->buffer[0] = m_malloc(buffer_length * sizeof(uint16_t), false); + self->buffer_ptr[0] = self->buffer_length[0] = 0; + if (self->pin[1]) { + self->buffer[1] = m_malloc(buffer_length * sizeof(uint16_t), false); + self->buffer_ptr[1] = self->buffer_length[1] = 0; + } + + self->pos[0] = self->pos[1] = 1; // initially on + self->len[0] = self->len[1] = 0; + + audiosample_reset_buffer(self->sample, false, 0); + self->stopping = false; + self->paused = false; + if (!fill_buffers(self)) { + mp_raise_RuntimeError(translate("Failed to buffer the sample")); + } + + // Calculate period (TODO: supersample to 1 MHz?) + TIM_TypeDef *tim_instance = stm_peripherals_find_timer(); + uint32_t source = stm_peripherals_timer_get_source_freq(tim_instance); + uint32_t prescaler = source/sample_rate; + + // Activate timer + active_audio = self; + stm_peripherals_timer_reserve(tim_instance); + stm_peripherals_timer_preinit(tim_instance, 4, pwmaudioout_event_handler); + + tim_handle.Instance = tim_instance; + tim_handle.Init.Period = 100; //immediately replaced. + tim_handle.Init.Prescaler = prescaler - 1; + tim_handle.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; + tim_handle.Init.CounterMode = TIM_COUNTERMODE_UP; + tim_handle.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + + HAL_TIM_Base_Init(&tim_handle); + tim_handle.Instance->SR = 0; + + // Alternate on and off, starting with on. + set_pin(0, GPIO_PIN_SET); + if (self->pin[1]) { + set_pin(1, GPIO_PIN_SET); + } + + // Count up to the next given value. + start_timer(self); +} + +void common_hal_audiopwmio_pwmaudioout_stop(audiopwmio_pwmaudioout_obj_t *self) { + if (active_audio != self) { + return; + } + + // Turn off timer counter. + tim_handle.Instance->CR1 &= ~TIM_CR1_CEN; + stm_peripherals_timer_free(tim_handle.Instance); + + active_audio = NULL; + self->stopping = false; + self->paused = false; + + // Make sure pins are left low. + set_pin(0, GPIO_PIN_RESET); + if (self->pin[1]) { + set_pin(1, GPIO_PIN_RESET); + } + + // Cannot free buffers here because we may be called from + // the interrupt handler, and the heap is not reentrant. +} + +bool common_hal_audiopwmio_pwmaudioout_get_playing(audiopwmio_pwmaudioout_obj_t *self) { + return active_audio == self; +} + +void common_hal_audiopwmio_pwmaudioout_pause(audiopwmio_pwmaudioout_obj_t *self) { + self->paused = true; +} + +void common_hal_audiopwmio_pwmaudioout_resume(audiopwmio_pwmaudioout_obj_t *self) { + self->paused = false; + if (active_audio == self) { + start_timer(self); + } +} + +bool common_hal_audiopwmio_pwmaudioout_get_paused(audiopwmio_pwmaudioout_obj_t *self) { + return self->paused; +} diff --git a/ports/stm/common-hal/audiopwmio/PWMAudioOut.h b/ports/stm/common-hal/audiopwmio/PWMAudioOut.h new file mode 100644 index 0000000000..bff0bfc89f --- /dev/null +++ b/ports/stm/common-hal/audiopwmio/PWMAudioOut.h @@ -0,0 +1,58 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Artyom Skrobov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_STM_COMMON_HAL_AUDIOPWM_AUDIOOUT_H +#define MICROPY_INCLUDED_STM_COMMON_HAL_AUDIOPWM_AUDIOOUT_H + +#include "common-hal/microcontroller/Pin.h" + +typedef struct { + mp_obj_base_t base; + const mcu_pin_obj_t *pin[2]; + uint16_t quiescent_value; + + uint16_t *buffer[2]; + uint16_t buffer_length[2]; + uint16_t buffer_ptr[2]; + + mp_obj_t *sample; + int16_t sample_offset; + uint8_t sample_channel_count; + uint8_t bytes_per_sample; + + // PCM-to-PWM conversion state + int8_t pos[2]; // -1 for off, +1 for on + uint16_t len[2]; + + uint16_t period; + bool stopping; + bool paused; + bool loop; +} audiopwmio_pwmaudioout_obj_t; + +void audiopwmout_reset(void); + +#endif diff --git a/ports/stm/common-hal/audiopwmio/__init__.c b/ports/stm/common-hal/audiopwmio/__init__.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/stm/mpconfigport.mk b/ports/stm/mpconfigport.mk index 4d76d03c92..a3216f2678 100644 --- a/ports/stm/mpconfigport.mk +++ b/ports/stm/mpconfigport.mk @@ -12,9 +12,13 @@ ifeq ($(MCU_VARIANT),$(filter $(MCU_VARIANT),STM32F405xx STM32F407xx)) endif ifeq ($(MCU_SERIES),F4) + # Audio via PWM + CIRCUITPY_AUDIOIO = 0 + CIRCUITPY_AUDIOCORE ?= 1 + CIRCUITPY_AUDIOPWMIO ?= 1 + # Not yet implemented common-hal modules: CIRCUITPY_AUDIOBUSIO ?= 0 - CIRCUITPY_AUDIOIO ?= 0 CIRCUITPY_COUNTIO ?= 0 CIRCUITPY_FREQUENCYIO ?= 0 CIRCUITPY_I2CPERIPHERAL ?= 0 diff --git a/ports/stm/supervisor/port.c b/ports/stm/supervisor/port.c index 4a7583eb21..666e2c50db 100644 --- a/ports/stm/supervisor/port.c +++ b/ports/stm/supervisor/port.c @@ -32,6 +32,9 @@ #include "common-hal/microcontroller/Pin.h" +#ifdef CIRCUITPY_AUDIOPWMIO +#include "common-hal/audiopwmio/PWMAudioOut.h" +#endif #if CIRCUITPY_BUSIO #include "common-hal/busio/I2C.h" #include "common-hal/busio/SPI.h" @@ -229,6 +232,9 @@ void SysTick_Handler(void) { void reset_port(void) { reset_all_pins(); + #if CIRCUITPY_AUDIOPWMIO + audiopwmout_reset(); + #endif #if CIRCUITPY_BUSIO i2c_reset(); spi_reset(); diff --git a/shared-bindings/audiopwmio/PWMAudioOut.c b/shared-bindings/audiopwmio/PWMAudioOut.c index fbe64fba78..c2ebf4fbae 100644 --- a/shared-bindings/audiopwmio/PWMAudioOut.c +++ b/shared-bindings/audiopwmio/PWMAudioOut.c @@ -155,8 +155,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiopwmio_pwmaudioout___exit___obj, //| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, `audiomixer.Mixer` or `audiomp3.MP3Decoder`. //| //| The sample itself should consist of 16 bit samples. Microcontrollers with a lower output -//| resolution will use the highest order bits to output. For example, the SAMD21 has a 10 bit -//| DAC that ignores the lowest 6 bits when playing 16 bit samples.""" +//| resolution will use the highest order bits to output.""" //| ... //| STATIC mp_obj_t audiopwmio_pwmaudioout_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { From a70b679ed52529f8cc317959b180fd8a34bd220d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 26 Mar 2021 12:06:25 -0500 Subject: [PATCH 144/261] bitbangio.SPI.read: Support write_value, fix some other nits --- shared-bindings/bitbangio/SPI.c | 48 ++++++++++++++++++++++++--------- shared-bindings/bitbangio/SPI.h | 2 +- shared-module/bitbangio/SPI.c | 8 ++++-- 3 files changed, 42 insertions(+), 16 deletions(-) diff --git a/shared-bindings/bitbangio/SPI.c b/shared-bindings/bitbangio/SPI.c index e0fc6682e4..1caa658df8 100644 --- a/shared-bindings/bitbangio/SPI.c +++ b/shared-bindings/bitbangio/SPI.c @@ -224,32 +224,53 @@ STATIC mp_obj_t bitbangio_spi_write(mp_obj_t self_in, mp_obj_t wr_buf) { MP_DEFINE_CONST_FUN_OBJ_2(bitbangio_spi_write_obj, bitbangio_spi_write); -//| def readinto(self, buf: WriteableBuffer) -> None: -//| """Read into the buffer specified by ``buf`` while writing zeroes. -//| Requires the SPI being locked. -//| If the number of bytes to read is 0, nothing happens.""" +//| def readinto(self, buffer: WriteableBuffer, *, start: int = 0, end: Optional[int] = None, write_value: int = 0) -> None: +//| """Read into ``buffer`` while writing ``write_value`` for each byte read. +//| The SPI object must be locked. +//| If the number of bytes to read is 0, nothing happens. +//| +//| :param bytearray buffer: Read data into this buffer +//| :param int start: Start of the slice of ``buffer`` to read into: ``buffer[start:end]`` +//| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)`` +//| :param int write_value: Value to write while reading.""" //| ... //| -// TODO(tannewt): Add support for start and end kwargs. -STATIC mp_obj_t bitbangio_spi_readinto(size_t n_args, const mp_obj_t *args) { - bitbangio_spi_obj_t *self = MP_OBJ_TO_PTR(args[0]); + +STATIC mp_obj_t bitbangio_spi_readinto(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_buffer, ARG_start, ARG_end, ARG_write_value }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, + { MP_QSTR_start, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, + { MP_QSTR_end, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = INT_MAX} }, + { MP_QSTR_write_value,MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, + }; + bitbangio_spi_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); check_for_deinit(self); + check_lock(self); + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + mp_buffer_info_t bufinfo; - mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_WRITE); - if (bufinfo.len == 0) { + mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_WRITE); + int32_t start = args[ARG_start].u_int; + size_t length = bufinfo.len; + normalize_buffer_bounds(&start, args[ARG_end].u_int, &length); + + if (length == 0) { return mp_const_none; } - check_lock(args[0]); - bool ok = shared_module_bitbangio_spi_read(self, bufinfo.buf, bufinfo.len); + + bool ok = shared_module_bitbangio_spi_read(self, ((uint8_t*)bufinfo.buf) + start, length, args[ARG_write_value].u_int); if (!ok) { mp_raise_OSError(MP_EIO); } return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bitbangio_spi_readinto_obj, 2, 2, bitbangio_spi_readinto); +MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_spi_readinto_obj, 2, bitbangio_spi_readinto); -//| def write_readinto(self, buffer_out: ReadableBuffer, buffer_in: WriteableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None: +//| def write_readinto(self, buffer_out: ReadableBuffer, buffer_in: ReadableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None: //| """Write out the data in ``buffer_out`` while simultaneously reading data into ``buffer_in``. +//| The SPI object must be locked. //| The lengths of the slices defined by ``buffer_out[out_start:out_end]`` and ``buffer_in[in_start:in_end]`` //| must be equal. //| If buffer slice lengths are both 0, nothing happens. @@ -274,6 +295,7 @@ STATIC mp_obj_t bitbangio_spi_write_readinto(size_t n_args, const mp_obj_t *pos_ }; bitbangio_spi_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); check_for_deinit(self); + check_lock(self); mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); diff --git a/shared-bindings/bitbangio/SPI.h b/shared-bindings/bitbangio/SPI.h index b2a6445754..2d0d75e407 100644 --- a/shared-bindings/bitbangio/SPI.h +++ b/shared-bindings/bitbangio/SPI.h @@ -54,7 +54,7 @@ extern void shared_module_bitbangio_spi_unlock(bitbangio_spi_obj_t *self); extern bool shared_module_bitbangio_spi_write(bitbangio_spi_obj_t *self, const uint8_t *data, size_t len); // Reads in len bytes while outputting zeroes. -extern bool shared_module_bitbangio_spi_read(bitbangio_spi_obj_t *self, uint8_t *data, size_t len); +extern bool shared_module_bitbangio_spi_read(bitbangio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_value); // Transfer out len bytes while reading len bytes extern bool shared_module_bitbangio_spi_transfer(bitbangio_spi_obj_t *self, const uint8_t *dout, uint8_t *din, size_t len); diff --git a/shared-module/bitbangio/SPI.c b/shared-module/bitbangio/SPI.c index 8be6cac5fa..65511964a6 100644 --- a/shared-module/bitbangio/SPI.c +++ b/shared-module/bitbangio/SPI.c @@ -176,7 +176,7 @@ bool shared_module_bitbangio_spi_write(bitbangio_spi_obj_t *self, const uint8_t } // Reads in len bytes while outputting zeroes. -bool shared_module_bitbangio_spi_read(bitbangio_spi_obj_t *self, uint8_t *data, size_t len) { +bool shared_module_bitbangio_spi_read(bitbangio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_data) { if (len > 0 && !self->has_miso) { mp_raise_ValueError(translate("Cannot read without MISO pin.")); } @@ -210,8 +210,12 @@ bool shared_module_bitbangio_spi_read(bitbangio_spi_obj_t *self, uint8_t *data, common_hal_digitalio_digitalinout_set_value(&self->mosi, false); } for (size_t i = 0; i < len; ++i) { + uint8_t data_out = write_data; uint8_t data_in = 0; - for (int j = 0; j < 8; ++j) { + for (int j = 0; j < 8; ++j, data_out <<= 1) { + if (self->has_mosi) { + common_hal_digitalio_digitalinout_set_value(&self->mosi, (data_out >> 7) & 1); + } if (self->phase == 0) { common_hal_mcu_delay_us(delay_half); common_hal_digitalio_digitalinout_set_value(&self->clock, 1 - self->polarity); From d7dc3801ab9fdeef1b1edde050f9aad35c92d73b Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Sat, 20 Mar 2021 09:07:36 -0400 Subject: [PATCH 145/261] [ure] to save space, disable debug dumps by default Has to stay enabled in unix port for the sake of tests/extmod/ure_debug.py --- extmod/modure.c | 12 ++++++++++++ ports/unix/mpconfigport.h | 1 + py/circuitpy_mpconfig.mk | 3 +++ 3 files changed, 16 insertions(+) diff --git a/extmod/modure.c b/extmod/modure.c index e9aff9b270..0238c196b6 100644 --- a/extmod/modure.c +++ b/extmod/modure.c @@ -18,7 +18,9 @@ #include "re1.5/re1.5.h" +#if CIRCUITPY_RE_DEBUG #define FLAG_DEBUG 0x1000 +#endif typedef struct _mp_obj_re_t { mp_obj_base_t base; @@ -401,18 +403,24 @@ STATIC mp_obj_t mod_re_compile(size_t n_args, const mp_obj_t *args) { } mp_obj_re_t *o = m_new_obj_var(mp_obj_re_t, char, size); o->base.type = &re_type; + #if CIRCUITPY_RE_DEBUG int flags = 0; if (n_args > 1) { flags = mp_obj_get_int(args[1]); } + #else + (void)n_args; + #endif int error = re1_5_compilecode(&o->re, re_str); if (error != 0) { error: mp_raise_ValueError(translate("Error in regex")); } + #if CIRCUITPY_RE_DEBUG if (flags & FLAG_DEBUG) { re1_5_dumpcode(&o->re); } + #endif return MP_OBJ_FROM_PTR(o); } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_re_compile_obj, 1, 2, mod_re_compile); @@ -456,7 +464,9 @@ STATIC const mp_rom_map_elem_t mp_module_re_globals_table[] = { #if MICROPY_PY_URE_SUB { MP_ROM_QSTR(MP_QSTR_sub), MP_ROM_PTR(&mod_re_sub_obj) }, #endif + #if CIRCUITPY_RE_DEBUG { MP_ROM_QSTR(MP_QSTR_DEBUG), MP_ROM_INT(FLAG_DEBUG) }, + #endif }; STATIC MP_DEFINE_CONST_DICT(mp_module_re_globals, mp_module_re_globals_table); @@ -471,7 +481,9 @@ const mp_obj_module_t mp_module_ure = { #define re1_5_fatal(x) assert(!x) #include "re1.5/compilecode.c" +#if CIRCUITPY_RE_DEBUG #include "re1.5/dumpcode.c" +#endif #include "re1.5/recursiveloop.c" #include "re1.5/charclass.c" diff --git a/ports/unix/mpconfigport.h b/ports/unix/mpconfigport.h index 464c4ce119..bae0245d05 100644 --- a/ports/unix/mpconfigport.h +++ b/ports/unix/mpconfigport.h @@ -325,3 +325,4 @@ void mp_unix_mark_exec(void); #define MICROPY_PY_BUILTINS_HELP (1) #define MICROPY_PY_BUILTINS_HELP_MODULES (1) +#define CIRCUITPY_RE_DEBUG (1) diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index fea1f937ec..2a4467d493 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -242,6 +242,9 @@ CFLAGS += -DCIRCUITPY_RANDOM=$(CIRCUITPY_RANDOM) CIRCUITPY_RE ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_RE=$(CIRCUITPY_RE) +CIRCUITPY_RE_DEBUG ?= 0 +CFLAGS += -DCIRCUITPY_RE_DEBUG=$(CIRCUITPY_RE_DEBUG) + CIRCUITPY_REPL_BLE ?= 0 CFLAGS += -DCIRCUITPY_REPL_BLE=$(CIRCUITPY_REPL_BLE) From 172715194fde0047fd843bd6e29a9cc6651ffdf7 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 26 Mar 2021 14:51:53 -0500 Subject: [PATCH 146/261] adafruit_bus_device: SPIDevice: Fix so it works with bitbangio.SPI .. by calling methods, same as we did for I2C --- shared-module/adafruit_bus_device/SPIDevice.c | 44 ++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/shared-module/adafruit_bus_device/SPIDevice.c b/shared-module/adafruit_bus_device/SPIDevice.c index c65807aeb4..f34bb99f95 100644 --- a/shared-module/adafruit_bus_device/SPIDevice.c +++ b/shared-module/adafruit_bus_device/SPIDevice.c @@ -42,14 +42,28 @@ void common_hal_adafruit_bus_device_spidevice_construct(adafruit_bus_device_spid } mp_obj_t common_hal_adafruit_bus_device_spidevice_enter(adafruit_bus_device_spidevice_obj_t *self) { - bool success = false; - while (!success) { - success = common_hal_busio_spi_try_lock(self->spi); - RUN_BACKGROUND_TASKS; - mp_handle_pending(); + { + mp_obj_t dest[2]; + mp_load_method(self->spi, MP_QSTR_try_lock, dest); + + while (!mp_obj_is_true(mp_call_method_n_kw(0, 0, dest))) { + mp_handle_pending(); + } } - common_hal_busio_spi_configure(self->spi, self->baudrate, self->polarity, self->phase, 8); + { + mp_obj_t dest[10]; + mp_load_method(self->spi, MP_QSTR_configure, dest); + dest[2] = MP_OBJ_NEW_QSTR(MP_QSTR_baudrate); + dest[3] = MP_OBJ_NEW_SMALL_INT(self->baudrate); + dest[4] = MP_OBJ_NEW_QSTR(MP_QSTR_polarity); + dest[5] = MP_OBJ_NEW_SMALL_INT(self->polarity); + dest[6] = MP_OBJ_NEW_QSTR(MP_QSTR_phase); + dest[7] = MP_OBJ_NEW_SMALL_INT(self->phase); + dest[8] = MP_OBJ_NEW_QSTR(MP_QSTR_bits); + dest[9] = MP_OBJ_NEW_SMALL_INT(8); + mp_call_method_n_kw(0, 4, dest); + } if (self->chip_select != MP_OBJ_NULL) { common_hal_digitalio_digitalinout_set_value(MP_OBJ_TO_PTR(self->chip_select), false); @@ -67,21 +81,21 @@ void common_hal_adafruit_bus_device_spidevice_exit(adafruit_bus_device_spidevice mp_buffer_info_t bufinfo; mp_obj_t buffer = mp_obj_new_bytearray_of_zeros(1); - mp_get_buffer_raise(buffer, &bufinfo, MP_BUFFER_READ); + mp_get_buffer_raise(buffer, &bufinfo, MP_BUFFER_WRITE); ((uint8_t *)bufinfo.buf)[0] = 0xFF; - uint8_t clocks = self->extra_clocks / 8; - if ((self->extra_clocks % 8) != 0) { - clocks += 1; - } + uint8_t clocks = (self->extra_clocks + 7) / 8; + mp_obj_t dest[3]; + mp_load_method(self->spi, MP_QSTR_write, dest); + dest[2] = buffer; while (clocks > 0) { - if (!common_hal_busio_spi_write(self->spi, ((uint8_t *)bufinfo.buf), 1)) { - mp_raise_OSError(MP_EIO); - } + mp_call_method_n_kw(1, 0, dest); clocks--; } } - common_hal_busio_spi_unlock(self->spi); + mp_obj_t dest[2]; + mp_load_method(self->spi, MP_QSTR_unlock, dest); + mp_call_method_n_kw(0, 0, dest); } From 8056af86482e34dbe5b8d348e9d2406c756ce1c9 Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Fri, 19 Mar 2021 18:22:00 -0400 Subject: [PATCH 147/261] [synthio] add a simple MidiTrack implementation --- locale/circuitpython.pot | 17 +- ports/atmel-samd/mpconfigport.mk | 1 + py/circuitpy_defns.mk | 5 + py/circuitpy_mpconfig.h | 8 + py/circuitpy_mpconfig.mk | 3 + shared-bindings/_typing/__init__.pyi | 3 +- shared-bindings/audiocore/RawSample.c | 26 +-- shared-bindings/audiocore/RawSample.h | 1 - shared-bindings/audiocore/WaveFile.c | 2 +- shared-bindings/synthio/MidiTrack.c | 169 ++++++++++++++ shared-bindings/synthio/MidiTrack.h | 43 ++++ shared-bindings/synthio/__init__.c | 136 +++++++++++ shared-bindings/synthio/__init__.h | 34 +++ shared-module/synthio/MidiTrack.c | 212 ++++++++++++++++++ shared-module/synthio/MidiTrack.h | 65 ++++++ shared-module/synthio/__init__.c | 0 shared-module/synthio/__init__.h | 32 +++ .../audiocore/single-track.midi | Bin 0 -> 5123 bytes 18 files changed, 733 insertions(+), 24 deletions(-) create mode 100644 shared-bindings/synthio/MidiTrack.c create mode 100644 shared-bindings/synthio/MidiTrack.h create mode 100644 shared-bindings/synthio/__init__.c create mode 100644 shared-bindings/synthio/__init__.h create mode 100644 shared-module/synthio/MidiTrack.c create mode 100644 shared-module/synthio/MidiTrack.h create mode 100644 shared-module/synthio/__init__.c create mode 100644 shared-module/synthio/__init__.h create mode 100755 tests/circuitpython-manual/audiocore/single-track.midi diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 9148569ecd..17bcb663b5 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -874,6 +874,11 @@ msgstr "" msgid "EXTINT channel already in use" msgstr "" +#: shared-module/synthio/MidiTrack.c +#, c-format +msgid "Error in MIDI stream at position %d" +msgstr "" + #: extmod/modure.c msgid "Error in regex" msgstr "" @@ -1197,6 +1202,10 @@ msgstr "" msgid "Invalid DAC pin supplied" msgstr "" +#: shared-bindings/synthio/__init__.c +msgid "Invalid MIDI file" +msgstr "" + #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c @@ -1877,7 +1886,7 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "" @@ -2488,10 +2497,6 @@ msgstr "" msgid "buffer is smaller than requested size" msgstr "" -#: shared-bindings/audiocore/RawSample.c -msgid "buffer must be a bytes-like object" -msgstr "" - #: extmod/ulab/code/ulab_create.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2933,7 +2938,7 @@ msgid "f-string: single '}' is not allowed" msgstr "" #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c -#: shared-bindings/displayio/OnDiskBitmap.c +#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c msgid "file must be a file opened in byte mode" msgstr "" diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 7be9e203a8..4dab750fbb 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -39,6 +39,7 @@ CIRCUITPY_BUILTINS_POW3 ?= 0 CIRCUITPY_COMPUTED_GOTO_SAVE_SPACE ?= 1 CIRCUITPY_FREQUENCYIO ?= 0 CIRCUITPY_JSON ?= 0 +CIRCUITPY_SYNTHIO ?= 0 CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1 # No room for HCI _bleio on SAMD21. diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index bb177c5d07..44a52dd355 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -280,6 +280,9 @@ endif ifeq ($(CIRCUITPY_SUPERVISOR),1) SRC_PATTERNS += supervisor/% endif +ifeq ($(CIRCUITPY_SYNTHIO),1) +SRC_PATTERNS += synthio/% +endif ifeq ($(CIRCUITPY_TERMINALIO),1) SRC_PATTERNS += terminalio/% fontio/% endif @@ -523,6 +526,8 @@ SRC_SHARED_MODULE_ALL = \ socket/__init__.c \ storage/__init__.c \ struct/__init__.c \ + synthio/MidiTrack.c \ + synthio/__init__.c \ terminalio/Terminal.c \ terminalio/__init__.c \ time/__init__.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index eedda7ad73..801e1867e7 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -728,6 +728,13 @@ extern const struct _mp_obj_module_t supervisor_module; #define SUPERVISOR_MODULE #endif +#if CIRCUITPY_SYNTHIO +#define SYNTHIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_synthio), (mp_obj_t)&synthio_module }, +extern const struct _mp_obj_module_t synthio_module; +#else +#define SYNTHIO_MODULE +#endif + #if CIRCUITPY_TIME extern const struct _mp_obj_module_t time_module; #define TIME_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&time_module }, @@ -897,6 +904,7 @@ extern const struct _mp_obj_module_t msgpack_module; STORAGE_MODULE \ STRUCT_MODULE \ SUPERVISOR_MODULE \ + SYNTHIO_MODULE \ TOUCHIO_MODULE \ UHEAP_MODULE \ USB_CDC_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index fea1f937ec..d55e7c90ab 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -305,6 +305,9 @@ CFLAGS += -DCIRCUITPY_STRUCT=$(CIRCUITPY_STRUCT) CIRCUITPY_SUPERVISOR ?= 1 CFLAGS += -DCIRCUITPY_SUPERVISOR=$(CIRCUITPY_SUPERVISOR) +CIRCUITPY_SYNTHIO ?= $(CIRCUITPY_AUDIOCORE) +CFLAGS += -DCIRCUITPY_SYNTHIO=$(CIRCUITPY_SYNTHIO) + CIRCUITPY_TERMINALIO ?= $(CIRCUITPY_DISPLAYIO) CFLAGS += -DCIRCUITPY_TERMINALIO=$(CIRCUITPY_TERMINALIO) diff --git a/shared-bindings/_typing/__init__.pyi b/shared-bindings/_typing/__init__.pyi index cc4a0a4391..174c002fdc 100644 --- a/shared-bindings/_typing/__init__.pyi +++ b/shared-bindings/_typing/__init__.pyi @@ -38,7 +38,7 @@ WriteableBuffer = Union[ """ AudioSample = Union[ - audiocore.WaveFile, audiocore.RawSample, audiomixer.Mixer, audiomp3.MP3Decoder + audiocore.WaveFile, audiocore.RawSample, audiomixer.Mixer, audiomp3.MP3Decoder, synthio.MidiTrack ] """Classes that implement the audiosample protocol @@ -46,6 +46,7 @@ AudioSample = Union[ - `audiocore.RawSample` - `audiomixer.Mixer` - `audiomp3.MP3Decoder` + - `synthio.MidiTrack` You can play these back with `audioio.AudioOut`, `audiobusio.I2SOut` or `audiopwmio.PWMAudioOut`. """ diff --git a/shared-bindings/audiocore/RawSample.c b/shared-bindings/audiocore/RawSample.c index 23a2d3f0be..13339222c1 100644 --- a/shared-bindings/audiocore/RawSample.c +++ b/shared-bindings/audiocore/RawSample.c @@ -30,7 +30,6 @@ #include "py/binary.h" #include "py/objproperty.h" #include "py/runtime.h" -#include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/util.h" #include "shared-bindings/audiocore/RawSample.h" #include "supervisor/shared/translate.h" @@ -83,26 +82,23 @@ STATIC mp_obj_t audioio_rawsample_make_new(const mp_obj_type_t *type, size_t n_a audioio_rawsample_obj_t *self = m_new_obj(audioio_rawsample_obj_t); self->base.type = &audioio_rawsample_type; mp_buffer_info_t bufinfo; - if (mp_get_buffer(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_READ)) { - uint8_t bytes_per_sample = 1; - bool signed_samples = bufinfo.typecode == 'b' || bufinfo.typecode == 'h'; - if (bufinfo.typecode == 'h' || bufinfo.typecode == 'H') { - bytes_per_sample = 2; - } else if (bufinfo.typecode != 'b' && bufinfo.typecode != 'B' && bufinfo.typecode != BYTEARRAY_TYPECODE) { - mp_raise_ValueError(translate("sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or 'B'")); - } - common_hal_audioio_rawsample_construct(self, ((uint8_t *)bufinfo.buf), bufinfo.len, - bytes_per_sample, signed_samples, args[ARG_channel_count].u_int, - args[ARG_sample_rate].u_int); - } else { - mp_raise_TypeError(translate("buffer must be a bytes-like object")); + mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_READ); + uint8_t bytes_per_sample = 1; + bool signed_samples = bufinfo.typecode == 'b' || bufinfo.typecode == 'h'; + if (bufinfo.typecode == 'h' || bufinfo.typecode == 'H') { + bytes_per_sample = 2; + } else if (bufinfo.typecode != 'b' && bufinfo.typecode != 'B' && bufinfo.typecode != BYTEARRAY_TYPECODE) { + mp_raise_ValueError(translate("sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or 'B'")); } + common_hal_audioio_rawsample_construct(self, ((uint8_t *)bufinfo.buf), bufinfo.len, + bytes_per_sample, signed_samples, args[ARG_channel_count].u_int, + args[ARG_sample_rate].u_int); return MP_OBJ_FROM_PTR(self); } //| def deinit(self) -> None: -//| """Deinitialises the AudioOut and releases any hardware resources for reuse.""" +//| """Deinitialises the RawSample and releases any hardware resources for reuse.""" //| ... //| STATIC mp_obj_t audioio_rawsample_deinit(mp_obj_t self_in) { diff --git a/shared-bindings/audiocore/RawSample.h b/shared-bindings/audiocore/RawSample.h index b07add2dd1..71056f30c3 100644 --- a/shared-bindings/audiocore/RawSample.h +++ b/shared-bindings/audiocore/RawSample.h @@ -27,7 +27,6 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_AUDIOIO_RAWSAMPLE_H #define MICROPY_INCLUDED_SHARED_BINDINGS_AUDIOIO_RAWSAMPLE_H -#include "common-hal/microcontroller/Pin.h" #include "shared-module/audiocore/RawSample.h" extern const mp_obj_type_t audioio_rawsample_type; diff --git a/shared-bindings/audiocore/WaveFile.c b/shared-bindings/audiocore/WaveFile.c index 73943f980f..5cf6deb2ed 100644 --- a/shared-bindings/audiocore/WaveFile.c +++ b/shared-bindings/audiocore/WaveFile.c @@ -44,7 +44,7 @@ //| """Load a .wav file for playback with `audioio.AudioOut` or `audiobusio.I2SOut`. //| //| :param typing.BinaryIO file: Already opened wave file -//| :param ~_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two 512 byte buffers are allocated internally. +//| :param ~_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two 256 byte buffers are allocated internally. //| //| //| Playing a wave file from flash:: diff --git a/shared-bindings/synthio/MidiTrack.c b/shared-bindings/synthio/MidiTrack.c new file mode 100644 index 0000000000..65fc7a4ee1 --- /dev/null +++ b/shared-bindings/synthio/MidiTrack.c @@ -0,0 +1,169 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Artyom Skrobov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include + +#include "lib/utils/context_manager_helpers.h" +#include "py/binary.h" +#include "py/objproperty.h" +#include "py/runtime.h" +#include "shared-bindings/util.h" +#include "shared-bindings/synthio/MidiTrack.h" +#include "supervisor/shared/translate.h" + +//| class MidiTrack: +//| """Simple square-wave MIDI synth""" +//| +//| def __init__(self, buffer: ReadableBuffer, tempo: int, *, sample_rate: int = 11025) -> None: +//| """Create a MidiTrack from the given stream of MIDI events. Only "Note On" and "Note Off" events +//| are supported; channel numbers and key velocities are ignored. Up to two notes may be on at the +//| same time. +//| +//| :param ~_typing.ReadableBuffer buffer: Stream of MIDI events, as stored in a MIDI file track chunk +//| :param int tempo: Tempo of the streamed events, in MIDI ticks per second +//| :param int sample_rate: The desired playback sample rate; higher sample rate requires more memory +//| +//| Simple melody:: +//| +//| import audioio +//| import board +//| import synthio +//| +//| dac = audioio.AudioOut(board.SPEAKER) +//| melody = synthio.MidiTrack(b"\\0\\x90H\\0*\\x80H\\0\\6\\x90J\\0*\\x80J\\0\\6\\x90L\\0*\\x80L\\0\\6\\x90J\\0" + +//| b"*\\x80J\\0\\6\\x90H\\0*\\x80H\\0\\6\\x90J\\0*\\x80J\\0\\6\\x90L\\0T\\x80L\\0" + +//| b"\\x0c\\x90H\\0T\\x80H\\0\\x0c\\x90H\\0T\\x80H\\0", tempo=640) +//| dac.play(melody) +//| print("playing") +//| while dac.playing: +//| pass +//| print("stopped")""" +//| ... +//| +STATIC mp_obj_t synthio_miditrack_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_buffer, ARG_tempo, ARG_sample_rate }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED }, + { MP_QSTR_tempo, MP_ARG_INT | MP_ARG_REQUIRED }, + { MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 11025} }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_READ); + + synthio_miditrack_obj_t *self = m_new_obj(synthio_miditrack_obj_t); + self->base.type = &synthio_miditrack_type; + + common_hal_synthio_miditrack_construct(self, + (uint8_t *)bufinfo.buf, bufinfo.len, + args[ARG_tempo].u_int, + args[ARG_sample_rate].u_int); + + return MP_OBJ_FROM_PTR(self); +} + +//| def deinit(self) -> None: +//| """Deinitialises the MidiTrack and releases any hardware resources for reuse.""" +//| ... +//| +STATIC mp_obj_t synthio_miditrack_deinit(mp_obj_t self_in) { + synthio_miditrack_obj_t *self = MP_OBJ_TO_PTR(self_in); + common_hal_synthio_miditrack_deinit(self); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(synthio_miditrack_deinit_obj, synthio_miditrack_deinit); + +STATIC void check_for_deinit(synthio_miditrack_obj_t *self) { + if (common_hal_synthio_miditrack_deinited(self)) { + raise_deinited_error(); + } +} + +//| def __enter__(self) -> MidiTrack: +//| """No-op used by Context Managers.""" +//| ... +//| +// Provided by context manager helper. + +//| def __exit__(self) -> None: +//| """Automatically deinitializes the hardware when exiting a context. See +//| :ref:`lifetime-and-contextmanagers` for more info.""" +//| ... +//| +STATIC mp_obj_t synthio_miditrack_obj___exit__(size_t n_args, const mp_obj_t *args) { + (void)n_args; + common_hal_synthio_miditrack_deinit(args[0]); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(synthio_miditrack___exit___obj, 4, 4, synthio_miditrack_obj___exit__); + +//| sample_rate: Optional[int] +//| """32 bit value that tells how quickly samples are played in Hertz (cycles per second).""" +//| +STATIC mp_obj_t synthio_miditrack_obj_get_sample_rate(mp_obj_t self_in) { + synthio_miditrack_obj_t *self = MP_OBJ_TO_PTR(self_in); + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_synthio_miditrack_get_sample_rate(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(synthio_miditrack_get_sample_rate_obj, synthio_miditrack_obj_get_sample_rate); + +const mp_obj_property_t synthio_miditrack_sample_rate_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&synthio_miditrack_get_sample_rate_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj}, +}; + +STATIC const mp_rom_map_elem_t synthio_miditrack_locals_dict_table[] = { + // Methods + { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&synthio_miditrack_deinit_obj) }, + { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) }, + { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&synthio_miditrack___exit___obj) }, + + // Properties + { MP_ROM_QSTR(MP_QSTR_sample_rate), MP_ROM_PTR(&synthio_miditrack_sample_rate_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(synthio_miditrack_locals_dict, synthio_miditrack_locals_dict_table); + +STATIC const audiosample_p_t synthio_miditrack_proto = { + MP_PROTO_IMPLEMENT(MP_QSTR_protocol_audiosample) + .sample_rate = (audiosample_sample_rate_fun)common_hal_synthio_miditrack_get_sample_rate, + .bits_per_sample = (audiosample_bits_per_sample_fun)common_hal_synthio_miditrack_get_bits_per_sample, + .channel_count = (audiosample_channel_count_fun)common_hal_synthio_miditrack_get_channel_count, + .reset_buffer = (audiosample_reset_buffer_fun)synthio_miditrack_reset_buffer, + .get_buffer = (audiosample_get_buffer_fun)synthio_miditrack_get_buffer, + .get_buffer_structure = (audiosample_get_buffer_structure_fun)synthio_miditrack_get_buffer_structure, +}; + +const mp_obj_type_t synthio_miditrack_type = { + { &mp_type_type }, + .name = MP_QSTR_MidiTrack, + .make_new = synthio_miditrack_make_new, + .locals_dict = (mp_obj_dict_t *)&synthio_miditrack_locals_dict, + .protocol = &synthio_miditrack_proto, +}; diff --git a/shared-bindings/synthio/MidiTrack.h b/shared-bindings/synthio/MidiTrack.h new file mode 100644 index 0000000000..d44d4c3bb7 --- /dev/null +++ b/shared-bindings/synthio/MidiTrack.h @@ -0,0 +1,43 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Artyom Skrobov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_SYNTHIO_MIDITRACK_H +#define MICROPY_INCLUDED_SHARED_BINDINGS_SYNTHIO_MIDITRACK_H + +#include "shared-module/synthio/MidiTrack.h" + +extern const mp_obj_type_t synthio_miditrack_type; + +void common_hal_synthio_miditrack_construct(synthio_miditrack_obj_t *self, + const uint8_t *buffer, uint32_t len, uint32_t tempo, uint32_t sample_rate); + +void common_hal_synthio_miditrack_deinit(synthio_miditrack_obj_t *self); +bool common_hal_synthio_miditrack_deinited(synthio_miditrack_obj_t *self); +uint32_t common_hal_synthio_miditrack_get_sample_rate(synthio_miditrack_obj_t *self); +uint8_t common_hal_synthio_miditrack_get_bits_per_sample(synthio_miditrack_obj_t *self); +uint8_t common_hal_synthio_miditrack_get_channel_count(synthio_miditrack_obj_t *self); + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_SYNTHIO_MIDITRACK_H diff --git a/shared-bindings/synthio/__init__.c b/shared-bindings/synthio/__init__.c new file mode 100644 index 0000000000..d5165001fc --- /dev/null +++ b/shared-bindings/synthio/__init__.c @@ -0,0 +1,136 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Artyom Skrobov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include + +#include "py/mperrno.h" +#include "py/obj.h" +#include "py/runtime.h" +#include "extmod/vfs_fat.h" + +#include "shared-bindings/synthio/__init__.h" +#include "shared-bindings/synthio/MidiTrack.h" + +//| """Support for MIDI synthesis""" +//| +//| def from_file(file: typing.BinaryIO, *, sample_rate: int = 11025) -> MidiTrack: +//| """Create an AudioSample from an already opened MIDI file. +//| Currently, only single-track MIDI (type 0) is supported. +//| +//| :param typing.BinaryIO file: Already opened MIDI file +//| :param int sample_rate: The desired playback sample rate; higher sample rate requires more memory +//| +//| +//| Playing a MIDI file from flash:: +//| +//| import audioio +//| import board +//| import synthio +//| +//| data = open("single-track.midi", "rb") +//| midi = synthio.from_file(data) +//| a = audioio.AudioOut(board.A0) +//| +//| print("playing") +//| a.play(midi) +//| while a.playing: +//| pass +//| print("stopped")""" +//| ... +//| +STATIC mp_obj_t synthio_from_file(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_file, ARG_sample_rate }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_file, MP_ARG_OBJ | MP_ARG_REQUIRED }, + { MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 11025} }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + if (!MP_OBJ_IS_TYPE(args[ARG_file].u_obj, &mp_type_fileio)) { + mp_raise_TypeError(translate("file must be a file opened in byte mode")); + } + pyb_file_obj_t *file = MP_OBJ_TO_PTR(args[ARG_file].u_obj); + + uint8_t chunk_header[14]; + f_rewind(&file->fp); + UINT bytes_read; + if (f_read(&file->fp, chunk_header, sizeof(chunk_header), &bytes_read) != FR_OK) { + mp_raise_OSError(MP_EIO); + } + if (bytes_read != sizeof(chunk_header) || + memcmp(chunk_header, "MThd\0\0\0\6\0\0\0\1", 12)) { + mp_raise_ValueError(translate("Invalid MIDI file")); + // TODO: for a multi-track MIDI (type 1), return an AudioMixer + } + + uint16_t tempo; + if (chunk_header[12] & 0x80) { + tempo = -(int8_t)chunk_header[12] * chunk_header[13]; + } else { + tempo = 2 * ((chunk_header[12] << 8) | chunk_header[13]); + } + + if (f_read(&file->fp, chunk_header, 8, &bytes_read) != FR_OK) { + mp_raise_OSError(MP_EIO); + } + if (bytes_read != 8 || memcmp(chunk_header, "MTrk", 4)) { + mp_raise_ValueError(translate("Invalid MIDI file")); + } + uint32_t track_size = (chunk_header[4] << 24) | + (chunk_header[5] << 16) | (chunk_header[6] << 8) | chunk_header[7]; + uint8_t *buffer = m_malloc(track_size, false); + if (f_read(&file->fp, buffer, track_size, &bytes_read) != FR_OK) { + mp_raise_OSError(MP_EIO); + } + if (bytes_read != track_size) { + mp_raise_ValueError(translate("Invalid MIDI file")); + } + + synthio_miditrack_obj_t *result = m_new_obj(synthio_miditrack_obj_t); + result->base.type = &synthio_miditrack_type; + + common_hal_synthio_miditrack_construct(result, buffer, track_size, + tempo, args[ARG_sample_rate].u_int); + + m_free(buffer); + + return MP_OBJ_FROM_PTR(result); +} +MP_DEFINE_CONST_FUN_OBJ_KW(synthio_from_file_obj, 1, synthio_from_file); + + +STATIC const mp_rom_map_elem_t synthio_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_synthio) }, + { MP_ROM_QSTR(MP_QSTR_MidiTrack), MP_ROM_PTR(&synthio_miditrack_type) }, + { MP_ROM_QSTR(MP_QSTR_from_file), MP_ROM_PTR(&synthio_from_file_obj) }, +}; + +STATIC MP_DEFINE_CONST_DICT(synthio_module_globals, synthio_module_globals_table); + +const mp_obj_module_t synthio_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t *)&synthio_module_globals, +}; diff --git a/shared-bindings/synthio/__init__.h b/shared-bindings/synthio/__init__.h new file mode 100644 index 0000000000..14af1a5805 --- /dev/null +++ b/shared-bindings/synthio/__init__.h @@ -0,0 +1,34 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Artyom Skrobov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_SYNTHIO___INIT___H +#define MICROPY_INCLUDED_SHARED_BINDINGS_SYNTHIO___INIT___H + +#include "py/obj.h" + +// Nothing now. + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_SYNTHIO___INIT___H diff --git a/shared-module/synthio/MidiTrack.c b/shared-module/synthio/MidiTrack.c new file mode 100644 index 0000000000..0827945ab5 --- /dev/null +++ b/shared-module/synthio/MidiTrack.c @@ -0,0 +1,212 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Artyom Skrobov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/runtime.h" +#include "shared-bindings/synthio/MidiTrack.h" + +#define LOUDNESS 0x4000 // 0.5 +#define BITS_PER_SAMPLE 16 +#define BYTES_PER_SAMPLE (BITS_PER_SAMPLE / 8) +#define SILENCE 0x80 + +STATIC uint8_t parse_note(const uint8_t *buffer, uint32_t len, uint32_t *pos) { + if (*pos + 1 >= len) { + mp_raise_ValueError_varg(translate("Error in MIDI stream at position %d"), *pos); + } + uint8_t note = buffer[(*pos)++]; + if (note > 127 || buffer[(*pos)++] > 127) { + mp_raise_ValueError_varg(translate("Error in MIDI stream at position %d"), *pos); + } + return note; +} + +STATIC void terminate_span(synthio_miditrack_obj_t *self, uint16_t *dur, uint16_t *max_dur) { + if (*dur) { + self->track[self->total_spans - 1].dur = *dur; + if (*dur > *max_dur) { + *max_dur = *dur; + } + *dur = 0; + } else { + self->total_spans--; + } +} + +STATIC void add_span(synthio_miditrack_obj_t *self, uint8_t note1, uint8_t note2) { + synthio_midi_span_t span = { 0, {note1, note2} }; + self->track = m_realloc(self->track, + (self->total_spans + 1) * sizeof(synthio_midi_span_t)); + self->track[self->total_spans++] = span; +} + +void common_hal_synthio_miditrack_construct(synthio_miditrack_obj_t *self, + const uint8_t *buffer, uint32_t len, uint32_t tempo, uint32_t sample_rate) { + + synthio_midi_span_t initial = { 0, {SILENCE, SILENCE} }; + self->sample_rate = sample_rate; + self->track = m_malloc(sizeof(synthio_midi_span_t), false); + self->next_span = 0; + self->total_spans = 1; + *self->track = initial; + + uint16_t dur = 0, max_dur = 0; + uint32_t pos = 0; + while (pos < len) { + uint8_t c; + uint32_t delta = 0; + do { + c = buffer[pos++]; + delta <<= 7; + delta |= c & 0x7f; + } while ((c & 0x80) && (pos < len)); + + if (c & 0x80) { + mp_raise_ValueError_varg(translate("Error in MIDI stream at position %d"), pos); + } + + dur += delta * sample_rate / tempo; + + switch (buffer[pos++] >> 4) { + case 8: { // Note Off + uint8_t note = parse_note(buffer, len, &pos); + + // Ignore if not a note which is playing + synthio_midi_span_t last_span = self->track[self->total_spans - 1]; + if (last_span.note[0] == note || last_span.note[1] == note) { + terminate_span(self, &dur, &max_dur); + if (last_span.note[0] == note) { + add_span(self, last_span.note[1], SILENCE); + } else { + add_span(self, last_span.note[0], SILENCE); + } + } + break; + } + case 9: { // Note On + uint8_t note = parse_note(buffer, len, &pos); + + // Ignore if two notes are already playing + synthio_midi_span_t last_span = self->track[self->total_spans - 1]; + if (last_span.note[1] == SILENCE) { + terminate_span(self, &dur, &max_dur); + if (last_span.note[0] == SILENCE) { + add_span(self, note, SILENCE); + } else { + add_span(self, last_span.note[0], note); + } + } + break; + } + case 10: + case 11: + case 14: // two data bytes to ignore + parse_note(buffer, len, &pos); + break; + case 12: + case 13: // one data byte to ignore + if (pos >= len || buffer[pos++] > 127) { + mp_raise_ValueError_varg(translate("Error in MIDI stream at position %d"), pos); + } + break; + case 15: // the full syntax is too complicated, just assume it's "End of Track" event + pos = len; + break; + default: // invalid event + mp_raise_ValueError_varg(translate("Error in MIDI stream at position %d"), pos); + } + } + terminate_span(self, &dur, &max_dur); + + self->buffer_length = max_dur * BYTES_PER_SAMPLE; + self->buffer = m_malloc(self->buffer_length, false); +} + +void common_hal_synthio_miditrack_deinit(synthio_miditrack_obj_t *self) { + m_free(self->buffer); + self->buffer = NULL; + m_free(self->track); + self->track = NULL; +} +bool common_hal_synthio_miditrack_deinited(synthio_miditrack_obj_t *self) { + return self->buffer == NULL; +} + +uint32_t common_hal_synthio_miditrack_get_sample_rate(synthio_miditrack_obj_t *self) { + return self->sample_rate; +} +uint8_t common_hal_synthio_miditrack_get_bits_per_sample(synthio_miditrack_obj_t *self) { + return BITS_PER_SAMPLE; +} +uint8_t common_hal_synthio_miditrack_get_channel_count(synthio_miditrack_obj_t *self) { + return 1; +} + +void synthio_miditrack_reset_buffer(synthio_miditrack_obj_t *self, + bool single_channel, uint8_t channel) { + + self->next_span = 0; +} + +STATIC const uint16_t notes[] = {8372, 8870, 9397, 9956, 10548, 11175, 11840, + 12544, 13290, 14080, 14917, 15804}; // 9th octave + +audioio_get_buffer_result_t synthio_miditrack_get_buffer(synthio_miditrack_obj_t *self, + bool single_channel, uint8_t channel, uint8_t **buffer, uint32_t *buffer_length) { + + if (self->next_span >= self->total_spans) { + *buffer_length = 0; + return GET_BUFFER_DONE; + } + + synthio_midi_span_t span = self->track[self->next_span++]; + *buffer_length = span.dur * BYTES_PER_SAMPLE; + uint8_t octave1 = span.note[0] / 12; // 0..10 + uint8_t octave2 = span.note[1] / 12; // 0..10 + int32_t base_freq1 = notes[span.note[0] % 12]; + int32_t base_freq2 = notes[span.note[1] % 12]; + int32_t sample_rate = self->sample_rate; + + for (uint16_t i = 0; i < span.dur; i++) { + int16_t semiperiod1 = span.note[0] == SILENCE ? 0 : + ((base_freq1 * i * 2) / sample_rate) >> (10 - octave1); + int16_t semiperiod2 = span.note[1] == SILENCE ? semiperiod1 : + ((base_freq2 * i * 2) / sample_rate) >> (10 - octave2); + self->buffer[i] = ((semiperiod1 % 2 + semiperiod2 % 2) - 1) * LOUDNESS; + } + *buffer = (uint8_t *)self->buffer; + + return self->next_span >= self->total_spans ? + GET_BUFFER_DONE : GET_BUFFER_MORE_DATA; +} + +void synthio_miditrack_get_buffer_structure(synthio_miditrack_obj_t *self, bool single_channel, + bool *single_buffer, bool *samples_signed, uint32_t *max_buffer_length, uint8_t *spacing) { + + *single_buffer = true; + *samples_signed = true; + *max_buffer_length = self->buffer_length; + *spacing = 1; +} diff --git a/shared-module/synthio/MidiTrack.h b/shared-module/synthio/MidiTrack.h new file mode 100644 index 0000000000..bd058daaee --- /dev/null +++ b/shared-module/synthio/MidiTrack.h @@ -0,0 +1,65 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Artyom Skrobov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_MODULE_SYNTHIO_MIDITRACK_H +#define MICROPY_INCLUDED_SHARED_MODULE_SYNTHIO_MIDITRACK_H + +#include "py/obj.h" + +#include "shared-module/synthio/__init__.h" + +typedef struct { + uint16_t dur; + uint8_t note[2]; +} synthio_midi_span_t; + +typedef struct { + mp_obj_base_t base; + uint32_t sample_rate; + uint16_t *buffer; + uint16_t buffer_length; + synthio_midi_span_t *track; + uint16_t next_span; + uint16_t total_spans; +} synthio_miditrack_obj_t; + + +// These are not available from Python because it may be called in an interrupt. +void synthio_miditrack_reset_buffer(synthio_miditrack_obj_t *self, + bool single_channel, + uint8_t channel); + +audioio_get_buffer_result_t synthio_miditrack_get_buffer(synthio_miditrack_obj_t *self, + bool single_channel, + uint8_t channel, + uint8_t **buffer, + uint32_t *buffer_length); // length in bytes + +void synthio_miditrack_get_buffer_structure(synthio_miditrack_obj_t *self, bool single_channel, + bool *single_buffer, bool *samples_signed, + uint32_t *max_buffer_length, uint8_t *spacing); + +#endif // MICROPY_INCLUDED_SHARED_MODULE_SYNTHIO_MIDITRACK_H diff --git a/shared-module/synthio/__init__.c b/shared-module/synthio/__init__.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/shared-module/synthio/__init__.h b/shared-module/synthio/__init__.h new file mode 100644 index 0000000000..d9d98a5341 --- /dev/null +++ b/shared-module/synthio/__init__.h @@ -0,0 +1,32 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Artyom Skrobov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_MODULE_SYNTHIO__INIT__H +#define MICROPY_INCLUDED_SHARED_MODULE_SYNTHIO__INIT__H + +#include "shared-module/audiocore/__init__.h" + +#endif // MICROPY_INCLUDED_SHARED_MODULE_SYNTHIO__INIT__H diff --git a/tests/circuitpython-manual/audiocore/single-track.midi b/tests/circuitpython-manual/audiocore/single-track.midi new file mode 100755 index 0000000000000000000000000000000000000000..3b3dcea8221ff6e7592c835a25e6ea2789e04324 GIT binary patch literal 5123 zcmZ{oeM=)*7RGBs2q8$2UTH)mh=_zBStn$Ioy6i=9m=inm7xmCuwL*W)_Xqm?Vp?j?>7TXW`@!`JD47&S^C}TeQ+M zGs;e{8aO7|+0{qR>1Jl8Ej&kAf6_?%D9qvu=d_gd@aV~7u?p1&a)7}x2IpBs=!noE zAwzd=a~@>l#br7+N7--^r9;!nqR9jDE$kxfIFour>ci=u4QJ3>oDj&6S{{giAqHl0 zK%g4{8aO0bxY$8{PfY?$H>jaW4KdBwqoxnp*>88MX)80Nq!eFjnm(zffcE8~CMS51 z`>+pWpHOWK283z>Jwoo=8cjmZU20lVQ;nSSnrND{yUOjRyPWT`cUM6+{Pg@lU7P7U z^EK<(^R#1*vlDxqo{&-3w$d&EdbUo@v+UIRn!EN8`JD6bB=$24txv3L50Kw*wj^rN z`^3Apfjr@ymT`C_P(+{(ff@u#2-L(NCQyEh0G?9mn&TS;_iK^rILtVwRYH9N`uPzH z3v?Iga1GkW?vY!M+)fFpk?Pt#5SUGy{$J>~KrgZA;t}HEW8$%m-~*vf2xSP>q>31W zRl6F5Qn_vH2J4Pn2=2(*U&N}s&^{4~8~?=ycs^=lQvHh6FIA7WVpriDXZYO{yW*=Q0-Hfw(@&~dlZ0@ru`YHMe z*E`{Qr%s<9p{%0l0Coq^Zgx)Z>EyH`vBtA4O*^6ORx(gC+V>o=pq85s{Zft-WNq z%Ium9uF2raeoL=R1-k?6Zm@$w?H4c#RJ?(_jeLL|Eg7PW8HX!#k3q$?B(hp@Z?gey z7`Pq=*$9AKkr>}UIv95showk0at#7g! zp=WMjf^1HQ=I9fUuX%je6u+Pua|UZ+>gW>A0lu<@NXA_h-}qf2#V#p^dDtfbk=`acrFfJBZsJ=* z7n7P#aUtSf07jiCT5BopbDlXvrAdl=q_~CQCJG_aH4pOuf(k66)JG9F+2bZxoFuLZ zxk=AS+YrG3!f3zT_==NsIUSp78VeZD;Gl0%PX(Y6oYZop1^H^zmQWmnWI+nxqysqV z#u>0!Dj4jd&}RQeDnjs|1U?nfqd2JsK-1Yp%u2+Kh5&^CDU}|VHRe`(Zb(D-K86Gw z5-{RZBw{&<vq8hFu-K=x~)m3;D>spE30&WScO8%J`c8j7`Fb)sf#J-^DIM z*Krw(sK&e^Dn_<}zJO1Jy~r_*Q9Qrp*GGPAlgR^_Y=Q6@>o;UlBa@{=8r!dUZ=h?U zi;=-dVrp@Mn0f5_Q4%o&(npqVxaN#`c*^^=A5HoZb52Ei6+)QYyNPE^h;M|bU~qu0 zip|IYyf$P9{XHrC%nKS(&<1vgIr#=K@f|j0NO%i73uXb^pZpeMZ=&1f9AhW47MuUM zfpHOK0cG-1&e({N%NSV_Dx-TtQo23e#Oj9n$orgKPu`G;)@hK>NP#vy0#a2^_BqJF z&x4wF4vk-$&-7$NJ$Z{#ZSUtPc((Q7D}>oW*TQC>aK7s?0Eto0ipXrvJ1u%rbeZ^t zq@MU4tR7q$^-i^0d^RY%CjbBK39k*s77oUN&zQa$j-H3B1lz%>LNKwWUj<6S^YLTO zN@dC~tm(P=g^N}~VcZR(u7iW06RvpvNSnp;a6F29o^NuPQm{ww7xd zJ!@1{yZZ0|f`73yp3{uyGU(s-wF~INfsJU*O3uJu(7X5WSOTfP4&?LFMSxR@qD{Bj2L221 zl>`rY@N-w1c9-8to*mBNZk{LNf*3!ZQMYZm8Rxi91r)KSJy9IWBgXI&Y-5tVLn_FvQD zVL12z<4u&B`6B|Z_L7J$B8e(x)mSJr=G)69$A0R$ngj+m!UEX+|HMi zWc0a(KIU`$-%_0df$a9AYM1b}^e(=S%pU&>=Rn$ z^=-#rWB%at`>~em^>>%{s#d)cR;7x!!WVySBkSh=O@0Sp#MnOTkna8aZ^3^606o9) literal 0 HcmV?d00001 From 583fc76cf590afd89bd6538e64b85fda23213a16 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 26 Mar 2021 15:38:20 -0500 Subject: [PATCH 148/261] run uncrustify --- shared-bindings/bitbangio/SPI.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/bitbangio/SPI.c b/shared-bindings/bitbangio/SPI.c index 1caa658df8..0f8cb59a60 100644 --- a/shared-bindings/bitbangio/SPI.c +++ b/shared-bindings/bitbangio/SPI.c @@ -260,7 +260,7 @@ STATIC mp_obj_t bitbangio_spi_readinto(size_t n_args, const mp_obj_t *pos_args, return mp_const_none; } - bool ok = shared_module_bitbangio_spi_read(self, ((uint8_t*)bufinfo.buf) + start, length, args[ARG_write_value].u_int); + bool ok = shared_module_bitbangio_spi_read(self, ((uint8_t *)bufinfo.buf) + start, length, args[ARG_write_value].u_int); if (!ok) { mp_raise_OSError(MP_EIO); } From 03340a3fcd52cd5efb3c6060269818bbc94dc17b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 26 Mar 2021 18:55:45 -0400 Subject: [PATCH 149/261] Incorporate https://github.com/adafruit/pico-sdk/pull/2 --- ports/raspberrypi/sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/sdk b/ports/raspberrypi/sdk index 9323b67fce..f998690e65 160000 --- a/ports/raspberrypi/sdk +++ b/ports/raspberrypi/sdk @@ -1 +1 @@ -Subproject commit 9323b67fce48119b0080854d48abc6b1425e327e +Subproject commit f998690e65c5df740ef71cd167733dc8c6a11bdd From b04f9130c7eb1d41bf27556f58860bba63dd4bc5 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 27 Mar 2021 12:04:23 -0500 Subject: [PATCH 150/261] RGBMatrix: fix memoryview(matrix) Typical test: ```python import displayio import rgbmatrix import board displayio.release_displays() matrix = rgbmatrix.RGBMatrix( width=128, bit_depth=4, rgb_pins=[board.GP0, board.GP1, board.GP2, board.GP3, board.GP4, board.GP5], addr_pins=[board.GP6, board.GP7, board.GP8, board.GP9], clock_pin=board.GP10, latch_pin=board.GP11, output_enable_pin=board.GP12) mem = memoryview(matrix) mem[0] = 65535 # OK mem[0] = 65536 # errors (out of range) ``` --- shared-bindings/rgbmatrix/RGBMatrix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c index 045cc82b8f..0188fa0b60 100644 --- a/shared-bindings/rgbmatrix/RGBMatrix.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -441,6 +441,7 @@ STATIC mp_int_t rgbmatrix_rgbmatrix_get_buffer(mp_obj_t self_in, mp_buffer_info_ return 1; } *bufinfo = self->bufinfo; + bufinfo->typecode = 'H'; return 0; } From 00178ca5e056accc81a5a059cd8d4cb7329d8a7e Mon Sep 17 00:00:00 2001 From: Lucian Copeland Date: Sat, 27 Mar 2021 14:08:44 -0400 Subject: [PATCH 151/261] Sleep API changes, redundancy fix --- main.c | 33 ++++++++--------- ports/esp32s2/common-hal/alarm/__init__.c | 10 ++--- ports/esp32s2/common-hal/alarm/pin/__init__.c | 37 ------------------- shared-bindings/alarm/__init__.c | 11 ++++-- shared-bindings/alarm/__init__.h | 13 +++---- 5 files changed, 34 insertions(+), 70 deletions(-) delete mode 100644 ports/esp32s2/common-hal/alarm/pin/__init__.c diff --git a/main.c b/main.c index 7df6e293aa..1e828a1aa7 100755 --- a/main.c +++ b/main.c @@ -161,7 +161,7 @@ STATIC void start_mp(supervisor_allocation* heap) { #if CIRCUITPY_ALARM // Record which alarm woke us up, if any. An object may be created so the heap must be functional. - alarm_save_wake_alarm(); + shared_alarm_save_wake_alarm(); // Reset alarm module only after we retrieved the wakeup alarm. alarm_reset(); #endif @@ -305,8 +305,6 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { } #endif - // TODO: on deep sleep, make sure display is refreshed before sleeping (for e-ink). - cleanup_after_vm(heap); if (result.return_code & PYEXEC_FORCED_EXIT) { @@ -329,12 +327,12 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { rgb_status_animation_t animation; prep_rgb_status_animation(&result, found_main, safe_mode, &animation); - bool asleep = false; + bool fake_sleeping = false; while (true) { RUN_BACKGROUND_TASKS; if (reload_requested) { #if CIRCUITPY_ALARM - if (asleep) { + if (fake_sleeping) { board_init(); } #endif @@ -345,7 +343,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { if (serial_connected() && serial_bytes_available()) { #if CIRCUITPY_ALARM - if (asleep) { + if (fake_sleeping) { board_init(); } #endif @@ -361,7 +359,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { // an alarm alerts faster than our USB delay or if we pretended to deep // sleep. #if CIRCUITPY_ALARM - if (asleep && alarm_woken_from_sleep()) { + if (fake_sleeping && common_hal_alarm_woken_from_sleep()) { serial_write_compressed(translate("Woken up by alarm.\n")); board_init(); supervisor_set_run_reason(RUN_REASON_STARTUP); @@ -400,20 +398,15 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { if (result.return_code & PYEXEC_DEEP_SLEEP) { // Make sure we have been awake long enough for USB to connect (enumeration delay). int64_t connecting_delay_ticks = CIRCUITPY_USB_CONNECTED_SLEEP_DELAY * 1024 - port_get_raw_ticks(NULL); - if (connecting_delay_ticks > 0) { - // Set when we've waited long enough so that we wake up from the - // port_idle_until_interrupt below and loop around to the real deep - // sleep in the else clause. - port_interrupt_after_ticks(connecting_delay_ticks); - // Deep sleep if we're not connected to a host. - } else if (!asleep) { - asleep = true; + // Until it's safe to decide whether we're real/fake sleeping, just run the RGB + if (connecting_delay_ticks < 0 && !fake_sleeping) { + fake_sleeping = true; new_status_color(BLACK); board_deinit(); if (!supervisor_workflow_active()) { // Enter true deep sleep. When we wake up we'll be back at the // top of main(), not in this loop. - alarm_enter_deep_sleep(); + common_hal_alarm_enter_deep_sleep(); // Does not return. } else { serial_write_compressed(translate("Pretending to deep sleep until alarm, CTRL-C or file write.\n")); @@ -422,7 +415,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { } #endif - if (!asleep) { + if (!fake_sleeping) { tick_rgb_status_animation(&animation); } else { // This waits until a pretend deep sleep alarm occurs. They are set @@ -430,7 +423,11 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { // it may also return due to another interrupt, that's why we check // for deep sleep alarms above. If it wasn't a deep sleep alarm, // then we'll idle here again. - port_idle_until_interrupt(); + #if CIRCUITPY_ALARM + common_hal_alarm_pretending_deep_sleep(); + #else + port_idle_until_interrupt(); + #endif } } } diff --git a/ports/esp32s2/common-hal/alarm/__init__.c b/ports/esp32s2/common-hal/alarm/__init__.c index be435e2104..63a19ab948 100644 --- a/ports/esp32s2/common-hal/alarm/__init__.c +++ b/ports/esp32s2/common-hal/alarm/__init__.c @@ -75,7 +75,7 @@ STATIC esp_sleep_wakeup_cause_t _get_wakeup_cause(void) { return esp_sleep_get_wakeup_cause(); } -bool alarm_woken_from_sleep(void) { +bool common_hal_alarm_woken_from_sleep(void) { return _get_wakeup_cause() != ESP_SLEEP_WAKEUP_UNDEFINED; } @@ -120,8 +120,8 @@ STATIC void _idle_until_alarm(void) { while (!mp_hal_is_interrupted()) { RUN_BACKGROUND_TASKS; // Allow ctrl-C interrupt. - if (alarm_woken_from_sleep()) { - alarm_save_wake_alarm(); + if (common_hal_alarm_woken_from_sleep()) { + shared_alarm_save_wake_alarm(); return; } port_idle_until_interrupt(); @@ -147,7 +147,7 @@ void common_hal_alarm_set_deep_sleep_alarms(size_t n_alarms, const mp_obj_t *ala _setup_sleep_alarms(true, n_alarms, alarms); } -void NORETURN alarm_enter_deep_sleep(void) { +void NORETURN common_hal_alarm_enter_deep_sleep(void) { alarm_pin_pinalarm_prepare_for_deep_sleep(); alarm_touch_touchalarm_prepare_for_deep_sleep(); @@ -164,5 +164,5 @@ void NORETURN alarm_enter_deep_sleep(void) { } void common_hal_alarm_gc_collect(void) { - gc_collect_ptr(alarm_get_wake_alarm()); + gc_collect_ptr(shared_alarm_get_wake_alarm()); } diff --git a/ports/esp32s2/common-hal/alarm/pin/__init__.c b/ports/esp32s2/common-hal/alarm/pin/__init__.c deleted file mode 100644 index ca8cfac7f7..0000000000 --- a/ports/esp32s2/common-hal/alarm/pin/__init__.c +++ /dev/null @@ -1,37 +0,0 @@ -#include "shared-bindings/alarm_io/__init__.h" - -#include "esp_sleep.h" -#include "driver/rtc_io.h" - -mp_obj_t common_hal_alarm_io_pin_state(alarm_io_obj_t *self_in) { - if (!rtc_gpio_is_valid_gpio(self_in->gpio)) { - mp_raise_ValueError(translate("io must be rtc io")); - } - - if (self_in->pull && !self_in->level) { - for (uint8_t i = 0; i <= 4; i += 2) { - if (self_in->gpio == i) { - mp_raise_ValueError(translate("IOs 0, 2 & 4 do not support internal pullup in sleep")); - } - } - } - - switch (esp_sleep_enable_ext0_wakeup(self_in->gpio, self_in->level)) { - case ESP_ERR_INVALID_ARG: - mp_raise_ValueError(translate("trigger level must be 0 or 1")); - case ESP_ERR_INVALID_STATE: - mp_raise_RuntimeError(translate("wakeup conflict")); - default: - break; - } - - if (self_in->pull) { - (self_in->level) ? rtc_gpio_pulldown_en(self_in->gpio) : rtc_gpio_pullup_en(self_in->gpio); - } - - return self_in; -} - -void common_hal_alarm_io_disable(void) { - esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_EXT0 | ESP_SLEEP_WAKEUP_EXT1); -} diff --git a/shared-bindings/alarm/__init__.c b/shared-bindings/alarm/__init__.c index a7af63f02f..11b96ff240 100644 --- a/shared-bindings/alarm/__init__.c +++ b/shared-bindings/alarm/__init__.c @@ -92,7 +92,7 @@ void validate_objs_are_alarms(size_t n_args, const mp_obj_t *objs) { //| This allows the user to interrupt an existing program with ctrl-C, //| and to edit the files in CIRCUITPY, which would not be possible in true light sleep. //| Thus, to use light sleep and save significant power, -// it may be necessary to disconnect from the host. +//| it may be necessary to disconnect from the host. //| """ //| ... //| @@ -217,7 +217,7 @@ STATIC mp_map_elem_t alarm_module_globals_table[] = { STATIC MP_DEFINE_MUTABLE_DICT(alarm_module_globals, alarm_module_globals_table); // Fetch value from module dict. -mp_obj_t alarm_get_wake_alarm(void) { +mp_obj_t shared_alarm_get_wake_alarm(void) { mp_map_elem_t *elem = mp_map_lookup(&alarm_module_globals.map, MP_ROM_QSTR(MP_QSTR_wake_alarm), MP_MAP_LOOKUP); if (elem) { @@ -228,7 +228,7 @@ mp_obj_t alarm_get_wake_alarm(void) { } // Initialize .wake_alarm value. -void alarm_save_wake_alarm(void) { +void shared_alarm_save_wake_alarm(void) { // Equivalent of: // alarm.wake_alarm = alarm mp_map_elem_t *elem = @@ -242,3 +242,8 @@ const mp_obj_module_t alarm_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&alarm_module_globals, }; + +extern void port_idle_until_interrupt(void); +MP_WEAK void common_hal_alarm_pretending_deep_sleep(void) { + port_idle_until_interrupt(); +} diff --git a/shared-bindings/alarm/__init__.h b/shared-bindings/alarm/__init__.h index 154f91e265..9c85b2e212 100644 --- a/shared-bindings/alarm/__init__.h +++ b/shared-bindings/alarm/__init__.h @@ -40,21 +40,20 @@ extern mp_obj_t common_hal_alarm_light_sleep_until_alarms(size_t n_alarms, const // call alarm_woken_from_sleep to see if we've been woken by an alarm and if so, // it will exit idle as if deep sleep was exited. extern void common_hal_alarm_set_deep_sleep_alarms(size_t n_alarms, const mp_obj_t *alarms); -// Deep sleep is entered outside of the VM so we omit the `common_hal_` prefix. -extern NORETURN void alarm_enter_deep_sleep(void); + +extern NORETURN void common_hal_alarm_enter_deep_sleep(void); +extern void common_hal_alarm_pretending_deep_sleep(void); // Fetches value from module dict. -extern mp_obj_t alarm_get_wake_alarm(void); +extern mp_obj_t shared_alarm_get_wake_alarm(void); extern void common_hal_alarm_gc_collect(void); extern mp_obj_t common_hal_alarm_get_wake_alarm(void); // Used by wake-up code. -void alarm_save_wake_alarm(void); - +void shared_alarm_save_wake_alarm(void); // True if an alarm is alerting. This is most useful for pretend deep sleep. -extern bool alarm_woken_from_sleep(void); - +extern bool common_hal_alarm_woken_from_sleep(void); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_ALARM___INIT___H From dfac6d9f620818d1f433ef4a71cac2bc5cee6b0e Mon Sep 17 00:00:00 2001 From: hexthat Date: Sun, 28 Mar 2021 07:43:18 +0000 Subject: [PATCH 152/261] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (970 of 970 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 9e18ff3edc..5c39884785 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-16 00:47+0000\n" +"PO-Revision-Date: 2021-03-29 08:26+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.5.2-dev\n" +"X-Generator: Weblate 4.6-dev\n" #: main.c msgid "" @@ -350,7 +350,7 @@ msgstr "Suǒyǒu UART wàiwéi zhèngzài shǐyòng" #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" -msgstr "" +msgstr "suǒ yǒu shǐ yòng de tōng dào" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" @@ -2882,7 +2882,7 @@ msgstr "chā yì shùn xù fàn wéi" #: extmod/ulab/code/linalg/linalg.c msgid "dimensions do not match" -msgstr "" +msgstr "chǐ cùn bù pǐ pèi" #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c @@ -3245,7 +3245,7 @@ msgstr "wúxiào de cānshù" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" -msgstr "" +msgstr "wú xiào bits_per_pixel %d, bì xū shì, 1, 4, 8, 16, 24, huò 32" #: extmod/modussl_axtls.c msgid "invalid cert" @@ -3258,12 +3258,12 @@ msgstr "dupterm suǒyǐn wúxiào" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element size %d for bits_per_pixel %d\n" -msgstr "" +msgstr "wú xiào yuán jiàn dà xiǎo %d wéi bits_per_pixel %d\n" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element_size %d, must be, 1, 2, or 4" -msgstr "" +msgstr "wú xiào element_size %d, bì xū shì, 1, 2, huò 4" #: extmod/modframebuf.c msgid "invalid format" From f143e5d04946ab1bf0d8616e773885ac486674c2 Mon Sep 17 00:00:00 2001 From: Neradoc Date: Mon, 29 Mar 2021 10:54:11 +0200 Subject: [PATCH 153/261] fix list of modules for alias boards --- tools/build_board_info.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 0e62c1de77..c139a5fc50 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -109,7 +109,7 @@ def get_languages(list_all = False): languages.add(f.name[:-3]) if not list_all: languages = languages & language_allow_list - return sorted(list(languages), key = lambda s: s.casefold()) + return sorted(list(languages), key=str.casefold) def get_board_mapping(): @@ -301,6 +301,7 @@ def generate_download_info(): board_files = os.listdir(board_path.path) board_id = board_path.name board_info = board_mapping[board_id] + board_modules = support_matrix.get(board_id, "[]") for alias in [board_id] + board_info["aliases"]: alias_info = board_mapping[alias] @@ -311,7 +312,7 @@ def generate_download_info(): new_version = { "stable": new_stable, "version": new_tag, - "modules": support_matrix.get(alias, "[]"), + "modules": board_modules, "languages": languages, "extensions": board_info["extensions"], } From 38072a139e6b02c394502efe13d827e8d35d947b Mon Sep 17 00:00:00 2001 From: Neradoc Date: Mon, 29 Mar 2021 19:03:35 +0200 Subject: [PATCH 154/261] no default value for support_matrix[board_id] will raise an error during build if things as not as expected as suggested by @jepler --- tools/build_board_info.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index c139a5fc50..037bf5e141 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -301,7 +301,6 @@ def generate_download_info(): board_files = os.listdir(board_path.path) board_id = board_path.name board_info = board_mapping[board_id] - board_modules = support_matrix.get(board_id, "[]") for alias in [board_id] + board_info["aliases"]: alias_info = board_mapping[alias] @@ -312,7 +311,7 @@ def generate_download_info(): new_version = { "stable": new_stable, "version": new_tag, - "modules": board_modules, + "modules": support_matrix[board_id], "languages": languages, "extensions": board_info["extensions"], } From 8e0834d74c10d9f047f65a4c5e1b56e4b82c0bbc Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 29 Mar 2021 14:40:13 -0400 Subject: [PATCH 155/261] Calculate RP2040 SDA hold time --- ports/raspberrypi/sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/sdk b/ports/raspberrypi/sdk index f998690e65..7a6660134a 160000 --- a/ports/raspberrypi/sdk +++ b/ports/raspberrypi/sdk @@ -1 +1 @@ -Subproject commit f998690e65c5df740ef71cd167733dc8c6a11bdd +Subproject commit 7a6660134ac6242e3223fe1c78b248caf6b2cbf4 From 65759622eab8b4848e216af39182dba7ce72e229 Mon Sep 17 00:00:00 2001 From: James Carr Date: Mon, 29 Mar 2021 23:03:14 +0100 Subject: [PATCH 156/261] Add a missing parameter to an error message (Fixes #4505) --- shared-bindings/time/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/time/__init__.c b/shared-bindings/time/__init__.c index 0fb12c9b85..87f766db26 100644 --- a/shared-bindings/time/__init__.c +++ b/shared-bindings/time/__init__.c @@ -279,7 +279,7 @@ STATIC mp_obj_t time_mktime(mp_obj_t t) { mp_obj_tuple_get(t, &len, &elem); if (len != 9) { - mp_raise_TypeError_varg(translate("function takes %d positional arguments but %d were given"), 9); + mp_raise_TypeError_varg(translate("function takes %d positional arguments but %d were given"), 9, len); } if (mp_obj_get_int(elem[0]) < 2000) { From 1bb5bed80f39806d5543eff9b4a0b77dbd882b93 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 29 Mar 2021 21:30:13 -0500 Subject: [PATCH 157/261] Remove sentence about a link that fixes a problem Multiple times it has occurred that people left this line in a PR by mistake. it makes it look like they failed to include some useful information, but really is just a misunderstanding. Delete the text to reduce the chance of misunderstanding. --- .github/ISSUE_TEMPLATE/bug_report.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 22365d0f41..65f61ebb5f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -52,5 +52,3 @@ TimeoutError: Clock stretch too long - -Removing [this](url) line resolves the issue. From 71eee45a3779559686c5d07d9864aad679121ab6 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 30 Mar 2021 10:11:12 -0500 Subject: [PATCH 158/261] mimxrt1011: UART: Add additional error checking .. and make the 'invalid pin' messages standard. Closes #4502 --- ports/mimxrt10xx/common-hal/busio/UART.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ports/mimxrt10xx/common-hal/busio/UART.c b/ports/mimxrt10xx/common-hal/busio/UART.c index 29f9ea0b27..552844f32b 100644 --- a/ports/mimxrt10xx/common-hal/busio/UART.c +++ b/ports/mimxrt10xx/common-hal/busio/UART.c @@ -153,6 +153,13 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, mp_raise_ValueError(translate("Supply at least one UART pin")); } + if (rx && !self->rx) { + mp_raise_ValueError_varg(translate("Invalid %q pin"), MP_QSTR_RX); + } + if (tx && !self->tx) { + mp_raise_ValueError_varg(translate("Invalid %q pin"), MP_QSTR_TX); + } + if (uart_taken) { mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } @@ -188,7 +195,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, } } if (self->rts == NULL) { - mp_raise_ValueError(translate("Selected RTS pin not valid")); + mp_raise_ValueError_varg(translate("Invalid %q pin"), MP_QSTR_RTS); } } @@ -202,16 +209,19 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, } } if (self->cts == NULL) { - mp_raise_ValueError(translate("Selected CTS pin not valid")); + mp_raise_ValueError_varg(translate("Invalid %q pin"), MP_QSTR_CTS); } } if (self->rx) { self->uart = mcu_uart_banks[self->rx->bank_idx - 1]; } else { + assert(self->rx); self->uart = mcu_uart_banks[self->tx->bank_idx - 1]; } + assert(self->uart); + if (self->rx) { config_periph_pin(self->rx); } From c9f2591d7cf79e82febc7fa59d01e26e8bfec630 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 31 Mar 2021 09:48:33 -0400 Subject: [PATCH 159/261] Turn off remote wakeup in USB configuration descriptor --- tools/gen_usb_descriptor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/gen_usb_descriptor.py b/tools/gen_usb_descriptor.py index 89bb8a8177..9c4efaca3d 100644 --- a/tools/gen_usb_descriptor.py +++ b/tools/gen_usb_descriptor.py @@ -612,6 +612,11 @@ configuration = standard.ConfigurationDescriptor( standard.ConfigurationDescriptor.bLength + sum([len(bytes(x)) for x in descriptor_list]) ), bNumInterfaces=len(interfaces), + # bus powered (bit 6), remote wakeup (bit 5), + # bit 7 is always 1 and 0-4 are always 0 + # Turn off remote wakeup until we handle it in CircuitPython. + bmAttributes=0x80, + ) descriptor_list.insert(0, configuration) From cb29ad0846c8da2d25c157a4b1d3cf9affd89e44 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 31 Mar 2021 09:21:06 -0500 Subject: [PATCH 160/261] mimxrt10xx: Fix bogus assertion. .. as noted by @d-c-d --- ports/mimxrt10xx/common-hal/busio/UART.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mimxrt10xx/common-hal/busio/UART.c b/ports/mimxrt10xx/common-hal/busio/UART.c index 552844f32b..ec0296156a 100644 --- a/ports/mimxrt10xx/common-hal/busio/UART.c +++ b/ports/mimxrt10xx/common-hal/busio/UART.c @@ -216,7 +216,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, if (self->rx) { self->uart = mcu_uart_banks[self->rx->bank_idx - 1]; } else { - assert(self->rx); + assert(self->tx); self->uart = mcu_uart_banks[self->tx->bank_idx - 1]; } From cce8b2be07b5640026d7ef06d1421c217fe6a5d4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 31 Mar 2021 09:40:26 -0500 Subject: [PATCH 161/261] raspberypi: Allow mpconfigboard to override additional items This allows more options to be overridden to 0 in an mpconfigboard.mk. Improved: * FRAMEBUFFERIO, FULL_BUILD, BITOPS, PWMIO, RGBMATRIX, OTARYIO, PULSEIO, WATCHDOG Still problematic (pull requests welcome): * RP2PIO & NEOPIXEL_WRITE, possibly only if a status neopixel is defined * BITBANGIO, possibly only if BUSIO is enabled * RTC Incidentally, with RP2PIO & NEOPIXEL_WRITE, BITBANGIO, and RTC re-enabled I get ``` 323956 bytes used, 720524 bytes free in flash firmware space out of 1044480 bytes (1020.0kB). 12072 bytes used, 250072 bytes free in ram for stack and heap out of 262144 bytes (256.0kB). ``` Closes #4515 --- ports/raspberrypi/mpconfigport.mk | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index 395948a514..ddbd0ec63b 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -17,19 +17,15 @@ endif # All raspberrypi ports have longints. LONGINT_IMPL = MPZ -ifndef CIRCUITPY_RP2PIO -CIRCUITPY_RP2PIO = 1 -else -CIRCUITPY_NEOPIXEL_WRITE = 0 -endif - -CIRCUITPY_FRAMEBUFFERIO = 1 -CIRCUITPY_FULL_BUILD = 1 +CIRCUITPY_RP2PIO ?= 1 +CIRCUITPY_NEOPIXEL_WRITE ?= $(CIRCUITPY_RP2PIO) +CIRCUITPY_FRAMEBUFFERIO ?= 1 +CIRCUITPY_FULL_BUILD ?= 1 CIRCUITPY_AUDIOMP3 ?= 1 -CIRCUITPY_BITOPS = 1 -CIRCUITPY_PWMIO = 1 -CIRCUITPY_RGBMATRIX = 1 -CIRCUITPY_ROTARYIO = 1 +CIRCUITPY_BITOPS ?= 1 +CIRCUITPY_PWMIO ?= 1 +CIRCUITPY_RGBMATRIX ?= 1 +CIRCUITPY_ROTARYIO ?= 1 # Things that need to be implemented. # Use PWM interally @@ -37,8 +33,8 @@ CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NVM = 1 # Use PIO interally -CIRCUITPY_PULSEIO = 1 -CIRCUITPY_WATCHDOG = 1 +CIRCUITPY_PULSEIO ?= 1 +CIRCUITPY_WATCHDOG ?= 1 # Audio via PWM CIRCUITPY_AUDIOIO = 0 From c41639f30a603b3359788aa32363658f256743f7 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 31 Mar 2021 15:09:55 -0400 Subject: [PATCH 162/261] add en_GB translation to builds --- tools/build_board_info.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 037bf5e141..d89b6ac2c6 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -87,6 +87,7 @@ aliases_by_board = { language_allow_list = set([ "ID", "de_DE", + "en_GB", "en_US", "en_x_pirate", "es", From 0752bbd5fd9327538357a51d9f0f479162285ab3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 31 Mar 2021 16:04:04 -0700 Subject: [PATCH 163/261] Fix central pairing and crash on clear The list_clear would crash if we tried to clear a NULL list. (It can happen if we haven't tried to discover any services.) --- locale/circuitpython.pot | 15 ++++++--------- ports/nrf/common-hal/_bleio/Adapter.c | 6 ++++++ ports/nrf/common-hal/_bleio/Connection.c | 3 +-- ports/nrf/common-hal/_bleio/__init__.c | 3 +++ 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 9148569ecd..146c65f3e1 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1171,6 +1171,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "" @@ -1581,6 +1582,10 @@ msgstr "" msgid "Nordic Soft Device failure assertion." msgstr "" +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "" @@ -1877,7 +1882,7 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "" @@ -1952,14 +1957,6 @@ msgstr "" msgid "Scan already in progess. Stop with stop_scan." msgstr "" -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" diff --git a/ports/nrf/common-hal/_bleio/Adapter.c b/ports/nrf/common-hal/_bleio/Adapter.c index ca21222b5d..20e9a16560 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.c +++ b/ports/nrf/common-hal/_bleio/Adapter.c @@ -147,6 +147,8 @@ STATIC uint32_t ble_stack_enable(void) { ble_conf.gap_cfg.role_count_cfg.periph_role_count = BLEIO_PERIPH_ROLE_COUNT; // central_role_count costs 648 bytes for 1 to 2, then ~1250 for each further increment. ble_conf.gap_cfg.role_count_cfg.central_role_count = BLEIO_CENTRAL_ROLE_COUNT; + // The number of concurrent pairing processes. Takes 392 bytes. + ble_conf.gap_cfg.role_count_cfg.central_sec_count = BLE_GAP_ROLE_COUNT_CENTRAL_SEC_DEFAULT; err_code = sd_ble_cfg_set(BLE_GAP_CFG_ROLE_COUNT, &ble_conf, sd_ram_end); if (err_code != NRF_SUCCESS) { return err_code; @@ -283,6 +285,10 @@ STATIC bool adapter_on_ble_evt(ble_evt_t *ble_evt, void *self_in) { ble_drv_remove_event_handler(connection_on_ble_evt, connection); connection->conn_handle = BLE_CONN_HANDLE_INVALID; connection->pair_status = PAIR_NOT_PAIRED; + + #if CIRCUITPY_VERBOSE_BLE + mp_printf(&mp_plat_print, "disconnected %02x\n", ble_evt->evt.gap_evt.params.disconnected.reason); + #endif if (connection->connection_obj != mp_const_none) { bleio_connection_obj_t *obj = connection->connection_obj; obj->connection = NULL; diff --git a/ports/nrf/common-hal/_bleio/Connection.c b/ports/nrf/common-hal/_bleio/Connection.c index f57ee639a5..7e0b7a10e9 100644 --- a/ports/nrf/common-hal/_bleio/Connection.c +++ b/ports/nrf/common-hal/_bleio/Connection.c @@ -325,8 +325,7 @@ bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) { } void bleio_connection_clear(bleio_connection_internal_t *self) { - mp_obj_list_clear(MP_OBJ_FROM_PTR(self->remote_service_list)); - + self->remote_service_list = NULL; self->conn_handle = BLE_CONN_HANDLE_INVALID; self->pair_status = PAIR_NOT_PAIRED; self->is_central = false; diff --git a/ports/nrf/common-hal/_bleio/__init__.c b/ports/nrf/common-hal/_bleio/__init__.c index 7248f83150..bbd57cfbe4 100644 --- a/ports/nrf/common-hal/_bleio/__init__.c +++ b/ports/nrf/common-hal/_bleio/__init__.c @@ -46,6 +46,9 @@ void check_nrf_error(uint32_t err_code) { return; } switch (err_code) { + case NRF_ERROR_NO_MEM: + mp_raise_msg(&mp_type_MemoryError, translate("Nordic soft device out of memory")); + return; case NRF_ERROR_TIMEOUT: mp_raise_msg(&mp_type_TimeoutError, NULL); return; From f4bf8e468d824b7362814b99ec23acd25fbb0072 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 1 Apr 2021 03:24:29 +0200 Subject: [PATCH 164/261] 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 | 21 ++++++++++++--------- locale/cs.po | 15 ++++++--------- locale/de_DE.po | 21 ++++++++++++--------- locale/el.po | 15 ++++++--------- locale/en_GB.po | 21 ++++++++++++--------- locale/es.po | 21 ++++++++++++--------- locale/fil.po | 15 ++++++--------- locale/fr.po | 21 ++++++++++++--------- locale/hi.po | 15 ++++++--------- locale/it_IT.po | 15 ++++++--------- locale/ja.po | 21 ++++++++++++--------- locale/ko.po | 15 ++++++--------- locale/nl.po | 21 ++++++++++++--------- locale/pl.po | 21 ++++++++++++--------- locale/pt_BR.po | 21 ++++++++++++--------- locale/sv.po | 21 ++++++++++++--------- locale/zh_Latn_pinyin.po | 21 ++++++++++++--------- 17 files changed, 168 insertions(+), 153 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 495c1337b8..3c0b50af58 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -1192,6 +1192,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "%q pada tidak valid" @@ -1602,6 +1603,10 @@ msgstr "Penghitung waktu tidak tersedia" msgid "Nordic Soft Device failure assertion." msgstr "Pernyataan kegagalan Perangkat Lunak Nordic." +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "" @@ -1909,7 +1914,7 @@ msgstr "Baca-saja" msgid "Read-only filesystem" msgstr "sistem file (filesystem) bersifat Read-only" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c #, fuzzy msgid "Read-only object" msgstr "sistem file (filesystem) bersifat Read-only" @@ -1985,14 +1990,6 @@ msgstr "Nilai sampel terlalu tinggi. Nilai harus kurang dari %d" msgid "Scan already in progess. Stop with stop_scan." msgstr "Pindai sudah dalam proses. Hentikan dengan stop_scan." -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "Pin CTS yang dipilih tidak valid" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "Pin RTS yang dipilih tidak valid" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4289,6 +4286,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Selected CTS pin not valid" +#~ msgstr "Pin CTS yang dipilih tidak valid" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "Pin RTS yang dipilih tidak valid" + #~ msgid "Could not initialize channel" #~ msgstr "Tidak dapat menginisialisasi kanal" diff --git a/locale/cs.po b/locale/cs.po index cd9b848f4c..8db0064c93 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -1174,6 +1174,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "" @@ -1584,6 +1585,10 @@ msgstr "" msgid "Nordic Soft Device failure assertion." msgstr "" +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "" @@ -1880,7 +1885,7 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "" @@ -1955,14 +1960,6 @@ msgstr "" msgid "Scan already in progess. Stop with stop_scan." msgstr "" -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" diff --git a/locale/de_DE.po b/locale/de_DE.po index 4c1eca799a..224087f791 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -1196,6 +1196,7 @@ msgstr "Ungültiger %q" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Ungültiger %q Pin" @@ -1608,6 +1609,10 @@ msgstr "Kein Timer verfügbar" msgid "Nordic Soft Device failure assertion." msgstr "Fehlerbehauptung für Nordic Soft Device." +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "" @@ -1915,7 +1920,7 @@ msgstr "Nur lesen möglich, da Schreibgeschützt" msgid "Read-only filesystem" msgstr "Schreibgeschützte Dateisystem" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "Schreibgeschützte Objekt" @@ -1990,14 +1995,6 @@ msgstr "Abtastrate zu hoch. Wert muss unter %d liegen" msgid "Scan already in progess. Stop with stop_scan." msgstr "Scannen Sie bereits in Bearbeitung. Stoppen Sie mit stop_scan." -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "Ausgewählter CTS-Pin ungültig" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "Ausgewählter RTS-Pin ungültig" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4334,6 +4331,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Selected CTS pin not valid" +#~ msgstr "Ausgewählter CTS-Pin ungültig" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "Ausgewählter RTS-Pin ungültig" + #~ msgid "Could not initialize channel" #~ msgstr "Kanal konnte nicht initialisiert werden" diff --git a/locale/el.po b/locale/el.po index 969817d348..d6581c2243 100644 --- a/locale/el.po +++ b/locale/el.po @@ -1171,6 +1171,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "" @@ -1581,6 +1582,10 @@ msgstr "" msgid "Nordic Soft Device failure assertion." msgstr "" +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "" @@ -1877,7 +1882,7 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "" @@ -1952,14 +1957,6 @@ msgstr "" msgid "Scan already in progess. Stop with stop_scan." msgstr "" -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" diff --git a/locale/en_GB.po b/locale/en_GB.po index 892b357bcc..4f9a229740 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -1189,6 +1189,7 @@ msgstr "Invalid %q" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Invalid %q pin" @@ -1601,6 +1602,10 @@ msgstr "No timer available" msgid "Nordic Soft Device failure assertion." msgstr "Nordic Soft Device failure assertion." +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "Not a valid IP string" @@ -1910,7 +1915,7 @@ msgstr "Read-only" msgid "Read-only filesystem" msgstr "Read-only filesystem" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "Read-only object" @@ -1985,14 +1990,6 @@ msgstr "Sample rate too high. It must be less than %d" msgid "Scan already in progess. Stop with stop_scan." msgstr "Scan already in progess. Stop with stop_scan." -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "Selected CTS pin not valid" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "Selected RTS pin not valid" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4288,3 +4285,9 @@ msgstr "zi must be of float type" #: extmod/ulab/code/filter/filter.c msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" + +#~ msgid "Selected CTS pin not valid" +#~ msgstr "Selected CTS pin not valid" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "Selected RTS pin not valid" diff --git a/locale/es.po b/locale/es.po index c51351075f..8f3023853c 100644 --- a/locale/es.po +++ b/locale/es.po @@ -1207,6 +1207,7 @@ msgstr "%q inválido" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Pin %q inválido" @@ -1621,6 +1622,10 @@ msgstr "No hay temporizador disponible" msgid "Nordic Soft Device failure assertion." msgstr "Fallo de aserción de dispositivo Nordic Soft." +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "No es una cadena de IP válida" @@ -1935,7 +1940,7 @@ msgstr "Solo-lectura" msgid "Read-only filesystem" msgstr "Sistema de archivos de solo-Lectura" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "Objeto de solo-lectura" @@ -2010,14 +2015,6 @@ msgstr "Frecuencia de muestreo demasiado alta. Debe ser menor a %d" msgid "Scan already in progess. Stop with stop_scan." msgstr "Escaneo en progreso. Usa stop_scan para detener." -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "Pin CTS seleccionado no válido" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "Pin RTS seleccionado no válido" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4333,6 +4330,12 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "Selected CTS pin not valid" +#~ msgstr "Pin CTS seleccionado no válido" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "Pin RTS seleccionado no válido" + #~ msgid "Could not initialize channel" #~ msgstr "No se pudo inicializar el canal" diff --git a/locale/fil.po b/locale/fil.po index 7310108c8a..6fe4dba05a 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -1186,6 +1186,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Mali ang %q pin" @@ -1596,6 +1597,10 @@ msgstr "" msgid "Nordic Soft Device failure assertion." msgstr "" +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "" @@ -1896,7 +1901,7 @@ msgstr "Basahin-lamang" msgid "Read-only filesystem" msgstr "Basahin-lamang mode" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c #, fuzzy msgid "Read-only object" msgstr "Basahin-lamang" @@ -1972,14 +1977,6 @@ msgstr "Sample rate ay masyadong mataas. Ito ay dapat hindi hiigit sa %d" msgid "Scan already in progess. Stop with stop_scan." msgstr "" -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" diff --git a/locale/fr.po b/locale/fr.po index 301c0bc958..20438c5ed2 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -1217,6 +1217,7 @@ msgstr "%q invalide" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Broche invalide pour '%q'" @@ -1629,6 +1630,10 @@ msgstr "Aucun minuteur disponible" msgid "Nordic Soft Device failure assertion." msgstr "Affirmation de défaillance du Nordic Soft Device." +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "Chaîne IP non valide" @@ -1945,7 +1950,7 @@ msgstr "Lecture seule" msgid "Read-only filesystem" msgstr "Système de fichier en lecture seule" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "Objet en lecture seule" @@ -2020,14 +2025,6 @@ msgstr "Taux d'échantillonage trop élevé. Doit être inférieur à %d" msgid "Scan already in progess. Stop with stop_scan." msgstr "Scan déjà en cours. Arrêtez avec stop_scan." -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "La broche CTS sélectionnée n'est pas valide" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "La broche RTS sélectionnée n'est pas valide" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4358,6 +4355,12 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "Selected CTS pin not valid" +#~ msgstr "La broche CTS sélectionnée n'est pas valide" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "La broche RTS sélectionnée n'est pas valide" + #~ msgid "Could not initialize channel" #~ msgstr "Impossible d'initialiser le canal" diff --git a/locale/hi.po b/locale/hi.po index 91233d0eff..046e88d53a 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -1171,6 +1171,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "" @@ -1581,6 +1582,10 @@ msgstr "" msgid "Nordic Soft Device failure assertion." msgstr "" +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "" @@ -1877,7 +1882,7 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "" @@ -1952,14 +1957,6 @@ msgstr "" msgid "Scan already in progess. Stop with stop_scan." msgstr "" -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" diff --git a/locale/it_IT.po b/locale/it_IT.po index 66f45c615a..2b7bf0725f 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -1195,6 +1195,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Pin %q non valido" @@ -1609,6 +1610,10 @@ msgstr "" msgid "Nordic Soft Device failure assertion." msgstr "" +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "" @@ -1915,7 +1920,7 @@ msgstr "Sola lettura" msgid "Read-only filesystem" msgstr "Filesystem in sola lettura" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c #, fuzzy msgid "Read-only object" msgstr "Sola lettura" @@ -1993,14 +1998,6 @@ msgstr "" msgid "Scan already in progess. Stop with stop_scan." msgstr "" -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" diff --git a/locale/ja.po b/locale/ja.po index 1a1a2d7bec..607cf642b4 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -1184,6 +1184,7 @@ msgstr "不正な %q" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "不正な%qピン" @@ -1594,6 +1595,10 @@ msgstr "利用できるタイマーなし" msgid "Nordic Soft Device failure assertion." msgstr "" +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "不正なIP文字列です" @@ -1893,7 +1898,7 @@ msgstr "読み込み専用" msgid "Read-only filesystem" msgstr "読み込み専用のファイルシステム" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "読み込み専用のオブジェクト" @@ -1968,14 +1973,6 @@ msgstr "サンプルレートは%d以下でなければなりません" msgid "Scan already in progess. Stop with stop_scan." msgstr "既にスキャン進行中。stop_scanで停止してください" -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "選択されたCTSピンが不正" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "選択されたRTSピンが正しくありません" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4267,6 +4264,12 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Selected CTS pin not valid" +#~ msgstr "選択されたCTSピンが不正" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "選択されたRTSピンが正しくありません" + #~ msgid "Could not initialize channel" #~ msgstr "チャネルを初期化できません" diff --git a/locale/ko.po b/locale/ko.po index fd945991ec..b40f6ac89e 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -1174,6 +1174,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "" @@ -1584,6 +1585,10 @@ msgstr "" msgid "Nordic Soft Device failure assertion." msgstr "" +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "" @@ -1880,7 +1885,7 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "" @@ -1955,14 +1960,6 @@ msgstr "" msgid "Scan already in progess. Stop with stop_scan." msgstr "" -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" diff --git a/locale/nl.po b/locale/nl.po index 4eca409ee4..ce89a9d82a 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -1185,6 +1185,7 @@ msgstr "Ongeldige %q" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Ongeldige %q pin" @@ -1595,6 +1596,10 @@ msgstr "Geen timer beschikbaar" msgid "Nordic Soft Device failure assertion." msgstr "Nordic Soft Device assertion mislukt." +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "Geen geldige IP string" @@ -1909,7 +1914,7 @@ msgstr "Alleen-lezen" msgid "Read-only filesystem" msgstr "Alleen-lezen bestandssysteem" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "Alleen-lezen object" @@ -1984,14 +1989,6 @@ msgstr "Sample rate is te hoog. Moet minder dan %d zijn" msgid "Scan already in progess. Stop with stop_scan." msgstr "Scan wordt al uitvoerd. Stop met stop_scan." -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "Geselecteerde CTS pin niet geldig" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "Geselecteerde RTS pin niet geldig" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4298,6 +4295,12 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "Selected CTS pin not valid" +#~ msgstr "Geselecteerde CTS pin niet geldig" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "Geselecteerde RTS pin niet geldig" + #~ msgid "Could not initialize channel" #~ msgstr "Kan kanaal niet initialiseren" diff --git a/locale/pl.po b/locale/pl.po index 73b167ebfc..65e7f22fb9 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -1184,6 +1184,7 @@ msgstr "Nieprawidłowe %q" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Zła nóżka %q" @@ -1595,6 +1596,10 @@ msgstr "Brak dostępnego timera" msgid "Nordic Soft Device failure assertion." msgstr "" +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "" @@ -1891,7 +1896,7 @@ msgstr "Tylko do odczytu" msgid "Read-only filesystem" msgstr "System plików tylko do odczytu" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "Obiekt tylko do odczytu" @@ -1966,14 +1971,6 @@ msgstr "Zbyt wysoka częstotliwość próbkowania. Musi być mniejsza niż %d" msgid "Scan already in progess. Stop with stop_scan." msgstr "Skanuj już w toku. Zatrzymaj za pomocą stop_scan." -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "Wybrany pin CTS jest nieprawidłowy" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "Wybrany pin RTS jest nieprawidłowy" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4259,6 +4256,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Selected CTS pin not valid" +#~ msgstr "Wybrany pin CTS jest nieprawidłowy" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "Wybrany pin RTS jest nieprawidłowy" + #~ msgid "Could not initialize channel" #~ msgstr "Nie można zainicjować kanału" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 27ec357aea..c21aaafaa4 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -1209,6 +1209,7 @@ msgstr "%q Inválido" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Pino do %q inválido" @@ -1621,6 +1622,10 @@ msgstr "Não há um temporizador disponível" msgid "Nordic Soft Device failure assertion." msgstr "Declaração de falha do dispositivo Nordic Soft." +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "Não é uma sequência válida de IP" @@ -1938,7 +1943,7 @@ msgstr "Somente leitura" msgid "Read-only filesystem" msgstr "Sistema de arquivos somente leitura" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "Objeto de leitura apenas" @@ -2013,14 +2018,6 @@ msgstr "Taxa de amostragem muito alta. Deve ser menor que %d" msgid "Scan already in progess. Stop with stop_scan." msgstr "O escaneamento já está em andamento. Interrompa com stop_scan." -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "O pino CTS selecionado é inválido" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "O pino RTS selecionado é inválido" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4344,6 +4341,12 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "Selected CTS pin not valid" +#~ msgstr "O pino CTS selecionado é inválido" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "O pino RTS selecionado é inválido" + #~ msgid "Could not initialize channel" #~ msgstr "Não foi possível inicializar o canal" diff --git a/locale/sv.po b/locale/sv.po index 61cb7b4319..d7835982c3 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -1192,6 +1192,7 @@ msgstr "Ogiltig %q" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Ogiltig %q-pinne" @@ -1603,6 +1604,10 @@ msgstr "Ingen timer tillgänglig" msgid "Nordic Soft Device failure assertion." msgstr "Påståendet om Nordic Soft Device-fel." +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "Inte en giltig IP-sträng" @@ -1915,7 +1920,7 @@ msgstr "Skrivskyddad" msgid "Read-only filesystem" msgstr "Skrivskyddat filsystem" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "Skrivskyddat objekt" @@ -1990,14 +1995,6 @@ msgstr "Samplingsfrekvensen är för hög. Den måste vara mindre än %d" msgid "Scan already in progess. Stop with stop_scan." msgstr "Skanning pågår redan. Avsluta med stop_scan." -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "Vald CTS-pinne är inte giltig" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "Vald CTS-pinne är inte giltig" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4301,6 +4298,12 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "Selected CTS pin not valid" +#~ msgstr "Vald CTS-pinne är inte giltig" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "Vald CTS-pinne är inte giltig" + #~ msgid "Could not initialize channel" #~ msgstr "Det gick inte att initiera kanalen" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 5c39884785..5f258faf51 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -1194,6 +1194,7 @@ msgstr "wú xiào %q" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "Wúxiào de %q yǐn jiǎo" @@ -1605,6 +1606,10 @@ msgstr "Méiyǒu jìshí qì" msgid "Nordic Soft Device failure assertion." msgstr "Nordic ruǎn shèbèi gùzhàng shēngmíng." +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic soft device out of memory" +msgstr "" + #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" msgstr "Wúxiào de IP zìfú chuàn" @@ -1913,7 +1918,7 @@ msgstr "Zhǐ dú" msgid "Read-only filesystem" msgstr "Zhǐ dú wénjiàn xìtǒng" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "Zhǐ dú duìxiàng" @@ -1988,14 +1993,6 @@ msgstr "Cǎiyàng lǜ tài gāo. Tā bìxū xiǎoyú %d" msgid "Scan already in progess. Stop with stop_scan." msgstr "Zhèngzài jìn háng sǎomiáo. Shǐyòng stop_scan tíngzhǐ." -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "Suǒ xuǎn de CTS yǐn jiǎo wúxiào" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "Suǒ xuǎn de RTS yǐn jiǎo wúxiào" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -4297,6 +4294,12 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "Selected CTS pin not valid" +#~ msgstr "Suǒ xuǎn de CTS yǐn jiǎo wúxiào" + +#~ msgid "Selected RTS pin not valid" +#~ msgstr "Suǒ xuǎn de RTS yǐn jiǎo wúxiào" + #~ msgid "Could not initialize channel" #~ msgstr "Wúfǎ chūshǐhuà píndào" From be50732515f8daa6e9ef60c25b080fb803151b4a Mon Sep 17 00:00:00 2001 From: Tsutomu IKEGAMI Date: Thu, 1 Apr 2021 17:09:56 +0900 Subject: [PATCH 165/261] Fix SD_DET pin assignment of seeduino_wio_terminal. --- ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c b/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c index 45ff7c3361..8d9c76164e 100644 --- a/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c +++ b/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c @@ -60,7 +60,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_PC16) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_PC17) }, { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PC19) }, - { MP_ROM_QSTR(MP_QSTR_SD_DET), MP_ROM_PTR(&pin_PC21) }, + { MP_ROM_QSTR(MP_QSTR_SD_DET), MP_ROM_PTR(&pin_PD21) }, // Switch { MP_OBJ_NEW_QSTR(MP_QSTR_SWITCH_UP), MP_ROM_PTR(&pin_PD20) }, From 7810cb275c60ea73f496096ad462ad507ed3df2a Mon Sep 17 00:00:00 2001 From: Tsutomu IKEGAMI Date: Thu, 1 Apr 2021 17:33:57 +0900 Subject: [PATCH 166/261] Add two escape sequences to terminalio.Termial: - ESC[yy;xxH : move cursor to (xx, yy) - ESC[2J : clear screen --- shared-module/terminalio/Terminal.c | 41 ++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/shared-module/terminalio/Terminal.c b/shared-module/terminalio/Terminal.c index 4589c91498..eb8b27208e 100644 --- a/shared-module/terminalio/Terminal.c +++ b/shared-module/terminalio/Terminal.c @@ -93,6 +93,39 @@ size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, con self->cursor_x -= n; } } + if (c == 'J') { + if (n == 2) { + common_hal_displayio_tilegrid_set_top_left(self->tilegrid, 0, 0); + self->cursor_x = self->cursor_y = start_y = 0; + n = 0; + for (uint16_t x = 0; x < self->tilegrid->width_in_tiles; x++) { + for (uint16_t y = 0; y < self->tilegrid->height_in_tiles; y++) { + common_hal_displayio_tilegrid_set_tile(self->tilegrid, x, y, 0); + } + } + } + } + if (c == ';') { + int16_t m = 0; + for(++j; j < 9; j++) { + if ('0' <= i[j] && i[j] <= '9') { + m = m * 10 + (i[j] - '0'); + } else { + c = i[j]; + break; + } + } + if (c == 'H') { + if (n >= self->tilegrid->height_in_tiles) + n = self->tilegrid->height_in_tiles - 1; + if (m >= self->tilegrid->width_in_tiles) + m = self->tilegrid->width_in_tiles - 1; + n = (n + self->tilegrid->top_left_y) % self->tilegrid->height_in_tiles; + self->cursor_x = m; + self->cursor_y = n; + start_y = self->cursor_y; + } + } i += j + 1; continue; } @@ -114,12 +147,14 @@ size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, con self->cursor_y %= self->tilegrid->height_in_tiles; } if (self->cursor_y != start_y) { - // clear the new row + // clear the new row in case of scroll up + if (self->cursor_y == self->tilegrid->top_left_y) { for (uint16_t j = 0; j < self->tilegrid->width_in_tiles; j++) { common_hal_displayio_tilegrid_set_tile(self->tilegrid, j, self->cursor_y, 0); - start_y = self->cursor_y; } - common_hal_displayio_tilegrid_set_top_left(self->tilegrid, 0, (start_y + self->tilegrid->height_in_tiles + 1) % self->tilegrid->height_in_tiles); + common_hal_displayio_tilegrid_set_top_left(self->tilegrid, 0, (self->cursor_y + self->tilegrid->height_in_tiles + 1) % self->tilegrid->height_in_tiles); + } + start_y = self->cursor_y; } } return i - data; From 3c4d763fefe96bbd3835b48efd94ce81fc08af1a Mon Sep 17 00:00:00 2001 From: Tsutomu IKEGAMI Date: Thu, 1 Apr 2021 18:04:33 +0900 Subject: [PATCH 167/261] Fix format. --- shared-module/terminalio/Terminal.c | 76 ++++++++++++++--------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/shared-module/terminalio/Terminal.c b/shared-module/terminalio/Terminal.c index eb8b27208e..96842835a3 100644 --- a/shared-module/terminalio/Terminal.c +++ b/shared-module/terminalio/Terminal.c @@ -93,38 +93,38 @@ size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, con self->cursor_x -= n; } } - if (c == 'J') { - if (n == 2) { - common_hal_displayio_tilegrid_set_top_left(self->tilegrid, 0, 0); - self->cursor_x = self->cursor_y = start_y = 0; - n = 0; - for (uint16_t x = 0; x < self->tilegrid->width_in_tiles; x++) { - for (uint16_t y = 0; y < self->tilegrid->height_in_tiles; y++) { - common_hal_displayio_tilegrid_set_tile(self->tilegrid, x, y, 0); - } - } - } - } - if (c == ';') { - int16_t m = 0; - for(++j; j < 9; j++) { - if ('0' <= i[j] && i[j] <= '9') { - m = m * 10 + (i[j] - '0'); - } else { - c = i[j]; - break; + if (c == 'J') { + if (n == 2) { + common_hal_displayio_tilegrid_set_top_left(self->tilegrid, 0, 0); + self->cursor_x = self->cursor_y = start_y = 0; + n = 0; + for (uint16_t x = 0; x < self->tilegrid->width_in_tiles; x++) { + for (uint16_t y = 0; y < self->tilegrid->height_in_tiles; y++) { + common_hal_displayio_tilegrid_set_tile(self->tilegrid, x, y, 0); + } + } + } + } + if (c == ';') { + int16_t m = 0; + for(++j; j < 9; j++) { + if ('0' <= i[j] && i[j] <= '9') { + m = m * 10 + (i[j] - '0'); + } else { + c = i[j]; + break; + } + } + if (c == 'H') { + if (n >= self->tilegrid->height_in_tiles) + n = self->tilegrid->height_in_tiles - 1; + if (m >= self->tilegrid->width_in_tiles) + m = self->tilegrid->width_in_tiles - 1; + n = (n + self->tilegrid->top_left_y) % self->tilegrid->height_in_tiles; + self->cursor_x = m; + self->cursor_y = n; + start_y = self->cursor_y; } - } - if (c == 'H') { - if (n >= self->tilegrid->height_in_tiles) - n = self->tilegrid->height_in_tiles - 1; - if (m >= self->tilegrid->width_in_tiles) - m = self->tilegrid->width_in_tiles - 1; - n = (n + self->tilegrid->top_left_y) % self->tilegrid->height_in_tiles; - self->cursor_x = m; - self->cursor_y = n; - start_y = self->cursor_y; - } } i += j + 1; continue; @@ -147,14 +147,14 @@ size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, con self->cursor_y %= self->tilegrid->height_in_tiles; } if (self->cursor_y != start_y) { - // clear the new row in case of scroll up - if (self->cursor_y == self->tilegrid->top_left_y) { - for (uint16_t j = 0; j < self->tilegrid->width_in_tiles; j++) { - common_hal_displayio_tilegrid_set_tile(self->tilegrid, j, self->cursor_y, 0); + // clear the new row in case of scroll up + if (self->cursor_y == self->tilegrid->top_left_y) { + for (uint16_t j = 0; j < self->tilegrid->width_in_tiles; j++) { + common_hal_displayio_tilegrid_set_tile(self->tilegrid, j, self->cursor_y, 0); + } + common_hal_displayio_tilegrid_set_top_left(self->tilegrid, 0, (self->cursor_y + self->tilegrid->height_in_tiles + 1) % self->tilegrid->height_in_tiles); } - common_hal_displayio_tilegrid_set_top_left(self->tilegrid, 0, (self->cursor_y + self->tilegrid->height_in_tiles + 1) % self->tilegrid->height_in_tiles); - } - start_y = self->cursor_y; + start_y = self->cursor_y; } } return i - data; From 5f77d0776056086c96ea688cb44cc11114c39dfb Mon Sep 17 00:00:00 2001 From: Tsutomu IKEGAMI Date: Thu, 1 Apr 2021 20:26:10 +0900 Subject: [PATCH 168/261] Fix format --- shared-module/terminalio/Terminal.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/shared-module/terminalio/Terminal.c b/shared-module/terminalio/Terminal.c index 96842835a3..f561863f08 100644 --- a/shared-module/terminalio/Terminal.c +++ b/shared-module/terminalio/Terminal.c @@ -107,7 +107,7 @@ size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, con } if (c == ';') { int16_t m = 0; - for(++j; j < 9; j++) { + for (++j; j < 9; j++) { if ('0' <= i[j] && i[j] <= '9') { m = m * 10 + (i[j] - '0'); } else { @@ -116,10 +116,12 @@ size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, con } } if (c == 'H') { - if (n >= self->tilegrid->height_in_tiles) - n = self->tilegrid->height_in_tiles - 1; - if (m >= self->tilegrid->width_in_tiles) - m = self->tilegrid->width_in_tiles - 1; + if (n >= self->tilegrid->height_in_tiles) { + n = self->tilegrid->height_in_tiles - 1; + } + if (m >= self->tilegrid->width_in_tiles) { + m = self->tilegrid->width_in_tiles - 1; + } n = (n + self->tilegrid->top_left_y) % self->tilegrid->height_in_tiles; self->cursor_x = m; self->cursor_y = n; From 171820e53f4a4cdedd7c29bef57a1adb2f695d2d Mon Sep 17 00:00:00 2001 From: Tsutomu IKEGAMI Date: Thu, 1 Apr 2021 20:45:15 +0900 Subject: [PATCH 169/261] Fix format --- shared-module/terminalio/Terminal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shared-module/terminalio/Terminal.c b/shared-module/terminalio/Terminal.c index f561863f08..8ef2acd1ca 100644 --- a/shared-module/terminalio/Terminal.c +++ b/shared-module/terminalio/Terminal.c @@ -117,11 +117,11 @@ size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, con } if (c == 'H') { if (n >= self->tilegrid->height_in_tiles) { - n = self->tilegrid->height_in_tiles - 1; - } + n = self->tilegrid->height_in_tiles - 1; + } if (m >= self->tilegrid->width_in_tiles) { - m = self->tilegrid->width_in_tiles - 1; - } + m = self->tilegrid->width_in_tiles - 1; + } n = (n + self->tilegrid->top_left_y) % self->tilegrid->height_in_tiles; self->cursor_x = m; self->cursor_y = n; From 77889fe70c78ee0c467999259ef0cb275d9daee8 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Thu, 1 Apr 2021 18:00:56 +0530 Subject: [PATCH 170/261] clone repo before installing deps closes #4524 --- .github/workflows/create_website_pr.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create_website_pr.yml b/.github/workflows/create_website_pr.yml index a66bb161c4..97c543da0d 100644 --- a/.github/workflows/create_website_pr.yml +++ b/.github/workflows/create_website_pr.yml @@ -16,6 +16,10 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" + - uses: actions/checkout@v2.2.0 + with: + submodules: true + fetch-depth: 0 - name: Set up Python 3.8 uses: actions/setup-python@v1 with: @@ -27,10 +31,6 @@ jobs: run: | gcc --version python3 --version - - uses: actions/checkout@v2.2.0 - with: - submodules: true - fetch-depth: 0 - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* - name: CircuitPython version run: git describe --dirty --tags From 6b22e8fbc0fb8b9a46ec2b5e59506a851e672929 Mon Sep 17 00:00:00 2001 From: Hugo Dahl Date: Thu, 1 Apr 2021 12:03:46 +0000 Subject: [PATCH 171/261] Translated using Weblate (French) Currently translated at 100.0% (969 of 969 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 20438c5ed2..ed2e096ace 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-21 21:29+0000\n" +"PO-Revision-Date: 2021-04-01 14:50+0000\n" "Last-Translator: Hugo Dahl \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2-dev\n" +"X-Generator: Weblate 4.6-dev\n" #: main.c msgid "" @@ -1632,7 +1632,7 @@ msgstr "Affirmation de défaillance du Nordic Soft Device." #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic soft device out of memory" -msgstr "" +msgstr "Appareil logiciel Nordic hors de mémoire" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" From fbc1b467aa0500c91655d56d5028b1e2b0d173b6 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Thu, 1 Apr 2021 14:24:51 +0000 Subject: [PATCH 172/261] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (969 of 969 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 c21aaafaa4..0929f8efbd 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-03-21 21:29+0000\n" +"PO-Revision-Date: 2021-04-01 14:50+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.5.2-dev\n" +"X-Generator: Weblate 4.6-dev\n" #: main.c msgid "" @@ -1624,7 +1624,7 @@ msgstr "Declaração de falha do dispositivo Nordic Soft." #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic soft device out of memory" -msgstr "" +msgstr "O soft do dispositivo nórdico está sem memória" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" From 41eb9cb2554cf9d04a07077191e44f1f7791c3b3 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Thu, 1 Apr 2021 14:39:56 +0000 Subject: [PATCH 173/261] Translated using Weblate (Swedish) Currently translated at 100.0% (969 of 969 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 d7835982c3..c867de8d68 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-03-19 20:36+0000\n" +"PO-Revision-Date: 2021-04-01 14:50+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.5.2-dev\n" +"X-Generator: Weblate 4.6-dev\n" #: main.c msgid "" @@ -1606,7 +1606,7 @@ msgstr "Påståendet om Nordic Soft Device-fel." #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic soft device out of memory" -msgstr "" +msgstr "Nordic soft-enheten har slut på minne" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" From 489163b74edf9d6f40b3d9e6ee0154d2f1ddce79 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 1 Apr 2021 09:37:39 -0500 Subject: [PATCH 174/261] mimxrt1011: pwmio: Enable basic PWMOut functionality After this change, the following program works for me on the MIMXRT1010-EVK: ```python import pwmio import board p = pwmio.PWMOut(board.D13, frequency=1_000_000, variable_frequency=True) p.duty_cycle = 32868 while True: pass ``` Querying and varying the duty_cycle and frequency work as well. The lowest frequency obtainable is about 2kHz; there is an additional divider which would allow lower PWM frequencies (I think 1kHz is important for servos?) Something odd happens with very low duty cycles, such as ```python >>> p.frequency = 2000 >>> p.duty_cycle = 2 ``` instead of a symmetrical waveform, it's asymmetrical. With `duty_cycle=4`, the effect disappears. The reason for this is probably hidden in the datasheet, but could affect servos or other things that count pulse widths. --- ports/mimxrt10xx/common-hal/pwmio/PWMOut.c | 403 ++++-------------- ports/mimxrt10xx/common-hal/pwmio/PWMOut.h | 1 + .../mimxrt10xx/MIMXRT1011/periph.c | 40 +- .../mimxrt10xx/MIMXRT1021/periph.c | 78 ++-- .../mimxrt10xx/MIMXRT1062/periph.c | 134 +++--- .../peripherals/mimxrt10xx/periph.h | 14 +- 6 files changed, 213 insertions(+), 457 deletions(-) diff --git a/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c b/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c index 28ea81fa22..8ef1823e1f 100644 --- a/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +++ b/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c @@ -31,15 +31,31 @@ #include "py/runtime.h" #include "common-hal/pwmio/PWMOut.h" #include "shared-bindings/pwmio/PWMOut.h" -#include "shared-bindings/microcontroller/Processor.h" +#include "shared-bindings/microcontroller/Pin.h" #include "fsl_pwm.h" #include "supervisor/shared/translate.h" #include "periph.h" -#include +static void config_periph_pin(const mcu_pwm_obj_t *periph) { + IOMUXC_SetPinMux( + periph->pin->mux_reg, periph->mux_mode, + periph->input_reg, periph->input_idx, + periph->pin->cfg_reg, + 0); + IOMUXC_SetPinConfig(0, 0, 0, 0, + periph->pin->cfg_reg, + IOMUXC_SW_PAD_CTL_PAD_HYS(0) + | IOMUXC_SW_PAD_CTL_PAD_PUS(1) + | IOMUXC_SW_PAD_CTL_PAD_PUE(1) + | IOMUXC_SW_PAD_CTL_PAD_PKE(1) + | IOMUXC_SW_PAD_CTL_PAD_ODE(0) + | IOMUXC_SW_PAD_CTL_PAD_SPEED(1) + | IOMUXC_SW_PAD_CTL_PAD_DSE(6) + | IOMUXC_SW_PAD_CTL_PAD_SRE(0)); +} // TODO // #include "samd/pins.h" @@ -148,8 +164,6 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, continue; } - printf("pwm: 0x%p, sum %d, chan %d, mux %d\r\n", mcu_pwm_list[i].pwm, mcu_pwm_list[i].submodule, mcu_pwm_list[i].channel, mcu_pwm_list[i].mux_mode); - self->pwm = &mcu_pwm_list[i]; break; @@ -159,24 +173,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, return PWMOUT_INVALID_PIN; } - CLOCK_SetDiv(kCLOCK_AhbDiv, 0x2); /* Set AHB PODF to 2, divide by 3 */ - CLOCK_SetDiv(kCLOCK_IpgDiv, 0x3); /* Set IPG PODF to 3, divede by 4 */ - -// TODO re-enable -// IOMUXC_SetPinMux( -// IOMUXC_GPIO_SD_02_FLEXPWM1_PWM0_A, /* GPIO_02 is configured as FLEXPWM1_PWM0_A */ -// 0U); /* Software Input On Field: Input Path is determined by functionality */ -// -// IOMUXC_SetPinConfig( -// IOMUXC_GPIO_SD_02_FLEXPWM1_PWM0_A, /* GPIO_02 PAD functional properties : */ -// 0x10A0U); /* Slew Rate Field: Slow Slew Rate -// Drive Strength Field: R0/4 -// Speed Field: fast(150MHz) -// Open Drain Enable Field: Open Drain Disabled -// Pull / Keep Enable Field: Pull/Keeper Enabled -// Pull / Keep Select Field: Keeper -// Pull Up / Down Config. Field: 100K Ohm Pull Down -// Hyst. Enable Field: Hysteresis Disabled */ + config_periph_pin(self->pwm); pwm_config_t pwmConfig; @@ -199,166 +196,39 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, // pwmConfig.reloadLogic = kPWM_ReloadPwmFullCycle; pwmConfig.enableDebugMode = true; - if (PWM_Init(PWM1, self->pwm->submodule, &pwmConfig) == kStatus_Fail) { - printf("PWM initialization failed\r\n"); + if (PWM_Init(self->pwm->pwm, self->pwm->submodule, &pwmConfig) == kStatus_Fail) { return PWMOUT_INVALID_PIN; } - pwm_signal_param_t pwmSignal; + if (frequency == 0 || frequency > PWM_SRC_CLK_FREQ/2) { + return PWMOUT_INVALID_FREQUENCY; + } - /* Set deadtime count, we set this to about 650ns */ - uint16_t deadTimeVal = ((uint64_t)PWM_SRC_CLK_FREQ * 650) / 1000000000; + if (PWM_SRC_CLK_FREQ / frequency >= 65536) { + return PWMOUT_INVALID_FREQUENCY; + } - pwmSignal.pwmChannel = self->pwm->channel; - pwmSignal.level = kPWM_HighTrue; - pwmSignal.dutyCyclePercent = frequency / 2; /* 1 percent dutycycle */ - pwmSignal.deadtimeValue = deadTimeVal; + pwm_signal_param_t pwmSignal = { + .pwmChannel = self->pwm->channel, + .level = kPWM_HighTrue, + .dutyCyclePercent = 0, // avoid an initial transient + .deadtimeValue = 0, // allow 100% duty cycle + }; - PWM_SetupPwm(PWM1, self->pwm->submodule, &pwmSignal, 1, kPWM_SignedCenterAligned, frequency, PWM_SRC_CLK_FREQ); + // Disable all fault inputs + self->pwm->pwm->SM[self->pwm->submodule].DISMAP[0] = 0; + self->pwm->pwm->SM[self->pwm->submodule].DISMAP[1] = 0; - PWM_SetPwmLdok(PWM1, kPWM_Control_Module_0 | kPWM_Control_Module_1 | kPWM_Control_Module_2, true); + status_t status = PWM_SetupPwm(self->pwm->pwm, self->pwm->submodule, &pwmSignal, 1, kPWM_EdgeAligned, frequency, PWM_SRC_CLK_FREQ); - PWM_StartTimer(PWM1, kPWM_Control_Module_0 | kPWM_Control_Module_1 | kPWM_Control_Module_2); + if (status != kStatus_Success) { + return PWMOUT_INITIALIZATION_ERROR; + } + PWM_SetPwmLdok(self->pwm->pwm, 1 << self->pwm->submodule, true); -// if (frequency == 0 || frequency > 6000000) { -// return PWMOUT_INVALID_FREQUENCY; -// } + PWM_StartTimer(self->pwm->pwm, 1 << self->pwm->submodule); -// // Figure out which timer we are using. -// // First see if a tcc is already going with the frequency we want and our -// // channel is unused. tc's don't have enough channels to share. -// const pin_timer_t* timer = NULL; -// uint8_t mux_position = 0; -// if (!variable_frequency) { -// for (uint8_t i = 0; i < TCC_INST_NUM && timer == NULL; i++) { -// if (target_tcc_frequencies[i] != frequency) { -// continue; -// } -// for (uint8_t j = 0; j < NUM_TIMERS_PER_PIN && timer == NULL; j++) { -// const pin_timer_t* t = &pin->timer[j]; -// if (t->index != i || t->is_tc || t->index >= TCC_INST_NUM) { -// continue; -// } -// Tcc* tcc = tcc_insts[t->index]; -// if (tcc->CTRLA.bit.ENABLE == 1 && channel_ok(t)) { -// timer = t; -// mux_position = j; -// // Claim channel. -// tcc_channels[timer->index] |= (1 << tcc_channel(timer)); -// -// } -// } -// } -// } -// -// // No existing timer has been found, so find a new one to use and set it up. -// if (timer == NULL) { -// // By default, with fixed frequency we want to share a TCC because its likely we'll have -// // other outputs at the same frequency. If the frequency is variable then we'll only have -// // one output so we start with the TCs to see if they work. -// int8_t direction = -1; -// uint8_t start = NUM_TIMERS_PER_PIN - 1; -// bool found = false; -// if (variable_frequency) { -// direction = 1; -// start = 0; -// } -// for (int8_t i = start; i >= 0 && i < NUM_TIMERS_PER_PIN && timer == NULL; i += direction) { -// const pin_timer_t* t = &pin->timer[i]; -// if ((!t->is_tc && t->index >= TCC_INST_NUM) || -// (t->is_tc && t->index >= TC_INST_NUM)) { -// continue; -// } -// if (t->is_tc) { -// found = true; -// Tc* tc = tc_insts[t->index]; -// if (tc->COUNT16.CTRLA.bit.ENABLE == 0 && t->wave_output == 1) { -// timer = t; -// mux_position = i; -// } -// } else { -// Tcc* tcc = tcc_insts[t->index]; -// if (tcc->CTRLA.bit.ENABLE == 0 && channel_ok(t)) { -// timer = t; -// mux_position = i; -// } -// } -// } -// -// if (timer == NULL) { -// if (found) { -// return PWMOUT_ALL_TIMERS_ON_PIN_IN_USE; -// } -// return PWMOUT_ALL_TIMERS_IN_USE; -// } -// -// uint8_t resolution = 0; -// if (timer->is_tc) { -// resolution = 16; -// } else { -// // TCC resolution varies so look it up. -// const uint8_t _tcc_sizes[TCC_INST_NUM] = TCC_SIZES; -// resolution = _tcc_sizes[timer->index]; -// } -// // First determine the divisor that gets us the highest resolution. -// uint32_t system_clock = common_hal_mcu_processor_get_frequency(); -// uint32_t top; -// uint8_t divisor; -// for (divisor = 0; divisor < 8; divisor++) { -// top = (system_clock / prescaler[divisor] / frequency) - 1; -// if (top < (1u << resolution)) { -// break; -// } -// } -// -// set_timer_handler(timer->is_tc, timer->index, TC_HANDLER_NO_INTERRUPT); -// // We use the zeroeth clock on either port to go full speed. -// turn_on_clocks(timer->is_tc, timer->index, 0); -// -// if (timer->is_tc) { -// tc_periods[timer->index] = top; -// Tc* tc = tc_insts[timer->index]; -// #ifdef SAMD21 -// tc->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | -// TC_CTRLA_PRESCALER(divisor) | -// TC_CTRLA_WAVEGEN_MPWM; -// tc->COUNT16.CC[0].reg = top; -// #endif -// #ifdef SAMD51 -// -// tc->COUNT16.CTRLA.bit.SWRST = 1; -// while (tc->COUNT16.CTRLA.bit.SWRST == 1) { -// } -// tc_set_enable(tc, false); -// tc->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER(divisor); -// tc->COUNT16.WAVE.reg = TC_WAVE_WAVEGEN_MPWM; -// tc->COUNT16.CCBUF[0].reg = top; -// tc->COUNT16.CCBUF[1].reg = 0; -// #endif -// -// tc_set_enable(tc, true); -// } else { -// tcc_periods[timer->index] = top; -// Tcc* tcc = tcc_insts[timer->index]; -// tcc_set_enable(tcc, false); -// tcc->CTRLA.bit.PRESCALER = divisor; -// tcc->PER.bit.PER = top; -// tcc->WAVE.bit.WAVEGEN = TCC_WAVE_WAVEGEN_NPWM_Val; -// tcc_set_enable(tcc, true); -// target_tcc_frequencies[timer->index] = frequency; -// tcc_refcount[timer->index]++; -// if (variable_frequency) { -// // We're changing frequency so claim all of the channels. -// tcc_channels[timer->index] = 0xff; -// } else { -// tcc_channels[timer->index] |= (1 << tcc_channel(timer)); -// } -// } -// } -// -// self->timer = timer; -// -// gpio_set_pin_function(pin->number, GPIO_PIN_FUNCTION_E + mux_position); + self->pulse_count = PWM_SRC_CLK_FREQ/frequency; common_hal_pwmio_pwmout_set_duty_cycle(self, duty); @@ -374,177 +244,54 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t *self) { return; } -// const pin_timer_t* t = self->timer; -// if (t->is_tc) { -// Tc* tc = tc_insts[t->index]; -// tc_set_enable(tc, false); -// tc->COUNT16.CTRLA.bit.SWRST = true; -// tc_wait_for_sync(tc); -// } else { -// tcc_refcount[t->index]--; -// tcc_channels[t->index] &= ~(1 << tcc_channel(t)); -// if (tcc_refcount[t->index] == 0) { -// target_tcc_frequencies[t->index] = 0; -// Tcc* tcc = tcc_insts[t->index]; -// tcc_set_enable(tcc, false); -// tcc->CTRLA.bit.SWRST = true; -// while (tcc->SYNCBUSY.bit.SWRST != 0) { -// /* Wait for sync */ -// } -// } -// } -// reset_pin_number(self->pin->number); + common_hal_reset_pin(self->pin); self->pin = NULL; } void common_hal_pwmio_pwmout_set_duty_cycle(pwmio_pwmout_obj_t *self, uint16_t duty) { - PWM_UpdatePwmDutycycle(PWM1, self->pwm->submodule, self->pwm->channel, kPWM_SignedCenterAligned, duty); - -// const pin_timer_t* t = self->timer; -// if (t->is_tc) { -// uint16_t adjusted_duty = tc_periods[t->index] * duty / 0xffff; -// #ifdef SAMD21 -// tc_insts[t->index]->COUNT16.CC[t->wave_output].reg = adjusted_duty; -// #endif -// #ifdef SAMD51 -// Tc* tc = tc_insts[t->index]; -// while (tc->COUNT16.SYNCBUSY.bit.CC1 != 0) {} -// tc->COUNT16.CCBUF[1].reg = adjusted_duty; -// #endif -// } else { -// uint32_t adjusted_duty = ((uint64_t) tcc_periods[t->index]) * duty / 0xffff; -// uint8_t channel = tcc_channel(t); -// Tcc* tcc = tcc_insts[t->index]; -// -// // Write into the CC buffer register, which will be transferred to the -// // CC register on an UPDATE (when period is finished). -// // Do clock domain syncing as necessary. -// -// while (tcc->SYNCBUSY.reg != 0) {} -// -// // Lock out double-buffering while updating the CCB value. -// tcc->CTRLBSET.bit.LUPD = 1; -// #ifdef SAMD21 -// tcc->CCB[channel].reg = adjusted_duty; -// #endif -// #ifdef SAMD51 -// tcc->CCBUF[channel].reg = adjusted_duty; -// #endif -// tcc->CTRLBCLR.bit.LUPD = 1; -// } + // we do not use PWM_UpdatePwmDutycycle because ... + // * it works in integer percents + // * it can't set the "X" duty cycle + self->duty_cycle = duty; + self->duty_scaled = ((uint32_t)duty * self->pulse_count + self->pulse_count/2) / 65535; + switch (self->pwm->channel) { + case kPWM_PwmX: + self->pwm->pwm->SM[self->pwm->submodule].VAL0 = 0; + self->pwm->pwm->SM[self->pwm->submodule].VAL1 = self->duty_scaled; + break; + case kPWM_PwmA: + self->pwm->pwm->SM[self->pwm->submodule].VAL2 = 0; + self->pwm->pwm->SM[self->pwm->submodule].VAL3 = self->duty_scaled; + break; + case kPWM_PwmB: + self->pwm->pwm->SM[self->pwm->submodule].VAL4 = 0; + self->pwm->pwm->SM[self->pwm->submodule].VAL5 = self->duty_scaled; + } + PWM_SetPwmLdok(self->pwm->pwm, 1 << self->pwm->submodule, true); } uint16_t common_hal_pwmio_pwmout_get_duty_cycle(pwmio_pwmout_obj_t *self) { - return 0; -// const pin_timer_t* t = self->timer; -// if (t->is_tc) { -// Tc* tc = tc_insts[t->index]; -// tc_wait_for_sync(tc); -// uint16_t cv = tc->COUNT16.CC[t->wave_output].reg; -// return cv * 0xffff / tc_periods[t->index]; -// } else { -// Tcc* tcc = tcc_insts[t->index]; -// uint8_t channel = tcc_channel(t); -// uint32_t cv = 0; -// -// while (tcc->SYNCBUSY.bit.CTRLB) {} -// -// #ifdef SAMD21 -// // If CCBV (CCB valid) is set, the CCB value hasn't yet been copied -// // to the CC value. -// if ((tcc->STATUS.vec.CCBV & (1 << channel)) != 0) { -// cv = tcc->CCB[channel].reg; -// } else { -// cv = tcc->CC[channel].reg; -// } -// #endif -// #ifdef SAMD51 -// if ((tcc->STATUS.vec.CCBUFV & (1 << channel)) != 0) { -// cv = tcc->CCBUF[channel].reg; -// } else { -// cv = tcc->CC[channel].reg; -// } -// #endif -// -// uint32_t duty_cycle = ((uint64_t) cv) * 0xffff / tcc_periods[t->index]; -// -// return duty_cycle; -// } + return ((uint32_t)self->duty_scaled * 65535 + 65535/2) / self->pulse_count; } void common_hal_pwmio_pwmout_set_frequency(pwmio_pwmout_obj_t *self, uint32_t frequency) { -// if (frequency == 0 || frequency > 6000000) { -// mp_raise_ValueError(translate("Invalid PWM frequency")); -// } -// const pin_timer_t* t = self->timer; -// uint8_t resolution; -// if (t->is_tc) { -// resolution = 16; -// } else { -// resolution = 24; -// } -// uint32_t system_clock = common_hal_mcu_processor_get_frequency(); -// uint32_t new_top; -// uint8_t new_divisor; -// for (new_divisor = 0; new_divisor < 8; new_divisor++) { -// new_top = (system_clock / prescaler[new_divisor] / frequency) - 1; -// if (new_top < (1u << resolution)) { -// break; -// } -// } -// uint16_t old_duty = common_hal_pwmio_pwmout_get_duty_cycle(self); -// if (t->is_tc) { -// Tc* tc = tc_insts[t->index]; -// uint8_t old_divisor = tc->COUNT16.CTRLA.bit.PRESCALER; -// if (new_divisor != old_divisor) { -// tc_set_enable(tc, false); -// tc->COUNT16.CTRLA.bit.PRESCALER = new_divisor; -// tc_set_enable(tc, true); -// } -// tc_periods[t->index] = new_top; -// #ifdef SAMD21 -// tc->COUNT16.CC[0].reg = new_top; -// #endif -// #ifdef SAMD51 -// while (tc->COUNT16.SYNCBUSY.reg != 0) {} -// tc->COUNT16.CCBUF[0].reg = new_top; -// #endif -// } else { -// Tcc* tcc = tcc_insts[t->index]; -// uint8_t old_divisor = tcc->CTRLA.bit.PRESCALER; -// if (new_divisor != old_divisor) { -// tcc_set_enable(tcc, false); -// tcc->CTRLA.bit.PRESCALER = new_divisor; -// tcc_set_enable(tcc, true); -// } -// while (tcc->SYNCBUSY.reg != 0) {} -// tcc_periods[t->index] = new_top; -// #ifdef SAMD21 -// tcc->PERB.bit.PERB = new_top; -// #endif -// #ifdef SAMD51 -// tcc->PERBUF.bit.PERBUF = new_top; -// #endif -// } -// common_hal_pwmio_pwmout_set_duty_cycle(self, old_duty); + if (frequency > PWM_SRC_CLK_FREQ/2) { + mp_raise_ValueError(translate("Invalid PWM frequency")); + } + + if (PWM_SRC_CLK_FREQ / frequency >= 65536) { + mp_raise_ValueError(translate("Invalid PWM frequency")); + } + + self->pulse_count = PWM_SRC_CLK_FREQ/frequency; + self->pwm->pwm->SM[self->pwm->submodule].VAL1 = self->pulse_count; + common_hal_pwmio_pwmout_set_duty_cycle(self, self->duty_cycle); } uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t *self) { -// uint32_t system_clock = common_hal_mcu_processor_get_frequency(); -// const pin_timer_t* t = self->timer; -// uint8_t divisor; -// uint32_t top; -// if (t->is_tc) { -// divisor = tc_insts[t->index]->COUNT16.CTRLA.bit.PRESCALER; -// top = tc_periods[t->index]; -// } else { -// divisor = tcc_insts[t->index]->CTRLA.bit.PRESCALER; -// top = tcc_periods[t->index]; -// } -// return (system_clock / prescaler[divisor]) / (top + 1); - return 0; + return PWM_SRC_CLK_FREQ/self->pulse_count; } bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t *self) { diff --git a/ports/mimxrt10xx/common-hal/pwmio/PWMOut.h b/ports/mimxrt10xx/common-hal/pwmio/PWMOut.h index d3954de401..0031297bd2 100644 --- a/ports/mimxrt10xx/common-hal/pwmio/PWMOut.h +++ b/ports/mimxrt10xx/common-hal/pwmio/PWMOut.h @@ -37,6 +37,7 @@ typedef struct { const mcu_pin_obj_t *pin; const mcu_pwm_obj_t *pwm; bool variable_frequency; + uint16_t duty_cycle, duty_scaled, pulse_count; } pwmio_pwmout_obj_t; void pwmout_reset(void); diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.c index 66dc56e4e0..bdf3299217 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.c @@ -134,35 +134,35 @@ const mcu_periph_obj_t mcu_uart_cts_list[4] = { }; const mcu_pwm_obj_t mcu_pwm_list[20] = { - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 2, &pin_GPIO_02), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 2, &pin_GPIO_SD_02), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_02_FLEXPWM1_PWM0_A, &pin_GPIO_02), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_SD_02_FLEXPWM1_PWM0_A, &pin_GPIO_SD_02), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 2, &pin_GPIO_01), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 2, &pin_GPIO_SD_01), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_01_FLEXPWM1_PWM0_B, &pin_GPIO_01), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_SD_01_FLEXPWM1_PWM0_B, &pin_GPIO_SD_01), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, 1, &pin_GPIO_AD_12), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, IOMUXC_GPIO_AD_12_FLEXPWM1_PWM0_X, &pin_GPIO_AD_12), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 2, &pin_GPIO_04), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 2, &pin_GPIO_SD_04), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_04_FLEXPWM1_PWM1_A, &pin_GPIO_04), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_SD_04_FLEXPWM1_PWM1_A, &pin_GPIO_SD_04), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 2, &pin_GPIO_03), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 2, &pin_GPIO_SD_03), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_03_FLEXPWM1_PWM1_B, &pin_GPIO_03), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_SD_03_FLEXPWM1_PWM1_B, &pin_GPIO_SD_03), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, 1, &pin_GPIO_AD_11), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, IOMUXC_GPIO_AD_11_FLEXPWM1_PWM1_X, &pin_GPIO_AD_11), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 2, &pin_GPIO_06), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 2, &pin_GPIO_AD_04), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_06_FLEXPWM1_PWM2_A, &pin_GPIO_06), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_AD_04_FLEXPWM1_PWM2_A, &pin_GPIO_AD_04), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 2, &pin_GPIO_05), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 2, &pin_GPIO_AD_03), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_05_FLEXPWM1_PWM2_B, &pin_GPIO_05), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_AD_03_FLEXPWM1_PWM2_B, &pin_GPIO_AD_03), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, 1, &pin_GPIO_AD_10), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, IOMUXC_GPIO_AD_10_FLEXPWM1_PWM2_X, &pin_GPIO_AD_10), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 2, &pin_GPIO_08), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 2, &pin_GPIO_AD_06), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_08_FLEXPWM1_PWM3_A, &pin_GPIO_08), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_AD_06_FLEXPWM1_PWM3_A, &pin_GPIO_AD_06), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 2, &pin_GPIO_07), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 2, &pin_GPIO_AD_05), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_07_FLEXPWM1_PWM3_B, &pin_GPIO_07), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_AD_05_FLEXPWM1_PWM3_B, &pin_GPIO_AD_05), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmX, 1, &pin_GPIO_AD_09), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmX, IOMUXC_GPIO_AD_09_FLEXPWM1_PWM3_X, &pin_GPIO_AD_09), }; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c index 754ef01c39..2666b5a631 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c @@ -199,60 +199,60 @@ const mcu_periph_obj_t mcu_uart_cts_list[10] = { }; const mcu_pwm_obj_t mcu_pwm_list[39] = { - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_EMC_26), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_AD_B1_06), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_26), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, 0, &pin_GPIO_AD_B1_06), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_EMC_24), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_AD_B1_08), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_24), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, 0, &pin_GPIO_AD_B1_08), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_EMC_22), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_AD_B1_10), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_22), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, 0, &pin_GPIO_AD_B1_10), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_EMC_20), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 6, &pin_GPIO_AD_B1_12), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_20), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 6, 0, &pin_GPIO_AD_B1_12), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_EMC_27), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_AD_B1_07), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_27), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, 0, &pin_GPIO_AD_B1_07), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_EMC_25), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_AD_B1_09), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_25), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, 0, &pin_GPIO_AD_B1_09), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_EMC_23), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_AD_B1_11), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_23), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, 0, &pin_GPIO_AD_B1_11), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 1, &pin_GPIO_EMC_21), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 6, &pin_GPIO_AD_B1_13), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_21), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 6, 0, &pin_GPIO_AD_B1_13), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, 7, &pin_GPIO_EMC_28), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, 7, &pin_GPIO_EMC_29), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, 7, &pin_GPIO_EMC_30), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, 7, 1, &pin_GPIO_EMC_28), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, 7, 1, &pin_GPIO_EMC_29), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, 7, 1, &pin_GPIO_EMC_30), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_EMC_38), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 4, &pin_GPIO_AD_B0_14), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_38), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 4, 0, &pin_GPIO_AD_B0_14), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_EMC_36), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 4, &pin_GPIO_AD_B0_12), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_36), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 4, 0, &pin_GPIO_AD_B0_12), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_EMC_30), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 4, &pin_GPIO_AD_B0_10), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_30), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 4, 0, &pin_GPIO_AD_B0_10), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_EMC_28), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 4, &pin_GPIO_AD_B0_06), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_28), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 4, 0, &pin_GPIO_AD_B0_06), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_EMC_39), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 4, &pin_GPIO_AD_B0_15), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_39), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 4, 0, &pin_GPIO_AD_B0_15), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_EMC_37), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 4, &pin_GPIO_AD_B0_13), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_37), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 4, 0, &pin_GPIO_AD_B0_13), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_EMC_31), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 4, &pin_GPIO_AD_B0_11), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_31), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 4, 0, &pin_GPIO_AD_B0_11), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 1, &pin_GPIO_EMC_29), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 4, &pin_GPIO_AD_B0_07), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_29), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 4, 0, &pin_GPIO_AD_B0_07), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmX, 6, &pin_GPIO_EMC_10), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmX, 6, &pin_GPIO_EMC_11), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmX, 6, &pin_GPIO_EMC_12), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmX, 6, &pin_GPIO_EMC_13), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmX, 6, 0, &pin_GPIO_EMC_10), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmX, 6, 0, &pin_GPIO_EMC_11), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmX, 6, 0, &pin_GPIO_EMC_12), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmX, 6, 0, &pin_GPIO_EMC_13), }; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c index e1c6968fcf..2bfc51bd88 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c @@ -202,107 +202,107 @@ const mcu_periph_obj_t mcu_uart_cts_list[9] = { }; const mcu_pwm_obj_t mcu_pwm_list[67] = { - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_EMC_23), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_SD_B0_00), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_23), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, 1, &pin_GPIO_SD_B0_00), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_EMC_24), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_SD_B0_01), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_24), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, 1, &pin_GPIO_SD_B0_01), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, 4, &pin_GPIO_AD_B0_02), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, 4, 0, &pin_GPIO_AD_B0_02), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_EMC_25), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_SD_B0_02), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_25), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, 1, &pin_GPIO_SD_B0_02), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_EMC_26), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_SD_B0_03), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_26), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, 1, &pin_GPIO_SD_B0_03), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, 4, &pin_GPIO_AD_B0_03), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, 4, 0, &pin_GPIO_AD_B0_03), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_EMC_27), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_SD_B0_04), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_27), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, 1, &pin_GPIO_SD_B0_04), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_EMC_28), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_SD_B0_05), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_28), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, 1, &pin_GPIO_SD_B0_05), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, 4, &pin_GPIO_AD_B0_12), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, 4, 0, &pin_GPIO_AD_B0_12), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_AD_B0_10), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_EMC_38), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 2, &pin_GPIO_SD_B1_00), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 4, &pin_GPIO_EMC_12), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 6, &pin_GPIO_B1_00), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 1, 3, &pin_GPIO_AD_B0_10), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 1, 2, &pin_GPIO_EMC_38), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 2, 0, &pin_GPIO_SD_B1_00), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 4, 1, &pin_GPIO_EMC_12), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 6, 4, &pin_GPIO_B1_00), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 1, &pin_GPIO_AD_B0_11), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 1, &pin_GPIO_EMC_39), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 2, &pin_GPIO_SD_B1_01), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 4, &pin_GPIO_EMC_13), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 6, &pin_GPIO_B1_01), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 1, 3, &pin_GPIO_AD_B0_11), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 1, 2, &pin_GPIO_EMC_39), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 2, 0, &pin_GPIO_SD_B1_01), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 4, 1, &pin_GPIO_EMC_13), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 6, 4, &pin_GPIO_B1_01), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmX, 4, &pin_GPIO_AD_B0_13), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmX, 4, 0, &pin_GPIO_AD_B0_13), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_EMC_06), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 2, &pin_GPIO_B0_06), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_06), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 2, 1, &pin_GPIO_B0_06), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_EMC_07), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 2, &pin_GPIO_B0_07), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_07), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 2, 1, &pin_GPIO_B0_07), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_EMC_08), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 2, &pin_GPIO_B0_08), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_08), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 2, 1, &pin_GPIO_B0_08), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_EMC_09), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 2, &pin_GPIO_B0_09), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_09), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 2, 1, &pin_GPIO_B0_09), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_EMC_10), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 2, &pin_GPIO_B0_10), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_10), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 2, 1, &pin_GPIO_B0_10), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_EMC_11), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 2, &pin_GPIO_B0_11), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_11), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 2, 1, &pin_GPIO_B0_11), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 0, &pin_GPIO_AD_B0_00), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_AD_B0_09), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_EMC_19), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 2, &pin_GPIO_SD_B1_02), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 6, &pin_GPIO_B1_02), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 0, 2, &pin_GPIO_AD_B0_00), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 1, 3, &pin_GPIO_AD_B0_09), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_19), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 2, 0, &pin_GPIO_SD_B1_02), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 6, 4, &pin_GPIO_B1_02), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 0, &pin_GPIO_AD_B0_01), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 1, &pin_GPIO_EMC_20), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 2, &pin_GPIO_SD_B1_03), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 6, &pin_GPIO_B1_03), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 0, 2, &pin_GPIO_AD_B0_01), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_20), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 2, 0, &pin_GPIO_SD_B1_03), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 6, 3, &pin_GPIO_B1_03), - PWM_PIN(PWM3, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_EMC_29), + PWM_PIN(PWM3, kPWM_Module_0, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_29), - PWM_PIN(PWM3, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_EMC_30), + PWM_PIN(PWM3, kPWM_Module_0, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_30), - PWM_PIN(PWM3, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_EMC_31), + PWM_PIN(PWM3, kPWM_Module_1, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_31), - PWM_PIN(PWM3, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_EMC_32), + PWM_PIN(PWM3, kPWM_Module_1, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_32), - PWM_PIN(PWM3, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_EMC_33), + PWM_PIN(PWM3, kPWM_Module_2, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_33), - PWM_PIN(PWM3, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_EMC_34), + PWM_PIN(PWM3, kPWM_Module_2, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_34), - PWM_PIN(PWM3, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_EMC_21), + PWM_PIN(PWM3, kPWM_Module_3, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_21), - PWM_PIN(PWM3, kPWM_Module_3, kPWM_PwmB, 1, &pin_GPIO_EMC_22), + PWM_PIN(PWM3, kPWM_Module_3, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_22), - PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_AD_B1_08), - PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_EMC_00), + PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmA, 1, 1, &pin_GPIO_AD_B1_08), + PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_00), - PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_EMC_01), + PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_01), - PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_AD_B1_09), - PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_EMC_02), + PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmA, 1, 1, &pin_GPIO_AD_B1_09), + PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_02), - PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_EMC_03), + PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_03), - PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_B1_14), - PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_EMC_04), + PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmA, 1, 1, &pin_GPIO_B1_14), + PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_04), - PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_EMC_05), + PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_05), - PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_B1_15), - PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_EMC_17), + PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmA, 1, 1, &pin_GPIO_B1_15), + PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_17), - PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmB, 1, &pin_GPIO_EMC_18), + PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_18), }; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h index ab0ebf0454..1b808b0b18 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h @@ -49,18 +49,26 @@ typedef struct { typedef struct { PWM_Type *pwm; - pwm_submodule_t submodule : 4; - pwm_channels_t channel : 4; + pwm_submodule_t submodule:4; + pwm_channels_t channel:4; uint8_t mux_mode; + uint8_t input_idx; + uint32_t input_reg; const mcu_pin_obj_t *pin; } mcu_pwm_obj_t; -#define PWM_PIN(p_pwm, p_submodule, p_channel, p_mux_mode, p_pin) \ +#define PWM_PIN(p_pwm, p_submodule, p_channel, p_iomuxc, p_pin) \ + PWM_PIN_(p_pwm, p_submodule, p_channel, p_iomuxc, p_pin) + //----------------------------------------------------------// + // supplied by the expansion of p_iomuxc into multiple args // +#define PWM_PIN_(p_pwm, p_submodule, p_channel, p_mux_reg, p_mux_mode, p_input_reg, p_input_idx, p_config_reg, p_pin)\ { \ .pwm = p_pwm, \ .submodule = p_submodule, \ .channel = p_channel, \ .mux_mode = p_mux_mode, \ + .input_reg = p_input_reg, \ + .input_idx = p_input_idx, \ .pin = p_pin, \ } From 89fc0298ce6d7ee64246ce263223ce26883125a4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 1 Apr 2021 13:04:06 -0500 Subject: [PATCH 175/261] mimxrt1011: pwmout: Add prescaler, fix duty_cycle=65535 --- ports/mimxrt10xx/common-hal/pwmio/PWMOut.c | 60 ++++++++++++++++------ ports/mimxrt10xx/common-hal/pwmio/PWMOut.h | 1 + 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c b/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c index 8ef1823e1f..458fee6412 100644 --- a/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +++ b/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c @@ -149,6 +149,21 @@ void pwmout_reset(void) { #define PWM_SRC_CLK_FREQ CLOCK_GetFreq(kCLOCK_IpgClk) +static int calculate_pulse_count(uint32_t frequency, uint8_t *prescaler) { + if (frequency > PWM_SRC_CLK_FREQ/2) { + return 0; + } + for(int shift = 0; shift<8; shift++) { + int pulse_count = PWM_SRC_CLK_FREQ/(1<= 65535) { + continue; + } + *prescaler = shift; + return pulse_count; + } + return 0; +} + pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, const mcu_pin_obj_t *pin, uint16_t duty, @@ -196,18 +211,18 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, // pwmConfig.reloadLogic = kPWM_ReloadPwmFullCycle; pwmConfig.enableDebugMode = true; + self->pulse_count = calculate_pulse_count(frequency, &self->prescaler); + + if (self->pulse_count == 0) { + return PWMOUT_INVALID_FREQUENCY; + } + + pwmConfig.prescale = self->prescaler; + if (PWM_Init(self->pwm->pwm, self->pwm->submodule, &pwmConfig) == kStatus_Fail) { return PWMOUT_INVALID_PIN; } - if (frequency == 0 || frequency > PWM_SRC_CLK_FREQ/2) { - return PWMOUT_INVALID_FREQUENCY; - } - - if (PWM_SRC_CLK_FREQ / frequency >= 65536) { - return PWMOUT_INVALID_FREQUENCY; - } - pwm_signal_param_t pwmSignal = { .pwmChannel = self->pwm->channel, .level = kPWM_HighTrue, @@ -228,7 +243,6 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, PWM_StartTimer(self->pwm->pwm, 1 << self->pwm->submodule); - self->pulse_count = PWM_SRC_CLK_FREQ/frequency; common_hal_pwmio_pwmout_set_duty_cycle(self, duty); @@ -253,7 +267,11 @@ void common_hal_pwmio_pwmout_set_duty_cycle(pwmio_pwmout_obj_t *self, uint16_t d // * it works in integer percents // * it can't set the "X" duty cycle self->duty_cycle = duty; - self->duty_scaled = ((uint32_t)duty * self->pulse_count + self->pulse_count/2) / 65535; + if (duty == 65535) { + self->duty_scaled = self->pulse_count + 1; + } else { + self->duty_scaled = ((uint32_t)duty * self->pulse_count + self->pulse_count/2) / 65535; + } switch (self->pwm->channel) { case kPWM_PwmX: self->pwm->pwm->SM[self->pwm->submodule].VAL0 = 0; @@ -271,27 +289,37 @@ void common_hal_pwmio_pwmout_set_duty_cycle(pwmio_pwmout_obj_t *self, uint16_t d } uint16_t common_hal_pwmio_pwmout_get_duty_cycle(pwmio_pwmout_obj_t *self) { + if (self->duty_cycle == 65535) { + return 65535; + } return ((uint32_t)self->duty_scaled * 65535 + 65535/2) / self->pulse_count; } void common_hal_pwmio_pwmout_set_frequency(pwmio_pwmout_obj_t *self, uint32_t frequency) { - if (frequency > PWM_SRC_CLK_FREQ/2) { + int pulse_count = calculate_pulse_count(frequency, &self->prescaler); + if (pulse_count == 0) { mp_raise_ValueError(translate("Invalid PWM frequency")); } - if (PWM_SRC_CLK_FREQ / frequency >= 65536) { - mp_raise_ValueError(translate("Invalid PWM frequency")); - } + self->pulse_count = pulse_count; - self->pulse_count = PWM_SRC_CLK_FREQ/frequency; + // a small glitch can occur when adjusting the prescaler, from the setting + // of CTRL just below to the setting of the Ldok register in + // set_duty_cycle. + uint32_t reg = self->pwm->pwm->SM[self->pwm->submodule].CTRL; + reg &= ~(PWM_CTRL_PRSC_MASK); + reg |= PWM_CTRL_PRSC(self->prescaler); + self->pwm->pwm->SM[self->pwm->submodule].CTRL = reg; self->pwm->pwm->SM[self->pwm->submodule].VAL1 = self->pulse_count; + + // we need to recalculate the duty cycle. As a side effect of this common_hal_pwmio_pwmout_set_duty_cycle(self, self->duty_cycle); } uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t *self) { - return PWM_SRC_CLK_FREQ/self->pulse_count; + return PWM_SRC_CLK_FREQ/self->pulse_count/(1 << self->prescaler); } bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t *self) { diff --git a/ports/mimxrt10xx/common-hal/pwmio/PWMOut.h b/ports/mimxrt10xx/common-hal/pwmio/PWMOut.h index 0031297bd2..fa4ce46780 100644 --- a/ports/mimxrt10xx/common-hal/pwmio/PWMOut.h +++ b/ports/mimxrt10xx/common-hal/pwmio/PWMOut.h @@ -37,6 +37,7 @@ typedef struct { const mcu_pin_obj_t *pin; const mcu_pwm_obj_t *pwm; bool variable_frequency; + uint8_t prescaler; uint16_t duty_cycle, duty_scaled, pulse_count; } pwmio_pwmout_obj_t; From 3f3cb79b7dc2af243109cbeeb418f1edf61d51f2 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 1 Apr 2021 15:59:57 -0500 Subject: [PATCH 176/261] Add pinmux info for 1021 and 1062 family MCUs --- .../mimxrt10xx/MIMXRT1021/periph.c | 78 +++++----- .../mimxrt10xx/MIMXRT1062/periph.c | 134 +++++++++--------- 2 files changed, 106 insertions(+), 106 deletions(-) diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c index 2666b5a631..5b21c12c2a 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c @@ -199,60 +199,60 @@ const mcu_periph_obj_t mcu_uart_cts_list[10] = { }; const mcu_pwm_obj_t mcu_pwm_list[39] = { - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_26), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, 0, &pin_GPIO_AD_B1_06), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_EMC_26_FLEXPWM1_PWMA00, &pin_GPIO_EMC_26), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_AD_B1_06_FLEXPWM1_PWMA00, &pin_GPIO_AD_B1_06), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_24), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, 0, &pin_GPIO_AD_B1_08), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_EMC_24_FLEXPWM1_PWMA01, &pin_GPIO_EMC_24), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_AD_B1_08_FLEXPWM1_PWMA01, &pin_GPIO_AD_B1_08), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_22), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, 0, &pin_GPIO_AD_B1_10), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_EMC_22_FLEXPWM1_PWMA02, &pin_GPIO_EMC_22), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_AD_B1_10_FLEXPWM1_PWMA02, &pin_GPIO_AD_B1_10), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_20), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 6, 0, &pin_GPIO_AD_B1_12), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_EMC_20_FLEXPWM1_PWMA03, &pin_GPIO_EMC_20), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_AD_B1_12_FLEXPWM1_PWMA03, &pin_GPIO_AD_B1_12), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_27), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, 0, &pin_GPIO_AD_B1_07), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_EMC_27_FLEXPWM1_PWMB00, &pin_GPIO_EMC_27), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_AD_B1_07_FLEXPWM1_PWMB00, &pin_GPIO_AD_B1_07), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_25), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, 0, &pin_GPIO_AD_B1_09), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_EMC_25_FLEXPWM1_PWMB01, &pin_GPIO_EMC_25), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_AD_B1_09_FLEXPWM1_PWMB01, &pin_GPIO_AD_B1_09), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_23), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, 0, &pin_GPIO_AD_B1_11), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_EMC_23_FLEXPWM1_PWMB02, &pin_GPIO_EMC_23), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_AD_B1_11_FLEXPWM1_PWMB02, &pin_GPIO_AD_B1_11), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_21), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 6, 0, &pin_GPIO_AD_B1_13), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_EMC_21_FLEXPWM1_PWMB03, &pin_GPIO_EMC_21), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_AD_B1_13_FLEXPWM1_PWMB03, &pin_GPIO_AD_B1_13), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, 7, 1, &pin_GPIO_EMC_28), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, 7, 1, &pin_GPIO_EMC_29), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, 7, 1, &pin_GPIO_EMC_30), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, IOMUXC_GPIO_EMC_28_FLEXPWM1_PWMX00, &pin_GPIO_EMC_28), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, IOMUXC_GPIO_EMC_29_FLEXPWM1_PWMX01, &pin_GPIO_EMC_29), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, IOMUXC_GPIO_EMC_30_FLEXPWM1_PWMX02, &pin_GPIO_EMC_30), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_38), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 4, 0, &pin_GPIO_AD_B0_14), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_EMC_38_FLEXPWM2_PWMA00, &pin_GPIO_EMC_38), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_AD_B0_14_FLEXPWM2_PWMA00, &pin_GPIO_AD_B0_14), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_36), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 4, 0, &pin_GPIO_AD_B0_12), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_EMC_36_FLEXPWM2_PWMA01, &pin_GPIO_EMC_36), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_AD_B0_12_FLEXPWM2_PWMA01, &pin_GPIO_AD_B0_12), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_30), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 4, 0, &pin_GPIO_AD_B0_10), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_EMC_30_FLEXPWM2_PWMA02, &pin_GPIO_EMC_30), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_AD_B0_10_FLEXPWM2_PWMA02, &pin_GPIO_AD_B0_10), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_28), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 4, 0, &pin_GPIO_AD_B0_06), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_EMC_28_FLEXPWM2_PWMA03, &pin_GPIO_EMC_28), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_AD_B0_06_FLEXPWM2_PWMA03, &pin_GPIO_AD_B0_06), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_39), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 4, 0, &pin_GPIO_AD_B0_15), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_EMC_39_FLEXPWM2_PWMB00, &pin_GPIO_EMC_39), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_AD_B0_15_FLEXPWM2_PWMB00, &pin_GPIO_AD_B0_15), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_37), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 4, 0, &pin_GPIO_AD_B0_13), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_EMC_37_FLEXPWM2_PWMB01, &pin_GPIO_EMC_37), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_AD_B0_13_FLEXPWM2_PWMB01, &pin_GPIO_AD_B0_13), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_31), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 4, 0, &pin_GPIO_AD_B0_11), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_EMC_31_FLEXPWM2_PWMB02, &pin_GPIO_EMC_31), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_AD_B0_11_FLEXPWM2_PWMB02, &pin_GPIO_AD_B0_11), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_29), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 4, 0, &pin_GPIO_AD_B0_07), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_EMC_29_FLEXPWM2_PWMB03, &pin_GPIO_EMC_29), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_AD_B0_07_FLEXPWM2_PWMB03, &pin_GPIO_AD_B0_07), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmX, 6, 0, &pin_GPIO_EMC_10), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmX, 6, 0, &pin_GPIO_EMC_11), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmX, 6, 0, &pin_GPIO_EMC_12), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmX, 6, 0, &pin_GPIO_EMC_13), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmX, IOMUXC_GPIO_EMC_10_FLEXPWM2_PWMX00, &pin_GPIO_EMC_10), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmX, IOMUXC_GPIO_EMC_11_FLEXPWM2_PWMX01, &pin_GPIO_EMC_11), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmX, IOMUXC_GPIO_EMC_12_FLEXPWM2_PWMX02, &pin_GPIO_EMC_12), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmX, IOMUXC_GPIO_EMC_13_FLEXPWM2_PWMX03, &pin_GPIO_EMC_13), }; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c index 2bfc51bd88..19ce48f288 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c @@ -202,107 +202,107 @@ const mcu_periph_obj_t mcu_uart_cts_list[9] = { }; const mcu_pwm_obj_t mcu_pwm_list[67] = { - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_23), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, 1, &pin_GPIO_SD_B0_00), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_EMC_23_FLEXPWM1_PWMA00, &pin_GPIO_EMC_23), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_SD_B0_00_FLEXPWM1_PWMA00, &pin_GPIO_SD_B0_00), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_24), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, 1, &pin_GPIO_SD_B0_01), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_EMC_24_FLEXPWM1_PWMB00, &pin_GPIO_EMC_24), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_SD_B0_01_FLEXPWM1_PWMB00, &pin_GPIO_SD_B0_01), - PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, 4, 0, &pin_GPIO_AD_B0_02), + PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, IOMUXC_GPIO_AD_B0_02_FLEXPWM1_PWMX00, &pin_GPIO_AD_B0_02), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_25), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, 1, &pin_GPIO_SD_B0_02), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_EMC_25_FLEXPWM1_PWMA01, &pin_GPIO_EMC_25), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_SD_B0_02_FLEXPWM1_PWMA01, &pin_GPIO_SD_B0_02), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_26), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, 1, &pin_GPIO_SD_B0_03), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_EMC_26_FLEXPWM1_PWMB01, &pin_GPIO_EMC_26), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_SD_B0_03_FLEXPWM1_PWMB01, &pin_GPIO_SD_B0_03), - PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, 4, 0, &pin_GPIO_AD_B0_03), + PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, IOMUXC_GPIO_AD_B0_03_FLEXPWM1_PWMX01, &pin_GPIO_AD_B0_03), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_27), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, 1, &pin_GPIO_SD_B0_04), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_EMC_27_FLEXPWM1_PWMA02, &pin_GPIO_EMC_27), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_SD_B0_04_FLEXPWM1_PWMA02, &pin_GPIO_SD_B0_04), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_28), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, 1, &pin_GPIO_SD_B0_05), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_EMC_28_FLEXPWM1_PWMB02, &pin_GPIO_EMC_28), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_SD_B0_05_FLEXPWM1_PWMB02, &pin_GPIO_SD_B0_05), - PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, 4, 0, &pin_GPIO_AD_B0_12), + PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, IOMUXC_GPIO_AD_B0_12_FLEXPWM1_PWMX02, &pin_GPIO_AD_B0_12), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 1, 3, &pin_GPIO_AD_B0_10), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 1, 2, &pin_GPIO_EMC_38), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 2, 0, &pin_GPIO_SD_B1_00), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 4, 1, &pin_GPIO_EMC_12), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 6, 4, &pin_GPIO_B1_00), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_AD_B0_10_FLEXPWM1_PWMA03, &pin_GPIO_AD_B0_10), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_EMC_38_FLEXPWM1_PWMA03, &pin_GPIO_EMC_38), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_SD_B1_00_FLEXPWM1_PWMA03, &pin_GPIO_SD_B1_00), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_EMC_12_FLEXPWM1_PWMA03, &pin_GPIO_EMC_12), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_B1_00_FLEXPWM1_PWMA03, &pin_GPIO_B1_00), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 1, 3, &pin_GPIO_AD_B0_11), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 1, 2, &pin_GPIO_EMC_39), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 2, 0, &pin_GPIO_SD_B1_01), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 4, 1, &pin_GPIO_EMC_13), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 6, 4, &pin_GPIO_B1_01), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_AD_B0_11_FLEXPWM1_PWMB03, &pin_GPIO_AD_B0_11), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_EMC_39_FLEXPWM1_PWMB03, &pin_GPIO_EMC_39), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_SD_B1_01_FLEXPWM1_PWMB03, &pin_GPIO_SD_B1_01), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_EMC_13_FLEXPWM1_PWMB03, &pin_GPIO_EMC_13), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_B1_01_FLEXPWM1_PWMB03, &pin_GPIO_B1_01), - PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmX, 4, 0, &pin_GPIO_AD_B0_13), + PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmX, IOMUXC_GPIO_AD_B0_13_FLEXPWM1_PWMX03, &pin_GPIO_AD_B0_13), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_06), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 2, 1, &pin_GPIO_B0_06), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_EMC_06_FLEXPWM2_PWMA00, &pin_GPIO_EMC_06), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_B0_06_FLEXPWM2_PWMA00, &pin_GPIO_B0_06), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_07), - PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 2, 1, &pin_GPIO_B0_07), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_EMC_07_FLEXPWM2_PWMB00, &pin_GPIO_EMC_07), + PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_B0_07_FLEXPWM2_PWMB00, &pin_GPIO_B0_07), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_08), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 2, 1, &pin_GPIO_B0_08), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_EMC_08_FLEXPWM2_PWMA01, &pin_GPIO_EMC_08), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_B0_08_FLEXPWM2_PWMA01, &pin_GPIO_B0_08), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_09), - PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 2, 1, &pin_GPIO_B0_09), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_EMC_09_FLEXPWM2_PWMB01, &pin_GPIO_EMC_09), + PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_B0_09_FLEXPWM2_PWMB01, &pin_GPIO_B0_09), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_10), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 2, 1, &pin_GPIO_B0_10), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_EMC_10_FLEXPWM2_PWMA02, &pin_GPIO_EMC_10), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_B0_10_FLEXPWM2_PWMA02, &pin_GPIO_B0_10), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_11), - PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 2, 1, &pin_GPIO_B0_11), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_EMC_11_FLEXPWM2_PWMB02, &pin_GPIO_EMC_11), + PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_B0_11_FLEXPWM2_PWMB02, &pin_GPIO_B0_11), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 0, 2, &pin_GPIO_AD_B0_00), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 1, 3, &pin_GPIO_AD_B0_09), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 1, 1, &pin_GPIO_EMC_19), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 2, 0, &pin_GPIO_SD_B1_02), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 6, 4, &pin_GPIO_B1_02), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_AD_B0_00_FLEXPWM2_PWMA03, &pin_GPIO_AD_B0_00), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_AD_B0_09_FLEXPWM2_PWMA03, &pin_GPIO_AD_B0_09), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_EMC_19_FLEXPWM2_PWMA03, &pin_GPIO_EMC_19), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_SD_B1_02_FLEXPWM2_PWMA03, &pin_GPIO_SD_B1_02), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_B1_02_FLEXPWM2_PWMA03, &pin_GPIO_B1_02), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 0, 2, &pin_GPIO_AD_B0_01), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_20), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 2, 0, &pin_GPIO_SD_B1_03), - PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 6, 3, &pin_GPIO_B1_03), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_AD_B0_01_FLEXPWM2_PWMB03, &pin_GPIO_AD_B0_01), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_EMC_20_FLEXPWM2_PWMB03, &pin_GPIO_EMC_20), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_SD_B1_03_FLEXPWM2_PWMB03, &pin_GPIO_SD_B1_03), + PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_B1_03_FLEXPWM2_PWMB03, &pin_GPIO_B1_03), - PWM_PIN(PWM3, kPWM_Module_0, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_29), + PWM_PIN(PWM3, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_EMC_29_FLEXPWM3_PWMA00, &pin_GPIO_EMC_29), - PWM_PIN(PWM3, kPWM_Module_0, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_30), + PWM_PIN(PWM3, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_EMC_30_FLEXPWM3_PWMB00, &pin_GPIO_EMC_30), - PWM_PIN(PWM3, kPWM_Module_1, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_31), + PWM_PIN(PWM3, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_EMC_31_FLEXPWM3_PWMA01, &pin_GPIO_EMC_31), - PWM_PIN(PWM3, kPWM_Module_1, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_32), + PWM_PIN(PWM3, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_EMC_32_FLEXPWM3_PWMB01, &pin_GPIO_EMC_32), - PWM_PIN(PWM3, kPWM_Module_2, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_33), + PWM_PIN(PWM3, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_EMC_33_FLEXPWM3_PWMA02, &pin_GPIO_EMC_33), - PWM_PIN(PWM3, kPWM_Module_2, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_34), + PWM_PIN(PWM3, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_EMC_34_FLEXPWM3_PWMB02, &pin_GPIO_EMC_34), - PWM_PIN(PWM3, kPWM_Module_3, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_21), + PWM_PIN(PWM3, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_EMC_21_FLEXPWM3_PWMA03, &pin_GPIO_EMC_21), - PWM_PIN(PWM3, kPWM_Module_3, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_22), + PWM_PIN(PWM3, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_EMC_22_FLEXPWM3_PWMB03, &pin_GPIO_EMC_22), - PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmA, 1, 1, &pin_GPIO_AD_B1_08), - PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_00), + PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_AD_B1_08_FLEXPWM4_PWMA00, &pin_GPIO_AD_B1_08), + PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmA, IOMUXC_GPIO_EMC_00_FLEXPWM4_PWMA00, &pin_GPIO_EMC_00), - PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_01), + PWM_PIN(PWM4, kPWM_Module_0, kPWM_PwmB, IOMUXC_GPIO_EMC_01_FLEXPWM4_PWMB00, &pin_GPIO_EMC_01), - PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmA, 1, 1, &pin_GPIO_AD_B1_09), - PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_02), + PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_AD_B1_09_FLEXPWM4_PWMA01, &pin_GPIO_AD_B1_09), + PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmA, IOMUXC_GPIO_EMC_02_FLEXPWM4_PWMA01, &pin_GPIO_EMC_02), - PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_03), + PWM_PIN(PWM4, kPWM_Module_1, kPWM_PwmB, IOMUXC_GPIO_EMC_03_FLEXPWM4_PWMB01, &pin_GPIO_EMC_03), - PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmA, 1, 1, &pin_GPIO_B1_14), - PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_04), + PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_B1_14_FLEXPWM4_PWMA02, &pin_GPIO_B1_14), + PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmA, IOMUXC_GPIO_EMC_04_FLEXPWM4_PWMA02, &pin_GPIO_EMC_04), - PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmB, 1, 0, &pin_GPIO_EMC_05), + PWM_PIN(PWM4, kPWM_Module_2, kPWM_PwmB, IOMUXC_GPIO_EMC_05_FLEXPWM4_PWMB02, &pin_GPIO_EMC_05), - PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmA, 1, 1, &pin_GPIO_B1_15), - PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmA, 1, 0, &pin_GPIO_EMC_17), + PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_B1_15_FLEXPWM4_PWMA03, &pin_GPIO_B1_15), + PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmA, IOMUXC_GPIO_EMC_17_FLEXPWM4_PWMA03, &pin_GPIO_EMC_17), - PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmB, 1, 1, &pin_GPIO_EMC_18), + PWM_PIN(PWM4, kPWM_Module_3, kPWM_PwmB, IOMUXC_GPIO_EMC_18_FLEXPWM4_PWMB03, &pin_GPIO_EMC_18), }; From a9b4e04643ec6eeec32a508286871425ce18aca1 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Fri, 2 Apr 2021 08:08:02 +1100 Subject: [PATCH 177/261] Changed some pins for TinyS2 --- ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c b/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c index 7b07b89293..9815cf288d 100644 --- a/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c @@ -30,18 +30,18 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO4) }, { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO4) }, - { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_SDO), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, - { MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, From 58835e5a5b2e5f20357ad49d77d93a1aa9cf4364 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 1 Apr 2021 14:13:58 -0700 Subject: [PATCH 178/261] Two small PacketBuffer fixes 1. Allow for ctrl-c during a write. 2. Handle disconnects when acting as a client. --- ports/nrf/common-hal/_bleio/PacketBuffer.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ports/nrf/common-hal/_bleio/PacketBuffer.c b/ports/nrf/common-hal/_bleio/PacketBuffer.c index 8f87b24972..311988eb46 100644 --- a/ports/nrf/common-hal/_bleio/PacketBuffer.c +++ b/ports/nrf/common-hal/_bleio/PacketBuffer.c @@ -106,13 +106,16 @@ STATIC uint32_t queue_next_write(bleio_packet_buffer_obj_t *self) { STATIC bool packet_buffer_on_ble_client_evt(ble_evt_t *ble_evt, void *param) { const uint16_t evt_id = ble_evt->header.evt_id; + bleio_packet_buffer_obj_t *self = (bleio_packet_buffer_obj_t *)param; + if (evt_id == BLE_GAP_EVT_DISCONNECTED && self->conn_handle == ble_evt->evt.gap_evt.conn_handle) { + self->conn_handle = BLE_CONN_HANDLE_INVALID; + } // Check if this is a GATTC event so we can make sure the conn_handle is valid. if (evt_id < BLE_GATTC_EVT_BASE || evt_id > BLE_GATTC_EVT_LAST) { return false; } uint16_t conn_handle = ble_evt->evt.gattc_evt.conn_handle; - bleio_packet_buffer_obj_t *self = (bleio_packet_buffer_obj_t *)param; if (conn_handle != self->conn_handle) { return false; } @@ -298,11 +301,14 @@ mp_int_t common_hal_bleio_packet_buffer_write(bleio_packet_buffer_obj_t *self, u if (len + self->pending_size > outgoing_packet_length) { // No room to append len bytes to packet. Wait until we get a free buffer, // and keep checking that we haven't been disconnected. - while (self->pending_size != 0 && self->conn_handle != BLE_CONN_HANDLE_INVALID) { + while (self->pending_size != 0 && + self->conn_handle != BLE_CONN_HANDLE_INVALID && + !mp_hal_is_interrupted()) { RUN_BACKGROUND_TASKS; } } - if (self->conn_handle == BLE_CONN_HANDLE_INVALID) { + if (self->conn_handle == BLE_CONN_HANDLE_INVALID || + mp_hal_is_interrupted()) { return -1; } From 7c3975ecf236b3da573af7dc345801e02022c163 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Apr 2021 17:57:56 +0700 Subject: [PATCH 179/261] update tinyusb to fix midi buffer overflow issue --- lib/tinyusb | 2 +- shared-module/usb_midi/PortIn.c | 2 +- shared-module/usb_midi/PortOut.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tinyusb b/lib/tinyusb index 2adb7e7193..ab4d30fd6b 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 2adb7e719316b12c53a907153cfa0056db1abd70 +Subproject commit ab4d30fd6bca02c73eb9b4ff82db0b2b0f403344 diff --git a/shared-module/usb_midi/PortIn.c b/shared-module/usb_midi/PortIn.c index 31e320baab..e00a5124cf 100644 --- a/shared-module/usb_midi/PortIn.c +++ b/shared-module/usb_midi/PortIn.c @@ -29,7 +29,7 @@ #include "tusb.h" size_t common_hal_usb_midi_portin_read(usb_midi_portin_obj_t *self, uint8_t *data, size_t len, int *errcode) { - return tud_midi_read(data, len); + return tud_midi_stream_read(data, len); } uint32_t common_hal_usb_midi_portin_bytes_available(usb_midi_portin_obj_t *self) { diff --git a/shared-module/usb_midi/PortOut.c b/shared-module/usb_midi/PortOut.c index 0b37dcfd41..f453a67671 100644 --- a/shared-module/usb_midi/PortOut.c +++ b/shared-module/usb_midi/PortOut.c @@ -29,7 +29,7 @@ #include "tusb.h" size_t common_hal_usb_midi_portout_write(usb_midi_portout_obj_t *self, const uint8_t *data, size_t len, int *errcode) { - return tud_midi_write(0, data, len); + return tud_midi_stream_write(0, data, len); } bool common_hal_usb_midi_portout_ready_to_tx(usb_midi_portout_obj_t *self) { From 12b0ee0a3e16c6db0e359fdc6cd8d23b54168789 Mon Sep 17 00:00:00 2001 From: Neradoc Date: Mon, 29 Mar 2021 18:14:37 +0200 Subject: [PATCH 180/261] add alias boards and bus_device to the support matrix add list with manual brand names for aliases the new info in the support_matrix is used in build_board_info.py --- docs/shared_bindings_matrix.py | 65 ++++++++++++++++++++++++++++++---- tools/build_board_info.py | 28 +++------------ 2 files changed, 63 insertions(+), 30 deletions(-) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index e62b1d2186..e87769f06c 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -32,6 +32,39 @@ from concurrent.futures import ThreadPoolExecutor SUPPORTED_PORTS = ['atmel-samd', 'cxd56', 'esp32s2', 'litex', 'mimxrt10xx', 'nrf', 'raspberrypi', 'stm'] +aliases_by_board = { + "circuitplayground_express": [ + "circuitplayground_express_4h", + "circuitplayground_express_digikey_pycon2019", + ], + "pybadge": ["edgebadge"], + "pyportal": ["pyportal_pynt"], + "gemma_m0": ["gemma_m0_pycon2018"], + "pewpew10": ["pewpew13"], +} + +aliases_brand_names = { + "circuitplayground_express_4h": + "Adafruit Circuit Playground Express 4-H", + "circuitplayground_express_digikey_pycon2019": + "Circuit Playground Express Digi-Key PyCon 2019", + "edgebadge": + "Adafruit EdgeBadge", + "pyportal_pynt": + "Adafruit PyPortal Pynt", + "gemma_m0_pycon2018": + "Adafruit Gemma M0 PyCon 2018", + "pewpew13": + "PewPew 13", +} + +additional_modules = { + "fontio": "CIRCUITPY_DISPLAYIO", + "terminalio": "CIRCUITPY_DISPLAYIO", + # "socket": "CIRCUITPY_NETWORK", + "adafruit_bus_device": "CIRCUITPY_BUSDEVICE", +} + def get_circuitpython_root_dir(): """ The path to the root './circuitpython' directory """ @@ -71,8 +104,11 @@ def build_module_map(): full_build = False for module in modules: full_name = module - search_name = module.lstrip("_") - re_pattern = "CIRCUITPY_{}\s*\??=\s*(.+)".format(search_name.upper()) + if module in additional_modules: + search_identifier = additional_modules[module] + else: + search_identifier = 'CIRCUITPY_'+module.lstrip("_").upper() + re_pattern = f"{re.escape(search_identifier)}\s*\??=\s*(.+)" find_config = re.findall(re_pattern, configs) if not find_config: continue @@ -84,11 +120,12 @@ def build_module_map(): else: default_val = "None" - base[search_name] = { + base[module] = { "name": full_name, "full_build": str(full_build), "default_value": default_val, - "excluded": {} + "excluded": {}, + "key": search_identifier, } return base @@ -164,14 +201,28 @@ def support_matrix_by_board(use_branded_name=True): board_modules = [] for module in base: - key = f'CIRCUITPY_{module.upper()}' + key = base[module]['key'] if int(lookup_setting(settings, key, '0')): board_modules.append(base[module]['name']) + board_modules.sort() - return (board_name, sorted(board_modules)) + # generate alias boards too + board_matrix = [(board_name, board_modules)] + if entry.name in aliases_by_board: + for alias in aliases_by_board[entry.name]: + if use_branded_name: + if alias in aliases_brand_names: + alias = aliases_brand_names[alias] + else: + alias = alias.replace("_"," ").title() + board_matrix.append( (alias, board_modules) ) + + return board_matrix # this is now a list of (board,modules) executor = ThreadPoolExecutor(max_workers=os.cpu_count()) - boards = dict(sorted(executor.map(support_matrix, all_ports_all_boards()))) + mapped_exec = executor.map(support_matrix, all_ports_all_boards()) + # flatmap with comprehensions + boards = dict(sorted([board for matrix in mapped_exec for board in matrix])) #print(json.dumps(boards, indent=2)) return boards diff --git a/tools/build_board_info.py b/tools/build_board_info.py index d89b6ac2c6..94f6e50af1 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -19,16 +19,8 @@ import shared_bindings_matrix sys.path.append("adabot") import adabot.github_requests as github -SUPPORTED_PORTS = [ - "atmel-samd", - "cxd56", - "esp32s2", - "litex", - "mimxrt10xx", - "nrf", - "raspberrypi", - "stm", -] +from shared_bindings_matrix import SUPPORTED_PORTS +from shared_bindings_matrix import aliases_by_board BIN = ("bin",) UF2 = ("uf2",) @@ -73,17 +65,6 @@ extension_by_board = { "meowbit_v121": UF2, } -aliases_by_board = { - "circuitplayground_express": [ - "circuitplayground_express_4h", - "circuitplayground_express_digikey_pycon2019", - ], - "pybadge": ["edgebadge"], - "pyportal": ["pyportal_pynt"], - "gemma_m0": ["gemma_m0_pycon2018"], - "pewpew10": ["pewpew13"], -} - language_allow_list = set([ "ID", "de_DE", @@ -312,7 +293,7 @@ def generate_download_info(): new_version = { "stable": new_stable, "version": new_tag, - "modules": support_matrix[board_id], + "modules": support_matrix[alias], "languages": languages, "extensions": board_info["extensions"], } @@ -325,7 +306,8 @@ def generate_download_info(): create_pr(changes, current_info, git_info, user) else: print("No new release to update") - # print(create_json(current_info).decode("utf8")) + if "DEBUG" in os.environ: + print(create_json(current_info).decode("utf8")) if __name__ == "__main__": From dc9daba906b844fec9db6135ff7f68f47a2ad8ab Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 1 Apr 2021 14:06:52 -0500 Subject: [PATCH 181/261] update ulab to 2.1.5 --- extmod/ulab | 2 +- py/py.mk | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/extmod/ulab b/extmod/ulab index b64fa6d4c7..eb33480797 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit b64fa6d4c73287edef9ccf09cfd6ec5009f9628b +Subproject commit eb33480797dab382352f3c37668d5dbf1a54505d diff --git a/py/py.mk b/py/py.mk index 3f94aa67a0..e064b325e5 100644 --- a/py/py.mk +++ b/py/py.mk @@ -108,7 +108,8 @@ endif ifeq ($(CIRCUITPY_ULAB),1) SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*.c)) SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*/*.c)) -CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 +SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*/*/*.c)) +CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -iquote $(TOP)/extmod/ulab/code $(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-missing-declarations -Wno-missing-prototypes -Wno-unused-parameter -Wno-float-equal -Wno-sign-compare -Wno-cast-align -Wno-shadow -DCIRCUITPY endif From 4c0245bac6dd81c612a03a3d0cc7f12e99c85d75 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 1 Apr 2021 15:30:22 -0500 Subject: [PATCH 182/261] make translate --- locale/circuitpython.pot | 151 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 79 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 146c65f3e1..fb4d6991b1 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -929,11 +929,11 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "" @@ -2387,11 +2387,11 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2399,7 +2399,7 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "" @@ -2412,7 +2412,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "" @@ -2425,11 +2426,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "" @@ -2437,15 +2438,15 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2746,19 +2747,19 @@ msgstr "" msgid "conversion to object" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "" @@ -2766,15 +2767,15 @@ msgstr "" msgid "couldn't determine SD card version" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "" @@ -2811,18 +2812,14 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2938,11 +2935,11 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "" @@ -2950,11 +2947,7 @@ msgstr "" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "" @@ -2966,7 +2959,7 @@ msgstr "" msgid "flattening order must be either 'C', or 'F'" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "" @@ -2999,7 +2992,7 @@ msgstr "" msgid "function got multiple values for argument '%q'" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3074,7 +3067,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3088,7 +3081,7 @@ msgstr "" msgid "indices must be integers, slices, or Boolean lists" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "" @@ -3108,7 +3101,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "" @@ -3116,15 +3109,15 @@ msgstr "" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "" @@ -3140,23 +3133,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3168,7 +3161,7 @@ msgstr "" msgid "integer required" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3257,11 +3250,7 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "" @@ -3329,7 +3318,11 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3351,15 +3344,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3380,7 +3373,7 @@ msgstr "" msgid "module not found" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "" @@ -3498,7 +3491,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3599,8 +3592,8 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "" @@ -3608,7 +3601,7 @@ msgstr "" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "" @@ -3753,7 +3746,7 @@ msgstr "" msgid "raw f-strings are not implemented" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "" @@ -3788,7 +3781,7 @@ msgstr "" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3835,7 +3828,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "" @@ -3843,10 +3836,6 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -3859,19 +3848,19 @@ msgstr "" msgid "soft reboot\n" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -3985,7 +3974,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -3998,11 +3987,11 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -4144,6 +4133,10 @@ msgstr "" msgid "value_count must be > 0" msgstr "" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4173,7 +4166,7 @@ msgstr "" msgid "window must be <= interval" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4181,7 +4174,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" @@ -4197,7 +4190,7 @@ msgstr "" msgid "wrong operand type" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "" @@ -4221,14 +4214,14 @@ msgstr "" msgid "zero step" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" From b1dfd64fdc39214e1b86bc504d6ff5cef9d0ec44 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 1 Apr 2021 15:43:40 -0500 Subject: [PATCH 183/261] stubs: ulab.array -> ulab.ndarray --- extmod/ulab | 2 +- shared-bindings/_typing/__init__.pyi | 8 ++++---- shared-bindings/rgbmatrix/RGBMatrix.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extmod/ulab b/extmod/ulab index eb33480797..2aae646485 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit eb33480797dab382352f3c37668d5dbf1a54505d +Subproject commit 2aae6464856e5213e45c72681dbb20c708fb3c6c diff --git a/shared-bindings/_typing/__init__.pyi b/shared-bindings/_typing/__init__.pyi index cc4a0a4391..9a6e963ea5 100644 --- a/shared-bindings/_typing/__init__.pyi +++ b/shared-bindings/_typing/__init__.pyi @@ -13,7 +13,7 @@ import rgbmatrix import ulab ReadableBuffer = Union[ - bytes, bytearray, memoryview, array.array, ulab.array, rgbmatrix.RGBMatrix + bytes, bytearray, memoryview, array.array, ulab.ndarray, rgbmatrix.RGBMatrix ] """Classes that implement the readable buffer protocol @@ -21,19 +21,19 @@ ReadableBuffer = Union[ - `bytearray` - `memoryview` - `array.array` - - `ulab.array` + - `ulab.ndarray` - `rgbmatrix.RGBMatrix` """ WriteableBuffer = Union[ - bytearray, memoryview, array.array, ulab.array, rgbmatrix.RGBMatrix + bytearray, memoryview, array.array, ulab.ndarray, rgbmatrix.RGBMatrix ] """Classes that implement the writeable buffer protocol - `bytearray` - `memoryview` - `array.array` - - `ulab.array` + - `ulab.ndarray` - `rgbmatrix.RGBMatrix` """ diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c index 0188fa0b60..0b31eae881 100644 --- a/shared-bindings/rgbmatrix/RGBMatrix.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -164,7 +164,7 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_ //| "RGB565" means that it is organized as a series of 16-bit numbers //| where the highest 5 bits are interpreted as red, the next 6 as //| green, and the final 5 as blue. The object can be any buffer, but -//| `array.array` and `ulab.array` objects are most often useful. +//| `array.array` and `ulab.ndarray` objects are most often useful. //| To update the content, modify the framebuffer and call refresh. //| //| If a framebuffer is not passed in, one is allocated and initialized From 758dc81fcb3d3007879b30b9276f48ee69e9768a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 1 Apr 2021 15:43:52 -0500 Subject: [PATCH 184/261] displayio: ulab.frombuffer -> ulab.numpy.frombuffer --- shared-bindings/displayio/Bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c index ebe2946091..a3af910f2a 100644 --- a/shared-bindings/displayio/Bitmap.c +++ b/shared-bindings/displayio/Bitmap.c @@ -43,7 +43,7 @@ //| per row is a multiple of 4, then the resulting memoryview will correspond directly with the bitmap's contents. Otherwise, //| the bitmap data is packed into the memoryview with unspecified padding. //| -//| A read-only buffer can be used e.g., with `ulab.frombuffer` to efficiently create an array with the same content as a Bitmap; +//| A read-only buffer can be used e.g., with `ulab.numpy.frombuffer` to efficiently create an array with the same content as a Bitmap; //| to move data efficiently from ulab back into a Bitmap, use `bitmaptools.arrayblit`. //| """ //| From 5a56df989fbc07a058cc973cff600c89e2f923bd Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 1 Apr 2021 16:49:15 -0500 Subject: [PATCH 185/261] can't xref this right now --- shared-bindings/rgbmatrix/RGBMatrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c index 0b31eae881..e71bae9f59 100644 --- a/shared-bindings/rgbmatrix/RGBMatrix.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -164,7 +164,7 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_ //| "RGB565" means that it is organized as a series of 16-bit numbers //| where the highest 5 bits are interpreted as red, the next 6 as //| green, and the final 5 as blue. The object can be any buffer, but -//| `array.array` and `ulab.ndarray` objects are most often useful. +//| `array.array` and ``ulab.ndarray`` objects are most often useful. //| To update the content, modify the framebuffer and call refresh. //| //| If a framebuffer is not passed in, one is allocated and initialized From 3f158450f9c8e0a8fe7d32a42df94826b45dd480 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 1 Apr 2021 16:49:15 -0500 Subject: [PATCH 186/261] can't xref this right now --- shared-bindings/displayio/Bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c index a3af910f2a..3b2a836eb9 100644 --- a/shared-bindings/displayio/Bitmap.c +++ b/shared-bindings/displayio/Bitmap.c @@ -43,7 +43,7 @@ //| per row is a multiple of 4, then the resulting memoryview will correspond directly with the bitmap's contents. Otherwise, //| the bitmap data is packed into the memoryview with unspecified padding. //| -//| A read-only buffer can be used e.g., with `ulab.numpy.frombuffer` to efficiently create an array with the same content as a Bitmap; +//| A read-only buffer can be used e.g., with ``ulab.numpy.frombuffer`` to efficiently create an array with the same content as a Bitmap; //| to move data efficiently from ulab back into a Bitmap, use `bitmaptools.arrayblit`. //| """ //| From fb7b968b1027010178bb2b64bdccbad3beb642e6 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 2 Apr 2021 13:07:55 -0500 Subject: [PATCH 187/261] py.mk: locate ulab sources with shell-find. --- py/py.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/py/py.mk b/py/py.mk index e064b325e5..ae12e1976d 100644 --- a/py/py.mk +++ b/py/py.mk @@ -106,9 +106,8 @@ $(BUILD)/extmod/modbtree.o: CFLAGS += $(BTREE_DEFS) endif ifeq ($(CIRCUITPY_ULAB),1) -SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*.c)) -SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*/*.c)) -SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*/*/*.c)) +ULAB_SRCS := $(shell find $(TOP)/extmod/ulab/code -type f -name "*.c") +SRC_MOD += $(patsubst $(TOP)/%,%,$(ULAB_SRCS)) CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -iquote $(TOP)/extmod/ulab/code $(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-missing-declarations -Wno-missing-prototypes -Wno-unused-parameter -Wno-float-equal -Wno-sign-compare -Wno-cast-align -Wno-shadow -DCIRCUITPY endif From 1afd204828b6981e628b2665758708b679773c9a Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Fri, 2 Apr 2021 20:34:37 +0200 Subject: [PATCH 188/261] Changed error message to display the generic term 'system firmware' instead of the Nordic specific term 'soft device' --- ports/nrf/common-hal/_bleio/__init__.c | 4 ++-- supervisor/shared/safe_mode.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nrf/common-hal/_bleio/__init__.c b/ports/nrf/common-hal/_bleio/__init__.c index bbd57cfbe4..72a8e91370 100644 --- a/ports/nrf/common-hal/_bleio/__init__.c +++ b/ports/nrf/common-hal/_bleio/__init__.c @@ -47,7 +47,7 @@ void check_nrf_error(uint32_t err_code) { } switch (err_code) { case NRF_ERROR_NO_MEM: - mp_raise_msg(&mp_type_MemoryError, translate("Nordic soft device out of memory")); + mp_raise_msg(&mp_type_MemoryError, translate("Nordic system firmware out of memory")); return; case NRF_ERROR_TIMEOUT: mp_raise_msg(&mp_type_TimeoutError, NULL); @@ -56,7 +56,7 @@ void check_nrf_error(uint32_t err_code) { mp_raise_ConnectionError(translate("Not connected")); return; default: - mp_raise_bleio_BluetoothError(translate("Unknown soft device error: %04x"), err_code); + mp_raise_bleio_BluetoothError(translate("Unknown system firmware error: %04x"), err_code); break; } } diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index e8778216a6..f9e787c159 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -182,7 +182,7 @@ void print_safe_mode_message(safe_mode_t reason) { // defined in ports/nrf/bluetooth/bluetooth_common.mk // will print "Unknown reason" if somehow encountered on other ports case NORDIC_SOFT_DEVICE_ASSERT: - serial_write_compressed(translate("Nordic Soft Device failure assertion.")); + serial_write_compressed(translate("Nordic system firmware failure assertion.")); break; #endif case FLASH_WRITE_FAIL: From 72d970ad984607e8d94784a3ceb6d81880aebd91 Mon Sep 17 00:00:00 2001 From: Jose David M Date: Fri, 2 Apr 2021 12:28:07 +0000 Subject: [PATCH 189/261] Translated using Weblate (Spanish) Currently translated at 100.0% (969 of 969 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/es.po b/locale/es.po index 8f3023853c..4b32242500 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-21 21:29+0000\n" +"PO-Revision-Date: 2021-04-02 19:08+0000\n" "Last-Translator: Jose David M \n" "Language-Team: \n" "Language: es\n" @@ -16,7 +16,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.5.2-dev\n" +"X-Generator: Weblate 4.6-dev\n" #: main.c msgid "" @@ -1624,7 +1624,7 @@ msgstr "Fallo de aserción de dispositivo Nordic Soft." #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic soft device out of memory" -msgstr "" +msgstr "El firmaware del sistema no tiene memoria" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" From 7c36e53b5be7305b316714183d3682301755049d Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Fri, 2 Apr 2021 21:08:50 +0200 Subject: [PATCH 190/261] 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 | 151 +++++++++++++++++----------------- locale/cs.po | 151 +++++++++++++++++----------------- locale/de_DE.po | 163 ++++++++++++++++++------------------- locale/el.po | 151 +++++++++++++++++----------------- locale/en_GB.po | 163 +++++++++++++++++++------------------ locale/es.po | 169 +++++++++++++++++++-------------------- locale/fil.po | 151 +++++++++++++++++----------------- locale/fr.po | 169 +++++++++++++++++++-------------------- locale/hi.po | 151 +++++++++++++++++----------------- locale/it_IT.po | 151 +++++++++++++++++----------------- locale/ja.po | 163 +++++++++++++++++++------------------ locale/ko.po | 151 +++++++++++++++++----------------- locale/nl.po | 166 +++++++++++++++++++------------------- locale/pl.po | 157 +++++++++++++++++------------------- locale/pt_BR.po | 169 +++++++++++++++++++-------------------- locale/sv.po | 169 +++++++++++++++++++-------------------- locale/zh_Latn_pinyin.po | 169 +++++++++++++++++++-------------------- 17 files changed, 1323 insertions(+), 1391 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 3c0b50af58..454e2f427b 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -948,11 +948,11 @@ msgstr "Diharapkan tuple dengan panjang %d, didapatkan %d" msgid "Extended advertisements with scan response not supported." msgstr "Penyebaran yang diperluas dengan respon pindai tidak didukung." -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "FFT didefinisikan hanya untuk ndarrays" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "" @@ -2437,11 +2437,11 @@ msgstr "alamatnya kosong" msgid "arg is an empty sequence" msgstr "arg berisi urutan kosong" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "Argumen argsort harus berupa ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2449,7 +2449,7 @@ msgstr "" msgid "argument has wrong type" msgstr "argumen memiliki tipe yang salah" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "" @@ -2462,7 +2462,8 @@ msgstr "argumen num/types tidak cocok" msgid "argument should be a '%q' not a '%q'" msgstr "argumen harus berupa '%q' bukan '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "argumen harus berupa ndarrays" @@ -2475,11 +2476,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "diperlukan array/byte di sisi kanan" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "berusaha mendapatkan argmin/argmax dari urutan kosong" @@ -2487,15 +2488,15 @@ msgstr "berusaha mendapatkan argmin/argmax dari urutan kosong" msgid "attributes not supported yet" msgstr "atribut belum didukung" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2797,19 +2798,19 @@ msgstr "" msgid "conversion to object" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "" @@ -2817,15 +2818,15 @@ msgstr "" msgid "couldn't determine SD card version" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "" @@ -2862,18 +2863,14 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2989,11 +2986,11 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "" @@ -3001,11 +2998,7 @@ msgstr "" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "" @@ -3017,7 +3010,7 @@ msgstr "" msgid "flattening order must be either 'C', or 'F'" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "" @@ -3050,7 +3043,7 @@ msgstr "fungsi diharapkan setidaknya %d argumen, hanya mendapatkan %d" msgid "function got multiple values for argument '%q'" msgstr "fungsi mendapatkan nilai ganda untuk argumen '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3125,7 +3118,7 @@ msgstr "lapisan (padding) tidak benar" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3139,7 +3132,7 @@ msgstr "" msgid "indices must be integers, slices, or Boolean lists" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "" @@ -3159,7 +3152,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "" @@ -3167,15 +3160,15 @@ msgstr "" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "" @@ -3191,23 +3184,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3219,7 +3212,7 @@ msgstr "" msgid "integer required" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3308,11 +3301,7 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "" @@ -3380,7 +3369,11 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3402,15 +3395,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3431,7 +3424,7 @@ msgstr "" msgid "module not found" msgstr "modul tidak ditemukan" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "" @@ -3549,7 +3542,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3651,8 +3644,8 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "" @@ -3660,7 +3653,7 @@ msgstr "" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "" @@ -3805,7 +3798,7 @@ msgstr "antrian meluap (overflow)" msgid "raw f-strings are not implemented" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "" @@ -3840,7 +3833,7 @@ msgstr "" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3887,7 +3880,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "" @@ -3895,10 +3888,6 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -3911,19 +3900,19 @@ msgstr "" msgid "soft reboot\n" msgstr "memulai ulang software(soft reboot)\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -4038,7 +4027,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -4051,11 +4040,11 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -4197,6 +4186,10 @@ msgstr "" msgid "value_count must be > 0" msgstr "" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4226,7 +4219,7 @@ msgstr "" msgid "window must be <= interval" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4234,7 +4227,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" @@ -4250,7 +4243,7 @@ msgstr "" msgid "wrong operand type" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "" @@ -4274,15 +4267,15 @@ msgstr "" msgid "zero step" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 8db0064c93..2e8a0f0a24 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -932,11 +932,11 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "" @@ -2390,11 +2390,11 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2402,7 +2402,7 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "" @@ -2415,7 +2415,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "" @@ -2428,11 +2429,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "" @@ -2440,15 +2441,15 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2749,19 +2750,19 @@ msgstr "" msgid "conversion to object" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "" @@ -2769,15 +2770,15 @@ msgstr "" msgid "couldn't determine SD card version" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "" @@ -2814,18 +2815,14 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2941,11 +2938,11 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "" @@ -2953,11 +2950,7 @@ msgstr "" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "" @@ -2969,7 +2962,7 @@ msgstr "" msgid "flattening order must be either 'C', or 'F'" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "" @@ -3002,7 +2995,7 @@ msgstr "" msgid "function got multiple values for argument '%q'" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3077,7 +3070,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3091,7 +3084,7 @@ msgstr "" msgid "indices must be integers, slices, or Boolean lists" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "" @@ -3111,7 +3104,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "" @@ -3119,15 +3112,15 @@ msgstr "" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "" @@ -3143,23 +3136,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3171,7 +3164,7 @@ msgstr "" msgid "integer required" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3260,11 +3253,7 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "" @@ -3332,7 +3321,11 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3354,15 +3347,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3383,7 +3376,7 @@ msgstr "" msgid "module not found" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "" @@ -3501,7 +3494,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3602,8 +3595,8 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "" @@ -3611,7 +3604,7 @@ msgstr "" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "" @@ -3756,7 +3749,7 @@ msgstr "" msgid "raw f-strings are not implemented" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "" @@ -3791,7 +3784,7 @@ msgstr "" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3838,7 +3831,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "" @@ -3846,10 +3839,6 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -3862,19 +3851,19 @@ msgstr "" msgid "soft reboot\n" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -3988,7 +3977,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -4001,11 +3990,11 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -4147,6 +4136,10 @@ msgstr "" msgid "value_count must be > 0" msgstr "" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4176,7 +4169,7 @@ msgstr "" msgid "window must be <= interval" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4184,7 +4177,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" @@ -4200,7 +4193,7 @@ msgstr "" msgid "wrong operand type" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "" @@ -4224,15 +4217,15 @@ msgstr "" msgid "zero step" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 224087f791..0c91cbbc61 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -950,11 +950,11 @@ msgid "Extended advertisements with scan response not supported." msgstr "" "Erweiterte Werbung (advertising) mit Scanantwort wird nicht unterstützt." -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "FFT ist nur für ndarrays definiert" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "FFT ist nur für lineare Arrays implementiert" @@ -2454,11 +2454,11 @@ msgstr "adresses ist leer" msgid "arg is an empty sequence" msgstr "arg ist eine leere Sequenz" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "Das Argument argsort muss ein ndarray sein" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2466,7 +2466,7 @@ msgstr "" msgid "argument has wrong type" msgstr "Argument hat falschen Typ" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "Argument muss ein ndarray sein" @@ -2479,7 +2479,8 @@ msgstr "Anzahl/Typen der Argumente passen nicht" msgid "argument should be a '%q' not a '%q'" msgstr "Argument sollte '%q' sein, nicht '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "Argumente müssen ndarrays sein" @@ -2492,11 +2493,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "Array/Bytes auf der rechten Seite erforderlich" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "Sie haben versucht argmin/argmax von einer leeren Sequenz zu bekommen" @@ -2504,15 +2505,15 @@ msgstr "Sie haben versucht argmin/argmax von einer leeren Sequenz zu bekommen" msgid "attributes not supported yet" msgstr "Attribute werden noch nicht unterstützt" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2823,19 +2824,19 @@ msgstr "constant muss ein integer sein" msgid "conversion to object" msgstr "Umwandlung zu Objekt" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "Convolve-Argumente müssen lineare Arrays sein" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "Convolve-Argumente müssen ndarrays sein" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "Convolve Argumente dürfen nicht leer sein" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "Vandermonde-Matrix konnte nicht invertiert werden" @@ -2843,15 +2844,15 @@ msgstr "Vandermonde-Matrix konnte nicht invertiert werden" msgid "couldn't determine SD card version" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "" @@ -2890,18 +2891,14 @@ msgstr "destination_length muss ein int >= 0 sein" msgid "dict update sequence has wrong length" msgstr "Die Wörterbuch-Aktualisierungssequenz hat eine falsche Länge" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "diff Argument muss ein ndarray sein" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3017,11 +3014,11 @@ msgstr "Die Datei muss eine im Byte-Modus geöffnete Datei sein" msgid "filesystem must provide mount method" msgstr "Das Dateisystem muss eine Mount-Methode bereitstellen" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "" @@ -3029,11 +3026,7 @@ msgstr "" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "Das erste Argument muss iterierbar sein" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "Das erste Argument muss ein Ndarray sein" @@ -3045,7 +3038,7 @@ msgstr "Das erste Argument für super() muss type sein" msgid "flattening order must be either 'C', or 'F'" msgstr "Die Abflachungsreihenfolge muss entweder \"C\" oder \"F\" sein" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "Das Flip-Argument muss ein Ndarray sein" @@ -3078,7 +3071,7 @@ msgstr "Funktion erwartet maximal %d Argumente, aber hat %d erhalten" msgid "function got multiple values for argument '%q'" msgstr "Funktion hat mehrere Werte für Argument '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3155,7 +3148,7 @@ msgstr "padding ist inkorrekt" msgid "index is out of bounds" msgstr "Index ist außerhalb der Grenzen" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3169,7 +3162,7 @@ msgstr "Indizes müssen Integer sein" msgid "indices must be integers, slices, or Boolean lists" msgstr "Indizes müssen Integer, Slices oder Boolesche Listen sein" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "Ausgangswerte müssen iterierbar sein" @@ -3189,7 +3182,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "Die Länge des Eingabearrays muss eine Potenz von 2 sein" @@ -3197,15 +3190,15 @@ msgstr "Die Länge des Eingabearrays muss eine Potenz von 2 sein" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "Eingabedaten müssen iterierbar sein" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "Eingabematrix ist asymmetrisch" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "Eingabematrix ist singulär" @@ -3221,23 +3214,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "Die Eingabe muss eine quadratische Matrix sein" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "Die Eingabe muss Tupel, Liste, Bereich oder Ndarray sein" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "Eingabevektoren müssen gleich lang sein" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3249,7 +3242,7 @@ msgstr "int() arg 2 muss >= 2 und <= 36 sein" msgid "integer required" msgstr "integer erforderlich" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3338,11 +3331,7 @@ msgstr "issubclass() arg 1 muss eine Klasse sein" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 muss eine Klasse oder ein Tupel von Klassen sein" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "iterables sind nicht gleich lang" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "Iterationen sind nicht konvergiert (converged)" @@ -3416,7 +3405,11 @@ msgstr "map buffer zu klein" msgid "math domain error" msgstr "Mathe-Domain-Fehler" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "Matrix Dimensionen stimmen nicht überein" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "Matrix ist nicht positiv definitiv" @@ -3438,15 +3431,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "maximale Rekursionstiefe überschritten" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3467,7 +3460,7 @@ msgstr "" msgid "module not found" msgstr "Modul nicht gefunden" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "mehr Freiheitsgrade als Datenpunkte" @@ -3585,7 +3578,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3688,8 +3681,8 @@ msgid "only slices with step=1 (aka None) are supported" msgstr "" "Es werden nur Slices mit Schritt = 1 (auch bekannt als None) unterstützt" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "Operanden konnten nicht zusammen gesendet werden" @@ -3697,7 +3690,7 @@ msgstr "Operanden konnten nicht zusammen gesendet werden" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "Die Operation ist für ndarrays nicht implementiert" @@ -3844,7 +3837,7 @@ msgstr "Warteschlangenüberlauf" msgid "raw f-strings are not implemented" msgstr "rohe F-Strings sind nicht implementiert" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "Real- und Imaginärteile müssen gleich lang sein" @@ -3879,7 +3872,7 @@ msgstr "rgb_pins[%d] dupliziert eine andere Pinbelegung" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "rgb_pins [%d] befindet sich nicht am selben Port wie clock" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3928,7 +3921,7 @@ msgstr "Vorzeichen mit ganzzahligem Formatbezeichner 'c' nicht erlaubt" msgid "single '}' encountered in format string" msgstr "einzelne '}' in Formatierungs-String gefunden" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "Größe ist nur für ndarrays definiert" @@ -3936,10 +3929,6 @@ msgstr "Größe ist nur für ndarrays definiert" msgid "sleep length must be non-negative" msgstr "Die Schlafdauer darf nicht negativ sein" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "Der Slice-Schritt kann nicht Null sein" @@ -3952,19 +3941,19 @@ msgstr "small int Überlauf" msgid "soft reboot\n" msgstr "weicher reboot\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "sortierungs Argument muss ein ndarray sein" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -4079,7 +4068,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "zu viele Argumente mit dem angegebenen Format" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -4092,11 +4081,11 @@ msgstr "zu viele Indizes" msgid "too many values to unpack (expected %d)" msgstr "zu viele Werte zum Auspacken (erwartet %d)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -4242,6 +4231,10 @@ msgstr "Wert muss in %d Byte(s) passen" msgid "value_count must be > 0" msgstr "value_count muss größer als 0 sein" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "Vektoren müssen die selbe Länge haben" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4271,7 +4264,7 @@ msgstr "" msgid "window must be <= interval" msgstr "Fenster muss <= Intervall sein" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4279,7 +4272,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "falscher Eingabetyp" @@ -4295,7 +4288,7 @@ msgstr "falsche Anzahl zu entpackender Werte" msgid "wrong operand type" msgstr "falscher Operandentyp" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "Falscher Ausgabetyp" @@ -4319,18 +4312,24 @@ msgstr "y Wert außerhalb der Grenzen" msgid "zero step" msgstr "Nullschritt" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "first argument must be an iterable" +#~ msgstr "Das erste Argument muss iterierbar sein" + +#~ msgid "iterables are not of the same length" +#~ msgstr "iterables sind nicht gleich lang" + #~ msgid "Selected CTS pin not valid" #~ msgstr "Ausgewählter CTS-Pin ungültig" @@ -4352,12 +4351,6 @@ msgstr "" #~ msgid "No more timers available on this pin." #~ msgstr "An diesem Pin sind keine Timer mehr verfügbar." -#~ msgid "matrix dimensions do not match" -#~ msgstr "Matrix Dimensionen stimmen nicht überein" - -#~ msgid "vectors must have same lengths" -#~ msgstr "Vektoren müssen die selbe Länge haben" - #~ msgid "Group full" #~ msgstr "Gruppe voll" diff --git a/locale/el.po b/locale/el.po index d6581c2243..bcc6c0916b 100644 --- a/locale/el.po +++ b/locale/el.po @@ -929,11 +929,11 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "" @@ -2387,11 +2387,11 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2399,7 +2399,7 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "" @@ -2412,7 +2412,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "" @@ -2425,11 +2426,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "" @@ -2437,15 +2438,15 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2746,19 +2747,19 @@ msgstr "" msgid "conversion to object" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "" @@ -2766,15 +2767,15 @@ msgstr "" msgid "couldn't determine SD card version" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "" @@ -2811,18 +2812,14 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2938,11 +2935,11 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "" @@ -2950,11 +2947,7 @@ msgstr "" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "" @@ -2966,7 +2959,7 @@ msgstr "" msgid "flattening order must be either 'C', or 'F'" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "" @@ -2999,7 +2992,7 @@ msgstr "" msgid "function got multiple values for argument '%q'" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3074,7 +3067,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3088,7 +3081,7 @@ msgstr "" msgid "indices must be integers, slices, or Boolean lists" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "" @@ -3108,7 +3101,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "" @@ -3116,15 +3109,15 @@ msgstr "" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "" @@ -3140,23 +3133,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3168,7 +3161,7 @@ msgstr "" msgid "integer required" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3257,11 +3250,7 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "" @@ -3329,7 +3318,11 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3351,15 +3344,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3380,7 +3373,7 @@ msgstr "" msgid "module not found" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "" @@ -3498,7 +3491,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3599,8 +3592,8 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "" @@ -3608,7 +3601,7 @@ msgstr "" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "" @@ -3753,7 +3746,7 @@ msgstr "" msgid "raw f-strings are not implemented" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "" @@ -3788,7 +3781,7 @@ msgstr "" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3835,7 +3828,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "" @@ -3843,10 +3836,6 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -3859,19 +3848,19 @@ msgstr "" msgid "soft reboot\n" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -3985,7 +3974,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -3998,11 +3987,11 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -4144,6 +4133,10 @@ msgstr "" msgid "value_count must be > 0" msgstr "" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4173,7 +4166,7 @@ msgstr "" msgid "window must be <= interval" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4181,7 +4174,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" @@ -4197,7 +4190,7 @@ msgstr "" msgid "wrong operand type" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "" @@ -4221,14 +4214,14 @@ msgstr "" msgid "zero step" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 4f9a229740..1e1051e501 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -945,11 +945,11 @@ msgstr "Expected tuple of length %d, got %d" msgid "Extended advertisements with scan response not supported." msgstr "Extended advertisements with scan response not supported." -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "FFT is defined for ndarrays only" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "FFT is implemented for linear arrays only" @@ -2434,11 +2434,11 @@ msgstr "addresses is empty" msgid "arg is an empty sequence" msgstr "arg is an empty sequence" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "argsort argument must be an ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "argsort is not implemented for flattened arrays" @@ -2446,7 +2446,7 @@ msgstr "argsort is not implemented for flattened arrays" msgid "argument has wrong type" msgstr "argument has wrong type" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "argument must be ndarray" @@ -2459,7 +2459,8 @@ msgstr "argument num/types mismatch" msgid "argument should be a '%q' not a '%q'" msgstr "argument should be a '%q' not a '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "arguments must be ndarrays" @@ -2472,11 +2473,11 @@ msgstr "array and index length must be equal" msgid "array/bytes required on right side" msgstr "array/bytes required on right side" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "attempt to get (arg)min/(arg)max of empty sequence" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "attempt to get argmin/argmax of an empty sequence" @@ -2484,15 +2485,15 @@ msgstr "attempt to get argmin/argmax of an empty sequence" msgid "attributes not supported yet" msgstr "attributes not supported yet" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "axis is out of bounds" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "axis must be None, or an integer" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "axis too long" @@ -2795,19 +2796,19 @@ msgstr "constant must be an integer" msgid "conversion to object" msgstr "conversion to object" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "convolve arguments must be linear arrays" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "convolve arguments must be ndarrays" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "convolve arguments must not be empty" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "could not invert Vandermonde matrix" @@ -2815,15 +2816,15 @@ msgstr "could not invert Vandermonde matrix" msgid "couldn't determine SD card version" msgstr "couldn't determine SD card version" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "cross is defined for 1D arrays of length 3" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "cata must be iterable" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "cata must be of equal length" @@ -2861,18 +2862,14 @@ msgstr "destination_length must be an int >= 0" msgid "dict update sequence has wrong length" msgstr "dict update sequence has wrong length" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "diff argument must be an ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "differentiation order out of range" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "dimensions do not match" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2988,11 +2985,11 @@ msgstr "file must be a file opened in byte mode" msgid "filesystem must provide mount method" msgstr "filesystem must provide mount method" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "first argument must be a callable" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "first argument must be a function" @@ -3000,11 +2997,7 @@ msgstr "first argument must be a function" msgid "first argument must be a tuple of ndarrays" msgstr "first argument must be a tuple of ndarrays" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "first argument must be an iterable" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "first argument must be an ndarray" @@ -3016,7 +3009,7 @@ msgstr "first argument to super() must be type" msgid "flattening order must be either 'C', or 'F'" msgstr "flattening order must be either 'C', or 'F'" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "flip argument must be an ndarray" @@ -3049,7 +3042,7 @@ msgstr "function expected at most %d arguments, got %d" msgid "function got multiple values for argument '%q'" msgstr "function got multiple values for argument '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "function has the same sign at the ends of interval" @@ -3124,7 +3117,7 @@ msgstr "incorrect padding" msgid "index is out of bounds" msgstr "index is out of bounds" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3138,7 +3131,7 @@ msgstr "indices must be integers" msgid "indices must be integers, slices, or Boolean lists" msgstr "indices must be integers, slices, or Boolean lists" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "initial values must be iterable" @@ -3158,7 +3151,7 @@ msgstr "input and output shapes are not compatible" msgid "input argument must be an integer, a tuple, or a list" msgstr "input argument must be an integer, a tuple, or a list" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "input array length must be power of 2" @@ -3166,15 +3159,15 @@ msgstr "input array length must be power of 2" msgid "input arrays are not compatible" msgstr "input arrays are not compatible" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "input data must be an iterable" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "input matrix is asymmetric" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "input matrix is singular" @@ -3190,23 +3183,23 @@ msgstr "input must be a tensor of rank 2" msgid "input must be an ndarray" msgstr "input must be an ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "input must be one-dimensional" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "input must be square matrix" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "input must be tuple, list, range, or ndarray" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "input vectors must be of equal length" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "inputs are not iterable" @@ -3218,7 +3211,7 @@ msgstr "int() arg 2 must be >= 2 and <= 36" msgid "integer required" msgstr "integer required" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "interp is defined for 1D arrays of equal length" @@ -3308,11 +3301,7 @@ msgstr "issubclass() arg 1 must be a class" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 must be a class or a tuple of classes" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "iterables are not of the same length" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "iterations did not converge" @@ -3380,7 +3369,11 @@ msgstr "map buffer too small" msgid "math domain error" msgstr "math domain error" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrix is not positive definite" @@ -3402,15 +3395,15 @@ msgstr "maximum number of dimensions is 4" msgid "maximum recursion depth exceeded" msgstr "maximum recursion depth exceeded" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "maxiter must be > 0" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "maxiter should be > 0" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "median argument must be an ndarray" @@ -3431,7 +3424,7 @@ msgstr "memoryview: length is not a multiple of itemsize" msgid "module not found" msgstr "module not found" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "more degrees of freedom than data points" @@ -3549,7 +3542,7 @@ msgstr "non-zero timeout must be > 0.01" msgid "non-zero timeout must be >= interval" msgstr "non-zero timeout must be >= interval" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "norm is defined for 1D and 2D arrays" @@ -3650,8 +3643,8 @@ msgstr "only sample_rate=16000 is supported" msgid "only slices with step=1 (aka None) are supported" msgstr "only slices with step=1 (aka None) are supported" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "operands could not be broadcast together" @@ -3659,7 +3652,7 @@ msgstr "operands could not be broadcast together" msgid "operation is implemented for 1D Boolean arrays only" msgstr "operation is implemented for 1D Boolean arrays only" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "operation is not implemented on ndarrays" @@ -3804,7 +3797,7 @@ msgstr "queue overflow" msgid "raw f-strings are not implemented" msgstr "raw f-strings are not implemented" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "real and imaginary parts must be of equal length" @@ -3839,7 +3832,7 @@ msgstr "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "rgb_pins[%d] is not on the same port as clock" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "roll argument must be an ndarray" @@ -3888,7 +3881,7 @@ msgstr "sign not allowed with integer format specifier 'c'" msgid "single '}' encountered in format string" msgstr "single '}' encountered in format string" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "size is defined for ndarrays only" @@ -3896,10 +3889,6 @@ msgstr "size is defined for ndarrays only" msgid "sleep length must be non-negative" msgstr "sleep length must be non-negative" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "slice step can't be zero" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "slice step cannot be zero" @@ -3912,19 +3901,19 @@ msgstr "small int overflow" msgid "soft reboot\n" msgstr "soft reboot\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "sort argument must be an ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "sos array must be of shape (n_section, 6)" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "sos[:, 3] should be all ones" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "sosfilt requires iterable arguments" @@ -4038,7 +4027,7 @@ msgstr "tobytes can be invoked for dense arrays only" msgid "too many arguments provided with the given format" msgstr "too many arguments provided with the given format" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "too many dimensions" @@ -4051,11 +4040,11 @@ msgstr "too many indices" msgid "too many values to unpack (expected %d)" msgstr "too many values to unpack (expected %d)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "trapz is defined for 1D arrays" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz is defined for 1D arrays of equal length" @@ -4197,6 +4186,10 @@ msgstr "value must fit in %d byte(s)" msgid "value_count must be > 0" msgstr "value_count must be > 0" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "wakeup conflict" @@ -4226,7 +4219,7 @@ msgstr "WiFi is not enabled" msgid "window must be <= interval" msgstr "window must be <= interval" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "wrong axis index" @@ -4234,7 +4227,7 @@ msgstr "wrong axis index" msgid "wrong axis specified" msgstr "wrong axis specified" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "wrong input type" @@ -4250,7 +4243,7 @@ msgstr "wrong number of values to unpack" msgid "wrong operand type" msgstr "wrong operand type" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "wrong output type" @@ -4274,18 +4267,30 @@ msgstr "y value out of bounds" msgid "zero step" msgstr "zero step" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi must be an ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "zi must be of float type" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "dimensions do not match" +#~ msgstr "dimensions do not match" + +#~ msgid "first argument must be an iterable" +#~ msgstr "first argument must be an iterable" + +#~ msgid "iterables are not of the same length" +#~ msgstr "iterables are not of the same length" + +#~ msgid "slice step can't be zero" +#~ msgstr "slice step can't be zero" + #~ msgid "Selected CTS pin not valid" #~ msgstr "Selected CTS pin not valid" diff --git a/locale/es.po b/locale/es.po index 4b32242500..19f0298a03 100644 --- a/locale/es.po +++ b/locale/es.po @@ -955,11 +955,11 @@ msgstr "Se esperaba un tuple de %d, se obtuvo %d" msgid "Extended advertisements with scan response not supported." msgstr "No se admiten anuncios extendidos con respuesta de escaneo." -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "FFT se define solo para ndarrays" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "FFT solo esta implementado para arrays lineales" @@ -2467,11 +2467,11 @@ msgstr "addresses esta vacío" msgid "arg is an empty sequence" msgstr "argumento es una secuencia vacía" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "El argumento para argsort debe ser un ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "El argot no está implementado para arrays aplanados" @@ -2479,7 +2479,7 @@ msgstr "El argot no está implementado para arrays aplanados" msgid "argument has wrong type" msgstr "el argumento tiene un tipo erroneo" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "argumento debe ser ndarray" @@ -2492,7 +2492,8 @@ msgstr "argumento número/tipos no coinciden" msgid "argument should be a '%q' not a '%q'" msgstr "argumento deberia ser un '%q' no un '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "argumentos deben ser ndarrays" @@ -2505,11 +2506,11 @@ msgstr "Longitud del array e índice tienen que ser iguales" msgid "array/bytes required on right side" msgstr "array/bytes requeridos en el lado derecho" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "Intendo de obteber (arg)min/(arg)max de secuencia vacía" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "intento de obtener argmin/argmax de una secuencia vacía" @@ -2517,15 +2518,15 @@ msgstr "intento de obtener argmin/argmax de una secuencia vacía" msgid "attributes not supported yet" msgstr "atributos aún no soportados" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "Eje está fuera de sus límites" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "Eje tiene que ser None, o un entero" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "Eje demasiado largo" @@ -2831,19 +2832,19 @@ msgstr "constant debe ser un entero" msgid "conversion to object" msgstr "conversión a objeto" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "los argumentos para convolve deben ser arreglos lineares" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "los argumentos para convolve deben ser ndarrays" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "los argumentos para convolve no deben estar vacíos" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "no se pudo invertir la matriz de Vandermonde" @@ -2851,15 +2852,15 @@ msgstr "no se pudo invertir la matriz de Vandermonde" msgid "couldn't determine SD card version" msgstr "no se pudo determinar la versión de la tarjeta SD" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "Cruce está definido para un array 1D de longitud 3" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "los datos deben permitir iteración" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "los datos deben ser de igual tamaño" @@ -2898,18 +2899,14 @@ msgstr "destination_length debe ser un int >= 0" msgid "dict update sequence has wrong length" msgstr "la secuencia de actualizacion del dict tiene una longitud incorrecta" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "El argumento diff debe ser un ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "Orden de diferenciación fuera de rango" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "las dimensiones no concuerdan" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3025,11 +3022,11 @@ msgstr "el archivo deberia ser una archivo abierto en modo byte" msgid "filesystem must provide mount method" msgstr "sistema de archivos debe proporcionar método de montaje" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "se debe poder llamar al primer argumento" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "el primer argumento debe ser una función" @@ -3037,11 +3034,7 @@ msgstr "el primer argumento debe ser una función" msgid "first argument must be a tuple of ndarrays" msgstr "Primer argumento tiene que ser una tupla de ndarrays" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "el primer argumento debe ser un iterable" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "el primer argumento debe ser ndarray" @@ -3053,7 +3046,7 @@ msgstr "primer argumento para super() debe ser de tipo" msgid "flattening order must be either 'C', or 'F'" msgstr "el orden de aplanamiento debe ser 'C' o 'F'" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "el argumento invertido debe ser un ndarray" @@ -3086,7 +3079,7 @@ msgstr "la función esperaba minimo %d argumentos, tiene %d" msgid "function got multiple values for argument '%q'" msgstr "la función tiene múltiples valores para el argumento '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "la función tiene el mismo signo a extremos del intervalo" @@ -3161,7 +3154,7 @@ msgstr "relleno (padding) incorrecto" msgid "index is out of bounds" msgstr "el índice está fuera de límites" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3175,7 +3168,7 @@ msgstr "indices deben ser enteros" msgid "indices must be integers, slices, or Boolean lists" msgstr "los índices deben ser enteros, particiones o listas de booleanos" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "los valores iniciales deben permitir iteración" @@ -3195,7 +3188,7 @@ msgstr "Formas de entrada y salida no son compactibles" msgid "input argument must be an integer, a tuple, or a list" msgstr "argumento de entrada debe ser un entero, una tupla o una lista" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "el tamaño del arreglo de entrada debe ser potencia de 2" @@ -3203,15 +3196,15 @@ msgstr "el tamaño del arreglo de entrada debe ser potencia de 2" msgid "input arrays are not compatible" msgstr "Arrays de entrada no son compactibles" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "los datos de entrada deben ser iterables" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "la matriz de entrada es asimétrica" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "la matriz de entrada es singular" @@ -3227,23 +3220,23 @@ msgstr "Entrada tiene que ser un tensor de rango 2" msgid "input must be an ndarray" msgstr "Entrada tiene que ser un ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "Entrada tiene que ser unidimensional" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "la entrada debe ser una matriz cuadrada" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "la entrada debe ser una tupla, lista, rango o ndarray" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "los vectores de entrada deben ser de igual tamaño" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "Entradas no son iterables" @@ -3255,7 +3248,7 @@ msgstr "int() arg 2 debe ser >= 2 y <= 36" msgid "integer required" msgstr "Entero requerido" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "interp está definido para arreglos de 1D del mismo tamaño" @@ -3344,11 +3337,7 @@ msgstr "issubclass() arg 1 debe ser una clase" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 debe ser una clase o tuple de clases" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "los iterables no son del mismo tamaño" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "las iteraciones no convergen" @@ -3419,7 +3408,11 @@ msgstr "map buffer muy pequeño" msgid "math domain error" msgstr "error de dominio matemático" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "las dimensiones de la matriz no coinciden" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrix no es definida positiva" @@ -3441,15 +3434,15 @@ msgstr "Máximo número de dimensiones es 4" msgid "maximum recursion depth exceeded" msgstr "profundidad máxima de recursión excedida" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "maxiter tiene que ser > 0" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "maxiter debe ser > 0" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "argumento median debe ser una matriz ndarray" @@ -3471,7 +3464,7 @@ msgstr "" msgid "module not found" msgstr "módulo no encontrado" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "más grados de libertad que los puntos de datos" @@ -3591,7 +3584,7 @@ msgstr "el tiempo de espera non-zero deber ser > 0.01" msgid "non-zero timeout must be >= interval" msgstr "el tiempo de espera non-zero debe ser >= intervalo" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "norma está definida para arrays 1D y 2D" @@ -3693,8 +3686,8 @@ msgstr "solo se admite sample_rate=16000" msgid "only slices with step=1 (aka None) are supported" msgstr "solo se admiten segmentos con step=1 (alias None)" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "los operandos no se pueden transmitir juntos" @@ -3702,7 +3695,7 @@ msgstr "los operandos no se pueden transmitir juntos" msgid "operation is implemented for 1D Boolean arrays only" msgstr "operación solo está implementada para arrays booleanos de 1D" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "la operación no está implementada para ndarrays" @@ -3847,7 +3840,7 @@ msgstr "desbordamiento de cola(queue)" msgid "raw f-strings are not implemented" msgstr "no está implementado cadenas-f sin procesar" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "las partes reales e imaginarias deben ser de igual longitud" @@ -3882,7 +3875,7 @@ msgstr "rgb_pins[%d] duplica otra asignación de pin" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "rgb_pins[%d] no está en el mismo puerto que el reloj" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "Argumento enrolado tiene que ser un ndarray" @@ -3931,7 +3924,7 @@ msgstr "signo no permitido con el especificador integer format 'c'" msgid "single '}' encountered in format string" msgstr "un solo '}' encontrado en format string" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "el tamaño se define solo para ndarrays" @@ -3939,10 +3932,6 @@ msgstr "el tamaño se define solo para ndarrays" msgid "sleep length must be non-negative" msgstr "la longitud de sleep no puede ser negativa" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "el tamaño de la división no puede ser cero" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "slice step no puede ser cero" @@ -3955,19 +3944,19 @@ msgstr "pequeño int desbordamiento" msgid "soft reboot\n" msgstr "reinicio suave\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "argumento de ordenado debe ser un ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "el arreglo sos debe de forma (n_section, 6)" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "sos[:, 3] deberían ser todos unos" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "sosfilt requiere argumentos iterables" @@ -4082,7 +4071,7 @@ msgstr "tobytes solo pueden ser invocados por arrays densos" msgid "too many arguments provided with the given format" msgstr "demasiados argumentos provistos con el formato dado" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "demasiadas dimensiones" @@ -4095,11 +4084,11 @@ msgstr "demasiados índices" msgid "too many values to unpack (expected %d)" msgstr "demasiados valores para descomprimir (%d esperado)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "trapz esta definido para matrices 1D" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz está definido para arreglos 1D de igual tamaño" @@ -4241,6 +4230,10 @@ msgstr "el valor debe caber en %d byte(s)" msgid "value_count must be > 0" msgstr "value_count debe ser > 0" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "los vectores deben tener el mismo tamaño" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflicto de wakeup" @@ -4270,7 +4263,7 @@ msgstr "wifi no esta habilitado" msgid "window must be <= interval" msgstr "la ventana debe ser <= intervalo" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "indice de eje erróneo" @@ -4278,7 +4271,7 @@ msgstr "indice de eje erróneo" msgid "wrong axis specified" msgstr "eje especificado erróneo" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "tipo de entrada incorrecta" @@ -4294,7 +4287,7 @@ msgstr "numero erroneo de valores a descomprimir" msgid "wrong operand type" msgstr "tipo de operando incorrecto" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "tipo de salida incorrecta" @@ -4318,18 +4311,30 @@ msgstr "valor y fuera de límites" msgid "zero step" msgstr "paso cero" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi debe ser un ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "zi debe ser de tipo flotante" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "dimensions do not match" +#~ msgstr "las dimensiones no concuerdan" + +#~ msgid "first argument must be an iterable" +#~ msgstr "el primer argumento debe ser un iterable" + +#~ msgid "iterables are not of the same length" +#~ msgstr "los iterables no son del mismo tamaño" + +#~ msgid "slice step can't be zero" +#~ msgstr "el tamaño de la división no puede ser cero" + #~ msgid "Selected CTS pin not valid" #~ msgstr "Pin CTS seleccionado no válido" @@ -4364,12 +4369,6 @@ msgstr "zi debe ser una forma (n_section,2)" #~ "El temporizador es utilizado para uso interno - declare los pines para " #~ "PWM más temprano en el programa" -#~ msgid "matrix dimensions do not match" -#~ msgstr "las dimensiones de la matriz no coinciden" - -#~ msgid "vectors must have same lengths" -#~ msgstr "los vectores deben tener el mismo tamaño" - #~ msgid "Group full" #~ msgstr "Group lleno" diff --git a/locale/fil.po b/locale/fil.po index 6fe4dba05a..3eb50f9b1d 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -942,11 +942,11 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "" @@ -2417,11 +2417,11 @@ msgstr "walang laman ang address" msgid "arg is an empty sequence" msgstr "arg ay walang laman na sequence" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2429,7 +2429,7 @@ msgstr "" msgid "argument has wrong type" msgstr "may maling type ang argument" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "" @@ -2442,7 +2442,8 @@ msgstr "hindi tugma ang argument num/types" msgid "argument should be a '%q' not a '%q'" msgstr "argument ay dapat na '%q' hindi '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "" @@ -2455,11 +2456,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "array/bytes kinakailangan sa kanang bahagi" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "" @@ -2467,15 +2468,15 @@ msgstr "" msgid "attributes not supported yet" msgstr "attributes hindi sinusuportahan" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2783,19 +2784,19 @@ msgstr "constant ay dapat na integer" msgid "conversion to object" msgstr "kombersyon to object" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "" @@ -2803,15 +2804,15 @@ msgstr "" msgid "couldn't determine SD card version" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "" @@ -2852,18 +2853,14 @@ msgstr "ang destination_length ay dapat na isang int >= 0" msgid "dict update sequence has wrong length" msgstr "may mali sa haba ng dict update sequence" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2980,11 +2977,11 @@ msgstr "file ay dapat buksan sa byte mode" msgid "filesystem must provide mount method" msgstr "ang filesystem dapat mag bigay ng mount method" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "" @@ -2992,11 +2989,7 @@ msgstr "" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "" @@ -3008,7 +3001,7 @@ msgstr "unang argument ng super() ay dapat type" msgid "flattening order must be either 'C', or 'F'" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "" @@ -3041,7 +3034,7 @@ msgstr "function na inaasahang %d ang argumento, ngunit %d ang nakuha" msgid "function got multiple values for argument '%q'" msgstr "ang function ay nakakuha ng maraming values para sa argument '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3117,7 +3110,7 @@ msgstr "mali ang padding" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3131,7 +3124,7 @@ msgstr "ang mga indeks ay dapat na integer" msgid "indices must be integers, slices, or Boolean lists" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "" @@ -3151,7 +3144,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "" @@ -3159,15 +3152,15 @@ msgstr "" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "" @@ -3183,23 +3176,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3211,7 +3204,7 @@ msgstr "int() arg 2 ay dapat >=2 at <= 36" msgid "integer required" msgstr "kailangan ng int" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3300,11 +3293,7 @@ msgstr "issubclass() arg 1 ay dapat na class" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 ay dapat na class o tuple ng classes" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "" @@ -3376,7 +3365,11 @@ msgstr "masyadong maliit ang buffer map" msgid "math domain error" msgstr "may pagkakamali sa math domain" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3398,15 +3391,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "lumagpas ang maximum recursion depth" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3427,7 +3420,7 @@ msgstr "" msgid "module not found" msgstr "module hindi nakita" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "" @@ -3545,7 +3538,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3647,8 +3640,8 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "ang mga slices lamang na may hakbang = 1 (aka None) ang sinusuportahan" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "" @@ -3656,7 +3649,7 @@ msgstr "" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "" @@ -3802,7 +3795,7 @@ msgstr "puno na ang pila (overflow)" msgid "raw f-strings are not implemented" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "" @@ -3837,7 +3830,7 @@ msgstr "" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3886,7 +3879,7 @@ msgstr "sign hindi maari sa integer format specifier 'c'" msgid "single '}' encountered in format string" msgstr "isang '}' nasalubong sa format string" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "" @@ -3894,10 +3887,6 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "sleep length ay dapat hindi negatibo" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "slice step ay hindi puedeng 0" @@ -3910,19 +3899,19 @@ msgstr "small int overflow" msgid "soft reboot\n" msgstr "malambot na reboot\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -4038,7 +4027,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -4051,11 +4040,11 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "masyadong maraming values para i-unpact (umaasa ng %d)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -4197,6 +4186,10 @@ msgstr "" msgid "value_count must be > 0" msgstr "" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4226,7 +4219,7 @@ msgstr "" msgid "window must be <= interval" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4234,7 +4227,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" @@ -4250,7 +4243,7 @@ msgstr "maling number ng value na i-unpack" msgid "wrong operand type" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "" @@ -4276,15 +4269,15 @@ msgstr "wala sa sakop ang address" msgid "zero step" msgstr "zero step" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index ed2e096ace..3d7b5c5578 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -962,11 +962,11 @@ msgid "Extended advertisements with scan response not supported." msgstr "" "Les avertissement étendues avec analyse de réponse ne sont pas supportées." -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "La FFT est définie uniquement pour les ndarrays" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "FFT n'est implémenté que pour les tableaux linéaires" @@ -2481,11 +2481,11 @@ msgstr "adresses vides" msgid "arg is an empty sequence" msgstr "l'argument est une séquence vide" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "L'argument argsort doit être un ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "argsort n'est pas mis en œuvre pour les tableaux aplatis" @@ -2493,7 +2493,7 @@ msgstr "argsort n'est pas mis en œuvre pour les tableaux aplatis" msgid "argument has wrong type" msgstr "l'argument est d'un mauvais type" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "l'argument doit être un ndarray" @@ -2506,7 +2506,8 @@ msgstr "Nombre/types de paramètres ne correspondent pas" msgid "argument should be a '%q' not a '%q'" msgstr "le paramètre devrait être un(e) '%q', pas '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "les paramètres doivent être des ndarrays" @@ -2519,11 +2520,11 @@ msgstr "la longueur du tableau et de l'index doivent être égaux" msgid "array/bytes required on right side" msgstr "tableau/octets requis à droite" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "tentative d’obtenir (arg)min/(arg)max d'une séquence vide" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "tenter d'obtenir argmin / argmax d'une séquence vide" @@ -2531,15 +2532,15 @@ msgstr "tenter d'obtenir argmin / argmax d'une séquence vide" msgid "attributes not supported yet" msgstr "attribut pas encore supporté" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "axis est hors limites" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "axis doit être None ou un entier" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "axis trop long" @@ -2851,19 +2852,19 @@ msgstr "constante doit être un entier" msgid "conversion to object" msgstr "conversion en objet" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "les arguments convolve doivent être des tableaux linéaires" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "les arguments convolve doivent être des ndarrays" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "les arguments convolve ne doivent pas être vides" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "n'a pas pu inverser la matrice Vandermonde" @@ -2871,15 +2872,15 @@ msgstr "n'a pas pu inverser la matrice Vandermonde" msgid "couldn't determine SD card version" msgstr "impossible de déterminer la version de la carte SD" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "cross est défini pour les tableaux 1D de longueur 3" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "les données doivent être les objets iterables" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "les données doivent être de longueur égale" @@ -2918,18 +2919,14 @@ msgstr "destination_length doit être un entier >= 0" msgid "dict update sequence has wrong length" msgstr "la séquence de mise à jour de dict a une mauvaise longueur" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "l'argument diff doit être un ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "differentiation order hors de portée" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "les dimensions ne correspondent pas" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3047,11 +3044,11 @@ msgstr "le fichier doit être un fichier ouvert en mode 'byte'" msgid "filesystem must provide mount method" msgstr "le system de fichier doit fournir une méthode 'mount'" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "le premier argument doit être un appelable" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "le premier argument doit être une fonction" @@ -3059,11 +3056,7 @@ msgstr "le premier argument doit être une fonction" msgid "first argument must be a tuple of ndarrays" msgstr "le premier argument doit être un tuple de ndarrays" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "le premier argument doit être un itérable" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "le premier argument doit être un ndarray" @@ -3075,7 +3068,7 @@ msgstr "le premier argument de super() doit être un type" msgid "flattening order must be either 'C', or 'F'" msgstr "l'ordre d'aplatissement doit être «C» ou «F»" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "l'argument flip doit être un ndarray" @@ -3108,7 +3101,7 @@ msgstr "la fonction attendait au plus %d arguments, reçu %d" msgid "function got multiple values for argument '%q'" msgstr "la fonction a reçu plusieurs valeurs pour l'argument '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "la fonction a le même signe aux extrémités de l’intervalle" @@ -3183,7 +3176,7 @@ msgstr "espacement incorrect" msgid "index is out of bounds" msgstr "l'index est hors limites" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3198,7 +3191,7 @@ msgid "indices must be integers, slices, or Boolean lists" msgstr "" "les indices doivent être des entiers, des tranches ou des listes booléennes" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "les valeurs initiales doivent être itérables" @@ -3218,7 +3211,7 @@ msgstr "les formes d'entrée et de sortie ne sont pas compatibles" msgid "input argument must be an integer, a tuple, or a list" msgstr "Paramètre entrant doit être un chiffre entier, un tuple, ou une liste" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "la longueur du tableau d'entrée doit être une puissance de 2" @@ -3226,15 +3219,15 @@ msgstr "la longueur du tableau d'entrée doit être une puissance de 2" msgid "input arrays are not compatible" msgstr "les tableaux d'entrée ne sont pas compatibles" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "les données d'entrée doivent être un itérable" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "la matrice d'entrée est asymétrique" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "la matrice d'entrée est singulière" @@ -3250,23 +3243,23 @@ msgstr "l'entrée doit être un tenseur de rang 2" msgid "input must be an ndarray" msgstr "l'entrée doit être un ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "l'entrée doit être uni-dimensionelle" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "l'entrée doit être une matrice carrée" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "l'entrée 'input' doit être tuple, list, range ou ndarray" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "les vecteurs d'entrée doivent être de longueur égale" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "les entrées ne sont pas itérables" @@ -3278,7 +3271,7 @@ msgstr "l'argument 2 de int() doit être >=2 et <=36" msgid "integer required" msgstr "entier requis" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "interp est défini pour les tableaux 1D de longueur égale" @@ -3368,11 +3361,7 @@ msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" "l'argument 2 de issubclass() doit être une classe ou un tuple de classes" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "les itérables ne sont pas de la même longueur" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "les itérations n'ont pas convergé" @@ -3443,7 +3432,11 @@ msgstr "tampon trop petit" msgid "math domain error" msgstr "erreur de domaine math" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "les dimensions de la matrice ne correspondent pas" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "la matrice n'est pas définie positive" @@ -3465,15 +3458,15 @@ msgstr "nombre maximal de dimensions est 4" msgid "maximum recursion depth exceeded" msgstr "profondeur maximale de récursivité dépassée" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "maxiter doit être > 0" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "maxiter devrait être > 0" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "Paramètre pour median doit être un ndarray" @@ -3494,7 +3487,7 @@ msgstr "memoryview: length n'est pas un multiple de itemsize" msgid "module not found" msgstr "module introuvable" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "plus de degrés de liberté que de points de données" @@ -3613,7 +3606,7 @@ msgstr "le délai non-zéro doit être > 0.01" msgid "non-zero timeout must be >= interval" msgstr "le délai non-zéro doit être >= interval" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "norm est défini pour des tableaux 1D et 2D" @@ -3715,8 +3708,8 @@ msgstr "seul sample_rate = 16000 est pris en charge" msgid "only slices with step=1 (aka None) are supported" msgstr "seules les tranches avec 'step=1' (cad None) sont supportées" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "les opérandes ne pouvaient pas être diffusés ensemble" @@ -3724,7 +3717,7 @@ msgstr "les opérandes ne pouvaient pas être diffusés ensemble" msgid "operation is implemented for 1D Boolean arrays only" msgstr "opération implémentée que pour des tableaux 1D booléennes" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "l'opération n'est pas implémentée sur les ndarrays" @@ -3872,7 +3865,7 @@ msgstr "dépassement de file" msgid "raw f-strings are not implemented" msgstr "les chaînes f brutes ne sont pas implémentées" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "les parties réelles et imaginaires doivent être de longueur égale" @@ -3907,7 +3900,7 @@ msgstr "rgb_pins[%d] duplique une autre affectation de broches" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "rgb_pins[%d] n'est pas sur le même port que l'horloge" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "paramêtre roll doit être un ndarray" @@ -3956,7 +3949,7 @@ msgstr "signe non autorisé avec la spéc. de format d'entier 'c'" msgid "single '}' encountered in format string" msgstr "'}' seule rencontrée dans une chaîne de format" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "la taille est définie pour les ndarrays uniquement" @@ -3964,10 +3957,6 @@ msgstr "la taille est définie pour les ndarrays uniquement" msgid "sleep length must be non-negative" msgstr "la longueur de sleep ne doit pas être négative" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "le pas 'step' de la tranche ne peut être zéro" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "le pas 'step' de la tranche ne peut être zéro" @@ -3980,19 +3969,19 @@ msgstr "dépassement de capacité d'un entier court" msgid "soft reboot\n" msgstr "redémarrage logiciel\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "l'argument de «sort» doit être un ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "le tableau sos doit être de forme (n_section, 6)" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "sos[:, 3] doivent tous être à un" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "sosfilt nécessite des argument itératifs" @@ -4107,7 +4096,7 @@ msgstr "tobytes ne peut être appelé que pour des tableaux dense" msgid "too many arguments provided with the given format" msgstr "trop d'arguments fournis avec ce format" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "Trop de dimensions" @@ -4120,11 +4109,11 @@ msgstr "trop d'indices" msgid "too many values to unpack (expected %d)" msgstr "trop de valeur à dégrouper (%d attendues)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "trapz est défini pour tableaux à une dimension" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz n'est défini que pour des tableaux 1D de longueur égale" @@ -4266,6 +4255,10 @@ msgstr "la valeur doit tenir dans %d octet(s)" msgid "value_count must be > 0" msgstr "'value_count' doit être > 0" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "les vecteurs doivent avoir la même longueur" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflit au réveil" @@ -4295,7 +4288,7 @@ msgstr "wifi n’est pas activé" msgid "window must be <= interval" msgstr "la fenêtre (window) doit être <= intervalle (interval)" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "index d'axe incorrecte" @@ -4303,7 +4296,7 @@ msgstr "index d'axe incorrecte" msgid "wrong axis specified" msgstr "axe incorrecte spécifiée" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "type d'entrée incorrect" @@ -4319,7 +4312,7 @@ msgstr "mauvais nombre de valeurs à dégrouper" msgid "wrong operand type" msgstr "type d'opérande incorrect" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "type de sortie incorrect" @@ -4343,18 +4336,30 @@ msgstr "valeur y hors limites" msgid "zero step" msgstr "'step' nul" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi doit être ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "zi doit être de type float" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "dimensions do not match" +#~ msgstr "les dimensions ne correspondent pas" + +#~ msgid "first argument must be an iterable" +#~ msgstr "le premier argument doit être un itérable" + +#~ msgid "iterables are not of the same length" +#~ msgstr "les itérables ne sont pas de la même longueur" + +#~ msgid "slice step can't be zero" +#~ msgstr "le pas 'step' de la tranche ne peut être zéro" + #~ msgid "Selected CTS pin not valid" #~ msgstr "La broche CTS sélectionnée n'est pas valide" @@ -4389,12 +4394,6 @@ msgstr "zi doit être de forme (n_section, 2)" #~ "Le minuteur est reservé pour un usage interne - déclarez la broche PWM " #~ "plus tôt dans le programme" -#~ msgid "matrix dimensions do not match" -#~ msgstr "les dimensions de la matrice ne correspondent pas" - -#~ msgid "vectors must have same lengths" -#~ msgstr "les vecteurs doivent avoir la même longueur" - #~ msgid "Group full" #~ msgstr "Groupe plein" diff --git a/locale/hi.po b/locale/hi.po index 046e88d53a..786b254002 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -929,11 +929,11 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "" @@ -2387,11 +2387,11 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2399,7 +2399,7 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "" @@ -2412,7 +2412,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "" @@ -2425,11 +2426,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "" @@ -2437,15 +2438,15 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2746,19 +2747,19 @@ msgstr "" msgid "conversion to object" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "" @@ -2766,15 +2767,15 @@ msgstr "" msgid "couldn't determine SD card version" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "" @@ -2811,18 +2812,14 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2938,11 +2935,11 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "" @@ -2950,11 +2947,7 @@ msgstr "" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "" @@ -2966,7 +2959,7 @@ msgstr "" msgid "flattening order must be either 'C', or 'F'" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "" @@ -2999,7 +2992,7 @@ msgstr "" msgid "function got multiple values for argument '%q'" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3074,7 +3067,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3088,7 +3081,7 @@ msgstr "" msgid "indices must be integers, slices, or Boolean lists" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "" @@ -3108,7 +3101,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "" @@ -3116,15 +3109,15 @@ msgstr "" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "" @@ -3140,23 +3133,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3168,7 +3161,7 @@ msgstr "" msgid "integer required" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3257,11 +3250,7 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "" @@ -3329,7 +3318,11 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3351,15 +3344,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3380,7 +3373,7 @@ msgstr "" msgid "module not found" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "" @@ -3498,7 +3491,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3599,8 +3592,8 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "" @@ -3608,7 +3601,7 @@ msgstr "" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "" @@ -3753,7 +3746,7 @@ msgstr "" msgid "raw f-strings are not implemented" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "" @@ -3788,7 +3781,7 @@ msgstr "" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3835,7 +3828,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "" @@ -3843,10 +3836,6 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -3859,19 +3848,19 @@ msgstr "" msgid "soft reboot\n" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -3985,7 +3974,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -3998,11 +3987,11 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -4144,6 +4133,10 @@ msgstr "" msgid "value_count must be > 0" msgstr "" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4173,7 +4166,7 @@ msgstr "" msgid "window must be <= interval" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4181,7 +4174,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" @@ -4197,7 +4190,7 @@ msgstr "" msgid "wrong operand type" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "" @@ -4221,14 +4214,14 @@ msgstr "" msgid "zero step" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 2b7bf0725f..774856872d 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -951,11 +951,11 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "" @@ -2430,11 +2430,11 @@ msgstr "gli indirizzi sono vuoti" msgid "arg is an empty sequence" msgstr "l'argomento è una sequenza vuota" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2442,7 +2442,7 @@ msgstr "" msgid "argument has wrong type" msgstr "il tipo dell'argomento è errato" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "" @@ -2455,7 +2455,8 @@ msgstr "discrepanza di numero/tipo di argomenti" msgid "argument should be a '%q' not a '%q'" msgstr "l'argomento dovrebbe essere un '%q' e non un '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "" @@ -2468,11 +2469,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "" @@ -2480,15 +2481,15 @@ msgstr "" msgid "attributes not supported yet" msgstr "attributi non ancora supportati" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2795,19 +2796,19 @@ msgstr "la costante deve essere un intero" msgid "conversion to object" msgstr "conversione in oggetto" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "" @@ -2815,15 +2816,15 @@ msgstr "" msgid "couldn't determine SD card version" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "" @@ -2863,18 +2864,14 @@ msgstr "destination_length deve essere un int >= 0" msgid "dict update sequence has wrong length" msgstr "sequanza di aggiornamento del dizionario ha la lunghezza errata" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2991,11 +2988,11 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "il filesystem deve fornire un metodo di mount" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "" @@ -3003,11 +3000,7 @@ msgstr "" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "" @@ -3019,7 +3012,7 @@ msgstr "" msgid "flattening order must be either 'C', or 'F'" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "" @@ -3052,7 +3045,7 @@ msgstr "la funzione prevede al massimo %d argmoneti, ma ne ha ricevuti %d" msgid "function got multiple values for argument '%q'" msgstr "la funzione ha ricevuto valori multipli per l'argomento '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3128,7 +3121,7 @@ msgstr "padding incorretto" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3142,7 +3135,7 @@ msgstr "gli indici devono essere interi" msgid "indices must be integers, slices, or Boolean lists" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "" @@ -3162,7 +3155,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "" @@ -3170,15 +3163,15 @@ msgstr "" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "" @@ -3194,23 +3187,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3222,7 +3215,7 @@ msgstr "il secondo argomanto di int() deve essere >= 2 e <= 36" msgid "integer required" msgstr "intero richiesto" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3313,11 +3306,7 @@ msgstr "" "il secondo argomento di issubclass() deve essere una classe o una tupla di " "classi" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "" @@ -3388,7 +3377,11 @@ msgstr "map buffer troppo piccolo" msgid "math domain error" msgstr "errore di dominio matematico" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3410,15 +3403,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "profondità massima di ricorsione superata" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3439,7 +3432,7 @@ msgstr "" msgid "module not found" msgstr "modulo non trovato" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "" @@ -3558,7 +3551,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3662,8 +3655,8 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "solo slice con step=1 (aka None) sono supportate" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "" @@ -3671,7 +3664,7 @@ msgstr "" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "" @@ -3819,7 +3812,7 @@ msgstr "overflow della coda" msgid "raw f-strings are not implemented" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "" @@ -3854,7 +3847,7 @@ msgstr "" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3903,7 +3896,7 @@ msgstr "segno non permesso nello spcificatore di formato 'c' della stringa" msgid "single '}' encountered in format string" msgstr "'}' singolo presente nella stringa di formattazione" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "" @@ -3911,10 +3904,6 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "la lunghezza di sleed deve essere non negativa" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "la step della slice non può essere zero" @@ -3927,19 +3916,19 @@ msgstr "small int overflow" msgid "soft reboot\n" msgstr "soft reboot\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -4055,7 +4044,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "troppi argomenti forniti con il formato specificato" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -4068,11 +4057,11 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "troppi valori da scompattare (%d attesi)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -4214,6 +4203,10 @@ msgstr "" msgid "value_count must be > 0" msgstr "" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4243,7 +4236,7 @@ msgstr "" msgid "window must be <= interval" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4251,7 +4244,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" @@ -4267,7 +4260,7 @@ msgstr "numero di valori da scompattare non corretto" msgid "wrong operand type" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "" @@ -4293,15 +4286,15 @@ msgstr "indirizzo fuori limite" msgid "zero step" msgstr "zero step" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 607cf642b4..3d10268c81 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -940,11 +940,11 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "FFTはndarrayでのみ使えます" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "" @@ -2410,11 +2410,11 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "argsortの引数はndarrayでなければなりません" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2422,7 +2422,7 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "引数はndarrayでなければなりません" @@ -2435,7 +2435,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "引数には '%q' が必要('%q' ではなく)" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "引数はndarrayでなければなりません" @@ -2448,11 +2449,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "右辺にはarray/bytesが必要" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "" @@ -2460,15 +2461,15 @@ msgstr "" msgid "attributes not supported yet" msgstr "属性は未対応です" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2771,19 +2772,19 @@ msgstr "定数は整数でなければなりません" msgid "conversion to object" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "convolve引数には1次元arrayが必要" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "convolve引数はndarrayでなければなりません" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "ヴァンデルモンド行列の逆行列を求められません" @@ -2791,15 +2792,15 @@ msgstr "ヴァンデルモンド行列の逆行列を求められません" msgid "couldn't determine SD card version" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "dataはイテレート可能でなければなりません" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "dataは同じ長さでなければなりません" @@ -2838,18 +2839,14 @@ msgstr "desitination_lengthは正の整数でなければなりません" msgid "dict update sequence has wrong length" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "引数はndarrayでなければなりません" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2965,11 +2962,11 @@ msgstr "fileはバイトモードで開かれたファイルでなければな msgid "filesystem must provide mount method" msgstr "filesystemはmountメソッドを提供しなければなりません" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "1つ目の引数は呼び出し可能でなければなりません" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "1つ目の引数は関数でなければなりません" @@ -2977,11 +2974,7 @@ msgstr "1つ目の引数は関数でなければなりません" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "1つ目の引数はイテレート可能でなければなりません" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "1つ目の引数はndarrayでなければなりません" @@ -2993,7 +2986,7 @@ msgstr "superの第1引数は型でなければなりません" msgid "flattening order must be either 'C', or 'F'" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "flipの引数はndarrayでなければなりません" @@ -3026,7 +3019,7 @@ msgstr "" msgid "function got multiple values for argument '%q'" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3101,7 +3094,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3116,7 +3109,7 @@ msgid "indices must be integers, slices, or Boolean lists" msgstr "" "インデクスは、整数、スライス、boolのリストのいずれかでなければなりません" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "" @@ -3136,7 +3129,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "入力array長は2の累乗でなければなりません" @@ -3144,15 +3137,15 @@ msgstr "入力array長は2の累乗でなければなりません" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "入力行列が非対称" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "入力が非正則行列" @@ -3168,23 +3161,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "入力は正方行列でなければなりません" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "入力はtuple, list, range, ndarrayでなければなりません" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3196,7 +3189,7 @@ msgstr "int()の第2引数は2以上36以下でなければなりません" msgid "integer required" msgstr "整数が必要" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3285,11 +3278,7 @@ msgstr "issubclass()の第1引数はクラスでなければなりません" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass()の第2引数はクラスかクラスのタプルでなければなりません" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "iterableが同じ長さではありません" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "収束しません" @@ -3357,7 +3346,11 @@ msgstr "" msgid "math domain error" msgstr "定義域エラー" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "行列の次元が一致しません" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "正定値行列ではありません" @@ -3379,15 +3372,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "最大の再帰深度を超えました" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3408,7 +3401,7 @@ msgstr "" msgid "module not found" msgstr "モジュールが見つかりません" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "" @@ -3526,7 +3519,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3627,8 +3620,8 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "" @@ -3636,7 +3629,7 @@ msgstr "" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "この演算はndarray上で実装されていません" @@ -3783,7 +3776,7 @@ msgstr "キューがオーバーフローしました" msgid "raw f-strings are not implemented" msgstr "raw f-文字列は実装されていません" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "実数部と虚数部は同じ長さでなければなりません" @@ -3818,7 +3811,7 @@ msgstr "" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "rgb_pins[%d]はクロックと同じポートではありません" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3866,7 +3859,7 @@ msgstr "整数フォーマット指定子'c'で符号は使えません" msgid "single '}' encountered in format string" msgstr "文字列フォーマット中に孤立した '}' があります" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "" @@ -3874,10 +3867,6 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "sleepの長さは非負数でなければなりません" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "スライスのステップは0にできません" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -3890,19 +3879,19 @@ msgstr "small int オーバーフロー" msgid "soft reboot\n" msgstr "ソフトリブート\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -4016,7 +4005,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "指定された書式に対して引数が多すぎます" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -4029,11 +4018,11 @@ msgstr "インデクスが多すぎます" msgid "too many values to unpack (expected %d)" msgstr "アンパックする値が多すぎます (%d個を期待)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapzは同じ長さの1次元arrayに対して定義されています" @@ -4175,6 +4164,10 @@ msgstr "値は%dバイトに収まらなければなりません" msgid "value_count must be > 0" msgstr "value_countは0より大きくなければなりません" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4204,7 +4197,7 @@ msgstr "" msgid "window must be <= interval" msgstr "windowはinterval以下でなければなりません" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4212,7 +4205,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" @@ -4228,7 +4221,7 @@ msgstr "アンパックする値の個数が不正です" msgid "wrong operand type" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "" @@ -4252,18 +4245,27 @@ msgstr "yが範囲外" msgid "zero step" msgstr "ステップが0" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "ziはndarrayでなければなりません" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "ziはfloat値でなければなりません" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "first argument must be an iterable" +#~ msgstr "1つ目の引数はイテレート可能でなければなりません" + +#~ msgid "iterables are not of the same length" +#~ msgstr "iterableが同じ長さではありません" + +#~ msgid "slice step can't be zero" +#~ msgstr "スライスのステップは0にできません" + #~ msgid "Selected CTS pin not valid" #~ msgstr "選択されたCTSピンが不正" @@ -4291,9 +4293,6 @@ msgstr "" #~ msgid "No more timers available on this pin." #~ msgstr "このピンには使えるタイマーがもうありません" -#~ msgid "matrix dimensions do not match" -#~ msgstr "行列の次元が一致しません" - #~ msgid "Group full" #~ msgstr "グループが一杯" diff --git a/locale/ko.po b/locale/ko.po index b40f6ac89e..86c586670d 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -932,11 +932,11 @@ msgstr "" msgid "Extended advertisements with scan response not supported." msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "" @@ -2391,11 +2391,11 @@ msgstr "" msgid "arg is an empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2403,7 +2403,7 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "" @@ -2416,7 +2416,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "" @@ -2429,11 +2430,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "" @@ -2441,15 +2442,15 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2750,19 +2751,19 @@ msgstr "" msgid "conversion to object" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "" @@ -2770,15 +2771,15 @@ msgstr "" msgid "couldn't determine SD card version" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "" @@ -2815,18 +2816,14 @@ msgstr "" msgid "dict update sequence has wrong length" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2942,11 +2939,11 @@ msgstr "" msgid "filesystem must provide mount method" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "" @@ -2954,11 +2951,7 @@ msgstr "" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "" @@ -2970,7 +2963,7 @@ msgstr "" msgid "flattening order must be either 'C', or 'F'" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "" @@ -3003,7 +2996,7 @@ msgstr "" msgid "function got multiple values for argument '%q'" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3078,7 +3071,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3092,7 +3085,7 @@ msgstr "" msgid "indices must be integers, slices, or Boolean lists" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "" @@ -3112,7 +3105,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "" @@ -3120,15 +3113,15 @@ msgstr "" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "" @@ -3144,23 +3137,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3172,7 +3165,7 @@ msgstr "" msgid "integer required" msgstr "정수가 필요합니다" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3261,11 +3254,7 @@ msgstr "" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "" @@ -3333,7 +3322,11 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3355,15 +3348,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3384,7 +3377,7 @@ msgstr "" msgid "module not found" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "" @@ -3502,7 +3495,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3603,8 +3596,8 @@ msgstr "" msgid "only slices with step=1 (aka None) are supported" msgstr "" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "" @@ -3612,7 +3605,7 @@ msgstr "" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "" @@ -3757,7 +3750,7 @@ msgstr "" msgid "raw f-strings are not implemented" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "" @@ -3792,7 +3785,7 @@ msgstr "" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3839,7 +3832,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "" @@ -3847,10 +3840,6 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -3863,19 +3852,19 @@ msgstr "" msgid "soft reboot\n" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -3989,7 +3978,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -4002,11 +3991,11 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -4148,6 +4137,10 @@ msgstr "" msgid "value_count must be > 0" msgstr "" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4177,7 +4170,7 @@ msgstr "" msgid "window must be <= interval" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4185,7 +4178,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" @@ -4201,7 +4194,7 @@ msgstr "" msgid "wrong operand type" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "" @@ -4225,15 +4218,15 @@ msgstr "" msgid "zero step" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index ce89a9d82a..2305e47f3b 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -940,11 +940,11 @@ msgstr "Verwachtte een tuple met lengte %d, maar kreeg %d" msgid "Extended advertisements with scan response not supported." msgstr "Extended advertisements met scan antwoord niet ondersteund." -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "FFT alleen voor ndarrays gedefineerd" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "FFT is alleen geïmplementeerd voor lineaire arrays" @@ -2438,11 +2438,11 @@ msgstr "adressen zijn leeg" msgid "arg is an empty sequence" msgstr "arg is een lege sequentie" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "argsort argument moet een ndarray zijn" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "argsort wordt niet geïmplementeerd voor vlakke arrays" @@ -2450,7 +2450,7 @@ msgstr "argsort wordt niet geïmplementeerd voor vlakke arrays" msgid "argument has wrong type" msgstr "argument heeft onjuist type" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "argument moet ndarray zijn" @@ -2463,7 +2463,8 @@ msgstr "argument num/typen komen niet overeen" msgid "argument should be a '%q' not a '%q'" msgstr "argument moet een '%q' zijn en niet een '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "argumenten moeten ndarrays zijn" @@ -2476,11 +2477,11 @@ msgstr "array en indexlengte moeten gelijk zijn" msgid "array/bytes required on right side" msgstr "array/bytes vereist aan de rechterkant" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "verzoek om (arg)min.(arg)max te krijgen van lege reeks" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "poging om argmin/argmax van een lege sequentie te krijgen" @@ -2488,15 +2489,15 @@ msgstr "poging om argmin/argmax van een lege sequentie te krijgen" msgid "attributes not supported yet" msgstr "attributen nog niet ondersteund" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "as is buiten bereik" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "as moet None of een integer zijn" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "as te lang" @@ -2799,19 +2800,19 @@ msgstr "constant moet een integer zijn" msgid "conversion to object" msgstr "conversie naar object" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "convolutie argumenten moeten lineaire arrays zijn" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "convolutie argumenten moeten ndarrays zijn" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "convolutie argumenten mogen niet leeg zijn" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "kon de Vandermonde matrix niet omkeren" @@ -2819,15 +2820,15 @@ msgstr "kon de Vandermonde matrix niet omkeren" msgid "couldn't determine SD card version" msgstr "kon SD kaart versie niet bepalen" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "kruis wordt gedefinieerd voor 1D-arrays van lengte 3" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "data moet itereerbaar zijn" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "data moet van gelijke lengte zijn" @@ -2866,18 +2867,14 @@ msgstr "destination_lengte moest een int groter dan of gelijk zijn aan 0 zijn" msgid "dict update sequence has wrong length" msgstr "dict update sequence heeft de verkeerde lengte" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "diff argument moet een ndarray zijn" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "differentiatievolgorde buiten bereik" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2993,11 +2990,11 @@ msgstr "bestand moet een bestand zijn geopend in byte modus" msgid "filesystem must provide mount method" msgstr "bestandssysteem moet een mount methode bieden" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "eerste argument moet een aanroepbare (callable) zijn" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "eerste argument moet een functie zijn" @@ -3005,11 +3002,7 @@ msgstr "eerste argument moet een functie zijn" msgid "first argument must be a tuple of ndarrays" msgstr "eerste argument moet een tupel van ndarrays zijn" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "eerst argument moet een iterabel zijn" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "eerst argument moet een ndarray zijn" @@ -3021,7 +3014,7 @@ msgstr "eerste argument voor super() moet een type zijn" msgid "flattening order must be either 'C', or 'F'" msgstr "De afvlakkingsvolgorde moet ofwel \"C\", ofwel \"F\" zijn" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "flip argumenten moeten een ndarray zijn" @@ -3054,7 +3047,7 @@ msgstr "functie verwachtte op zijn meest %d argumenten, maar kreeg %d" msgid "function got multiple values for argument '%q'" msgstr "functie kreeg meedere waarden voor argument '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "functie heeft hetzelfde teken aan beide uiteinden van het interval" @@ -3130,7 +3123,7 @@ msgstr "vulling (padding) is onjuist" msgid "index is out of bounds" msgstr "index is buiten bereik" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3144,7 +3137,7 @@ msgstr "indices moeten integers zijn" msgid "indices must be integers, slices, or Boolean lists" msgstr "indices moeten integers, segmenten (slices) of Boolean lijsten zijn" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "oorspronkelijke waarden moeten itereerbaar zijn" @@ -3164,7 +3157,7 @@ msgstr "in- en uitvoervormen zijn niet compatibel" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "invoer array lengte moet een macht van 2 zijn" @@ -3172,15 +3165,15 @@ msgstr "invoer array lengte moet een macht van 2 zijn" msgid "input arrays are not compatible" msgstr "input arrays zijn niet compatibel" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "invoerdata moet itereerbaar zijn" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "invoermatrix is asymmetrisch" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "invoermatrix is singulier" @@ -3196,23 +3189,23 @@ msgstr "invoer moet een tensor van rang 2 zijn" msgid "input must be an ndarray" msgstr "invoer moet een ndarray zijn" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "invoer moet eendimensionaal zijn" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "invoer moet een vierkante matrix zijn" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "invoer moet een tuple, lijst, bereik of ndarray zijn" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "invoervectors moeten van gelijke lengte zijn" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "invoer is niet itereerbaar" @@ -3224,7 +3217,7 @@ msgstr "int() argument 2 moet >=2 en <= 36 zijn" msgid "integer required" msgstr "integer vereist" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "interp is gedefinieerd voor eendimensionale arrays van gelijke lengte" @@ -3313,11 +3306,7 @@ msgstr "issubclass() argument 1 moet een klasse zijn" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() argument 2 moet een klasse of tuple van klassen zijn" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "itereerbare objecten hebben niet dezelfde lengte" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "itereerbare objecten convergeren niet" @@ -3388,7 +3377,11 @@ msgstr "map buffer te klein" msgid "math domain error" msgstr "fout in het wiskundig domein (math domain error)" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "matrix afmetingen komen niet overeen" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrix is niet positief-definiet" @@ -3410,15 +3403,15 @@ msgstr "maximaal aantal dimensies is 4" msgid "maximum recursion depth exceeded" msgstr "maximale recursiediepte overschreden" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "maxiter moet groter dan 0 zijn" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "maxiter moet groter dan 0 zijn" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3439,7 +3432,7 @@ msgstr "" msgid "module not found" msgstr "module niet gevonden" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "meer vrijheidsgraden dan datapunten" @@ -3557,7 +3550,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "norm is gedefinieerd voor 1D en 2D arrays" @@ -3658,8 +3651,8 @@ msgstr "alleen sample_rate=16000 wordt ondersteund" msgid "only slices with step=1 (aka None) are supported" msgstr "alleen segmenten met step=1 (ook wel None) worden ondersteund" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "operands konden niet samen verzonden worden" @@ -3667,7 +3660,7 @@ msgstr "operands konden niet samen verzonden worden" msgid "operation is implemented for 1D Boolean arrays only" msgstr "operatie is alleen geïmplementeerd voor 1D Booleaanse arrays" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "bewerking is voor ndarrays niet geïmplementeerd" @@ -3813,7 +3806,7 @@ msgstr "wachtrij overloop" msgid "raw f-strings are not implemented" msgstr "ruwe f-strings zijn niet geïmplementeerd" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "reëel en imaginair deel moeten gelijke lengte hebben" @@ -3848,7 +3841,7 @@ msgstr "rgb_pins[%d] is hetzelfde als een andere pintoewijzing" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "rgb_pins[%d] bevindt zich niet op dezelfde poort als klok" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "roll argument moet een ndarray zijn" @@ -3897,7 +3890,7 @@ msgstr "teken niet toegestaan bij integer formaatspecificatie 'c'" msgid "single '}' encountered in format string" msgstr "enkele '}' aangetroffen in formaat tekenreeks (string)" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "omvang is alleen voor ndarrays gedefinieerd" @@ -3905,10 +3898,6 @@ msgstr "omvang is alleen voor ndarrays gedefinieerd" msgid "sleep length must be non-negative" msgstr "de slaapduur mag niet negatief zijn" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "segmentstap mag niet nul zijn" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "segmentstap mag niet nul zijn" @@ -3921,19 +3910,19 @@ msgstr "small int overloop" msgid "soft reboot\n" msgstr "zachte herstart\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "sorteerargument moet een ndarray zijn" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "sos array moet vorm (n_section, 6) hebben" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "sos[:, 3] moeten allemaal 1 zijn" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "sosfilt vereist itereerbare argumenten" @@ -4047,7 +4036,7 @@ msgstr "tobytes kunnen alleen ingeroepen worden voor gesloten arrays" msgid "too many arguments provided with the given format" msgstr "te veel argumenten opgegeven bij dit formaat" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -4060,11 +4049,11 @@ msgstr "te veel indices" msgid "too many values to unpack (expected %d)" msgstr "te veel waarden om uit te pakken (%d verwacht)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz is gedefinieerd voor eendimensionale arrays van gelijke lengte" @@ -4206,6 +4195,10 @@ msgstr "waarde moet in %d byte(s) passen" msgid "value_count must be > 0" msgstr "value_count moet groter dan 0 zijn" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "vectoren moeten van gelijke lengte zijn" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflict bij ontwaken" @@ -4235,7 +4228,7 @@ msgstr "" msgid "window must be <= interval" msgstr "window moet <= interval zijn" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "foute index voor as" @@ -4243,7 +4236,7 @@ msgstr "foute index voor as" msgid "wrong axis specified" msgstr "onjuiste as gespecificeerd" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "onjuist invoertype" @@ -4259,7 +4252,7 @@ msgstr "verkeerd aantal waarden om uit te pakken" msgid "wrong operand type" msgstr "verkeerd operandtype" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "onjuist uitvoer type" @@ -4283,18 +4276,27 @@ msgstr "y-waarde buiten bereik" msgid "zero step" msgstr "nul-stap" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi moet een ndarray zijn" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "zi moet van type float zijn" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "first argument must be an iterable" +#~ msgstr "eerst argument moet een iterabel zijn" + +#~ msgid "iterables are not of the same length" +#~ msgstr "itereerbare objecten hebben niet dezelfde lengte" + +#~ msgid "slice step can't be zero" +#~ msgstr "segmentstap mag niet nul zijn" + #~ msgid "Selected CTS pin not valid" #~ msgstr "Geselecteerde CTS pin niet geldig" @@ -4329,12 +4331,6 @@ msgstr "zi moet vorm (n_section, 2) hebben" #~ "Timer is gereserveerd voor intern gebruik - wijs PWM pins eerder in het " #~ "programma toe" -#~ msgid "matrix dimensions do not match" -#~ msgstr "matrix afmetingen komen niet overeen" - -#~ msgid "vectors must have same lengths" -#~ msgstr "vectoren moeten van gelijke lengte zijn" - #~ msgid "Group full" #~ msgstr "Groep is vol" diff --git a/locale/pl.po b/locale/pl.po index 65e7f22fb9..ed3c1c8cdc 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -940,11 +940,11 @@ msgstr "Oczekiwano krotkę długości %d, otrzymano %d" msgid "Extended advertisements with scan response not supported." msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "" @@ -2407,11 +2407,11 @@ msgstr "adres jest pusty" msgid "arg is an empty sequence" msgstr "arg jest puste" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "" @@ -2419,7 +2419,7 @@ msgstr "" msgid "argument has wrong type" msgstr "argument ma zły typ" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "" @@ -2432,7 +2432,8 @@ msgstr "zła liczba lub typ argumentów" msgid "argument should be a '%q' not a '%q'" msgstr "argument powinien być '%q' a nie '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "" @@ -2445,11 +2446,11 @@ msgstr "" msgid "array/bytes required on right side" msgstr "tablica/bytes wymagane po prawej stronie" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "" @@ -2457,15 +2458,15 @@ msgstr "" msgid "attributes not supported yet" msgstr "atrybuty nie są jeszcze obsługiwane" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "" @@ -2766,19 +2767,19 @@ msgstr "stała musi być liczbą całkowitą" msgid "conversion to object" msgstr "konwersja do obiektu" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "" @@ -2786,15 +2787,15 @@ msgstr "" msgid "couldn't determine SD card version" msgstr "nie można określić wersji karty SD" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "" @@ -2832,18 +2833,14 @@ msgstr "destination_length musi być nieujemną liczbą całkowitą" msgid "dict update sequence has wrong length" msgstr "sekwencja ma złą długość" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2959,11 +2956,11 @@ msgstr "file musi być otwarte w trybie bajtowym" msgid "filesystem must provide mount method" msgstr "system plików musi mieć metodę mount" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "pierwszy argument musi być funkcją" @@ -2971,11 +2968,7 @@ msgstr "pierwszy argument musi być funkcją" msgid "first argument must be a tuple of ndarrays" msgstr "" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "pierwszy argument musi być iterowalny" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "" @@ -2987,7 +2980,7 @@ msgstr "pierwszy argument super() musi być typem" msgid "flattening order must be either 'C', or 'F'" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "" @@ -3020,7 +3013,7 @@ msgstr "funkcja bierze najwyżej %d argumentów, jest %d" msgid "function got multiple values for argument '%q'" msgstr "funkcja dostała wiele wartości dla argumentu '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -3095,7 +3088,7 @@ msgstr "złe wypełnienie" msgid "index is out of bounds" msgstr "indeks jest poza zakresem" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3109,7 +3102,7 @@ msgstr "indeksy muszą być całkowite" msgid "indices must be integers, slices, or Boolean lists" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "wartości początkowe muszą być iterowalne" @@ -3129,7 +3122,7 @@ msgstr "" msgid "input argument must be an integer, a tuple, or a list" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "długość tablicy wejściowej musi być potęgą 2" @@ -3137,15 +3130,15 @@ msgstr "długość tablicy wejściowej musi być potęgą 2" msgid "input arrays are not compatible" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "" @@ -3161,23 +3154,23 @@ msgstr "" msgid "input must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "wejście musi być macierzą kwadratową" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "wektory wejściowe muszą być równej długości" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "" @@ -3189,7 +3182,7 @@ msgstr "argument 2 do int() busi być pomiędzy 2 a 36" msgid "integer required" msgstr "wymagana liczba całkowita" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "" @@ -3278,11 +3271,7 @@ msgstr "argument 1 dla issubclass() musi być klasą" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "argument 2 dla issubclass() musi być klasą lub krotką klas" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "" @@ -3350,7 +3339,11 @@ msgstr "bufor mapy zbyt mały" msgid "math domain error" msgstr "błąd domeny" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3372,15 +3365,15 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "przekroczono dozwoloną głębokość rekurencji" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "" @@ -3401,7 +3394,7 @@ msgstr "" msgid "module not found" msgstr "brak modułu" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "" @@ -3519,7 +3512,7 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3620,8 +3613,8 @@ msgstr "obsługiwane jest tylko sample_rate=16000" msgid "only slices with step=1 (aka None) are supported" msgstr "tylko fragmenty ze step=1 (lub None) są wspierane" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "operandy nie mogły być rozgłaszane razem" @@ -3629,7 +3622,7 @@ msgstr "operandy nie mogły być rozgłaszane razem" msgid "operation is implemented for 1D Boolean arrays only" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "" @@ -3775,7 +3768,7 @@ msgstr "przepełnienie kolejki" msgid "raw f-strings are not implemented" msgstr "" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "rzeczywiste i urojone części muszą mieć jednakową długość" @@ -3810,7 +3803,7 @@ msgstr "" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "" @@ -3858,7 +3851,7 @@ msgstr "znak jest niedopuszczalny w specyfikacji 'c'" msgid "single '}' encountered in format string" msgstr "pojedynczy '}' w specyfikacji formatu" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "" @@ -3866,10 +3859,6 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "okres snu musi być nieujemny" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "zerowy krok" @@ -3882,19 +3871,19 @@ msgstr "przepełnienie small int" msgid "soft reboot\n" msgstr "programowy reset\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "argument sort musi być ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "" @@ -4008,7 +3997,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "zbyt wiele argumentów podanych dla tego formatu" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "" @@ -4021,11 +4010,11 @@ msgstr "zbyt wiele indeksów" msgid "too many values to unpack (expected %d)" msgstr "zbyt wiele wartości do rozpakowania (oczekiwano %d)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -4167,6 +4156,10 @@ msgstr "wartość musi mieścić się w %d bajtach" msgid "value_count must be > 0" msgstr "value_count musi być > 0" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "wektory muszą mieć identyczną długość" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4196,7 +4189,7 @@ msgstr "" msgid "window must be <= interval" msgstr "" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "" @@ -4204,7 +4197,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "nieprawidłowy typ wejścia" @@ -4220,7 +4213,7 @@ msgstr "zła liczba wartości do rozpakowania" msgid "wrong operand type" msgstr "zły typ operandu" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "nieprawidłowy typ wyjścia" @@ -4244,18 +4237,21 @@ msgstr "y poza zakresem" msgid "zero step" msgstr "zerowy krok" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "first argument must be an iterable" +#~ msgstr "pierwszy argument musi być iterowalny" + #~ msgid "Selected CTS pin not valid" #~ msgstr "Wybrany pin CTS jest nieprawidłowy" @@ -4277,9 +4273,6 @@ msgstr "" #~ msgid "No more channels available" #~ msgstr "Brak dostępnych kanałów" -#~ msgid "vectors must have same lengths" -#~ msgstr "wektory muszą mieć identyczną długość" - #~ msgid "Group full" #~ msgstr "Grupa pełna" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 0929f8efbd..b60ed95e58 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -958,11 +958,11 @@ msgstr "Tupla esperada com comprimento %d, obteve %d" msgid "Extended advertisements with scan response not supported." msgstr "Anúncios estendidos não compatíveis com a resposta da varredura." -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "O FFT é definido apenas para ndarrays" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "O FFT é implementado apenas para matrizes lineares" @@ -2473,11 +2473,11 @@ msgstr "os endereços estão vazios" msgid "arg is an empty sequence" msgstr "o arg é uma sequência vazia" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "O argumento argsort deve ser um ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "argsort não é implementado para matrizes achatadas" @@ -2485,7 +2485,7 @@ msgstr "argsort não é implementado para matrizes achatadas" msgid "argument has wrong type" msgstr "argumento tem tipo errado" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "o argumento deve ser ndarray" @@ -2498,7 +2498,8 @@ msgstr "o argumento num/tipos não combinam" msgid "argument should be a '%q' not a '%q'" msgstr "o argumento deve ser um '%q' e não um '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "os argumentos devem ser ndarrays" @@ -2511,11 +2512,11 @@ msgstr "a matriz e comprimento do índice devem ser iguais" msgid "array/bytes required on right side" msgstr "matriz/bytes são necessários no lado direito" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "tentativa de obter (arg)min/(arg)max da sequência vazia" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "tente obter argmin/argmax de uma sequência vazia" @@ -2523,15 +2524,15 @@ msgstr "tente obter argmin/argmax de uma sequência vazia" msgid "attributes not supported yet" msgstr "atributos ainda não suportados" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "o eixo está fora dos limites" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "eixo deve ser Nenhum ou um número inteiro" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "o eixo é muito longo" @@ -2838,19 +2839,19 @@ msgstr "constante deve ser um inteiro" msgid "conversion to object" msgstr "conversão para o objeto" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "os argumentos convolutivos devem ser matrizes lineares" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "os argumentos convolutivos devem ser ndarrays" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "os argumentos convolutivos não devem estar vazios" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "não foi possível inverter a matriz Vandermonde" @@ -2858,15 +2859,15 @@ msgstr "não foi possível inverter a matriz Vandermonde" msgid "couldn't determine SD card version" msgstr "não foi possível determinar a versão do cartão SD" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "a cruz é definida para matrizes 1D de comprimento 3" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "os dados devem ser iteráveis" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "os dados devem ser de igual comprimento" @@ -2906,18 +2907,14 @@ msgstr "destination_length deve ser um int >= 0" msgid "dict update sequence has wrong length" msgstr "sequência da atualização dict tem o comprimento errado" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "O argumento diff deve ser um ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "ordem de diferenciação fora do alcance" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "as dimensões não coincidem" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3033,11 +3030,11 @@ msgstr "o arquivo deve ser um arquivo aberto no modo byte" msgid "filesystem must provide mount method" msgstr "sistema de arquivos deve fornecer método de montagem" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "o primeiro argumento deve ser chamável" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "o primeiro argumento deve ser uma função" @@ -3045,11 +3042,7 @@ msgstr "o primeiro argumento deve ser uma função" msgid "first argument must be a tuple of ndarrays" msgstr "o primeiro argumento deve ser um tuple de ndarrays" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "o primeiro argumento deve ser um iterável" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "o primeiro argumento deve ser um ndarray" @@ -3061,7 +3054,7 @@ msgstr "o primeiro argumento para super() deve ser um tipo" msgid "flattening order must be either 'C', or 'F'" msgstr "a ordem do nivelamento deve ser 'C' ou 'F'" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "o argumento flip deve ser um ndarray" @@ -3094,7 +3087,7 @@ msgstr "função esperada na maioria dos %d argumentos, obteve %d" msgid "function got multiple values for argument '%q'" msgstr "A função obteve vários valores para o argumento '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "a função tem o mesmo sinal nas extremidades do intervalo" @@ -3169,7 +3162,7 @@ msgstr "preenchimento incorreto" msgid "index is out of bounds" msgstr "o índice está fora dos limites" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3183,7 +3176,7 @@ msgstr "os índices devem ser inteiros" msgid "indices must be integers, slices, or Boolean lists" msgstr "os índices devem ser números inteiros, fatias ou listas booleanas" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "os valores iniciais devem ser iteráveis" @@ -3204,7 +3197,7 @@ msgid "input argument must be an integer, a tuple, or a list" msgstr "" "argumento da entrada deve ser um número inteiro, uma tupla ou uma lista" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "comprimento da matriz da entrada deve ter potência de 2" @@ -3212,15 +3205,15 @@ msgstr "comprimento da matriz da entrada deve ter potência de 2" msgid "input arrays are not compatible" msgstr "as matrizes da entrada não são compatíveis" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "os dados da entrada devem ser iteráveis" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "a matriz da entrada é assimétrica" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "a matriz da entrada é singular" @@ -3236,23 +3229,23 @@ msgstr "a entrada dos dados deve ser um tensor de nível 2" msgid "input must be an ndarray" msgstr "a entrada deve ser um ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "a entrada deve ser unidimensional" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "a entrada deve ser uma matriz quadrada" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "A entrada deve ser tupla, lista, intervalo ou matriz" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "os vetores da entrada devem ter o mesmo comprimento" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "as entradas não são iteráveis" @@ -3264,7 +3257,7 @@ msgstr "int() arg 2 deve ser >= 2 e <= 36" msgid "integer required" msgstr "inteiro requerido" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "o interp é definido para matrizes 1D de igual comprimento" @@ -3353,11 +3346,7 @@ msgstr "issubclass() arg 1 deve ser uma classe" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 deve ser uma classe ou uma tupla de classes" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "os iteráveis não têm o mesmo comprimento" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "as iterações não convergiram" @@ -3428,7 +3417,11 @@ msgstr "o mapa do buffer é muito pequeno" msgid "math domain error" msgstr "erro de domínio matemático" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "as dimensões da matriz não coincidem" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "a matriz não é definitiva positiva" @@ -3450,15 +3443,15 @@ msgstr "O número máximo de dimensões são 4" msgid "maximum recursion depth exceeded" msgstr "a recursão máxima da profundidade foi excedida" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "maxiter deve ser > 0" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "maxiter pode ser > 0" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "o argumento mediano deve ser um ndarray" @@ -3481,7 +3474,7 @@ msgstr "memoryview: o comprimento não é um múltiplo do tamanho dos itens" msgid "module not found" msgstr "o módulo não foi encontrado" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "mais graus de liberdade do que pontos de dados" @@ -3599,7 +3592,7 @@ msgstr "o tempo limite não zero deve ser > 0.01" msgid "non-zero timeout must be >= interval" msgstr "o tempo limite não zero deve ser >= intervalo" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "a norma é definida para matrizes 1D e 2D" @@ -3701,8 +3694,8 @@ msgid "only slices with step=1 (aka None) are supported" msgstr "" "apenas fatias com a etapa=1 (também conhecida como Nenhuma) são compatíveis" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "os operandos não puderam ser transmitidos juntos" @@ -3710,7 +3703,7 @@ msgstr "os operandos não puderam ser transmitidos juntos" msgid "operation is implemented for 1D Boolean arrays only" msgstr "A operação é implementada apenas para matrizes booleanas 1D" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "a operação não foi implementada nos ndarrays" @@ -3859,7 +3852,7 @@ msgstr "estouro de fila" msgid "raw f-strings are not implemented" msgstr "o f-strings bruto não estão implementados" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "partes reais e imaginárias devem ter o mesmo comprimento" @@ -3894,7 +3887,7 @@ msgstr "rgb_pins[%d] duplica outra atribuição dos pinos" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "rgb_pins[%d] não está na mesma porta que o clock" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "argumento de enrolar deve ser um ndarray" @@ -3943,7 +3936,7 @@ msgstr "sinal não permitido com o especificador no formato inteiro 'c'" msgid "single '}' encountered in format string" msgstr "único '}' encontrado na string do formato" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "o tamanho é definido apenas para os ndarrays" @@ -3951,10 +3944,6 @@ msgstr "o tamanho é definido apenas para os ndarrays" msgid "sleep length must be non-negative" msgstr "a duração do sleep não deve ser negativo" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "a etapa da fatia não pode ser zero" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "a etapa da fatia não pode ser zero" @@ -3967,19 +3956,19 @@ msgstr "transbordamento int pequeno" msgid "soft reboot\n" msgstr "reinicialização soft\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "o argumento da classificação deve ser um ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "o sos da matriz deve estar na forma (n_section, 6)" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "sos[:, 3] deve ser um em todos" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "o sosfilt requer que os argumentos sejam iteráveis" @@ -4093,7 +4082,7 @@ msgstr "os tobytes podem ser invocados apenas nas matrizes densas" msgid "too many arguments provided with the given format" msgstr "Muitos argumentos fornecidos com o formato dado" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "dimensões demais" @@ -4106,11 +4095,11 @@ msgstr "índices demais" msgid "too many values to unpack (expected %d)" msgstr "valores demais para descompactar (esperado %d)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "Trapz está definido para arrays 1D" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "o trapz está definido para 1D arrays de igual tamanho" @@ -4252,6 +4241,10 @@ msgstr "o valor deve caber em %d byte(s)" msgid "value_count must be > 0" msgstr "o value_count deve ser > 0" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "os vetores devem ter os mesmos comprimentos" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflito de wakeup" @@ -4281,7 +4274,7 @@ msgstr "o wifi não está ativo" msgid "window must be <= interval" msgstr "a janela deve ser <= intervalo" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "índice do eixo errado" @@ -4289,7 +4282,7 @@ msgstr "índice do eixo errado" msgid "wrong axis specified" msgstr "um eixo errado foi definido" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "tipo da entrada incorreta" @@ -4305,7 +4298,7 @@ msgstr "quantidade incorreta dos valores para descompressão" msgid "wrong operand type" msgstr "tipo do operando errado" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "tipo da saída incorreta" @@ -4329,18 +4322,30 @@ msgstr "o valor y está fora dos limites" msgid "zero step" msgstr "passo zero" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi deve ser um ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "zi deve ser de um tipo float" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "dimensions do not match" +#~ msgstr "as dimensões não coincidem" + +#~ msgid "first argument must be an iterable" +#~ msgstr "o primeiro argumento deve ser um iterável" + +#~ msgid "iterables are not of the same length" +#~ msgstr "os iteráveis não têm o mesmo comprimento" + +#~ msgid "slice step can't be zero" +#~ msgstr "a etapa da fatia não pode ser zero" + #~ msgid "Selected CTS pin not valid" #~ msgstr "O pino CTS selecionado é inválido" @@ -4375,12 +4380,6 @@ msgstr "zi deve estar na forma (n_section, 2)" #~ "O temporizador foi reservado para uso interno - declare os pinos PWM no " #~ "início do programa" -#~ msgid "matrix dimensions do not match" -#~ msgstr "as dimensões da matriz não coincidem" - -#~ msgid "vectors must have same lengths" -#~ msgstr "os vetores devem ter os mesmos comprimentos" - #~ msgid "Group full" #~ msgstr "Grupo cheio" diff --git a/locale/sv.po b/locale/sv.po index c867de8d68..3e704b1231 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -946,11 +946,11 @@ msgstr "Förväntad tupel med längd %d, fick %d" msgid "Extended advertisements with scan response not supported." msgstr "Utökad annonsering i kombination med skanningssvar stöds inte." -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "FFT är enbart definierade för ndarrays" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "FTT är enbart implementerad för linjära matriser" @@ -2441,11 +2441,11 @@ msgstr "adresserna är tomma" msgid "arg is an empty sequence" msgstr "arg är en tom sekvens" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "argumentet argsort måste vara en ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "argsort är inte implementerad för tillplattade matriser" @@ -2453,7 +2453,7 @@ msgstr "argsort är inte implementerad för tillplattade matriser" msgid "argument has wrong type" msgstr "argumentet har fel typ" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "argument måste vara ndarray" @@ -2466,7 +2466,8 @@ msgstr "argument antal/typ matchar inte" msgid "argument should be a '%q' not a '%q'" msgstr "argumentet skall vara en '%q', inte en '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "argumenten måste vara ndarray" @@ -2479,11 +2480,11 @@ msgstr "array och indexlängd måste vara lika" msgid "array/bytes required on right side" msgstr "array/bytes krävs på höger sida" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "försök att läsa (arg)min/(arg)max av tom sekvens" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "försök att få argmin/argmax för en tom sekvens" @@ -2491,15 +2492,15 @@ msgstr "försök att få argmin/argmax för en tom sekvens" msgid "attributes not supported yet" msgstr "attribut stöds inte än" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "axis är utanför gränsen" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "axis måste vara None eller ett heltal" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "axis för lång" @@ -2802,19 +2803,19 @@ msgstr "konstant måste vara ett heltal" msgid "conversion to object" msgstr "konvertering till objekt" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "Argumenten convolve måste vara linjära matriser" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "Argumenten convolve måste vara ndarray:er" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "Argumenten convolve kan inte vara tomma" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "kan inte invertera Vandermonde-matris" @@ -2822,15 +2823,15 @@ msgstr "kan inte invertera Vandermonde-matris" msgid "couldn't determine SD card version" msgstr "kan inte avgöra SD-kortversion" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "cross är definierad för 1D-matriser med längd 3" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "data måste vara itererbar" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "data måste vara av samma längd" @@ -2870,18 +2871,14 @@ msgstr "destination_length måste vara ett heltal >= 0" msgid "dict update sequence has wrong length" msgstr "uppdateringssekvensen för dict har fel längd" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "argumentet diff måste vara en ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "differentieringsordning utanför intervallet" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "dimensioner matchar inte" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2997,11 +2994,11 @@ msgstr "filen måste vara en fil som öppnats i byte-läge" msgid "filesystem must provide mount method" msgstr "filsystemet måste tillhandahålla mount-metod" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "första argumentet måste vara en callable" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "första argumentet måste vara en funktion" @@ -3009,11 +3006,7 @@ msgstr "första argumentet måste vara en funktion" msgid "first argument must be a tuple of ndarrays" msgstr "första argumentet måste vara en tupel av ndarray" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "första argumentet måste vara en iterable" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "första argumentet måste vara en ndarray" @@ -3025,7 +3018,7 @@ msgstr "första argumentet till super() måste vara typ" msgid "flattening order must be either 'C', or 'F'" msgstr "förenklingsordningen måste vara antingen \"C\" eller \"F\"" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "Argumentet flip måste vara en ndarray" @@ -3058,7 +3051,7 @@ msgstr "funktionen förväntar som mest %d argument, fick %d" msgid "function got multiple values for argument '%q'" msgstr "funktionen fick flera värden för argumentet '%q'" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "funktionen har samma teckenvärden vid slutet av intervall" @@ -3133,7 +3126,7 @@ msgstr "felaktig utfyllnad" msgid "index is out of bounds" msgstr "index är utanför gränserna" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3147,7 +3140,7 @@ msgstr "index måste vara heltal" msgid "indices must be integers, slices, or Boolean lists" msgstr "index måste vara heltal, slices, eller Boolean-listor" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "initialvärden måste vara iterable" @@ -3167,7 +3160,7 @@ msgstr "indata- och utdataformer är inte kompatibla" msgid "input argument must be an integer, a tuple, or a list" msgstr "indataargument måste vara integer, en tuple eller list" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "indataarraylängden måste vara en multipel av 2" @@ -3175,15 +3168,15 @@ msgstr "indataarraylängden måste vara en multipel av 2" msgid "input arrays are not compatible" msgstr "indatamatriser är inte kompatibla" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "indata måste vara en iterable" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "indatamatrisen är asymmetrisk" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "indatamatrisen är singulär" @@ -3199,23 +3192,23 @@ msgstr "indata måste vara en tensor av rank 2" msgid "input must be an ndarray" msgstr "indata måste vara en ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "indata måste vara endimensionell" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "indata måste vara kvadratmatris" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "indata måste vara tupel, lista, range, eller ndarray" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "indatavektorer måste ha samma längd" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "indata är inte iterbara" @@ -3227,7 +3220,7 @@ msgstr "int() arg 2 måste vara >= 2 och <= 36" msgid "integer required" msgstr "heltal krävs" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "interp är definierad för 1D-matriser med samma längd" @@ -3316,11 +3309,7 @@ msgstr "issubclass() arg 1 måste vara en klass" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 måste vara en klass eller en tupel av klasser" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "iterables är inte av samma längd" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "iterations konvergerar inte" @@ -3391,7 +3380,11 @@ msgstr "map-buffert för liten" msgid "math domain error" msgstr "matematikdomänfel" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "matrisdimensioner matchar inte" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrisen är inte positiv bestämd" @@ -3413,15 +3406,15 @@ msgstr "maximalt antal dimensioner är 4" msgid "maximum recursion depth exceeded" msgstr "maximal rekursionsdjup överskriden" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "maxiter måste vara > 0" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "maxiter bör vara > 0" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "argumentet median måste vara en ndarray" @@ -3442,7 +3435,7 @@ msgstr "memoryview: längden är inte en multipel av itemsize" msgid "module not found" msgstr "modulen hittades inte" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "fler frihetsgrader än datapunkter" @@ -3560,7 +3553,7 @@ msgstr "Icke-noll timeout måste vara > 0.01" msgid "non-zero timeout must be >= interval" msgstr "Icke-noll timeout måste vara >= intervall" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "norm är definierad för 1D- och 2D-matriser" @@ -3661,8 +3654,8 @@ msgstr "enbart sample_rate=16000 stöds" msgid "only slices with step=1 (aka None) are supported" msgstr "endast segment med steg=1 (aka Ingen) stöds" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "operander kan inte sändas tillsammans" @@ -3670,7 +3663,7 @@ msgstr "operander kan inte sändas tillsammans" msgid "operation is implemented for 1D Boolean arrays only" msgstr "operationen är enbart implementerad för 1D Boolean-matriser" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "åtgärden är inte implementerad för ndarray:er" @@ -3816,7 +3809,7 @@ msgstr "köstorlek överskreds" msgid "raw f-strings are not implemented" msgstr "råa f-strängar inte implementerade" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "verkliga och imaginära delar måste ha samma längd" @@ -3851,7 +3844,7 @@ msgstr "rgb_pins[%d] duplicerar en annan pinntilldelning" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "rgb_pins[%d] är inte på samma port som en klocka" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "argumentet roll måste vara en ndarray" @@ -3900,7 +3893,7 @@ msgstr "tecken tillåts inte med heltalsformatspecificeraren 'c'" msgid "single '}' encountered in format string" msgstr "Enkelt '}' påträffades i formatsträngen" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "storlek är enbart definierad ndarrays" @@ -3908,10 +3901,6 @@ msgstr "storlek är enbart definierad ndarrays" msgid "sleep length must be non-negative" msgstr "värdet för sleep måste vara positivt" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "segmentsteg kan inte vara noll" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "segmentsteg kan inte vara noll" @@ -3924,19 +3913,19 @@ msgstr "värdet för small int överskreds" msgid "soft reboot\n" msgstr "mjuk omstart\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "argumentet sort måste vara en ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "sos array måste ha form (n_section, 6)" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "sos[:, 3] måste vara ettor" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "sosfilt kräver iterable argument" @@ -4050,7 +4039,7 @@ msgstr "tobyte kan enbart anropas för täta matriser" msgid "too many arguments provided with the given format" msgstr "för många argument för det givna formatet" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "för många dimensioner" @@ -4063,11 +4052,11 @@ msgstr "för många index" msgid "too many values to unpack (expected %d)" msgstr "för många värden att packa upp (förväntat %d)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "trapz är definierat för 1D-matriser" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz är definierad för 1D-matriser med samma längd" @@ -4209,6 +4198,10 @@ msgstr "värdet måste passa i %d byte(s)" msgid "value_count must be > 0" msgstr "value_count måste vara > 0" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "vektorer måste ha samma längd" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "wakeup-konflikt" @@ -4238,7 +4231,7 @@ msgstr "wifi är inte aktiverat" msgid "window must be <= interval" msgstr "window måste vara <= interval" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "fel axelindex" @@ -4246,7 +4239,7 @@ msgstr "fel axelindex" msgid "wrong axis specified" msgstr "fel axel angiven" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "fel indatatyp" @@ -4262,7 +4255,7 @@ msgstr "fel antal värden för att packa upp" msgid "wrong operand type" msgstr "fel operandtyp" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "fel utdatatyp" @@ -4286,18 +4279,30 @@ msgstr "y-värde utanför intervall" msgid "zero step" msgstr "noll steg" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi måste vara en ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "zi måste vara av typ float" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "dimensions do not match" +#~ msgstr "dimensioner matchar inte" + +#~ msgid "first argument must be an iterable" +#~ msgstr "första argumentet måste vara en iterable" + +#~ msgid "iterables are not of the same length" +#~ msgstr "iterables är inte av samma längd" + +#~ msgid "slice step can't be zero" +#~ msgstr "segmentsteg kan inte vara noll" + #~ msgid "Selected CTS pin not valid" #~ msgstr "Vald CTS-pinne är inte giltig" @@ -4332,12 +4337,6 @@ msgstr "zi måste vara i formen (n_section, 2)" #~ "Timern är reserverad för internt bruk - deklarera PWM-pinne tidigare i " #~ "programmet" -#~ msgid "matrix dimensions do not match" -#~ msgstr "matrisdimensioner matchar inte" - -#~ msgid "vectors must have same lengths" -#~ msgstr "vektorer måste ha samma längd" - #~ msgid "Group full" #~ msgstr "Gruppen är full" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 5f258faf51..acdc1bab7c 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -945,11 +945,11 @@ msgstr "Qīwàng de chángdù wèi %d de yuán zǔ, dédào %d" msgid "Extended advertisements with scan response not supported." msgstr "Bù zhīchí dài yǒu sǎomiáo xiǎngyìng de kuòzhǎn guǎngbò." -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" msgstr "FFT jǐn wéi ndarrays dìng yì" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" msgstr "FFT jǐn shì yòng yú xiàn xìng zhèn liè" @@ -2439,11 +2439,11 @@ msgstr "dìzhǐ wèi kōng" msgid "arg is an empty sequence" msgstr "cānshù shì yīgè kōng de xùliè" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" msgstr "argsort cānshù bìxū shì ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" msgstr "wèi wéi pīn hé shù zǔ shí xiàn argsort" @@ -2451,7 +2451,7 @@ msgstr "wèi wéi pīn hé shù zǔ shí xiàn argsort" msgid "argument has wrong type" msgstr "cānshù lèixíng cuòwù" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "argument must be ndarray" msgstr "Cānshù bìxū shì ndarray" @@ -2464,7 +2464,8 @@ msgstr "cānshù biānhào/lèixíng bù pǐpèi" msgid "argument should be a '%q' not a '%q'" msgstr "cānshù yīnggāi shì '%q', 'bùshì '%q'" -#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "arguments must be ndarrays" msgstr "cānshù bìxū shì ndarrays" @@ -2477,11 +2478,11 @@ msgstr "shù zǔ hé suǒ yǐn cháng dù bì xū xiāng děng" msgid "array/bytes required on right side" msgstr "yòu cè xūyào shùzǔ/zì jié" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" msgstr "cháng shì huò qǔ (arg) zuì xiǎo zhí /(arg) zuì dà kōng xù liè" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" msgstr "chángshì huòqǔ kōng xùliè de argmin/ argmax" @@ -2489,15 +2490,15 @@ msgstr "chángshì huòqǔ kōng xùliè de argmin/ argmax" msgid "attributes not supported yet" msgstr "shǔxìng shàngwèi zhīchí" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis is out of bounds" msgstr "zhóu chāo chū biān jiè" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis must be None, or an integer" msgstr "zhóu bì xū wéi \" wú \" huò zhěng shù" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "axis too long" msgstr "zhóu tài cháng" @@ -2802,19 +2803,19 @@ msgstr "chángshù bìxū shì yīgè zhěngshù" msgid "conversion to object" msgstr "zhuǎnhuàn wèi duìxiàng" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" msgstr "juàn jī cānshù bìxū shì xiànxìng shùzǔ" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" msgstr "juàn jī cānshù bìxū shì ndarrays" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" msgstr "juàn jī cān shǔ bùnéng wéi kōng" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "could not invert Vandermonde matrix" msgstr "wúfǎ fǎn zhuǎn fàndéméng dé jǔzhèn" @@ -2822,15 +2823,15 @@ msgstr "wúfǎ fǎn zhuǎn fàndéméng dé jǔzhèn" msgid "couldn't determine SD card version" msgstr "wúfǎ quèdìng SD kǎ bǎnběn" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "duì yú cháng dù wéi 3 de 1D shù zǔ dìng yì cross" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" msgstr "shùjù bìxū shì kě diédài de" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" msgstr "shùjù chángdù bìxū xiāngděng" @@ -2869,18 +2870,14 @@ msgstr "mùbiāo chángdù bìxū shì > = 0 de zhěngshù" msgid "dict update sequence has wrong length" msgstr "yǔfǎ gēngxīn xùliè de chángdù cuòwù" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" msgstr "bùtóng de cānshù bìxū shì ndarray" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" msgstr "chā yì shùn xù fàn wéi" -#: extmod/ulab/code/linalg/linalg.c -msgid "dimensions do not match" -msgstr "chǐ cùn bù pǐ pèi" - #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -2996,11 +2993,11 @@ msgstr "wénjiàn bìxū shì zài zì jié móshì xià dǎkāi de wénjiàn" msgid "filesystem must provide mount method" msgstr "wénjiàn xìtǒng bìxū tígōng guà zài fāngfǎ" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be a callable" msgstr "dì yī gè cānshù bìxū shì kě tiáo yòng de" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "dì yīgè cānshù bìxū shì yī gè hánshù" @@ -3008,11 +3005,7 @@ msgstr "dì yīgè cānshù bìxū shì yī gè hánshù" msgid "first argument must be a tuple of ndarrays" msgstr "dì yī gè cān shù bì xū shì yí gè yuán zǔ ndarrays" -#: extmod/ulab/code/ndarray.c -msgid "first argument must be an iterable" -msgstr "dì yī gè cānshù bìxū shì kě diédài de" - -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" msgstr "dì yī gè cānshù bìxū shì ndarray" @@ -3024,7 +3017,7 @@ msgstr "chāojí () de dì yī gè cānshù bìxū shì lèixíng" msgid "flattening order must be either 'C', or 'F'" msgstr "īnhé shùnxù bìxū wèi 'C' huò 'F'" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" msgstr "fānzhuǎn shēn shù bìxū shì ndarray" @@ -3057,7 +3050,7 @@ msgstr "hánshù yùjì zuìduō %d cānshù, huòdé %d" msgid "function got multiple values for argument '%q'" msgstr "hánshù huòdé cānshù '%q' de duōchóng zhí" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "hánshù zài jiàngé mòwěi jùyǒu xiāngtóng de fúhào" @@ -3132,7 +3125,7 @@ msgstr "bù zhèngquè de tiánchōng" msgid "index is out of bounds" msgstr "suǒyǐn chāochū fànwéi" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3146,7 +3139,7 @@ msgstr "suǒyǐn bìxū shì zhěngshù" msgid "indices must be integers, slices, or Boolean lists" msgstr "suǒyǐn bìxū shì zhěngshù, qiēpiàn huò bù'ěr zhí lièbiǎo" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" msgstr "chūshǐ zhí bìxū shì kě diédài de" @@ -3166,7 +3159,7 @@ msgstr "shū rù hé shū chū xíng zhuàng bù jiān róng" msgid "input argument must be an integer, a tuple, or a list" msgstr "shū rù cān shù bì xū shì zhěng shù, yuán zǔ huò liè biǎo" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" msgstr "shūrù shùzǔ de chángdù bìxū shì 2 de mì" @@ -3174,15 +3167,15 @@ msgstr "shūrù shùzǔ de chángdù bìxū shì 2 de mì" msgid "input arrays are not compatible" msgstr "shū rù shù zǔ bù jiān róng" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" msgstr "shūrù shùjù bìxū shì kě diédài de" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "shūrù jǔzhèn bù duìchèn" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is singular" msgstr "shūrù jǔzhèn shì qíyì de" @@ -3198,23 +3191,23 @@ msgstr "shū rù bì xū shì děng jí 2 de zhāng liàng" msgid "input must be an ndarray" msgstr "shū rù bì xū shì ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "shū rù bì xū shì yì wéi de" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "input must be square matrix" msgstr "shūrù bìxū wèi fāng jǔzhèn" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" msgstr "shūrù bìxū shì yuán zǔ, lièbiǎo, fànwéi huò ndarray" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "input vectors must be of equal length" msgstr "shūrù xiàngliàng de chángdù bìxū xiāngděng" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "inputs are not iterable" msgstr "shū rù bù kě yí dòng" @@ -3226,7 +3219,7 @@ msgstr "zhěngshù() cānshù 2 bìxū > = 2 qiě <= 36" msgid "integer required" msgstr "xūyào zhěngshù" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" msgstr "interp shì wèi děng zhǎng de 1D shùzǔ dìngyì de" @@ -3315,11 +3308,7 @@ msgstr "issubclass() cānshù 1 bìxū shì yīgè lèi" msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() cānshù 2 bìxū shì lèi de lèi huò yuán zǔ" -#: extmod/ulab/code/ndarray.c -msgid "iterables are not of the same length" -msgstr "kě diédài xiàng de chángdù bùtóng" - -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" msgstr "diédài méiyǒu shōuliǎn" @@ -3388,7 +3377,11 @@ msgstr "dìtú huǎnchōng qū tài xiǎo" msgid "math domain error" msgstr "shùxué yù cuòwù" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "jǔzhèn chǐcùn bù pǐpèi" + +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "jǔzhèn bùshì zhèngdìng de" @@ -3410,15 +3403,15 @@ msgstr "zuì dà chǐ cùn shù wéi 4" msgid "maximum recursion depth exceeded" msgstr "chāochū zuìdà dìguī shēndù" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" msgstr "maxiter bì xū > 0" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" msgstr "maxiter yìng wéi > 0" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "median argument must be an ndarray" msgstr "zhōng wèi shù cān shù bì xū shì ndarray" @@ -3439,7 +3432,7 @@ msgstr "nèi cún shì tú: cháng dù bú shì xiàng mù huà de bèi shù" msgid "module not found" msgstr "zhǎo bù dào mókuài" -#: extmod/ulab/code/poly/poly.c +#: extmod/ulab/code/numpy/poly/poly.c msgid "more degrees of freedom than data points" msgstr "bǐ shùjù diǎn gèng duō de zìyóu dù" @@ -3557,7 +3550,7 @@ msgstr "fēi líng chāo shí bì xū > 0.01" msgid "non-zero timeout must be >= interval" msgstr "fēi líng chāo shí bì xū wéi >= jiàn gé" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "wéi 1D hé 2D shù zǔ dìng yì guī fàn" @@ -3658,8 +3651,8 @@ msgstr "Jǐn zhīchí cǎiyàng lǜ = 16000" msgid "only slices with step=1 (aka None) are supported" msgstr "jǐn zhīchí bù zhǎng = 1(jí wú) de qiēpiàn" -#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare/compare.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "operands could not be broadcast together" msgstr "cāozuò shǔ bùnéng yīqǐ guǎngbò" @@ -3667,7 +3660,7 @@ msgstr "cāozuò shǔ bùnéng yīqǐ guǎngbò" msgid "operation is implemented for 1D Boolean arrays only" msgstr "jǐn duì 1D bù ěr shù zǔ shí xiàn cāo zuò" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" msgstr "cāozuò wèi zài ndarrays shàng shíxiàn" @@ -3812,7 +3805,7 @@ msgstr "duìliè yìchū" msgid "raw f-strings are not implemented" msgstr "wèi zhíxíng yuánshǐ f-strings" -#: extmod/ulab/code/fft/fft.c +#: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" msgstr "shí bù hé xū bù bìxū děng zhǎng" @@ -3847,7 +3840,7 @@ msgstr "rgb_pins[%d] fùzhì lìng yīgè yǐn jiǎo fēnpèi" msgid "rgb_pins[%d] is not on the same port as clock" msgstr "rgb_pins[%d] yǔ shízhōng bùzài tóng yīgè duānkǒu shàng" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "roll argument must be an ndarray" msgstr "gǔn dòng cān shù bì xū shì ndarray" @@ -3896,7 +3889,7 @@ msgstr "zhěngshù géshì shuōmíng fú 'c' bù yǔnxǔ shǐyòng fúhào" msgid "single '}' encountered in format string" msgstr "zài géshì zìfú chuàn zhōng yù dào de dāngè '}'" -#: extmod/ulab/code/linalg/linalg.c +#: extmod/ulab/code/numpy/linalg/linalg.c msgid "size is defined for ndarrays only" msgstr "dàxiǎo jǐn wèi ndarrays dìngyì" @@ -3904,10 +3897,6 @@ msgstr "dàxiǎo jǐn wèi ndarrays dìngyì" msgid "sleep length must be non-negative" msgstr "shuìmián chángdù bìxū shìfēi fùshù" -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "qiēpiàn bù cháng bùnéng wéi líng" - #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "qiēpiàn bù bùnéng wéi líng" @@ -3920,19 +3909,19 @@ msgstr "xiǎo zhěngshù yìchū" msgid "soft reboot\n" msgstr "ruǎn chóngqǐ\n" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" msgstr "páixù cānshù bìxū shì ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" msgstr "sos shùzǔ de xíngzhuàng bìxū wèi (n_section, 6)" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" msgstr "sos [:, 3] yīnggāi quán shì" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" msgstr "sosfilt xūyào diédài cānshù" @@ -4046,7 +4035,7 @@ msgstr "tobytes zhǐ néng duì mì jí shù zǔ diào yòng" msgid "too many arguments provided with the given format" msgstr "tígōng jǐ dìng géshì de cānshù tài duō" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c msgid "too many dimensions" msgstr "chǐ cùn tài duō" @@ -4059,11 +4048,11 @@ msgstr "suǒyǐn tài duō" msgid "too many values to unpack (expected %d)" msgstr "dǎkāi tài duō zhí (yùqí %d)" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" msgstr "wéi 1D shù zǔ dìng yì xiàn jǐng" -#: extmod/ulab/code/approx/approx.c +#: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "Trapz shì wèi děng zhǎng de 1D shùzǔ dìngyì de" @@ -4205,6 +4194,10 @@ msgstr "Zhí bìxū fúhé %d zì jié" msgid "value_count must be > 0" msgstr "zhí jìshù bìxū wèi > 0" +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "xiàngliàng bìxū jùyǒu xiāngtóng de chángdù" + #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "huàn xǐng chōng tū" @@ -4234,7 +4227,7 @@ msgstr "wèi qǐ yòng WIFI" msgid "window must be <= interval" msgstr "Chuāngkǒu bìxū shì <= jiàngé" -#: extmod/ulab/code/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" msgstr "cuò wù de zhóu suǒ yǐn" @@ -4242,7 +4235,7 @@ msgstr "cuò wù de zhóu suǒ yǐn" msgid "wrong axis specified" msgstr "zhǐ dìng de zhóu cuò wù" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "shūrù lèixíng cuòwù" @@ -4258,7 +4251,7 @@ msgstr "wúfǎ jiě bāo de zhí shù" msgid "wrong operand type" msgstr "cuòwù de cāozuò shù lèixíng" -#: extmod/ulab/code/vector/vectorise.c +#: extmod/ulab/code/numpy/vector/vector.c msgid "wrong output type" msgstr "cuòwù de shūchū lèixíng" @@ -4282,18 +4275,30 @@ msgstr "y zhí chāochū biānjiè" msgid "zero step" msgstr "líng bù" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi bìxū shì ndarray" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" msgstr "zi bìxū wèi fú diǎn xíng" -#: extmod/ulab/code/filter/filter.c +#: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "dimensions do not match" +#~ msgstr "chǐ cùn bù pǐ pèi" + +#~ msgid "first argument must be an iterable" +#~ msgstr "dì yī gè cānshù bìxū shì kě diédài de" + +#~ msgid "iterables are not of the same length" +#~ msgstr "kě diédài xiàng de chángdù bùtóng" + +#~ msgid "slice step can't be zero" +#~ msgstr "qiēpiàn bù cháng bùnéng wéi líng" + #~ msgid "Selected CTS pin not valid" #~ msgstr "Suǒ xuǎn de CTS yǐn jiǎo wúxiào" @@ -4328,12 +4333,6 @@ msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" #~ "Dìngshí qì bǎoliú gōng nèibù shǐyòng-zài chéngxù de qiánmiàn shēngmíng " #~ "PWM yǐn jiǎo" -#~ msgid "matrix dimensions do not match" -#~ msgstr "jǔzhèn chǐcùn bù pǐpèi" - -#~ msgid "vectors must have same lengths" -#~ msgstr "xiàngliàng bìxū jùyǒu xiāngtóng de chángdù" - #~ msgid "Group full" #~ msgstr "Fēnzǔ yǐ mǎn" From c1987b7311e98b6857b7c85e724ba124fd694c8a Mon Sep 17 00:00:00 2001 From: sabas1080 Date: Fri, 2 Apr 2021 13:19:59 -0600 Subject: [PATCH 191/261] init port hunter cat nfc! --- ports/atmel-samd/boards/huntercat_nfc/board.c | 37 +++++++++++++ .../boards/huntercat_nfc/mpconfigboard.h | 54 +++++++++++++++++++ .../boards/huntercat_nfc/mpconfigboard.mk | 14 +++++ ports/atmel-samd/boards/huntercat_nfc/pins.c | 30 +++++++++++ 4 files changed, 135 insertions(+) create mode 100644 ports/atmel-samd/boards/huntercat_nfc/board.c create mode 100644 ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/huntercat_nfc/pins.c diff --git a/ports/atmel-samd/boards/huntercat_nfc/board.c b/ports/atmel-samd/boards/huntercat_nfc/board.c new file mode 100644 index 0000000000..84960e73cf --- /dev/null +++ b/ports/atmel-samd/boards/huntercat_nfc/board.c @@ -0,0 +1,37 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.h b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.h new file mode 100644 index 0000000000..44b80571eb --- /dev/null +++ b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.h @@ -0,0 +1,54 @@ +#define MICROPY_HW_BOARD_NAME "Electronic Cats Hunter Cat NFC" +#define MICROPY_HW_MCU_NAME "samd21e18" + +#define MICROPY_HW_LED_STATUS (&pin_PA00) + +#define SPI_FLASH_MOSI_PIN &pin_PA18 +#define SPI_FLASH_MISO_PIN &pin_PA22 +#define SPI_FLASH_SCK_PIN &pin_PA19 +#define SPI_FLASH_CS_PIN &pin_PA17 + +#define MICROPY_PORT_A (0) +#define MICROPY_PORT_B (0) +#define MICROPY_PORT_C (0) + +#define CALIBRATE_CRYSTALLESS 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_PA08) +#define DEFAULT_I2C_BUS_SDA (&pin_PA09) + +#define IGNORE_PIN_PA04 1 +#define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PA06 1 +#define IGNORE_PIN_PA07 1 +#define IGNORE_PIN_PA20 1 +#define IGNORE_PIN_PA21 1 +#define IGNORE_PIN_PA23 1 +#define IGNORE_PIN_PA28 1 +// USB is always used. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 +#define IGNORE_PIN_PB01 1 +#define IGNORE_PIN_PB02 1 +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PB04 1 +#define IGNORE_PIN_PB05 1 +#define IGNORE_PIN_PB06 1 +#define IGNORE_PIN_PB07 1 +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB09 1 +#define IGNORE_PIN_PB10 1 +#define IGNORE_PIN_PB11 1 +#define IGNORE_PIN_PB12 1 +#define IGNORE_PIN_PB13 1 +#define IGNORE_PIN_PB14 1 +#define IGNORE_PIN_PB15 1 +#define IGNORE_PIN_PB16 1 +#define IGNORE_PIN_PB17 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PB30 1 +#define IGNORE_PIN_PB31 1 +#define IGNORE_PIN_PB00 1 diff --git a/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk new file mode 100644 index 0000000000..28f52ca942 --- /dev/null +++ b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk @@ -0,0 +1,14 @@ +USB_VID = 0x1209 +USB_PID = 0x7150 +USB_PRODUCT = "Hunter Cat NFC" +USB_MANUFACTURER = "Electronic Cats" + +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + +SPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "W25Q16JV" +LONGINT_IMPL = MPZ + +SUPEROPT_GC = 0 +SUPEROPT_VM = 0 diff --git a/ports/atmel-samd/boards/huntercat_nfc/pins.c b/ports/atmel-samd/boards/huntercat_nfc/pins.c new file mode 100644 index 0000000000..12b0d93480 --- /dev/null +++ b/ports/atmel-samd/boards/huntercat_nfc/pins.c @@ -0,0 +1,30 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA00) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA00) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA01) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA03) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA14) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA15) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_PA27) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 7c164f0786c65de5d7cefbbf03248612acb774cc Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Fri, 2 Apr 2021 21:34:16 +0200 Subject: [PATCH 192/261] Ran make translate --- locale/circuitpython.pot | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 146c65f3e1..db64a74007 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1199,7 +1199,9 @@ msgid "Invalid DAC pin supplied" msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" @@ -1579,11 +1581,11 @@ msgid "No timer available" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." +msgid "Nordic system firmware failure assertion." msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2233,7 +2235,7 @@ msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" +msgid "Unknown system firmware error: %04x" msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c From f8da94b8baae5cfd9ece238e4345d99005ee0ca4 Mon Sep 17 00:00:00 2001 From: sabas1080 Date: Fri, 2 Apr 2021 14:40:27 -0600 Subject: [PATCH 193/261] =?UTF-8?q?removed=20o=C2=A1modules=20not=20availa?= =?UTF-8?q?bles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../atmel-samd/boards/huntercat_nfc/mpconfigboard.h | 1 - .../boards/huntercat_nfc/mpconfigboard.mk | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.h b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.h index 44b80571eb..3be98beb38 100644 --- a/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.h +++ b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.h @@ -20,7 +20,6 @@ #define IGNORE_PIN_PA04 1 #define IGNORE_PIN_PA05 1 #define IGNORE_PIN_PA06 1 -#define IGNORE_PIN_PA07 1 #define IGNORE_PIN_PA20 1 #define IGNORE_PIN_PA21 1 #define IGNORE_PIN_PA23 1 diff --git a/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk index 28f52ca942..31c3029747 100644 --- a/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk +++ b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk @@ -10,5 +10,18 @@ SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = "W25Q16JV" LONGINT_IMPL = MPZ +# A number of modules are removed for HunterCatNFC to make room for frozen libraries. +# Many I/O functions are not available. +# math is very large and is also removed. +CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_BITMAPTOOLS = 0 +CIRCUITPY_NEOPIXEL_WRITE = 0 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_USB_MIDI = 1 +CIRCUITPY_TOUCHIO = 0 +CIRCUITPY_FULL_BUILD = 0 + SUPEROPT_GC = 0 SUPEROPT_VM = 0 From 53f3282e9c782a14a35d7d96fe236cc78de07736 Mon Sep 17 00:00:00 2001 From: sabas1080 Date: Fri, 2 Apr 2021 14:42:38 -0600 Subject: [PATCH 194/261] change flash device --- ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk index 31c3029747..f3f14df9e5 100644 --- a/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk +++ b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk @@ -6,8 +6,9 @@ USB_MANUFACTURER = "Electronic Cats" CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 +INTERNAL_FLASH_FILESYSTEM = 0 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "W25Q16JV" +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" LONGINT_IMPL = MPZ # A number of modules are removed for HunterCatNFC to make room for frozen libraries. From d4a45d401dba2f4cf4736aa6eb025d742fd72e66 Mon Sep 17 00:00:00 2001 From: sabas1080 Date: Fri, 2 Apr 2021 18:38:37 -0600 Subject: [PATCH 195/261] add hunter cat nfc buld.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8859ec33e..68cfe35da7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -239,6 +239,7 @@ jobs: - "hallowing_m0_express" - "hallowing_m4_express" - "hiibot_bluefi" + - "huntercat_nfc" - "ikigaisense_vita" - "imxrt1010_evk" - "imxrt1020_evk" From bb1926488000043589940841a283456e37d4a416 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Sat, 3 Apr 2021 03:09:50 +0200 Subject: [PATCH 196/261] 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 | 20 ++++++++++++++------ locale/cs.po | 10 ++++++---- locale/de_DE.po | 20 ++++++++++++++------ locale/el.po | 10 ++++++---- locale/en_GB.po | 20 ++++++++++++++------ locale/es.po | 25 ++++++++++++++++++------- locale/fil.po | 10 ++++++---- locale/fr.po | 25 ++++++++++++++++++------- locale/hi.po | 10 ++++++---- locale/it_IT.po | 10 ++++++---- locale/ja.po | 15 ++++++++++----- locale/ko.po | 10 ++++++---- locale/nl.po | 20 ++++++++++++++------ locale/pl.po | 10 ++++++---- locale/pt_BR.po | 25 ++++++++++++++++++------- locale/sv.po | 25 ++++++++++++++++++------- locale/zh_Latn_pinyin.po | 20 ++++++++++++++------ 17 files changed, 194 insertions(+), 91 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 454e2f427b..f39b28ef7a 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -1220,7 +1220,9 @@ msgid "Invalid DAC pin supplied" msgstr "Pin DAC yang diberikan tidak valid" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frekuensi PWM tidak valid" @@ -1600,11 +1602,11 @@ msgid "No timer available" msgstr "Penghitung waktu tidak tersedia" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." -msgstr "Pernyataan kegagalan Perangkat Lunak Nordic." +msgid "Nordic system firmware failure assertion." +msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2274,8 +2276,8 @@ msgstr "Kesalahan keamanan tidak dikenal: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" -msgstr "Kesalahan perangkat lunak tidak dikenal: %04x" +msgid "Unknown system firmware error: %04x" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -4279,6 +4281,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Nordic Soft Device failure assertion." +#~ msgstr "Pernyataan kegagalan Perangkat Lunak Nordic." + +#~ msgid "Unknown soft device error: %04x" +#~ msgstr "Kesalahan perangkat lunak tidak dikenal: %04x" + #~ msgid "Selected CTS pin not valid" #~ msgstr "Pin CTS yang dipilih tidak valid" diff --git a/locale/cs.po b/locale/cs.po index 2e8a0f0a24..5897868c3f 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -1202,7 +1202,9 @@ msgid "Invalid DAC pin supplied" msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" @@ -1582,11 +1584,11 @@ msgid "No timer available" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." +msgid "Nordic system firmware failure assertion." msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2236,7 +2238,7 @@ msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" +msgid "Unknown system firmware error: %04x" msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c diff --git a/locale/de_DE.po b/locale/de_DE.po index 0c91cbbc61..e791e1540c 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -1224,7 +1224,9 @@ msgid "Invalid DAC pin supplied" msgstr "Ungültiger DAC-Pin angegeben" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Ungültige PWM Frequenz" @@ -1606,11 +1608,11 @@ msgid "No timer available" msgstr "Kein Timer verfügbar" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." -msgstr "Fehlerbehauptung für Nordic Soft Device." +msgid "Nordic system firmware failure assertion." +msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2285,8 +2287,8 @@ msgstr "Unbekannter Sicherheitsfehler: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" -msgstr "Unbekannter Soft Device-Fehler: %04x" +msgid "Unknown system firmware error: %04x" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -4324,6 +4326,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Nordic Soft Device failure assertion." +#~ msgstr "Fehlerbehauptung für Nordic Soft Device." + +#~ msgid "Unknown soft device error: %04x" +#~ msgstr "Unbekannter Soft Device-Fehler: %04x" + #~ msgid "first argument must be an iterable" #~ msgstr "Das erste Argument muss iterierbar sein" diff --git a/locale/el.po b/locale/el.po index bcc6c0916b..6c557f6d02 100644 --- a/locale/el.po +++ b/locale/el.po @@ -1199,7 +1199,9 @@ msgid "Invalid DAC pin supplied" msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" @@ -1579,11 +1581,11 @@ msgid "No timer available" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." +msgid "Nordic system firmware failure assertion." msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2233,7 +2235,7 @@ msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" +msgid "Unknown system firmware error: %04x" msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c diff --git a/locale/en_GB.po b/locale/en_GB.po index 1e1051e501..18867c405a 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -1217,7 +1217,9 @@ msgid "Invalid DAC pin supplied" msgstr "Invalid DAC pin supplied" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Invalid PWM frequency" @@ -1599,11 +1601,11 @@ msgid "No timer available" msgstr "No timer available" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." -msgstr "Nordic Soft Device failure assertion." +msgid "Nordic system firmware failure assertion." +msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2273,8 +2275,8 @@ msgstr "Unknown security error: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" -msgstr "Unknown soft device error: %04x" +msgid "Unknown system firmware error: %04x" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -4279,6 +4281,12 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "Nordic Soft Device failure assertion." +#~ msgstr "Nordic Soft Device failure assertion." + +#~ msgid "Unknown soft device error: %04x" +#~ msgstr "Unknown soft device error: %04x" + #~ msgid "dimensions do not match" #~ msgstr "dimensions do not match" diff --git a/locale/es.po b/locale/es.po index 19f0298a03..1356d3eba0 100644 --- a/locale/es.po +++ b/locale/es.po @@ -1235,7 +1235,9 @@ msgid "Invalid DAC pin supplied" msgstr "Pin suministrado inválido para DAC" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frecuencia PWM inválida" @@ -1619,12 +1621,12 @@ msgid "No timer available" msgstr "No hay temporizador disponible" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." -msgstr "Fallo de aserción de dispositivo Nordic Soft." +msgid "Nordic system firmware failure assertion." +msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" -msgstr "El firmaware del sistema no tiene memoria" +msgid "Nordic system firmware out of memory" +msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -2302,8 +2304,8 @@ msgstr "Error de seguridad desconocido: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" -msgstr "Error leve desconocido en dispositivo: %04x" +msgid "Unknown system firmware error: %04x" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -4323,6 +4325,15 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "Nordic Soft Device failure assertion." +#~ msgstr "Fallo de aserción de dispositivo Nordic Soft." + +#~ msgid "Nordic soft device out of memory" +#~ msgstr "El firmaware del sistema no tiene memoria" + +#~ msgid "Unknown soft device error: %04x" +#~ msgstr "Error leve desconocido en dispositivo: %04x" + #~ msgid "dimensions do not match" #~ msgstr "las dimensiones no concuerdan" diff --git a/locale/fil.po b/locale/fil.po index 3eb50f9b1d..76f2a7a8bf 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -1214,7 +1214,9 @@ msgid "Invalid DAC pin supplied" msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Mali ang PWM frequency" @@ -1594,11 +1596,11 @@ msgid "No timer available" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." +msgid "Nordic system firmware failure assertion." msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2254,7 +2256,7 @@ msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" +msgid "Unknown system firmware error: %04x" msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c diff --git a/locale/fr.po b/locale/fr.po index 3d7b5c5578..28771f95e9 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -1245,7 +1245,9 @@ msgid "Invalid DAC pin supplied" msgstr "Broche DAC non valide fournie" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Fréquence de PWM invalide" @@ -1627,12 +1629,12 @@ msgid "No timer available" msgstr "Aucun minuteur disponible" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." -msgstr "Affirmation de défaillance du Nordic Soft Device." +msgid "Nordic system firmware failure assertion." +msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" -msgstr "Appareil logiciel Nordic hors de mémoire" +msgid "Nordic system firmware out of memory" +msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -2314,8 +2316,8 @@ msgstr "Erreur de sécurité inconnue : 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" -msgstr "Erreur de périphérique logiciel inconnue : %04x" +msgid "Unknown system firmware error: %04x" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -4348,6 +4350,15 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "Nordic Soft Device failure assertion." +#~ msgstr "Affirmation de défaillance du Nordic Soft Device." + +#~ msgid "Nordic soft device out of memory" +#~ msgstr "Appareil logiciel Nordic hors de mémoire" + +#~ msgid "Unknown soft device error: %04x" +#~ msgstr "Erreur de périphérique logiciel inconnue : %04x" + #~ msgid "dimensions do not match" #~ msgstr "les dimensions ne correspondent pas" diff --git a/locale/hi.po b/locale/hi.po index 786b254002..ba15970b91 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -1199,7 +1199,9 @@ msgid "Invalid DAC pin supplied" msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" @@ -1579,11 +1581,11 @@ msgid "No timer available" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." +msgid "Nordic system firmware failure assertion." msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2233,7 +2235,7 @@ msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" +msgid "Unknown system firmware error: %04x" msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c diff --git a/locale/it_IT.po b/locale/it_IT.po index 774856872d..9657c294e4 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -1223,7 +1223,9 @@ msgid "Invalid DAC pin supplied" msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frequenza PWM non valida" @@ -1607,11 +1609,11 @@ msgid "No timer available" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." +msgid "Nordic system firmware failure assertion." msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2275,7 +2277,7 @@ msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" +msgid "Unknown system firmware error: %04x" msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c diff --git a/locale/ja.po b/locale/ja.po index 3d10268c81..19c879e522 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -1212,7 +1212,9 @@ msgid "Invalid DAC pin supplied" msgstr "不正なDACピンが与えられました" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "無効なPWM周波数" @@ -1592,11 +1594,11 @@ msgid "No timer available" msgstr "利用できるタイマーなし" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." +msgid "Nordic system firmware failure assertion." msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2256,8 +2258,8 @@ msgstr "不明なセキュリティエラー: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" -msgstr "不明なソフトデバイスエラー: %04x" +msgid "Unknown system firmware error: %04x" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -4257,6 +4259,9 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unknown soft device error: %04x" +#~ msgstr "不明なソフトデバイスエラー: %04x" + #~ msgid "first argument must be an iterable" #~ msgstr "1つ目の引数はイテレート可能でなければなりません" diff --git a/locale/ko.po b/locale/ko.po index 86c586670d..b84fa14ee4 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -1202,7 +1202,9 @@ msgid "Invalid DAC pin supplied" msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" @@ -1582,11 +1584,11 @@ msgid "No timer available" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." +msgid "Nordic system firmware failure assertion." msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2237,7 +2239,7 @@ msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" +msgid "Unknown system firmware error: %04x" msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c diff --git a/locale/nl.po b/locale/nl.po index 2305e47f3b..a8fde108ac 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -1213,7 +1213,9 @@ msgid "Invalid DAC pin supplied" msgstr "Ongeldige DAC pin opgegeven" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Ongeldige PWM frequentie" @@ -1593,11 +1595,11 @@ msgid "No timer available" msgstr "Geen timer beschikbaar" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." -msgstr "Nordic Soft Device assertion mislukt." +msgid "Nordic system firmware failure assertion." +msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2273,8 +2275,8 @@ msgstr "Onbekende veiligheidsfout: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" -msgstr "Onbekende soft device fout: %04x" +msgid "Unknown system firmware error: %04x" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -4288,6 +4290,12 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "Nordic Soft Device failure assertion." +#~ msgstr "Nordic Soft Device assertion mislukt." + +#~ msgid "Unknown soft device error: %04x" +#~ msgstr "Onbekende soft device fout: %04x" + #~ msgid "first argument must be an iterable" #~ msgstr "eerst argument moet een iterabel zijn" diff --git a/locale/pl.po b/locale/pl.po index ed3c1c8cdc..657a8c5a39 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -1212,7 +1212,9 @@ msgid "Invalid DAC pin supplied" msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Zła częstotliwość PWM" @@ -1593,11 +1595,11 @@ msgid "No timer available" msgstr "Brak dostępnego timera" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." +msgid "Nordic system firmware failure assertion." msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2247,7 +2249,7 @@ msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" +msgid "Unknown system firmware error: %04x" msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c diff --git a/locale/pt_BR.po b/locale/pt_BR.po index b60ed95e58..7f36df165e 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -1237,7 +1237,9 @@ msgid "Invalid DAC pin supplied" msgstr "O pino DAC informado é inválido" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frequência PWM inválida" @@ -1619,12 +1621,12 @@ msgid "No timer available" msgstr "Não há um temporizador disponível" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." -msgstr "Declaração de falha do dispositivo Nordic Soft." +msgid "Nordic system firmware failure assertion." +msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" -msgstr "O soft do dispositivo nórdico está sem memória" +msgid "Nordic system firmware out of memory" +msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -2307,8 +2309,8 @@ msgstr "Erro de segurança desconhecido: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" -msgstr "Erro desconhecido do dispositivo de soft: %04x" +msgid "Unknown system firmware error: %04x" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -4334,6 +4336,15 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "Nordic Soft Device failure assertion." +#~ msgstr "Declaração de falha do dispositivo Nordic Soft." + +#~ msgid "Nordic soft device out of memory" +#~ msgstr "O soft do dispositivo nórdico está sem memória" + +#~ msgid "Unknown soft device error: %04x" +#~ msgstr "Erro desconhecido do dispositivo de soft: %04x" + #~ msgid "dimensions do not match" #~ msgstr "as dimensões não coincidem" diff --git a/locale/sv.po b/locale/sv.po index 3e704b1231..16d90033ac 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -1220,7 +1220,9 @@ msgid "Invalid DAC pin supplied" msgstr "Ogiltig DAC-pinne angiven" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Ogiltig PWM-frekvens" @@ -1601,12 +1603,12 @@ msgid "No timer available" msgstr "Ingen timer tillgänglig" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." -msgstr "Påståendet om Nordic Soft Device-fel." +msgid "Nordic system firmware failure assertion." +msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" -msgstr "Nordic soft-enheten har slut på minne" +msgid "Nordic system firmware out of memory" +msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -2279,8 +2281,8 @@ msgstr "Okänt säkerhetsfel: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" -msgstr "Okänt mjukvarufel: %04x" +msgid "Unknown system firmware error: %04x" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -4291,6 +4293,15 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "Nordic Soft Device failure assertion." +#~ msgstr "Påståendet om Nordic Soft Device-fel." + +#~ msgid "Nordic soft device out of memory" +#~ msgstr "Nordic soft-enheten har slut på minne" + +#~ msgid "Unknown soft device error: %04x" +#~ msgstr "Okänt mjukvarufel: %04x" + #~ msgid "dimensions do not match" #~ msgstr "dimensioner matchar inte" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index acdc1bab7c..2bb05d8e0f 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -1222,7 +1222,9 @@ msgid "Invalid DAC pin supplied" msgstr "Tí gōng liǎo wúxiào de DAC yǐn jiǎo" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Wúxiào de PWM pínlǜ" @@ -1603,11 +1605,11 @@ msgid "No timer available" msgstr "Méiyǒu jìshí qì" #: supervisor/shared/safe_mode.c -msgid "Nordic Soft Device failure assertion." -msgstr "Nordic ruǎn shèbèi gùzhàng shēngmíng." +msgid "Nordic system firmware failure assertion." +msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic soft device out of memory" +msgid "Nordic system firmware out of memory" msgstr "" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c @@ -2276,8 +2278,8 @@ msgstr "Wèizhī de ānquán cuòwù: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format -msgid "Unknown soft device error: %04x" -msgstr "Wèizhī de ruǎn shèbèi cuòwù: %04x" +msgid "Unknown system firmware error: %04x" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -4287,6 +4289,12 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "Nordic Soft Device failure assertion." +#~ msgstr "Nordic ruǎn shèbèi gùzhàng shēngmíng." + +#~ msgid "Unknown soft device error: %04x" +#~ msgstr "Wèizhī de ruǎn shèbèi cuòwù: %04x" + #~ msgid "dimensions do not match" #~ msgstr "chǐ cùn bù pǐ pèi" From 43ba81ffa125a69a380f1b243473ec38c652a5e8 Mon Sep 17 00:00:00 2001 From: Matthias Breithaupt Date: Tue, 30 Mar 2021 11:01:08 +0200 Subject: [PATCH 197/261] Add Artisense RD00 board files --- .github/workflows/build.yml | 1 + ports/esp32s2/boards/artisense_rd00/board.c | 59 +++++++++++++++++++ .../boards/artisense_rd00/mpconfigboard.h | 43 ++++++++++++++ .../boards/artisense_rd00/mpconfigboard.mk | 17 ++++++ ports/esp32s2/boards/artisense_rd00/pins.c | 48 +++++++++++++++ ports/esp32s2/boards/artisense_rd00/sdkconfig | 39 ++++++++++++ 6 files changed, 207 insertions(+) create mode 100644 ports/esp32s2/boards/artisense_rd00/board.c create mode 100644 ports/esp32s2/boards/artisense_rd00/mpconfigboard.h create mode 100644 ports/esp32s2/boards/artisense_rd00/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/artisense_rd00/pins.c create mode 100644 ports/esp32s2/boards/artisense_rd00/sdkconfig diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8859ec33e..4c91948145 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -450,6 +450,7 @@ jobs: - "adafruit_funhouse" - "adafruit_magtag_2.9_grayscale" - "adafruit_metro_esp32s2" + - "artisense_rd00" - "electroniccats_bastwifi" - "espressif_kaluga_1" - "espressif_saola_1_wroom" diff --git a/ports/esp32s2/boards/artisense_rd00/board.c b/ports/esp32s2/boards/artisense_rd00/board.c new file mode 100644 index 0000000000..fb3e458cf4 --- /dev/null +++ b/ports/esp32s2/boards/artisense_rd00/board.c @@ -0,0 +1,59 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Matthias Breithaupt for Artisense GmbH + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART +#ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); +#endif /* DEBUG */ + + // Crystal + common_hal_never_reset_pin(&pin_GPIO15); + common_hal_never_reset_pin(&pin_GPIO16); + + // PSRAM + common_hal_never_reset_pin(&pin_GPIO26); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/artisense_rd00/mpconfigboard.h b/ports/esp32s2/boards/artisense_rd00/mpconfigboard.h new file mode 100644 index 0000000000..e9ff39dbbd --- /dev/null +++ b/ports/esp32s2/boards/artisense_rd00/mpconfigboard.h @@ -0,0 +1,43 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Matthias Breithaupt for Artisense GmbH + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +//Micropython setup + +//Same setup as the Saola board but with no Neopixel on board + +#define MICROPY_HW_BOARD_NAME "Artisense Reference Design RD00" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO45) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_UART_BUS_RX (&pin_GPIO17) +#define DEFAULT_UART_BUS_TX (&pin_GPIO18) diff --git a/ports/esp32s2/boards/artisense_rd00/mpconfigboard.mk b/ports/esp32s2/boards/artisense_rd00/mpconfigboard.mk new file mode 100644 index 0000000000..8b6bfcb8d9 --- /dev/null +++ b/ports/esp32s2/boards/artisense_rd00/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x80AF +USB_PRODUCT = "Reference Design RD00" +USB_MANUFACTURER = "Artisense" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/boards/artisense_rd00/pins.c b/ports/esp32s2/boards/artisense_rd00/pins.c new file mode 100644 index 0000000000..3cd05f5b3c --- /dev/null +++ b/ports/esp32s2/boards/artisense_rd00/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_CAM), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_HVIO0), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_HVIO1), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_HVIO2), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_HVIO3), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_HVIO4), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_HVCAM), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_LVIO0), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_LVIO1), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_LVIO2), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_LVIO3), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_LVIO4), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_LVCAM), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_DIRIO0), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_DIRIO1), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_DIRIO2), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_DIRIO3), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_DIRIO4), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_DIRCAM), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_DBG_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_DBG_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_RS232_TX), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_RS232_RX), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_RS232_EN), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_DFU), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_SW1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/artisense_rd00/sdkconfig b/ports/esp32s2/boards/artisense_rd00/sdkconfig new file mode 100644 index 0000000000..b5bf2411f7 --- /dev/null +++ b/ports/esp32s2/boards/artisense_rd00/sdkconfig @@ -0,0 +1,39 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="RD00-ESP32S2" +# end of LWIP From 78089107bc23c0016aa8eea56a046ad2e5150599 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 3 Apr 2021 10:41:20 -0500 Subject: [PATCH 198/261] displayio.Bitmap: Allow modification though the buffer protocol It is required to call .dirty() with appropriate arguments after modifications through the buffer protocol, or the display might not be updated correctly. --- shared-bindings/bitmaptools/__init__.c | 3 +- shared-bindings/displayio/Bitmap.c | 56 +++++++++++++++++++++++++- shared-module/displayio/Bitmap.c | 2 +- 3 files changed, 56 insertions(+), 5 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index bfe4d346cf..3d352e45c2 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -397,8 +397,7 @@ STATIC mp_obj_t bitmaptools_arrayblit(size_t n_args, const mp_obj_t *pos_args, m { MP_QSTR_x2, MP_ARG_INT, {.u_int = -1} }, { MP_QSTR_y2, MP_ARG_INT, {.u_int = -1} }, { MP_QSTR_skip_index, MP_ARG_OBJ, {.u_obj = mp_const_none } }, - } - ; + }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c index 3b2a836eb9..900428b6e4 100644 --- a/shared-bindings/displayio/Bitmap.c +++ b/shared-bindings/displayio/Bitmap.c @@ -25,6 +25,7 @@ */ #include "shared-bindings/displayio/Bitmap.h" +#include "shared-module/displayio/Bitmap.h" #include @@ -43,8 +44,13 @@ //| per row is a multiple of 4, then the resulting memoryview will correspond directly with the bitmap's contents. Otherwise, //| the bitmap data is packed into the memoryview with unspecified padding. //| -//| A read-only buffer can be used e.g., with ``ulab.numpy.frombuffer`` to efficiently create an array with the same content as a Bitmap; -//| to move data efficiently from ulab back into a Bitmap, use `bitmaptools.arrayblit`. +//| A Bitmap can be treated as a buffer, allowing its content to be +//| viewed and modified using e.g., with ``ulab.numpy.frombuffer``, +//| but the `displayio.Bitmap.dirty` method must be used to inform +//| displayio when a bitmap was modified through the buffer interface. +//| +//| `bitmaptools.arrayblit` can also be useful to omve data efficiently +//| into a Bitmap. //| """ //| //| def __init__(self, width: int, height: int, value_count: int) -> None: @@ -299,11 +305,57 @@ STATIC mp_obj_t displayio_bitmap_obj_fill(mp_obj_t self_in, mp_obj_t value_obj) } MP_DEFINE_CONST_FUN_OBJ_2(displayio_bitmap_fill_obj, displayio_bitmap_obj_fill); +//| def dirty(self, x1: int=0, y1: int=0, x2: int=-1, y2:int = -1) -> None: +//| """Inform displayio of bitmap updates done via the buffer +//| protocol. +//| +//| :param int x1: Minimum x-value for rectangular bounding box to be considered as modified +//| :param int y1: Minimum y-value for rectangular bounding box to be considered as modified +//| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be considered as modified +//| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be considered as modified +//| +//| If x1 or y1 are not specified, they are taken as 0. If x2 or y2 +//| are not specified, or are given as -1, they are taken as the width +//| and height of the image. Thus, calling dirty() with the +//| default arguments treats the whole bitmap as modified. +//| +//| When a bitmap is modified through the buffer protocol, the +//| display will not be properly updated unless the bitmap is +//| notified of the "dirty rectangle" that encloses all modified +//| pixels.""" +//| ... +//| +STATIC mp_obj_t displayio_bitmap_obj_dirty(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + displayio_bitmap_t *self = MP_OBJ_TO_PTR(pos_args[0]); + enum { ARG_x1, ARG_y1, ARG_x2, ARG_y2 }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_x1, MP_ARG_INT, {.u_int = 0} }, + { MP_QSTR_y1, MP_ARG_INT, {.u_int = 0} }, + { MP_QSTR_x2, MP_ARG_INT, {.u_int = -1} }, + { MP_QSTR_y2, MP_ARG_INT, {.u_int = -1} }, + }; + 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); + + displayio_area_t dirty_area = { + .x1 = args[ARG_x1].u_int, + .y1 = args[ARG_y1].u_int, + .x2 = args[ARG_x2].u_int == -1 ? self->width : args[ARG_x2].u_int, + .y2 = args[ARG_y2].u_int == -1 ? self->height : args[ARG_y2].u_int, + }; + + displayio_bitmap_set_dirty_area(self, &dirty_area); + + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_KW(displayio_bitmap_dirty_obj, 0, displayio_bitmap_obj_dirty); + STATIC const mp_rom_map_elem_t displayio_bitmap_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&displayio_bitmap_height_obj) }, { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&displayio_bitmap_width_obj) }, { MP_ROM_QSTR(MP_QSTR_blit), MP_ROM_PTR(&displayio_bitmap_blit_obj) }, { MP_ROM_QSTR(MP_QSTR_fill), MP_ROM_PTR(&displayio_bitmap_fill_obj) }, + { MP_ROM_QSTR(MP_QSTR_dirty), MP_ROM_PTR(&displayio_bitmap_dirty_obj) }, }; STATIC MP_DEFINE_CONST_DICT(displayio_bitmap_locals_dict, displayio_bitmap_locals_dict_table); diff --git a/shared-module/displayio/Bitmap.c b/shared-module/displayio/Bitmap.c index 872a20b9e9..e218049b6c 100644 --- a/shared-module/displayio/Bitmap.c +++ b/shared-module/displayio/Bitmap.c @@ -236,7 +236,7 @@ void common_hal_displayio_bitmap_fill(displayio_bitmap_t *self, uint32_t value) } int common_hal_displayio_bitmap_get_buffer(displayio_bitmap_t *self, mp_buffer_info_t *bufinfo, mp_uint_t flags) { - if (flags & MP_BUFFER_WRITE) { + if ((flags & MP_BUFFER_WRITE) && self->read_only) { return 1; } bufinfo->len = self->stride * self->height * sizeof(size_t); From 30e612fd55eb8956f6a31846c444452e7bd79486 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 3 Apr 2021 12:22:51 -0500 Subject: [PATCH 199/261] ulab: upgrade to 2.6.0 + CP building changes Changes in ulab: https://github.com/v923z/micropython-ulab/pull/360 --- extmod/ulab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extmod/ulab b/extmod/ulab index 2aae646485..ef65415b55 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit 2aae6464856e5213e45c72681dbb20c708fb3c6c +Subproject commit ef65415b5503ae71cc0a9064197f2e3fa5365d74 From 4ee781227fc20b6b3ba70fecf4bd12e6bfa97a64 Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Sat, 3 Apr 2021 13:32:17 -0400 Subject: [PATCH 200/261] [meowbit] change board.BUZZ type to PWMAudioOut, as advised in #4257 --- ports/stm/boards/meowbit_v121/board.c | 9 +++++++-- ports/stm/boards/meowbit_v121/pins.c | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ports/stm/boards/meowbit_v121/board.c b/ports/stm/boards/meowbit_v121/board.c index 44d1254629..7a31c14e7e 100644 --- a/ports/stm/boards/meowbit_v121/board.c +++ b/ports/stm/boards/meowbit_v121/board.c @@ -27,15 +27,15 @@ #include "supervisor/board.h" #include "mpconfigboard.h" +#include "shared-bindings/audiopwmio/PWMAudioOut.h" #include "shared-bindings/board/__init__.h" -#include "shared-bindings/displayio/FourWire.h" #include "shared-module/displayio/__init__.h" #include "shared-module/displayio/mipi_constants.h" #include "shared-bindings/busio/SPI.h" #include "supervisor/spi_flash_api.h" -displayio_fourwire_obj_t board_display_obj; +audiopwmio_pwmaudioout_obj_t board_buzz_obj; #define DELAY 0x80 @@ -113,6 +113,11 @@ void board_init(void) { 60, // native_frames_per_second true, // backlight_on_high false); // SH1107_addressing + + board_buzz_obj.base.type = &audiopwmio_pwmaudioout_type; + common_hal_audiopwmio_pwmaudioout_construct(&board_buzz_obj, + &pin_PB08, NULL, 0x8000); + never_reset_pin_number(pin_PB08.port, pin_PB08.number); } bool board_requests_safe_mode(void) { diff --git a/ports/stm/boards/meowbit_v121/pins.c b/ports/stm/boards/meowbit_v121/pins.c index d11341145f..fd988b5919 100644 --- a/ports/stm/boards/meowbit_v121/pins.c +++ b/ports/stm/boards/meowbit_v121/pins.c @@ -1,8 +1,11 @@ #include "shared-bindings/board/__init__.h" #include "supervisor/spi_flash_api.h" +#include "shared-bindings/audiopwmio/PWMAudioOut.h" #include "shared-module/displayio/__init__.h" +extern audiopwmio_pwmaudioout_obj_t board_buzz_obj; + STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_PB04) }, { MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_PB05) }, @@ -15,7 +18,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_DISP_RST), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_DISP_BL), MP_ROM_PTR(&pin_PB03) }, - { MP_ROM_QSTR(MP_QSTR_BUZZ), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_BUZZ), MP_ROM_PTR(&board_buzz_obj) }, { MP_ROM_QSTR(MP_QSTR_BTNA), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_BTNB), MP_ROM_PTR(&pin_PC03) }, { MP_ROM_QSTR(MP_QSTR_RIGHT), MP_ROM_PTR(&pin_PB02) }, From 97fd77b3bb51b6dfce5d0ffafdda9476bdc4306b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 3 Apr 2021 13:22:28 -0500 Subject: [PATCH 201/261] make translate --- locale/circuitpython.pot | 49 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 0a323b2249..ddb3284d7c 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -2401,10 +2401,6 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2414,8 +2410,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "" @@ -2444,7 +2440,7 @@ msgstr "" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2484,7 +2480,7 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2492,7 +2488,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2822,6 +2818,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3069,7 +3069,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3139,7 +3139,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "" @@ -3320,10 +3320,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3493,10 +3489,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "" @@ -3565,7 +3557,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3620,6 +3612,14 @@ msgstr "" msgid "ord() expected a character, but string of length %d found" msgstr "" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "" @@ -3830,7 +3830,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "" @@ -3838,6 +3838,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -4135,10 +4139,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4176,6 +4176,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" From 6e17db328643f18c070a854963446a6df66c6f3a Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Sat, 3 Apr 2021 15:31:08 -0400 Subject: [PATCH 202/261] [repl] Refactor autocomplete to reduce nesting --- py/repl.c | 223 +++++++++++++++++++++++++++--------------------------- 1 file changed, 113 insertions(+), 110 deletions(-) diff --git a/py/repl.c b/py/repl.c index 3ef1401522..02b8d1780f 100644 --- a/py/repl.c +++ b/py/repl.c @@ -161,131 +161,134 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print mp_obj_t obj = MP_OBJ_FROM_PTR(&mp_module___main__); mp_obj_t dest[2]; + const char *s_start; + size_t s_len; + for (;;) { // get next word in string to complete - const char *s_start = str; + s_start = str; while (str < top && *str != '.') { ++str; } - size_t s_len = str - s_start; + s_len = str - s_start; - if (str < top) { - // a complete word, lookup in current object - qstr q = qstr_find_strn(s_start, s_len); - if (q == MP_QSTR_NULL) { - // lookup will fail - return 0; - } - mp_load_method_protected(obj, q, dest, true); - obj = dest[0]; // attribute, method, or MP_OBJ_NULL if nothing found - - if (obj == MP_OBJ_NULL) { - // lookup failed - return 0; - } - - // skip '.' to move to next word - ++str; - - } else { + if (str == top) { // end of string, do completion on this partial name + break; + } - // look for matches - const char *match_str = NULL; - size_t match_len = 0; - qstr q_first = 0, q_last = 0; - for (qstr q = MP_QSTR_ + 1; q < nqstr; ++q) { - size_t d_len; - const char *d_str = (const char *)qstr_data(q, &d_len); - if (s_len <= d_len && strncmp(s_start, d_str, s_len) == 0) { - mp_load_method_protected(obj, q, dest, true); - if (dest[0] != MP_OBJ_NULL) { - // special case; filter out words that begin with underscore - // unless there's already a partial match - if (s_len == 0 && d_str[0] == '_') { - continue; - } - if (match_str == NULL) { - match_str = d_str; - match_len = d_len; - } else { - // search for longest common prefix of match_str and d_str - // (assumes these strings are null-terminated) - for (size_t j = s_len; j <= match_len && j <= d_len; ++j) { - if (match_str[j] != d_str[j]) { - match_len = j; - break; - } - } - } - if (q_first == 0) { - q_first = q; - } - q_last = q; - } + // a complete word, lookup in current object + qstr q = qstr_find_strn(s_start, s_len); + if (q == MP_QSTR_NULL) { + // lookup will fail + return 0; + } + mp_load_method_protected(obj, q, dest, true); + obj = dest[0]; // attribute, method, or MP_OBJ_NULL if nothing found + + if (obj == MP_OBJ_NULL) { + // lookup failed + return 0; + } + + // skip '.' to move to next word + ++str; + } + + // look for matches + const char *match_str = NULL; + size_t match_len = 0; + qstr q_first = 0, q_last = 0; + for (qstr q = MP_QSTR_ + 1; q < nqstr; ++q) { + size_t d_len; + const char *d_str = (const char *)qstr_data(q, &d_len); + if (s_len <= d_len && strncmp(s_start, d_str, s_len) == 0) { + mp_load_method_protected(obj, q, dest, true); + if (dest[0] != MP_OBJ_NULL) { + // special case; filter out words that begin with underscore + // unless there's already a partial match + if (s_len == 0 && d_str[0] == '_') { + continue; } - } - - // nothing found - if (q_first == 0) { - if (s_len == 0) { - *compl_str = " "; - return 4; - } - // If there're no better alternatives, and if it's first word - // in the line, try to complete "import". - if (s_start == org_str) { - static const char import_str[] = "import "; - if (memcmp(s_start, import_str, s_len) == 0) { - *compl_str = import_str + s_len; - return sizeof(import_str) - 1 - s_len; - } - } - - return 0; - } - - // 1 match found, or multiple matches with a common prefix - if (q_first == q_last || match_len > s_len) { - *compl_str = match_str + s_len; - return match_len - s_len; - } - - // multiple matches found, print them out - - #define WORD_SLOT_LEN (16) - #define MAX_LINE_LEN (4 * WORD_SLOT_LEN) - - int line_len = MAX_LINE_LEN; // force a newline for first word - for (qstr q = q_first; q <= q_last; ++q) { - size_t d_len; - const char *d_str = (const char *)qstr_data(q, &d_len); - if (s_len <= d_len && strncmp(s_start, d_str, s_len) == 0) { - mp_load_method_protected(obj, q, dest, true); - if (dest[0] != MP_OBJ_NULL) { - int gap = (line_len + WORD_SLOT_LEN - 1) / WORD_SLOT_LEN * WORD_SLOT_LEN - line_len; - if (gap < 2) { - gap += WORD_SLOT_LEN; - } - if (line_len + gap + d_len <= MAX_LINE_LEN) { - // TODO optimise printing of gap? - for (int j = 0; j < gap; ++j) { - mp_print_str(print, " "); - } - mp_print_str(print, d_str); - line_len += gap + d_len; - } else { - mp_printf(print, "\n%s", d_str); - line_len = d_len; + if (match_str == NULL) { + match_str = d_str; + match_len = d_len; + } else { + // search for longest common prefix of match_str and d_str + // (assumes these strings are null-terminated) + for (size_t j = s_len; j <= match_len && j <= d_len; ++j) { + if (match_str[j] != d_str[j]) { + match_len = j; + break; } } } + if (q_first == 0) { + q_first = q; + } + q_last = q; } - mp_print_str(print, "\n"); - - return (size_t)(-1); // indicate many matches } } + + // nothing found + if (q_first == 0) { + if (s_len == 0) { + *compl_str = " "; + return 4; + } + // If there're no better alternatives, and if it's first word + // in the line, try to complete "import". + if (s_start == org_str) { + static const char import_str[] = "import "; + if (memcmp(s_start, import_str, s_len) == 0) { + *compl_str = import_str + s_len; + return sizeof(import_str) - 1 - s_len; + } + } + + return 0; + } + + // 1 match found, or multiple matches with a common prefix + if (q_first == q_last || match_len > s_len) { + *compl_str = match_str + s_len; + return match_len - s_len; + } + + // multiple matches found, print them out + + #define WORD_SLOT_LEN (16) + #define MAX_LINE_LEN (4 * WORD_SLOT_LEN) + + int line_len = MAX_LINE_LEN; // force a newline for first word + for (qstr q = q_first; q <= q_last; ++q) { + size_t d_len; + const char *d_str = (const char *)qstr_data(q, &d_len); + if (s_len <= d_len && strncmp(s_start, d_str, s_len) == 0) { + mp_load_method_protected(obj, q, dest, true); + if (dest[0] != MP_OBJ_NULL) { + int gap = (line_len + WORD_SLOT_LEN - 1) / WORD_SLOT_LEN * WORD_SLOT_LEN - line_len; + if (gap < 2) { + gap += WORD_SLOT_LEN; + } + if (line_len + gap + d_len <= MAX_LINE_LEN) { + // TODO optimise printing of gap? + for (int j = 0; j < gap; ++j) { + mp_print_str(print, " "); + } + mp_print_str(print, d_str); + line_len += gap + d_len; + } else { + mp_printf(print, "\n%s", d_str); + line_len = d_len; + } + } + } + } + mp_print_str(print, "\n"); + + return (size_t)(-1); // indicate many matches } #endif // MICROPY_HELPER_REPL From 1d55dee15ba4d7ccf482f9f991d55fe7e1b471ac Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Sat, 3 Apr 2021 16:18:41 -0400 Subject: [PATCH 203/261] [repl] Refactor autocomplete, extracting reusable parts --- py/repl.c | 152 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 86 insertions(+), 66 deletions(-) diff --git a/py/repl.c b/py/repl.c index 02b8d1780f..89791075f6 100644 --- a/py/repl.c +++ b/py/repl.c @@ -143,6 +143,87 @@ bool mp_repl_continue_with_input(const char *input) { return false; } +STATIC bool test_qstr(mp_obj_t obj, qstr name) { + // try object member + mp_obj_t dest[2]; + mp_load_method_protected(obj, name, dest, true); + return dest[0] != MP_OBJ_NULL; +} + +STATIC const char *find_completions(const char *s_start, size_t s_len, + mp_obj_t obj, size_t *match_len, qstr *q_first, qstr *q_last) { + + const char *match_str = NULL; + *match_len = 0; + *q_first = *q_last = 0; + size_t nqstr = QSTR_TOTAL(); + for (qstr q = MP_QSTR_ + 1; q < nqstr; ++q) { + size_t d_len; + const char *d_str = (const char *)qstr_data(q, &d_len); + if (s_len <= d_len && strncmp(s_start, d_str, s_len) == 0) { + if (test_qstr(obj, q)) { + // special case; filter out words that begin with underscore + // unless there's already a partial match + if (s_len == 0 && d_str[0] == '_') { + continue; + } + if (match_str == NULL) { + match_str = d_str; + *match_len = d_len; + } else { + // search for longest common prefix of match_str and d_str + // (assumes these strings are null-terminated) + for (size_t j = s_len; j <= *match_len && j <= d_len; ++j) { + if (match_str[j] != d_str[j]) { + *match_len = j; + break; + } + } + } + if (*q_first == 0) { + *q_first = q; + } + *q_last = q; + } + } + } + return match_str; +} + +STATIC void print_completions(const mp_print_t *print, + const char *s_start, size_t s_len, + mp_obj_t obj, qstr q_first, qstr q_last) { + + #define WORD_SLOT_LEN (16) + #define MAX_LINE_LEN (4 * WORD_SLOT_LEN) + + int line_len = MAX_LINE_LEN; // force a newline for first word + for (qstr q = q_first; q <= q_last; ++q) { + size_t d_len; + const char *d_str = (const char *)qstr_data(q, &d_len); + if (s_len <= d_len && strncmp(s_start, d_str, s_len) == 0) { + if (test_qstr(obj, q)) { + int gap = (line_len + WORD_SLOT_LEN - 1) / WORD_SLOT_LEN * WORD_SLOT_LEN - line_len; + if (gap < 2) { + gap += WORD_SLOT_LEN; + } + if (line_len + gap + d_len <= MAX_LINE_LEN) { + // TODO optimise printing of gap? + for (int j = 0; j < gap; ++j) { + mp_print_str(print, " "); + } + mp_print_str(print, d_str); + line_len += gap + d_len; + } else { + mp_printf(print, "\n%s", d_str); + line_len = d_len; + } + } + } + } + mp_print_str(print, "\n"); +} + size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print, const char **compl_str) { // scan backwards to find start of "a.b.c" chain const char *org_str = str; @@ -155,8 +236,6 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print } } - size_t nqstr = QSTR_TOTAL(); - // begin search in outer global dict which is accessed from __main__ mp_obj_t obj = MP_OBJ_FROM_PTR(&mp_module___main__); mp_obj_t dest[2]; @@ -196,40 +275,10 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print } // look for matches - const char *match_str = NULL; - size_t match_len = 0; - qstr q_first = 0, q_last = 0; - for (qstr q = MP_QSTR_ + 1; q < nqstr; ++q) { - size_t d_len; - const char *d_str = (const char *)qstr_data(q, &d_len); - if (s_len <= d_len && strncmp(s_start, d_str, s_len) == 0) { - mp_load_method_protected(obj, q, dest, true); - if (dest[0] != MP_OBJ_NULL) { - // special case; filter out words that begin with underscore - // unless there's already a partial match - if (s_len == 0 && d_str[0] == '_') { - continue; - } - if (match_str == NULL) { - match_str = d_str; - match_len = d_len; - } else { - // search for longest common prefix of match_str and d_str - // (assumes these strings are null-terminated) - for (size_t j = s_len; j <= match_len && j <= d_len; ++j) { - if (match_str[j] != d_str[j]) { - match_len = j; - break; - } - } - } - if (q_first == 0) { - q_first = q; - } - q_last = q; - } - } - } + size_t match_len; + qstr q_first, q_last; + const char *match_str = + find_completions(s_start, s_len, obj, &match_len, &q_first, &q_last); // nothing found if (q_first == 0) { @@ -257,36 +306,7 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print } // multiple matches found, print them out - - #define WORD_SLOT_LEN (16) - #define MAX_LINE_LEN (4 * WORD_SLOT_LEN) - - int line_len = MAX_LINE_LEN; // force a newline for first word - for (qstr q = q_first; q <= q_last; ++q) { - size_t d_len; - const char *d_str = (const char *)qstr_data(q, &d_len); - if (s_len <= d_len && strncmp(s_start, d_str, s_len) == 0) { - mp_load_method_protected(obj, q, dest, true); - if (dest[0] != MP_OBJ_NULL) { - int gap = (line_len + WORD_SLOT_LEN - 1) / WORD_SLOT_LEN * WORD_SLOT_LEN - line_len; - if (gap < 2) { - gap += WORD_SLOT_LEN; - } - if (line_len + gap + d_len <= MAX_LINE_LEN) { - // TODO optimise printing of gap? - for (int j = 0; j < gap; ++j) { - mp_print_str(print, " "); - } - mp_print_str(print, d_str); - line_len += gap + d_len; - } else { - mp_printf(print, "\n%s", d_str); - line_len = d_len; - } - } - } - } - mp_print_str(print, "\n"); + print_completions(print, s_start, s_len, obj, q_first, q_last); return (size_t)(-1); // indicate many matches } From 59fa9b01ad8c75151dbbdb08cc88cd9fe422637b Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Sat, 3 Apr 2021 16:56:02 -0400 Subject: [PATCH 204/261] [repl] Autocomplete builtin modules --- py/repl.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/py/repl.c b/py/repl.c index 89791075f6..ccc8dd5c6b 100644 --- a/py/repl.c +++ b/py/repl.c @@ -26,6 +26,7 @@ #include #include "py/obj.h" +#include "py/objmodule.h" #include "py/runtime.h" #include "py/builtin.h" #include "py/repl.h" @@ -144,10 +145,16 @@ bool mp_repl_continue_with_input(const char *input) { } STATIC bool test_qstr(mp_obj_t obj, qstr name) { - // try object member - mp_obj_t dest[2]; - mp_load_method_protected(obj, name, dest, true); - return dest[0] != MP_OBJ_NULL; + if (obj) { + // try object member + mp_obj_t dest[2]; + mp_load_method_protected(obj, name, dest, true); + return dest[0] != MP_OBJ_NULL; + } else { + // try builtin module + return mp_map_lookup((mp_map_t *)&mp_builtin_module_map, + MP_OBJ_NEW_QSTR(name), MP_MAP_LOOKUP); + } } STATIC const char *find_completions(const char *s_start, size_t s_len, @@ -282,21 +289,25 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print // nothing found if (q_first == 0) { - if (s_len == 0) { - *compl_str = " "; - return 4; - } // If there're no better alternatives, and if it's first word // in the line, try to complete "import". - if (s_start == org_str) { - static const char import_str[] = "import "; + static const char import_str[] = "import "; + if (s_start == org_str && s_len > 0) { if (memcmp(s_start, import_str, s_len) == 0) { *compl_str = import_str + s_len; return sizeof(import_str) - 1 - s_len; } } - - return 0; + // after "import", suggest built-in modules + if (len >= 7 && !memcmp(org_str, import_str, 7)) { + obj = NULL; + match_str = find_completions( + s_start, s_len, obj, &match_len, &q_first, &q_last); + } + if (q_first == 0) { + *compl_str = " "; + return s_len ? 0 : 4; + } } // 1 match found, or multiple matches with a common prefix From 22e8863a0014a84c3cc72ab5f7edfb9849647350 Mon Sep 17 00:00:00 2001 From: Jose David M Date: Sat, 3 Apr 2021 17:03:58 +0000 Subject: [PATCH 205/261] Translated using Weblate (Spanish) Currently translated at 100.0% (967 of 967 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/es.po b/locale/es.po index 1356d3eba0..45e3ebf92b 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-04-02 19:08+0000\n" +"PO-Revision-Date: 2021-04-03 21:57+0000\n" "Last-Translator: Jose David M \n" "Language-Team: \n" "Language: es\n" @@ -1622,11 +1622,11 @@ msgstr "No hay temporizador disponible" #: supervisor/shared/safe_mode.c msgid "Nordic system firmware failure assertion." -msgstr "" +msgstr "Falla en la aserción del firmware del dispositivo Nordic." #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic system firmware out of memory" -msgstr "" +msgstr "El firmware del sistema Nordic no tiene memoria" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -2305,7 +2305,7 @@ msgstr "Error de seguridad desconocido: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown system firmware error: %04x" -msgstr "" +msgstr "Error desconocido en el firmware sistema: %04x" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format From 3969ce2990597981a589a731d688d16cbf10e6b3 Mon Sep 17 00:00:00 2001 From: Hugo Dahl Date: Sat, 3 Apr 2021 13:55:27 +0000 Subject: [PATCH 206/261] Translated using Weblate (French) Currently translated at 100.0% (967 of 967 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 28771f95e9..1eac514c4c 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-04-01 14:50+0000\n" +"PO-Revision-Date: 2021-04-03 21:57+0000\n" "Last-Translator: Hugo Dahl \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -1630,11 +1630,11 @@ msgstr "Aucun minuteur disponible" #: supervisor/shared/safe_mode.c msgid "Nordic system firmware failure assertion." -msgstr "" +msgstr "Assertion échouée du logiciel systême Nordic." #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic system firmware out of memory" -msgstr "" +msgstr "Logiciel systême Nordic hors de mémoire" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -2317,7 +2317,7 @@ msgstr "Erreur de sécurité inconnue : 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown system firmware error: %04x" -msgstr "" +msgstr "Faute inconnue du logiciel systême : %04x" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format From cf51640157d40ea361f6347070d3cc2f23c479cb Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Sat, 3 Apr 2021 15:58:52 +0000 Subject: [PATCH 207/261] Translated using Weblate (Swedish) Currently translated at 100.0% (967 of 967 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 16d90033ac..bb8da0760e 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-04-01 14:50+0000\n" +"PO-Revision-Date: 2021-04-03 21:57+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -1604,11 +1604,11 @@ msgstr "Ingen timer tillgänglig" #: supervisor/shared/safe_mode.c msgid "Nordic system firmware failure assertion." -msgstr "" +msgstr "Felaktigt tillstånd i Nordic systemfirmware." #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic system firmware out of memory" -msgstr "" +msgstr "Nordic systemfirmware fick slut på minne" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -2282,7 +2282,7 @@ msgstr "Okänt säkerhetsfel: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown system firmware error: %04x" -msgstr "" +msgstr "Okänt systemfirmwarefel: %04x" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format From ca1467187e433d3d465aa074f912a82a89f044b5 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Sat, 3 Apr 2021 23:57:49 +0200 Subject: [PATCH 208/261] 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 | 49 +++++++++++++++-------------- locale/cs.po | 49 +++++++++++++++-------------- locale/de_DE.po | 58 ++++++++++++++++++++-------------- locale/el.po | 49 +++++++++++++++-------------- locale/en_GB.po | 61 ++++++++++++++++++------------------ locale/es.po | 67 ++++++++++++++++++++++------------------ locale/fil.po | 49 +++++++++++++++-------------- locale/fr.po | 67 ++++++++++++++++++++++------------------ locale/hi.po | 49 +++++++++++++++-------------- locale/it_IT.po | 49 +++++++++++++++-------------- locale/ja.po | 58 ++++++++++++++++++---------------- locale/ko.po | 49 +++++++++++++++-------------- locale/nl.po | 64 ++++++++++++++++++++++---------------- locale/pl.po | 52 +++++++++++++++++-------------- locale/pt_BR.po | 67 ++++++++++++++++++++++------------------ locale/sv.po | 67 ++++++++++++++++++++++------------------ locale/zh_Latn_pinyin.po | 67 ++++++++++++++++++++++------------------ 17 files changed, 521 insertions(+), 450 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index f39b28ef7a..a1bad8cd14 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -2451,10 +2451,6 @@ msgstr "" msgid "argument has wrong type" msgstr "argumen memiliki tipe yang salah" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2464,8 +2460,8 @@ msgstr "argumen num/types tidak cocok" msgid "argument should be a '%q' not a '%q'" msgstr "argumen harus berupa '%q' bukan '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "argumen harus berupa ndarrays" @@ -2494,7 +2490,7 @@ msgstr "atribut belum didukung" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2534,7 +2530,7 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2542,7 +2538,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2873,6 +2869,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3120,7 +3120,7 @@ msgstr "lapisan (padding) tidak benar" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3190,7 +3190,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "" @@ -3371,10 +3371,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3544,10 +3540,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "" @@ -3616,7 +3608,7 @@ msgstr "" msgid "odd-length string" msgstr "panjang data string memiliki keganjilan (odd-length)" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3672,6 +3664,14 @@ msgstr "" msgid "ord() expected a character, but string of length %d found" msgstr "" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "" @@ -3882,7 +3882,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "" @@ -3890,6 +3890,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -4188,10 +4192,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4229,6 +4229,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 5897868c3f..be7c3b8ffc 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -2404,10 +2404,6 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2417,8 +2413,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "" @@ -2447,7 +2443,7 @@ msgstr "" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2487,7 +2483,7 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2495,7 +2491,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2825,6 +2821,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3072,7 +3072,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3142,7 +3142,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "" @@ -3323,10 +3323,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3496,10 +3492,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "" @@ -3568,7 +3560,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3623,6 +3615,14 @@ msgstr "" msgid "ord() expected a character, but string of length %d found" msgstr "" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "" @@ -3833,7 +3833,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "" @@ -3841,6 +3841,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -4138,10 +4142,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4179,6 +4179,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index e791e1540c..705be127bd 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -2468,10 +2468,6 @@ msgstr "" msgid "argument has wrong type" msgstr "Argument hat falschen Typ" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "Argument muss ein ndarray sein" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2481,8 +2477,8 @@ msgstr "Anzahl/Typen der Argumente passen nicht" msgid "argument should be a '%q' not a '%q'" msgstr "Argument sollte '%q' sein, nicht '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "Argumente müssen ndarrays sein" @@ -2511,7 +2507,7 @@ msgstr "Attribute werden noch nicht unterstützt" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2551,7 +2547,7 @@ msgstr "Es müssen 8 oder 16 bits_per_sample sein" msgid "branch not in range" msgstr "Zweig ist außerhalb der Reichweite" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2559,7 +2555,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "Puffer muss ein bytes-artiges Objekt sein" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2901,6 +2897,10 @@ msgstr "diff Argument muss ein ndarray sein" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3150,7 +3150,7 @@ msgstr "padding ist inkorrekt" msgid "index is out of bounds" msgstr "Index ist außerhalb der Grenzen" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3220,7 +3220,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "Die Eingabe muss eine quadratische Matrix sein" @@ -3407,10 +3407,6 @@ msgstr "map buffer zu klein" msgid "math domain error" msgstr "Mathe-Domain-Fehler" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "Matrix Dimensionen stimmen nicht überein" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "Matrix ist nicht positiv definitiv" @@ -3580,10 +3576,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "keine 128-bit UUID" @@ -3653,7 +3645,7 @@ msgstr "Objekt mit Pufferprotokoll (buffer protocol) erforderlich" msgid "odd-length string" msgstr "String mit ungerader Länge" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3711,6 +3703,14 @@ msgstr "" "ord() erwartet einen Buchstaben(char) aber es wurde ein String mit Länge %d " "gefunden" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "Außerhalb des Bereichs der Quelle" @@ -3923,7 +3923,7 @@ msgstr "Vorzeichen mit ganzzahligem Formatbezeichner 'c' nicht erlaubt" msgid "single '}' encountered in format string" msgstr "einzelne '}' in Formatierungs-String gefunden" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "Größe ist nur für ndarrays definiert" @@ -3931,6 +3931,10 @@ msgstr "Größe ist nur für ndarrays definiert" msgid "sleep length must be non-negative" msgstr "Die Schlafdauer darf nicht negativ sein" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "Der Slice-Schritt kann nicht Null sein" @@ -4233,10 +4237,6 @@ msgstr "Wert muss in %d Byte(s) passen" msgid "value_count must be > 0" msgstr "value_count muss größer als 0 sein" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "Vektoren müssen die selbe Länge haben" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4274,6 +4274,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "falscher Eingabetyp" @@ -4326,6 +4327,15 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "argument must be ndarray" +#~ msgstr "Argument muss ein ndarray sein" + +#~ msgid "matrix dimensions do not match" +#~ msgstr "Matrix Dimensionen stimmen nicht überein" + +#~ msgid "vectors must have same lengths" +#~ msgstr "Vektoren müssen die selbe Länge haben" + #~ msgid "Nordic Soft Device failure assertion." #~ msgstr "Fehlerbehauptung für Nordic Soft Device." diff --git a/locale/el.po b/locale/el.po index 6c557f6d02..fc9cdfc40e 100644 --- a/locale/el.po +++ b/locale/el.po @@ -2401,10 +2401,6 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2414,8 +2410,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "" @@ -2444,7 +2440,7 @@ msgstr "" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2484,7 +2480,7 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2492,7 +2488,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2822,6 +2818,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3069,7 +3069,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3139,7 +3139,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "" @@ -3320,10 +3320,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3493,10 +3489,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "" @@ -3565,7 +3557,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3620,6 +3612,14 @@ msgstr "" msgid "ord() expected a character, but string of length %d found" msgstr "" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "" @@ -3830,7 +3830,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "" @@ -3838,6 +3838,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -4135,10 +4139,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4176,6 +4176,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 18867c405a..061e057c69 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -2448,10 +2448,6 @@ msgstr "argsort is not implemented for flattened arrays" msgid "argument has wrong type" msgstr "argument has wrong type" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "argument must be ndarray" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2461,8 +2457,8 @@ msgstr "argument num/types mismatch" msgid "argument should be a '%q' not a '%q'" msgstr "argument should be a '%q' not a '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "arguments must be ndarrays" @@ -2491,7 +2487,7 @@ msgstr "attributes not supported yet" msgid "axis is out of bounds" msgstr "axis is out of bounds" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "axis must be None, or an integer" @@ -2531,7 +2527,7 @@ msgstr "bits_per_sample must be 8 or 16" msgid "branch not in range" msgstr "Branch not in range" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "Buffer is smaller than requested size" @@ -2539,7 +2535,7 @@ msgstr "Buffer is smaller than requested size" msgid "buffer must be a bytes-like object" msgstr "Buffer must be a bytes-like object" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "Buffer size must be a multiple of element size" @@ -2872,6 +2868,10 @@ msgstr "diff argument must be an ndarray" msgid "differentiation order out of range" msgstr "differentiation order out of range" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "dimensions do not match" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3119,7 +3119,7 @@ msgstr "incorrect padding" msgid "index is out of bounds" msgstr "index is out of bounds" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3189,7 +3189,7 @@ msgstr "input must be an ndarray" msgid "input must be one-dimensional" msgstr "input must be one-dimensional" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "input must be square matrix" @@ -3371,10 +3371,6 @@ msgstr "map buffer too small" msgid "math domain error" msgstr "math domain error" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrix is not positive definite" @@ -3544,10 +3540,6 @@ msgstr "non-zero timeout must be > 0.01" msgid "non-zero timeout must be >= interval" msgstr "non-zero timeout must be >= interval" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "norm is defined for 1D and 2D arrays" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "not a 128-bit UUID" @@ -3616,7 +3608,7 @@ msgstr "object with buffer protocol required" msgid "odd-length string" msgstr "odd-length string" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset is too large" @@ -3671,6 +3663,14 @@ msgstr "ord expects a character" msgid "ord() expected a character, but string of length %d found" msgstr "ord() expected a character, but string of length %d found" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "out of range of source" @@ -3883,7 +3883,7 @@ msgstr "sign not allowed with integer format specifier 'c'" msgid "single '}' encountered in format string" msgstr "single '}' encountered in format string" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "size is defined for ndarrays only" @@ -3891,6 +3891,10 @@ msgstr "size is defined for ndarrays only" msgid "sleep length must be non-negative" msgstr "sleep length must be non-negative" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "slice step can't be zero" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "slice step cannot be zero" @@ -4188,10 +4192,6 @@ msgstr "value must fit in %d byte(s)" msgid "value_count must be > 0" msgstr "value_count must be > 0" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "wakeup conflict" @@ -4229,6 +4229,7 @@ msgstr "wrong axis index" msgid "wrong axis specified" msgstr "wrong axis specified" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "wrong input type" @@ -4281,24 +4282,24 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "argument must be ndarray" +#~ msgstr "argument must be ndarray" + +#~ msgid "norm is defined for 1D and 2D arrays" +#~ msgstr "norm is defined for 1D and 2D arrays" + #~ msgid "Nordic Soft Device failure assertion." #~ msgstr "Nordic Soft Device failure assertion." #~ msgid "Unknown soft device error: %04x" #~ msgstr "Unknown soft device error: %04x" -#~ msgid "dimensions do not match" -#~ msgstr "dimensions do not match" - #~ msgid "first argument must be an iterable" #~ msgstr "first argument must be an iterable" #~ msgid "iterables are not of the same length" #~ msgstr "iterables are not of the same length" -#~ msgid "slice step can't be zero" -#~ msgstr "slice step can't be zero" - #~ msgid "Selected CTS pin not valid" #~ msgstr "Selected CTS pin not valid" diff --git a/locale/es.po b/locale/es.po index 45e3ebf92b..d0c4562c80 100644 --- a/locale/es.po +++ b/locale/es.po @@ -2481,10 +2481,6 @@ msgstr "El argot no está implementado para arrays aplanados" msgid "argument has wrong type" msgstr "el argumento tiene un tipo erroneo" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "argumento debe ser ndarray" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2494,8 +2490,8 @@ msgstr "argumento número/tipos no coinciden" msgid "argument should be a '%q' not a '%q'" msgstr "argumento deberia ser un '%q' no un '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "argumentos deben ser ndarrays" @@ -2524,7 +2520,7 @@ msgstr "atributos aún no soportados" msgid "axis is out of bounds" msgstr "Eje está fuera de sus límites" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "Eje tiene que ser None, o un entero" @@ -2564,7 +2560,7 @@ msgstr "bits_per_sample debe ser 8 ó 16" msgid "branch not in range" msgstr "la rama no está dentro del rango" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "El buffer es mas pequeño que el requerido" @@ -2572,7 +2568,7 @@ msgstr "El buffer es mas pequeño que el requerido" msgid "buffer must be a bytes-like object" msgstr "buffer debe de ser un objeto bytes-like" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "El tamaño del buffer debe ser un múltiplo del tamaño del elemento" @@ -2909,6 +2905,10 @@ msgstr "El argumento diff debe ser un ndarray" msgid "differentiation order out of range" msgstr "Orden de diferenciación fuera de rango" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "las dimensiones no concuerdan" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3156,7 +3156,7 @@ msgstr "relleno (padding) incorrecto" msgid "index is out of bounds" msgstr "el índice está fuera de límites" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3226,7 +3226,7 @@ msgstr "Entrada tiene que ser un ndarray" msgid "input must be one-dimensional" msgstr "Entrada tiene que ser unidimensional" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "la entrada debe ser una matriz cuadrada" @@ -3410,10 +3410,6 @@ msgstr "map buffer muy pequeño" msgid "math domain error" msgstr "error de dominio matemático" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "las dimensiones de la matriz no coinciden" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrix no es definida positiva" @@ -3586,10 +3582,6 @@ msgstr "el tiempo de espera non-zero deber ser > 0.01" msgid "non-zero timeout must be >= interval" msgstr "el tiempo de espera non-zero debe ser >= intervalo" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "norma está definida para arrays 1D y 2D" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "no es 128-bit UUID" @@ -3659,7 +3651,7 @@ msgstr "objeto con protocolo de buffer requerido" msgid "odd-length string" msgstr "string de longitud impar" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset es demasiado grande" @@ -3714,6 +3706,14 @@ msgstr "ord espera un carácter" msgid "ord() expected a character, but string of length %d found" msgstr "ord() espera un carácter, pero encontró un string de longitud %d" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "fuera de rango de fuente" @@ -3926,7 +3926,7 @@ msgstr "signo no permitido con el especificador integer format 'c'" msgid "single '}' encountered in format string" msgstr "un solo '}' encontrado en format string" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "el tamaño se define solo para ndarrays" @@ -3934,6 +3934,10 @@ msgstr "el tamaño se define solo para ndarrays" msgid "sleep length must be non-negative" msgstr "la longitud de sleep no puede ser negativa" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "el tamaño de la división no puede ser cero" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "slice step no puede ser cero" @@ -4232,10 +4236,6 @@ msgstr "el valor debe caber en %d byte(s)" msgid "value_count must be > 0" msgstr "value_count debe ser > 0" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "los vectores deben tener el mismo tamaño" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflicto de wakeup" @@ -4273,6 +4273,7 @@ msgstr "indice de eje erróneo" msgid "wrong axis specified" msgstr "eje especificado erróneo" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "tipo de entrada incorrecta" @@ -4325,6 +4326,18 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "argument must be ndarray" +#~ msgstr "argumento debe ser ndarray" + +#~ msgid "matrix dimensions do not match" +#~ msgstr "las dimensiones de la matriz no coinciden" + +#~ msgid "norm is defined for 1D and 2D arrays" +#~ msgstr "norma está definida para arrays 1D y 2D" + +#~ msgid "vectors must have same lengths" +#~ msgstr "los vectores deben tener el mismo tamaño" + #~ msgid "Nordic Soft Device failure assertion." #~ msgstr "Fallo de aserción de dispositivo Nordic Soft." @@ -4334,18 +4347,12 @@ msgstr "zi debe ser una forma (n_section,2)" #~ msgid "Unknown soft device error: %04x" #~ msgstr "Error leve desconocido en dispositivo: %04x" -#~ msgid "dimensions do not match" -#~ msgstr "las dimensiones no concuerdan" - #~ msgid "first argument must be an iterable" #~ msgstr "el primer argumento debe ser un iterable" #~ msgid "iterables are not of the same length" #~ msgstr "los iterables no son del mismo tamaño" -#~ msgid "slice step can't be zero" -#~ msgstr "el tamaño de la división no puede ser cero" - #~ msgid "Selected CTS pin not valid" #~ msgstr "Pin CTS seleccionado no válido" diff --git a/locale/fil.po b/locale/fil.po index 76f2a7a8bf..eadfdba95f 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -2431,10 +2431,6 @@ msgstr "" msgid "argument has wrong type" msgstr "may maling type ang argument" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2444,8 +2440,8 @@ msgstr "hindi tugma ang argument num/types" msgid "argument should be a '%q' not a '%q'" msgstr "argument ay dapat na '%q' hindi '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "" @@ -2474,7 +2470,7 @@ msgstr "attributes hindi sinusuportahan" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2514,7 +2510,7 @@ msgstr "bits_per_sample ay dapat 8 o 16" msgid "branch not in range" msgstr "branch wala sa range" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2522,7 +2518,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "buffer ay dapat bytes-like object" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2863,6 +2859,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3112,7 +3112,7 @@ msgstr "mali ang padding" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3182,7 +3182,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "" @@ -3367,10 +3367,6 @@ msgstr "masyadong maliit ang buffer map" msgid "math domain error" msgstr "may pagkakamali sa math domain" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3540,10 +3536,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "" @@ -3612,7 +3604,7 @@ msgstr "object na may buffer protocol kinakailangan" msgid "odd-length string" msgstr "odd-length string" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3668,6 +3660,14 @@ msgstr "ord umaasa ng character" msgid "ord() expected a character, but string of length %d found" msgstr "ord() umaasa ng character pero string ng %d haba ang nakita" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "" @@ -3881,7 +3881,7 @@ msgstr "sign hindi maari sa integer format specifier 'c'" msgid "single '}' encountered in format string" msgstr "isang '}' nasalubong sa format string" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "" @@ -3889,6 +3889,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "sleep length ay dapat hindi negatibo" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "slice step ay hindi puedeng 0" @@ -4188,10 +4192,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4229,6 +4229,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 1eac514c4c..53de19c335 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -2495,10 +2495,6 @@ msgstr "argsort n'est pas mis en œuvre pour les tableaux aplatis" msgid "argument has wrong type" msgstr "l'argument est d'un mauvais type" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "l'argument doit être un ndarray" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2508,8 +2504,8 @@ msgstr "Nombre/types de paramètres ne correspondent pas" msgid "argument should be a '%q' not a '%q'" msgstr "le paramètre devrait être un(e) '%q', pas '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "les paramètres doivent être des ndarrays" @@ -2538,7 +2534,7 @@ msgstr "attribut pas encore supporté" msgid "axis is out of bounds" msgstr "axis est hors limites" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "axis doit être None ou un entier" @@ -2578,7 +2574,7 @@ msgstr "'bits_per_sample' doivent être 8 ou 16" msgid "branch not in range" msgstr "branche hors-bornes" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "tampon est plus petit que la taille demandée" @@ -2586,7 +2582,7 @@ msgstr "tampon est plus petit que la taille demandée" msgid "buffer must be a bytes-like object" msgstr "le tampon doit être un objet bytes-like" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "taille du tampon doit être un multiple de la taille de l'élement" @@ -2929,6 +2925,10 @@ msgstr "l'argument diff doit être un ndarray" msgid "differentiation order out of range" msgstr "differentiation order hors de portée" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "les dimensions ne correspondent pas" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3178,7 +3178,7 @@ msgstr "espacement incorrect" msgid "index is out of bounds" msgstr "l'index est hors limites" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3249,7 +3249,7 @@ msgstr "l'entrée doit être un ndarray" msgid "input must be one-dimensional" msgstr "l'entrée doit être uni-dimensionelle" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "l'entrée doit être une matrice carrée" @@ -3434,10 +3434,6 @@ msgstr "tampon trop petit" msgid "math domain error" msgstr "erreur de domaine math" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "les dimensions de la matrice ne correspondent pas" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "la matrice n'est pas définie positive" @@ -3608,10 +3604,6 @@ msgstr "le délai non-zéro doit être > 0.01" msgid "non-zero timeout must be >= interval" msgstr "le délai non-zéro doit être >= interval" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "norm est défini pour des tableaux 1D et 2D" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "n'est pas un UUID 128 bits" @@ -3681,7 +3673,7 @@ msgstr "un objet avec un protocole de tampon est nécessaire" msgid "odd-length string" msgstr "chaîne de longueur impaire" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset est trop large" @@ -3738,6 +3730,14 @@ msgstr "" "ord() attend un caractère mais une chaîne de caractère de longueur %d a été " "trouvée" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "dépassement des bornes de source" @@ -3951,7 +3951,7 @@ msgstr "signe non autorisé avec la spéc. de format d'entier 'c'" msgid "single '}' encountered in format string" msgstr "'}' seule rencontrée dans une chaîne de format" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "la taille est définie pour les ndarrays uniquement" @@ -3959,6 +3959,10 @@ msgstr "la taille est définie pour les ndarrays uniquement" msgid "sleep length must be non-negative" msgstr "la longueur de sleep ne doit pas être négative" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "le pas 'step' de la tranche ne peut être zéro" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "le pas 'step' de la tranche ne peut être zéro" @@ -4257,10 +4261,6 @@ msgstr "la valeur doit tenir dans %d octet(s)" msgid "value_count must be > 0" msgstr "'value_count' doit être > 0" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "les vecteurs doivent avoir la même longueur" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflit au réveil" @@ -4298,6 +4298,7 @@ msgstr "index d'axe incorrecte" msgid "wrong axis specified" msgstr "axe incorrecte spécifiée" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "type d'entrée incorrect" @@ -4350,6 +4351,18 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "argument must be ndarray" +#~ msgstr "l'argument doit être un ndarray" + +#~ msgid "matrix dimensions do not match" +#~ msgstr "les dimensions de la matrice ne correspondent pas" + +#~ msgid "norm is defined for 1D and 2D arrays" +#~ msgstr "norm est défini pour des tableaux 1D et 2D" + +#~ msgid "vectors must have same lengths" +#~ msgstr "les vecteurs doivent avoir la même longueur" + #~ msgid "Nordic Soft Device failure assertion." #~ msgstr "Affirmation de défaillance du Nordic Soft Device." @@ -4359,18 +4372,12 @@ msgstr "zi doit être de forme (n_section, 2)" #~ msgid "Unknown soft device error: %04x" #~ msgstr "Erreur de périphérique logiciel inconnue : %04x" -#~ msgid "dimensions do not match" -#~ msgstr "les dimensions ne correspondent pas" - #~ msgid "first argument must be an iterable" #~ msgstr "le premier argument doit être un itérable" #~ msgid "iterables are not of the same length" #~ msgstr "les itérables ne sont pas de la même longueur" -#~ msgid "slice step can't be zero" -#~ msgstr "le pas 'step' de la tranche ne peut être zéro" - #~ msgid "Selected CTS pin not valid" #~ msgstr "La broche CTS sélectionnée n'est pas valide" diff --git a/locale/hi.po b/locale/hi.po index ba15970b91..cec73d3127 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -2401,10 +2401,6 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2414,8 +2410,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "" @@ -2444,7 +2440,7 @@ msgstr "" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2484,7 +2480,7 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2492,7 +2488,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2822,6 +2818,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3069,7 +3069,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3139,7 +3139,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "" @@ -3320,10 +3320,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3493,10 +3489,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "" @@ -3565,7 +3557,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3620,6 +3612,14 @@ msgstr "" msgid "ord() expected a character, but string of length %d found" msgstr "" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "" @@ -3830,7 +3830,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "" @@ -3838,6 +3838,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -4135,10 +4139,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4176,6 +4176,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 9657c294e4..5238d74c8f 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -2444,10 +2444,6 @@ msgstr "" msgid "argument has wrong type" msgstr "il tipo dell'argomento è errato" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2457,8 +2453,8 @@ msgstr "discrepanza di numero/tipo di argomenti" msgid "argument should be a '%q' not a '%q'" msgstr "l'argomento dovrebbe essere un '%q' e non un '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "" @@ -2487,7 +2483,7 @@ msgstr "attributi non ancora supportati" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2529,7 +2525,7 @@ msgstr "i bit devono essere 7, 8 o 9" msgid "branch not in range" msgstr "argomento di chr() non è in range(256)" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2537,7 +2533,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2874,6 +2870,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3123,7 +3123,7 @@ msgstr "padding incorretto" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3193,7 +3193,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "" @@ -3379,10 +3379,6 @@ msgstr "map buffer troppo piccolo" msgid "math domain error" msgstr "errore di dominio matematico" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3553,10 +3549,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "" @@ -3627,7 +3619,7 @@ msgstr "" msgid "odd-length string" msgstr "stringa di lunghezza dispari" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3684,6 +3676,14 @@ msgid "ord() expected a character, but string of length %d found" msgstr "" "ord() aspettava un carattere, ma ha ricevuto una stringa di lunghezza %d" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "" @@ -3898,7 +3898,7 @@ msgstr "segno non permesso nello spcificatore di formato 'c' della stringa" msgid "single '}' encountered in format string" msgstr "'}' singolo presente nella stringa di formattazione" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "" @@ -3906,6 +3906,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "la lunghezza di sleed deve essere non negativa" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "la step della slice non può essere zero" @@ -4205,10 +4209,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4246,6 +4246,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 19c879e522..07e5fd0f8e 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -2424,10 +2424,6 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "引数はndarrayでなければなりません" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2437,8 +2433,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "引数には '%q' が必要('%q' ではなく)" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "引数はndarrayでなければなりません" @@ -2467,7 +2463,7 @@ msgstr "属性は未対応です" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2507,7 +2503,7 @@ msgstr "bits_per_sampleは8または16でなければなりません" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2515,7 +2511,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "バッファはbytes-likeオブジェクトでなければなりません" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2849,6 +2845,10 @@ msgstr "引数はndarrayでなければなりません" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3096,7 +3096,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3167,7 +3167,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "入力は正方行列でなければなりません" @@ -3348,10 +3348,6 @@ msgstr "" msgid "math domain error" msgstr "定義域エラー" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "行列の次元が一致しません" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "正定値行列ではありません" @@ -3521,10 +3517,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "128ビットのUUIDではありません" @@ -3593,7 +3585,7 @@ msgstr "" msgid "odd-length string" msgstr "奇数長の文字列" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3648,6 +3640,14 @@ msgstr "ord()は1文字を受け取ります" msgid "ord() expected a character, but string of length %d found" msgstr "ord()は1文字を要求しますが、長さ %d の文字列が与えられました" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "ソースが範囲外" @@ -3861,7 +3861,7 @@ msgstr "整数フォーマット指定子'c'で符号は使えません" msgid "single '}' encountered in format string" msgstr "文字列フォーマット中に孤立した '}' があります" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "" @@ -3869,6 +3869,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "sleepの長さは非負数でなければなりません" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "スライスのステップは0にできません" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -4166,10 +4170,6 @@ msgstr "値は%dバイトに収まらなければなりません" msgid "value_count must be > 0" msgstr "value_countは0より大きくなければなりません" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4207,6 +4207,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" @@ -4259,6 +4260,12 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "argument must be ndarray" +#~ msgstr "引数はndarrayでなければなりません" + +#~ msgid "matrix dimensions do not match" +#~ msgstr "行列の次元が一致しません" + #~ msgid "Unknown soft device error: %04x" #~ msgstr "不明なソフトデバイスエラー: %04x" @@ -4268,9 +4275,6 @@ msgstr "" #~ msgid "iterables are not of the same length" #~ msgstr "iterableが同じ長さではありません" -#~ msgid "slice step can't be zero" -#~ msgstr "スライスのステップは0にできません" - #~ msgid "Selected CTS pin not valid" #~ msgstr "選択されたCTSピンが不正" diff --git a/locale/ko.po b/locale/ko.po index b84fa14ee4..381ee18a34 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -2405,10 +2405,6 @@ msgstr "" msgid "argument has wrong type" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2418,8 +2414,8 @@ msgstr "" msgid "argument should be a '%q' not a '%q'" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "" @@ -2448,7 +2444,7 @@ msgstr "" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2488,7 +2484,7 @@ msgstr "bits_per_sample은 8 또는 16이어야합니다." msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2496,7 +2492,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2826,6 +2822,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3073,7 +3073,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3143,7 +3143,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "" @@ -3324,10 +3324,6 @@ msgstr "" msgid "math domain error" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3497,10 +3493,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "" @@ -3569,7 +3561,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3624,6 +3616,14 @@ msgstr "" msgid "ord() expected a character, but string of length %d found" msgstr "" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "" @@ -3834,7 +3834,7 @@ msgstr "" msgid "single '}' encountered in format string" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "" @@ -3842,6 +3842,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "" @@ -4139,10 +4143,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4180,6 +4180,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index a8fde108ac..7f468cfa07 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -2452,10 +2452,6 @@ msgstr "argsort wordt niet geïmplementeerd voor vlakke arrays" msgid "argument has wrong type" msgstr "argument heeft onjuist type" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "argument moet ndarray zijn" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2465,8 +2461,8 @@ msgstr "argument num/typen komen niet overeen" msgid "argument should be a '%q' not a '%q'" msgstr "argument moet een '%q' zijn en niet een '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "argumenten moeten ndarrays zijn" @@ -2495,7 +2491,7 @@ msgstr "attributen nog niet ondersteund" msgid "axis is out of bounds" msgstr "as is buiten bereik" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "as moet None of een integer zijn" @@ -2535,7 +2531,7 @@ msgstr "bits_per_sample moet 8 of 16 zijn" msgid "branch not in range" msgstr "pad (branch) niet binnen bereik" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2543,7 +2539,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "buffer moet een byte-achtig object zijn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2877,6 +2873,10 @@ msgstr "diff argument moet een ndarray zijn" msgid "differentiation order out of range" msgstr "differentiatievolgorde buiten bereik" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3125,7 +3125,7 @@ msgstr "vulling (padding) is onjuist" msgid "index is out of bounds" msgstr "index is buiten bereik" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3195,7 +3195,7 @@ msgstr "invoer moet een ndarray zijn" msgid "input must be one-dimensional" msgstr "invoer moet eendimensionaal zijn" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "invoer moet een vierkante matrix zijn" @@ -3379,10 +3379,6 @@ msgstr "map buffer te klein" msgid "math domain error" msgstr "fout in het wiskundig domein (math domain error)" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "matrix afmetingen komen niet overeen" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrix is niet positief-definiet" @@ -3552,10 +3548,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "norm is gedefinieerd voor 1D en 2D arrays" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "geen 128-bit UUID" @@ -3624,7 +3616,7 @@ msgstr "object met buffer protocol vereist" msgid "odd-length string" msgstr "string met oneven lengte" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "compensatie is te groot" @@ -3679,6 +3671,14 @@ msgstr "ord verwacht een teken (char)" msgid "ord() expected a character, but string of length %d found" msgstr "ord() verwacht een teken (char) maar vond een string van lengte %d" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "buiten bereik van bron" @@ -3892,7 +3892,7 @@ msgstr "teken niet toegestaan bij integer formaatspecificatie 'c'" msgid "single '}' encountered in format string" msgstr "enkele '}' aangetroffen in formaat tekenreeks (string)" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "omvang is alleen voor ndarrays gedefinieerd" @@ -3900,6 +3900,10 @@ msgstr "omvang is alleen voor ndarrays gedefinieerd" msgid "sleep length must be non-negative" msgstr "de slaapduur mag niet negatief zijn" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "segmentstap mag niet nul zijn" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "segmentstap mag niet nul zijn" @@ -4197,10 +4201,6 @@ msgstr "waarde moet in %d byte(s) passen" msgid "value_count must be > 0" msgstr "value_count moet groter dan 0 zijn" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "vectoren moeten van gelijke lengte zijn" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflict bij ontwaken" @@ -4238,6 +4238,7 @@ msgstr "foute index voor as" msgid "wrong axis specified" msgstr "onjuiste as gespecificeerd" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "onjuist invoertype" @@ -4290,6 +4291,18 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "argument must be ndarray" +#~ msgstr "argument moet ndarray zijn" + +#~ msgid "matrix dimensions do not match" +#~ msgstr "matrix afmetingen komen niet overeen" + +#~ msgid "norm is defined for 1D and 2D arrays" +#~ msgstr "norm is gedefinieerd voor 1D en 2D arrays" + +#~ msgid "vectors must have same lengths" +#~ msgstr "vectoren moeten van gelijke lengte zijn" + #~ msgid "Nordic Soft Device failure assertion." #~ msgstr "Nordic Soft Device assertion mislukt." @@ -4302,9 +4315,6 @@ msgstr "zi moet vorm (n_section, 2) hebben" #~ msgid "iterables are not of the same length" #~ msgstr "itereerbare objecten hebben niet dezelfde lengte" -#~ msgid "slice step can't be zero" -#~ msgstr "segmentstap mag niet nul zijn" - #~ msgid "Selected CTS pin not valid" #~ msgstr "Geselecteerde CTS pin niet geldig" diff --git a/locale/pl.po b/locale/pl.po index 657a8c5a39..db713e9fd5 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -2421,10 +2421,6 @@ msgstr "" msgid "argument has wrong type" msgstr "argument ma zły typ" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2434,8 +2430,8 @@ msgstr "zła liczba lub typ argumentów" msgid "argument should be a '%q' not a '%q'" msgstr "argument powinien być '%q' a nie '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "" @@ -2464,7 +2460,7 @@ msgstr "atrybuty nie są jeszcze obsługiwane" msgid "axis is out of bounds" msgstr "" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "" @@ -2504,7 +2500,7 @@ msgstr "bits_per_sample musi być 8 lub 16" msgid "branch not in range" msgstr "skok poza zakres" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" @@ -2512,7 +2508,7 @@ msgstr "" msgid "buffer must be a bytes-like object" msgstr "bufor mysi być typu bytes" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2843,6 +2839,10 @@ msgstr "" msgid "differentiation order out of range" msgstr "" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3090,7 +3090,7 @@ msgstr "złe wypełnienie" msgid "index is out of bounds" msgstr "indeks jest poza zakresem" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3160,7 +3160,7 @@ msgstr "" msgid "input must be one-dimensional" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "wejście musi być macierzą kwadratową" @@ -3341,10 +3341,6 @@ msgstr "bufor mapy zbyt mały" msgid "math domain error" msgstr "błąd domeny" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "" @@ -3514,10 +3510,6 @@ msgstr "" msgid "non-zero timeout must be >= interval" msgstr "" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "to nie jest 128-bitowy UUID" @@ -3586,7 +3578,7 @@ msgstr "wymagany obiekt z protokołem buforu" msgid "odd-length string" msgstr "łańcuch o nieparzystej długości" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3641,6 +3633,14 @@ msgstr "ord oczekuje znaku" msgid "ord() expected a character, but string of length %d found" msgstr "ord() oczekuje znaku, a jest łańcuch od długości %d" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "" @@ -3853,7 +3853,7 @@ msgstr "znak jest niedopuszczalny w specyfikacji 'c'" msgid "single '}' encountered in format string" msgstr "pojedynczy '}' w specyfikacji formatu" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "" @@ -3861,6 +3861,10 @@ msgstr "" msgid "sleep length must be non-negative" msgstr "okres snu musi być nieujemny" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "zerowy krok" @@ -4158,10 +4162,6 @@ msgstr "wartość musi mieścić się w %d bajtach" msgid "value_count must be > 0" msgstr "value_count musi być > 0" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "wektory muszą mieć identyczną długość" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "" @@ -4199,6 +4199,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "nieprawidłowy typ wejścia" @@ -4251,6 +4252,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "vectors must have same lengths" +#~ msgstr "wektory muszą mieć identyczną długość" + #~ msgid "first argument must be an iterable" #~ msgstr "pierwszy argument musi być iterowalny" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 7f36df165e..795db07f5f 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -2487,10 +2487,6 @@ msgstr "argsort não é implementado para matrizes achatadas" msgid "argument has wrong type" msgstr "argumento tem tipo errado" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "o argumento deve ser ndarray" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2500,8 +2496,8 @@ msgstr "o argumento num/tipos não combinam" msgid "argument should be a '%q' not a '%q'" msgstr "o argumento deve ser um '%q' e não um '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "os argumentos devem ser ndarrays" @@ -2530,7 +2526,7 @@ msgstr "atributos ainda não suportados" msgid "axis is out of bounds" msgstr "o eixo está fora dos limites" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "eixo deve ser Nenhum ou um número inteiro" @@ -2570,7 +2566,7 @@ msgstr "bits_per_sample deve ser 8 ou 16" msgid "branch not in range" msgstr "ramo fora do alcance" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "o tamanho do buffer é menor do que o tamanho que foi solicitado" @@ -2578,7 +2574,7 @@ msgstr "o tamanho do buffer é menor do que o tamanho que foi solicitado" msgid "buffer must be a bytes-like object" msgstr "o buffer deve ser um objeto como bytes" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "o tamanho do buffer deve ser um múltiplo do tamanho do elemento" @@ -2917,6 +2913,10 @@ msgstr "O argumento diff deve ser um ndarray" msgid "differentiation order out of range" msgstr "ordem de diferenciação fora do alcance" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "as dimensões não coincidem" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3164,7 +3164,7 @@ msgstr "preenchimento incorreto" msgid "index is out of bounds" msgstr "o índice está fora dos limites" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3235,7 +3235,7 @@ msgstr "a entrada deve ser um ndarray" msgid "input must be one-dimensional" msgstr "a entrada deve ser unidimensional" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "a entrada deve ser uma matriz quadrada" @@ -3419,10 +3419,6 @@ msgstr "o mapa do buffer é muito pequeno" msgid "math domain error" msgstr "erro de domínio matemático" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "as dimensões da matriz não coincidem" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "a matriz não é definitiva positiva" @@ -3594,10 +3590,6 @@ msgstr "o tempo limite não zero deve ser > 0.01" msgid "non-zero timeout must be >= interval" msgstr "o tempo limite não zero deve ser >= intervalo" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "a norma é definida para matrizes 1D e 2D" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "não é um UUID com 128 bits" @@ -3666,7 +3658,7 @@ msgstr "é necessário objeto com protocolo do buffer" msgid "odd-length string" msgstr "sequência com comprimento ímpar" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "o offset é muito grande" @@ -3724,6 +3716,14 @@ msgstr "" "o ord() esperava um caractere, porém a sequência do comprimento %d foi " "encontrada" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "fora do alcance da fonte" @@ -3938,7 +3938,7 @@ msgstr "sinal não permitido com o especificador no formato inteiro 'c'" msgid "single '}' encountered in format string" msgstr "único '}' encontrado na string do formato" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "o tamanho é definido apenas para os ndarrays" @@ -3946,6 +3946,10 @@ msgstr "o tamanho é definido apenas para os ndarrays" msgid "sleep length must be non-negative" msgstr "a duração do sleep não deve ser negativo" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "a etapa da fatia não pode ser zero" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "a etapa da fatia não pode ser zero" @@ -4243,10 +4247,6 @@ msgstr "o valor deve caber em %d byte(s)" msgid "value_count must be > 0" msgstr "o value_count deve ser > 0" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "os vetores devem ter os mesmos comprimentos" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "conflito de wakeup" @@ -4284,6 +4284,7 @@ msgstr "índice do eixo errado" msgid "wrong axis specified" msgstr "um eixo errado foi definido" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "tipo da entrada incorreta" @@ -4336,6 +4337,18 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "argument must be ndarray" +#~ msgstr "o argumento deve ser ndarray" + +#~ msgid "matrix dimensions do not match" +#~ msgstr "as dimensões da matriz não coincidem" + +#~ msgid "norm is defined for 1D and 2D arrays" +#~ msgstr "a norma é definida para matrizes 1D e 2D" + +#~ msgid "vectors must have same lengths" +#~ msgstr "os vetores devem ter os mesmos comprimentos" + #~ msgid "Nordic Soft Device failure assertion." #~ msgstr "Declaração de falha do dispositivo Nordic Soft." @@ -4345,18 +4358,12 @@ msgstr "zi deve estar na forma (n_section, 2)" #~ msgid "Unknown soft device error: %04x" #~ msgstr "Erro desconhecido do dispositivo de soft: %04x" -#~ msgid "dimensions do not match" -#~ msgstr "as dimensões não coincidem" - #~ msgid "first argument must be an iterable" #~ msgstr "o primeiro argumento deve ser um iterável" #~ msgid "iterables are not of the same length" #~ msgstr "os iteráveis não têm o mesmo comprimento" -#~ msgid "slice step can't be zero" -#~ msgstr "a etapa da fatia não pode ser zero" - #~ msgid "Selected CTS pin not valid" #~ msgstr "O pino CTS selecionado é inválido" diff --git a/locale/sv.po b/locale/sv.po index bb8da0760e..920aadec30 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -2455,10 +2455,6 @@ msgstr "argsort är inte implementerad för tillplattade matriser" msgid "argument has wrong type" msgstr "argumentet har fel typ" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "argument måste vara ndarray" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2468,8 +2464,8 @@ msgstr "argument antal/typ matchar inte" msgid "argument should be a '%q' not a '%q'" msgstr "argumentet skall vara en '%q', inte en '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "argumenten måste vara ndarray" @@ -2498,7 +2494,7 @@ msgstr "attribut stöds inte än" msgid "axis is out of bounds" msgstr "axis är utanför gränsen" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "axis måste vara None eller ett heltal" @@ -2538,7 +2534,7 @@ msgstr "bits_per_sample måste vara 8 eller 16" msgid "branch not in range" msgstr "branch utanför räckvidd" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "bufferten är mindre än begärd storlek" @@ -2546,7 +2542,7 @@ msgstr "bufferten är mindre än begärd storlek" msgid "buffer must be a bytes-like object" msgstr "buffer måste vara en byte-liknande objekt" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "buffertstorlek måste vara en multipel av elementstorlek" @@ -2881,6 +2877,10 @@ msgstr "argumentet diff måste vara en ndarray" msgid "differentiation order out of range" msgstr "differentieringsordning utanför intervallet" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "dimensioner matchar inte" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3128,7 +3128,7 @@ msgstr "felaktig utfyllnad" msgid "index is out of bounds" msgstr "index är utanför gränserna" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3198,7 +3198,7 @@ msgstr "indata måste vara en ndarray" msgid "input must be one-dimensional" msgstr "indata måste vara endimensionell" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "indata måste vara kvadratmatris" @@ -3382,10 +3382,6 @@ msgstr "map-buffert för liten" msgid "math domain error" msgstr "matematikdomänfel" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "matrisdimensioner matchar inte" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "matrisen är inte positiv bestämd" @@ -3555,10 +3551,6 @@ msgstr "Icke-noll timeout måste vara > 0.01" msgid "non-zero timeout must be >= interval" msgstr "Icke-noll timeout måste vara >= intervall" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "norm är definierad för 1D- och 2D-matriser" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "inte en 128-bitars UUID" @@ -3627,7 +3619,7 @@ msgstr "objekt med buffertprotokoll krävs" msgid "odd-length string" msgstr "sträng har udda längd" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset är för stor" @@ -3682,6 +3674,14 @@ msgstr "ord förväntar sig ett tecken" msgid "ord() expected a character, but string of length %d found" msgstr "ord() förväntade sig ett tecken, men en sträng med längden %d hittades" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "utanför räckvidd för source" @@ -3895,7 +3895,7 @@ msgstr "tecken tillåts inte med heltalsformatspecificeraren 'c'" msgid "single '}' encountered in format string" msgstr "Enkelt '}' påträffades i formatsträngen" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "storlek är enbart definierad ndarrays" @@ -3903,6 +3903,10 @@ msgstr "storlek är enbart definierad ndarrays" msgid "sleep length must be non-negative" msgstr "värdet för sleep måste vara positivt" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "segmentsteg kan inte vara noll" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "segmentsteg kan inte vara noll" @@ -4200,10 +4204,6 @@ msgstr "värdet måste passa i %d byte(s)" msgid "value_count must be > 0" msgstr "value_count måste vara > 0" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "vektorer måste ha samma längd" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "wakeup-konflikt" @@ -4241,6 +4241,7 @@ msgstr "fel axelindex" msgid "wrong axis specified" msgstr "fel axel angiven" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "fel indatatyp" @@ -4293,6 +4294,18 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "argument must be ndarray" +#~ msgstr "argument måste vara ndarray" + +#~ msgid "matrix dimensions do not match" +#~ msgstr "matrisdimensioner matchar inte" + +#~ msgid "norm is defined for 1D and 2D arrays" +#~ msgstr "norm är definierad för 1D- och 2D-matriser" + +#~ msgid "vectors must have same lengths" +#~ msgstr "vektorer måste ha samma längd" + #~ msgid "Nordic Soft Device failure assertion." #~ msgstr "Påståendet om Nordic Soft Device-fel." @@ -4302,18 +4315,12 @@ msgstr "zi måste vara i formen (n_section, 2)" #~ msgid "Unknown soft device error: %04x" #~ msgstr "Okänt mjukvarufel: %04x" -#~ msgid "dimensions do not match" -#~ msgstr "dimensioner matchar inte" - #~ msgid "first argument must be an iterable" #~ msgstr "första argumentet måste vara en iterable" #~ msgid "iterables are not of the same length" #~ msgstr "iterables är inte av samma längd" -#~ msgid "slice step can't be zero" -#~ msgstr "segmentsteg kan inte vara noll" - #~ msgid "Selected CTS pin not valid" #~ msgstr "Vald CTS-pinne är inte giltig" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 2bb05d8e0f..493f6c74b0 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -2453,10 +2453,6 @@ msgstr "wèi wéi pīn hé shù zǔ shí xiàn argsort" msgid "argument has wrong type" msgstr "cānshù lèixíng cuòwù" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "argument must be ndarray" -msgstr "Cānshù bìxū shì ndarray" - #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" @@ -2466,8 +2462,8 @@ msgstr "cānshù biānhào/lèixíng bù pǐpèi" msgid "argument should be a '%q' not a '%q'" msgstr "cānshù yīnggāi shì '%q', 'bùshì '%q'" -#: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/transform/transform.c msgid "arguments must be ndarrays" msgstr "cānshù bìxū shì ndarrays" @@ -2496,7 +2492,7 @@ msgstr "shǔxìng shàngwèi zhīchí" msgid "axis is out of bounds" msgstr "zhóu chāo chū biān jiè" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" msgstr "zhóu bì xū wéi \" wú \" huò zhěng shù" @@ -2536,7 +2532,7 @@ msgstr "měi jiàn yàngběn bìxū wèi 8 huò 16" msgid "branch not in range" msgstr "fēnzhī bùzài fànwéi nèi" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "huǎn chōng qū xiǎo yú qǐng qiú de dà xiǎo" @@ -2544,7 +2540,7 @@ msgstr "huǎn chōng qū xiǎo yú qǐng qiú de dà xiǎo" msgid "buffer must be a bytes-like object" msgstr "huǎnchōng qū bìxū shì zì jié lèi duìxiàng" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "huǎn chōng qū dà xiǎo bì xū shì yuán sù dà xiǎo de bèi shù" @@ -2880,6 +2876,10 @@ msgstr "bùtóng de cānshù bìxū shì ndarray" msgid "differentiation order out of range" msgstr "chā yì shùn xù fàn wéi" +#: extmod/ulab/code/numpy/transform/transform.c +msgid "dimensions do not match" +msgstr "chǐ cùn bù pǐ pèi" + #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" @@ -3127,7 +3127,7 @@ msgstr "bù zhèngquè de tiánchōng" msgid "index is out of bounds" msgstr "suǒyǐn chāochū fànwéi" -#: extmod/ulab/code/numpy/numerical/numerical.c +#: extmod/ulab/code/numpy/numerical/numerical.c extmod/ulab/code/ulab_tools.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" @@ -3197,7 +3197,7 @@ msgstr "shū rù bì xū shì ndarray" msgid "input must be one-dimensional" msgstr "shū rù bì xū shì yì wéi de" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" msgstr "shūrù bìxū wèi fāng jǔzhèn" @@ -3379,10 +3379,6 @@ msgstr "dìtú huǎnchōng qū tài xiǎo" msgid "math domain error" msgstr "shùxué yù cuòwù" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix dimensions do not match" -msgstr "jǔzhèn chǐcùn bù pǐpèi" - #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" msgstr "jǔzhèn bùshì zhèngdìng de" @@ -3552,10 +3548,6 @@ msgstr "fēi líng chāo shí bì xū > 0.01" msgid "non-zero timeout must be >= interval" msgstr "fēi líng chāo shí bì xū wéi >= jiàn gé" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "norm is defined for 1D and 2D arrays" -msgstr "wéi 1D hé 2D shù zǔ dìng yì guī fàn" - #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" msgstr "bùshì 128 wèi UUID" @@ -3624,7 +3616,7 @@ msgstr "xūyào huǎnchōng qū xiéyì de duìxiàng" msgid "odd-length string" msgstr "jīshù zìfú chuàn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "piān yí tài dà" @@ -3679,6 +3671,14 @@ msgstr "ord yùqí zìfú" msgid "ord() expected a character, but string of length %d found" msgstr "ord() yùqí zìfú, dàn chángdù zìfú chuàn %d" +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" msgstr "yuán fàn wéi wài" @@ -3891,7 +3891,7 @@ msgstr "zhěngshù géshì shuōmíng fú 'c' bù yǔnxǔ shǐyòng fúhào" msgid "single '}' encountered in format string" msgstr "zài géshì zìfú chuàn zhōng yù dào de dāngè '}'" -#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" msgstr "dàxiǎo jǐn wèi ndarrays dìngyì" @@ -3899,6 +3899,10 @@ msgstr "dàxiǎo jǐn wèi ndarrays dìngyì" msgid "sleep length must be non-negative" msgstr "shuìmián chángdù bìxū shìfēi fùshù" +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "qiēpiàn bù cháng bùnéng wéi líng" + #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "qiēpiàn bù bùnéng wéi líng" @@ -4196,10 +4200,6 @@ msgstr "Zhí bìxū fúhé %d zì jié" msgid "value_count must be > 0" msgstr "zhí jìshù bìxū wèi > 0" -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "vectors must have same lengths" -msgstr "xiàngliàng bìxū jùyǒu xiāngtóng de chángdù" - #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" msgstr "huàn xǐng chōng tū" @@ -4237,6 +4237,7 @@ msgstr "cuò wù de zhóu suǒ yǐn" msgid "wrong axis specified" msgstr "zhǐ dìng de zhóu cuò wù" +#: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" msgstr "shūrù lèixíng cuòwù" @@ -4289,24 +4290,30 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "argument must be ndarray" +#~ msgstr "Cānshù bìxū shì ndarray" + +#~ msgid "matrix dimensions do not match" +#~ msgstr "jǔzhèn chǐcùn bù pǐpèi" + +#~ msgid "norm is defined for 1D and 2D arrays" +#~ msgstr "wéi 1D hé 2D shù zǔ dìng yì guī fàn" + +#~ msgid "vectors must have same lengths" +#~ msgstr "xiàngliàng bìxū jùyǒu xiāngtóng de chángdù" + #~ msgid "Nordic Soft Device failure assertion." #~ msgstr "Nordic ruǎn shèbèi gùzhàng shēngmíng." #~ msgid "Unknown soft device error: %04x" #~ msgstr "Wèizhī de ruǎn shèbèi cuòwù: %04x" -#~ msgid "dimensions do not match" -#~ msgstr "chǐ cùn bù pǐ pèi" - #~ msgid "first argument must be an iterable" #~ msgstr "dì yī gè cānshù bìxū shì kě diédài de" #~ msgid "iterables are not of the same length" #~ msgstr "kě diédài xiàng de chángdù bùtóng" -#~ msgid "slice step can't be zero" -#~ msgstr "qiēpiàn bù cháng bùnéng wéi líng" - #~ msgid "Selected CTS pin not valid" #~ msgstr "Suǒ xuǎn de CTS yǐn jiǎo wúxiào" From 8b6ffba392b71961e793b45be8b2e2090f203e9c Mon Sep 17 00:00:00 2001 From: sabas1080 Date: Sun, 4 Apr 2021 11:10:32 -0500 Subject: [PATCH 209/261] Update comment --- ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk index f3f14df9e5..43a0d38d7d 100644 --- a/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk +++ b/ports/atmel-samd/boards/huntercat_nfc/mpconfigboard.mk @@ -11,9 +11,6 @@ SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" LONGINT_IMPL = MPZ -# A number of modules are removed for HunterCatNFC to make room for frozen libraries. -# Many I/O functions are not available. -# math is very large and is also removed. CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANGIO = 0 CIRCUITPY_BITMAPTOOLS = 0 From 234fa2a2264842f8445385e809ab392f002af8ea Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 4 Apr 2021 11:15:17 -0500 Subject: [PATCH 210/261] decompress: Fix decompression when length takes 7 bits This manifested as incorrect error messages from mpy-cross, like ``` $ mpy-cross doesnotexist.py OSError: [Errno 2] cno such file/director ``` The remaining bits in `b` must be shifted to the correct position before entering the loop. For most (all?) actual builds, compress_max_length_bits was 8 and the problem went unnoticed. --- supervisor/shared/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervisor/shared/translate.c b/supervisor/shared/translate.c index 54135a4935..c99cbf180d 100644 --- a/supervisor/shared/translate.c +++ b/supervisor/shared/translate.c @@ -86,7 +86,7 @@ uint16_t decompress_length(const compressed_string_t *compressed) { char *decompress(const compressed_string_t *compressed, char *decompressed) { uint8_t this_byte = compress_max_length_bits / 8; uint8_t this_bit = 7 - compress_max_length_bits % 8; - uint8_t b = (&compressed->data)[this_byte]; + uint8_t b = (&compressed->data)[this_byte] << (compress_max_length_bits % 8); uint16_t length = decompress_length(compressed); // Stop one early because the last byte is always NULL. From bcd90dd9273f5305b7efa05d7ff5b199fd21d7d2 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 4 Apr 2021 13:47:55 -0500 Subject: [PATCH 211/261] IncrementalEncoder: There are no out pins. Closes #4556 --- ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index 30b3ac619e..ee49f4e321 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -71,7 +71,7 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode encoder, MP_ARRAY_SIZE(encoder), 1000000, encoder_init, MP_ARRAY_SIZE(encoder_init), // init - NULL, 1, 0, 0xffffffff, // out pin + NULL, 0, 0, 0, // out pin pin_a, 2, // in pins 3, 0, // in pulls NULL, 0, 0, 0x1f, // set pins From 93d6ceedd9ab313f4efa7df5886099039fc23165 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 4 Apr 2021 13:48:10 -0500 Subject: [PATCH 212/261] IncrementalEncoder: Disconnect interrupt handler during deinit. Closes: #4557 --- ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index ee49f4e321..5c61e0915c 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -101,6 +101,7 @@ void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_o if (common_hal_rotaryio_incrementalencoder_deinited(self)) { return; } + common_hal_rp2pio_statemachine_set_interrupt_handler(&self->state_machine, NULL, NULL, 0); common_hal_rp2pio_statemachine_deinit(&self->state_machine); } From fc86475de58581bd48d67ecc733377a5ed713367 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 4 Apr 2021 13:48:47 -0500 Subject: [PATCH 213/261] IncrementalEncoder: support swapped pins Closes: #4422 --- .../common-hal/rotaryio/IncrementalEncoder.c | 15 +++++++++++---- .../common-hal/rotaryio/IncrementalEncoder.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index 5c61e0915c..faef077972 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -60,10 +60,17 @@ STATIC void incrementalencoder_interrupt_handler(void *self_in); void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencoder_obj_t *self, const mcu_pin_obj_t *pin_a, const mcu_pin_obj_t *pin_b) { mp_obj_t pins[] = {MP_OBJ_FROM_PTR(pin_a), MP_OBJ_FROM_PTR(pin_b)}; + bool swap = false; if (!common_hal_rp2pio_pins_are_sequential(2, pins)) { - mp_raise_RuntimeError(translate("Pins must be sequential")); + pins[0] = MP_OBJ_FROM_PTR(pin_b); + pins[1] = MP_OBJ_FROM_PTR(pin_a); + swap = true; + if (!common_hal_rp2pio_pins_are_sequential(2, pins)) { + mp_raise_RuntimeError(translate("Pins must be sequential")); + } } + self->swap = swap; self->position = 0; self->quarter_count = 0; @@ -72,7 +79,7 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode 1000000, encoder_init, MP_ARRAY_SIZE(encoder_init), // init NULL, 0, 0, 0, // out pin - pin_a, 2, // in pins + pins[0], 2, // in pins 3, 0, // in pulls NULL, 0, 0, 0x1f, // set pins NULL, 0, 0, 0x1f, // sideset pins @@ -106,12 +113,12 @@ void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_o } mp_int_t common_hal_rotaryio_incrementalencoder_get_position(rotaryio_incrementalencoder_obj_t *self) { - return self->position; + return self->swap ? -self->position : self->position; } void common_hal_rotaryio_incrementalencoder_set_position(rotaryio_incrementalencoder_obj_t *self, mp_int_t new_position) { - self->position = new_position; + self->position = self->swap ? -new_position : new_position; } STATIC void incrementalencoder_interrupt_handler(void *self_in) { diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h index 83fe97d316..d74c21035e 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h @@ -37,4 +37,5 @@ typedef struct { uint8_t last_state : 4; // int8_t quarter_count : 4; // count intermediate transitions between detents mp_int_t position; + bool swap; } rotaryio_incrementalencoder_obj_t; From 0357af17269d55bd0ac30aa677f26a27637bd09e Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 4 Apr 2021 14:07:28 -0400 Subject: [PATCH 214/261] Put mouse before gamepad due to MacOS being finicky --- tools/gen_usb_descriptor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/gen_usb_descriptor.py b/tools/gen_usb_descriptor.py index 9c4efaca3d..1fad2fbeb3 100644 --- a/tools/gen_usb_descriptor.py +++ b/tools/gen_usb_descriptor.py @@ -17,9 +17,11 @@ ALL_DEVICES = "CDC CDC2 MSC AUDIO HID VENDOR" ALL_DEVICES_SET = frozenset(ALL_DEVICES.split()) DEFAULT_DEVICES = "CDC MSC AUDIO HID" +# This list is in preferred order. MacOS does not like GAMEPAD coming before MOUSE. ALL_HID_DEVICES = ( "KEYBOARD MOUSE CONSUMER SYS_CONTROL GAMEPAD DIGITIZER XAC_COMPATIBLE_GAMEPAD RAW" ) +ALL_HID_DEVICES_ORDER = dict((name, idx) for (idx, name) in enumerate(ALL_HID_DEVICES.split())) ALL_HID_DEVICES_SET = frozenset(ALL_HID_DEVICES.split()) # Digitizer works on Linux but conflicts with mouse, so omit it. DEFAULT_HID_DEVICES = "KEYBOARD MOUSE CONSUMER GAMEPAD" @@ -352,7 +354,8 @@ if include_hid: else: report_id = 1 concatenated_descriptors = bytearray() - for name in args.hid_devices: + # Sort HID devices by preferred order. + for name in sorted(args.hid_devices, key=ALL_HID_DEVICES_ORDER.get): concatenated_descriptors.extend( bytes(hid_report_descriptors.REPORT_DESCRIPTOR_FUNCTIONS[name](report_id)) ) From 3e558a89ac20f37820289f9f3830a5b87fc84f6d Mon Sep 17 00:00:00 2001 From: Brian Dean Date: Mon, 5 Apr 2021 10:44:52 -0400 Subject: [PATCH 215/261] boards/bdmicro_vina_d51: A few updates for flexibility and expansion. ESP-01 header renamed to AUX, and expanded to 12 pins from 8 pins. Pins 1-8 still accommodate the ESP-01, with expansion to full SERCOM 4-pad support to allow for SPI and I2C on that expansion port with additional GPIO control. Update pins.c with additional signals provided AUX_1-8, along with UART, SPI, I2C name usage as aliases to appropriate AUX_1-8 signals. Additionally, add several alternate names specific to several expansion modules - the ESP-01, and the ATW-01 using the WINC_1500 (SPI) w/interrupt and control needed for the WINC - with assignments to module pin positions. Re-work SERCOM assignments to accommodate the above from other parts of the board, which required moving a SERCOM or two around in order to accommodate the 4-pad sercom pin mapping on the AUX port. Built and tested using latest from 'main': Adafruit CircuitPython 6.2.0-rc.0-70-ga1562430f-dirty on 2021-04-05; BDMICRO VINA-D51 with samd51n20 --- .../boards/bdmicro_vina_d51/board.c | 10 +-- .../boards/bdmicro_vina_d51/mpconfigboard.h | 8 +-- .../atmel-samd/boards/bdmicro_vina_d51/pins.c | 68 ++++++++++++------- 3 files changed, 49 insertions(+), 37 deletions(-) diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/board.c b/ports/atmel-samd/boards/bdmicro_vina_d51/board.c index bb6ad8bc0d..7af05ba45a 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/board.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/board.c @@ -26,17 +26,9 @@ #include "supervisor/board.h" #include "mpconfigboard.h" +#include "hal/include/hal_gpio.h" void board_init(void) { - // struct port_config pin_conf; - // port_get_config_defaults(&pin_conf); - // - // pin_conf.direction = PORT_PIN_DIR_OUTPUT; - // port_pin_set_config(MICROPY_HW_LED_TX, &pin_conf); - // port_pin_set_output_level(MICROPY_HW_LED_TX, true); - // - // port_pin_set_config(MICROPY_HW_LED_RX, &pin_conf); - // port_pin_set_output_level(MICROPY_HW_LED_RX, true); } bool board_requests_safe_mode(void) { diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h index 8b015df05e..0fb27eaee4 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h @@ -12,13 +12,13 @@ #define BOARD_HAS_CRYSTAL 1 -#define DEFAULT_I2C_BUS_SCL (&pin_PA16) -#define DEFAULT_I2C_BUS_SDA (&pin_PA17) -#define DEFAULT_UART_BUS_RX (&pin_PB20) +#define DEFAULT_I2C_BUS_SCL (&pin_PA12) +#define DEFAULT_I2C_BUS_SDA (&pin_PA13) #define DEFAULT_UART_BUS_TX (&pin_PB21) +#define DEFAULT_UART_BUS_RX (&pin_PB20) +#define DEFAULT_SPI_BUS_SCK (&pin_PC28) #define DEFAULT_SPI_BUS_MISO (&pin_PB23) #define DEFAULT_SPI_BUS_MOSI (&pin_PC27) -#define DEFAULT_SPI_BUS_SCK (&pin_PC28) #define MICROPY_HW_LED_STATUS (&pin_PA23) #define MICROPY_HW_LED_RX (&pin_PC05) #define MICROPY_HW_LED_TX (&pin_PC06) diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c index 8eeab8a9a5..871345257a 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c @@ -13,6 +13,42 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) }, { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB05) }, { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB06) }, + { MP_ROM_QSTR(MP_QSTR_AUX_1), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_AUX_UART_TX), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_AUX_SPI_MOSI), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_AUX_I2C_SDA), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_ATW01_MOSI), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_AUX_10), MP_ROM_PTR(&pin_PC01) }, + { MP_ROM_QSTR(MP_QSTR_ATW01_IRQ), MP_ROM_PTR(&pin_PC01) }, + { MP_ROM_QSTR(MP_QSTR_AUX_11), MP_ROM_PTR(&pin_PC10) }, + { MP_ROM_QSTR(MP_QSTR_ATW01_GPIO_3), MP_ROM_PTR(&pin_PC10) }, + { MP_ROM_QSTR(MP_QSTR_AUX_12), MP_ROM_PTR(&pin_PC11) }, + { MP_ROM_QSTR(MP_QSTR_ATW01_GPIO_1), MP_ROM_PTR(&pin_PC11) }, + { MP_ROM_QSTR(MP_QSTR_AUX_3), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_AUX_UART_RTS), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_AUX_SPI_SS), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_ATW01_SS), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_GPIO0), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_AUX_4), MP_ROM_PTR(&pin_PC14) }, + { MP_ROM_QSTR(MP_QSTR_ATW01_RESET), MP_ROM_PTR(&pin_PC14) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC14) }, + { MP_ROM_QSTR(MP_QSTR_AUX_5), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_AUX_UART_CTS), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_AUX_SPI_MISO), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_ATW01_MISO), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_GPIO2), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_AUX_6), MP_ROM_PTR(&pin_PC15) }, + { MP_ROM_QSTR(MP_QSTR_ATW01_EN), MP_ROM_PTR(&pin_PC15) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_CH_PD), MP_ROM_PTR(&pin_PC15) }, + { MP_ROM_QSTR(MP_QSTR_AUX_8), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_AUX_UART_RX), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_AUX_SPI_SCK), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_AUX_I2C_SCL), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_ATW01_SCK), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_AUX_9), MP_ROM_PTR(&pin_PA27) }, + { MP_ROM_QSTR(MP_QSTR_ATW01_WAKE), MP_ROM_PTR(&pin_PA27) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB31) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC16) }, { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PC13) }, @@ -30,26 +66,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PC12) }, { MP_ROM_QSTR(MP_QSTR_DAC0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_PA05) }, - { MP_ROM_QSTR(MP_QSTR_ESP01_EN), MP_ROM_PTR(&pin_PC15) }, - { MP_ROM_QSTR(MP_QSTR_E5), MP_ROM_PTR(&pin_PC15) }, - { MP_ROM_QSTR(MP_QSTR_ESP01_GPIO0), MP_ROM_PTR(&pin_PA18) }, - { MP_ROM_QSTR(MP_QSTR_E3), MP_ROM_PTR(&pin_PA18) }, - { MP_ROM_QSTR(MP_QSTR_ESP01_GPIO2), MP_ROM_PTR(&pin_PA19) }, - { MP_ROM_QSTR(MP_QSTR_E4), MP_ROM_PTR(&pin_PA19) }, - { MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC14) }, - { MP_ROM_QSTR(MP_QSTR_E6), MP_ROM_PTR(&pin_PC14) }, - { MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PA12) }, - { MP_ROM_QSTR(MP_QSTR_UART3_RX), MP_ROM_PTR(&pin_PA12) }, - { MP_ROM_QSTR(MP_QSTR_I2C3_SCL), MP_ROM_PTR(&pin_PA12) }, - { MP_ROM_QSTR(MP_QSTR_E2), MP_ROM_PTR(&pin_PA12) }, - { MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PA13) }, - { MP_ROM_QSTR(MP_QSTR_UART3_TX), MP_ROM_PTR(&pin_PA13) }, - { MP_ROM_QSTR(MP_QSTR_I2C3_SDA), MP_ROM_PTR(&pin_PA13) }, - { MP_ROM_QSTR(MP_QSTR_E1), MP_ROM_PTR(&pin_PA13) }, - { MP_ROM_QSTR(MP_QSTR_I2C1_SCL), MP_ROM_PTR(&pin_PA16) }, - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA16) }, - { MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA17) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_I2C1_SCL), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_I2S_FS_0), MP_ROM_PTR(&pin_PA20) }, { MP_ROM_QSTR(MP_QSTR_I2S_MCK_0), MP_ROM_PTR(&pin_PB17) }, { MP_ROM_QSTR(MP_QSTR_I2S_SCK_0), MP_ROM_PTR(&pin_PB16) }, @@ -65,13 +85,13 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_RS485_RX), MP_ROM_PTR(&pin_PB03) }, { MP_ROM_QSTR(MP_QSTR_RS485_TE), MP_ROM_PTR(&pin_PB00) }, { MP_ROM_QSTR(MP_QSTR_RS485_TX), MP_ROM_PTR(&pin_PB02) }, - { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_SPI1_MISO), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB23) }, - { MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_PC27) }, + { MP_ROM_QSTR(MP_QSTR_SPI1_MOSI), MP_ROM_PTR(&pin_PC27) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PC27) }, - { MP_ROM_QSTR(MP_QSTR_SPI_SCK), MP_ROM_PTR(&pin_PC28) }, + { MP_ROM_QSTR(MP_QSTR_SPI1_SCK), MP_ROM_PTR(&pin_PC28) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PC28) }, - { MP_ROM_QSTR(MP_QSTR_SPI_SS), MP_ROM_PTR(&pin_PB22) }, + { MP_ROM_QSTR(MP_QSTR_SPI1_SS), MP_ROM_PTR(&pin_PB22) }, { MP_ROM_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PB22) }, { MP_ROM_QSTR(MP_QSTR_UART1_CTS), MP_ROM_PTR(&pin_PC25) }, { MP_ROM_QSTR(MP_QSTR_UART1_RTS), MP_ROM_PTR(&pin_PC24) }, From 989f9b52be43ff14583e22a61f62b543794bcb62 Mon Sep 17 00:00:00 2001 From: Jose David M Date: Mon, 5 Apr 2021 02:19:22 +0000 Subject: [PATCH 216/261] Translated using Weblate (Spanish) Currently translated at 100.0% (967 of 967 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/es.po b/locale/es.po index d0c4562c80..e70ad3e339 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-04-03 21:57+0000\n" +"PO-Revision-Date: 2021-04-05 22:35+0000\n" "Last-Translator: Jose David M \n" "Language-Team: \n" "Language: es\n" @@ -3708,11 +3708,11 @@ msgstr "ord() espera un carácter, pero encontró un string de longitud %d" #: extmod/ulab/code/utils/utils.c msgid "out array is too small" -msgstr "" +msgstr "La matriz de salida es demasiado pequeña" #: extmod/ulab/code/utils/utils.c msgid "out must be a float dense array" -msgstr "" +msgstr "la matriz de salida debe ser densa de números float" #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" From 334a1e3ba68ed104edf5231961a71bbcd6bc6494 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Sun, 4 Apr 2021 07:27:53 +0000 Subject: [PATCH 217/261] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (967 of 967 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 795db07f5f..db88a7d2e2 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-04-01 14:50+0000\n" +"PO-Revision-Date: 2021-04-05 22:35+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -1622,11 +1622,11 @@ msgstr "Não há um temporizador disponível" #: supervisor/shared/safe_mode.c msgid "Nordic system firmware failure assertion." -msgstr "" +msgstr "Declaração de falha do firmware do sistema nórdico." #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic system firmware out of memory" -msgstr "" +msgstr "O firmware do sistema nórdico está sem memória" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -2310,7 +2310,7 @@ msgstr "Erro de segurança desconhecido: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown system firmware error: %04x" -msgstr "" +msgstr "Erro desconhecido do firmware: %04x" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format @@ -3718,11 +3718,11 @@ msgstr "" #: extmod/ulab/code/utils/utils.c msgid "out array is too small" -msgstr "" +msgstr "a matriz externa é muito pequena" #: extmod/ulab/code/utils/utils.c msgid "out must be a float dense array" -msgstr "" +msgstr "deve ser uma matriz densa flutuante" #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" From 322174a4926ceb7bcdac93dc6379da2011285fe1 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Sun, 4 Apr 2021 18:32:44 +0000 Subject: [PATCH 218/261] Translated using Weblate (Swedish) Currently translated at 100.0% (967 of 967 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 920aadec30..019c4da2a8 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-04-03 21:57+0000\n" +"PO-Revision-Date: 2021-04-05 22:35+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -3676,11 +3676,11 @@ msgstr "ord() förväntade sig ett tecken, men en sträng med längden %d hittad #: extmod/ulab/code/utils/utils.c msgid "out array is too small" -msgstr "" +msgstr "matrisen för out är för liten" #: extmod/ulab/code/utils/utils.c msgid "out must be a float dense array" -msgstr "" +msgstr "out måste vara en float dense array" #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" From 1c98b823b630292f0820448c674db246c03c8749 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 6 Apr 2021 00:35:50 +0200 Subject: [PATCH 219/261] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 9 +++++++++ locale/cs.po | 9 +++++++++ locale/de_DE.po | 9 +++++++++ locale/el.po | 9 +++++++++ locale/en_GB.po | 9 +++++++++ locale/es.po | 9 +++++++++ locale/fil.po | 9 +++++++++ locale/fr.po | 9 +++++++++ locale/hi.po | 9 +++++++++ locale/it_IT.po | 9 +++++++++ locale/ja.po | 9 +++++++++ locale/ko.po | 9 +++++++++ locale/nl.po | 9 +++++++++ locale/pl.po | 9 +++++++++ locale/pt_BR.po | 9 +++++++++ locale/sv.po | 9 +++++++++ locale/zh_Latn_pinyin.po | 9 +++++++++ 17 files changed, 153 insertions(+) diff --git a/locale/ID.po b/locale/ID.po index a1bad8cd14..2592a4e40d 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -416,6 +416,10 @@ msgstr "AnalogOut hanya 16 bit. Nilai harus kurang dari 65536." msgid "AnalogOut not supported on given pin" msgstr "pin yang dipakai tidak mendukung AnalogOut" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -532,6 +536,7 @@ msgid "Buffer is too small" msgstr "Buffer terlalu kecil" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "Panjang buffer %d terlalu besar. Itu harus kurang dari %d" @@ -993,6 +998,10 @@ msgstr "" msgid "Failed to allocate wifi scan memory" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "Gagal terhubung: kesalahan internal" diff --git a/locale/cs.po b/locale/cs.po index be7c3b8ffc..654023f1f5 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -414,6 +414,10 @@ msgstr "" msgid "AnalogOut not supported on given pin" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -528,6 +532,7 @@ msgid "Buffer is too small" msgstr "" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "" @@ -977,6 +982,10 @@ msgstr "" msgid "Failed to allocate wifi scan memory" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 705be127bd..e3e2ddbd45 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -420,6 +420,10 @@ msgstr "AnalogOut kann nur 16 Bit. Der Wert muss unter 65536 liegen." msgid "AnalogOut not supported on given pin" msgstr "AnalogOut ist an diesem Pin nicht unterstützt" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -538,6 +542,7 @@ msgid "Buffer is too small" msgstr "Der Puffer ist zu klein" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "Die Pufferlänge %d ist zu groß. Sie muss kleiner als %d sein" @@ -995,6 +1000,10 @@ msgstr "Zuweisung des Wifi Speichers ist fehlgeschlagen" msgid "Failed to allocate wifi scan memory" msgstr "Zuweisung des Wifi Scan Speichers ist fehlgeschlagen" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "Verbindung fehlgeschlagen: interner Fehler" diff --git a/locale/el.po b/locale/el.po index fc9cdfc40e..1f7fabf381 100644 --- a/locale/el.po +++ b/locale/el.po @@ -411,6 +411,10 @@ msgstr "" msgid "AnalogOut not supported on given pin" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -525,6 +529,7 @@ msgid "Buffer is too small" msgstr "" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "" @@ -974,6 +979,10 @@ msgstr "" msgid "Failed to allocate wifi scan memory" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 061e057c69..135f738872 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -420,6 +420,10 @@ msgstr "AnalogOut is only 16 bits. Value must be less than 65536." msgid "AnalogOut not supported on given pin" msgstr "AnalogOut not supported on given pin" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -537,6 +541,7 @@ msgid "Buffer is too small" msgstr "Buffer is too small" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "Buffer length %d too big. It must be less than %d" @@ -990,6 +995,10 @@ msgstr "Failed to allocate WiFi memory" msgid "Failed to allocate wifi scan memory" msgstr "Failed to allocate WiFi scan memory" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "Failed to connect: internal error" diff --git a/locale/es.po b/locale/es.po index e70ad3e339..2f7a7a7b9c 100644 --- a/locale/es.po +++ b/locale/es.po @@ -424,6 +424,10 @@ msgstr "AnalogOut es solo de 16 bits. El valor debe ser menor que 65536." msgid "AnalogOut not supported on given pin" msgstr "El pin proporcionado no soporta AnalogOut" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -543,6 +547,7 @@ msgid "Buffer is too small" msgstr "El buffer es muy pequeño" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "Longitud del buffer %d es demasiado grande. Tiene que ser menor a %d" @@ -1000,6 +1005,10 @@ msgstr "Fallo al tomar memoria Wifi" msgid "Failed to allocate wifi scan memory" msgstr "Fallo al tomar memoria para búsqueda wifi" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "Error al conectar: error interno" diff --git a/locale/fil.po b/locale/fil.po index eadfdba95f..23d1be9718 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -414,6 +414,10 @@ msgstr "AnalogOut ay 16 bits. Value ay dapat hindi hihigit pa sa 65536." msgid "AnalogOut not supported on given pin" msgstr "Hindi supportado ang AnalogOut sa ibinigay na pin" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -530,6 +534,7 @@ msgid "Buffer is too small" msgstr "" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "" @@ -987,6 +992,10 @@ msgstr "" msgid "Failed to allocate wifi scan memory" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 53de19c335..19d98f770a 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -424,6 +424,10 @@ msgstr "" msgid "AnalogOut not supported on given pin" msgstr "'AnalogOut' n'est pas supporté sur la broche indiquée" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -542,6 +546,7 @@ msgid "Buffer is too small" msgstr "Le tampon est trop petit" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "La longueur du tampon %d est trop grande. Il doit être inférieur à %d" @@ -1007,6 +1012,10 @@ msgstr "Impossible d’allouer la mémoire pour Wifi" msgid "Failed to allocate wifi scan memory" msgstr "Impossible d'allouer la mémoire pour le scan wifi" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "Impossible de se connecter : erreur interne" diff --git a/locale/hi.po b/locale/hi.po index cec73d3127..388a85472b 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -411,6 +411,10 @@ msgstr "" msgid "AnalogOut not supported on given pin" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -525,6 +529,7 @@ msgid "Buffer is too small" msgstr "" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "" @@ -974,6 +979,10 @@ msgstr "" msgid "Failed to allocate wifi scan memory" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 5238d74c8f..241b07d7ec 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -423,6 +423,10 @@ msgstr "AnalogOut ha solo 16 bit. Il valore deve essere meno di 65536." msgid "AnalogOut not supported on given pin" msgstr "AnalogOut non supportato sul pin scelto" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -540,6 +544,7 @@ msgid "Buffer is too small" msgstr "Buffer troppo piccolo" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "Lunghezza Buffer %d troppo grande. Deve essere meno di %d" @@ -996,6 +1001,10 @@ msgstr "" msgid "Failed to allocate wifi scan memory" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 07e5fd0f8e..e2b5d926af 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -416,6 +416,10 @@ msgstr "AnalogOutは16ビットです。値は65536以下でなければなり msgid "AnalogOut not supported on given pin" msgstr "指定のピンはAnalogOutに対応していません" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -532,6 +536,7 @@ msgid "Buffer is too small" msgstr "バッファが小さすぎます" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "バッファ長%dは大きすぎます。%d以下でなければなりません" @@ -985,6 +990,10 @@ msgstr "Wi-Fiのメモリの確保に失敗" msgid "Failed to allocate wifi scan memory" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "接続失敗: 内部エラー" diff --git a/locale/ko.po b/locale/ko.po index 381ee18a34..3b8eeebe6d 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -412,6 +412,10 @@ msgstr "" msgid "AnalogOut not supported on given pin" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -528,6 +532,7 @@ msgid "Buffer is too small" msgstr "" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "" @@ -977,6 +982,10 @@ msgstr "" msgid "Failed to allocate wifi scan memory" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 7f468cfa07..3285f52150 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -414,6 +414,10 @@ msgstr "AnalogOut is slechts 16 bits. Waarde moet minder dan 65536 zijn." msgid "AnalogOut not supported on given pin" msgstr "AnalogOut niet ondersteund door gegeven pin" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -530,6 +534,7 @@ msgid "Buffer is too small" msgstr "Buffer is te klein" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "Buffer lengte %d te groot. Het moet kleiner zijn dan %d" @@ -985,6 +990,10 @@ msgstr "Kon WiFi geheugen niet toewijzen" msgid "Failed to allocate wifi scan memory" msgstr "Kon WiFi scan geheugen niet toewijzen" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "Verbinding mislukt: interne fout" diff --git a/locale/pl.po b/locale/pl.po index db713e9fd5..295901c994 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -416,6 +416,10 @@ msgstr "AnalogOut ma 16 bitów. Wartość musi być mniejsza od 65536." msgid "AnalogOut not supported on given pin" msgstr "AnalogOut niewspierany na tej nóżce" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -532,6 +536,7 @@ msgid "Buffer is too small" msgstr "Bufor jest za mały" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "Długość %d bufora jest za duża. Musi być mniejsza niż %d" @@ -985,6 +990,10 @@ msgstr "" msgid "Failed to allocate wifi scan memory" msgstr "" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "Nie udało się połączyć: błąd wewnętrzny" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index db88a7d2e2..19a27387a1 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -424,6 +424,10 @@ msgstr "O AnalogOut é de apenas 16 bits. O valor deve ser menor que 65536." msgid "AnalogOut not supported on given pin" msgstr "Saída analógica não suportada no pino fornecido" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -544,6 +548,7 @@ msgid "Buffer is too small" msgstr "O buffer é muito pequeno" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "O tamanho do buffer %d é muito grande. Deve ser menor que %d" @@ -1003,6 +1008,10 @@ msgstr "Houve uma falha na alocação da memória do Wifi" msgid "Failed to allocate wifi scan memory" msgstr "Houve uma falha na alocação da memória para a varredura do Wifi" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "Falha ao conectar: erro interno" diff --git a/locale/sv.po b/locale/sv.po index 019c4da2a8..0c607759d6 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -419,6 +419,10 @@ msgstr "AnalogOut hanterar bara 16 bitar. Värdet måste vara mindre än 65536." msgid "AnalogOut not supported on given pin" msgstr "AnalogOut stöds inte på angiven pinne" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -535,6 +539,7 @@ msgid "Buffer is too small" msgstr "Bufferten är för liten" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "Buffertlängd %d för stor. Den måste vara mindre än %d" @@ -991,6 +996,10 @@ msgstr "Det gick inte att allokera WiFi-minne" msgid "Failed to allocate wifi scan memory" msgstr "Det gick inte att allokera minne för WiFi-scanning" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "Det gick inte att ansluta: internt fel" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 493f6c74b0..14c0a9eca0 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -421,6 +421,10 @@ msgstr "AnalogOut jǐn wèi 16 wèi. Zhí bìxū xiǎoyú 65536." msgid "AnalogOut not supported on given pin" msgstr "Wèi zhīchí zhǐdìng de yǐn jiǎo AnalogOut" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" @@ -537,6 +541,7 @@ msgid "Buffer is too small" msgstr "Huǎnchōng qū tài xiǎo" #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" msgstr "Huǎnchōng qū chángdù%d tài dà. Tā bìxū xiǎoyú%d" @@ -990,6 +995,10 @@ msgstr "Wúfǎ fēnpèi Wifi nèicún" msgid "Failed to allocate wifi scan memory" msgstr "Wúfǎ fēnpèi wifi sǎomiáo nèicún" +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" msgstr "Liánjiē shībài: Nèibù cuòwù" From 71eabe814cc11de2c7ba8d3b9b7ebe65a4a008fa Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 5 Apr 2021 16:17:08 -0700 Subject: [PATCH 220/261] Update StateMachine.c --- ports/raspberrypi/bindings/rp2pio/StateMachine.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.c b/ports/raspberrypi/bindings/rp2pio/StateMachine.c index 9464159498..fe36423256 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.c +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.c @@ -55,8 +55,7 @@ //| This class is designed to facilitate sharing of PIO resources. By default, //| it is assumed that the state machine is used on its own and can be placed //| in either PIO. State machines with the same program will be placed in the -//| same PIO if possible. To ensure multiple state machines share a PIO use -//| the ``colocate`` kwarg during construction and create them one after another.""" +//| same PIO if possible.""" //| //| def __init__(self, //| program: ReadableBuffer, @@ -87,7 +86,6 @@ //| auto_push: bool = False, //| push_threshold : int = 32, //| in_shift_right : bool = True) -> None: -// //| colocate: Union[int, StateMachine, None] = None //| //| """Construct a StateMachine object on the given pins with the given program. //| From 8958c1e227d87e21ef06f61ab8fb3df4dcc96367 Mon Sep 17 00:00:00 2001 From: James Carr Date: Tue, 6 Apr 2021 10:47:46 +0100 Subject: [PATCH 221/261] Minor documentation fixes in displayio --- shared-bindings/displayio/FourWire.c | 2 +- shared-bindings/displayio/I2CDisplay.c | 2 +- shared-bindings/displayio/ParallelBus.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c index d87f2421da..3ba55a4470 100644 --- a/shared-bindings/displayio/FourWire.c +++ b/shared-bindings/displayio/FourWire.c @@ -48,7 +48,7 @@ //| The SPI bus and pins are then in use by the display until `displayio.release_displays()` is //| called even after a reload. (It does this so CircuitPython can use the display after your code //| is done.) So, the first time you initialize a display bus in code.py you should call -//| :py:func`displayio.release_displays` first, otherwise it will error after the first code.py run. +//| :py:func:`displayio.release_displays` first, otherwise it will error after the first code.py run. //| //| :param busio.SPI spi_bus: The SPI bus that make up the clock and data lines //| :param microcontroller.Pin command: Data or command pin diff --git a/shared-bindings/displayio/I2CDisplay.c b/shared-bindings/displayio/I2CDisplay.c index 2f27c7b5d7..ae0948b879 100644 --- a/shared-bindings/displayio/I2CDisplay.c +++ b/shared-bindings/displayio/I2CDisplay.c @@ -48,7 +48,7 @@ //| The I2C bus and pins are then in use by the display until `displayio.release_displays()` is //| called even after a reload. (It does this so CircuitPython can use the display after your code //| is done.) So, the first time you initialize a display bus in code.py you should call -//| :py:func`displayio.release_displays` first, otherwise it will error after the first code.py run. +//| :py:func:`displayio.release_displays` first, otherwise it will error after the first code.py run. //| //| :param busio.I2C i2c_bus: The I2C bus that make up the clock and data lines //| :param int device_address: The I2C address of the device diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c index 7391078a62..084628328d 100644 --- a/shared-bindings/displayio/ParallelBus.c +++ b/shared-bindings/displayio/ParallelBus.c @@ -49,7 +49,7 @@ //| The parallel bus and pins are then in use by the display until `displayio.release_displays()` //| is called even after a reload. (It does this so CircuitPython can use the display after your //| code is done.) So, the first time you initialize a display bus in code.py you should call -//| :py:func`displayio.release_displays` first, otherwise it will error after the first code.py run. +//| :py:func:`displayio.release_displays` first, otherwise it will error after the first code.py run. //| //| :param microcontroller.Pin data0: The first data pin. The rest are implied //| :param microcontroller.Pin command: Data or command pin From 1a163dd70dff0bcc77faa5a81ca6ff9dbca5f770 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 6 Apr 2021 09:19:09 -0500 Subject: [PATCH 222/261] mimxrt10xx: enable adafruit_bus_device in core --- ports/mimxrt10xx/mpconfigport.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/mimxrt10xx/mpconfigport.mk b/ports/mimxrt10xx/mpconfigport.mk index 89c6d8c941..49fc4a2aaa 100644 --- a/ports/mimxrt10xx/mpconfigport.mk +++ b/ports/mimxrt10xx/mpconfigport.mk @@ -24,6 +24,7 @@ INTERNAL_FLASH_FILESYSTEM = 1 CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_BUSDEVICE = 1 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NVM = 0 From 1a2ce27b73bb717c3e3832358ee1a3f6e304494c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 6 Apr 2021 09:21:58 -0500 Subject: [PATCH 223/261] raspberrypi: Drop support for auto-reversing swapped encoder --- ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c | 7 ++----- ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index faef077972..a3cf05ca65 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -60,17 +60,14 @@ STATIC void incrementalencoder_interrupt_handler(void *self_in); void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencoder_obj_t *self, const mcu_pin_obj_t *pin_a, const mcu_pin_obj_t *pin_b) { mp_obj_t pins[] = {MP_OBJ_FROM_PTR(pin_a), MP_OBJ_FROM_PTR(pin_b)}; - bool swap = false; if (!common_hal_rp2pio_pins_are_sequential(2, pins)) { pins[0] = MP_OBJ_FROM_PTR(pin_b); pins[1] = MP_OBJ_FROM_PTR(pin_a); - swap = true; if (!common_hal_rp2pio_pins_are_sequential(2, pins)) { mp_raise_RuntimeError(translate("Pins must be sequential")); } } - self->swap = swap; self->position = 0; self->quarter_count = 0; @@ -113,12 +110,12 @@ void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_o } mp_int_t common_hal_rotaryio_incrementalencoder_get_position(rotaryio_incrementalencoder_obj_t *self) { - return self->swap ? -self->position : self->position; + return self->position; } void common_hal_rotaryio_incrementalencoder_set_position(rotaryio_incrementalencoder_obj_t *self, mp_int_t new_position) { - self->position = self->swap ? -new_position : new_position; + self->position = new_position; } STATIC void incrementalencoder_interrupt_handler(void *self_in) { diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h index d74c21035e..83fe97d316 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h @@ -37,5 +37,4 @@ typedef struct { uint8_t last_state : 4; // int8_t quarter_count : 4; // count intermediate transitions between detents mp_int_t position; - bool swap; } rotaryio_incrementalencoder_obj_t; From 30c02df4a5680987f2d1021edf9a08175c92e6c4 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 6 Apr 2021 06:58:22 +0000 Subject: [PATCH 224/261] Translated using Weblate (Swedish) Currently translated at 100.0% (969 of 969 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 0c607759d6..5feb28845d 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-04-05 22:35+0000\n" +"PO-Revision-Date: 2021-04-06 14:41+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -421,7 +421,7 @@ msgstr "AnalogOut stöds inte på angiven pinne" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" -msgstr "" +msgstr "En annan PWMAudioOut är redan aktiv" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c @@ -998,7 +998,7 @@ msgstr "Det gick inte att allokera minne för WiFi-scanning" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Failed to buffer the sample" -msgstr "" +msgstr "Det gick inte att buffra samplingen" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" From c3e40d50abdf46a3a4d03f330909bcb70687a1c0 Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Tue, 6 Apr 2021 12:33:03 -0400 Subject: [PATCH 225/261] [qstr] Separate hash and len from string data This allows the compiler to merge strings: e.g. "update", "difference_update" and "symmetric_difference_update" will all point to the same memory. Shaves ~1KB off the image size, and potentially allows bigger savings if qstr attrs are initialized in qstr_init(), and not stored in the image. --- py/makeqstrdata.py | 28 +++----- py/mpstate.h | 2 +- py/qstr.c | 130 +++++++++++++++++----------------- py/qstr.h | 20 +++++- supervisor/shared/translate.c | 2 +- tools/mpy-tool.py | 27 ++++--- 6 files changed, 112 insertions(+), 97 deletions(-) diff --git a/py/makeqstrdata.py b/py/makeqstrdata.py index 0ad749005c..2de42b14d5 100644 --- a/py/makeqstrdata.py +++ b/py/makeqstrdata.py @@ -456,27 +456,24 @@ def parse_input_headers(infiles): return qcfgs, qstrs, i18ns +def escape_bytes(qstr): + if all(32 <= ord(c) <= 126 and c != "\\" and c != '"' for c in qstr): + # qstr is all printable ASCII so render it as-is (for easier debugging) + return qstr + else: + # qstr contains non-printable codes so render entire thing as hex pairs + qbytes = bytes_cons(qstr, "utf8") + return "".join(("\\x%02x" % b) for b in qbytes) def make_bytes(cfg_bytes_len, cfg_bytes_hash, qstr): qbytes = bytes_cons(qstr, "utf8") qlen = len(qbytes) qhash = compute_hash(qbytes, cfg_bytes_hash) - if all(32 <= ord(c) <= 126 and c != "\\" and c != '"' for c in qstr): - # qstr is all printable ASCII so render it as-is (for easier debugging) - qdata = qstr - else: - # qstr contains non-printable codes so render entire thing as hex pairs - qdata = "".join(("\\x%02x" % b) for b in qbytes) if qlen >= (1 << (8 * cfg_bytes_len)): print("qstr is too long:", qstr) assert False - qlen_str = ("\\x%02x" * cfg_bytes_len) % tuple( - ((qlen >> (8 * i)) & 0xFF) for i in range(cfg_bytes_len) - ) - qhash_str = ("\\x%02x" * cfg_bytes_hash) % tuple( - ((qhash >> (8 * i)) & 0xFF) for i in range(cfg_bytes_hash) - ) - return '(const byte*)"%s%s" "%s"' % (qhash_str, qlen_str, qdata) + qdata = escape_bytes(qstr) + return '%d, %d, "%s"' % (qhash, qlen, qdata) def print_qstr_data(encoding_table, qcfgs, qstrs, i18ns): @@ -489,10 +486,7 @@ def print_qstr_data(encoding_table, qcfgs, qstrs, i18ns): print("") # add NULL qstr with no hash or data - print( - 'QDEF(MP_QSTR_NULL, (const byte*)"%s%s" "")' - % ("\\x00" * cfg_bytes_hash, "\\x00" * cfg_bytes_len) - ) + print('QDEF(MP_QSTR_NULL, 0, 0, "")') total_qstr_size = 0 total_qstr_compressed_size = 0 diff --git a/py/mpstate.h b/py/mpstate.h index 139f23cb4f..1f6a2d00a1 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -197,7 +197,7 @@ typedef struct _mp_state_vm_t { // pointer and sizes to store interned string data // (qstr_last_chunk can be root pointer but is also stored in qstr pool) - byte *qstr_last_chunk; + char *qstr_last_chunk; size_t qstr_last_alloc; size_t qstr_last_used; diff --git a/py/qstr.c b/py/qstr.c index 2ae65379c7..af5ea58686 100644 --- a/py/qstr.c +++ b/py/qstr.c @@ -37,7 +37,6 @@ // NOTE: we are using linear arrays to store and search for qstr's (unique strings, interned strings) // ultimately we will replace this with a static hash table of some kind -// also probably need to include the length in the string data, to allow null bytes in the string #if MICROPY_DEBUG_VERBOSE // print debugging info #define DEBUG_printf DEBUG_printf @@ -46,34 +45,9 @@ #endif // A qstr is an index into the qstr pool. -// The data for a qstr contains (hash, length, data): -// - hash (configurable number of bytes) -// - length (configurable number of bytes) -// - data ("length" number of bytes) -// - \0 terminated (so they can be printed using printf) +// The data for a qstr is \0 terminated (so they can be printed using printf) -#if MICROPY_QSTR_BYTES_IN_HASH == 1 - #define Q_HASH_MASK (0xff) - #define Q_GET_HASH(q) ((mp_uint_t)(q)[0]) - #define Q_SET_HASH(q, hash) do { (q)[0] = (hash); } while (0) -#elif MICROPY_QSTR_BYTES_IN_HASH == 2 - #define Q_HASH_MASK (0xffff) - #define Q_GET_HASH(q) ((mp_uint_t)(q)[0] | ((mp_uint_t)(q)[1] << 8)) - #define Q_SET_HASH(q, hash) do { (q)[0] = (hash); (q)[1] = (hash) >> 8; } while (0) -#else - #error unimplemented qstr hash decoding -#endif -#define Q_GET_ALLOC(q) (MICROPY_QSTR_BYTES_IN_HASH + MICROPY_QSTR_BYTES_IN_LEN + Q_GET_LENGTH(q) + 1) -#define Q_GET_DATA(q) ((q) + MICROPY_QSTR_BYTES_IN_HASH + MICROPY_QSTR_BYTES_IN_LEN) -#if MICROPY_QSTR_BYTES_IN_LEN == 1 - #define Q_GET_LENGTH(q) ((q)[MICROPY_QSTR_BYTES_IN_HASH]) - #define Q_SET_LENGTH(q, len) do { (q)[MICROPY_QSTR_BYTES_IN_HASH] = (len); } while (0) -#elif MICROPY_QSTR_BYTES_IN_LEN == 2 - #define Q_GET_LENGTH(q) ((q)[MICROPY_QSTR_BYTES_IN_HASH] | ((q)[MICROPY_QSTR_BYTES_IN_HASH + 1] << 8)) - #define Q_SET_LENGTH(q, len) do { (q)[MICROPY_QSTR_BYTES_IN_HASH] = (len); (q)[MICROPY_QSTR_BYTES_IN_HASH + 1] = (len) >> 8; } while (0) -#else - #error unimplemented qstr length decoding -#endif +#define Q_HASH_MASK ((1 << (8 * MICROPY_QSTR_BYTES_IN_HASH)) - 1) #if MICROPY_PY_THREAD && !MICROPY_PY_THREAD_GIL #define QSTR_ENTER() mp_thread_mutex_lock(&MP_STATE_VM(qstr_mutex), 1) @@ -98,14 +72,25 @@ mp_uint_t qstr_compute_hash(const byte *data, size_t len) { return hash; } +const qstr_attr_t mp_qstr_const_attr[] = { + #ifndef NO_QSTR +#define QDEF(id, hash, len, str) { hash, len }, +#define TRANSLATION(id, length, compressed ...) + #include "genhdr/qstrdefs.generated.h" +#undef TRANSLATION +#undef QDEF + #endif +}; + const qstr_pool_t mp_qstr_const_pool = { NULL, // no previous pool 0, // no previous pool 10, // set so that the first dynamically allocated pool is twice this size; must be <= the len (just below) MP_QSTRnumber_of, // corresponds to number of strings in array just below + (qstr_attr_t *)mp_qstr_const_attr, { #ifndef NO_QSTR -#define QDEF(id, str) str, +#define QDEF(id, hash, len, str) str, #define TRANSLATION(id, length, compressed ...) #include "genhdr/qstrdefs.generated.h" #undef TRANSLATION @@ -130,20 +115,22 @@ void qstr_init(void) { #endif } -STATIC const byte *find_qstr(qstr q) { +STATIC const char *find_qstr(qstr q, qstr_attr_t *attr) { // search pool for this qstr // total_prev_len==0 in the final pool, so the loop will always terminate qstr_pool_t *pool = MP_STATE_VM(last_pool); while (q < pool->total_prev_len) { pool = pool->prev; } - assert(q - pool->total_prev_len < pool->len); - return pool->qstrs[q - pool->total_prev_len]; + q -= pool->total_prev_len; + assert(q < pool->len); + *attr = pool->attrs[q]; + return pool->qstrs[q]; } // qstr_mutex must be taken while in this function -STATIC qstr qstr_add(const byte *q_ptr) { - DEBUG_printf("QSTR: add hash=%d len=%d data=%.*s\n", Q_GET_HASH(q_ptr), Q_GET_LENGTH(q_ptr), Q_GET_LENGTH(q_ptr), Q_GET_DATA(q_ptr)); +STATIC qstr qstr_add(mp_uint_t hash, mp_uint_t len, const char *q_ptr) { + DEBUG_printf("QSTR: add hash=%d len=%d data=%.*s\n", hash, len, len, q_ptr); // make sure we have room in the pool for a new qstr if (MP_STATE_VM(last_pool)->len >= MP_STATE_VM(last_pool)->alloc) { @@ -151,11 +138,14 @@ STATIC qstr qstr_add(const byte *q_ptr) { if (new_pool_length > MICROPY_QSTR_POOL_MAX_ENTRIES) { new_pool_length = MICROPY_QSTR_POOL_MAX_ENTRIES; } - qstr_pool_t *pool = m_new_ll_obj_var_maybe(qstr_pool_t, const char *, new_pool_length); - if (pool == NULL) { + mp_uint_t pool_size = sizeof(qstr_pool_t) + sizeof(const char *) * new_pool_length; + void *chunk = m_malloc_maybe(pool_size + sizeof(qstr_attr_t) * new_pool_length, true); + if (chunk == NULL) { QSTR_EXIT(); m_malloc_fail(new_pool_length); } + qstr_pool_t *pool = (qstr_pool_t *)chunk; + pool->attrs = (qstr_attr_t *)(void *)((char *)chunk + pool_size); pool->prev = MP_STATE_VM(last_pool); pool->total_prev_len = MP_STATE_VM(last_pool)->total_prev_len + MP_STATE_VM(last_pool)->len; pool->alloc = new_pool_length; @@ -165,10 +155,14 @@ STATIC qstr qstr_add(const byte *q_ptr) { } // add the new qstr - MP_STATE_VM(last_pool)->qstrs[MP_STATE_VM(last_pool)->len++] = q_ptr; + mp_uint_t at = MP_STATE_VM(last_pool)->len; + MP_STATE_VM(last_pool)->attrs[at].hash = hash; + MP_STATE_VM(last_pool)->attrs[at].len = len; + MP_STATE_VM(last_pool)->qstrs[at] = q_ptr; + MP_STATE_VM(last_pool)->len++; // return id for the newly-added qstr - return MP_STATE_VM(last_pool)->total_prev_len + MP_STATE_VM(last_pool)->len - 1; + return MP_STATE_VM(last_pool)->total_prev_len + at; } qstr qstr_find_strn(const char *str, size_t str_len) { @@ -177,9 +171,10 @@ qstr qstr_find_strn(const char *str, size_t str_len) { // search pools for the data for (qstr_pool_t *pool = MP_STATE_VM(last_pool); pool != NULL; pool = pool->prev) { - for (const byte **q = pool->qstrs, **q_top = pool->qstrs + pool->len; q < q_top; q++) { - if (Q_GET_HASH(*q) == str_hash && Q_GET_LENGTH(*q) == str_len && memcmp(Q_GET_DATA(*q), str, str_len) == 0) { - return pool->total_prev_len + (q - pool->qstrs); + qstr_attr_t *attrs = pool->attrs; + for (mp_uint_t at = 0, top = pool->len; at < top; at++) { + if (attrs[at].hash == str_hash && attrs[at].len == str_len && memcmp(pool->qstrs[at], str, str_len) == 0) { + return pool->total_prev_len + at; } } } @@ -200,14 +195,14 @@ qstr qstr_from_strn(const char *str, size_t len) { // qstr does not exist in interned pool so need to add it // compute number of bytes needed to intern this string - size_t n_bytes = MICROPY_QSTR_BYTES_IN_HASH + MICROPY_QSTR_BYTES_IN_LEN + len + 1; + size_t n_bytes = len + 1; if (MP_STATE_VM(qstr_last_chunk) != NULL && MP_STATE_VM(qstr_last_used) + n_bytes > MP_STATE_VM(qstr_last_alloc)) { // not enough room at end of previously interned string so try to grow - byte *new_p = m_renew_maybe(byte, MP_STATE_VM(qstr_last_chunk), MP_STATE_VM(qstr_last_alloc), MP_STATE_VM(qstr_last_alloc) + n_bytes, false); + char *new_p = m_renew_maybe(char, MP_STATE_VM(qstr_last_chunk), MP_STATE_VM(qstr_last_alloc), MP_STATE_VM(qstr_last_alloc) + n_bytes, false); if (new_p == NULL) { // could not grow existing memory; shrink it to fit previous - (void)m_renew_maybe(byte, MP_STATE_VM(qstr_last_chunk), MP_STATE_VM(qstr_last_alloc), MP_STATE_VM(qstr_last_used), false); + (void)m_renew_maybe(char, MP_STATE_VM(qstr_last_chunk), MP_STATE_VM(qstr_last_alloc), MP_STATE_VM(qstr_last_used), false); MP_STATE_VM(qstr_last_chunk) = NULL; } else { // could grow existing memory @@ -221,10 +216,10 @@ qstr qstr_from_strn(const char *str, size_t len) { if (al < MICROPY_ALLOC_QSTR_CHUNK_INIT) { al = MICROPY_ALLOC_QSTR_CHUNK_INIT; } - MP_STATE_VM(qstr_last_chunk) = m_new_ll_maybe(byte, al); + MP_STATE_VM(qstr_last_chunk) = m_new_ll_maybe(char, al); if (MP_STATE_VM(qstr_last_chunk) == NULL) { // failed to allocate a large chunk so try with exact size - MP_STATE_VM(qstr_last_chunk) = m_new_ll_maybe(byte, n_bytes); + MP_STATE_VM(qstr_last_chunk) = m_new_ll_maybe(char, n_bytes); if (MP_STATE_VM(qstr_last_chunk) == NULL) { QSTR_EXIT(); m_malloc_fail(n_bytes); @@ -236,39 +231,41 @@ qstr qstr_from_strn(const char *str, size_t len) { } // allocate memory from the chunk for this new interned string's data - byte *q_ptr = MP_STATE_VM(qstr_last_chunk) + MP_STATE_VM(qstr_last_used); + char *q_ptr = MP_STATE_VM(qstr_last_chunk) + MP_STATE_VM(qstr_last_used); MP_STATE_VM(qstr_last_used) += n_bytes; // store the interned strings' data mp_uint_t hash = qstr_compute_hash((const byte *)str, len); - Q_SET_HASH(q_ptr, hash); - Q_SET_LENGTH(q_ptr, len); - memcpy(q_ptr + MICROPY_QSTR_BYTES_IN_HASH + MICROPY_QSTR_BYTES_IN_LEN, str, len); - q_ptr[MICROPY_QSTR_BYTES_IN_HASH + MICROPY_QSTR_BYTES_IN_LEN + len] = '\0'; - q = qstr_add(q_ptr); + memcpy(q_ptr, str, len); + q_ptr[len] = '\0'; + q = qstr_add(hash, len, q_ptr); } QSTR_EXIT(); return q; } mp_uint_t PLACE_IN_ITCM(qstr_hash)(qstr q) { - return Q_GET_HASH(find_qstr(q)); + qstr_attr_t attr; + find_qstr(q, &attr); + return attr.hash; } size_t qstr_len(qstr q) { - const byte *qd = find_qstr(q); - return Q_GET_LENGTH(qd); + qstr_attr_t attr; + find_qstr(q, &attr); + return attr.len; } const char *qstr_str(qstr q) { - const byte *qd = find_qstr(q); - return (const char *)Q_GET_DATA(qd); + qstr_attr_t attr; + return find_qstr(q, &attr); } const byte *qstr_data(qstr q, size_t *len) { - const byte *qd = find_qstr(q); - *len = Q_GET_LENGTH(qd); - return Q_GET_DATA(qd); + qstr_attr_t attr; + const char *qd = find_qstr(q, &attr); + *len = attr.len; + return (byte *)qd; } void qstr_pool_info(size_t *n_pool, size_t *n_qstr, size_t *n_str_data_bytes, size_t *n_total_bytes) { @@ -280,13 +277,14 @@ void qstr_pool_info(size_t *n_pool, size_t *n_qstr, size_t *n_str_data_bytes, si for (qstr_pool_t *pool = MP_STATE_VM(last_pool); pool != NULL && pool != &CONST_POOL; pool = pool->prev) { *n_pool += 1; *n_qstr += pool->len; - for (const byte **q = pool->qstrs, **q_top = pool->qstrs + pool->len; q < q_top; q++) { - *n_str_data_bytes += Q_GET_ALLOC(*q); + for (const qstr_attr_t *q = pool->attrs, *q_top = pool->attrs + pool->len; q < q_top; q++) { + *n_str_data_bytes += sizeof(*q) + q->len + 1; } #if MICROPY_ENABLE_GC - *n_total_bytes += gc_nbytes(pool); // this counts actual bytes used in heap + // this counts actual bytes used in heap + *n_total_bytes += gc_nbytes(pool) - sizeof(qstr_attr_t) * pool->alloc; #else - *n_total_bytes += sizeof(qstr_pool_t) + sizeof(qstr) * pool->alloc; + *n_total_bytes += sizeof(qstr_pool_t) + sizeof(const char *) * pool->alloc; #endif } *n_total_bytes += *n_str_data_bytes; @@ -297,8 +295,8 @@ void qstr_pool_info(size_t *n_pool, size_t *n_qstr, size_t *n_str_data_bytes, si void qstr_dump_data(void) { QSTR_ENTER(); for (qstr_pool_t *pool = MP_STATE_VM(last_pool); pool != NULL && pool != &CONST_POOL; pool = pool->prev) { - for (const byte **q = pool->qstrs, **q_top = pool->qstrs + pool->len; q < q_top; q++) { - mp_printf(&mp_plat_print, "Q(%s)\n", Q_GET_DATA(*q)); + for (const char **q = pool->qstrs, **q_top = pool->qstrs + pool->len; q < q_top; q++) { + mp_printf(&mp_plat_print, "Q(%s)\n", *q); } } QSTR_EXIT(); diff --git a/py/qstr.h b/py/qstr.h index c86e74324c..288bf5dbac 100644 --- a/py/qstr.h +++ b/py/qstr.h @@ -47,12 +47,30 @@ enum { typedef size_t qstr; +typedef struct _qstr_attr_t { + #if MICROPY_QSTR_BYTES_IN_HASH == 1 + uint8_t hash; + #elif MICROPY_QSTR_BYTES_IN_HASH == 2 + uint16_t hash; + #else + #error unimplemented qstr hash decoding + #endif + #if MICROPY_QSTR_BYTES_IN_LEN == 1 + uint8_t len; + #elif MICROPY_QSTR_BYTES_IN_LEN == 2 + uint16_t len; + #else + #error unimplemented qstr length decoding + #endif +} qstr_attr_t; + typedef struct _qstr_pool_t { struct _qstr_pool_t *prev; size_t total_prev_len; size_t alloc; size_t len; - const byte *qstrs[]; + qstr_attr_t *attrs; + const char *qstrs[]; } qstr_pool_t; #define QSTR_FROM_STR_STATIC(s) (qstr_from_strn((s), strlen(s))) diff --git a/supervisor/shared/translate.c b/supervisor/shared/translate.c index c99cbf180d..7afbd43e21 100644 --- a/supervisor/shared/translate.c +++ b/supervisor/shared/translate.c @@ -129,7 +129,7 @@ __attribute__((always_inline)) #endif const compressed_string_t *translate(const char *original) { #ifndef NO_QSTR - #define QDEF(id, str) + #define QDEF(id, hash, len, str) #define TRANSLATION(id, firstbyte, ...) if (strcmp(original, id) == 0) { static const compressed_string_t v = { .data = firstbyte, .tail = { __VA_ARGS__ } }; return &v; } else #include "genhdr/qstrdefs.generated.h" #undef TRANSLATION diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py index c989b63007..42d62fdf11 100755 --- a/tools/mpy-tool.py +++ b/tools/mpy-tool.py @@ -607,6 +607,20 @@ def freeze_mpy(base_qstrs, raw_codes): print(" MP_QSTR_%s," % new[i][1]) print("};") + print() + print("const qstr_attr_t mp_qstr_frozen_const_attr[] = {") + qstr_size = {"metadata": 0, "data": 0} + for _, _, qstr in new: + qbytes = qstrutil.bytes_cons(qstr, "utf8") + print(" {%d, %d}," % ( + qstrutil.compute_hash(qbytes, config.MICROPY_QSTR_BYTES_IN_HASH), + len(qbytes) + )) + qstr_size["metadata"] += ( + config.MICROPY_QSTR_BYTES_IN_LEN + config.MICROPY_QSTR_BYTES_IN_HASH + ) + qstr_size["data"] += len(qbytes) + print("};") print() print("extern const qstr_pool_t mp_qstr_const_pool;") print("const qstr_pool_t mp_qstr_frozen_const_pool = {") @@ -614,19 +628,10 @@ def freeze_mpy(base_qstrs, raw_codes): print(" MP_QSTRnumber_of, // previous pool size") print(" %u, // allocated entries" % len(new)) print(" %u, // used entries" % len(new)) + print(" (qstr_attr_t *)mp_qstr_frozen_const_attr,") print(" {") - qstr_size = {"metadata": 0, "data": 0} for _, _, qstr in new: - qstr_size["metadata"] += ( - config.MICROPY_QSTR_BYTES_IN_LEN + config.MICROPY_QSTR_BYTES_IN_HASH - ) - qstr_size["data"] += len(qstr) - print( - " %s," - % qstrutil.make_bytes( - config.MICROPY_QSTR_BYTES_IN_LEN, config.MICROPY_QSTR_BYTES_IN_HASH, qstr - ) - ) + print(" \"%s\"," % qstrutil.escape_bytes(qstr)) print(" },") print("};") From 2fb5eb3b112e95aab12316cd5cf658ddd0772b84 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 6 Apr 2021 19:10:01 -0500 Subject: [PATCH 226/261] extmod/re1.5: Check and report byte overflow errors in _compilecode. The generated regex code is limited in the range of jumps and counts, and this commit checks all cases which can overflow given the right kind of input regex, and returns an error in such a case. This change assumes that the results that overflow an int8_t do not overflow a platform int. Closes: #7078 Signed-off-by: Jeff Epler # Conflicts: # extmod/re1.5/compilecode.c --- extmod/re1.5/compilecode.c | 32 ++++++++++++++++++++------------ tests/extmod/ure_limit.py | 34 ++++++++++++++++++++++++++++++++++ tests/extmod/ure_limit.py.exp | 7 +++++++ 3 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 tests/extmod/ure_limit.py create mode 100644 tests/extmod/ure_limit.py.exp diff --git a/extmod/re1.5/compilecode.c b/extmod/re1.5/compilecode.c index 01d3d14988..81c0bceef7 100644 --- a/extmod/re1.5/compilecode.c +++ b/extmod/re1.5/compilecode.c @@ -8,9 +8,9 @@ ((code ? memmove(code + at + num, code + at, pc - at) : 0), pc += num) #define REL(at, to) (to - at - 2) #define EMIT(at, byte) (code ? (code[at] = byte) : (at)) +#define EMIT_CHECKED(at, byte) (_emit_checked(at, code, byte, &err)) #define PC (prog->bytelen) - static char unescape(char c) { switch (c) { case 'a': @@ -33,9 +33,17 @@ static char unescape(char c) { } +static void _emit_checked(int at, char *code, int val, bool *err) { + *err |= val != (int8_t)val; + if (code) { + code[at] = val; + } +} + static const char *_compilecode(const char *re, ByteProg *prog, int sizecode) { char *code = sizecode ? NULL : prog->insts; + bool err = false; int start = PC; int term = PC; int alt_label = 0; @@ -96,7 +104,7 @@ static const char *_compilecode(const char *re, ByteProg *prog, int sizecode) EMIT(PC++, *re); } } - EMIT(term + 1, cnt); + EMIT_CHECKED(term + 1, cnt); break; } case '(': { @@ -107,7 +115,7 @@ static const char *_compilecode(const char *re, ByteProg *prog, int sizecode) if (capture) { sub = ++prog->sub; EMIT(PC++, Save); - EMIT(PC++, 2 * sub); + EMIT_CHECKED(PC++, 2 * sub); prog->len++; } else { re += 2; @@ -118,7 +126,7 @@ static const char *_compilecode(const char *re, ByteProg *prog, int sizecode) if (capture) { EMIT(PC++, Save); - EMIT(PC++, 2 * sub + 1); + EMIT_CHECKED(PC++, 2 * sub + 1); prog->len++; } @@ -133,7 +141,7 @@ static const char *_compilecode(const char *re, ByteProg *prog, int sizecode) } else { EMIT(term, Split); } - EMIT(term + 1, REL(term, PC)); + EMIT_CHECKED(term + 1, REL(term, PC)); prog->len++; term = PC; break; @@ -141,7 +149,7 @@ static const char *_compilecode(const char *re, ByteProg *prog, int sizecode) if (PC == term) return NULL; // nothing to repeat INSERT_CODE(term, 2, PC); EMIT(PC, Jmp); - EMIT(PC + 1, REL(PC, term)); + EMIT_CHECKED(PC + 1, REL(PC, term)); PC += 2; if (re[1] == '?') { EMIT(term, RSplit); @@ -149,7 +157,7 @@ static const char *_compilecode(const char *re, ByteProg *prog, int sizecode) } else { EMIT(term, Split); } - EMIT(term + 1, REL(term, PC)); + EMIT_CHECKED(term + 1, REL(term, PC)); prog->len += 2; term = PC; break; @@ -161,20 +169,20 @@ static const char *_compilecode(const char *re, ByteProg *prog, int sizecode) } else { EMIT(PC, RSplit); } - EMIT(PC + 1, REL(PC, term)); + EMIT_CHECKED(PC + 1, REL(PC, term)); PC += 2; prog->len++; term = PC; break; case '|': if (alt_label) { - EMIT(alt_label, REL(alt_label, PC) + 1); + EMIT_CHECKED(alt_label, REL(alt_label, PC) + 1); } INSERT_CODE(start, 2, PC); EMIT(PC++, Jmp); alt_label = PC++; EMIT(start, Split); - EMIT(start + 1, REL(start, PC)); + EMIT_CHECKED(start + 1, REL(start, PC)); prog->len += 2; term = PC; break; @@ -192,9 +200,9 @@ static const char *_compilecode(const char *re, ByteProg *prog, int sizecode) } if (alt_label) { - EMIT(alt_label, REL(alt_label, PC) + 1); + EMIT_CHECKED(alt_label, REL(alt_label, PC) + 1); } - return re; + return err ? NULL : re; } int re1_5_sizecode(const char *re) diff --git a/tests/extmod/ure_limit.py b/tests/extmod/ure_limit.py new file mode 100644 index 0000000000..99c6a818e8 --- /dev/null +++ b/tests/extmod/ure_limit.py @@ -0,0 +1,34 @@ +# Test overflow in ure.compile output code. + +try: + import ure as re +except ImportError: + print("SKIP") + raise SystemExit + + +def test_re(r): + try: + re.compile(r) + except: + print("Error") + + +# too many chars in [] +test_re("[" + "a" * 256 + "]") + +# too many groups +test_re("(a)" * 256) + +# jump too big for ? +test_re("(" + "a" * 62 + ")?") + +# jump too big for * +test_re("(" + "a" * 60 + ".)*") +test_re("(" + "a" * 60 + "..)*") + +# jump too big for + +test_re("(" + "a" * 62 + ")+") + +# jump too big for | +test_re("b" * 63 + "|a") diff --git a/tests/extmod/ure_limit.py.exp b/tests/extmod/ure_limit.py.exp new file mode 100644 index 0000000000..8353be536c --- /dev/null +++ b/tests/extmod/ure_limit.py.exp @@ -0,0 +1,7 @@ +Error +Error +Error +Error +Error +Error +Error From 088c51cc80a89a85e2ec566443730f5640625555 Mon Sep 17 00:00:00 2001 From: Reza Almanda Date: Wed, 7 Apr 2021 03:11:56 +0000 Subject: [PATCH 227/261] Translated using Weblate (Indonesian) Currently translated at 46.8% (454 of 969 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/id/ --- locale/ID.po | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 2592a4e40d..ad5700cb99 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -6,15 +6,15 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-01-15 19:49+0000\n" -"Last-Translator: oon arfiandwi \n" +"PO-Revision-Date: 2021-04-07 12:23+0000\n" +"Last-Translator: Reza Almanda \n" "Language-Team: LANGUAGE \n" "Language: ID\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.5-dev\n" +"X-Generator: Weblate 4.6-dev\n" #: main.c msgid "" @@ -29,6 +29,8 @@ msgid "" "\n" "Code stopped by auto-reload.\n" msgstr "" +"\n" +"Kode berhenti oleh auto-reload.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -852,9 +854,8 @@ msgid "Data chunk must follow fmt chunk" msgstr "Potongan data harus mengikuti fmt chunk" #: ports/nrf/common-hal/_bleio/Adapter.c -#, fuzzy msgid "Data too large for advertisement packet" -msgstr "Tidak bisa menyesuaikan data ke dalam paket advertisment" +msgstr "Data terlalu besar untuk paket advertisment" #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." @@ -970,9 +971,9 @@ msgid "Failed sending command." msgstr "Gagal mengirim perintah." #: ports/nrf/sd_mutex.c -#, fuzzy, c-format +#, c-format msgid "Failed to acquire mutex, err 0x%04x" -msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX" +msgstr "Gagal memperoleh mutex, err 0x%04x" #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c @@ -1019,9 +1020,9 @@ msgid "Failed to parse MP3 file" msgstr "Gagal mengurai file MP3" #: ports/nrf/sd_mutex.c -#, fuzzy, c-format +#, c-format msgid "Failed to release mutex, err 0x%04x" -msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX" +msgstr "Gagal melepaskan mutex, err 0x%04x" #: supervisor/shared/safe_mode.c msgid "Failed to write internal flash." @@ -1624,9 +1625,8 @@ msgstr "" #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c -#, fuzzy msgid "Not connected" -msgstr "Tidak dapat menyambungkan ke AP" +msgstr "Tidak terhubung" #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c #: shared-bindings/audiopwmio/PWMAudioOut.c @@ -1635,7 +1635,7 @@ msgstr "Tidak berfungsi" #: main.c msgid "Not running saved code.\n" -msgstr "" +msgstr "Tidak menjalankan kode yang disimpan.\n" #: shared-bindings/_bleio/__init__.c msgid "Not settable" @@ -1847,6 +1847,8 @@ msgstr "Buffer awalan harus ada di heap" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" +"Tekan sembarang tombol untuk masuk ke REPL. Tekan CTRL-D untuk memuat ulang." +"\n" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" @@ -1926,9 +1928,8 @@ msgid "Read-only filesystem" msgstr "sistem file (filesystem) bersifat Read-only" #: shared-module/displayio/Bitmap.c -#, fuzzy msgid "Read-only object" -msgstr "sistem file (filesystem) bersifat Read-only" +msgstr "Objek Read-only" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c msgid "Received response was invalid" @@ -2308,9 +2309,8 @@ msgid "Unsupported baudrate" msgstr "Baudrate tidak didukung" #: shared-module/displayio/display_core.c -#, fuzzy msgid "Unsupported display bus type" -msgstr "Baudrate tidak didukung" +msgstr "Tipe bus tampilan tidak didukung" #: shared-module/audiocore/WaveFile.c msgid "Unsupported format" @@ -2552,9 +2552,8 @@ msgid "buffer size must be a multiple of element size" msgstr "" #: shared-module/struct/__init__.c -#, fuzzy msgid "buffer size must match format" -msgstr "buffers harus mempunyai panjang yang sama" +msgstr "ukuran buffer harus sesuai dengan format" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "buffer slices must be of equal length" @@ -4018,9 +4017,8 @@ msgid "timeout must be < 655.35 secs" msgstr "" #: shared-bindings/_bleio/CharacteristicBuffer.c -#, fuzzy msgid "timeout must be >= 0.0" -msgstr "bits harus memilki nilai 8" +msgstr "waktu habis harus >= 0,0" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v1 card" @@ -4232,20 +4230,20 @@ msgstr "" #: extmod/ulab/code/numpy/numerical/numerical.c msgid "wrong axis index" -msgstr "" +msgstr "indeks sumbu salah" #: extmod/ulab/code/ulab_create.c msgid "wrong axis specified" -msgstr "" +msgstr "sumbu yang ditentukan salah" #: extmod/ulab/code/numpy/compare/compare.c #: extmod/ulab/code/numpy/vector/vector.c msgid "wrong input type" -msgstr "" +msgstr "tipe input salah" #: extmod/ulab/code/ulab_create.c py/objstr.c msgid "wrong number of arguments" -msgstr "" +msgstr "jumlah argumen salah" #: py/runtime.c msgid "wrong number of values to unpack" @@ -4281,11 +4279,11 @@ msgstr "" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" -msgstr "" +msgstr "zi harus ndarray" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" -msgstr "" +msgstr "zi harus berjenis float" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" From 203e3c8fee47541ddd65095c0dbe485dfb0fb681 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Tue, 6 Apr 2021 16:30:06 +0000 Subject: [PATCH 228/261] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (969 of 969 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 19a27387a1..7643bcfb0d 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-04-05 22:35+0000\n" +"PO-Revision-Date: 2021-04-07 12:23+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -426,7 +426,7 @@ msgstr "Saída analógica não suportada no pino fornecido" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" -msgstr "" +msgstr "Um outro PWMAudioOut já está ativo" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c @@ -1010,7 +1010,7 @@ msgstr "Houve uma falha na alocação da memória para a varredura do Wifi" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Failed to buffer the sample" -msgstr "" +msgstr "Houve uma falha ao fazer uma memória prévia (buffer) da amostra" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" From 8544249fc05c9581ba76854143e8e4a1744a38ef Mon Sep 17 00:00:00 2001 From: Brian Dean Date: Wed, 7 Apr 2021 09:11:30 -0400 Subject: [PATCH 229/261] boards/bdmicro_vina_d51: Replace old rev with new rev and rename. This update to the PR retains the earlier board rev (with a rename) so that backward binary compatibility is not lost for the earlier board revision. The primary name 'vina-d51' is retained for the latest revision to make it easy for customers to select the proper UF2 download - because the name matches the commercial name. Details: Replace bdmicro_vina_d51 with bdmicro_vina_d51_pcb7 (revision 7 of PCB) with boardfiles unmodified. Add _pcb7 to the workflow build. Replace bdmicro_vina_d51 boardfile content with latest PCB updates (revision 10 ov PCB). Add minimal comments in the board files to make it clear which PCB revision is implemented. Update the USB PID to reflect an updated board revision. --- .github/workflows/build.yml | 1 + .../boards/bdmicro_vina_d51/mpconfigboard.h | 3 + .../boards/bdmicro_vina_d51/mpconfigboard.mk | 5 +- .../atmel-samd/boards/bdmicro_vina_d51/pins.c | 3 + .../boards/bdmicro_vina_d51_pcb7/board.c | 47 ++++++++++ .../bdmicro_vina_d51_pcb7/mpconfigboard.h | 28 ++++++ .../bdmicro_vina_d51_pcb7/mpconfigboard.mk | 11 +++ .../boards/bdmicro_vina_d51_pcb7/pins.c | 90 +++++++++++++++++++ 8 files changed, 187 insertions(+), 1 deletion(-) create mode 100644 ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/board.c create mode 100644 ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74f911b6f4..dce5388211 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -190,6 +190,7 @@ jobs: - "bastble" - "bdmicro_vina_d21" - "bdmicro_vina_d51" + - "bdmicro_vina_d51_pcb7" - "bless_dev_board_multi_sensor" - "blm_badge" - "capablerobot_usbhub" diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h index 0fb27eaee4..24d78b8ed1 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h @@ -1,3 +1,6 @@ +// More than one revision of this board is available. +// This board specifies PCB Revision 10 + #define MICROPY_HW_BOARD_NAME "BDMICRO VINA-D51" #define MICROPY_HW_MCU_NAME "samd51n20" diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk index de350f7ab0..13487413f4 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk @@ -1,5 +1,8 @@ +# More than one revision of this board is available. +# This board specifies PCB Revision 10 + USB_VID = 0x31e2 -USB_PID = 0x2011 +USB_PID = 0x2021 USB_PRODUCT = "VINA-D51" USB_MANUFACTURER = "BDMICRO LLC" diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c index 871345257a..e7595d9789 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c @@ -1,3 +1,6 @@ +// More than one revision of this board is available. +// This board specifies PCB Revision 10 + #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/board.c b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/board.c new file mode 100644 index 0000000000..bb6ad8bc0d --- /dev/null +++ b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/board.c @@ -0,0 +1,47 @@ +/* + * 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) { + // struct port_config pin_conf; + // port_get_config_defaults(&pin_conf); + // + // pin_conf.direction = PORT_PIN_DIR_OUTPUT; + // port_pin_set_config(MICROPY_HW_LED_TX, &pin_conf); + // port_pin_set_output_level(MICROPY_HW_LED_TX, true); + // + // port_pin_set_config(MICROPY_HW_LED_RX, &pin_conf); + // port_pin_set_output_level(MICROPY_HW_LED_RX, true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/mpconfigboard.h b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/mpconfigboard.h new file mode 100644 index 0000000000..8b015df05e --- /dev/null +++ b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/mpconfigboard.h @@ -0,0 +1,28 @@ +#define MICROPY_HW_BOARD_NAME "BDMICRO VINA-D51" +#define MICROPY_HW_MCU_NAME "samd51n20" + +#define CIRCUITPY_MCU_FAMILY samd51 + +// These are pins not to reset. +// Don't reset QSPI data pins +#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11) +#define MICROPY_PORT_B (PORT_PB10 | PORT_PB11) +#define MICROPY_PORT_C (0) +#define MICROPY_PORT_D (0) + +#define BOARD_HAS_CRYSTAL 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_PA16) +#define DEFAULT_I2C_BUS_SDA (&pin_PA17) +#define DEFAULT_UART_BUS_RX (&pin_PB20) +#define DEFAULT_UART_BUS_TX (&pin_PB21) +#define DEFAULT_SPI_BUS_MISO (&pin_PB23) +#define DEFAULT_SPI_BUS_MOSI (&pin_PC27) +#define DEFAULT_SPI_BUS_SCK (&pin_PC28) +#define MICROPY_HW_LED_STATUS (&pin_PA23) +#define MICROPY_HW_LED_RX (&pin_PC05) +#define MICROPY_HW_LED_TX (&pin_PC06) + +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/mpconfigboard.mk b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/mpconfigboard.mk new file mode 100644 index 0000000000..de350f7ab0 --- /dev/null +++ b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x31e2 +USB_PID = 0x2011 +USB_PRODUCT = "VINA-D51" +USB_MANUFACTURER = "BDMICRO LLC" + +CHIP_VARIANT = SAMD51N20A +CHIP_FAMILY = samd51 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "MX25L51245G","GD25S512MD" +LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c new file mode 100644 index 0000000000..8eeab8a9a5 --- /dev/null +++ b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c @@ -0,0 +1,90 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PB07) }, + { MP_ROM_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PC00) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB09) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PC02) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PC03) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) }, + { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB05) }, + { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB06) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB31) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC16) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PC13) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA14) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA15) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB12) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB13) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PC17) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PC18) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PC19) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC20) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PC21) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB18) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB19) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PC12) }, + { MP_ROM_QSTR(MP_QSTR_DAC0), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_EN), MP_ROM_PTR(&pin_PC15) }, + { MP_ROM_QSTR(MP_QSTR_E5), MP_ROM_PTR(&pin_PC15) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_GPIO0), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_E3), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_GPIO2), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_E4), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC14) }, + { MP_ROM_QSTR(MP_QSTR_E6), MP_ROM_PTR(&pin_PC14) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_UART3_RX), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_I2C3_SCL), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_E2), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_UART3_TX), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_I2C3_SDA), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_E1), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_I2C1_SCL), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_I2S_FS_0), MP_ROM_PTR(&pin_PA20) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MCK_0), MP_ROM_PTR(&pin_PB17) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SCK_0), MP_ROM_PTR(&pin_PB16) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SDI), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_PA21) }, + { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB15) }, + { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_PB14) }, + { MP_ROM_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PC05) }, + { MP_ROM_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PC06) }, + { MP_ROM_QSTR(MP_QSTR_RS485_RE), MP_ROM_PTR(&pin_PB01) }, + { MP_ROM_QSTR(MP_QSTR_RS485_RX), MP_ROM_PTR(&pin_PB03) }, + { MP_ROM_QSTR(MP_QSTR_RS485_TE), MP_ROM_PTR(&pin_PB00) }, + { MP_ROM_QSTR(MP_QSTR_RS485_TX), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_PC27) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PC27) }, + { MP_ROM_QSTR(MP_QSTR_SPI_SCK), MP_ROM_PTR(&pin_PC28) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PC28) }, + { MP_ROM_QSTR(MP_QSTR_SPI_SS), MP_ROM_PTR(&pin_PB22) }, + { MP_ROM_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PB22) }, + { MP_ROM_QSTR(MP_QSTR_UART1_CTS), MP_ROM_PTR(&pin_PC25) }, + { MP_ROM_QSTR(MP_QSTR_UART1_RTS), MP_ROM_PTR(&pin_PC24) }, + { MP_ROM_QSTR(MP_QSTR_UART1_RX), MP_ROM_PTR(&pin_PB24) }, + { MP_ROM_QSTR(MP_QSTR_UART1_TX), MP_ROM_PTR(&pin_PB25) }, + { MP_ROM_QSTR(MP_QSTR_UART2_RX), MP_ROM_PTR(&pin_PB20) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB20) }, + { MP_ROM_QSTR(MP_QSTR_I2C2_SCL), MP_ROM_PTR(&pin_PB20) }, + { MP_ROM_QSTR(MP_QSTR_UART2_TX), MP_ROM_PTR(&pin_PB21) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB21) }, + { MP_ROM_QSTR(MP_QSTR_I2C2_SDA), MP_ROM_PTR(&pin_PB21) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From e5cffa94e80b5569e8d2a0dbf9c067777b824614 Mon Sep 17 00:00:00 2001 From: felixerdy Date: Thu, 8 Apr 2021 21:19:27 +0200 Subject: [PATCH 230/261] add aliases for TX and RX --- ports/atmel-samd/boards/sensebox_mcu/pins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/atmel-samd/boards/sensebox_mcu/pins.c b/ports/atmel-samd/boards/sensebox_mcu/pins.c index 7c1aafcc89..4e0bd14350 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/pins.c +++ b/ports/atmel-samd/boards/sensebox_mcu/pins.c @@ -28,6 +28,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // UART pins { MP_ROM_QSTR(MP_QSTR_UART_PWR), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_PB08) }, From 5d6bef569d142d0d59d39f2b14a66597ebd9743b Mon Sep 17 00:00:00 2001 From: David Glaude Date: Thu, 8 Apr 2021 21:50:16 +0200 Subject: [PATCH 231/261] Respect product name: space between QT and Py https://www.adafruit.com/product/4900 say "Adafruit QT Py RP2040" This is also matching other "QT Py" product. --- ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h index 6b84afb649..a1947deaeb 100644 --- a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "Adafruit QTPy RP2040" +#define MICROPY_HW_BOARD_NAME "Adafruit QT Py RP2040" #define MICROPY_HW_MCU_NAME "rp2040" #define MICROPY_HW_NEOPIXEL (&pin_GPIO12) From e3b3f97fa6168196a2d708583f949163ed3d41fd Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 8 Apr 2021 13:25:11 -0700 Subject: [PATCH 232/261] Improve PacketBuffer packet lengths for remote service --- ports/nrf/common-hal/_bleio/PacketBuffer.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ports/nrf/common-hal/_bleio/PacketBuffer.c b/ports/nrf/common-hal/_bleio/PacketBuffer.c index 311988eb46..42fc3475d6 100644 --- a/ports/nrf/common-hal/_bleio/PacketBuffer.c +++ b/ports/nrf/common-hal/_bleio/PacketBuffer.c @@ -252,6 +252,9 @@ void common_hal_bleio_packet_buffer_construct( } mp_int_t common_hal_bleio_packet_buffer_readinto(bleio_packet_buffer_obj_t *self, uint8_t *data, size_t len) { + if (self->conn_handle == BLE_CONN_HANDLE_INVALID) { + mp_raise_ConnectionError(translate("Not connected")); + } if (ringbuf_num_filled(&self->ringbuf) < 2) { return 0; } @@ -357,8 +360,7 @@ mp_int_t common_hal_bleio_packet_buffer_get_incoming_packet_length(bleio_packet_ if (self->conn_handle != BLE_CONN_HANDLE_INVALID) { bleio_connection_internal_t *connection = bleio_conn_handle_to_connection(self->conn_handle); if (connection) { - return MIN(common_hal_bleio_connection_get_max_packet_length(connection), - self->characteristic->max_length); + return common_hal_bleio_connection_get_max_packet_length(connection); } } // There's no current connection, so we don't know the MTU, and @@ -396,6 +398,18 @@ mp_int_t common_hal_bleio_packet_buffer_get_outgoing_packet_length(bleio_packet_ // we can't tell what the largest outgoing packet length would be. return -1; } + // If we are talking to a remote service, we'll be bound by the MTU. (We don't actually + // know the max size of the remote characteristic.) + if (self->characteristic->service != NULL && + self->characteristic->service->is_remote) { + // We are talking to a remote service so we're writing. + if (self->conn_handle != BLE_CONN_HANDLE_INVALID) { + bleio_connection_internal_t *connection = bleio_conn_handle_to_connection(self->conn_handle); + if (connection) { + return common_hal_bleio_connection_get_max_packet_length(connection); + } + } + } return self->characteristic->max_length; } From 5ec195b5efff31a177d4be041df3882b60b9e84d Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 8 Apr 2021 13:29:26 -0700 Subject: [PATCH 233/261] Remove PacketBuffer.packet_size Fixes #2853 --- shared-bindings/_bleio/PacketBuffer.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/shared-bindings/_bleio/PacketBuffer.c b/shared-bindings/_bleio/PacketBuffer.c index 16ad02a461..9412dee5d7 100644 --- a/shared-bindings/_bleio/PacketBuffer.c +++ b/shared-bindings/_bleio/PacketBuffer.c @@ -95,7 +95,7 @@ STATIC void check_for_deinit(bleio_packet_buffer_obj_t *self) { //| def readinto(self, buf: WriteableBuffer) -> int: //| """Reads a single BLE packet into the ``buf``. Raises an exception if the next packet is longer -//| than the given buffer. Use `packet_size` to read the maximum length of a single packet. +//| than the given buffer. Use `incoming_packet_length` to read the maximum length of a single packet. //| //| :return: number of bytes read and stored into ``buf`` //| :rtype: int""" @@ -179,11 +179,6 @@ STATIC mp_obj_t bleio_packet_buffer_deinit(mp_obj_t self_in) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_deinit_obj, bleio_packet_buffer_deinit); -//| packet_size: int -//| """`packet_size` is the same as `incoming_packet_length`. -//| The name `packet_size` is deprecated and -//| will be removed in CircuitPython 6.0.0.""" -//| //| incoming_packet_length: int //| """Maximum length in bytes of a packet we are reading.""" //| @@ -233,9 +228,6 @@ STATIC const mp_rom_map_elem_t bleio_packet_buffer_locals_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&bleio_packet_buffer_readinto_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_write), MP_ROM_PTR(&bleio_packet_buffer_write_obj) }, - // .packet_size is now an alias for .incoming_packet_length - // TODO: Remove in 6.0.0. - { MP_OBJ_NEW_QSTR(MP_QSTR_packet_size), MP_ROM_PTR(&bleio_packet_buffer_incoming_packet_length_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_incoming_packet_length), MP_ROM_PTR(&bleio_packet_buffer_incoming_packet_length_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_outgoing_packet_length), MP_ROM_PTR(&bleio_packet_buffer_outgoing_packet_length_obj) }, }; From 3ce0b512f8e239693aa102c0ec9ff2d3ef1bc6b9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 8 Apr 2021 16:25:47 -0500 Subject: [PATCH 234/261] rasberrypi: IncrementalEncoder: factor out state machine --- .../common-hal/rotaryio/IncrementalEncoder.c | 67 ++------------- .../common-hal/rotaryio/IncrementalEncoder.h | 2 +- ports/raspberrypi/mpconfigport.mk | 1 + py/circuitpy_defns.mk | 1 + py/circuitpy_mpconfig.mk | 3 + shared-module/rotaryio/IncrementalEncoder.c | 84 +++++++++++++++++++ shared-module/rotaryio/IncrementalEncoder.h | 34 ++++++++ 7 files changed, 130 insertions(+), 62 deletions(-) create mode 100644 shared-module/rotaryio/IncrementalEncoder.c create mode 100644 shared-module/rotaryio/IncrementalEncoder.h diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index a3cf05ca65..10785c172c 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -28,6 +28,7 @@ #include #include "common-hal/rotaryio/IncrementalEncoder.h" +#include "shared-module/rotaryio/IncrementalEncoder.h" #include "bindings/rp2pio/__init__.h" #include "bindings/rp2pio/StateMachine.h" @@ -88,12 +89,10 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode common_hal_rp2pio_statemachine_run(&self->state_machine, encoder_init, MP_ARRAY_SIZE(encoder_init)); // We're guaranteed by the init code that some output will be available promptly - uint8_t state; - common_hal_rp2pio_statemachine_readinto(&self->state_machine, &state, 1, 1); - // Top two bits of self->last_state don't matter, because they'll be gone as soon as - // interrupt handler is called. - self->last_state = state & 3; + uint8_t quiescent_state; + common_hal_rp2pio_statemachine_readinto(&self->state_machine, &quiescent_state, 1, 1); + shared_module_softencoder_state_init(self, quiescent_state & 3); common_hal_rp2pio_statemachine_set_interrupt_handler(&self->state_machine, incrementalencoder_interrupt_handler, self, PIO_IRQ0_INTF_SM0_RXNEMPTY_BITS); } @@ -109,67 +108,13 @@ void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_o common_hal_rp2pio_statemachine_deinit(&self->state_machine); } -mp_int_t common_hal_rotaryio_incrementalencoder_get_position(rotaryio_incrementalencoder_obj_t *self) { - return self->position; -} - -void common_hal_rotaryio_incrementalencoder_set_position(rotaryio_incrementalencoder_obj_t *self, - mp_int_t new_position) { - self->position = new_position; -} - STATIC void incrementalencoder_interrupt_handler(void *self_in) { rotaryio_incrementalencoder_obj_t *self = self_in; - // This table also works for detent both at 11 and 00 - // For 11 at detent: - // Turning cw: 11->01->00->10->11 - // Turning ccw: 11->10->00->01->11 - // For 00 at detent: - // Turning cw: 00->10->11->10->00 - // Turning ccw: 00->01->11->10->00 - - // index table by state - #define BAD 7 - static const int8_t transitions[16] = { - 0, // 00 -> 00 no movement - -1, // 00 -> 01 3/4 ccw (11 detent) or 1/4 ccw (00 at detent) - +1, // 00 -> 10 3/4 cw or 1/4 cw - BAD, // 00 -> 11 non-Gray-code transition - +1, // 01 -> 00 2/4 or 4/4 cw - 0, // 01 -> 01 no movement - BAD, // 01 -> 10 non-Gray-code transition - -1, // 01 -> 11 4/4 or 2/4 ccw - -1, // 10 -> 00 2/4 or 4/4 ccw - BAD, // 10 -> 01 non-Gray-code transition - 0, // 10 -> 10 no movement - +1, // 10 -> 11 4/4 or 2/4 cw - BAD, // 11 -> 00 non-Gray-code transition - +1, // 11 -> 01 1/4 or 3/4 cw - -1, // 11 -> 10 1/4 or 3/4 ccw - 0, // 11 -> 11 no movement - }; while (common_hal_rp2pio_statemachine_get_in_waiting(&self->state_machine)) { // Bypass all the logic of StateMachine.c:_transfer, we need something // very simple and fast for an interrupt! - uint8_t new = self->state_machine.pio->rxf[self->state_machine.state_machine]; - - // Shift the old AB bits to the "old" position, and set the new AB bits. - self->last_state = (self->last_state & 0x3) << 2 | (new & 0x3); - - int8_t quarter_incr = transitions[self->last_state]; - if (quarter_incr == BAD) { - // Missed a transition. We don't know which way we're going, so do nothing. - return; - } - - self->quarter_count += quarter_incr; - if (self->quarter_count >= 4) { - self->position += 1; - self->quarter_count = 0; - } else if (self->quarter_count <= -4) { - self->position -= 1; - self->quarter_count = 0; - } + uint8_t new_state = self->state_machine.pio->rxf[self->state_machine.state_machine]; + shared_module_softencoder_state_update(self, new_state); } } diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h index 83fe97d316..f794560275 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h @@ -34,7 +34,7 @@ typedef struct { mp_obj_base_t base; rp2pio_statemachine_obj_t state_machine; - uint8_t last_state : 4; // + uint8_t state : 4; // int8_t quarter_count : 4; // count intermediate transitions between detents mp_int_t position; } rotaryio_incrementalencoder_obj_t; diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index ddbd0ec63b..cece99afa9 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -26,6 +26,7 @@ CIRCUITPY_BITOPS ?= 1 CIRCUITPY_PWMIO ?= 1 CIRCUITPY_RGBMATRIX ?= 1 CIRCUITPY_ROTARYIO ?= 1 +CIRCUITPY_ROTARYIO_SOFTENCODER = 1 # Things that need to be implemented. # Use PWM interally diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index bb177c5d07..0eedfe5249 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -518,6 +518,7 @@ SRC_SHARED_MODULE_ALL = \ random/__init__.c \ rgbmatrix/RGBMatrix.c \ rgbmatrix/__init__.c \ + rotaryio/IncrementalEncoder.c \ sharpdisplay/SharpMemoryFramebuffer.c \ sharpdisplay/__init__.c \ socket/__init__.c \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 2a4467d493..51b590dcf3 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -271,6 +271,9 @@ CFLAGS += -DCIRCUITPY_RGBMATRIX=$(CIRCUITPY_RGBMATRIX) CIRCUITPY_ROTARYIO ?= 1 CFLAGS += -DCIRCUITPY_ROTARYIO=$(CIRCUITPY_ROTARYIO) +CIRCUITPY_ROTARYIO_SOFTENCODER ?= 0 +CFLAGS += -DCIRCUITPY_ROTARYIO_SOFTENCODER=$(CIRCUITPY_ROTARYIO_SOFTENCODER) + CIRCUITPY_RTC ?= 1 CFLAGS += -DCIRCUITPY_RTC=$(CIRCUITPY_RTC) diff --git a/shared-module/rotaryio/IncrementalEncoder.c b/shared-module/rotaryio/IncrementalEncoder.c new file mode 100644 index 0000000000..ca7c154811 --- /dev/null +++ b/shared-module/rotaryio/IncrementalEncoder.c @@ -0,0 +1,84 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#if CIRCUITPY_ROTARYIO && CIRCUITPY_ROTARYIO_SOFTENCODER +#include "shared-module/rotaryio/IncrementalEncoder.h" +#include "common-hal/rotaryio/IncrementalEncoder.h" + +void shared_module_softencoder_state_init(rotaryio_incrementalencoder_obj_t *self, uint8_t quiescent_state) { + self->state = quiescent_state; + self->quarter_count = 0; + common_hal_rotaryio_incrementalencoder_set_position(self, 0); +} + +void shared_module_softencoder_state_update(rotaryio_incrementalencoder_obj_t *self, uint8_t new_state) { + #define BAD 7 + static const int8_t transitions[16] = { + 0, // 00 -> 00 no movement + -1, // 00 -> 01 3/4 ccw (11 detent) or 1/4 ccw (00 at detent) + +1, // 00 -> 10 3/4 cw or 1/4 cw + BAD, // 00 -> 11 non-Gray-code transition + +1, // 01 -> 00 2/4 or 4/4 cw + 0, // 01 -> 01 no movement + BAD, // 01 -> 10 non-Gray-code transition + -1, // 01 -> 11 4/4 or 2/4 ccw + -1, // 10 -> 00 2/4 or 4/4 ccw + BAD, // 10 -> 01 non-Gray-code transition + 0, // 10 -> 10 no movement + +1, // 10 -> 11 4/4 or 2/4 cw + BAD, // 11 -> 00 non-Gray-code transition + +1, // 11 -> 01 1/4 or 3/4 cw + -1, // 11 -> 10 1/4 or 3/4 ccw + 0, // 11 -> 11 no movement + }; + + new_state &= 0x3; + int idx = (self->state << 2) | new_state; + self->state = new_state; + + int8_t quarter_incr = transitions[idx]; + if (quarter_incr == BAD) { + // Missed a transition. We don't know which way we're going, so do nothing. + return; + } + + if (self->quarter_count >= 4) { + self->position += 1; + self->quarter_count = 0; + } else if (self->quarter_count <= -4) { + self->position -= 1; + self->quarter_count = 0; + } +} + +mp_int_t common_hal_rotaryio_incrementalencoder_get_position(rotaryio_incrementalencoder_obj_t *self) { + return self->position; +} + +void common_hal_rotaryio_incrementalencoder_set_position(rotaryio_incrementalencoder_obj_t *self, mp_int_t position) { + self->position = position; +} +#endif diff --git a/shared-module/rotaryio/IncrementalEncoder.h b/shared-module/rotaryio/IncrementalEncoder.h new file mode 100644 index 0000000000..82a5644b47 --- /dev/null +++ b/shared-module/rotaryio/IncrementalEncoder.h @@ -0,0 +1,34 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "common-hal/rotaryio/IncrementalEncoder.h" + +void shared_module_softencoder_state_init(rotaryio_incrementalencoder_obj_t *self, uint8_t quiescent_state); +void shared_module_softencoder_state_update(rotaryio_incrementalencoder_obj_t *self, uint8_t new_state); +mp_int_t common_hal_rotaryio_incrementalencoder_get_position(rotaryio_incrementalencoder_obj_t *self); +void common_hal_rotaryio_incrementalencoder_set_position(rotaryio_incrementalencoder_obj_t *self, mp_int_t position); From 3aec1032f7168e116cebbdf9ada7631d22ab9fb9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 8 Apr 2021 16:32:36 -0500 Subject: [PATCH 235/261] atmel-samd: switch to shared softencoder implementation --- .../common-hal/rotaryio/IncrementalEncoder.c | 65 ++----------------- .../common-hal/rotaryio/IncrementalEncoder.h | 2 +- ports/atmel-samd/mpconfigport.mk | 2 + 3 files changed, 8 insertions(+), 61 deletions(-) diff --git a/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c b/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c index 0922718f96..4b74b438ff 100644 --- a/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c @@ -25,6 +25,7 @@ */ #include "common-hal/rotaryio/IncrementalEncoder.h" +#include "shared-module/rotaryio/IncrementalEncoder.h" #include "atmel_start_pins.h" @@ -68,11 +69,9 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode self->position = 0; self->quarter_count = 0; - // Top two bits of self->last_state don't matter, because they'll be gone as soon as - // interrupt handler is called. - self->last_state = + shared_module_softencoder_state_init(self, ((uint8_t) gpio_get_pin_level(self->pin_a) << 1) | - (uint8_t) gpio_get_pin_level(self->pin_b); + (uint8_t) gpio_get_pin_level(self->pin_b)); claim_pin(pin_a); claim_pin(pin_b); @@ -106,66 +105,12 @@ void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_o self->pin_b = NO_PIN; } -mp_int_t common_hal_rotaryio_incrementalencoder_get_position(rotaryio_incrementalencoder_obj_t* self) { - return self->position; -} - -void common_hal_rotaryio_incrementalencoder_set_position(rotaryio_incrementalencoder_obj_t* self, - mp_int_t new_position) { - self->position = new_position; -} - void incrementalencoder_interrupt_handler(uint8_t channel) { rotaryio_incrementalencoder_obj_t* self = get_eic_channel_data(channel); - // This table also works for detent both at 11 and 00 - // For 11 at detent: - // Turning cw: 11->01->00->10->11 - // Turning ccw: 11->10->00->01->11 - // For 00 at detent: - // Turning cw: 00->10->11->10->00 - // Turning ccw: 00->01->11->10->00 - - // index table by state - #define BAD 7 - static const int8_t transitions[16] = { - 0, // 00 -> 00 no movement - -1, // 00 -> 01 3/4 ccw (11 detent) or 1/4 ccw (00 at detent) - +1, // 00 -> 10 3/4 cw or 1/4 cw - BAD, // 00 -> 11 non-Gray-code transition - +1, // 01 -> 00 2/4 or 4/4 cw - 0, // 01 -> 01 no movement - BAD, // 01 -> 10 non-Gray-code transition - -1, // 01 -> 11 4/4 or 2/4 ccw - -1, // 10 -> 00 2/4 or 4/4 ccw - BAD, // 10 -> 01 non-Gray-code transition - 0, // 10 -> 10 no movement - +1, // 10 -> 11 4/4 or 2/4 cw - BAD, // 11 -> 00 non-Gray-code transition - +1, // 11 -> 01 1/4 or 3/4 cw - -1, // 11 -> 10 1/4 or 3/4 ccw - 0, // 11 -> 11 no movement - }; - - // Shift the old AB bits to the "old" position, and set the new AB bits. - // TODO(tannewt): If we need more speed then read the pin directly. gpio_get_pin_level has - // smarts to compensate for pin direction we don't need. - self->last_state = (self->last_state & 0x3) << 2 | + uint8_t new_state = ((uint8_t) gpio_get_pin_level(self->pin_a) << 1) | (uint8_t) gpio_get_pin_level(self->pin_b); - int8_t quarter_incr = transitions[self->last_state]; - if (quarter_incr == BAD) { - // Missed a transition. We don't know which way we're going, so do nothing. - return; - } - - self->quarter_count += quarter_incr; - if (self->quarter_count >= 4) { - self->position += 1; - self->quarter_count = 0; - } else if (self->quarter_count <= -4) { - self->position -= 1; - self->quarter_count = 0; - } + shared_module_softencoder_state_update(self, new_state); } diff --git a/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.h b/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.h index e07cc84d5d..1e2430c4ba 100644 --- a/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.h +++ b/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.h @@ -37,7 +37,7 @@ typedef struct { uint8_t pin_b; uint8_t eic_channel_a:4; uint8_t eic_channel_b:4; - uint8_t last_state:4; // + uint8_t state:4; // int8_t quarter_count:4; // count intermediate transitions between detents mp_int_t position; } rotaryio_incrementalencoder_obj_t; diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 7be9e203a8..2962035cb9 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -25,6 +25,8 @@ USB_SERIAL_NUMBER_LENGTH = 32 # Number of USB endpoint pairs. USB_NUM_EP = 8 +CIRCUITPY_ROTARYIO_SOFTENCODER = 1 + ###################################################################### # Put samd21-only choices here. From d69ca4a8aeb3421d8a2a4033bcfe56e39fbf67c7 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 8 Apr 2021 16:36:10 -0500 Subject: [PATCH 236/261] nrf: switch to shared softencoder implementation --- .../common-hal/rotaryio/IncrementalEncoder.c | 30 ++----------------- .../common-hal/rotaryio/IncrementalEncoder.h | 4 +-- ports/nrf/mpconfigport.mk | 1 + 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c b/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c index ef5e9ee5ae..85030135bf 100644 --- a/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c @@ -25,6 +25,7 @@ */ #include "common-hal/rotaryio/IncrementalEncoder.h" +#include "shared-module/rotaryio/IncrementalEncoder.h" #include "nrfx_gpiote.h" #include "py/runtime.h" @@ -44,25 +45,7 @@ static void _intr_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { uint8_t new_state = nrf_gpio_pin_read(self->pin_a); new_state = (new_state << 1) + (new_state ^ nrf_gpio_pin_read(self->pin_b)); - uint8_t change = (new_state - self->state) & 0x03; - if (change == 1) { - self->quarter++; - } else if (change == 3) { - self->quarter--; - } - // ignore other state transitions - - self->state = new_state; - - // logic from the atmel-samd port: provides some damping and scales movement - // down by 4:1. - if (self->quarter >= 4) { - self->position++; - self->quarter = 0; - } else if (self->quarter <= -4) { - self->position--; - self->quarter = 0; - } + shared_module_softencoder_state_update(self, new_state); } void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencoder_obj_t *self, @@ -110,12 +93,3 @@ void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_o self->pin_a = NO_PIN; self->pin_b = NO_PIN; } - -mp_int_t common_hal_rotaryio_incrementalencoder_get_position(rotaryio_incrementalencoder_obj_t *self) { - return self->position; -} - -void common_hal_rotaryio_incrementalencoder_set_position(rotaryio_incrementalencoder_obj_t *self, - mp_int_t new_position) { - self->position = new_position; -} diff --git a/ports/nrf/common-hal/rotaryio/IncrementalEncoder.h b/ports/nrf/common-hal/rotaryio/IncrementalEncoder.h index 1d0fe41839..1f1d1a7640 100644 --- a/ports/nrf/common-hal/rotaryio/IncrementalEncoder.h +++ b/ports/nrf/common-hal/rotaryio/IncrementalEncoder.h @@ -35,8 +35,8 @@ typedef struct { mp_obj_base_t base; uint8_t pin_a; uint8_t pin_b; - uint8_t state; - int8_t quarter; + int8_t quarter_count : 4; + uint8_t state : 4; mp_int_t position; } rotaryio_incrementalencoder_obj_t; diff --git a/ports/nrf/mpconfigport.mk b/ports/nrf/mpconfigport.mk index 83924ff795..544be70be4 100644 --- a/ports/nrf/mpconfigport.mk +++ b/ports/nrf/mpconfigport.mk @@ -40,6 +40,7 @@ CIRCUITPY_RTC ?= 1 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_RGBMATRIX ?= 1 +CIRCUITPY_ROTARYIO_SOFTENCODER = 1 CIRCUITPY_FRAMEBUFFERIO ?= 1 CIRCUITPY_COUNTIO = 0 From fdc5bb41f4228d9271aa36ba63dc8210ac8601db Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 8 Apr 2021 19:11:27 -0400 Subject: [PATCH 237/261] D3 pin should be GPIO26 --- ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c index 150aa374ed..e9e726f35a 100644 --- a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c @@ -11,7 +11,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO27) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO24) }, From c672b337708b6dbed1744e2e6625853f29ca1692 Mon Sep 17 00:00:00 2001 From: Kevin Lutzer Date: Thu, 8 Apr 2021 21:53:38 -0600 Subject: [PATCH 238/261] add W25Q64JVxQ as a supported flash for stm32f411 black pill --- .../boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk index ed124ce27e..f5be38409b 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk @@ -5,7 +5,7 @@ USB_MANUFACTURER = "Unknown" SPI_FLASH_FILESYSTEM = 1 #See supervisor/shared/external_flash/devices.h for options -EXTERNAL_FLASH_DEVICES = GD25Q16C,W25Q64FV,W25Q64JVxQ +EXTERNAL_FLASH_DEVICES = GD25Q16C,W25Q64FV,W25Q64JVxQ,W25Q32JVxQ LONGINT_IMPL = MPZ INTERNAL_FLASH_FILESYSTEM = 0 From 4fb3139273c8d78aed379c7c82878a3564f64eee Mon Sep 17 00:00:00 2001 From: Kevin Lutzer Date: Thu, 8 Apr 2021 21:56:25 -0600 Subject: [PATCH 239/261] switch orders the flash memory is listed --- .../boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk index f5be38409b..76acd7ed1e 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk @@ -5,7 +5,7 @@ USB_MANUFACTURER = "Unknown" SPI_FLASH_FILESYSTEM = 1 #See supervisor/shared/external_flash/devices.h for options -EXTERNAL_FLASH_DEVICES = GD25Q16C,W25Q64FV,W25Q64JVxQ,W25Q32JVxQ +EXTERNAL_FLASH_DEVICES = GD25Q16C,W25Q64FV,W25Q32JVxQ,W25Q64JVxQ LONGINT_IMPL = MPZ INTERNAL_FLASH_FILESYSTEM = 0 From ca6dda4d2bff6a2e36f62237cac4b9991c409aa5 Mon Sep 17 00:00:00 2001 From: felixerdy Date: Fri, 9 Apr 2021 08:35:13 +0200 Subject: [PATCH 240/261] reorder alias --- ports/atmel-samd/boards/sensebox_mcu/pins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/boards/sensebox_mcu/pins.c b/ports/atmel-samd/boards/sensebox_mcu/pins.c index 4e0bd14350..55afcc989e 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/pins.c +++ b/ports/atmel-samd/boards/sensebox_mcu/pins.c @@ -28,12 +28,12 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // UART pins { MP_ROM_QSTR(MP_QSTR_UART_PWR), MP_ROM_PTR(&pin_PB02) }, - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA22) }, - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_PB09) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA22) }, // alias of TX1 + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA23) }, // alias of RX1 // SPI pins { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) }, From ddca91020e5f86bfe65ee49eb6adfe4efba6ed37 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 9 Apr 2021 09:28:20 -0400 Subject: [PATCH 241/261] Revert "add robots.txt to specify doc versions to appear in search engines" --- conf.py | 2 +- docs/robots.txt | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 docs/robots.txt diff --git a/conf.py b/conf.py index 43ff72d1a2..44f86f6361 100644 --- a/conf.py +++ b/conf.py @@ -284,7 +284,7 @@ html_static_path = ['docs/static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. -html_extra_path = ["docs/robots.txt"] +#html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/docs/robots.txt b/docs/robots.txt deleted file mode 100644 index ad3189d42c..0000000000 --- a/docs/robots.txt +++ /dev/null @@ -1,6 +0,0 @@ -User-agent: * -Allow: /*/latest/ -Allow: /en/latest/ # Fallback for bots that don't understand wildcards -Allow: /*/6.0.x/ -Allow: /en/6.0.x/ # Fallback for bots that don't understand wildcards -Disallow: / From 280aefffb76fa388d8ae78b3146e649125954941 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 9 Apr 2021 08:47:40 -0500 Subject: [PATCH 242/261] IncrementalEncoder: Re-add missing update of quarter_count This lost line caused incremental encoders to stay stuck at 0 forever. I seem to have lost it while trying to create tidy commits :frown: --- shared-module/rotaryio/IncrementalEncoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared-module/rotaryio/IncrementalEncoder.c b/shared-module/rotaryio/IncrementalEncoder.c index ca7c154811..330895606e 100644 --- a/shared-module/rotaryio/IncrementalEncoder.c +++ b/shared-module/rotaryio/IncrementalEncoder.c @@ -65,6 +65,8 @@ void shared_module_softencoder_state_update(rotaryio_incrementalencoder_obj_t *s return; } + self->quarter_count += quarter_incr; + if (self->quarter_count >= 4) { self->position += 1; self->quarter_count = 0; From 61e33a56197d939d87ac1919a8569b152a3c8700 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 9 Apr 2021 11:07:47 -0400 Subject: [PATCH 243/261] fix nrf ISR; make direction consistent across ports; save code size --- .../common-hal/rotaryio/IncrementalEncoder.h | 8 ++++---- ports/nrf/common-hal/rotaryio/IncrementalEncoder.c | 6 +++--- ports/nrf/common-hal/rotaryio/IncrementalEncoder.h | 4 ++-- .../common-hal/rotaryio/IncrementalEncoder.c | 10 ++++++++++ .../common-hal/rotaryio/IncrementalEncoder.h | 5 +++-- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.h b/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.h index 1e2430c4ba..2560997a97 100644 --- a/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.h +++ b/ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.h @@ -35,10 +35,10 @@ typedef struct { mp_obj_base_t base; uint8_t pin_a; uint8_t pin_b; - uint8_t eic_channel_a:4; - uint8_t eic_channel_b:4; - uint8_t state:4; // - int8_t quarter_count:4; // count intermediate transitions between detents + uint8_t eic_channel_a; + uint8_t eic_channel_b; + uint8_t state; // + int8_t quarter_count; // count intermediate transitions between detents mp_int_t position; } rotaryio_incrementalencoder_obj_t; diff --git a/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c b/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c index 85030135bf..8b46c3bd79 100644 --- a/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c @@ -41,9 +41,9 @@ static void _intr_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { return; } - // reads a state 0 .. 3 *in order*. - uint8_t new_state = nrf_gpio_pin_read(self->pin_a); - new_state = (new_state << 1) + (new_state ^ nrf_gpio_pin_read(self->pin_b)); + uint8_t new_state = + ((uint8_t) nrf_gpio_pin_read(self->pin_a) << 1) | + (uint8_t) nrf_gpio_pin_read(self->pin_b); shared_module_softencoder_state_update(self, new_state); } diff --git a/ports/nrf/common-hal/rotaryio/IncrementalEncoder.h b/ports/nrf/common-hal/rotaryio/IncrementalEncoder.h index 1f1d1a7640..3693131056 100644 --- a/ports/nrf/common-hal/rotaryio/IncrementalEncoder.h +++ b/ports/nrf/common-hal/rotaryio/IncrementalEncoder.h @@ -35,8 +35,8 @@ typedef struct { mp_obj_base_t base; uint8_t pin_a; uint8_t pin_b; - int8_t quarter_count : 4; - uint8_t state : 4; + uint8_t state; // + int8_t quarter_count; // count intermediate transitions between detents mp_int_t position; } rotaryio_incrementalencoder_obj_t; diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index 10785c172c..045f111ca3 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -61,9 +61,12 @@ STATIC void incrementalencoder_interrupt_handler(void *self_in); void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencoder_obj_t *self, const mcu_pin_obj_t *pin_a, const mcu_pin_obj_t *pin_b) { mp_obj_t pins[] = {MP_OBJ_FROM_PTR(pin_a), MP_OBJ_FROM_PTR(pin_b)}; + // Start out with swapped to match behavior with other ports. + self->swapped = true; if (!common_hal_rp2pio_pins_are_sequential(2, pins)) { pins[0] = MP_OBJ_FROM_PTR(pin_b); pins[1] = MP_OBJ_FROM_PTR(pin_a); + self->swapped = false; if (!common_hal_rp2pio_pins_are_sequential(2, pins)) { mp_raise_RuntimeError(translate("Pins must be sequential")); } @@ -115,6 +118,13 @@ STATIC void incrementalencoder_interrupt_handler(void *self_in) { // Bypass all the logic of StateMachine.c:_transfer, we need something // very simple and fast for an interrupt! uint8_t new_state = self->state_machine.pio->rxf[self->state_machine.state_machine]; + if (self->swapped) { + if (new_state == 0x1) { + new_state = 0x2; + } else if (new_state == 0x2) { + new_state = 0x1; + } + } shared_module_softencoder_state_update(self, new_state); } } diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h index f794560275..6745d95a1c 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h @@ -34,7 +34,8 @@ typedef struct { mp_obj_base_t base; rp2pio_statemachine_obj_t state_machine; - uint8_t state : 4; // - int8_t quarter_count : 4; // count intermediate transitions between detents + uint8_t state; // + int8_t quarter_count; // count intermediate transitions between detents + bool swapped; // Did the pins need to be swapped to be sequential? mp_int_t position; } rotaryio_incrementalencoder_obj_t; From 991413a469415e7bb4d246da6fa066f993c8014f Mon Sep 17 00:00:00 2001 From: Jose David M Date: Thu, 8 Apr 2021 18:30:51 +0000 Subject: [PATCH 244/261] Translated using Weblate (Spanish) Currently translated at 100.0% (969 of 969 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/es.po b/locale/es.po index 2f7a7a7b9c..8c630ebd4d 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-04-05 22:35+0000\n" +"PO-Revision-Date: 2021-04-09 19:26+0000\n" "Last-Translator: Jose David M \n" "Language-Team: \n" "Language: es\n" @@ -426,7 +426,7 @@ msgstr "El pin proporcionado no soporta AnalogOut" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" -msgstr "" +msgstr "Otra salida PWMAudioOut esta ya activada" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c @@ -1007,7 +1007,7 @@ msgstr "Fallo al tomar memoria para búsqueda wifi" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Failed to buffer the sample" -msgstr "" +msgstr "Fallo al hacer el búfer de la muestra" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" From eacb7dbe58acc14ac49b89615c0e241d6fe17cc2 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 8 Apr 2021 13:33:14 -0700 Subject: [PATCH 245/261] Don't block serial output in interrupt The interrupt may have a higher priority than the serial output's (USB) interrupt and may never make room. This makes prints from interrupts (like the BLE event calls) best effort for what can be queued up. The rest of the output will be dropped. --- supervisor/shared/cpu.c | 40 ++++++++++++++++++++++++++++++++++++++ supervisor/shared/cpu.h | 36 ++++++++++++++++++++++++++++++++++ supervisor/shared/serial.c | 5 +++++ supervisor/supervisor.mk | 1 + 4 files changed, 82 insertions(+) create mode 100644 supervisor/shared/cpu.c create mode 100644 supervisor/shared/cpu.h diff --git a/supervisor/shared/cpu.c b/supervisor/shared/cpu.c new file mode 100644 index 0000000000..510225d197 --- /dev/null +++ b/supervisor/shared/cpu.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include + +#include "supervisor/shared/cpu.h" + +bool cpu_interrupt_active(void) { + #if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) + // Check VECTACTIVE in ICSR. We don't need to disable interrupts because if + // one occurs after we read, we won't continue until it is resolved. + return (*((volatile uint32_t *)0xE000ED04) & 0x1ff) != 0; + #else + // We don't know. + return false; + #endif +} diff --git a/supervisor/shared/cpu.h b/supervisor/shared/cpu.h new file mode 100644 index 0000000000..9e2bed1e55 --- /dev/null +++ b/supervisor/shared/cpu.h @@ -0,0 +1,36 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SUPERVISOR_SHARED_CPU_H +#define MICROPY_INCLUDED_SUPERVISOR_SHARED_CPU_H + +#include +#include + +// True when we're in an interrupt handler. +bool cpu_interrupt_active(void); + +#endif // MICROPY_INCLUDED_SUPERVISOR_SHARED_CPU_H diff --git a/supervisor/shared/serial.c b/supervisor/shared/serial.c index 268cebdbba..bd2bf4ba22 100644 --- a/supervisor/shared/serial.c +++ b/supervisor/shared/serial.c @@ -28,6 +28,7 @@ #include "py/mpconfig.h" +#include "supervisor/shared/cpu.h" #include "supervisor/shared/display.h" #include "shared-bindings/terminalio/Terminal.h" #include "supervisor/serial.h" @@ -136,6 +137,10 @@ void serial_write_substring(const char *text, uint32_t length) { uint32_t count = 0; while (count < length && tud_cdc_connected()) { count += tud_cdc_write(text + count, length - count); + // If we're in an interrupt, then don't wait for more room. Queue up what we can. + if (cpu_interrupt_active()) { + break; + } usb_background(); } diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 1744c4f47f..c206ff96be 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -4,6 +4,7 @@ SRC_SUPERVISOR = \ supervisor/shared/autoreload.c \ supervisor/shared/background_callback.c \ supervisor/shared/board.c \ + supervisor/shared/cpu.c \ supervisor/shared/filesystem.c \ supervisor/shared/flash.c \ supervisor/shared/micropython.c \ From 36f3897fe3350004efbbebc3b870a25de308aa95 Mon Sep 17 00:00:00 2001 From: Hugo Dahl Date: Sat, 10 Apr 2021 18:36:53 -0500 Subject: [PATCH 246/261] Make error messages platform agnostic Remove mentions of 'MicroPython' in error messages as they could lead to confusion in lesser-experienced users --- locale/circuitpython.pot | 33 +++++++++++++++------------------ py/compile.c | 2 +- supervisor/shared/safe_mode.c | 6 +++--- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 9148569ecd..ae056d666e 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -434,7 +434,7 @@ msgid "Attempt to allocate %d blocks" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." msgstr "" #: shared-bindings/wifi/Radio.c @@ -999,6 +999,10 @@ msgstr "" msgid "Failed to write internal flash." msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "" @@ -1171,6 +1175,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Invalid %q pin" msgstr "" @@ -1386,14 +1391,6 @@ msgstr "" msgid "Messages limited to 8 bytes" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "" - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "" @@ -1445,6 +1442,10 @@ msgstr "" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1877,7 +1878,7 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c +#: shared-module/displayio/Bitmap.c msgid "Read-only object" msgstr "" @@ -1952,14 +1953,6 @@ msgstr "" msgid "Scan already in progess. Stop with stop_scan." msgstr "" -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected CTS pin not valid" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Selected RTS pin not valid" -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" @@ -3193,6 +3186,10 @@ msgstr "" msgid "invalid cert" msgstr "" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "" diff --git a/py/compile.c b/py/compile.c index 4a9fdc7db8..7971690d6d 100644 --- a/py/compile.c +++ b/py/compile.c @@ -768,7 +768,7 @@ STATIC bool compile_built_in_decorator(compiler_t *comp, int name_len, mp_parse_ } if (name_len != 2) { - compile_syntax_error(comp, name_nodes[0], translate("invalid micropython decorator")); + compile_syntax_error(comp, name_nodes[0], translate("invalid decorator")); return true; } diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index e8778216a6..184d3658a8 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -170,13 +170,13 @@ void print_safe_mode_message(safe_mode_t reason) { serial_write_compressed(translate("Crash into the HardFault_Handler.")); return; case MICROPY_NLR_JUMP_FAIL: - serial_write_compressed(translate("MicroPython NLR jump failed. Likely memory corruption.")); + serial_write_compressed(translate("NLR jump failed. Likely memory corruption.")); return; case MICROPY_FATAL_ERROR: - serial_write_compressed(translate("MicroPython fatal error.")); + serial_write_compressed(translate("Fatal error.")); break; case GC_ALLOC_OUTSIDE_VM: - serial_write_compressed(translate("Attempted heap allocation when MicroPython VM not running.")); + serial_write_compressed(translate("Attempted heap allocation when VM not running.")); break; #ifdef SOFTDEVICE_PRESENT // defined in ports/nrf/bluetooth/bluetooth_common.mk From 8956ad8f15ecc36ca0d3cc7a19842e336ed03af8 Mon Sep 17 00:00:00 2001 From: Hugo Dahl Date: Sat, 10 Apr 2021 18:21:35 +0000 Subject: [PATCH 247/261] Translated using Weblate (French) Currently translated at 100.0% (969 of 969 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 80 ++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 19d98f770a..f26ab1b51e 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-04-03 21:57+0000\n" +"PO-Revision-Date: 2021-04-11 01:30+0000\n" "Last-Translator: Hugo Dahl \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -426,7 +426,7 @@ msgstr "'AnalogOut' n'est pas supporté sur la broche indiquée" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" -msgstr "" +msgstr "Un autre PWMAudioOut est déjà actif" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c @@ -435,11 +435,11 @@ msgstr "Un autre envoi est déjà actif" #: shared-bindings/pulseio/PulseOut.c msgid "Array must contain halfwords (type 'H')" -msgstr "Le tableau doit contenir des demi-mots (type 'H')" +msgstr "La matrice doit contenir des demi-mots (type 'H')" #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Array values should be single bytes." -msgstr "Les valeurs du tableau doivent être des octets singuliers." +msgstr "Les valeurs de la matrice doivent être des octets singuliers." #: shared-bindings/microcontroller/Pin.c msgid "At most %d %q may be specified (not %d)" @@ -973,7 +973,7 @@ msgstr "La FFT est définie uniquement pour les ndarrays" #: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" -msgstr "FFT n'est implémenté que pour les tableaux linéaires" +msgstr "FFT n'est implémenté que pour les matrices linéaires" #: ports/esp32s2/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" @@ -1014,7 +1014,7 @@ msgstr "Impossible d'allouer la mémoire pour le scan wifi" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Failed to buffer the sample" -msgstr "" +msgstr "Échec du tamponage de l'échantillon" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" @@ -2494,11 +2494,11 @@ msgstr "l'argument est une séquence vide" #: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort argument must be an ndarray" -msgstr "L'argument argsort doit être un ndarray" +msgstr "Le paramêtre argsort doit être un ndarray" #: extmod/ulab/code/numpy/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" -msgstr "argsort n'est pas mis en œuvre pour les tableaux aplatis" +msgstr "argsort n'est pas mis en œuvre pour les matrices aplatis" #: py/runtime.c msgid "argument has wrong type" @@ -2520,12 +2520,12 @@ msgstr "les paramètres doivent être des ndarrays" #: extmod/ulab/code/ndarray.c msgid "array and index length must be equal" -msgstr "la longueur du tableau et de l'index doivent être égaux" +msgstr "la taille de la matrice et de l'index doivent être égaux" #: py/objarray.c shared-bindings/alarm/SleepMemory.c #: shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" -msgstr "tableau/octets requis à droite" +msgstr "matrice/octets requis à la droite" #: extmod/ulab/code/numpy/numerical/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" @@ -2828,8 +2828,7 @@ msgstr "" #: shared-bindings/displayio/Palette.c msgid "color buffer must be a bytearray or array of type 'b' or 'B'" -msgstr "" -"le tampon de couleur doit être un bytearray ou un tableau de type 'b' ou 'B'" +msgstr "tampon color doit être un bytearray ou une matrice de type 'b' ou 'B'" #: shared-bindings/displayio/Palette.c msgid "color must be between 0x000000 and 0xffffff" @@ -2861,11 +2860,11 @@ msgstr "conversion en objet" #: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be linear arrays" -msgstr "les arguments convolve doivent être des tableaux linéaires" +msgstr "les paramêtres pour convolve doivent être des matrices linéaires" #: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must be ndarrays" -msgstr "les arguments convolve doivent être des ndarrays" +msgstr "les paramêtres pour convolve doivent être des ndarrays" #: extmod/ulab/code/numpy/filter/filter.c msgid "convolve arguments must not be empty" @@ -2881,7 +2880,7 @@ msgstr "impossible de déterminer la version de la carte SD" #: extmod/ulab/code/numpy/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" -msgstr "cross est défini pour les tableaux 1D de longueur 3" +msgstr "cross est défini pour les matrices 1D de longueur 3" #: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" @@ -2911,12 +2910,13 @@ msgstr "default n'est pas une fonction" msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" msgstr "" -"le tampon de destination doit être un tableau de type 'B' pour bit_depth = 8" +"le tampon de destination doit être une matrice de type 'B' pour bit_depth = 8" #: shared-bindings/audiobusio/PDMIn.c msgid "destination buffer must be an array of type 'H' for bit_depth = 16" msgstr "" -"le tampon de destination doit être un tableau de type 'H' pour bit_depth = 16" +"le tampon de destination doit être une matrice de type 'H' pour bit_depth = " +"16" #: shared-bindings/audiobusio/PDMIn.c msgid "destination_length must be an int >= 0" @@ -2928,7 +2928,7 @@ msgstr "la séquence de mise à jour de dict a une mauvaise longueur" #: extmod/ulab/code/numpy/numerical/numerical.c msgid "diff argument must be an ndarray" -msgstr "l'argument diff doit être un ndarray" +msgstr "le paramêtre diff doit être un ndarray" #: extmod/ulab/code/numpy/numerical/numerical.c msgid "differentiation order out of range" @@ -3065,11 +3065,11 @@ msgstr "le premier argument doit être une fonction" #: extmod/ulab/code/ulab_create.c msgid "first argument must be a tuple of ndarrays" -msgstr "le premier argument doit être un tuple de ndarrays" +msgstr "le premier paramêtre doit être un tuple de ndarrays" #: extmod/ulab/code/numpy/vector/vector.c msgid "first argument must be an ndarray" -msgstr "le premier argument doit être un ndarray" +msgstr "le premier paramêtre doit être un ndarray" #: py/objtype.c msgid "first argument to super() must be type" @@ -3081,7 +3081,7 @@ msgstr "l'ordre d'aplatissement doit être «C» ou «F»" #: extmod/ulab/code/numpy/numerical/numerical.c msgid "flip argument must be an ndarray" -msgstr "l'argument flip doit être un ndarray" +msgstr "le paramêtre flip doit être un ndarray" #: py/objint.c msgid "float too big" @@ -3118,7 +3118,7 @@ msgstr "la fonction a le même signe aux extrémités de l’intervalle" #: extmod/ulab/code/ndarray.c msgid "function is defined for ndarrays only" -msgstr "La fonction n'est définie que pour les ndarrays" +msgstr "fonction définie que pour les ndarrays" #: py/argcheck.c #, c-format @@ -3224,11 +3224,11 @@ msgstr "Paramètre entrant doit être un chiffre entier, un tuple, ou une liste" #: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" -msgstr "la longueur du tableau d'entrée doit être une puissance de 2" +msgstr "longueur de la matrice d'entrée doit être une puissance de 2" #: extmod/ulab/code/ulab_create.c msgid "input arrays are not compatible" -msgstr "les tableaux d'entrée ne sont pas compatibles" +msgstr "les matrices d'entrée ne sont pas compatibles" #: extmod/ulab/code/numpy/poly/poly.c msgid "input data must be an iterable" @@ -3244,7 +3244,7 @@ msgstr "la matrice d'entrée est singulière" #: extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" -msgstr "l'entrée doit être un tableau dense" +msgstr "l'entrée doit être un ndarray dense" #: extmod/ulab/code/ulab_create.c msgid "input must be a tensor of rank 2" @@ -3284,7 +3284,7 @@ msgstr "entier requis" #: extmod/ulab/code/numpy/approx/approx.c msgid "interp is defined for 1D arrays of equal length" -msgstr "interp est défini pour les tableaux 1D de longueur égale" +msgstr "interp est défini pour les matrices 1D de longueur égale" #: shared-bindings/_bleio/Adapter.c #, c-format @@ -3718,11 +3718,11 @@ msgstr "les opérandes ne pouvaient pas être diffusés ensemble" #: extmod/ulab/code/ndarray.c msgid "operation is implemented for 1D Boolean arrays only" -msgstr "opération implémentée que pour des tableaux 1D booléennes" +msgstr "opération implémentée que pour les matrices 1D booléennes" #: extmod/ulab/code/numpy/numerical/numerical.c msgid "operation is not implemented on ndarrays" -msgstr "l'opération n'est pas implémentée sur les ndarrays" +msgstr "l'opération n'est pas implémentée pour les ndarrays" #: extmod/ulab/code/ndarray.c msgid "operation is not supported for given type" @@ -3741,11 +3741,11 @@ msgstr "" #: extmod/ulab/code/utils/utils.c msgid "out array is too small" -msgstr "" +msgstr "matrice de sortie est trop petite" #: extmod/ulab/code/utils/utils.c msgid "out must be a float dense array" -msgstr "" +msgstr "la matrice sortante doit être de type float" #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" @@ -3924,8 +3924,8 @@ msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" msgstr "" -"le tampon de sample_source doit être un bytearray ou un tableau de type " -"'h','H', 'b' ou 'B'" +"tampon sample_source doit être un bytearray ou une matrice de type 'h', 'H', " +"'b' ou 'B'" #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/raspberrypi/common-hal/audiobusio/PDMIn.c @@ -3962,7 +3962,7 @@ msgstr "'}' seule rencontrée dans une chaîne de format" #: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" -msgstr "la taille est définie pour les ndarrays uniquement" +msgstr "la taille n'est définie que pour les ndarrays" #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" @@ -3986,11 +3986,11 @@ msgstr "redémarrage logiciel\n" #: extmod/ulab/code/numpy/numerical/numerical.c msgid "sort argument must be an ndarray" -msgstr "l'argument de «sort» doit être un ndarray" +msgstr "le paramètre de «sort» doit être un ndarray" #: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" -msgstr "le tableau sos doit être de forme (n_section, 6)" +msgstr "la matrice sos doit être de forme (n_section, 6)" #: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" @@ -4035,7 +4035,7 @@ msgstr "les indices d'une chaîne doivent être des entiers, pas %q" #: py/stream.c msgid "string not supported; use bytes or bytearray" msgstr "" -"chaîne de carac. non supportée ; utilisez des bytes ou un tableau de bytes" +"chaîne de carac. non supportée; utilisez des bytes ou une matrice de bytes" #: extmod/moductypes.c msgid "struct: cannot index" @@ -4105,7 +4105,7 @@ msgstr "timestamp hors bornes pour 'time_t' de la plateforme" #: extmod/ulab/code/ndarray.c msgid "tobytes can be invoked for dense arrays only" -msgstr "tobytes ne peut être appelé que pour des tableaux dense" +msgstr "tobytes ne peut être appelée que pour des matrices dense" #: shared-module/struct/__init__.c msgid "too many arguments provided with the given format" @@ -4126,11 +4126,11 @@ msgstr "trop de valeur à dégrouper (%d attendues)" #: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays" -msgstr "trapz est défini pour tableaux à une dimension" +msgstr "trapz est définie pour matrices à une dimension" #: extmod/ulab/code/numpy/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" -msgstr "trapz n'est défini que pour des tableaux 1D de longueur égale" +msgstr "trapz n'est défini que pour des matrices 1D de longueur égales" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "trigger level must be 0 or 1" @@ -4350,7 +4350,7 @@ msgstr "'step' nul" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" -msgstr "zi doit être ndarray" +msgstr "zi doit être un ndarray" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" From b6a3a07fe1d00b0aa072a4fec9dc61cbee5dfd8e Mon Sep 17 00:00:00 2001 From: Hugo Dahl Date: Sat, 10 Apr 2021 18:26:52 +0000 Subject: [PATCH 248/261] Translated using Weblate (English (United Kingdom)) Currently translated at 99.0% (960 of 969 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/en_GB/ --- locale/en_GB.po | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/locale/en_GB.po b/locale/en_GB.po index 135f738872..5a830e8057 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -7,15 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2021-03-25 23:30+0000\n" -"Last-Translator: Gareth Coleman \n" +"PO-Revision-Date: 2021-04-11 01:30+0000\n" +"Last-Translator: Hugo Dahl \n" "Language-Team: none\n" "Language: en_GB\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.5.2-dev\n" +"X-Generator: Weblate 4.6-dev\n" #: main.c msgid "" @@ -447,9 +447,8 @@ msgid "Attempt to allocate %d blocks" msgstr "Attempt to allocate %d blocks" #: supervisor/shared/safe_mode.c -#, fuzzy msgid "Attempted heap allocation when MicroPython VM not running." -msgstr "Attempted heap allocation when CircuitPython VM not running." +msgstr "Attempted heap allocation when MicroPython VM not running." #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1417,9 +1416,8 @@ msgid "Messages limited to 8 bytes" msgstr "Messages limited to 8 bytes" #: supervisor/shared/safe_mode.c -#, fuzzy msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "CircuitPython NLR jump failed. Likely memory corruption." +msgstr "MicroPython NLR jump failed. Likely memory corruption." #: supervisor/shared/safe_mode.c #, fuzzy From 2506ed785555014624ac283815e281fcba8c0533 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Sun, 11 Apr 2021 03:30:44 +0200 Subject: [PATCH 249/261] 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 | 37 +++++++++++++++++++++++++------------ locale/cs.po | 22 +++++++++++++--------- locale/de_DE.po | 38 ++++++++++++++++++++++++++------------ locale/el.po | 22 +++++++++++++--------- locale/en_GB.po | 35 ++++++++++++++++++++++++----------- locale/es.po | 35 ++++++++++++++++++++++++----------- locale/fil.po | 22 +++++++++++++--------- locale/fr.po | 35 ++++++++++++++++++++++++----------- locale/hi.po | 22 +++++++++++++--------- locale/it_IT.po | 27 +++++++++++++++++---------- locale/ja.po | 33 +++++++++++++++++++++++---------- locale/ko.po | 22 +++++++++++++--------- locale/nl.po | 33 +++++++++++++++++++++++---------- locale/pl.po | 35 ++++++++++++++++++++++++----------- locale/pt_BR.po | 35 ++++++++++++++++++++++++----------- locale/sv.po | 33 +++++++++++++++++++++++---------- locale/zh_Latn_pinyin.po | 33 +++++++++++++++++++++++---------- 17 files changed, 345 insertions(+), 174 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index ad5700cb99..52065664d2 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -445,8 +445,8 @@ msgid "Attempt to allocate %d blocks" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." -msgstr "Mencoba alokasi heap ketika MicroPython VM tidak berjalan." +msgid "Attempted heap allocation when VM not running." +msgstr "" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1028,6 +1028,10 @@ msgstr "Gagal melepaskan mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Gagal menulis flash internal." +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "File sudah ada" @@ -1420,14 +1424,6 @@ msgstr "Nilai x maksimum ketika dicerminkan adalah %d" msgid "Messages limited to 8 bytes" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "Lompatan NLR MicroPython gagal. Kemungkinan kerusakan memori." - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "Kesalahan fatal MicroPython." - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "Penundaan mulai mikrofon harus dalam kisaran 0,0 hingga 1,0" @@ -1479,6 +1475,10 @@ msgstr "Harus menyediakan pin MISO atau MOSI" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "Harus menggunakan kelipatan 6 pin rgb, bukan %d" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1847,8 +1847,8 @@ msgstr "Buffer awalan harus ada di heap" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" -"Tekan sembarang tombol untuk masuk ke REPL. Tekan CTRL-D untuk memuat ulang." -"\n" +"Tekan sembarang tombol untuk masuk ke REPL. Tekan CTRL-D untuk memuat " +"ulang.\n" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" @@ -3244,6 +3244,10 @@ msgstr "" msgid "invalid cert" msgstr "cert tidak valid" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "indeks dupterm tidak valid" @@ -4289,6 +4293,15 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "Mencoba alokasi heap ketika MicroPython VM tidak berjalan." + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "Lompatan NLR MicroPython gagal. Kemungkinan kerusakan memori." + +#~ msgid "MicroPython fatal error." +#~ msgstr "Kesalahan fatal MicroPython." + #~ msgid "Nordic Soft Device failure assertion." #~ msgstr "Pernyataan kegagalan Perangkat Lunak Nordic." diff --git a/locale/cs.po b/locale/cs.po index 654023f1f5..475a6a2004 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -441,7 +441,7 @@ msgid "Attempt to allocate %d blocks" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." msgstr "" #: shared-bindings/wifi/Radio.c @@ -1011,6 +1011,10 @@ msgstr "" msgid "Failed to write internal flash." msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "" @@ -1401,14 +1405,6 @@ msgstr "" msgid "Messages limited to 8 bytes" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "" - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "" @@ -1460,6 +1456,10 @@ msgstr "" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -3197,6 +3197,10 @@ msgstr "" msgid "invalid cert" msgstr "" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index e3e2ddbd45..69c6fefe8b 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -447,10 +447,8 @@ msgid "Attempt to allocate %d blocks" msgstr "Versuche %d Blöcke zu allokieren" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." msgstr "" -"Versuch einer Heap Reservierung, wenn die MicroPython-VM nicht ausgeführt " -"wird." #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1029,6 +1027,10 @@ msgstr "Mutex konnte nicht freigegeben werden. Status: 0x%04x" msgid "Failed to write internal flash." msgstr "Interner Flash konnte nicht geschrieben werden." +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Datei existiert" @@ -1423,15 +1425,6 @@ msgstr "Maximaler x-Wert beim Spiegeln ist %d" msgid "Messages limited to 8 bytes" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "" -"MicroPython NLR-Sprung fehlgeschlagen. Wahrscheinlich Speicherbeschädigung." - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "Schwerwiegender MicroPython-Fehler." - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "" @@ -1484,6 +1477,10 @@ msgstr "Muss MISO- oder MOSI-Pin bereitstellen" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "Muss ein Vielfaches von 6 RGB-Pins verwenden, nicht %d" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -3275,6 +3272,10 @@ msgstr "" msgid "invalid cert" msgstr "ungültiges cert" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "ungültiger dupterm index" @@ -4336,6 +4337,19 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "" +#~ "Versuch einer Heap Reservierung, wenn die MicroPython-VM nicht ausgeführt " +#~ "wird." + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "" +#~ "MicroPython NLR-Sprung fehlgeschlagen. Wahrscheinlich " +#~ "Speicherbeschädigung." + +#~ msgid "MicroPython fatal error." +#~ msgstr "Schwerwiegender MicroPython-Fehler." + #~ msgid "argument must be ndarray" #~ msgstr "Argument muss ein ndarray sein" diff --git a/locale/el.po b/locale/el.po index 1f7fabf381..8d80f4e60e 100644 --- a/locale/el.po +++ b/locale/el.po @@ -438,7 +438,7 @@ msgid "Attempt to allocate %d blocks" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." msgstr "" #: shared-bindings/wifi/Radio.c @@ -1008,6 +1008,10 @@ msgstr "" msgid "Failed to write internal flash." msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "" @@ -1398,14 +1402,6 @@ msgstr "" msgid "Messages limited to 8 bytes" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "" - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "" @@ -1457,6 +1453,10 @@ msgstr "" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -3194,6 +3194,10 @@ msgstr "" msgid "invalid cert" msgstr "" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 5a830e8057..1899eba465 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -447,8 +447,8 @@ msgid "Attempt to allocate %d blocks" msgstr "Attempt to allocate %d blocks" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." -msgstr "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." +msgstr "" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1023,6 +1023,10 @@ msgstr "Failed to release mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Failed to write internal flash." +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "File exists" @@ -1415,15 +1419,6 @@ msgstr "Maximum x value when mirrored is %d" msgid "Messages limited to 8 bytes" msgstr "Messages limited to 8 bytes" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "MicroPython NLR jump failed. Likely memory corruption." - -#: supervisor/shared/safe_mode.c -#, fuzzy -msgid "MicroPython fatal error." -msgstr "CircuitPython fatal error." - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "Microphone startup delay must be in range 0.0 to 1.0" @@ -1475,6 +1470,10 @@ msgstr "Must provide MISO or MOSI pin" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "Must use a multiple of 6 rgb pins, not %d" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "NVS Error" @@ -3242,6 +3241,10 @@ msgstr "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" msgid "invalid cert" msgstr "invalid cert" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "invalid dupterm index" @@ -4289,6 +4292,16 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "Attempted heap allocation when MicroPython VM not running." + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "MicroPython NLR jump failed. Likely memory corruption." + +#, fuzzy +#~ msgid "MicroPython fatal error." +#~ msgstr "CircuitPython fatal error." + #~ msgid "argument must be ndarray" #~ msgstr "argument must be ndarray" diff --git a/locale/es.po b/locale/es.po index 8c630ebd4d..dca1a5a216 100644 --- a/locale/es.po +++ b/locale/es.po @@ -451,10 +451,8 @@ msgid "Attempt to allocate %d blocks" msgstr "Tratando de localizar %d bloques" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." msgstr "" -"Se intentó asignación del montículo, sin que la VM de MicroPython esté " -"ejecutando." #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1034,6 +1032,10 @@ msgstr "No se puede liberar el mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Error al escribir el flash interno." +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "El archivo ya existe" @@ -1434,14 +1436,6 @@ msgstr "Valor máximo de x cuando se refleja es %d" msgid "Messages limited to 8 bytes" msgstr "Mensajes limitados a 8 bytes" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "MicroPython NLR jump falló. Probable corrupción de la memoria." - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "Error fatal de MicroPython." - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "Micrófono demora de inicio debe estar en el rango 0.0 a 1.0" @@ -1497,6 +1491,10 @@ msgstr "Debe proporcionar un pin MISO o MOSI" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "Debe usar un múltiplo de 6 pines rgb, no %d" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "Error NVS" @@ -3281,6 +3279,10 @@ msgstr "los bits_per_pixel %d no son validos, deben ser 1, 4, 8, 16, 24 o 32" msgid "invalid cert" msgstr "certificado inválido" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "index dupterm inválido" @@ -4335,6 +4337,17 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "" +#~ "Se intentó asignación del montículo, sin que la VM de MicroPython esté " +#~ "ejecutando." + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "MicroPython NLR jump falló. Probable corrupción de la memoria." + +#~ msgid "MicroPython fatal error." +#~ msgstr "Error fatal de MicroPython." + #~ msgid "argument must be ndarray" #~ msgstr "argumento debe ser ndarray" diff --git a/locale/fil.po b/locale/fil.po index 23d1be9718..7b4320efdf 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -441,7 +441,7 @@ msgid "Attempt to allocate %d blocks" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." msgstr "" #: shared-bindings/wifi/Radio.c @@ -1021,6 +1021,10 @@ msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX" msgid "Failed to write internal flash." msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Mayroong file" @@ -1413,14 +1417,6 @@ msgstr "" msgid "Messages limited to 8 bytes" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "" - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "Ang delay ng startup ng mikropono ay dapat na nasa 0.0 hanggang 1.0" @@ -1472,6 +1468,10 @@ msgstr "" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -3237,6 +3237,10 @@ msgstr "" msgid "invalid cert" msgstr "mali ang cert" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "mali ang dupterm index" diff --git a/locale/fr.po b/locale/fr.po index f26ab1b51e..dbc5a70283 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -451,10 +451,8 @@ msgid "Attempt to allocate %d blocks" msgstr "Tentative d'allocation de %d blocs" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." msgstr "" -"Tentative d'allocation de segments lorsque la machine virtuelle MicroPython " -"n'est pas en cours d'exécution." #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1041,6 +1039,10 @@ msgstr "Impossible de libérer mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Échec de l'écriture vers flash interne." +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Le fichier existe" @@ -1444,14 +1446,6 @@ msgstr "La valeur maximale de x est %d lors d'une opération miroir" msgid "Messages limited to 8 bytes" msgstr "Messages limités à 8 octets" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "Échec du saut MicroPython NLR. Corruption de la mémoire probable." - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "Erreur fatale MicroPython." - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "Le délais au démarrage du micro doit être entre 0.0 et 1.0" @@ -1505,6 +1499,10 @@ msgstr "Doit fournir une broche MISO ou MOSI" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "Doit utiliser un multiple de 6 broches RVB, pas %d" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "Erreur NVS" @@ -3304,6 +3302,10 @@ msgstr "bits_per_pixel %d est invalid, doit être 1, 4, 8, 16, 24 ou 32" msgid "invalid cert" msgstr "certificat invalide" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "index invalide pour dupterm" @@ -4360,6 +4362,17 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "" +#~ "Tentative d'allocation de segments lorsque la machine virtuelle " +#~ "MicroPython n'est pas en cours d'exécution." + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "Échec du saut MicroPython NLR. Corruption de la mémoire probable." + +#~ msgid "MicroPython fatal error." +#~ msgstr "Erreur fatale MicroPython." + #~ msgid "argument must be ndarray" #~ msgstr "l'argument doit être un ndarray" diff --git a/locale/hi.po b/locale/hi.po index 388a85472b..d32db7071d 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -438,7 +438,7 @@ msgid "Attempt to allocate %d blocks" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." msgstr "" #: shared-bindings/wifi/Radio.c @@ -1008,6 +1008,10 @@ msgstr "" msgid "Failed to write internal flash." msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "" @@ -1398,14 +1402,6 @@ msgstr "" msgid "Messages limited to 8 bytes" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "" - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "" @@ -1457,6 +1453,10 @@ msgstr "" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -3194,6 +3194,10 @@ msgstr "" msgid "invalid cert" msgstr "" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 241b07d7ec..a9bd3eafca 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -450,8 +450,8 @@ msgid "Attempt to allocate %d blocks" msgstr "Provo ad allocare %d blocchi" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." -msgstr "Provo l'allocazione quando MicroPython VM non è attivo." +msgid "Attempted heap allocation when VM not running." +msgstr "" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1030,6 +1030,10 @@ msgstr "Impossibile rilasciare il mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "File esistente" @@ -1425,14 +1429,6 @@ msgstr "Valore massimo di x quando rispachiato è %d" msgid "Messages limited to 8 bytes" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "" - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "" @@ -1485,6 +1481,10 @@ msgstr "" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -3248,6 +3248,10 @@ msgstr "" msgid "invalid cert" msgstr "certificato non valido" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "indice dupterm non valido" @@ -4310,6 +4314,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "Provo l'allocazione quando MicroPython VM non è attivo." + #~ msgid "Group full" #~ msgstr "Gruppo pieno" diff --git a/locale/ja.po b/locale/ja.po index e2b5d926af..e988170557 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -443,8 +443,8 @@ msgid "Attempt to allocate %d blocks" msgstr "%d個のブロックの確保を試みました" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." -msgstr "MicroPython VMの非実行時にヒープ確保を試みました" +msgid "Attempted heap allocation when VM not running." +msgstr "" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1019,6 +1019,10 @@ msgstr "ミューテックスの開放に失敗。エラー 0x%04x" msgid "Failed to write internal flash." msgstr "内部フラッシュ書き込みに失敗" +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "ファイルが存在します" @@ -1411,14 +1415,6 @@ msgstr "" msgid "Messages limited to 8 bytes" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "MicroPython NLRジャンプ失敗。メモリ破壊の可能性あり" - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "MicroPython致命的エラー" - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "マイクのスタートアップディレイは 0.0 から 1.0 の間でなければなりません" @@ -1470,6 +1466,10 @@ msgstr "MISOピンまたはMOSIピンが必要" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "%d個でなく6の倍数個のrgbピンを使ってください" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -3222,6 +3222,10 @@ msgstr "" msgid "invalid cert" msgstr "不正な証明書" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "不正なduptermインデクス" @@ -4269,6 +4273,15 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "MicroPython VMの非実行時にヒープ確保を試みました" + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "MicroPython NLRジャンプ失敗。メモリ破壊の可能性あり" + +#~ msgid "MicroPython fatal error." +#~ msgstr "MicroPython致命的エラー" + #~ msgid "argument must be ndarray" #~ msgstr "引数はndarrayでなければなりません" diff --git a/locale/ko.po b/locale/ko.po index 3b8eeebe6d..0d6806d2ce 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -439,7 +439,7 @@ msgid "Attempt to allocate %d blocks" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." msgstr "" #: shared-bindings/wifi/Radio.c @@ -1011,6 +1011,10 @@ msgstr "" msgid "Failed to write internal flash." msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "" @@ -1401,14 +1405,6 @@ msgstr "" msgid "Messages limited to 8 bytes" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "" - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "" @@ -1460,6 +1456,10 @@ msgstr "" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -3198,6 +3198,10 @@ msgstr "" msgid "invalid cert" msgstr "cert가 유효하지 않습니다" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "Dupterm index가 유효하지 않습니다" diff --git a/locale/nl.po b/locale/nl.po index 3285f52150..23b1eefe52 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -441,8 +441,8 @@ msgid "Attempt to allocate %d blocks" msgstr "Poging om %d blokken toe te wijzen" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." -msgstr "heap allocatie geprobeerd terwijl MicroPython VM niet draait." +msgid "Attempted heap allocation when VM not running." +msgstr "" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1019,6 +1019,10 @@ msgstr "Mislukt mutex los te laten, err 0x%04x" msgid "Failed to write internal flash." msgstr "Schrijven naar interne flash mislukt." +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Bestand bestaat" @@ -1412,14 +1416,6 @@ msgstr "Maximale x waarde indien gespiegeld is %d" msgid "Messages limited to 8 bytes" msgstr "Berichten zijn beperkt tot 8 bytes" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "MicroPython NLR sprong mislukt. Waarschijnlijk geheugen corruptie." - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "MicroPython fatale fout." - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "Microfoon opstart vertraging moet in bereik van 0.0 tot 1.0 zijn" @@ -1471,6 +1467,10 @@ msgstr "MISO of MOSI moeten worden gegeven" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "Een meervoud van 6 rgb pinnen moet worden gebruikt, niet %d" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "NVS-fout" @@ -3250,6 +3250,10 @@ msgstr "" msgid "invalid cert" msgstr "ongeldig certificaat" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "ongeldige dupterm index" @@ -4300,6 +4304,15 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "heap allocatie geprobeerd terwijl MicroPython VM niet draait." + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "MicroPython NLR sprong mislukt. Waarschijnlijk geheugen corruptie." + +#~ msgid "MicroPython fatal error." +#~ msgstr "MicroPython fatale fout." + #~ msgid "argument must be ndarray" #~ msgstr "argument moet ndarray zijn" diff --git a/locale/pl.po b/locale/pl.po index 295901c994..bcdc056fdf 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -443,8 +443,8 @@ msgid "Attempt to allocate %d blocks" msgstr "Próba przydzielenia %d bloków" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." -msgstr "Próba przydziału sterty, gdy MicroPython VM nie działa." +msgid "Attempted heap allocation when VM not running." +msgstr "" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1019,6 +1019,10 @@ msgstr "Nie udało się zwolnić blokady, błąd 0x%04x" msgid "Failed to write internal flash." msgstr "Nie udało się zapisać wewnętrznej pamięci flash." +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Plik istnieje" @@ -1411,15 +1415,6 @@ msgstr "Największa wartość x przy odwróceniu to %d" msgid "Messages limited to 8 bytes" msgstr "Wiadomości ograniczone do 8 bajtów" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "" -"Skok MicroRython NLR nie powiódł się. Prawdopodobne uszkodzenie pamięci." - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "Błąd krytyczny MicroPython." - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "Opóźnienie włączenia mikrofonu musi być w zakresie od 0.0 do 1.0" @@ -1471,6 +1466,10 @@ msgstr "Należy podać pin MISO lub MOSI" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -3215,6 +3214,10 @@ msgstr "" msgid "invalid cert" msgstr "zły ceryfikat" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "zły indeks dupterm" @@ -4261,6 +4264,16 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "Próba przydziału sterty, gdy MicroPython VM nie działa." + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "" +#~ "Skok MicroRython NLR nie powiódł się. Prawdopodobne uszkodzenie pamięci." + +#~ msgid "MicroPython fatal error." +#~ msgstr "Błąd krytyczny MicroPython." + #~ msgid "vectors must have same lengths" #~ msgstr "wektory muszą mieć identyczną długość" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 7643bcfb0d..a65fbad3a3 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -451,10 +451,8 @@ msgid "Attempt to allocate %d blocks" msgstr "Tentativa de alocar %d blocos" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." +msgid "Attempted heap allocation when VM not running." msgstr "" -"A tentativa da área de alocação dinâmica de variáveis (heap) quando o " -"MicroPython VM não está em execução." #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1037,6 +1035,10 @@ msgstr "Houve uma falha ao liberar o mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Falha ao gravar o flash interno." +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Arquivo já existe" @@ -1436,14 +1438,6 @@ msgstr "O valor máximo de x quando espelhado é %d" msgid "Messages limited to 8 bytes" msgstr "As mensagens estão limitadas a 8 bytes" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "O salto do MicroPython NLR falhou. Possível corrupção de memória." - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "Houve um erro fatal do MicroPython." - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "O atraso na inicialização do microfone deve estar entre 0,0 e 1,0" @@ -1495,6 +1489,10 @@ msgstr "Deve informar os pinos MISO ou MOSI" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "Deve utilizar um múltiplo de 6 pinos rgb, não %d" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "Erro NVS" @@ -3290,6 +3288,10 @@ msgstr "bits_per_pixel %d é inválido, deve ser, 1, 4, 8, 16, 24, ou 32" msgid "invalid cert" msgstr "certificado inválido" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "Índice de dupterm inválido" @@ -4346,6 +4348,17 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "" +#~ "A tentativa da área de alocação dinâmica de variáveis (heap) quando o " +#~ "MicroPython VM não está em execução." + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "O salto do MicroPython NLR falhou. Possível corrupção de memória." + +#~ msgid "MicroPython fatal error." +#~ msgstr "Houve um erro fatal do MicroPython." + #~ msgid "argument must be ndarray" #~ msgstr "o argumento deve ser ndarray" diff --git a/locale/sv.po b/locale/sv.po index 5feb28845d..8a2d554547 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -446,8 +446,8 @@ msgid "Attempt to allocate %d blocks" msgstr "Försök att tilldela %d block" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." -msgstr "Försökte tilldela heap när MicroPython VM inte körs." +msgid "Attempted heap allocation when VM not running." +msgstr "" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1025,6 +1025,10 @@ msgstr "Det gick inte att frigöra mutex, fel 0x%04x" msgid "Failed to write internal flash." msgstr "Det gick inte att skriva till intern flash." +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Filen finns redan" @@ -1419,14 +1423,6 @@ msgstr "Maximum x-värde vid spegling är %d" msgid "Messages limited to 8 bytes" msgstr "Meddelanden begränsad till 8 byte" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "MicroPython NLR jump misslyckades. Troligen korrupt minne." - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "MicroPython fatalt fel." - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "" @@ -1479,6 +1475,10 @@ msgstr "Måste ange MISO- eller MOSI-pinne" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "Måste använda ett multipel av 6 rgb-pinnar, inte %d" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "NVS-fel" @@ -3253,6 +3253,10 @@ msgstr "ogiltig bits_per_pixel %d, måste vara 1, 4, 8, 16, 24 eller 32" msgid "invalid cert" msgstr "ogiltigt certifikat" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "ogiltigt dupterm index" @@ -4303,6 +4307,15 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "Försökte tilldela heap när MicroPython VM inte körs." + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "MicroPython NLR jump misslyckades. Troligen korrupt minne." + +#~ msgid "MicroPython fatal error." +#~ msgstr "MicroPython fatalt fel." + #~ msgid "argument must be ndarray" #~ msgstr "argument måste vara ndarray" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 14c0a9eca0..fdcb46771c 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -448,8 +448,8 @@ msgid "Attempt to allocate %d blocks" msgstr "cháng shì fēn pèi %d kuài" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running." -msgstr "MicroPython VM zài wèi yùnxíng shí chángshì fēnpèi duī." +msgid "Attempted heap allocation when VM not running." +msgstr "" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -1024,6 +1024,10 @@ msgstr "Wúfǎ shìfàng mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Wúfǎ xiě rù nèibù shǎncún." +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Wénjiàn cúnzài" @@ -1421,14 +1425,6 @@ msgstr "Jìngxiàng shí de zuìdà X zhí wèi%d" msgid "Messages limited to 8 bytes" msgstr "Yóujiàn xiànzhì wèi 8 gè zì jié" -#: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "MicroPython NLR tiào zhuǎn shībài. Kěnéng shì nèicún sǔnhuài." - -#: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error." -msgstr "MicroPython zhìmìng cuòwù." - #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "Màikèfēng qǐdòng yánchí bìxū zài 0.0 Dào 1.0 De fànwéi nèi" @@ -1481,6 +1477,10 @@ msgstr "Bìxū tígōng MISO huò MOSI yǐn jiǎo" msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "bì xū shǐ yòng 6 RGB yǐn jiǎo de bèi shù, ér bù shì %d" +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "NVS cuò wù" @@ -3252,6 +3252,10 @@ msgstr "wú xiào bits_per_pixel %d, bì xū shì, 1, 4, 8, 16, 24, huò 32" msgid "invalid cert" msgstr "zhèngshū wúxiào" +#: py/compile.c +msgid "invalid decorator" +msgstr "" + #: extmod/uos_dupterm.c msgid "invalid dupterm index" msgstr "dupterm suǒyǐn wúxiào" @@ -4299,6 +4303,15 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "Attempted heap allocation when MicroPython VM not running." +#~ msgstr "MicroPython VM zài wèi yùnxíng shí chángshì fēnpèi duī." + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption." +#~ msgstr "MicroPython NLR tiào zhuǎn shībài. Kěnéng shì nèicún sǔnhuài." + +#~ msgid "MicroPython fatal error." +#~ msgstr "MicroPython zhìmìng cuòwù." + #~ msgid "argument must be ndarray" #~ msgstr "Cānshù bìxū shì ndarray" From 137745e91155b48b776b7a9f806dc5263e86c0ed Mon Sep 17 00:00:00 2001 From: lady ada Date: Sat, 10 Apr 2021 23:04:48 -0400 Subject: [PATCH 250/261] neokey trinkey friend --- .../boards/neokey_trinkey_m0/board.c | 40 +++++++++++++ .../boards/neokey_trinkey_m0/mpconfigboard.h | 58 +++++++++++++++++++ .../boards/neokey_trinkey_m0/mpconfigboard.mk | 34 +++++++++++ .../boards/neokey_trinkey_m0/pins.c | 8 +++ 4 files changed, 140 insertions(+) create mode 100644 ports/atmel-samd/boards/neokey_trinkey_m0/board.c create mode 100644 ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/neokey_trinkey_m0/pins.c diff --git a/ports/atmel-samd/boards/neokey_trinkey_m0/board.c b/ports/atmel-samd/boards/neokey_trinkey_m0/board.c new file mode 100644 index 0000000000..cde441b3d9 --- /dev/null +++ b/ports/atmel-samd/boards/neokey_trinkey_m0/board.c @@ -0,0 +1,40 @@ +/* + * 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 "common-hal/microcontroller/Pin.h" +#include "supervisor/shared/board.h" +#include "hal/include/hal_gpio.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.h new file mode 100644 index 0000000000..3cd85ac1bc --- /dev/null +++ b/ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.h @@ -0,0 +1,58 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit NeoKey Trinkey M0" +#define MICROPY_HW_MCU_NAME "samd21e18" + +#define MICROPY_HW_NEOPIXEL (&pin_PA15) + +#define MICROPY_PORT_A (0) +#define MICROPY_PORT_B (0) +#define MICROPY_PORT_C (0) + +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 +#define IGNORE_PIN_PA02 1 +#define IGNORE_PIN_PA03 1 +#define IGNORE_PIN_PA04 1 +#define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PA06 1 +#define IGNORE_PIN_PA08 1 +#define IGNORE_PIN_PA09 1 +#define IGNORE_PIN_PA10 1 +#define IGNORE_PIN_PA11 1 +#define IGNORE_PIN_PA12 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA16 1 +#define IGNORE_PIN_PA17 1 +#define IGNORE_PIN_PA18 1 +#define IGNORE_PIN_PA19 1 +#define IGNORE_PIN_PA20 1 +#define IGNORE_PIN_PA21 1 +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 +#define IGNORE_PIN_PA27 1 +#define IGNORE_PIN_PA29 1 +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 +#define IGNORE_PIN_PB00 1 +#define IGNORE_PIN_PB01 1 +#define IGNORE_PIN_PB02 1 +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PB04 1 +#define IGNORE_PIN_PB05 1 +#define IGNORE_PIN_PB06 1 +#define IGNORE_PIN_PB07 1 +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB09 1 +#define IGNORE_PIN_PB10 1 +#define IGNORE_PIN_PB11 1 +#define IGNORE_PIN_PB12 1 +#define IGNORE_PIN_PB13 1 +#define IGNORE_PIN_PB14 1 +#define IGNORE_PIN_PB15 1 +#define IGNORE_PIN_PB16 1 +#define IGNORE_PIN_PB17 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PB30 1 +#define IGNORE_PIN_PB31 1 diff --git a/ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.mk new file mode 100644 index 0000000000..e145dfdd68 --- /dev/null +++ b/ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.mk @@ -0,0 +1,34 @@ +USB_VID = 0x239A +USB_PID = 0x80FF +USB_PRODUCT = "NeoKey Trinkey M0" +USB_MANUFACTURER = "Adafruit Industries LLC" + +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE + +CIRCUITPY_ANALOGIO = 0 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_SAMD = 0 +CIRCUITPY_PS2IO = 0 +CIRCUITPY_PULSEIO = 0 +CIRCUITPY_PWMIO = 0 +CIRCUITPY_AUDIOCORE = 0 +CIRCUITPY_BUSIO = 0 +CIRCUITPY_STORAGE = 0 + +CIRCUITPY_MATH = 1 +CIRCUITPY_PIXELBUF = 1 +CIRCUITPY_USB_MIDI = 1 +CIRCUITPY_TOUCHIO = 1 +CIRCUITPY_FULL_BUILD = 0 + +SUPEROPT_GC = 0 +SUPEROPT_VM = 0 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/atmel-samd/boards/neokey_trinkey_m0/pins.c b/ports/atmel-samd/boards/neokey_trinkey_m0/pins.c new file mode 100644 index 0000000000..df8dfb0bfa --- /dev/null +++ b/ports/atmel-samd/boards/neokey_trinkey_m0/pins.c @@ -0,0 +1,8 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) }, + { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_PA28) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 56be8306cd5eed1cc4535a75d80ea7e12cc91011 Mon Sep 17 00:00:00 2001 From: lady ada Date: Sat, 10 Apr 2021 23:22:13 -0400 Subject: [PATCH 251/261] try adding a submodule? --- .github/workflows/build.yml | 2 + .gitmodules | 3 + frozen/Adafruit_CircuitPython_SimpleMath | 1 + .../boards/slide_trinkey_m0/board.c | 40 +++++++++++++ .../boards/slide_trinkey_m0/mpconfigboard.h | 58 +++++++++++++++++++ .../boards/slide_trinkey_m0/mpconfigboard.mk | 35 +++++++++++ .../atmel-samd/boards/slide_trinkey_m0/pins.c | 8 +++ 7 files changed, 147 insertions(+) create mode 160000 frozen/Adafruit_CircuitPython_SimpleMath create mode 100644 ports/atmel-samd/boards/slide_trinkey_m0/board.c create mode 100644 ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/slide_trinkey_m0/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18bcb67c23..d0b16e626d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -266,6 +266,7 @@ jobs: - "monster_m4sk" - "ndgarage_ndbit6" - "ndgarage_ndbit6_v2" + - "neokey_trinkey_m0" - "neopixel_trinkey_m0" - "nfc_copy_cat" - "nice_nano" @@ -315,6 +316,7 @@ jobs: - "shirtty" - "silicognition-m4-shim" - "simmel" + - "slide_trinkey_m0" - "snekboard" - "sparkfun_lumidrive" - "sparkfun_nrf52840_micromod" diff --git a/.gitmodules b/.gitmodules index 52abb02a99..139abdd1b1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -171,6 +171,9 @@ [submodule "frozen/Adafruit_CircuitPython_LC709203F"] path = frozen/Adafruit_CircuitPython_LC709203F url = https://github.com/adafruit/Adafruit_CircuitPython_LC709203F +[submodule "frozen/Adafruit_CircuitPython_SimpleMath"] + path = frozen/Adafruit_CircuitPython_SimpleMath + url = https://github.com/adafruit/Adafruit_CircuitPython_SimpleMath [submodule "ports/raspberrypi/sdk"] path = ports/raspberrypi/sdk url = https://github.com/adafruit/pico-sdk.git diff --git a/frozen/Adafruit_CircuitPython_SimpleMath b/frozen/Adafruit_CircuitPython_SimpleMath new file mode 160000 index 0000000000..cdf9944730 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SimpleMath @@ -0,0 +1 @@ +Subproject commit cdf99447307473080b2f2e95e7c3667247095ac0 diff --git a/ports/atmel-samd/boards/slide_trinkey_m0/board.c b/ports/atmel-samd/boards/slide_trinkey_m0/board.c new file mode 100644 index 0000000000..cde441b3d9 --- /dev/null +++ b/ports/atmel-samd/boards/slide_trinkey_m0/board.c @@ -0,0 +1,40 @@ +/* + * 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 "common-hal/microcontroller/Pin.h" +#include "supervisor/shared/board.h" +#include "hal/include/hal_gpio.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.h new file mode 100644 index 0000000000..27e9d4b58f --- /dev/null +++ b/ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.h @@ -0,0 +1,58 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit NeoKey Trinkey M0" +#define MICROPY_HW_MCU_NAME "samd21e18" + +#define MICROPY_HW_NEOPIXEL (&pin_PA06) + +#define MICROPY_PORT_A (0) +#define MICROPY_PORT_B (0) +#define MICROPY_PORT_C (0) + +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 +#define IGNORE_PIN_PA02 1 +#define IGNORE_PIN_PA03 1 +#define IGNORE_PIN_PA04 1 +#define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PA08 1 +#define IGNORE_PIN_PA09 1 +#define IGNORE_PIN_PA10 1 +#define IGNORE_PIN_PA11 1 +#define IGNORE_PIN_PA12 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA15 1 +#define IGNORE_PIN_PA16 1 +#define IGNORE_PIN_PA17 1 +#define IGNORE_PIN_PA18 1 +#define IGNORE_PIN_PA19 1 +#define IGNORE_PIN_PA20 1 +#define IGNORE_PIN_PA21 1 +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 +#define IGNORE_PIN_PA27 1 +#define IGNORE_PIN_PA29 1 +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 +#define IGNORE_PIN_PB00 1 +#define IGNORE_PIN_PB01 1 +#define IGNORE_PIN_PB02 1 +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PB04 1 +#define IGNORE_PIN_PB05 1 +#define IGNORE_PIN_PB06 1 +#define IGNORE_PIN_PB07 1 +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB09 1 +#define IGNORE_PIN_PB10 1 +#define IGNORE_PIN_PB11 1 +#define IGNORE_PIN_PB12 1 +#define IGNORE_PIN_PB13 1 +#define IGNORE_PIN_PB14 1 +#define IGNORE_PIN_PB15 1 +#define IGNORE_PIN_PB16 1 +#define IGNORE_PIN_PB17 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PB30 1 +#define IGNORE_PIN_PB31 1 diff --git a/ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.mk new file mode 100644 index 0000000000..fe1e4d9ea1 --- /dev/null +++ b/ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.mk @@ -0,0 +1,35 @@ +USB_VID = 0x239A +USB_PID = 0x8101 +USB_PRODUCT = "Slide Trinkey M0" +USB_MANUFACTURER = "Adafruit Industries LLC" + +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE + +CIRCUITPY_ANALOGIO = 1 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_SAMD = 0 +CIRCUITPY_PS2IO = 0 +CIRCUITPY_PULSEIO = 0 +CIRCUITPY_PWMIO = 0 +CIRCUITPY_AUDIOCORE = 0 +CIRCUITPY_BUSIO = 0 +CIRCUITPY_STORAGE = 0 + +CIRCUITPY_MATH = 1 +CIRCUITPY_PIXELBUF = 1 +CIRCUITPY_USB_MIDI = 1 +CIRCUITPY_TOUCHIO = 1 +CIRCUITPY_FULL_BUILD = 0 + +SUPEROPT_GC = 0 +SUPEROPT_VM = 0 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SimpleMath +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/atmel-samd/boards/slide_trinkey_m0/pins.c b/ports/atmel-samd/boards/slide_trinkey_m0/pins.c new file mode 100644 index 0000000000..c48c69206a --- /dev/null +++ b/ports/atmel-samd/boards/slide_trinkey_m0/pins.c @@ -0,0 +1,8 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + //{ MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_POTENTIOMETER), MP_ROM_PTR(&pin_PA07) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 9dc6d691b8779bdbb36617c8d5700adb7d9e6a98 Mon Sep 17 00:00:00 2001 From: lady ada Date: Sun, 11 Apr 2021 17:45:37 -0400 Subject: [PATCH 252/261] add prox trinkey and rename others to adafruit_ --- .github/workflows/build.yml | 7 ++- .gitmodules | 3 + frozen/Adafruit_CircuitPython_MIDI | 1 + .../board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 2 +- .../pins.c | 0 .../board.c | 0 .../mpconfigboard.h | 58 +++++++++++++++++++ .../mpconfigboard.mk | 34 +++++++++++ .../adafruit_proxsense_trinkey_m0/pins.c | 15 +++++ .../board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../pins.c | 0 .../boards/adafruit_slide_trinkey_m0/board.c | 40 +++++++++++++ .../mpconfigboard.h | 2 +- .../mpconfigboard.mk | 2 +- .../pins.c | 0 19 files changed, 158 insertions(+), 6 deletions(-) create mode 160000 frozen/Adafruit_CircuitPython_MIDI rename ports/atmel-samd/boards/{neokey_trinkey_m0 => adafruit_neokey_trinkey_m0}/board.c (100%) rename ports/atmel-samd/boards/{neokey_trinkey_m0 => adafruit_neokey_trinkey_m0}/mpconfigboard.h (100%) rename ports/atmel-samd/boards/{neokey_trinkey_m0 => adafruit_neokey_trinkey_m0}/mpconfigboard.mk (97%) rename ports/atmel-samd/boards/{neokey_trinkey_m0 => adafruit_neokey_trinkey_m0}/pins.c (100%) rename ports/atmel-samd/boards/{rotary_trinkey_m0 => adafruit_proxsense_trinkey_m0}/board.c (100%) create mode 100644 ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/pins.c rename ports/atmel-samd/boards/{slide_trinkey_m0 => adafruit_rotary_trinkey_m0}/board.c (100%) rename ports/atmel-samd/boards/{rotary_trinkey_m0 => adafruit_rotary_trinkey_m0}/mpconfigboard.h (100%) rename ports/atmel-samd/boards/{rotary_trinkey_m0 => adafruit_rotary_trinkey_m0}/mpconfigboard.mk (100%) rename ports/atmel-samd/boards/{rotary_trinkey_m0 => adafruit_rotary_trinkey_m0}/pins.c (100%) create mode 100644 ports/atmel-samd/boards/adafruit_slide_trinkey_m0/board.c rename ports/atmel-samd/boards/{slide_trinkey_m0 => adafruit_slide_trinkey_m0}/mpconfigboard.h (96%) rename ports/atmel-samd/boards/{slide_trinkey_m0 => adafruit_slide_trinkey_m0}/mpconfigboard.mk (97%) rename ports/atmel-samd/boards/{slide_trinkey_m0 => adafruit_slide_trinkey_m0}/pins.c (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0b16e626d..f9c5236fe0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -178,7 +178,11 @@ jobs: - "TG-Watch" - "adafruit_feather_rp2040" - "adafruit_itsybitsy_rp2040" + - "adafruit_neokey_trinkey_m0" + - "adafruit_proxsense_trinkey_m0" - "adafruit_qtpy_rp2040" + - "adafruit_rotary_trinkey_m0" + - "adafruit_tslide_trinkey_m0" - "aloriumtech_evo_m51" - "aramcon_badge_2019" - "arduino_mkr1300" @@ -266,7 +270,6 @@ jobs: - "monster_m4sk" - "ndgarage_ndbit6" - "ndgarage_ndbit6_v2" - - "neokey_trinkey_m0" - "neopixel_trinkey_m0" - "nfc_copy_cat" - "nice_nano" @@ -306,7 +309,6 @@ jobs: - "raspberry_pi_pico" - "raytac_mdbt50q-db-40" - "robohatmm1_m4" - - "rotary_trinkey_m0" - "sam32" - "same54_xplained" - "seeeduino_wio_terminal" @@ -316,7 +318,6 @@ jobs: - "shirtty" - "silicognition-m4-shim" - "simmel" - - "slide_trinkey_m0" - "snekboard" - "sparkfun_lumidrive" - "sparkfun_nrf52840_micromod" diff --git a/.gitmodules b/.gitmodules index 139abdd1b1..da5b5835a6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -181,3 +181,6 @@ path = data/nvm.toml url = https://github.com/adafruit/nvm.toml.git branch = main +[submodule "frozen/Adafruit_CircuitPython_MIDI"] + path = frozen/Adafruit_CircuitPython_MIDI + url = https://github.com/adafruit/Adafruit_CircuitPython_MIDI diff --git a/frozen/Adafruit_CircuitPython_MIDI b/frozen/Adafruit_CircuitPython_MIDI new file mode 160000 index 0000000000..669ab7b752 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_MIDI @@ -0,0 +1 @@ +Subproject commit 669ab7b752d6c863577312560faf505656e5e603 diff --git a/ports/atmel-samd/boards/neokey_trinkey_m0/board.c b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/board.c similarity index 100% rename from ports/atmel-samd/boards/neokey_trinkey_m0/board.c rename to ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/board.c diff --git a/ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.h similarity index 100% rename from ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.h rename to ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.h diff --git a/ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk similarity index 97% rename from ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.mk rename to ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk index e145dfdd68..d71388ec44 100644 --- a/ports/atmel-samd/boards/neokey_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x239A -USB_PID = 0x80FF +USB_PID = 0x8100 USB_PRODUCT = "NeoKey Trinkey M0" USB_MANUFACTURER = "Adafruit Industries LLC" diff --git a/ports/atmel-samd/boards/neokey_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c similarity index 100% rename from ports/atmel-samd/boards/neokey_trinkey_m0/pins.c rename to ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c diff --git a/ports/atmel-samd/boards/rotary_trinkey_m0/board.c b/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/board.c similarity index 100% rename from ports/atmel-samd/boards/rotary_trinkey_m0/board.c rename to ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/board.c diff --git a/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.h new file mode 100644 index 0000000000..20ccffab57 --- /dev/null +++ b/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.h @@ -0,0 +1,58 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit ProxSense Trinkey M0" +#define MICROPY_HW_MCU_NAME "samd21e18" + +#define MICROPY_HW_NEOPIXEL (&pin_PA15) + +#define MICROPY_PORT_A (0) +#define MICROPY_PORT_B (0) +#define MICROPY_PORT_C (0) + +#define IGNORE_PIN_PA01 1 +#define IGNORE_PIN_PA02 1 +#define IGNORE_PIN_PA04 1 +#define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PA06 1 +#define IGNORE_PIN_PA08 1 +#define IGNORE_PIN_PA09 1 +#define IGNORE_PIN_PA10 1 +#define IGNORE_PIN_PA11 1 +#define IGNORE_PIN_PA12 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA18 1 +#define IGNORE_PIN_PA19 1 +#define IGNORE_PIN_PA20 1 +#define IGNORE_PIN_PA21 1 +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 +#define IGNORE_PIN_PA27 1 +#define IGNORE_PIN_PA28 1 +#define IGNORE_PIN_PA29 1 +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 +#define IGNORE_PIN_PB00 1 +#define IGNORE_PIN_PB01 1 +#define IGNORE_PIN_PB02 1 +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PB04 1 +#define IGNORE_PIN_PB05 1 +#define IGNORE_PIN_PB06 1 +#define IGNORE_PIN_PB07 1 +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB09 1 +#define IGNORE_PIN_PB10 1 +#define IGNORE_PIN_PB11 1 +#define IGNORE_PIN_PB12 1 +#define IGNORE_PIN_PB13 1 +#define IGNORE_PIN_PB14 1 +#define IGNORE_PIN_PB15 1 +#define IGNORE_PIN_PB16 1 +#define IGNORE_PIN_PB17 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PB30 1 +#define IGNORE_PIN_PB31 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_PA17) +#define DEFAULT_I2C_BUS_SDA (&pin_PA16) diff --git a/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.mk new file mode 100644 index 0000000000..8705d7c369 --- /dev/null +++ b/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.mk @@ -0,0 +1,34 @@ +USB_VID = 0x239A +USB_PID = 0x8104 +USB_PRODUCT = "ProxSense Trinkey M0" +USB_MANUFACTURER = "Adafruit Industries LLC" + +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE + +CIRCUITPY_ANALOGIO = 0 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_SAMD = 0 +CIRCUITPY_PS2IO = 0 +CIRCUITPY_PULSEIO = 0 +CIRCUITPY_PWMIO = 0 +CIRCUITPY_AUDIOCORE = 0 +CIRCUITPY_BUSIO = 1 +CIRCUITPY_STORAGE = 0 + +CIRCUITPY_MATH = 1 +CIRCUITPY_PIXELBUF = 1 +CIRCUITPY_USB_MIDI = 1 +CIRCUITPY_TOUCHIO = 1 +CIRCUITPY_FULL_BUILD = 0 + +SUPEROPT_GC = 0 +SUPEROPT_VM = 0 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/pins.c new file mode 100644 index 0000000000..21410f8ad1 --- /dev/null +++ b/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/pins.c @@ -0,0 +1,15 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_INTERRUPT), MP_ROM_PTR(&pin_PA00) }, + + { MP_ROM_QSTR(MP_QSTR_TOUCH2), MP_ROM_PTR(&pin_PA03) }, + { MP_ROM_QSTR(MP_QSTR_TOUCH1), MP_ROM_PTR(&pin_PA07) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA17) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/slide_trinkey_m0/board.c b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/board.c similarity index 100% rename from ports/atmel-samd/boards/slide_trinkey_m0/board.c rename to ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/board.c diff --git a/ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.h similarity index 100% rename from ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.h rename to ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.h diff --git a/ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk similarity index 100% rename from ports/atmel-samd/boards/rotary_trinkey_m0/mpconfigboard.mk rename to ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk diff --git a/ports/atmel-samd/boards/rotary_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c similarity index 100% rename from ports/atmel-samd/boards/rotary_trinkey_m0/pins.c rename to ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c diff --git a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/board.c b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/board.c new file mode 100644 index 0000000000..cde441b3d9 --- /dev/null +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/board.c @@ -0,0 +1,40 @@ +/* + * 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 "common-hal/microcontroller/Pin.h" +#include "supervisor/shared/board.h" +#include "hal/include/hal_gpio.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.h similarity index 96% rename from ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.h rename to ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.h index 27e9d4b58f..1d9a4122df 100644 --- a/ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "Adafruit NeoKey Trinkey M0" +#define MICROPY_HW_BOARD_NAME "Adafruit Slide Trinkey M0" #define MICROPY_HW_MCU_NAME "samd21e18" #define MICROPY_HW_NEOPIXEL (&pin_PA06) diff --git a/ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk similarity index 97% rename from ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.mk rename to ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk index fe1e4d9ea1..0a403c1671 100644 --- a/ports/atmel-samd/boards/slide_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x239A -USB_PID = 0x8101 +USB_PID = 0x8102 USB_PRODUCT = "Slide Trinkey M0" USB_MANUFACTURER = "Adafruit Industries LLC" diff --git a/ports/atmel-samd/boards/slide_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c similarity index 100% rename from ports/atmel-samd/boards/slide_trinkey_m0/pins.c rename to ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c From ff07b8f2d1fc976e5b609eca7b3514b6942a618d Mon Sep 17 00:00:00 2001 From: lady ada Date: Sun, 11 Apr 2021 17:49:57 -0400 Subject: [PATCH 253/261] typo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9c5236fe0..7ddcd6ac7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -182,7 +182,7 @@ jobs: - "adafruit_proxsense_trinkey_m0" - "adafruit_qtpy_rp2040" - "adafruit_rotary_trinkey_m0" - - "adafruit_tslide_trinkey_m0" + - "adafruit_slide_trinkey_m0" - "aloriumtech_evo_m51" - "aramcon_badge_2019" - "arduino_mkr1300" From 42abb982fe85469cabdfdc735ab40b010d79b9b6 Mon Sep 17 00:00:00 2001 From: lady ada Date: Sun, 11 Apr 2021 18:39:14 -0400 Subject: [PATCH 254/261] rename proxsense to proxlight --- .github/workflows/build.yml | 2 +- .../board.c | 0 .../mpconfigboard.h | 2 +- .../mpconfigboard.mk | 2 +- .../pins.c | 0 5 files changed, 3 insertions(+), 3 deletions(-) rename ports/atmel-samd/boards/{adafruit_proxsense_trinkey_m0 => adafruit_proxlight_trinkey_m0}/board.c (100%) rename ports/atmel-samd/boards/{adafruit_proxsense_trinkey_m0 => adafruit_proxlight_trinkey_m0}/mpconfigboard.h (96%) rename ports/atmel-samd/boards/{adafruit_proxsense_trinkey_m0 => adafruit_proxlight_trinkey_m0}/mpconfigboard.mk (95%) rename ports/atmel-samd/boards/{adafruit_proxsense_trinkey_m0 => adafruit_proxlight_trinkey_m0}/pins.c (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ddcd6ac7b..9923463169 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -179,7 +179,7 @@ jobs: - "adafruit_feather_rp2040" - "adafruit_itsybitsy_rp2040" - "adafruit_neokey_trinkey_m0" - - "adafruit_proxsense_trinkey_m0" + - "adafruit_proxlight_trinkey_m0" - "adafruit_qtpy_rp2040" - "adafruit_rotary_trinkey_m0" - "adafruit_slide_trinkey_m0" diff --git a/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/board.c b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/board.c similarity index 100% rename from ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/board.c rename to ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/board.c diff --git a/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.h similarity index 96% rename from ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.h rename to ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.h index 20ccffab57..a760fbe376 100644 --- a/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "Adafruit ProxSense Trinkey M0" +#define MICROPY_HW_BOARD_NAME "Adafruit ProxLight Trinkey M0" #define MICROPY_HW_MCU_NAME "samd21e18" #define MICROPY_HW_NEOPIXEL (&pin_PA15) diff --git a/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk similarity index 95% rename from ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.mk rename to ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index 8705d7c369..75f3d7210f 100644 --- a/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x239A USB_PID = 0x8104 -USB_PRODUCT = "ProxSense Trinkey M0" +USB_PRODUCT = "ProxLight Trinkey M0" USB_MANUFACTURER = "Adafruit Industries LLC" CHIP_VARIANT = SAMD21E18A diff --git a/ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c similarity index 100% rename from ports/atmel-samd/boards/adafruit_proxsense_trinkey_m0/pins.c rename to ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c From 4f36504aeb078047627763581eac7deaf05c3138 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 11 Apr 2021 20:07:51 -0500 Subject: [PATCH 255/261] same51: enable specific modules based on chip family closes #4590 --- ports/atmel-samd/mpconfigport.mk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 2962035cb9..547adf7752 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -87,3 +87,22 @@ CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD) endif # samd51 ###################################################################### + +###################################################################### +# Put same51-only choices here. + +ifeq ($(CHIP_FAMILY),same51) + +# No native touchio on SAMD51. +CIRCUITPY_TOUCHIO_USE_NATIVE = 0 + +# The ?='s allow overriding in mpconfigboard.mk. + +CIRCUITPY_NETWORK ?= 0 +CIRCUITPY_PS2IO ?= 1 +CIRCUITPY_SAMD ?= 1 +CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_FULL_BUILD) +CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD) + +endif # same51 +###################################################################### From 8053d4a7a3df8f23bae3c32b25fa699f026ba0a8 Mon Sep 17 00:00:00 2001 From: lady ada Date: Sun, 11 Apr 2021 22:33:03 -0400 Subject: [PATCH 256/261] remove neopixels --- .../boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index 75f3d7210f..a21c7b87d1 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -21,7 +21,7 @@ CIRCUITPY_BUSIO = 1 CIRCUITPY_STORAGE = 0 CIRCUITPY_MATH = 1 -CIRCUITPY_PIXELBUF = 1 +CIRCUITPY_PIXELBUF = 0 CIRCUITPY_USB_MIDI = 1 CIRCUITPY_TOUCHIO = 1 CIRCUITPY_FULL_BUILD = 0 @@ -30,5 +30,4 @@ SUPEROPT_GC = 0 SUPEROPT_VM = 0 # Include these Python libraries in firmware. -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID From b8d55d6dbffdb904df1bdd059e6ee248f3a62f2f Mon Sep 17 00:00:00 2001 From: Neradoc Date: Mon, 12 Apr 2021 23:37:41 +0200 Subject: [PATCH 257/261] fix removing past releases from circuitpython.org When releasing a new stable, unstable releases would be left in because the past stable was removed. --- tools/build_board_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 94f6e50af1..66ca48a02d 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -266,7 +266,7 @@ def generate_download_info(): # Delete the release we are replacing for board in current_info: info = current_info[board] - for version in info["versions"]: + for version in list(info["versions"]): previous_releases.add(version["version"]) previous_languages.update(version["languages"]) if version["stable"] == new_stable or ( From d13607876806d84095ba114b5d2b306160f1bec5 Mon Sep 17 00:00:00 2001 From: lady ada Date: Mon, 12 Apr 2021 22:17:20 -0400 Subject: [PATCH 258/261] try re-enabling storage --- .../boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk | 2 +- .../boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk | 2 +- .../boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk | 2 +- .../boards/adafruit_slide_trinkey_m0/mpconfigboard.mk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk index d71388ec44..56cbede39f 100644 --- a/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk @@ -18,7 +18,7 @@ CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO = 0 -CIRCUITPY_STORAGE = 0 +CIRCUITPY_STORAGE = 1 CIRCUITPY_MATH = 1 CIRCUITPY_PIXELBUF = 1 diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index a21c7b87d1..92e7a17f3e 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -18,7 +18,7 @@ CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO = 1 -CIRCUITPY_STORAGE = 0 +CIRCUITPY_STORAGE = 1 CIRCUITPY_MATH = 1 CIRCUITPY_PIXELBUF = 0 diff --git a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk index b071378c1d..29cc9ee195 100644 --- a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk @@ -18,7 +18,7 @@ CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO = 0 -CIRCUITPY_STORAGE = 0 +CIRCUITPY_STORAGE = 1 CIRCUITPY_MATH = 0 CIRCUITPY_PIXELBUF = 1 diff --git a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk index 0a403c1671..2bc2def52e 100644 --- a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk @@ -18,7 +18,7 @@ CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO = 0 -CIRCUITPY_STORAGE = 0 +CIRCUITPY_STORAGE = 1 CIRCUITPY_MATH = 1 CIRCUITPY_PIXELBUF = 1 From 92d7f310468a928a76487664ab1cd64f8e184c01 Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Tue, 13 Apr 2021 03:00:11 -0400 Subject: [PATCH 259/261] [synthio] disable in stm32f411ce_blackpill_with_flash region `FLASH_FIRMWARE' overflowed by 228 bytes --- .../boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk index 76acd7ed1e..211a658967 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk @@ -16,3 +16,5 @@ MCU_PACKAGE = UFQFPN48 LD_COMMON = boards/common_default.ld LD_FILE = boards/STM32F411_nvm_nofs.ld + +CIRCUITPY_SYNTHIO = 0 From 95a75b0410fe74c6b55a472697be31156efe7411 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 13 Apr 2021 08:48:40 -0500 Subject: [PATCH 260/261] update protomatter --- lib/protomatter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/protomatter b/lib/protomatter index c2c81ded11..98017c5734 160000 --- a/lib/protomatter +++ b/lib/protomatter @@ -1 +1 @@ -Subproject commit c2c81ded118484f8925bf81e270b416739cd72d9 +Subproject commit 98017c57349e259fab70c6a7830436b19a55f6f4 From cc36402a644bf501280c570a87e526410557599b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 13 Apr 2021 11:06:59 -0400 Subject: [PATCH 261/261] turn storage back on --- ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk index 8607385d22..0f90dba6a1 100644 --- a/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk @@ -18,7 +18,7 @@ CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO = 0 -CIRCUITPY_STORAGE = 0 +CIRCUITPY_STORAGE = 1 CIRCUITPY_MATH = 1 CIRCUITPY_PIXELBUF = 1