From 702978398573a652fb5df5540669424d3fa54c78 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 8 Mar 2021 18:55:05 -0500 Subject: [PATCH 01/41] 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 02/41] 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 227ac674639fa9df071ca7c8b2373029cc0b4618 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Tue, 16 Mar 2021 10:01:12 -0500 Subject: [PATCH 03/41] 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 04/41] 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 870dadc85adce4f10fa57dda1d11dda48b25dbc1 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Tue, 16 Mar 2021 10:42:46 -0500 Subject: [PATCH 05/41] 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 580121d46e30dde49b2e0648cb71f811d2eade84 Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Wed, 17 Mar 2021 09:38:53 -0500 Subject: [PATCH 06/41] 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 07/41] 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 c157ada90c3dabbb005b431f98e5c81e57e8a4bc Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 17 Mar 2021 16:11:04 -0500 Subject: [PATCH 08/41] 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 09/41] 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 f40c0c13adacf39bc9a21afd2d9ebbf29135e0f0 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 18 Mar 2021 09:04:53 -0500 Subject: [PATCH 10/41] 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 11/41] 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 12/41] 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 13/41] 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 768c9db0589c24c6f97268289a759cc74af9190d Mon Sep 17 00:00:00 2001 From: Jose David M Date: Thu, 18 Mar 2021 23:40:45 +0000 Subject: [PATCH 14/41] 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 15/41] 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 21c55f8e75777d70e62e5afe164623b2fd5a5546 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 18 Mar 2021 23:14:59 -0400 Subject: [PATCH 16/41] 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 17/41] 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 18/41] 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 19/41] 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 20/41] 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 21/41] 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 22/41] 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 23/41] 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 24/41] 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 25/41] 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 26/41] 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 27/41] 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 28/41] 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 40829d4cc85394513ca631cff23254344e29786c Mon Sep 17 00:00:00 2001 From: Kevin Matocha Date: Fri, 19 Mar 2021 20:30:37 -0500 Subject: [PATCH 29/41] 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 30/41] 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 31/41] 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 32/41] 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 33/41] 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 34/41] 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 35/41] 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 36/41] 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 37/41] 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 38/41] 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 39/41] 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 40/41] 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 41/41] 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, \