From 0bc74172a2ab829e810b0c4e5185e8d9b87bfc1f Mon Sep 17 00:00:00 2001 From: brentru Date: Fri, 14 Jun 2019 14:46:19 -0400 Subject: [PATCH 01/38] Add pybadge airlift, sans-tft --- .../atmel-samd/boards/pybadge_airlift/board.c | 114 ++++++++++++++++++ .../boards/pybadge_airlift/mpconfigboard.h | 37 ++++++ .../boards/pybadge_airlift/mpconfigboard.mk | 23 ++++ .../atmel-samd/boards/pybadge_airlift/pins.c | 75 ++++++++++++ 4 files changed, 249 insertions(+) create mode 100644 ports/atmel-samd/boards/pybadge_airlift/board.c create mode 100644 ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/pybadge_airlift/pins.c diff --git a/ports/atmel-samd/boards/pybadge_airlift/board.c b/ports/atmel-samd/boards/pybadge_airlift/board.c new file mode 100644 index 0000000000..f8d5e478a8 --- /dev/null +++ b/ports/atmel-samd/boards/pybadge_airlift/board.c @@ -0,0 +1,114 @@ +/* + * 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 "boards/board.h" +#include "mpconfigboard.h" +#include "hal/include/hal_gpio.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" +#include "tick.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 + 0xb1, 3, 0x01, 0x2C, 0x2D, // _FRMCTR1 + 0xb2, 3, 0x01, 0x2C, 0x2D, // + 0xb3, 6, 0x01, 0x2C, 0x2D, 0x01, 0x2C, 0x2D, + 0xb4, 1, 0x07, // _INVCTR line inversion + 0xc0, 3, 0xa2, 0x02, 0x84, // _PWCTR1 GVDD = 4.7V, 1.0uA + 0xc1, 1, 0xc5, // _PWCTR2 VGH=14.7V, VGL=-7.35V + 0xc2, 2, 0x0a, 0x00, // _PWCTR3 Opamp current small, Boost frequency + 0xc3, 2, 0x8a, 0x2a, + 0xc4, 2, 0x8a, 0xee, + 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V + 0x2a, 0, // _INVOFF + 0x36, 1, 0x00, // _MADCTL top to bottom refresh in vsync aligned order. + // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, + // fix on VTL + 0x3a, 1, 0x05, // COLMOD - 16bit color + 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma + 0x37, 0x32, 0x29, 0x2d, + 0x29, 0x25, 0x2B, 0x39, + 0x00, 0x01, 0x03, 0x10, + 0xe1, 16, 0x03, 0x1d, 0x07, 0x06, // _GMCTRN1 + 0x2E, 0x2C, 0x29, 0x2D, + 0x2E, 0x2E, 0x37, 0x3F, + 0x00, 0x00, 0x02, 0x10, + 0x2a, 3, 0x02, 0x00, 0x81, // _CASET XSTART = 2, XEND = 129 + 0x2b, 3, 0x02, 0x00, 0x81, // _RASET XSTART = 2, XEND = 129 + 0x13, 0 | DELAY, 10, // _NORON + 0x29, 0 | DELAY, 100, // _DISPON +}; + +void board_init(void) { + busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; + common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL); + common_hal_busio_spi_never_reset(spi); + common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8); + + displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; + bus->base.type = &displayio_fourwire_type; + common_hal_displayio_fourwire_construct(bus, + spi, + &pin_PB05, // TFT_DC Command or data + &pin_PB06, // TFT_CS Chip select + &pin_PB07); // TFT_RST Reset + + displayio_display_obj_t* display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, + 160, // Width (after rotation) + 128, // Height (after rotation) + 0, // column start + 0, // row start + 270, // rotation + 16, // Color depth + 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_PA01, // backlight pin + 1.0f, // brightness (ignored) + true, // auto_brightness + false, // single_byte_bounds + false); // data_as_commands +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h new file mode 100644 index 0000000000..ade74786d3 --- /dev/null +++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h @@ -0,0 +1,37 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit Pybadge Airlift" +#define MICROPY_HW_MCU_NAME "samd51j20" + +#define CIRCUITPY_MCU_FAMILY samd51 + +// This is for Rev B +#define MICROPY_HW_LED_STATUS (&pin_PA23) + +// These are pins not to reset. +// QSPI Data pins +#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11) +// DotStar pins, QSPI CS, and QSPI SCK +#define MICROPY_PORT_B (PORT_PB10 | PORT_PB11) +#define MICROPY_PORT_C (0) +#define MICROPY_PORT_D (0) + +#define AUTORESET_DELAY_MS 500 + +// If you change this, then make sure to update the linker scripts as well to +// make sure you don't overwrite code +#define CIRCUITPY_INTERNAL_NVM_SIZE 8192 + +#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) + +#define DEFAULT_I2C_BUS_SCL (&pin_PA13) +#define DEFAULT_I2C_BUS_SDA (&pin_PA12) + +#define DEFAULT_SPI_BUS_SCK (&pin_PA17) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB23) +#define DEFAULT_SPI_BUS_MISO (&pin_PB22) + +#define DEFAULT_UART_BUS_RX (&pin_PB17) +#define DEFAULT_UART_BUS_TX (&pin_PB16) + +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk new file mode 100644 index 0000000000..12683e995c --- /dev/null +++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk @@ -0,0 +1,23 @@ +LD_FILE = boards/samd51x19-bootloader-external-flash.ld +USB_VID = 0x239A +USB_PID = 0x8043 +USB_PRODUCT = "PyBadge AirLift" +USB_MANUFACTURER = "Adafruit Industries LLC" + +CHIP_VARIANT = SAMD51J20A +CHIP_FAMILY = samd51 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = GD25Q16C +LONGINT_IMPL = MPZ + +CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_GAMEPAD = 1 +CIRCUITPY_GAMEPADSHIFT = 1 +CIRCUITPY_STAGE = 1 +# No touch on SAMD51 yet +CIRCUITPY_TOUCHIO = 0 + +FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pybadge diff --git a/ports/atmel-samd/boards/pybadge_airlift/pins.c b/ports/atmel-samd/boards/pybadge_airlift/pins.c new file mode 100644 index 0000000000..d396502460 --- /dev/null +++ b/ports/atmel-samd/boards/pybadge_airlift/pins.c @@ -0,0 +1,75 @@ +#include "shared-bindings/board/__init__.h" + +#include "boards/board.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + {MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB08)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB09)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA04)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA06)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PB01)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB03)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB02)}, + + {MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB17)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB16)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB03)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB02)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA14)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA16)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA18)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB14)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA15)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA19)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA20)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA21)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23)}, + + // UART + {MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB17)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB16)}, + + // I2C + {MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA12)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA13)}, + + // SPI + {MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23)}, + + // Special named pins + {MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_PB04)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), MP_ROM_PTR(&pin_PB14)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER_ENABLE), MP_ROM_PTR(&pin_PA27)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_LATCH), MP_ROM_PTR(&pin_PB00)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_OUT), MP_ROM_PTR(&pin_PB30)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_CLOCK), MP_ROM_PTR(&pin_PB31)}, + + // ESP control + {MP_OBJ_NEW_QSTR(MP_QSTR_ESP_CS), MP_ROM_PTR(&pin_PA14)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_ESP_GPIO0), MP_ROM_PTR(&pin_PA31)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PA00)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_PB12)}, + + // TFT control pins + {MP_OBJ_NEW_QSTR(MP_QSTR_TFT_LITE), MP_ROM_PTR(&pin_PA01)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_PB15)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_PB13)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RST), MP_ROM_PTR(&pin_PB07)}, + {MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_PB06)}, + {MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_PB05)}, + + {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_DISPLAY), MP_ROM_PTR(&displays[0].display)}}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 4092294e7cbc14c337aa273edea6db7ea9442568 Mon Sep 17 00:00:00 2001 From: brentru Date: Fri, 14 Jun 2019 16:17:05 -0400 Subject: [PATCH 02/38] tft working init. sequence, still undersaturated --- .../atmel-samd/boards/pybadge_airlift/board.c | 28 ++++++------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/ports/atmel-samd/boards/pybadge_airlift/board.c b/ports/atmel-samd/boards/pybadge_airlift/board.c index f8d5e478a8..2d24150efc 100644 --- a/ports/atmel-samd/boards/pybadge_airlift/board.c +++ b/ports/atmel-samd/boards/pybadge_airlift/board.c @@ -40,21 +40,10 @@ displayio_fourwire_obj_t board_display_obj; uint8_t display_init_sequence[] = { 0x01, 0 | DELAY, 150, // SWRESET 0x11, 0 | DELAY, 255, // SLPOUT - 0xb1, 3, 0x01, 0x2C, 0x2D, // _FRMCTR1 - 0xb2, 3, 0x01, 0x2C, 0x2D, // - 0xb3, 6, 0x01, 0x2C, 0x2D, 0x01, 0x2C, 0x2D, - 0xb4, 1, 0x07, // _INVCTR line inversion - 0xc0, 3, 0xa2, 0x02, 0x84, // _PWCTR1 GVDD = 4.7V, 1.0uA - 0xc1, 1, 0xc5, // _PWCTR2 VGH=14.7V, VGL=-7.35V - 0xc2, 2, 0x0a, 0x00, // _PWCTR3 Opamp current small, Boost frequency - 0xc3, 2, 0x8a, 0x2a, - 0xc4, 2, 0x8a, 0xee, - 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V - 0x2a, 0, // _INVOFF - 0x36, 1, 0x00, // _MADCTL top to bottom refresh in vsync aligned order. + 0x36, 1, 0x08, // _MADCTL top to bottom refresh in vsync aligned order. // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, // fix on VTL - 0x3a, 1, 0x05, // COLMOD - 16bit color + 0x3a, 2, 0x55, 10, // COLMOD - 16bit color 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma 0x37, 0x32, 0x29, 0x2d, 0x29, 0x25, 0x2B, 0x39, @@ -63,10 +52,11 @@ uint8_t display_init_sequence[] = { 0x2E, 0x2C, 0x29, 0x2D, 0x2E, 0x2E, 0x37, 0x3F, 0x00, 0x00, 0x02, 0x10, - 0x2a, 3, 0x02, 0x00, 0x81, // _CASET XSTART = 2, XEND = 129 - 0x2b, 3, 0x02, 0x00, 0x81, // _RASET XSTART = 2, XEND = 129 + 0x2a, 3, 0x00, 240 >> 8, 240 & 0xFF, // _CASET XSTART = 0, XEND = 240 + 0x2b, 3, 0x00, 320 >> 8, 320 & 0xFF, // _RASET YSTART = 0, YEND = 320 + 0x21, 0 | DELAY, 10, // _INVON 0x13, 0 | DELAY, 10, // _NORON - 0x29, 0 | DELAY, 100, // _DISPON + 0x29, 0 | DELAY, 255, // _DISPON }; void board_init(void) { @@ -87,11 +77,11 @@ void board_init(void) { display->base.type = &displayio_display_type; common_hal_displayio_display_construct(display, bus, - 160, // Width (after rotation) - 128, // Height (after rotation) + 320, // Width (after rotation) + 240, // Height (after rotation) 0, // column start 0, // row start - 270, // rotation + 90, // rotation 16, // Color depth MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command From 207dc885a6036a40fd45c261282ea6a9e862cd16 Mon Sep 17 00:00:00 2001 From: brentru Date: Fri, 14 Jun 2019 16:34:30 -0400 Subject: [PATCH 03/38] removed incorrect gamma code, looks better now --- .../atmel-samd/boards/pybadge_airlift/board.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/ports/atmel-samd/boards/pybadge_airlift/board.c b/ports/atmel-samd/boards/pybadge_airlift/board.c index 2d24150efc..b34ac29210 100644 --- a/ports/atmel-samd/boards/pybadge_airlift/board.c +++ b/ports/atmel-samd/boards/pybadge_airlift/board.c @@ -40,23 +40,13 @@ displayio_fourwire_obj_t board_display_obj; uint8_t display_init_sequence[] = { 0x01, 0 | DELAY, 150, // SWRESET 0x11, 0 | DELAY, 255, // SLPOUT - 0x36, 1, 0x08, // _MADCTL top to bottom refresh in vsync aligned order. - // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, - // fix on VTL + 0x36, 1, 0x08, // _MADCTL bottom to top refresh in vsync aligned order. 0x3a, 2, 0x55, 10, // COLMOD - 16bit color - 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma - 0x37, 0x32, 0x29, 0x2d, - 0x29, 0x25, 0x2B, 0x39, - 0x00, 0x01, 0x03, 0x10, - 0xe1, 16, 0x03, 0x1d, 0x07, 0x06, // _GMCTRN1 - 0x2E, 0x2C, 0x29, 0x2D, - 0x2E, 0x2E, 0x37, 0x3F, - 0x00, 0x00, 0x02, 0x10, 0x2a, 3, 0x00, 240 >> 8, 240 & 0xFF, // _CASET XSTART = 0, XEND = 240 0x2b, 3, 0x00, 320 >> 8, 320 & 0xFF, // _RASET YSTART = 0, YEND = 320 - 0x21, 0 | DELAY, 10, // _INVON - 0x13, 0 | DELAY, 10, // _NORON - 0x29, 0 | DELAY, 255, // _DISPON + 0x21, 0 | DELAY, 10, // _INVON + 0x13, 0 | DELAY, 10, // _NORON + 0x29, 0 | DELAY, 255, // _DISPON }; void board_init(void) { From 99bcb4e2a4162c4f0c67b170c5d6b80448df791a Mon Sep 17 00:00:00 2001 From: Craig Forbes Date: Fri, 14 Jun 2019 15:41:32 -0500 Subject: [PATCH 04/38] Create a /lib directory when creating the filesystem. --- supervisor/shared/filesystem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c index fa34ed0dac..c50d7f4eeb 100644 --- a/supervisor/shared/filesystem.c +++ b/supervisor/shared/filesystem.c @@ -99,6 +99,9 @@ void filesystem_init(bool create_allowed, bool force_create) { make_empty_file(&vfs_fat->fatfs, "/.Trashes"); make_empty_file(&vfs_fat->fatfs, "/.fseventsd/no_log"); + // create empty lib directory + f_mkdir(&vfs_fat->fatfs, "/lib"); + // and ensure everything is flushed supervisor_flash_flush(); } else if (res != FR_OK) { From 6a37f4f7b1a359793a0d20246aaf59bbfb1495d5 Mon Sep 17 00:00:00 2001 From: brentru Date: Fri, 14 Jun 2019 16:46:42 -0400 Subject: [PATCH 05/38] added board to fastest travis_boards --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1702089c37..5699358bd0 100755 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ env: - TRAVIS_BOARDS="metro_m0_express metro_m4_express metro_m4_airlift_lite pirkey_m0 trellis_m4_express trinket_m0 sparkfun_lumidrive sparkfun_redboard_turbo bast_pro_mini_m0" TRAVIS_SDK=arm - TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip escornabot_makech" TRAVIS_SDK=arm - TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300 arduino_mkrzero pewpew10 kicksat-sprite ugame10 robohatmm1" TRAVIS_SDK=arm - - TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal sparkfun_samd21_mini sparkfun_samd21_dev pybadge" TRAVIS_SDK=arm + - TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal sparkfun_samd21_mini sparkfun_samd21_dev pybadge pybadge_airlift" TRAVIS_SDK=arm addons: artifacts: From 06f9e94ff7b6856d83c193d5353937880f7e15e6 Mon Sep 17 00:00:00 2001 From: C47D Date: Sat, 15 Jun 2019 01:02:40 -0500 Subject: [PATCH 06/38] [locale spanish] Update spanish translation. --- locale/es.po | 428 ++++++++++++++++++++++----------------------------- 1 file changed, 184 insertions(+), 244 deletions(-) diff --git a/locale/es.po b/locale/es.po index d954d574c3..775b6f887e 100644 --- a/locale/es.po +++ b/locale/es.po @@ -3,12 +3,11 @@ # This file is distributed under the same license as the PACKAGE package. # Carlos Diaz , 2018. # Juan Biondi , 2018. -# msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-11 14:59-0700\n" +"POT-Creation-Date: 2019-06-15 00:49-0500\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -24,7 +23,7 @@ msgid "" "Code done running. Waiting for reload.\n" msgstr "" "\n" -"Código en ejecución. Esperando para recargar.\n" +"El código terminó su ejecución. Esperando para recargar.\n" #: py/obj.c msgid " File \"%q\"" @@ -56,15 +55,13 @@ msgid "%q indices must be integers, not %s" msgstr "%q indices deben ser enteros, no %s" #: shared-bindings/bleio/CharacteristicBuffer.c -#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c -#, fuzzy +#: shared-bindings/displayio/Shape.c shared-bindings/displayio/Group.c msgid "%q must be >= 1" msgstr "%q debe ser >= 1" #: shared-bindings/fontio/BuiltinFont.c -#, fuzzy msgid "%q should be an int" -msgstr "%q deberia ser un int" +msgstr "%q debe ser un int" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" @@ -143,7 +140,7 @@ msgstr "objeto '%s' no tiene atributo '%q'" msgid "'%s' object is not an iterator" msgstr "objeto '%s' no es un iterator" -#: py/objtype.c py/runtime.c +#: py/runtime.c py/objtype.c #, c-format msgid "'%s' object is not callable" msgstr "objeto '%s' no puede ser llamado" @@ -200,8 +197,7 @@ msgstr "'return' fuera de una función" #: py/compile.c msgid "'yield' outside function" -msgstr "" -"No es posible reiniciar en modo bootloader porque no hay bootloader presente." +msgstr "'yield' fuera de una función" #: py/compile.c msgid "*x must be assignment target" @@ -226,47 +222,46 @@ msgstr "El canal EXTINT ya está siendo utilizado" #: shared-bindings/bleio/Address.c #, c-format msgid "Address is not %d bytes long or is in wrong format" -msgstr "Direción no es %d bytes largo o esta en el formato incorrecto" +msgstr "Direción no es %d bytes de largo o esta en el formato incorrecto" #: shared-bindings/bleio/Address.c -#, fuzzy, c-format +#, c-format msgid "Address must be %d bytes long" -msgstr "Direción debe ser %d bytes de largo" +msgstr "La dirección debe ser %d bytes de largo" #: ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" -msgstr "Todos los periféricos I2C están siendo usados" +msgstr "Todos los I2C peripherals están siendo usados" #: ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" -msgstr "Todos los periféricos SPI están siendo usados" +msgstr "Todos los SPI peripherals están siendo usados" #: ports/nrf/common-hal/busio/UART.c -#, fuzzy msgid "All UART peripherals are in use" msgstr "Todos los periféricos UART están siendo usados" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" -msgstr "Todos los canales de eventos estan en uso" +msgstr "Todos los canales de eventos estan siendo usados" #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "All sync event channels in use" msgstr "" -"Todos los canales de eventos de sincronización(sync event channels) están " +"Todos los canales de eventos de sincronización (sync event channels) están " "siendo utilizados" #: shared-bindings/pulseio/PWMOut.c msgid "All timers for this pin are in use" msgstr "Todos los timers para este pin están siendo utilizados" -#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c #: shared-module/_pew/PewPew.c msgid "All timers in use" -msgstr "Todos los timers estan en uso" +msgstr "Todos los timers en uso" #: ports/nrf/common-hal/analogio/AnalogOut.c msgid "AnalogOut functionality not supported" @@ -274,7 +269,7 @@ msgstr "Funcionalidad AnalogOut no soportada" #: shared-bindings/analogio/AnalogOut.c msgid "AnalogOut is only 16 bits. Value must be less than 65536." -msgstr "AnalogOut solo toma 16 bits. El valor debe ser menos de 65536." +msgstr "AnalogOut es solo de 16 bits. Value debe ser menos a 65536." #: ports/atmel-samd/common-hal/analogio/AnalogOut.c msgid "AnalogOut not supported on given pin" @@ -286,7 +281,7 @@ msgstr "Otro envío ya está activo" #: shared-bindings/pulseio/PulseOut.c msgid "Array must contain halfwords (type 'H')" -msgstr "La matriz debe contener palabras medias (tipo 'H')" +msgstr "Array debe contener media palabra (type 'H')" #: shared-bindings/nvm/ByteArray.c msgid "Array values should be single bytes." @@ -295,7 +290,7 @@ msgstr "Valores del array deben ser bytes individuales." #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when MicroPython VM not running.\n" msgstr "" -"Se intentó la asignación del heap cuando el VM de MicroPython no estaba " +"Intento de allocation de heap cuando la VM de MicroPython no estaba " "corriendo.\n" #: main.c @@ -316,7 +311,7 @@ msgstr "Bit clock y word select deben compartir una unidad de reloj" #: shared-bindings/audiobusio/PDMIn.c msgid "Bit depth must be multiple of 8." -msgstr "La profundidad de bits debe ser múltiplo de 8." +msgstr "Bits depth debe ser múltiplo de 8." #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" @@ -324,40 +319,35 @@ msgstr "Ambos pines deben soportar interrupciones por hardware" #: shared-bindings/supervisor/__init__.c msgid "Brightness must be between 0 and 255" -msgstr "Brillo debe estar entro 0 y 255" +msgstr "Brightness debe estar entro 0 y 255" #: shared-bindings/displayio/Display.c msgid "Brightness not adjustable" -msgstr "Brillo no adjustable" +msgstr "Brillo no se puede ajustar" #: shared-module/usb_hid/Device.c #, c-format msgid "Buffer incorrect size. Should be %d bytes." msgstr "Tamaño de buffer incorrecto. Debe ser de %d bytes." -#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c +#: shared-bindings/busio/I2C.c shared-bindings/bitbangio/I2C.c msgid "Buffer must be at least length 1" msgstr "Buffer debe ser de longitud 1 como minimo" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c -#, fuzzy, c-format +#, c-format msgid "Bus pin %d is already in use" -msgstr "DAC ya está siendo utilizado" +msgstr "Bus pin %d ya está siendo utilizado" #: shared-bindings/bleio/UUID.c -#, fuzzy msgid "Byte buffer must be 16 bytes." -msgstr "buffer debe de ser un objeto bytes-like" +msgstr "Byte buffer debe de ser 16 bytes" #: shared-bindings/nvm/ByteArray.c msgid "Bytes must be between 0 and 255." msgstr "Bytes debe estar entre 0 y 255." -#: py/objtype.c -msgid "Call super().__init__() before accessing native object." -msgstr "" - #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format msgid "Can not use dotstar with %s" @@ -369,7 +359,7 @@ msgstr "No se pueden agregar servicio en modo Central" #: shared-bindings/bleio/Device.c msgid "Can't advertise in Central mode" -msgstr "No se puede anunciar en modo Central" +msgstr "No se puede anunciarse en Central mode" #: shared-bindings/bleio/Device.c msgid "Can't change the name in Central mode" @@ -389,9 +379,8 @@ msgid "Cannot get pull while in output mode" msgstr "No puede ser pull mientras este en modo de salida" #: ports/nrf/common-hal/microcontroller/Processor.c -#, fuzzy msgid "Cannot get temperature" -msgstr "No se puede obtener la temperatura. status: 0x%02x" +msgstr "No se puede obtener la temperatura." #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" @@ -419,11 +408,11 @@ msgstr "No se puede asignar un valor cuando la dirección es input." #: py/objslice.c msgid "Cannot subclass slice" -msgstr "" +msgstr "Cannot subclass slice" #: shared-module/bitbangio/SPI.c msgid "Cannot transfer without MOSI and MISO pins." -msgstr "No se puede transferir sin pines MOSI y MISO." +msgstr "No se puede transmitir sin pines MOSI y MISO." #: extmod/moductypes.c msgid "Cannot unambiguously get sizeof scalar" @@ -435,15 +424,15 @@ msgstr "No se puede escribir sin pin MOSI." #: shared-bindings/bleio/Service.c msgid "Characteristic UUID doesn't match Service UUID" -msgstr "Characteristic UUID no iguala al Service UUID" +msgstr "Características UUID no concide con el Service UUID" #: ports/nrf/common-hal/bleio/Service.c msgid "Characteristic already in use by another Service." -msgstr "Characteristic esta en uso por otro servicio" +msgstr "Características ya esta en uso por otro Serivice" #: shared-bindings/bleio/CharacteristicBuffer.c msgid "CharacteristicBuffer writing not provided" -msgstr "" +msgstr "CharateristicBuffer escritura no proporcionada" #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." @@ -451,7 +440,7 @@ msgstr "Clock pin init fallido" #: shared-module/bitbangio/I2C.c msgid "Clock stretch too long" -msgstr "" +msgstr "Clock stretch demasiado largo " #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Clock unit in use" @@ -459,33 +448,32 @@ msgstr "Clock unit está siendo utilizado" #: shared-bindings/_pew/PewPew.c msgid "Column entry must be digitalio.DigitalInOut" -msgstr "La entrada en la columna debe ser digitalio.DigitalInOut" +msgstr "Entrada de columna debe ser digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c -#, fuzzy msgid "Command must be an int between 0 and 255" -msgstr "Bytes debe estar entre 0 y 255." +msgstr "Command debe estar entre 0 y 255." #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" -msgstr "No pudo descodificar ble_uuid, err 0x%04x" +msgstr "No se puede descodificar ble_uuid, err 0x%04x" #: ports/atmel-samd/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "No se puede inicializar la UART" -#: shared-module/audioio/Mixer.c shared-module/audioio/WaveFile.c +#: shared-module/audioio/WaveFile.c shared-module/audioio/Mixer.c msgid "Couldn't allocate first buffer" msgstr "No se pudo asignar el primer buffer" -#: shared-module/audioio/Mixer.c shared-module/audioio/WaveFile.c +#: shared-module/audioio/WaveFile.c shared-module/audioio/Mixer.c msgid "Couldn't allocate second buffer" msgstr "No se pudo asignar el segundo buffer" #: supervisor/shared/safe_mode.c msgid "Crash into the HardFault_Handler.\n" -msgstr "" +msgstr "Choque en el HardFault_Handler.\n" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" @@ -494,22 +482,20 @@ msgstr "DAC ya está siendo utilizado" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c msgid "Data 0 pin must be byte aligned" -msgstr "" +msgstr "El pin Data 0 debe estar alineado a bytes" #: shared-module/audioio/WaveFile.c msgid "Data chunk must follow fmt chunk" -msgstr "El Data Chunk debe seguir el fmt chunk" +msgstr "Trozo de datos debe seguir fmt chunk" #: ports/nrf/common-hal/bleio/Broadcaster.c #: ports/nrf/common-hal/bleio/Peripheral.c -#, fuzzy msgid "Data too large for advertisement packet" -msgstr "Los datos no caben en el paquete de anuncio." +msgstr "Data es muy grande para el paquete de advertisement." #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Data too large for the advertisement packet" -msgstr "Los datos no caben en el paquete de anuncio." +msgstr "Data es muy grande para el paquete de advertisement." #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." @@ -524,7 +510,6 @@ msgid "Drive mode not used when direction is input." msgstr "Modo Drive no se usa cuando la dirección es input." #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/atmel-samd/common-hal/ps2io/Ps2.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "EXTINT channel already in use" msgstr "El canal EXTINT ya está siendo utilizado" @@ -533,56 +518,48 @@ msgstr "El canal EXTINT ya está siendo utilizado" msgid "Error in regex" msgstr "Error en regex" -#: shared-bindings/microcontroller/Pin.c -#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c +#: shared-bindings/microcontroller/Pin.c shared-bindings/pulseio/PulseOut.c #: shared-bindings/terminalio/Terminal.c +#: shared-bindings/neopixel_write/__init__.c msgid "Expected a %q" msgstr "Se espera un %q" #: shared-bindings/bleio/CharacteristicBuffer.c -#, fuzzy msgid "Expected a Characteristic" -msgstr "No se puede agregar la Característica." +msgstr "Se esperaba una Característica." #: shared-bindings/bleio/Characteristic.c shared-bindings/bleio/Descriptor.c #: shared-bindings/bleio/Service.c -#, fuzzy msgid "Expected a UUID" -msgstr "Se espera un %q" +msgstr "Se esperaba un UUID" #: shared-module/_pixelbuf/PixelBuf.c #, c-format msgid "Expected tuple of length %d, got %d" msgstr "Se esperaba un tuple de %d, se obtuvo %d" -#: shared-bindings/ps2io/Ps2.c -msgid "Failed sending command." -msgstr "" - #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Failed to acquire mutex" -msgstr "No se puede adquirir el mutex, status: 0x%08lX" +msgstr "Fallo al adquirir el mutex" -#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c -#, fuzzy, c-format +#: ports/nrf/sd_mutex.c ports/nrf/common-hal/bleio/Characteristic.c +#, c-format msgid "Failed to acquire mutex, err 0x%04x" -msgstr "No se puede adquirir el mutex, status: 0x%08lX" +msgstr "Fallo al adquirir el mutex, err: 0x%08lX" #: ports/nrf/common-hal/bleio/Service.c -#, fuzzy, c-format +#, c-format msgid "Failed to add characteristic, err 0x%04x" -msgstr "No se puede añadir caracteristica, status: 0x%08lX" +msgstr "Fallo al añadir caracteristica, err: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Failed to add service" -msgstr "No se puede detener el anuncio. status: 0x%02x" +msgstr "Fallo al agregar servicio" #: ports/nrf/common-hal/bleio/Peripheral.c -#, fuzzy, c-format +#, c-format msgid "Failed to add service, err 0x%04x" -msgstr "No se puede detener el anuncio. status: 0x%02x" +msgstr "Fallo al agregar servicio. err: 0x%02x" #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c msgid "Failed to allocate RX buffer" @@ -595,44 +572,37 @@ msgid "Failed to allocate RX buffer of %d bytes" msgstr "Falló la asignación del buffer RX de %d bytes" #: ports/nrf/common-hal/bleio/Adapter.c -#, fuzzy msgid "Failed to change softdevice state" -msgstr "No se puede cambiar el estado del softdevice, error: 0x%08lX" +msgstr "No se puede cambiar el estado del softdevice" #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Failed to connect:" -msgstr "No se puede conectar. status: 0x%02x" +msgstr "No se puede conectar:" #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Failed to continue scanning" -msgstr "No se puede iniciar el escaneo. status: 0x%02x" +msgstr "No se puede iniciar el escaneo." #: ports/nrf/common-hal/bleio/Scanner.c -#, fuzzy, c-format +#, c-format msgid "Failed to continue scanning, err 0x%04x" -msgstr "No se puede iniciar el escaneo. status: 0x%02x" +msgstr "No se puede iniciar el escaneo. err: 0x%02x" #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Failed to create mutex" -msgstr "No se puede leer el valor del atributo. status 0x%02x" +msgstr "Fallo al crear mutex" #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Failed to discover services" -msgstr "No se puede descubrir servicios, status: 0x%08lX" +msgstr "No se puede descubrir servicios" #: ports/nrf/common-hal/bleio/Adapter.c -#, fuzzy msgid "Failed to get local address" -msgstr "No se puede obtener la dirección local, error: 0x%08lX" +msgstr "No se puede obtener la dirección local" #: ports/nrf/common-hal/bleio/Adapter.c -#, fuzzy msgid "Failed to get softdevice state" -msgstr "No se puede obtener el estado del softdevice, error: 0x%08lX" +msgstr "No se puede obtener el estado del softdevice" #: ports/nrf/common-hal/bleio/Characteristic.c #, c-format @@ -640,9 +610,9 @@ msgid "Failed to notify or indicate attribute value, err 0x%04x" msgstr "Error al notificar o indicar el valor del atributo, err 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c -#, fuzzy, c-format +#, c-format msgid "Failed to read CCCD value, err 0x%04x" -msgstr "No se puede leer el valor del atributo. status 0x%02x" +msgstr "No se puede leer el valor del atributo. err 0x%02x" #: ports/nrf/common-hal/bleio/Characteristic.c #, c-format @@ -650,66 +620,62 @@ msgid "Failed to read attribute value, err 0x%04x" msgstr "Error al leer valor del atributo, err 0x%04" #: ports/nrf/common-hal/bleio/Characteristic.c -#, fuzzy, c-format +#, c-format msgid "Failed to read gatts value, err 0x%04x" msgstr "No se puede escribir el valor del atributo. status: 0x%02x" #: ports/nrf/common-hal/bleio/UUID.c -#, fuzzy, c-format +#, c-format msgid "Failed to register Vendor-Specific UUID, err 0x%04x" -msgstr "No se puede agregar el Vendor Specific 128-bit UUID." +msgstr "Fallo al registrar el Vendor-Specific UUID, err 0x%04x" #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Failed to release mutex" msgstr "No se puede liberar el mutex, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c -#, fuzzy, c-format +#: ports/nrf/sd_mutex.c ports/nrf/common-hal/bleio/Characteristic.c +#, c-format msgid "Failed to release mutex, err 0x%04x" -msgstr "No se puede liberar el mutex, status: 0x%08lX" +msgstr "No se puede liberar el mutex, err 0x%04x" #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Failed to start advertising" -msgstr "No se puede inicar el anuncio. status: 0x%02x" +msgstr "No se puede inicar el anuncio" #: ports/nrf/common-hal/bleio/Broadcaster.c #: ports/nrf/common-hal/bleio/Peripheral.c -#, fuzzy, c-format +#, c-format msgid "Failed to start advertising, err 0x%04x" -msgstr "No se puede inicar el anuncio. status: 0x%02x" +msgstr "No se puede inicar el anuncio. err: 0x%04x" #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Failed to start scanning" -msgstr "No se puede iniciar el escaneo. status: 0x%02x" +msgstr "No se puede iniciar el escaneo" #: ports/nrf/common-hal/bleio/Scanner.c -#, fuzzy, c-format +#, c-format msgid "Failed to start scanning, err 0x%04x" -msgstr "No se puede iniciar el escaneo. status: 0x%02x" +msgstr "No se puede iniciar el escaneo. err 0x%04x" #: ports/nrf/common-hal/bleio/Device.c -#, fuzzy msgid "Failed to stop advertising" -msgstr "No se puede detener el anuncio. status: 0x%02x" +msgstr "No se puede detener el anuncio" #: ports/nrf/common-hal/bleio/Broadcaster.c #: ports/nrf/common-hal/bleio/Peripheral.c -#, fuzzy, c-format +#, c-format msgid "Failed to stop advertising, err 0x%04x" -msgstr "No se puede detener el anuncio. status: 0x%02x" +msgstr "No se puede detener el anuncio. err: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c -#, fuzzy, c-format +#, c-format msgid "Failed to write attribute value, err 0x%04x" -msgstr "No se puede escribir el valor del atributo. status: 0x%02x" +msgstr "No se puede escribir el valor del atributo. err: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c -#, fuzzy, c-format +#, c-format msgid "Failed to write gatts value, err 0x%04x" -msgstr "No se puede escribir el valor del atributo. status: 0x%02x" +msgstr "No se puede escribir el valor del atributo. err: 0x%04x" #: py/moduerrno.c msgid "File exists" @@ -737,8 +703,8 @@ msgstr "Falló el iniciar la escritura de flash, err 0x%04x" msgid "Frequency captured is above capability. Capture Paused." msgstr "Frecuencia capturada por encima de la capacidad. Captura en pausa." -#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c #: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c +#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c msgid "Function requires lock" msgstr "La función requiere lock" @@ -790,7 +756,7 @@ msgstr "Argumento inválido" #: shared-module/displayio/Bitmap.c msgid "Invalid bits per value" -msgstr "Bits no válidos por valor" +msgstr "Inválido bits per valor" #: ports/nrf/common-hal/busio/UART.c msgid "Invalid buffer size" @@ -798,7 +764,7 @@ msgstr "Tamaño de buffer inválido" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" -msgstr "Período de captura no válido. Rango válido: 1 - 500" +msgstr "Inválido periodo de captura. Rango válido: 1 - 500" #: shared-bindings/audioio/Mixer.c msgid "Invalid channel count" @@ -814,18 +780,18 @@ msgstr "Archivo inválido" #: shared-module/audioio/WaveFile.c msgid "Invalid format chunk size" -msgstr "" +msgstr "Formato de fragmento de formato no válido" -#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/SPI.c shared-bindings/bitbangio/SPI.c msgid "Invalid number of bits" msgstr "Numero inválido de bits" -#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/SPI.c shared-bindings/bitbangio/SPI.c msgid "Invalid phase" msgstr "Fase inválida" -#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: shared-bindings/pulseio/PWMOut.c msgid "Invalid pin" msgstr "Pin inválido" @@ -839,14 +805,14 @@ msgid "Invalid pin for right channel" msgstr "Pin inválido para canal derecho" #: ports/atmel-samd/common-hal/busio/I2C.c -#: ports/atmel-samd/common-hal/busio/SPI.c #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/busio/SPI.c #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c #: ports/nrf/common-hal/busio/I2C.c msgid "Invalid pins" msgstr "pines inválidos" -#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/SPI.c shared-bindings/bitbangio/SPI.c msgid "Invalid polarity" msgstr "Polaridad inválida" @@ -866,10 +832,6 @@ msgstr "Archivo wave inválido" msgid "LHS of keyword arg must be an id" msgstr "LHS del agumento por palabra clave deberia ser un identificador" -#: shared-module/displayio/Group.c -msgid "Layer already in a group." -msgstr "" - #: shared-module/displayio/Group.c msgid "Layer must be a Group or TileGrid subclass." msgstr "Layer debe ser una subclase de Group o TileGrid." @@ -908,7 +870,7 @@ msgstr "Valor máximo de x cuando se refleja es %d" #: supervisor/shared/safe_mode.c msgid "MicroPython NLR jump failed. Likely memory corruption.\n" -msgstr "" +msgstr "MicroPython NLR salto fallido. Probable corrupción de memoria.\n" #: supervisor/shared/safe_mode.c msgid "MicroPython fatal error.\n" @@ -916,18 +878,18 @@ msgstr "Error fatal de MicroPython.\n" #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" -msgstr "" +msgstr "Micrófono demora de inicio debe estar en el rango 0.0 a 1.0" -#: shared-bindings/displayio/Group.c -msgid "Must be a %q subclass." -msgstr "" +#: shared-bindings/displayio/Display.c +msgid "Must be a Group subclass." +msgstr "Debe ser una subclase de Group." #: ports/atmel-samd/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "El chip no tiene DAC" -#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "No DMA channel found" msgstr "No se encontró el canal DMA" @@ -955,10 +917,6 @@ msgstr "Sin GCLKs libres" msgid "No hardware random available" msgstr "No hay hardware random disponible" -#: ports/atmel-samd/common-hal/ps2io/Ps2.c -msgid "No hardware support on clk pin" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "No hardware support on pin" @@ -977,9 +935,9 @@ msgstr "No existe el archivo/directorio" msgid "Not connected" msgstr "No se puede conectar a AP" -#: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c +#: shared-bindings/audioio/AudioOut.c shared-bindings/audiobusio/I2SOut.c msgid "Not playing" -msgstr "" +msgstr "No esta jugando" #: shared-bindings/util.c msgid "" @@ -994,15 +952,15 @@ msgstr "Paridad impar no soportada" #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Only 8 or 16 bit mono with " -msgstr "" +msgstr "Solo mono de 8 ó 16 bit con " #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" -"Solo formato de Windows, BMP sin compresión soportado: el tamaño del " -"encabezado dado es %d" +"Solo formato de Windows, sin comprimir BMP soportado: tamaño de encabezado " +"dado es %d" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1010,6 +968,8 @@ msgid "" "Only monochrome, indexed 8bpp, and 16bpp or greater BMPs supported: %d bpp " "given" msgstr "" +"Solo se admiten BMP monocromos, indexados de 8bpp y 16bpp o superiores:% d " +"bppdado" #: shared-bindings/_pixelbuf/PixelBuf.c #, fuzzy @@ -1018,17 +978,19 @@ msgstr "solo se admiten segmentos con step=1 (alias None)" #: shared-bindings/audiobusio/PDMIn.c msgid "Oversample must be multiple of 8." -msgstr "" +msgstr "La sobreexplotación debe ser un múltiplo de 8" #: shared-bindings/pulseio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" -msgstr "" +msgstr "PWM duty_cycle debe ser entre 0 y 65535 inclusivo (16 bit resolution)" #: shared-bindings/pulseio/PWMOut.c msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" +"PWM frecuencia no esta escrito cuando el variable_frequency es falso en " +"construcion" #: py/moduerrno.c msgid "Permission denied" @@ -1041,17 +1003,13 @@ msgstr "Pin no tiene capacidad ADC" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "Pixel beyond bounds of buffer" -msgstr "" +msgstr "Pixel beyond bounds of buffer" #: py/builtinhelp.c #, fuzzy msgid "Plus any modules on the filesystem\n" msgstr "Incapaz de montar de nuevo el sistema de archivos" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "" - #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" @@ -1093,7 +1051,7 @@ msgstr "Canal derecho no soportado" #: shared-bindings/_pew/PewPew.c msgid "Row entry must be digitalio.DigitalInOut" -msgstr "" +msgstr "La entrada de la fila debe ser digitalio.DigitalInOut" #: main.c msgid "Running in safe mode! Auto-reload is off.\n" @@ -1123,17 +1081,17 @@ msgstr "Serializer está siendo utilizado" #: shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." -msgstr "Cortes y valores son de diferentes longitudes." +msgstr "Rebanada y valor son diferentes longitudes" #: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c #: shared-bindings/displayio/TileGrid.c shared-bindings/pulseio/PulseIn.c msgid "Slices not supported" -msgstr "No se soportan los cortes" +msgstr "Rebanadas no soportadas" #: ports/nrf/common-hal/bleio/Adapter.c #, c-format msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX" -msgstr "" +msgstr "Asunto de dispositivo suave, id: 0x%08lX, pc: 0x%08lX" #: extmod/modure.c msgid "Splitting with sub-captures" @@ -1155,16 +1113,15 @@ msgid "" "If you didn't change the stack, then file an issue here with the contents of " "your CIRCUITPY drive:\n" msgstr "" +"El heap de CircuitPython estaba corrupto porque el stack era demasiado " +"pequeño.\n" +"Aumente los límites del tamaño del stacj y presione reset (después de " +"expulsarCIRCUITPY).\n" +"Si no cambió el stack, entonces reporte un issue aquí con el contenido desu " +"unidad CIRCUITPY:\n" #: supervisor/shared/safe_mode.c msgid "" -"The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" -msgstr "" - -#: supervisor/shared/safe_mode.c -#, fuzzy -msgid "" "The microcontroller's power dipped. Please make sure your power supply " "provides\n" "enough power for the whole circuit and press reset (after ejecting " @@ -1209,7 +1166,7 @@ msgstr "Los índices de Tile deben ser 0 - 255" #: shared-bindings/displayio/TileGrid.c msgid "Tile width must exactly divide bitmap width" -msgstr "" +msgstr "Ancho del azulejo debe dividir exactamente ancho de mapa de bits" #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " @@ -1221,7 +1178,7 @@ msgstr "Demasiados canales en sample." #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c msgid "Too many display busses" -msgstr "" +msgstr "Demasiados autobuses de pantalla" #: shared-bindings/displayio/Display.c msgid "Too many displays" @@ -1245,18 +1202,18 @@ msgstr "Error USB" #: shared-bindings/bleio/UUID.c msgid "UUID integer value not in range 0 to 0xffff" -msgstr "El valor integer UUID no está en el rango 0 a 0xffff" +msgstr "UUID integer valor no es en el distancia de 0 a 0xffff" #: shared-bindings/bleio/UUID.c msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" -msgstr "El string UUID no es 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx'" +msgstr "UUID string no es 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" #: shared-bindings/bleio/UUID.c msgid "UUID value is not str, int or byte buffer" -msgstr "El valor UUID no es str, int, or buffer byte" +msgstr "UUID valor no es un str, int o byte buffer" -#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Unable to allocate buffers for signed conversion" msgstr "No se pudieron asignar buffers para la conversión con signo" @@ -1279,12 +1236,12 @@ msgstr "Imposible escribir en nvm" #: ports/nrf/common-hal/bleio/UUID.c msgid "Unexpected nrfx uuid type" -msgstr "Tipo nrfx uuid inesperado" +msgstr "Tipo de uuid nrfx inesperado" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format msgid "Unmatched number of items on RHS (expected %d, got %d)." -msgstr "" +msgstr "Número incomparable de elementos en RHS (%d esperado,%d obtenido)" #: ports/atmel-samd/common-hal/busio/I2C.c msgid "Unsupported baudrate" @@ -1390,7 +1347,7 @@ msgid "argument has wrong type" msgstr "el argumento tiene un tipo erroneo" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/gamepad/GamePad.c shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "argumento número/tipos no coinciden" @@ -1408,7 +1365,7 @@ msgstr "atributos aún no soportados" #: ports/nrf/common-hal/bleio/Characteristic.c msgid "bad GATT role" -msgstr "Rol GATT malo" +msgstr "mal GATT papel" #: py/builtinevex.c msgid "bad compile mode" @@ -1449,7 +1406,7 @@ msgstr "El argumento de chr() no esta en el rango(256)" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format msgid "buf is too small. need %d bytes" -msgstr "buf es demasiado pequeño. necesita %d bytes." +msgstr "buf es demasiado pequeño. necesita %d bytes" #: shared-bindings/audioio/RawSample.c msgid "buffer must be a bytes-like object" @@ -1458,11 +1415,11 @@ msgstr "buffer debe de ser un objeto bytes-like" #: shared-module/struct/__init__.c #, fuzzy msgid "buffer size must match format" -msgstr "los buffers deben de tener la misma longitud" +msgstr "los buffers deben de tener el mismo formato" -#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/SPI.c shared-bindings/bitbangio/SPI.c msgid "buffer slices must be of equal length" -msgstr "cortes del buffer necesitan ser de tamaño igual" +msgstr "Las secciones del buffer necesitan tener longitud igual" #: py/modstruct.c shared-bindings/struct/__init__.c #: shared-module/struct/__init__.c @@ -1475,7 +1432,7 @@ msgstr "los buffers deben de tener la misma longitud" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" -msgstr "botones deben ser digitalio.DigitalInOut" +msgstr "los bottones nececitan ser digitalio.DigitalInOut" #: py/vm.c msgid "byte code not implemented" @@ -1484,7 +1441,7 @@ msgstr "codigo byte no implementado" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format msgid "byteorder is not an instance of ByteOrder (got a %s)" -msgstr "byteorder no es instancia de ByteOrder (encontramos un %s)" +msgstr "byteorder no es instancia de ByteOrder (encontarmos un %s)" #: ports/atmel-samd/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" @@ -1666,15 +1623,15 @@ msgstr "no se puedo realizar importación relativa" #: py/emitnative.c msgid "casting" -msgstr "emitiendo (casting)" +msgstr "" #: shared-bindings/bleio/Service.c msgid "characteristics includes an object that is not a Characteristic" -msgstr "charactericas incluye un objeto que no es Characteristic" +msgstr "characteristics incluye un objeto que no es una Characteristica" #: shared-bindings/_stage/Text.c msgid "chars buffer too small" -msgstr "chars buffer muy pequeño" +msgstr "chars buffer es demasiado pequeño" #: py/modbuiltins.c msgid "chr() arg not in range(0x110000)" @@ -1686,7 +1643,7 @@ msgstr "El argumento de chr() no esta en el rango(256)" #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" -msgstr "El burrer de color debe ser 3 bytes (RGB) ó 4 bytes (RGB + pad byte)" +msgstr "color buffer debe ser 3 bytes (RGB) ó 4 bytes (RGB + pad byte)" #: shared-bindings/displayio/Palette.c msgid "color buffer must be a buffer or int" @@ -1751,7 +1708,7 @@ msgstr "destination_length debe ser un int >= 0" msgid "dict update sequence has wrong length" msgstr "la secuencia de actualizacion del dict tiene una longitud incorrecta" -#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c +#: py/modmath.c py/runtime.c py/objint_mpz.c py/objfloat.c py/objint_longlong.c #: shared-bindings/math/__init__.c msgid "division by zero" msgstr "división por cero" @@ -1760,7 +1717,7 @@ msgstr "división por cero" msgid "empty" msgstr "vacío" -#: extmod/moduheapq.c extmod/modutimeq.c +#: extmod/modutimeq.c extmod/moduheapq.c msgid "empty heap" msgstr "heap vacío" @@ -1777,9 +1734,8 @@ msgid "end of format while looking for conversion specifier" msgstr "el final del formato mientras se busca el especificador de conversión" #: shared-bindings/displayio/Shape.c -#, fuzzy msgid "end_x should be an int" -msgstr "y deberia ser un int" +msgstr "end_x debe ser un int" #: ports/nrf/common-hal/busio/UART.c #, c-format @@ -1792,11 +1748,11 @@ msgstr "las excepciones deben derivar de BaseException" #: py/objstr.c msgid "expected ':' after format specifier" -msgstr "se espera ':' despues de un especificaro de tipo format" +msgstr "se esperaba ':' después de un especificador de tipo format" #: py/obj.c msgid "expected tuple/list" -msgstr "tupla/lista esperada" +msgstr "se esperaba una tupla/lista" #: py/modthread.c msgid "expecting a dict for keyword args" @@ -1822,7 +1778,7 @@ msgstr "argumento(s) por palabra clave adicionales fueron dados" msgid "extra positional arguments given" msgstr "argumento posicional adicional dado" -#: shared-bindings/audioio/WaveFile.c shared-bindings/displayio/OnDiskBitmap.c +#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/audioio/WaveFile.c msgid "file must be a file opened in byte mode" msgstr "el archivo deberia ser una archivo abierto en modo byte" @@ -1840,7 +1796,7 @@ msgstr "firstbit debe ser MSB" #: py/objint.c msgid "float too big" -msgstr "float es demasiado grande" +msgstr "" #: shared-bindings/_stage/Text.c msgid "font must be 2048 bytes long" @@ -1924,7 +1880,7 @@ msgstr "formato incompleto" #: py/objstr.c msgid "incomplete format key" -msgstr "llave de formato incompleto" +msgstr "" #: extmod/modubinascii.c msgid "incorrect padding" @@ -1953,7 +1909,7 @@ msgstr "Entero requerido" #: ports/nrf/common-hal/bleio/Broadcaster.c msgid "interval not in range 0.0020 to 10.24" -msgstr "El intervalo está fuera del rango de 0.0020 a 10.24" +msgstr "interval no estan en el rango 0.0020 a 10.24" #: extmod/machine_i2c.c msgid "invalid I2C peripheral" @@ -1993,9 +1949,9 @@ msgstr "decorador de micropython inválido" #: shared-bindings/random/__init__.c msgid "invalid step" -msgstr "paso invalido" +msgstr "" -#: py/compile.c py/parse.c +#: py/parse.c py/compile.c msgid "invalid syntax" msgstr "sintaxis inválida" @@ -2098,7 +2054,7 @@ msgstr "múltiples *x en la asignación" #: py/objtype.c msgid "multiple bases have instance lay-out conflict" -msgstr "múltiples bases tienen conflicto de diseño" +msgstr "multiple bases tienen una instancia conel conflicto diseño" #: py/objtype.c msgid "multiple inheritance not supported" @@ -2121,9 +2077,8 @@ msgid "name '%q' is not defined" msgstr "name '%q' no esta definido" #: shared-bindings/bleio/Peripheral.c -#, fuzzy msgid "name must be a string" -msgstr "palabras clave deben ser strings" +msgstr "name debe de ser un string" #: py/runtime.c msgid "name not defined" @@ -2131,24 +2086,24 @@ msgstr "name no definido" #: py/compile.c msgid "name reused for argument" -msgstr "nombre reusado para argumento" +msgstr "name reusado para argumento" #: py/emitnative.c msgid "native yield" -msgstr "rendimiento nativo" +msgstr "yield nativo" #: py/runtime.c #, c-format msgid "need more than %d values to unpack" msgstr "necesita más de %d valores para descomprimir" -#: py/objint_longlong.c py/objint_mpz.c py/runtime.c +#: py/runtime.c py/objint_mpz.c py/objint_longlong.c msgid "negative power with no float support" msgstr "potencia negativa sin float support" -#: py/objint_mpz.c py/runtime.c +#: py/runtime.c py/objint_mpz.c msgid "negative shift count" -msgstr "cuenta negativa de turnos" +msgstr "cuenta de corrimientos negativo" #: py/vm.c msgid "no active exception to reraise" @@ -2190,7 +2145,7 @@ msgstr "" #: shared-bindings/bleio/UUID.c msgid "not a 128-bit UUID" -msgstr "no es un UUID de 128-bits" +msgstr "no es 128-bit UUID" #: py/objstr.c msgid "not all arguments converted during string formatting" @@ -2226,11 +2181,11 @@ msgstr "el objeto no es suscriptable" msgid "object not an iterator" msgstr "objeto no es un iterator" -#: py/objtype.c py/runtime.c +#: py/runtime.c py/objtype.c msgid "object not callable" msgstr "objeto no puede ser llamado" -#: py/sequence.c shared-bindings/displayio/Group.c +#: py/sequence.c msgid "object not in sequence" msgstr "objeto no en secuencia" @@ -2256,7 +2211,7 @@ msgstr "string de longitud impar" msgid "offset out of bounds" msgstr "address fuera de límites" -#: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c +#: py/objstr.c py/objarray.c py/objtuple.c py/objstrunicode.c #: shared-bindings/nvm/ByteArray.c msgid "only slices with step=1 (aka None) are supported" msgstr "solo se admiten segmentos con step=1 (alias None)" @@ -2301,7 +2256,7 @@ msgstr "address fuera de límites" #: shared-bindings/displayio/Bitmap.c msgid "pixel value requires too many bits" -msgstr "valor de píxel requiere demasiado bits" +msgstr "valor del pixel require demasiado bits" #: shared-bindings/displayio/TileGrid.c msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" @@ -2338,7 +2293,7 @@ msgstr "desbordamiento de cola(queue)" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "rawbuf is not the same size as buf" -msgstr "rawbuf no es el miso tamaño que buf" +msgstr "rawbuf no es el mismo tamaño que buf" #: shared-bindings/_pixelbuf/__init__.c #, fuzzy @@ -2364,7 +2319,7 @@ msgstr "retorno esperado '%q' pero se obtuvo '%q'" #: py/objstr.c msgid "rsplit(None,n)" -msgstr "" +msgstr "rsplit(None,n)" #: shared-bindings/audioio/RawSample.c msgid "" @@ -2388,7 +2343,7 @@ msgstr "script de compilación no soportado" #: shared-bindings/bleio/Peripheral.c msgid "services includes an object that is not a Service" -msgstr "services incluye un objeto que no es servicio" +msgstr "services incluye un objeto que no es Servicio" #: py/objstr.c msgid "sign not allowed in string format specifier" @@ -2406,11 +2361,11 @@ msgstr "un solo '}' encontrado en format string" msgid "sleep length must be non-negative" msgstr "la longitud de sleep no puede ser negativa" -#: py/objslice.c py/sequence.c +#: py/sequence.c py/objslice.c msgid "slice step cannot be zero" msgstr "slice step no puede ser cero" -#: py/objint.c py/sequence.c +#: py/sequence.c py/objint.c msgid "small int overflow" msgstr "pequeño int desbordamiento" @@ -2429,7 +2384,7 @@ msgstr "y deberia ser un int" #: shared-bindings/random/__init__.c msgid "step must be non-zero" -msgstr "paso debe ser numero no-cero" +msgstr "paso debe ser numero no cero" #: shared-bindings/busio/UART.c msgid "stop must be 1 or 2" @@ -2437,7 +2392,7 @@ msgstr "stop debe ser 1 ó 2" #: shared-bindings/random/__init__.c msgid "stop not reachable from start" -msgstr "" +msgstr "stop no se puede alcanzar del principio" #: py/stream.c msgid "stream operation not supported" @@ -2486,15 +2441,15 @@ msgstr "error de sintaxis en el descriptor uctypes" #: shared-bindings/touchio/TouchIn.c msgid "threshold must be in the range 0-65536" -msgstr "threshold debe estar en el rango 0 a 65536" +msgstr "limite debe ser en el rango 0-65536" #: shared-bindings/displayio/TileGrid.c msgid "tile index out of bounds" -msgstr "" +msgstr "titlo indice fuera de limite" #: shared-bindings/time/__init__.c msgid "time.struct_time() takes a 9-sequence" -msgstr "" +msgstr "time.struct_time() toma un sequencio 9" #: shared-bindings/time/__init__.c msgid "time.struct_time() takes exactly 1 argument" @@ -2502,16 +2457,16 @@ msgstr "time.struct_time() acepta exactamente 1 argumento" #: shared-bindings/busio/UART.c msgid "timeout >100 (units are now seconds, not msecs)" -msgstr "tiempo muerto >100 (unidades en segundos)" +msgstr "timepo muerto >100 (unidades en segundos)" #: shared-bindings/bleio/CharacteristicBuffer.c #, fuzzy msgid "timeout must be >= 0.0" -msgstr "tiempo muerto debe ser 8" +msgstr "tiempo muetro debe ser >= 0.o" #: shared-bindings/time/__init__.c msgid "timestamp out of range for platform time_t" -msgstr "" +msgstr "sello de tiemp to esta en rango para plataformatime_t" #: shared-module/struct/__init__.c msgid "too many arguments provided with the given format" @@ -2532,7 +2487,7 @@ msgstr "tupla/lista tiene una longitud incorrecta" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "tuple/list required on RHS" -msgstr "tuple o lista se requiere en RHS" +msgstr "tuple/lista se require en RHS" #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c msgid "tx and rx cannot both be None" @@ -2576,7 +2531,7 @@ msgstr "argumento por palabra clave inesperado '%q'" #: py/lexer.c msgid "unicode name escapes" -msgstr "" +msgstr "nombre en unicode escapa" #: py/parse.c msgid "unindent does not match any outer indentation level" @@ -2614,7 +2569,7 @@ msgstr "tipo desconocido '%q'" msgid "unmatched '{' in format" msgstr "No coinciden '{' en format" -#: py/objtype.c py/runtime.c +#: py/runtime.c py/objtype.c msgid "unreadable attribute" msgstr "atributo no legible" @@ -2649,18 +2604,13 @@ msgstr "tipo de operador no soportado" msgid "unsupported types for %q: '%s', '%s'" msgstr "tipos no soportados para %q: '%s', '%s'" -#: py/objint.c -#, c-format -msgid "value must fit in %d byte(s)" -msgstr "" - #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" -msgstr "value_count debe ser > 0" +msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "write_args must be a list, tuple, or None" -msgstr "write_args debe ser lista, tuple, o None" +msgstr "" #: py/objstr.c msgid "wrong number of arguments" @@ -2748,9 +2698,6 @@ msgstr "paso cero" #~ msgstr "" #~ "PWM de múltiples frecuencias no soportado. El PWM ya se estableció a %dhz" -#~ msgid "Must be a Group subclass." -#~ msgstr "Debe ser una subclase de Group." - #~ msgid "No PulseIn support for %q" #~ msgstr "Sin soporte PulseIn para %q" @@ -2760,13 +2707,6 @@ msgstr "paso cero" #~ msgid "Not connected." #~ msgstr "No conectado." -#~ msgid "" -#~ "Only 8 or 16 bit mono with MP_STRINGIFY(OVERSAMPLING) x oversampling is " -#~ "supported." -#~ msgstr "" -#~ "Solo 8 ó 16 bit mono con MP_STRINGIFY(OVERSAMPLING) x de sobremuestreo es " -#~ "soportado." - #~ msgid "Only Windows format, uncompressed BMP supported %d" #~ msgstr "Solo formato Windows, BMP sin comprimir soportado %d" From 32462a6e83040828d884c7726ac942ddafc968dc Mon Sep 17 00:00:00 2001 From: C47D Date: Sat, 15 Jun 2019 09:30:25 -0500 Subject: [PATCH 07/38] [locale spanish] update translation with make translate --- locale/es.po | 136 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 80 insertions(+), 56 deletions(-) diff --git a/locale/es.po b/locale/es.po index 775b6f887e..b81cd55cf6 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-15 00:49-0500\n" +"POT-Creation-Date: 2019-06-15 09:21-0500\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -55,7 +55,7 @@ msgid "%q indices must be integers, not %s" msgstr "%q indices deben ser enteros, no %s" #: shared-bindings/bleio/CharacteristicBuffer.c -#: shared-bindings/displayio/Shape.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c msgid "%q must be >= 1" msgstr "%q debe ser >= 1" @@ -140,7 +140,7 @@ msgstr "objeto '%s' no tiene atributo '%q'" msgid "'%s' object is not an iterator" msgstr "objeto '%s' no es un iterator" -#: py/runtime.c py/objtype.c +#: py/objtype.c py/runtime.c #, c-format msgid "'%s' object is not callable" msgstr "objeto '%s' no puede ser llamado" @@ -247,17 +247,15 @@ msgstr "Todos los canales de eventos estan siendo usados" #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "All sync event channels in use" -msgstr "" -"Todos los canales de eventos de sincronización (sync event channels) están " -"siendo utilizados" +msgstr "Todos los canales de eventos de sincronización (sync event channels) están siendo utilizados" #: shared-bindings/pulseio/PWMOut.c msgid "All timers for this pin are in use" msgstr "Todos los timers para este pin están siendo utilizados" +#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c #: shared-module/_pew/PewPew.c msgid "All timers in use" @@ -289,9 +287,7 @@ msgstr "Valores del array deben ser bytes individuales." #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when MicroPython VM not running.\n" -msgstr "" -"Intento de allocation de heap cuando la VM de MicroPython no estaba " -"corriendo.\n" +msgstr "Intento de allocation de heap cuando la VM de MicroPython no estaba corriendo.\n" #: main.c msgid "Auto-reload is off.\n" @@ -301,9 +297,7 @@ msgstr "Auto-recarga deshabilitada.\n" msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" -msgstr "" -"Auto-reload habilitado. Simplemente guarda los archivos via USB para " -"ejecutarlos o entra al REPL para desabilitarlos.\n" +msgstr "Auto-reload habilitado. Simplemente guarda los archivos via USB para ejecutarlos o entra al REPL para desabilitarlos.\n" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must share a clock unit" @@ -330,7 +324,7 @@ msgstr "Brillo no se puede ajustar" msgid "Buffer incorrect size. Should be %d bytes." msgstr "Tamaño de buffer incorrecto. Debe ser de %d bytes." -#: shared-bindings/busio/I2C.c shared-bindings/bitbangio/I2C.c +#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "Buffer debe ser de longitud 1 como minimo" @@ -348,6 +342,10 @@ msgstr "Byte buffer debe de ser 16 bytes" msgid "Bytes must be between 0 and 255." msgstr "Bytes debe estar entre 0 y 255." +#: py/objtype.c +msgid "Call super().__init__() before accessing native object." +msgstr "" + #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format msgid "Can not use dotstar with %s" @@ -463,11 +461,11 @@ msgstr "No se puede descodificar ble_uuid, err 0x%04x" msgid "Could not initialize UART" msgstr "No se puede inicializar la UART" -#: shared-module/audioio/WaveFile.c shared-module/audioio/Mixer.c +#: shared-module/audioio/Mixer.c shared-module/audioio/WaveFile.c msgid "Couldn't allocate first buffer" msgstr "No se pudo asignar el primer buffer" -#: shared-module/audioio/WaveFile.c shared-module/audioio/Mixer.c +#: shared-module/audioio/Mixer.c shared-module/audioio/WaveFile.c msgid "Couldn't allocate second buffer" msgstr "No se pudo asignar el segundo buffer" @@ -510,6 +508,7 @@ msgid "Drive mode not used when direction is input." msgstr "Modo Drive no se usa cuando la dirección es input." #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/ps2io/Ps2.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "EXTINT channel already in use" msgstr "El canal EXTINT ya está siendo utilizado" @@ -518,9 +517,9 @@ msgstr "El canal EXTINT ya está siendo utilizado" msgid "Error in regex" msgstr "Error en regex" -#: shared-bindings/microcontroller/Pin.c shared-bindings/pulseio/PulseOut.c +#: shared-bindings/microcontroller/Pin.c +#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c #: shared-bindings/terminalio/Terminal.c -#: shared-bindings/neopixel_write/__init__.c msgid "Expected a %q" msgstr "Se espera un %q" @@ -538,11 +537,15 @@ msgstr "Se esperaba un UUID" msgid "Expected tuple of length %d, got %d" msgstr "Se esperaba un tuple de %d, se obtuvo %d" +#: shared-bindings/ps2io/Ps2.c +msgid "Failed sending command." +msgstr "Fallo enviando comando" + #: ports/nrf/common-hal/bleio/Device.c msgid "Failed to acquire mutex" msgstr "Fallo al adquirir el mutex" -#: ports/nrf/sd_mutex.c ports/nrf/common-hal/bleio/Characteristic.c +#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c #, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "Fallo al adquirir el mutex, err: 0x%08lX" @@ -633,7 +636,7 @@ msgstr "Fallo al registrar el Vendor-Specific UUID, err 0x%04x" msgid "Failed to release mutex" msgstr "No se puede liberar el mutex, status: 0x%08lX" -#: ports/nrf/sd_mutex.c ports/nrf/common-hal/bleio/Characteristic.c +#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c #, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "No se puede liberar el mutex, err 0x%04x" @@ -703,8 +706,8 @@ msgstr "Falló el iniciar la escritura de flash, err 0x%04x" msgid "Frequency captured is above capability. Capture Paused." msgstr "Frecuencia capturada por encima de la capacidad. Captura en pausa." -#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c #: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c +#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c msgid "Function requires lock" msgstr "La función requiere lock" @@ -724,9 +727,7 @@ msgstr "operación I2C no soportada" msgid "" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "mpy-update for more info." -msgstr "" -"Archivo .mpy incompatible. Actualice todos los archivos .mpy. Consulte " -"http://adafru.it/mpy-update para más información" +msgstr "Archivo .mpy incompatible. Actualice todos los archivos .mpy. Consulte http://adafru.it/mpy-update para más información" #: shared-bindings/_pew/PewPew.c msgid "Incorrect buffer size" @@ -782,16 +783,16 @@ msgstr "Archivo inválido" msgid "Invalid format chunk size" msgstr "Formato de fragmento de formato no válido" -#: shared-bindings/busio/SPI.c shared-bindings/bitbangio/SPI.c +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "Invalid number of bits" msgstr "Numero inválido de bits" -#: shared-bindings/busio/SPI.c shared-bindings/bitbangio/SPI.c +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "Invalid phase" msgstr "Fase inválida" -#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: shared-bindings/pulseio/PWMOut.c msgid "Invalid pin" msgstr "Pin inválido" @@ -805,14 +806,14 @@ msgid "Invalid pin for right channel" msgstr "Pin inválido para canal derecho" #: ports/atmel-samd/common-hal/busio/I2C.c -#: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/busio/SPI.c +#: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c #: ports/nrf/common-hal/busio/I2C.c msgid "Invalid pins" msgstr "pines inválidos" -#: shared-bindings/busio/SPI.c shared-bindings/bitbangio/SPI.c +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "Invalid polarity" msgstr "Polaridad inválida" @@ -832,6 +833,10 @@ msgstr "Archivo wave inválido" msgid "LHS of keyword arg must be an id" msgstr "LHS del agumento por palabra clave deberia ser un identificador" +#: shared-module/displayio/Group.c +msgid "Layer already in a group." +msgstr "Layer ya pertenece a un grupo" + #: shared-module/displayio/Group.c msgid "Layer must be a Group or TileGrid subclass." msgstr "Layer debe ser una subclase de Group o TileGrid." @@ -880,16 +885,16 @@ msgstr "Error fatal de MicroPython.\n" msgid "Microphone startup delay must be in range 0.0 to 1.0" msgstr "Micrófono demora de inicio debe estar en el rango 0.0 a 1.0" -#: shared-bindings/displayio/Display.c -msgid "Must be a Group subclass." -msgstr "Debe ser una subclase de Group." +#: shared-bindings/displayio/Group.c +msgid "Must be a %q subclass." +msgstr "Debe de ser una subclase de %q" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "El chip no tiene DAC" -#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "No DMA channel found" msgstr "No se encontró el canal DMA" @@ -917,6 +922,10 @@ msgstr "Sin GCLKs libres" msgid "No hardware random available" msgstr "No hay hardware random disponible" +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +msgid "No hardware support on clk pin" +msgstr "Sin soporte de hardware en el pin clk" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "No hardware support on pin" @@ -931,20 +940,18 @@ msgid "No such file/directory" msgstr "No existe el archivo/directorio" #: shared-bindings/bleio/CharacteristicBuffer.c -#, fuzzy msgid "Not connected" -msgstr "No se puede conectar a AP" +msgstr "No conectado" -#: shared-bindings/audioio/AudioOut.c shared-bindings/audiobusio/I2SOut.c +#: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c msgid "Not playing" -msgstr "No esta jugando" +msgstr "No reproduciendo" #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." msgstr "" -"El objeto se ha desinicializado y ya no se puede utilizar. Crea un nuevo " -"objeto" +"El objeto se ha desinicializado y ya no se puede utilizar. Crea un nuevo objeto" #: ports/nrf/common-hal/busio/UART.c msgid "Odd parity is not supported" @@ -1010,6 +1017,10 @@ msgstr "Pixel beyond bounds of buffer" msgid "Plus any modules on the filesystem\n" msgstr "Incapaz de montar de nuevo el sistema de archivos" +#: shared-bindings/ps2io/Ps2.c +msgid "Pop from an empty Ps2 buffer" +msgstr "Pop de un buffer Ps2 vacio" + #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" @@ -1120,6 +1131,12 @@ msgstr "" "Si no cambió el stack, entonces reporte un issue aquí con el contenido desu " "unidad CIRCUITPY:\n" +#: supervisor/shared/safe_mode.c +msgid "" +"The `microcontroller` module was used to boot into safe mode. Press reset to " +"exit safe mode.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The microcontroller's power dipped. Please make sure your power supply " @@ -1212,8 +1229,8 @@ msgstr "UUID string no es 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID value is not str, int or byte buffer" msgstr "UUID valor no es un str, int o byte buffer" -#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Unable to allocate buffers for signed conversion" msgstr "No se pudieron asignar buffers para la conversión con signo" @@ -1293,7 +1310,6 @@ msgstr "" "Para listar los módulos incorporados por favor haga `help(\"modules\")`.\n" #: supervisor/shared/safe_mode.c -#, fuzzy msgid "" "You are running in safe mode which means something unanticipated happened.\n" msgstr "" @@ -1346,8 +1362,8 @@ msgstr "argumento es una secuencia vacía" msgid "argument has wrong type" msgstr "el argumento tiene un tipo erroneo" -#: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/gamepad/GamePad.c shared-bindings/digitalio/DigitalInOut.c +#: py/argcheck.c shared-bindings/digitalio/DigitalInOut.c +#: shared-bindings/gamepad/GamePad.c shared-bindings/_stage/__init__.c msgid "argument num/types mismatch" msgstr "argumento número/tipos no coinciden" @@ -1417,7 +1433,7 @@ msgstr "buffer debe de ser un objeto bytes-like" msgid "buffer size must match format" msgstr "los buffers deben de tener el mismo formato" -#: shared-bindings/busio/SPI.c shared-bindings/bitbangio/SPI.c +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "buffer slices must be of equal length" msgstr "Las secciones del buffer necesitan tener longitud igual" @@ -1708,7 +1724,7 @@ msgstr "destination_length debe ser un int >= 0" msgid "dict update sequence has wrong length" msgstr "la secuencia de actualizacion del dict tiene una longitud incorrecta" -#: py/modmath.c py/runtime.c py/objint_mpz.c py/objfloat.c py/objint_longlong.c +#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c msgid "division by zero" msgstr "división por cero" @@ -1717,7 +1733,7 @@ msgstr "división por cero" msgid "empty" msgstr "vacío" -#: extmod/modutimeq.c extmod/moduheapq.c +#: extmod/moduheapq.c extmod/modutimeq.c msgid "empty heap" msgstr "heap vacío" @@ -1778,7 +1794,7 @@ msgstr "argumento(s) por palabra clave adicionales fueron dados" msgid "extra positional arguments given" msgstr "argumento posicional adicional dado" -#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/audioio/WaveFile.c +#: shared-bindings/audioio/WaveFile.c shared-bindings/displayio/OnDiskBitmap.c msgid "file must be a file opened in byte mode" msgstr "el archivo deberia ser una archivo abierto en modo byte" @@ -1951,7 +1967,7 @@ msgstr "decorador de micropython inválido" msgid "invalid step" msgstr "" -#: py/parse.c py/compile.c +#: py/compile.c py/parse.c msgid "invalid syntax" msgstr "sintaxis inválida" @@ -2097,11 +2113,11 @@ msgstr "yield nativo" msgid "need more than %d values to unpack" msgstr "necesita más de %d valores para descomprimir" -#: py/runtime.c py/objint_mpz.c py/objint_longlong.c +#: py/objint_longlong.c py/objint_mpz.c py/runtime.c msgid "negative power with no float support" msgstr "potencia negativa sin float support" -#: py/runtime.c py/objint_mpz.c +#: py/objint_mpz.c py/runtime.c msgid "negative shift count" msgstr "cuenta de corrimientos negativo" @@ -2181,11 +2197,11 @@ msgstr "el objeto no es suscriptable" msgid "object not an iterator" msgstr "objeto no es un iterator" -#: py/runtime.c py/objtype.c +#: py/objtype.c py/runtime.c msgid "object not callable" msgstr "objeto no puede ser llamado" -#: py/sequence.c +#: py/sequence.c shared-bindings/displayio/Group.c msgid "object not in sequence" msgstr "objeto no en secuencia" @@ -2211,7 +2227,7 @@ msgstr "string de longitud impar" msgid "offset out of bounds" msgstr "address fuera de límites" -#: py/objstr.c py/objarray.c py/objtuple.c py/objstrunicode.c +#: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c #: shared-bindings/nvm/ByteArray.c msgid "only slices with step=1 (aka None) are supported" msgstr "solo se admiten segmentos con step=1 (alias None)" @@ -2361,11 +2377,11 @@ msgstr "un solo '}' encontrado en format string" msgid "sleep length must be non-negative" msgstr "la longitud de sleep no puede ser negativa" -#: py/sequence.c py/objslice.c +#: py/objslice.c py/sequence.c msgid "slice step cannot be zero" msgstr "slice step no puede ser cero" -#: py/sequence.c py/objint.c +#: py/objint.c py/sequence.c msgid "small int overflow" msgstr "pequeño int desbordamiento" @@ -2569,7 +2585,7 @@ msgstr "tipo desconocido '%q'" msgid "unmatched '{' in format" msgstr "No coinciden '{' en format" -#: py/runtime.c py/objtype.c +#: py/objtype.c py/runtime.c msgid "unreadable attribute" msgstr "atributo no legible" @@ -2604,6 +2620,11 @@ msgstr "tipo de operador no soportado" msgid "unsupported types for %q: '%s', '%s'" msgstr "tipos no soportados para %q: '%s', '%s'" +#: py/objint.c +#, c-format +msgid "value must fit in %d byte(s)" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "" @@ -2698,6 +2719,9 @@ msgstr "paso cero" #~ msgstr "" #~ "PWM de múltiples frecuencias no soportado. El PWM ya se estableció a %dhz" +#~ msgid "Must be a Group subclass." +#~ msgstr "Debe ser una subclase de Group." + #~ msgid "No PulseIn support for %q" #~ msgstr "Sin soporte PulseIn para %q" From ea2c068e11558544eaa5e1d096d50f4a5f92549e Mon Sep 17 00:00:00 2001 From: brentru Date: Mon, 17 Jun 2019 11:20:25 -0400 Subject: [PATCH 08/38] COLMOD is 1 param, remove CASET/RASET in CircuitPython --- ports/atmel-samd/boards/pybadge_airlift/board.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ports/atmel-samd/boards/pybadge_airlift/board.c b/ports/atmel-samd/boards/pybadge_airlift/board.c index b34ac29210..3c2be4b7bb 100644 --- a/ports/atmel-samd/boards/pybadge_airlift/board.c +++ b/ports/atmel-samd/boards/pybadge_airlift/board.c @@ -41,12 +41,10 @@ uint8_t display_init_sequence[] = { 0x01, 0 | DELAY, 150, // SWRESET 0x11, 0 | DELAY, 255, // SLPOUT 0x36, 1, 0x08, // _MADCTL bottom to top refresh in vsync aligned order. - 0x3a, 2, 0x55, 10, // COLMOD - 16bit color - 0x2a, 3, 0x00, 240 >> 8, 240 & 0xFF, // _CASET XSTART = 0, XEND = 240 - 0x2b, 3, 0x00, 320 >> 8, 320 & 0xFF, // _RASET YSTART = 0, YEND = 320 - 0x21, 0 | DELAY, 10, // _INVON - 0x13, 0 | DELAY, 10, // _NORON - 0x29, 0 | DELAY, 255, // _DISPON + 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) { From da3d75f7b108279a05b99d18eca677f23fccac44 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sun, 16 Jun 2019 14:43:13 -0700 Subject: [PATCH 09/38] Fix TileGrid's dirty tracking when changing top left --- shared-module/displayio/TileGrid.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/shared-module/displayio/TileGrid.c b/shared-module/displayio/TileGrid.c index 97b704c40e..c671f13d18 100644 --- a/shared-module/displayio/TileGrid.c +++ b/shared-module/displayio/TileGrid.c @@ -219,10 +219,19 @@ void common_hal_displayio_tilegrid_set_tile(displayio_tilegrid_t *self, uint16_t } else { tile_area = &temp_area; } - tile_area->x1 = x * self->tile_width; + int16_t tx = (x - self->top_left_x) % self->width_in_tiles; + if (tx < 0) { + tx += self->height_in_tiles; + } + tile_area->x1 = tx * self->tile_width; tile_area->x2 = tile_area->x1 + self->tile_width; - tile_area->y1 = y * self->tile_height; + int16_t ty = (y - self->top_left_y) % self->height_in_tiles; + if (ty < 0) { + ty += self->height_in_tiles; + } + tile_area->y1 = ty * self->tile_height; tile_area->y2 = tile_area->y1 + self->tile_height; + if (self->partial_change) { displayio_area_expand(&self->dirty_area, &temp_area); } From 7490adf8e945b7c040ea5a22293675b8b29da8da Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 17 Jun 2019 16:09:02 -0700 Subject: [PATCH 10/38] Use width for x. Thanks @deshipu --- shared-module/displayio/TileGrid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/displayio/TileGrid.c b/shared-module/displayio/TileGrid.c index c671f13d18..cdca45a29e 100644 --- a/shared-module/displayio/TileGrid.c +++ b/shared-module/displayio/TileGrid.c @@ -221,7 +221,7 @@ void common_hal_displayio_tilegrid_set_tile(displayio_tilegrid_t *self, uint16_t } int16_t tx = (x - self->top_left_x) % self->width_in_tiles; if (tx < 0) { - tx += self->height_in_tiles; + tx += self->width_in_tiles; } tile_area->x1 = tx * self->tile_width; tile_area->x2 = tile_area->x1 + self->tile_width; From 4013bcde9eeab3dd2f8fd15a156c32f866a637b9 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 17 Jun 2019 17:48:05 -0700 Subject: [PATCH 11/38] Add baudrate to FourWire and shorten delay. --- shared-bindings/displayio/FourWire.c | 8 +++++--- shared-bindings/displayio/FourWire.h | 2 +- shared-module/displayio/FourWire.c | 7 ++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c index 8ffe54be09..af64a20286 100644 --- a/shared-bindings/displayio/FourWire.c +++ b/shared-bindings/displayio/FourWire.c @@ -46,7 +46,7 @@ //| Manage updating a display over SPI four wire protocol in the background while Python code runs. //| It doesn't handle display initialization. //| -//| .. class:: FourWire(spi_bus, *, command, chip_select, reset=None) +//| .. class:: FourWire(spi_bus, *, command, chip_select, reset=None, baudrate=24000000) //| //| Create a FourWire object associated with the given pins. //| @@ -59,14 +59,16 @@ //| :param microcontroller.Pin command: Data or command pin //| :param microcontroller.Pin chip_select: Chip select pin //| :param microcontroller.Pin reset: Reset pin. When None only software reset can be used +//| :param int baudrate: Maximum baudrate in Hz for the display on the bus //| STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_spi_bus, ARG_command, ARG_chip_select, ARG_reset }; + enum { ARG_spi_bus, ARG_command, ARG_chip_select, ARG_reset, ARG_baudrate }; static const mp_arg_t allowed_args[] = { { MP_QSTR_spi_bus, MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_command, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_chip_select, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_reset, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_baudrate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 24000000} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -97,7 +99,7 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_ } common_hal_displayio_fourwire_construct(self, - MP_OBJ_TO_PTR(spi), command, chip_select, reset); + MP_OBJ_TO_PTR(spi), command, chip_select, reset, args[ARG_baudrate].u_int); return self; } diff --git a/shared-bindings/displayio/FourWire.h b/shared-bindings/displayio/FourWire.h index b65b1b5b79..5dbd607649 100644 --- a/shared-bindings/displayio/FourWire.h +++ b/shared-bindings/displayio/FourWire.h @@ -36,7 +36,7 @@ extern const mp_obj_type_t displayio_fourwire_type; void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, busio_spi_obj_t* spi, const mcu_pin_obj_t* command, - const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset); + const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, uint32_t baudrate); void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self); diff --git a/shared-module/displayio/FourWire.c b/shared-module/displayio/FourWire.c index b01456bba2..d38da56fc0 100644 --- a/shared-module/displayio/FourWire.c +++ b/shared-module/displayio/FourWire.c @@ -31,13 +31,14 @@ #include "py/gc.h" #include "shared-bindings/busio/SPI.h" #include "shared-bindings/digitalio/DigitalInOut.h" +#include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/time/__init__.h" #include "tick.h" void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, busio_spi_obj_t* spi, const mcu_pin_obj_t* command, - const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset) { + const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, uint32_t baudrate) { self->bus = spi; common_hal_busio_spi_never_reset(self->bus); @@ -45,7 +46,7 @@ void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, // of the heap as well. gc_never_free(self->bus); - self->frequency = common_hal_busio_spi_get_frequency(spi); + self->frequency = baudrate; self->polarity = common_hal_busio_spi_get_polarity(spi); self->phase = common_hal_busio_spi_get_phase(spi); @@ -89,7 +90,7 @@ void common_hal_displayio_fourwire_send(mp_obj_t obj, bool command, uint8_t *dat displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); if (command) { common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); - common_hal_time_delay_ms(1); + common_hal_mcu_delay_us(1); common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); } common_hal_digitalio_digitalinout_set_value(&self->command, !command); From 2dddccb99e874b1e6b246aaec8b7661b47a42278 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 17 Jun 2019 18:03:30 -0700 Subject: [PATCH 12/38] Update board inits for new api. --- ports/atmel-samd/boards/hallowing_m0_express/board.c | 4 ++-- ports/atmel-samd/boards/pybadge/board.c | 4 ++-- ports/atmel-samd/boards/pybadge_airlift/board.c | 4 ++-- ports/atmel-samd/boards/pygamer/board.c | 4 ++-- ports/atmel-samd/boards/ugame10/board.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ports/atmel-samd/boards/hallowing_m0_express/board.c b/ports/atmel-samd/boards/hallowing_m0_express/board.c index 6e0328e952..a0e160757d 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/board.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/board.c @@ -74,12 +74,12 @@ void board_init(void) { displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; busio_spi_obj_t *spi = common_hal_board_create_spi(); - common_hal_busio_spi_configure(spi, 12000000, 0, 0, 8); common_hal_displayio_fourwire_construct(bus, spi, &pin_PA28, // Command or data &pin_PA01, // Chip select - &pin_PA27); // Reset + &pin_PA27, // Reset + 12000000); displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; diff --git a/ports/atmel-samd/boards/pybadge/board.c b/ports/atmel-samd/boards/pybadge/board.c index 64fb8e8526..38902315aa 100644 --- a/ports/atmel-samd/boards/pybadge/board.c +++ b/ports/atmel-samd/boards/pybadge/board.c @@ -73,7 +73,6 @@ void board_init(void) { busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL); common_hal_busio_spi_never_reset(spi); - common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8); displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; @@ -81,7 +80,8 @@ void board_init(void) { spi, &pin_PB05, // TFT_DC Command or data &pin_PB07, // TFT_CS Chip select - &pin_PA00); // TFT_RST Reset + &pin_PA00, // TFT_RST Reset + 60000000); displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; diff --git a/ports/atmel-samd/boards/pybadge_airlift/board.c b/ports/atmel-samd/boards/pybadge_airlift/board.c index 3c2be4b7bb..a1f778df1c 100644 --- a/ports/atmel-samd/boards/pybadge_airlift/board.c +++ b/ports/atmel-samd/boards/pybadge_airlift/board.c @@ -51,7 +51,6 @@ void board_init(void) { busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL); common_hal_busio_spi_never_reset(spi); - common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8); displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; @@ -59,7 +58,8 @@ void board_init(void) { spi, &pin_PB05, // TFT_DC Command or data &pin_PB06, // TFT_CS Chip select - &pin_PB07); // TFT_RST Reset + &pin_PB07, // TFT_RST Reset + 60000000); displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; diff --git a/ports/atmel-samd/boards/pygamer/board.c b/ports/atmel-samd/boards/pygamer/board.c index c8a7b9c236..7b54b6fb53 100644 --- a/ports/atmel-samd/boards/pygamer/board.c +++ b/ports/atmel-samd/boards/pygamer/board.c @@ -73,7 +73,6 @@ void board_init(void) { busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL); common_hal_busio_spi_never_reset(spi); - common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8); displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; @@ -81,7 +80,8 @@ void board_init(void) { spi, &pin_PB05, // TFT_DC Command or data &pin_PB12, // TFT_CS Chip select - &pin_PA00); // TFT_RST Reset + &pin_PA00, // TFT_RST Reset + 60000000); displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; diff --git a/ports/atmel-samd/boards/ugame10/board.c b/ports/atmel-samd/boards/ugame10/board.c index 38f63570a2..828f0c87d2 100644 --- a/ports/atmel-samd/boards/ugame10/board.c +++ b/ports/atmel-samd/boards/ugame10/board.c @@ -74,12 +74,12 @@ void board_init(void) { displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; busio_spi_obj_t *spi = common_hal_board_create_spi(); - common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8); common_hal_displayio_fourwire_construct(bus, spi, &pin_PA09, // Command or data &pin_PA08, // Chip select - NULL); // Reset + NULL, // Reset + 24000000); displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; From b11cbbaa550f7429a7164ea62866d1f916a6d58b Mon Sep 17 00:00:00 2001 From: C47D Date: Mon, 17 Jun 2019 21:01:22 -0500 Subject: [PATCH 13/38] [locale es.po] Fix errors --- locale/es.po | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/locale/es.po b/locale/es.po index b81cd55cf6..544e81f8f7 100644 --- a/locale/es.po +++ b/locale/es.po @@ -231,11 +231,11 @@ msgstr "La dirección debe ser %d bytes de largo" #: ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" -msgstr "Todos los I2C peripherals están siendo usados" +msgstr "Todos los periféricos I2C están siendo usados" #: ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" -msgstr "Todos los SPI peripherals están siendo usados" +msgstr "Todos los periféricos SPI están siendo usados" #: ports/nrf/common-hal/busio/UART.c msgid "All UART peripherals are in use" @@ -313,11 +313,11 @@ msgstr "Ambos pines deben soportar interrupciones por hardware" #: shared-bindings/supervisor/__init__.c msgid "Brightness must be between 0 and 255" -msgstr "Brightness debe estar entro 0 y 255" +msgstr "El brillo debe estar entro 0 y 255" #: shared-bindings/displayio/Display.c msgid "Brightness not adjustable" -msgstr "Brillo no se puede ajustar" +msgstr "El brillo no se puede ajustar" #: shared-module/usb_hid/Device.c #, c-format @@ -357,7 +357,7 @@ msgstr "No se pueden agregar servicio en modo Central" #: shared-bindings/bleio/Device.c msgid "Can't advertise in Central mode" -msgstr "No se puede anunciarse en Central mode" +msgstr "No puede anunciarse en Central mode" #: shared-bindings/bleio/Device.c msgid "Can't change the name in Central mode" @@ -757,7 +757,7 @@ msgstr "Argumento inválido" #: shared-module/displayio/Bitmap.c msgid "Invalid bits per value" -msgstr "Inválido bits per valor" +msgstr "Inválido bits por valor" #: ports/nrf/common-hal/busio/UART.c msgid "Invalid buffer size" @@ -985,7 +985,7 @@ msgstr "solo se admiten segmentos con step=1 (alias None)" #: shared-bindings/audiobusio/PDMIn.c msgid "Oversample must be multiple of 8." -msgstr "La sobreexplotación debe ser un múltiplo de 8" +msgstr "El sobremuestreo debe ser un múltiplo de 8" #: shared-bindings/pulseio/PWMOut.c msgid "" @@ -1092,7 +1092,7 @@ msgstr "Serializer está siendo utilizado" #: shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." -msgstr "Rebanada y valor son diferentes longitudes" +msgstr "Slice y value tienen diferentes longitudes" #: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c #: shared-bindings/displayio/TileGrid.c shared-bindings/pulseio/PulseIn.c @@ -1102,7 +1102,7 @@ msgstr "Rebanadas no soportadas" #: ports/nrf/common-hal/bleio/Adapter.c #, c-format msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX" -msgstr "Asunto de dispositivo suave, id: 0x%08lX, pc: 0x%08lX" +msgstr "Soft device assert, id: 0x%08lX, pc: 0x%08lX" #: extmod/modure.c msgid "Splitting with sub-captures" @@ -1183,7 +1183,7 @@ msgstr "Los índices de Tile deben ser 0 - 255" #: shared-bindings/displayio/TileGrid.c msgid "Tile width must exactly divide bitmap width" -msgstr "Ancho del azulejo debe dividir exactamente ancho de mapa de bits" +msgstr "Ancho del Tile debe dividir exactamente el ancho de mapa de bits" #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " @@ -1195,7 +1195,7 @@ msgstr "Demasiados canales en sample." #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c msgid "Too many display busses" -msgstr "Demasiados autobuses de pantalla" +msgstr "Demasiados buses de pantalla" #: shared-bindings/displayio/Display.c msgid "Too many displays" @@ -1381,7 +1381,7 @@ msgstr "atributos aún no soportados" #: ports/nrf/common-hal/bleio/Characteristic.c msgid "bad GATT role" -msgstr "mal GATT papel" +msgstr "mal GATT role" #: py/builtinevex.c msgid "bad compile mode" @@ -1429,9 +1429,8 @@ msgid "buffer must be a bytes-like object" msgstr "buffer debe de ser un objeto bytes-like" #: shared-module/struct/__init__.c -#, fuzzy msgid "buffer size must match format" -msgstr "los buffers deben de tener el mismo formato" +msgstr "el tamaño del buffer debe de coincidir con el formato" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "buffer slices must be of equal length" @@ -1448,7 +1447,7 @@ msgstr "los buffers deben de tener la misma longitud" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" -msgstr "los bottones nececitan ser digitalio.DigitalInOut" +msgstr "los botones necesitan ser digitalio.DigitalInOut" #: py/vm.c msgid "byte code not implemented" @@ -2266,9 +2265,8 @@ msgid "parameters must be registers in sequence r0 to r3" msgstr "los parametros deben ser registros en secuencia del r0 al r3" #: shared-bindings/displayio/Bitmap.c -#, fuzzy msgid "pixel coordinates out of bounds" -msgstr "address fuera de límites" +msgstr "coordenadas del pixel fuera de límites" #: shared-bindings/displayio/Bitmap.c msgid "pixel value requires too many bits" @@ -2461,7 +2459,7 @@ msgstr "limite debe ser en el rango 0-65536" #: shared-bindings/displayio/TileGrid.c msgid "tile index out of bounds" -msgstr "titlo indice fuera de limite" +msgstr "el indice del tile fuera de limite" #: shared-bindings/time/__init__.c msgid "time.struct_time() takes a 9-sequence" @@ -2476,13 +2474,12 @@ msgid "timeout >100 (units are now seconds, not msecs)" msgstr "timepo muerto >100 (unidades en segundos)" #: shared-bindings/bleio/CharacteristicBuffer.c -#, fuzzy msgid "timeout must be >= 0.0" -msgstr "tiempo muetro debe ser >= 0.o" +msgstr "tiempo muerto debe ser >= 0.0" #: shared-bindings/time/__init__.c msgid "timestamp out of range for platform time_t" -msgstr "sello de tiemp to esta en rango para plataformatime_t" +msgstr "timestamp fuera de rango para plataform time_t" #: shared-module/struct/__init__.c msgid "too many arguments provided with the given format" From 5803245009f506b83e819b5bb129c430e982ee8d Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Tue, 18 Jun 2019 19:05:51 +0200 Subject: [PATCH 14/38] Add support for PyGamer to Stage library --- frozen/circuitpython-stage | 2 +- ports/atmel-samd/boards/pygamer/mpconfigboard.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frozen/circuitpython-stage b/frozen/circuitpython-stage index 397badae58..0dce331e84 160000 --- a/frozen/circuitpython-stage +++ b/frozen/circuitpython-stage @@ -1 +1 @@ -Subproject commit 397badae5863a1ce932213ef527e82314ac498a1 +Subproject commit 0dce331e849a9459dbd1f99b254f6739e35a4ca1 diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk index a1ff907475..69fb14358e 100644 --- a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk @@ -20,4 +20,4 @@ CIRCUITPY_STAGE = 1 # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 -FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pybadge +FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pygamer From 352bf7eaf5649166b62c1e774136799db5d45c83 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sun, 16 Jun 2019 14:41:33 -0700 Subject: [PATCH 15/38] Add PyGamer Advance and fix Joystick pins --- .travis.yml | 2 +- ports/atmel-samd/boards/pygamer/pins.c | 4 +- .../atmel-samd/boards/pygamer_advance/board.c | 92 +++++++++++++++++++ .../boards/pygamer_advance/mpconfigboard.h | 36 ++++++++ .../boards/pygamer_advance/mpconfigboard.mk | 23 +++++ .../atmel-samd/boards/pygamer_advance/pins.c | 75 +++++++++++++++ 6 files changed, 229 insertions(+), 3 deletions(-) create mode 100644 ports/atmel-samd/boards/pygamer_advance/board.c create mode 100644 ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/pygamer_advance/pins.c diff --git a/.travis.yml b/.travis.yml index 5699358bd0..8db5d58031 100755 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ git: env: - TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="circuitplayground_express mini_sam_m4 grandcentral_m4_express capablerobot_usbhub pygamer pca10056 pca10059 feather_nrf52840_express makerdiary_nrf52840_mdk makerdiary_nrf52840_mdk_usb_dongle particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini electronut_labs_papyr electronut_labs_blip" TRAVIS_SDK=arm:nrf - TRAVIS_BOARDS="metro_m0_express metro_m4_express metro_m4_airlift_lite pirkey_m0 trellis_m4_express trinket_m0 sparkfun_lumidrive sparkfun_redboard_turbo bast_pro_mini_m0" TRAVIS_SDK=arm - - TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip escornabot_makech" TRAVIS_SDK=arm + - TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip escornabot_makech pygamer_advance" TRAVIS_SDK=arm - TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300 arduino_mkrzero pewpew10 kicksat-sprite ugame10 robohatmm1" TRAVIS_SDK=arm - TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal sparkfun_samd21_mini sparkfun_samd21_dev pybadge pybadge_airlift" TRAVIS_SDK=arm diff --git a/ports/atmel-samd/boards/pygamer/pins.c b/ports/atmel-samd/boards/pygamer/pins.c index 9d0d196e73..7e6eff43f9 100644 --- a/ports/atmel-samd/boards/pygamer/pins.c +++ b/ports/atmel-samd/boards/pygamer/pins.c @@ -63,8 +63,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RST), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_PB05) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_X), MP_ROM_PTR(&pin_PB06) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_Y), MP_ROM_PTR(&pin_PB07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_X), MP_ROM_PTR(&pin_PB07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_Y), MP_ROM_PTR(&pin_PB06) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, diff --git a/ports/atmel-samd/boards/pygamer_advance/board.c b/ports/atmel-samd/boards/pygamer_advance/board.c new file mode 100644 index 0000000000..d1c5edc999 --- /dev/null +++ b/ports/atmel-samd/boards/pygamer_advance/board.c @@ -0,0 +1,92 @@ +/* + * 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. + */ + +#include "boards/board.h" +#include "mpconfigboard.h" +#include "hal/include/hal_gpio.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" +#include "tick.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, 0x00, // _MADCTL bottom to top refresh in vsync aligned order. + 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) { + busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; + common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB12, 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_PA00, // TFT_DC Command or data + &pin_PB15, // TFT_CS Chip select + &pin_PB05, // TFT_RST Reset + 60000000); + + displayio_display_obj_t* display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, + 320, // Width (after rotation) + 240, // Height (after rotation) + 0, // column start + 0, // row start + 90, // rotation + 16, // Color depth + 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_PA01, // backlight pin + 1.0f, // brightness (ignored) + true, // auto_brightness + false, // single_byte_bounds + false); // data_as_commands +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h new file mode 100644 index 0000000000..c05aa4f062 --- /dev/null +++ b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h @@ -0,0 +1,36 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit PyGamer" +#define MICROPY_HW_MCU_NAME "samd51j20" + +#define CIRCUITPY_MCU_FAMILY samd51 + +#define MICROPY_HW_LED_STATUS (&pin_PA23) + +// These are pins not to reset. +// QSPI Data pins +#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11) +// DotStar pins, QSPI CS, and QSPI SCK +#define MICROPY_PORT_B (PORT_PB10 | PORT_PB11) +#define MICROPY_PORT_C (0) +#define MICROPY_PORT_D (0) + +#define AUTORESET_DELAY_MS 500 + +// If you change this, then make sure to update the linker scripts as well to +// make sure you don't overwrite code +#define CIRCUITPY_INTERNAL_NVM_SIZE 8192 + +#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) + +#define DEFAULT_I2C_BUS_SCL (&pin_PA13) +#define DEFAULT_I2C_BUS_SDA (&pin_PA12) + +#define DEFAULT_SPI_BUS_SCK (&pin_PA17) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB23) +#define DEFAULT_SPI_BUS_MISO (&pin_PB22) + +#define DEFAULT_UART_BUS_RX (&pin_PB17) +#define DEFAULT_UART_BUS_TX (&pin_PB16) + +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 diff --git a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk new file mode 100644 index 0000000000..1bb2c553d6 --- /dev/null +++ b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk @@ -0,0 +1,23 @@ +LD_FILE = boards/samd51x19-bootloader-external-flash.ld +USB_VID = 0x239A +USB_PID = 0x803E +USB_PRODUCT = "PyGamer Advance" +USB_MANUFACTURER = "Adafruit Industries LLC" + +CHIP_VARIANT = SAMD51J20A +CHIP_FAMILY = samd51 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = GD25Q64C +LONGINT_IMPL = MPZ + +CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_GAMEPAD = 1 +CIRCUITPY_GAMEPADSHIFT = 1 +CIRCUITPY_STAGE = 1 +# No touch on SAMD51 yet +CIRCUITPY_TOUCHIO = 0 + +FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pybadge diff --git a/ports/atmel-samd/boards/pygamer_advance/pins.c b/ports/atmel-samd/boards/pygamer_advance/pins.c new file mode 100644 index 0000000000..9c2284db1a --- /dev/null +++ b/ports/atmel-samd/boards/pygamer_advance/pins.c @@ -0,0 +1,75 @@ +#include "shared-bindings/board/__init__.h" + +#include "boards/board.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB08) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB09) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PB01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB02) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23) }, + + // UART + { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB16) }, + + // I2C + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA13) }, + + // SPI + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) }, + + // SDCS, dup of D4 + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PA14) }, + + // Special named pins + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_PB04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), MP_ROM_PTR(&pin_PB14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER_ENABLE), MP_ROM_PTR(&pin_PA27) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_LATCH), MP_ROM_PTR(&pin_PB00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_OUT), MP_ROM_PTR(&pin_PB30) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_CLOCK), MP_ROM_PTR(&pin_PB31) }, + + // TFT control pins + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_LITE), MP_ROM_PTR(&pin_PA01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_PB12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_PB13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RST), MP_ROM_PTR(&pin_PB05) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_PB15) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_PA00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_X), MP_ROM_PTR(&pin_PB07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_Y), MP_ROM_PTR(&pin_PB06) }, + + { 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_DISPLAY), MP_ROM_PTR(&displays[0].display)} +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From d852d0f04328fb348eb74a64d8fd2f7389b8f828 Mon Sep 17 00:00:00 2001 From: Craig Forbes Date: Fri, 14 Jun 2019 15:29:47 -0500 Subject: [PATCH 16/38] Explicitly set the locale when sorting translation files. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8a4cf609f6..b9c489fd40 100644 --- a/Makefile +++ b/Makefile @@ -204,7 +204,7 @@ pseudoxml: all-source: locale/circuitpython.pot: all-source - find $(TRANSLATE_SOURCES) -iname "*.c" -print0 | sort -z | xargs -0 xgettext -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale + find $(TRANSLATE_SOURCES) -iname "*.c" -print0 | (LC_ALL=C sort -z) | xargs -0 xgettext -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale translate: locale/circuitpython.pot for po in $(shell ls locale/*.po); do msgmerge -U $$po -s --no-fuzzy-matching --add-location=file locale/circuitpython.pot; done From db74b92e77757caab7c5f2bb1d6ae09f5be3ed97 Mon Sep 17 00:00:00 2001 From: Craig Forbes Date: Fri, 14 Jun 2019 15:30:38 -0500 Subject: [PATCH 17/38] Fix displayio.Display docstring type for display_bus. Add docs for group parameter for Display.show. --- shared-bindings/displayio/Display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 84302a1752..1a36872a6e 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -78,7 +78,8 @@ //| The initialization sequence should always leave the display memory access inline with the scan //| of the display to minimize tearing artifacts. //| -//| :param displayio.FourWire or displayio.ParallelBus display_bus: The bus that the display is connected to +//| :param display_bus: The bus that the display is connected to +//| :type display_bus: displayio.FourWire or displayio.ParallelBus //| :param buffer init_sequence: Byte-packed initialization sequence. //| :param int width: Width in pixels //| :param int height: Height in pixels @@ -182,6 +183,7 @@ static displayio_display_obj_t* native_display(mp_obj_t display_obj) { //| Switches to displaying the given group of layers. When group is None, the default //| CircuitPython terminal will be shown. //| +//| :param Group group: The group to show. STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in) { displayio_display_obj_t *self = native_display(self_in); displayio_group_t* group = NULL; From 0bb92d4fc33a1cf28418dadca87dce4b4d9758e2 Mon Sep 17 00:00:00 2001 From: Craig Forbes Date: Mon, 17 Jun 2019 10:01:23 -0500 Subject: [PATCH 18/38] Fix references to cpython in builtins documentation. --- docs/library/builtins.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/library/builtins.rst b/docs/library/builtins.rst index 0061a8cea0..6cbf95d53c 100644 --- a/docs/library/builtins.rst +++ b/docs/library/builtins.rst @@ -182,7 +182,7 @@ Exceptions .. exception:: OSError - |see_cpython| `OSError`. CircuitPython doesn't implement the ``errno`` + |see_cpython| :py:class:`cpython:OSError`. CircuitPython doesn't implement the ``errno`` attribute, instead use the standard way to access exception arguments: ``exc.args[0]``. @@ -198,11 +198,11 @@ Exceptions .. exception:: SystemExit - |see_cpython| :py:class:`python:SystemExit`. + |see_cpython| :py:class:`cpython:SystemExit`. .. exception:: TypeError - |see_cpython| :py:class:`python:TypeError`. + |see_cpython| :py:class:`cpython:TypeError`. .. exception:: ValueError From e442efbdecf35066412efc155e20ee280c5449f3 Mon Sep 17 00:00:00 2001 From: Craig Forbes Date: Mon, 17 Jun 2019 11:58:05 -0500 Subject: [PATCH 19/38] Fix docs in digitalio. --- shared-bindings/digitalio/DigitalInOut.c | 4 ++-- shared-bindings/digitalio/Direction.c | 2 +- shared-bindings/digitalio/DriveMode.c | 2 +- shared-bindings/digitalio/Pull.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shared-bindings/digitalio/DigitalInOut.c b/shared-bindings/digitalio/DigitalInOut.c index 6587ee7ea1..16472c12c1 100644 --- a/shared-bindings/digitalio/DigitalInOut.c +++ b/shared-bindings/digitalio/DigitalInOut.c @@ -49,8 +49,8 @@ //| ========================================================= //| //| A DigitalInOut is used to digitally control I/O pins. For analog control of -//| a pin, see the :py:class:`~digitalio.AnalogIn` and -//| :py:class:`~digitalio.AnalogOut` classes. +//| a pin, see the :py:class:`analogio.AnalogIn` and +//| :py:class:`analogio.AnalogOut` classes. //| //| .. class:: DigitalInOut(pin) diff --git a/shared-bindings/digitalio/Direction.c b/shared-bindings/digitalio/Direction.c index a3433d4b07..c8188fc899 100644 --- a/shared-bindings/digitalio/Direction.c +++ b/shared-bindings/digitalio/Direction.c @@ -43,7 +43,7 @@ //| :class:`Direction` -- defines the direction of a digital pin //| ============================================================= //| -//| .. class:: digitalio.DigitalInOut.Direction +//| .. class:: Direction //| //| Enum-like class to define which direction the digital values are //| going. diff --git a/shared-bindings/digitalio/DriveMode.c b/shared-bindings/digitalio/DriveMode.c index 477cd904c4..51e1e2ee50 100644 --- a/shared-bindings/digitalio/DriveMode.c +++ b/shared-bindings/digitalio/DriveMode.c @@ -31,7 +31,7 @@ //| :class:`DriveMode` -- defines the drive mode of a digital pin //| ============================================================= //| -//| .. class:: digitalio.DriveMode +//| .. class:: DriveMode //| //| Enum-like class to define the drive mode used when outputting //| digital values. diff --git a/shared-bindings/digitalio/Pull.c b/shared-bindings/digitalio/Pull.c index 8d03f6c051..813268db78 100644 --- a/shared-bindings/digitalio/Pull.c +++ b/shared-bindings/digitalio/Pull.c @@ -31,7 +31,7 @@ //| :class:`Pull` -- defines the pull of a digital input pin //| ============================================================= //| -//| .. class:: digitalio.Pull +//| .. class:: Pull //| //| Enum-like class to define the pull value, if any, used while reading //| digital values in. From 09e7f4db00c13dd7fcea0fac3ced5ce9749ba331 Mon Sep 17 00:00:00 2001 From: Craig Forbes Date: Tue, 18 Jun 2019 18:44:50 -0500 Subject: [PATCH 20/38] Fix reference to Bitmap in fontio.Glyph docs. --- shared-bindings/fontio/Glyph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/fontio/Glyph.c b/shared-bindings/fontio/Glyph.c index 80298fd16f..a232841521 100644 --- a/shared-bindings/fontio/Glyph.c +++ b/shared-bindings/fontio/Glyph.c @@ -37,7 +37,7 @@ //| //| Named tuple used to capture a single glyph and its attributes. //| -//| :param fontio.Bitmap bitmap: the bitmap including the glyph +//| :param displayio.Bitmap bitmap: the bitmap including the glyph //| :param int tile_index: the tile index within the bitmap //| :param int width: the width of the glyph's bitmap //| :param int height: the height of the glyph's bitmap From a7bed2a74e8797928f81a05f9503df5c85e16c6c Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 19 Jun 2019 12:23:15 -0700 Subject: [PATCH 21/38] Update frozen libraries --- frozen/Adafruit_CircuitPython_CircuitPlayground | 2 +- frozen/Adafruit_CircuitPython_Crickit | 2 +- frozen/Adafruit_CircuitPython_HID | 2 +- frozen/Adafruit_CircuitPython_IRRemote | 2 +- frozen/Adafruit_CircuitPython_LIS3DH | 2 +- frozen/Adafruit_CircuitPython_Motor | 2 +- frozen/Adafruit_CircuitPython_NeoPixel | 2 +- frozen/Adafruit_CircuitPython_seesaw | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frozen/Adafruit_CircuitPython_CircuitPlayground b/frozen/Adafruit_CircuitPython_CircuitPlayground index 1d38fd81ed..154b74de02 160000 --- a/frozen/Adafruit_CircuitPython_CircuitPlayground +++ b/frozen/Adafruit_CircuitPython_CircuitPlayground @@ -1 +1 @@ -Subproject commit 1d38fd81edd30f1bd70c0cfe77819ab610ea89a3 +Subproject commit 154b74de020764597ba49f0d1e8cc18d55b3643b diff --git a/frozen/Adafruit_CircuitPython_Crickit b/frozen/Adafruit_CircuitPython_Crickit index a168680356..617bb0787f 160000 --- a/frozen/Adafruit_CircuitPython_Crickit +++ b/frozen/Adafruit_CircuitPython_Crickit @@ -1 +1 @@ -Subproject commit a1686803566793ec2de7e043bf6822e47cfa31d1 +Subproject commit 617bb0787f2c61283d248632a62b27be80f64b29 diff --git a/frozen/Adafruit_CircuitPython_HID b/frozen/Adafruit_CircuitPython_HID index 836bb9843f..c9e07857dc 160000 --- a/frozen/Adafruit_CircuitPython_HID +++ b/frozen/Adafruit_CircuitPython_HID @@ -1 +1 @@ -Subproject commit 836bb9843fd793683061c15150944f8897d806e9 +Subproject commit c9e07857dc10ff5e6c743e5e8c00e9b049800d09 diff --git a/frozen/Adafruit_CircuitPython_IRRemote b/frozen/Adafruit_CircuitPython_IRRemote index aa4428f304..70865ac6e0 160000 --- a/frozen/Adafruit_CircuitPython_IRRemote +++ b/frozen/Adafruit_CircuitPython_IRRemote @@ -1 +1 @@ -Subproject commit aa4428f304b982aa19a5800822e78c47dc8a3b6c +Subproject commit 70865ac6e09f821b26ec727e2df300a6d9ebf6b3 diff --git a/frozen/Adafruit_CircuitPython_LIS3DH b/frozen/Adafruit_CircuitPython_LIS3DH index a03f901127..f5892e24f7 160000 --- a/frozen/Adafruit_CircuitPython_LIS3DH +++ b/frozen/Adafruit_CircuitPython_LIS3DH @@ -1 +1 @@ -Subproject commit a03f9011279f9e630549432589463912831fcee1 +Subproject commit f5892e24f7235c4bde2908cbb3cd0a3d6b34d421 diff --git a/frozen/Adafruit_CircuitPython_Motor b/frozen/Adafruit_CircuitPython_Motor index 98563ab658..ddc7484498 160000 --- a/frozen/Adafruit_CircuitPython_Motor +++ b/frozen/Adafruit_CircuitPython_Motor @@ -1 +1 @@ -Subproject commit 98563ab65800aac6464f671c0d005df56ecaa6c6 +Subproject commit ddc74844983b35b027bd45091c7b8bb3c8d7a2d1 diff --git a/frozen/Adafruit_CircuitPython_NeoPixel b/frozen/Adafruit_CircuitPython_NeoPixel index c0ed34813a..c0bdd8b103 160000 --- a/frozen/Adafruit_CircuitPython_NeoPixel +++ b/frozen/Adafruit_CircuitPython_NeoPixel @@ -1 +1 @@ -Subproject commit c0ed34813a608b64ed044826553918ddbad12f0c +Subproject commit c0bdd8b10383725ee9293f5d88fb8d47eb1272bd diff --git a/frozen/Adafruit_CircuitPython_seesaw b/frozen/Adafruit_CircuitPython_seesaw index 1d12cfc0b7..4b101f0032 160000 --- a/frozen/Adafruit_CircuitPython_seesaw +++ b/frozen/Adafruit_CircuitPython_seesaw @@ -1 +1 @@ -Subproject commit 1d12cfc0b729b4ae0a2f3f4e7c1933a0fbd3b166 +Subproject commit 4b101f00320d36b23f8cc28cf3f12127085894c1 From 14d0606fa05537fd089e6e293d8d5d8de4e74215 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 19 Jun 2019 12:44:10 -0700 Subject: [PATCH 22/38] update stage too --- frozen/circuitpython-stage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frozen/circuitpython-stage b/frozen/circuitpython-stage index 0dce331e84..6d1ae72916 160000 --- a/frozen/circuitpython-stage +++ b/frozen/circuitpython-stage @@ -1 +1 @@ -Subproject commit 0dce331e849a9459dbd1f99b254f6739e35a4ca1 +Subproject commit 6d1ae72916cf240ea86185c45f844d59f56d8ec3 From 23bd861c9ac27644c1568a0c89be6bc1d48362a4 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 20 Jun 2019 18:02:14 -0400 Subject: [PATCH 23/38] nrf: fix neopixel_write pwm buf size calc --- ports/nrf/common-hal/neopixel_write/__init__.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/nrf/common-hal/neopixel_write/__init__.c b/ports/nrf/common-hal/neopixel_write/__init__.c index fe2bab9996..78e0038e8f 100644 --- a/ports/nrf/common-hal/neopixel_write/__init__.c +++ b/ports/nrf/common-hal/neopixel_write/__init__.c @@ -111,18 +111,23 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout // // If there is not enough memory, we will fall back to cycle counter // using DWT - uint32_t pattern_size = numBytes * 8 * sizeof(uint16_t) + 2 * sizeof(uint16_t); + +#define PATTERN_SIZE(numBytes) (numBytes * 8 * sizeof(uint16_t) + 2 * sizeof(uint16_t)) + + uint32_t pattern_size = PATTERN_SIZE(numBytes); uint16_t* pixels_pattern = NULL; bool pattern_on_heap = false; // Use the stack to store 1 pixels worth of PWM data for the status led. uint32_t to ensure alignment. - uint32_t one_pixel[8 * sizeof(uint16_t) + 1]; + // Make it at least as big as PATTERN_SIZE(3), for one pixel of RGB data. + // PATTERN_SIZE is a multiple of 4, so we don't need round up to make sure one_pixel is large enough. + uint32_t one_pixel[PATTERN_SIZE(3)/sizeof(uint32_t)]; NRF_PWM_Type* pwm = find_free_pwm(); // only malloc if there is PWM device available if ( pwm != NULL ) { - if (pattern_size <= sizeof(one_pixel) * sizeof(uint32_t)) { + if (pattern_size <= sizeof(one_pixel)) { pixels_pattern = (uint16_t *) one_pixel; } else { pixels_pattern = (uint16_t *) m_malloc_maybe(pattern_size, false); From 48443c9c3fd3109edee22d6f698b1d135d035bb4 Mon Sep 17 00:00:00 2001 From: Alexander Hagerman Date: Tue, 25 Jun 2019 08:36:44 -0400 Subject: [PATCH 24/38] Update import statement in code snippet. The code snippets in the Design Guide article reference without the statement. --- docs/design_guide.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/design_guide.rst b/docs/design_guide.rst index 2efbdc34c0..5d965f9074 100644 --- a/docs/design_guide.rst +++ b/docs/design_guide.rst @@ -60,6 +60,7 @@ For example, a user can then use ``deinit()```:: import digitalio import board + import time led = digitalio.DigitalInOut(board.D13) led.direction = digitalio.Direction.OUTPUT @@ -79,6 +80,7 @@ Alternatively, using a ``with`` statement ensures that the hardware is deinitial import digitalio import board + import time with digitalio.DigitalInOut(board.D13) as led: led.direction = digitalio.Direction.OUTPUT From 330517bde9d7b6a78583e42dfdf585118db40dfb Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 25 Jun 2019 15:39:07 -0700 Subject: [PATCH 25/38] Validate portions of mpy load to detect corruption Fixes #1917 --- py/persistentcode.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/py/persistentcode.c b/py/persistentcode.c index f6de782ed8..c0358faa02 100644 --- a/py/persistentcode.c +++ b/py/persistentcode.c @@ -128,6 +128,12 @@ STATIC qstr load_qstr(mp_reader_t *reader) { size_t len = read_uint(reader); char str[len]; read_bytes(reader, (byte*)str, len); + // Validate the QSTRs by ensuring they do not contain any null terminations. They are length encoded instead. + for (size_t i = 0; i < len; i++) { + if (str[i] == '\0') { + mp_raise_RuntimeError(translate("Corrupt .mpy file")); + } + } qstr qst = qstr_from_strn(str, len); return qst; } @@ -145,11 +151,12 @@ STATIC mp_obj_t load_obj(mp_reader_t *reader) { return mp_obj_new_str_from_vstr(obj_type == 's' ? &mp_type_str : &mp_type_bytes, &vstr); } else if (obj_type == 'i') { return mp_parse_num_integer(vstr.buf, vstr.len, 10, NULL); - } else { - assert(obj_type == 'f' || obj_type == 'c'); + } else if (obj_type == 'f' || obj_type == 'c') { return mp_parse_num_decimal(vstr.buf, vstr.len, obj_type == 'c', false, NULL); } } + mp_raise_RuntimeError(translate("Corrupt .mpy file")); + return MP_OBJ_FROM_PTR(&mp_const_none_obj); } STATIC void load_bytecode_qstrs(mp_reader_t *reader, byte *ip, byte *ip_top) { From 77355cbb2f5a3cc2b48468955774a830f18ecf39 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 25 Jun 2019 16:52:52 -0700 Subject: [PATCH 26/38] Update translations --- locale/ID.po | 6 +++++- locale/circuitpython.pot | 6 +++++- locale/de_DE.po | 6 +++++- locale/en_US.po | 6 +++++- locale/en_x_pirate.po | 6 +++++- locale/es.po | 6 +++++- locale/fil.po | 6 +++++- locale/fr.po | 6 +++++- locale/it_IT.po | 6 +++++- locale/pl.po | 6 +++++- locale/pt_BR.po | 6 +++++- locale/zh_Latn_pinyin.po | 6 +++++- 12 files changed, 60 insertions(+), 12 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index f5c0c09495..9545845cd9 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -460,6 +460,10 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 34070dc69b..7e9f655817 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:41-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -450,6 +450,10 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/de_DE.po b/locale/de_DE.po index 2cb97c3d31..5e948cb6b6 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: Pascal Deneaux\n" "Language-Team: Sebastian Plamauer, Pascal Deneaux\n" @@ -454,6 +454,10 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "Der Befehl muss ein int zwischen 0 und 255 sein" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/en_US.po b/locale/en_US.po index ebc18cfaee..a50263d9fe 100644 --- a/locale/en_US.po +++ b/locale/en_US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -450,6 +450,10 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/en_x_pirate.po b/locale/en_x_pirate.po index 04706abdcd..443204fb57 100644 --- a/locale/en_x_pirate.po +++ b/locale/en_x_pirate.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: @sommersoft, @MrCertainly\n" @@ -454,6 +454,10 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/es.po b/locale/es.po index 77739f49cb..2135b7e77f 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -466,6 +466,10 @@ msgstr "La entrada en la columna debe ser digitalio.DigitalInOut" msgid "Command must be an int between 0 and 255" msgstr "Bytes debe estar entre 0 y 255." +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/fil.po b/locale/fil.po index 5954e29b49..8f3996d16a 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -459,6 +459,10 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "Sa gitna ng 0 o 255 dapat ang bytes." +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/fr.po b/locale/fr.po index 0bd0f8771e..6ee7b4d5a1 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: 2019-04-14 20:05+0100\n" "Last-Translator: Pierrick Couturier \n" "Language-Team: fr\n" @@ -465,6 +465,10 @@ msgstr "L'entrée 'Column' doit être un digitalio.DigitalInOut" msgid "Command must be an int between 0 and 255" msgstr "La commande doit être un entier entre 0 et 255" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/it_IT.po b/locale/it_IT.po index 12f21c38ea..ef1e306a1e 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -460,6 +460,10 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "I byte devono essere compresi tra 0 e 255" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/pl.po b/locale/pl.po index 1a7471f728..09187eb671 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: 2019-03-19 18:37-0700\n" "Last-Translator: Radomir Dopieralski \n" "Language-Team: pl\n" @@ -453,6 +453,10 @@ msgstr "Kolumny muszą być typu digitalio.DigitalInOut" msgid "Command must be an int between 0 and 255" msgstr "Komenda musi być int pomiędzy 0 a 255" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 390610041e..734491dd75 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n" "Last-Translator: \n" "Language-Team: \n" @@ -456,6 +456,10 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "Os bytes devem estar entre 0 e 255." +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 82264cb526..8ad03c968f 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-05-13 17:34-0700\n" +"POT-Creation-Date: 2019-06-25 16:50-0700\n" "PO-Revision-Date: 2019-04-13 10:10-0700\n" "Last-Translator: hexthat\n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -454,6 +454,10 @@ msgstr "Liè tiáomù bìxū shì digitalio.DigitalInOut" msgid "Command must be an int between 0 and 255" msgstr "Mìnglìng bìxū shì 0 dào 255 zhī jiān de int" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" From 2494bfdc8626aadb7d3197d165daf2569f3a8db1 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 25 Jun 2019 17:54:27 -0700 Subject: [PATCH 27/38] Validate raw code and mpy read length --- locale/ID.po | 6 +++++- locale/circuitpython.pot | 6 +++++- locale/de_DE.po | 6 +++++- locale/en_US.po | 6 +++++- locale/en_x_pirate.po | 6 +++++- locale/es.po | 6 +++++- locale/fil.po | 6 +++++- locale/fr.po | 6 +++++- locale/it_IT.po | 6 +++++- locale/pl.po | 6 +++++- locale/pt_BR.po | 6 +++++- locale/zh_Latn_pinyin.po | 6 +++++- py/emitglue.c | 7 ++++--- py/persistentcode.c | 29 +++++++++++++++++++---------- 14 files changed, 83 insertions(+), 25 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 9545845cd9..60d882bc60 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -464,6 +464,10 @@ msgstr "" msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 7e9f655817..1c48658ec7 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -454,6 +454,10 @@ msgstr "" msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/de_DE.po b/locale/de_DE.po index 5e948cb6b6..2b3b25ce7c 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: Pascal Deneaux\n" "Language-Team: Sebastian Plamauer, Pascal Deneaux\n" @@ -458,6 +458,10 @@ msgstr "Der Befehl muss ein int zwischen 0 und 255 sein" msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/en_US.po b/locale/en_US.po index a50263d9fe..1b5c360109 100644 --- a/locale/en_US.po +++ b/locale/en_US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -454,6 +454,10 @@ msgstr "" msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/en_x_pirate.po b/locale/en_x_pirate.po index 443204fb57..12a134a7dc 100644 --- a/locale/en_x_pirate.po +++ b/locale/en_x_pirate.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: @sommersoft, @MrCertainly\n" @@ -458,6 +458,10 @@ msgstr "" msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/es.po b/locale/es.po index 2135b7e77f..63dae87de0 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -470,6 +470,10 @@ msgstr "Bytes debe estar entre 0 y 255." msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/fil.po b/locale/fil.po index 8f3996d16a..393c67ad13 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -463,6 +463,10 @@ msgstr "Sa gitna ng 0 o 255 dapat ang bytes." msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/fr.po b/locale/fr.po index 6ee7b4d5a1..a64deeace7 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: 2019-04-14 20:05+0100\n" "Last-Translator: Pierrick Couturier \n" "Language-Team: fr\n" @@ -469,6 +469,10 @@ msgstr "La commande doit être un entier entre 0 et 255" msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/it_IT.po b/locale/it_IT.po index ef1e306a1e..52c229e030 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -464,6 +464,10 @@ msgstr "I byte devono essere compresi tra 0 e 255" msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/pl.po b/locale/pl.po index 09187eb671..bdb6f47958 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: 2019-03-19 18:37-0700\n" "Last-Translator: Radomir Dopieralski \n" "Language-Team: pl\n" @@ -457,6 +457,10 @@ msgstr "Komenda musi być int pomiędzy 0 a 255" msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 734491dd75..8b61c23b81 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n" "Last-Translator: \n" "Language-Team: \n" @@ -460,6 +460,10 @@ msgstr "Os bytes devem estar entre 0 e 255." msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 8ad03c968f..314591560a 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-25 16:50-0700\n" +"POT-Creation-Date: 2019-06-25 17:53-0700\n" "PO-Revision-Date: 2019-04-13 10:10-0700\n" "Last-Translator: hexthat\n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -458,6 +458,10 @@ msgstr "Mìnglìng bìxū shì 0 dào 255 zhī jiān de int" msgid "Corrupt .mpy file" msgstr "" +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/py/emitglue.c b/py/emitglue.c index 74bf8ddca2..7708689dd4 100644 --- a/py/emitglue.c +++ b/py/emitglue.c @@ -142,11 +142,12 @@ mp_obj_t mp_make_function_from_raw_code(const mp_raw_code_t *rc, mp_obj_t def_ar fun = mp_obj_new_fun_asm(rc->n_pos_args, rc->data.u_native.fun_data, rc->data.u_native.type_sig); break; #endif - default: - // rc->kind should always be set and BYTECODE is the only remaining case - assert(rc->kind == MP_CODE_BYTECODE); + case MP_CODE_BYTECODE: fun = mp_obj_new_fun_bc(def_args, def_kw_args, rc->data.u_byte.bytecode, rc->data.u_byte.const_table); break; + default: + // All other kinds are invalid. + mp_raise_RuntimeError(translate("Corrupt raw code")); } // check for generator functions and if so wrap in generator object diff --git a/py/persistentcode.c b/py/persistentcode.c index c0358faa02..eb69bd4079 100644 --- a/py/persistentcode.c +++ b/py/persistentcode.c @@ -102,20 +102,35 @@ STATIC void extract_prelude(const byte **ip, const byte **ip2, bytecode_prelude_ #include "py/parsenum.h" +STATIC void raise_corrupt_mpy(void) { + mp_raise_RuntimeError(translate("Corrupt .mpy file")); +} + STATIC int read_byte(mp_reader_t *reader) { - return reader->readbyte(reader->data); + mp_uint_t b = reader->readbyte(reader->data); + if (b == MP_READER_EOF) { + raise_corrupt_mpy(); + } + return b; } STATIC void read_bytes(mp_reader_t *reader, byte *buf, size_t len) { while (len-- > 0) { - *buf++ = reader->readbyte(reader->data); + mp_uint_t b =reader->readbyte(reader->data); + if (b == MP_READER_EOF) { + raise_corrupt_mpy(); + } + *buf++ = b; } } STATIC size_t read_uint(mp_reader_t *reader) { size_t unum = 0; for (;;) { - byte b = reader->readbyte(reader->data); + mp_uint_t b = reader->readbyte(reader->data); + if (b == MP_READER_EOF) { + raise_corrupt_mpy(); + } unum = (unum << 7) | (b & 0x7f); if ((b & 0x80) == 0) { break; @@ -128,12 +143,6 @@ STATIC qstr load_qstr(mp_reader_t *reader) { size_t len = read_uint(reader); char str[len]; read_bytes(reader, (byte*)str, len); - // Validate the QSTRs by ensuring they do not contain any null terminations. They are length encoded instead. - for (size_t i = 0; i < len; i++) { - if (str[i] == '\0') { - mp_raise_RuntimeError(translate("Corrupt .mpy file")); - } - } qstr qst = qstr_from_strn(str, len); return qst; } @@ -155,7 +164,7 @@ STATIC mp_obj_t load_obj(mp_reader_t *reader) { return mp_parse_num_decimal(vstr.buf, vstr.len, obj_type == 'c', false, NULL); } } - mp_raise_RuntimeError(translate("Corrupt .mpy file")); + raise_corrupt_mpy(); return MP_OBJ_FROM_PTR(&mp_const_none_obj); } From 6d2072f9cb3385eb6d69ac876d9d415a4e41e062 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 26 Jun 2019 11:02:18 -0700 Subject: [PATCH 28/38] Fix tests --- tests/import/mpy_invalid.py | 4 ++-- tests/import/mpy_invalid.py.exp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/import/mpy_invalid.py b/tests/import/mpy_invalid.py index 6a4e116e78..b9dd99a440 100644 --- a/tests/import/mpy_invalid.py +++ b/tests/import/mpy_invalid.py @@ -59,8 +59,8 @@ for i in range(len(user_files)): mod = 'mod%u' % i try: __import__(mod) - except ValueError as er: - print(mod, 'ValueError', er) + except Exception as e: + print(mod, type(e).__name__, e) # unmount and undo path addition uos.umount('/userfs') diff --git a/tests/import/mpy_invalid.py.exp b/tests/import/mpy_invalid.py.exp index e4f2b13e99..197eb4f7b2 100644 --- a/tests/import/mpy_invalid.py.exp +++ b/tests/import/mpy_invalid.py.exp @@ -1,3 +1,3 @@ -mod0 ValueError Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info. -mod1 ValueError Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info. -mod2 ValueError Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info. +mod0 RuntimeError Corrupt .mpy file +mod1 RuntimeError Corrupt .mpy file +mod2 MpyError Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info. From 6785e0259faee64b823eeae32ee4e4883eaf8b81 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 26 Jun 2019 11:14:45 -0700 Subject: [PATCH 29/38] Add keep alive to Travis deploy Some deploys take over 10 minutes and Travis kills the job. This workaround is from https://github.com/travis-ci/dpl/issues/568 --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1702089c37..b2fb016989 100755 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,16 @@ addons: - $(ls -d1 bin/*/*/* | tr "\n" ":") target_paths: / +# Some deploy jobs take over 10 minutes so use this keep alive hack to make sure Travis doesn't kill us. +before_deploy: | + function keep_alive() { + while true; do + echo -en "\a" + sleep 5 + done + } + keep_alive & + deploy: provider: releases api_key: From 1f105e0ac0313be9752f68c664c145ca5156a1e9 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 26 Jun 2019 15:10:51 -0700 Subject: [PATCH 30/38] Update frozen libraries to save space --- frozen/Adafruit_CircuitPython_BusDevice | 2 +- frozen/Adafruit_CircuitPython_CircuitPlayground | 2 +- frozen/Adafruit_CircuitPython_HID | 2 +- frozen/Adafruit_CircuitPython_LIS3DH | 2 +- frozen/Adafruit_CircuitPython_Motor | 2 +- frozen/Adafruit_CircuitPython_seesaw | 2 +- frozen/circuitpython-stage | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frozen/Adafruit_CircuitPython_BusDevice b/frozen/Adafruit_CircuitPython_BusDevice index 182eebdc81..b9280af514 160000 --- a/frozen/Adafruit_CircuitPython_BusDevice +++ b/frozen/Adafruit_CircuitPython_BusDevice @@ -1 +1 @@ -Subproject commit 182eebdc8168e3d14cd0cb28db3abb734c9e45f3 +Subproject commit b9280af5142fc41639229544678e23b5cca07c3a diff --git a/frozen/Adafruit_CircuitPython_CircuitPlayground b/frozen/Adafruit_CircuitPython_CircuitPlayground index 0cc2e975ed..154b74de02 160000 --- a/frozen/Adafruit_CircuitPython_CircuitPlayground +++ b/frozen/Adafruit_CircuitPython_CircuitPlayground @@ -1 +1 @@ -Subproject commit 0cc2e975ed22ace0d679c6fb8f3388034b88bcf1 +Subproject commit 154b74de020764597ba49f0d1e8cc18d55b3643b diff --git a/frozen/Adafruit_CircuitPython_HID b/frozen/Adafruit_CircuitPython_HID index c9e07857dc..89faee0eb0 160000 --- a/frozen/Adafruit_CircuitPython_HID +++ b/frozen/Adafruit_CircuitPython_HID @@ -1 +1 @@ -Subproject commit c9e07857dc10ff5e6c743e5e8c00e9b049800d09 +Subproject commit 89faee0eb08a6855e14f117c514fecf2dd90769d diff --git a/frozen/Adafruit_CircuitPython_LIS3DH b/frozen/Adafruit_CircuitPython_LIS3DH index f5892e24f7..bd7ddc67dc 160000 --- a/frozen/Adafruit_CircuitPython_LIS3DH +++ b/frozen/Adafruit_CircuitPython_LIS3DH @@ -1 +1 @@ -Subproject commit f5892e24f7235c4bde2908cbb3cd0a3d6b34d421 +Subproject commit bd7ddc67dc86f7ad0115f58ab80d5605739c6482 diff --git a/frozen/Adafruit_CircuitPython_Motor b/frozen/Adafruit_CircuitPython_Motor index 5a50830814..ddc7484498 160000 --- a/frozen/Adafruit_CircuitPython_Motor +++ b/frozen/Adafruit_CircuitPython_Motor @@ -1 +1 @@ -Subproject commit 5a50830814aaeeb1fda34ed0ba2f8397415d9796 +Subproject commit ddc74844983b35b027bd45091c7b8bb3c8d7a2d1 diff --git a/frozen/Adafruit_CircuitPython_seesaw b/frozen/Adafruit_CircuitPython_seesaw index 4b101f0032..f1171f9408 160000 --- a/frozen/Adafruit_CircuitPython_seesaw +++ b/frozen/Adafruit_CircuitPython_seesaw @@ -1 +1 @@ -Subproject commit 4b101f00320d36b23f8cc28cf3f12127085894c1 +Subproject commit f1171f94083ba64d153ff3f90eeb07500331d6e1 diff --git a/frozen/circuitpython-stage b/frozen/circuitpython-stage index 397badae58..6d1ae72916 160000 --- a/frozen/circuitpython-stage +++ b/frozen/circuitpython-stage @@ -1 +1 @@ -Subproject commit 397badae5863a1ce932213ef527e82314ac498a1 +Subproject commit 6d1ae72916cf240ea86185c45f844d59f56d8ec3 From fe507db45f7fa21c6de4aafb288a7f83d9903f71 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 26 Jun 2019 16:49:23 -0700 Subject: [PATCH 31/38] Shrink pIRkey build down. Rollback HID to save string space and remove board mapping for default buses that don't exist. --- frozen/Adafruit_CircuitPython_HID | 2 +- ports/atmel-samd/boards/pirkey_m0/pins.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/frozen/Adafruit_CircuitPython_HID b/frozen/Adafruit_CircuitPython_HID index 89faee0eb0..c9e07857dc 160000 --- a/frozen/Adafruit_CircuitPython_HID +++ b/frozen/Adafruit_CircuitPython_HID @@ -1 +1 @@ -Subproject commit 89faee0eb08a6855e14f117c514fecf2dd90769d +Subproject commit c9e07857dc10ff5e6c743e5e8c00e9b049800d09 diff --git a/ports/atmel-samd/boards/pirkey_m0/pins.c b/ports/atmel-samd/boards/pirkey_m0/pins.c index e1f43c83cc..41d02e3291 100644 --- a/ports/atmel-samd/boards/pirkey_m0/pins.c +++ b/ports/atmel-samd/boards/pirkey_m0/pins.c @@ -5,8 +5,5 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PA01) }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, - { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 2004be96acf1a29fd312362f84dbf86461f0500f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 26 Jun 2019 17:36:30 -0700 Subject: [PATCH 32/38] Properly reset the terminal each init. Fixes #1944 --- supervisor/shared/display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index c3afb3e008..414f850344 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -71,6 +71,8 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) { if (tiles == NULL) { return; } + grid->y = 0; + grid->top_left_y = 0; if (remaining_pixels > 0) { grid->y -= (grid->tile_height - remaining_pixels); } From 7c908b08ee3704a4784919e68b17e1a2f571fa17 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Sun, 30 Jun 2019 01:10:47 +0200 Subject: [PATCH 33/38] Use FONTBOUNDINGBOX for font metrics Instead of iterating over all the glyphs and calculating the maximum width and height, use the FONTBOUNDINGBOX to determine the size of a tile for terminalio. This works better with fonts such as generated by FontForge, that don't include the empty space in the glyph bitmap itself. It also lets the font author specify vertical spacing they want. I only tested this with the default font and with one I generated with FontForge. --- tools/gen_display_resources.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py index 7b28c31056..2c674c8ebd 100644 --- a/tools/gen_display_resources.py +++ b/tools/gen_display_resources.py @@ -29,7 +29,6 @@ class BitmapStub: self.rows[y] = bytes(row) f = bitmap_font.load_font(args.font, BitmapStub) -real_bb = [0, 0] # Load extra characters from the sample file. sample_characters = set() @@ -61,13 +60,11 @@ for c in all_characters: print("Font missing character:", c, ord(c)) filtered_characters = filtered_characters.replace(c, "") continue - x, y, dx, dy = g["bounds"] if g["shift"][1] != 0: raise RuntimeError("y shift") - real_bb[0] = max(real_bb[0], x - dx) - real_bb[1] = max(real_bb[1], y - dy) -tile_x, tile_y = real_bb +x, y, dx, dy = f.get_bounding_box() +tile_x, tile_y = x - dx, y - dy total_bits = tile_x * len(all_characters) total_bits += 32 - total_bits % 32 bytes_per_row = total_bits // 8 From e45eac5016c6ca5deed1061dde442a19b1694b62 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Mon, 1 Jul 2019 23:05:07 +0200 Subject: [PATCH 34/38] Switch the terminal font for ugame10 I designed this really tiny, minimalist font for use on very small displays. On uGame it lets one see the whole text that CircuitPython prints on boot. The characters are 4x6 pixels each, and they are optimized for legibility (large x-height, right angles, blocky shapes). It might make sense to also use that font in other boards. --- .../atmel-samd/boards/ugame10/brutalist-6.bdf | 1147 +++++++++++++++++ ports/atmel-samd/boards/ugame10/brutalist.sfd | 1034 +++++++++++++++ .../boards/ugame10/mpconfigboard.mk | 2 +- 3 files changed, 2182 insertions(+), 1 deletion(-) create mode 100644 ports/atmel-samd/boards/ugame10/brutalist-6.bdf create mode 100644 ports/atmel-samd/boards/ugame10/brutalist.sfd diff --git a/ports/atmel-samd/boards/ugame10/brutalist-6.bdf b/ports/atmel-samd/boards/ugame10/brutalist-6.bdf new file mode 100644 index 0000000000..f9e21e76a9 --- /dev/null +++ b/ports/atmel-samd/boards/ugame10/brutalist-6.bdf @@ -0,0 +1,1147 @@ +STARTFONT 2.1 +FONT -FontForge-Brutalist-Regular-R-Normal--6-60-75-75-P-40-ISO8859-1 +SIZE 6 100 100 +FONTBOUNDINGBOX 4 6 0 0 +COMMENT "Generated by fontforge, http://fontforge.sourceforge.net" +STARTPROPERTIES 17 +FAMILY_NAME "brutalist" +WEIGHT_NAME "Regular" +SLANT "R" +SETWIDTH_NAME "Normal" +PIXEL_SIZE 6 +POINT_SIZE 60 +RESOLUTION_X 100 +RESOLUTION_Y 100 +SPACING "C" +AVERAGE_WIDTH 40 +CHARSET_REGISTRY "ISO8859" +CHARSET_ENCODING "1" +FONTNAME_REGISTRY "" +FONT_ASCENT 4 +FONT_DESCENT 2 +MIN_SPACE 6 +FIGURE_WIDTH 4 +ENDPROPERTIES +CHARS 96 +STARTCHAR space +ENCODING 32 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 1 3 -2 +BITMAP +00 +ENDCHAR +STARTCHAR exclam +ENCODING 33 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 6 0 -2 +BITMAP +80 +80 +80 +80 +00 +80 +ENDCHAR +STARTCHAR quotedbl +ENCODING 34 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 2 0 2 +BITMAP +A0 +A0 +ENDCHAR +STARTCHAR numbersign +ENCODING 35 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +A0 +E0 +A0 +A0 +E0 +A0 +ENDCHAR +STARTCHAR dollar +ENCODING 36 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +40 +E0 +C0 +60 +E0 +40 +ENDCHAR +STARTCHAR percent +ENCODING 37 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +A0 +20 +40 +40 +80 +A0 +ENDCHAR +STARTCHAR ampersand +ENCODING 38 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +40 +A0 +40 +A0 +A0 +60 +ENDCHAR +STARTCHAR quotesingle +ENCODING 39 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 2 0 2 +BITMAP +80 +80 +ENDCHAR +STARTCHAR parenleft +ENCODING 40 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +60 +80 +80 +80 +80 +60 +ENDCHAR +STARTCHAR parenright +ENCODING 41 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +C0 +20 +20 +20 +20 +C0 +ENDCHAR +STARTCHAR asterisk +ENCODING 42 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 3 0 0 +BITMAP +A0 +40 +A0 +ENDCHAR +STARTCHAR plus +ENCODING 43 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 3 0 0 +BITMAP +40 +E0 +40 +ENDCHAR +STARTCHAR comma +ENCODING 44 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 2 3 0 -2 +BITMAP +40 +40 +80 +ENDCHAR +STARTCHAR hyphen +ENCODING 45 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 1 0 1 +BITMAP +E0 +ENDCHAR +STARTCHAR period +ENCODING 46 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 1 0 -1 +BITMAP +80 +ENDCHAR +STARTCHAR slash +ENCODING 47 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +20 +20 +40 +40 +80 +80 +ENDCHAR +STARTCHAR zero +ENCODING 48 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +60 +A0 +A0 +A0 +C0 +ENDCHAR +STARTCHAR one +ENCODING 49 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 2 5 0 -1 +BITMAP +40 +C0 +40 +40 +40 +ENDCHAR +STARTCHAR two +ENCODING 50 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +20 +E0 +80 +E0 +ENDCHAR +STARTCHAR three +ENCODING 51 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +20 +E0 +20 +E0 +ENDCHAR +STARTCHAR four +ENCODING 52 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +E0 +20 +20 +ENDCHAR +STARTCHAR five +ENCODING 53 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +80 +E0 +20 +E0 +ENDCHAR +STARTCHAR six +ENCODING 54 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +80 +E0 +A0 +E0 +ENDCHAR +STARTCHAR seven +ENCODING 55 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +20 +20 +20 +20 +ENDCHAR +STARTCHAR eight +ENCODING 56 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +E0 +A0 +E0 +ENDCHAR +STARTCHAR nine +ENCODING 57 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +E0 +20 +E0 +ENDCHAR +STARTCHAR colon +ENCODING 58 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 3 1 0 +BITMAP +80 +00 +80 +ENDCHAR +STARTCHAR semicolon +ENCODING 59 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 2 5 0 -2 +BITMAP +40 +00 +40 +40 +80 +ENDCHAR +STARTCHAR less +ENCODING 60 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +20 +40 +80 +40 +20 +ENDCHAR +STARTCHAR equal +ENCODING 61 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 3 0 0 +BITMAP +E0 +00 +E0 +ENDCHAR +STARTCHAR greater +ENCODING 62 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +80 +40 +20 +40 +80 +ENDCHAR +STARTCHAR question +ENCODING 63 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +20 +60 +40 +00 +40 +ENDCHAR +STARTCHAR at +ENCODING 64 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +A0 +E0 +E0 +80 +E0 +ENDCHAR +STARTCHAR A +ENCODING 65 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +A0 +E0 +A0 +ENDCHAR +STARTCHAR B +ENCODING 66 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +C0 +A0 +C0 +A0 +E0 +ENDCHAR +STARTCHAR C +ENCODING 67 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +80 +A0 +E0 +ENDCHAR +STARTCHAR D +ENCODING 68 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +C0 +A0 +A0 +A0 +C0 +ENDCHAR +STARTCHAR E +ENCODING 69 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +80 +E0 +80 +E0 +ENDCHAR +STARTCHAR F +ENCODING 70 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +80 +80 +E0 +80 +ENDCHAR +STARTCHAR G +ENCODING 71 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +80 +A0 +A0 +E0 +20 +ENDCHAR +STARTCHAR H +ENCODING 72 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +E0 +A0 +A0 +ENDCHAR +STARTCHAR I +ENCODING 73 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +40 +40 +40 +E0 +ENDCHAR +STARTCHAR J +ENCODING 74 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +20 +20 +20 +A0 +E0 +ENDCHAR +STARTCHAR K +ENCODING 75 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +C0 +E0 +A0 +A0 +ENDCHAR +STARTCHAR L +ENCODING 76 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +80 +80 +80 +80 +E0 +ENDCHAR +STARTCHAR M +ENCODING 77 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +E0 +A0 +A0 +A0 +ENDCHAR +STARTCHAR N +ENCODING 78 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +E0 +E0 +E0 +A0 +ENDCHAR +STARTCHAR O +ENCODING 79 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR P +ENCODING 80 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +A0 +E0 +80 +ENDCHAR +STARTCHAR Q +ENCODING 81 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +A0 +A0 +A0 +E0 +20 +ENDCHAR +STARTCHAR R +ENCODING 82 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +A0 +C0 +A0 +ENDCHAR +STARTCHAR S +ENCODING 83 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +80 +E0 +20 +E0 +ENDCHAR +STARTCHAR T +ENCODING 84 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +40 +40 +40 +40 +ENDCHAR +STARTCHAR U +ENCODING 85 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR V +ENCODING 86 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +A0 +E0 +40 +ENDCHAR +STARTCHAR W +ENCODING 87 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +A0 +E0 +A0 +ENDCHAR +STARTCHAR X +ENCODING 88 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +40 +A0 +A0 +ENDCHAR +STARTCHAR Y +ENCODING 89 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +E0 +40 +40 +ENDCHAR +STARTCHAR Z +ENCODING 90 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +20 +40 +80 +E0 +ENDCHAR +STARTCHAR bracketleft +ENCODING 91 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +80 +80 +80 +80 +E0 +ENDCHAR +STARTCHAR backslash +ENCODING 92 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +80 +80 +40 +40 +20 +20 +ENDCHAR +STARTCHAR bracketright +ENCODING 93 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +20 +20 +20 +20 +E0 +ENDCHAR +STARTCHAR asciicircum +ENCODING 94 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 3 0 1 +BITMAP +40 +E0 +A0 +ENDCHAR +STARTCHAR underscore +ENCODING 95 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 1 0 -1 +BITMAP +E0 +ENDCHAR +STARTCHAR grave +ENCODING 96 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 2 2 1 2 +BITMAP +80 +40 +ENDCHAR +STARTCHAR a +ENCODING 97 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +60 +A0 +E0 +ENDCHAR +STARTCHAR b +ENCODING 98 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +80 +E0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR c +ENCODING 99 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +A0 +80 +E0 +ENDCHAR +STARTCHAR d +ENCODING 100 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +20 +E0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR e +ENCODING 101 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +A0 +C0 +E0 +ENDCHAR +STARTCHAR f +ENCODING 102 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +60 +40 +E0 +40 +40 +40 +ENDCHAR +STARTCHAR g +ENCODING 103 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -2 +BITMAP +E0 +A0 +E0 +20 +E0 +ENDCHAR +STARTCHAR h +ENCODING 104 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +80 +E0 +A0 +A0 +A0 +ENDCHAR +STARTCHAR i +ENCODING 105 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 2 5 1 -1 +BITMAP +80 +00 +80 +80 +C0 +ENDCHAR +STARTCHAR j +ENCODING 106 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +20 +00 +60 +20 +A0 +E0 +ENDCHAR +STARTCHAR k +ENCODING 107 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +80 +A0 +C0 +A0 +A0 +ENDCHAR +STARTCHAR l +ENCODING 108 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +C0 +40 +40 +40 +60 +ENDCHAR +STARTCHAR m +ENCODING 109 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +E0 +E0 +A0 +ENDCHAR +STARTCHAR n +ENCODING 110 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +A0 +A0 +A0 +ENDCHAR +STARTCHAR o +ENCODING 111 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR p +ENCODING 112 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -2 +BITMAP +E0 +A0 +A0 +E0 +80 +ENDCHAR +STARTCHAR q +ENCODING 113 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -2 +BITMAP +E0 +A0 +A0 +E0 +20 +ENDCHAR +STARTCHAR r +ENCODING 114 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +A0 +80 +80 +ENDCHAR +STARTCHAR s +ENCODING 115 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +80 +60 +E0 +ENDCHAR +STARTCHAR t +ENCODING 116 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +40 +E0 +40 +40 +60 +ENDCHAR +STARTCHAR u +ENCODING 117 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +A0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR v +ENCODING 118 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +A0 +A0 +E0 +40 +ENDCHAR +STARTCHAR w +ENCODING 119 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +A0 +A0 +E0 +A0 +ENDCHAR +STARTCHAR x +ENCODING 120 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +A0 +40 +A0 +A0 +ENDCHAR +STARTCHAR y +ENCODING 121 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -2 +BITMAP +A0 +A0 +E0 +20 +E0 +ENDCHAR +STARTCHAR z +ENCODING 122 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +40 +80 +E0 +ENDCHAR +STARTCHAR braceleft +ENCODING 123 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +60 +40 +C0 +40 +40 +60 +ENDCHAR +STARTCHAR bar +ENCODING 124 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 6 1 -2 +BITMAP +80 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR braceright +ENCODING 125 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +C0 +40 +60 +40 +40 +C0 +ENDCHAR +STARTCHAR asciitilde +ENCODING 126 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 4 3 0 1 +BITMAP +50 +F0 +A0 +ENDCHAR +STARTCHAR uni007F +ENCODING 127 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +A0 +A0 +A0 +A0 +E0 +ENDCHAR +ENDFONT diff --git a/ports/atmel-samd/boards/ugame10/brutalist.sfd b/ports/atmel-samd/boards/ugame10/brutalist.sfd new file mode 100644 index 0000000000..2a48515aa5 --- /dev/null +++ b/ports/atmel-samd/boards/ugame10/brutalist.sfd @@ -0,0 +1,1034 @@ +SplineFontDB: 3.0 +FontName: brutalistRegular +FullName: brutalist Regular +FamilyName: brutalist +Weight: Regular +Copyright: Copyright (c) 2019, sheep,,, +UComments: "2019-6-28: Created with FontForge (http://fontforge.org)" +Version: 001.000 +ItalicAngle: 0 +UnderlinePosition: -100 +UnderlineWidth: 50 +Ascent: 666 +Descent: 334 +InvalidEm: 0 +LayerCount: 2 +Layer: 0 0 "Back" 1 +Layer: 1 0 "Fore" 0 +XUID: [1021 455 -922482232 13638063] +OS2Version: 0 +OS2_WeightWidthSlopeOnly: 0 +OS2_UseTypoMetrics: 1 +CreationTime: 1561742286 +ModificationTime: 1561742286 +OS2TypoAscent: 0 +OS2TypoAOffset: 1 +OS2TypoDescent: 0 +OS2TypoDOffset: 1 +OS2TypoLinegap: 0 +OS2WinAscent: 0 +OS2WinAOffset: 1 +OS2WinDescent: 0 +OS2WinDOffset: 1 +HheadAscent: 0 +HheadAOffset: 1 +HheadDescent: 0 +HheadDOffset: 1 +OS2Vendor: 'PfEd' +DEI: 91125 +Encoding: ISO8859-1 +UnicodeInterp: none +NameList: AGL For New Fonts +DisplaySize: 6 +AntiAlias: 1 +FitToEm: 0 +WinInfo: 0 32 23 +OnlyBitmaps: 1 +BeginChars: 256 96 + +StartChar: space +Encoding: 32 32 0 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: exclam +Encoding: 33 33 1 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: quotedbl +Encoding: 34 34 2 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: numbersign +Encoding: 35 35 3 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: dollar +Encoding: 36 36 4 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: percent +Encoding: 37 37 5 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: ampersand +Encoding: 38 38 6 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: quotesingle +Encoding: 39 39 7 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: parenleft +Encoding: 40 40 8 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: parenright +Encoding: 41 41 9 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: asterisk +Encoding: 42 42 10 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: plus +Encoding: 43 43 11 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: comma +Encoding: 44 44 12 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: hyphen +Encoding: 45 45 13 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: period +Encoding: 46 46 14 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: slash +Encoding: 47 47 15 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: zero +Encoding: 48 48 16 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: one +Encoding: 49 49 17 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: two +Encoding: 50 50 18 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: three +Encoding: 51 51 19 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: four +Encoding: 52 52 20 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: five +Encoding: 53 53 21 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: six +Encoding: 54 54 22 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: seven +Encoding: 55 55 23 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: eight +Encoding: 56 56 24 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: nine +Encoding: 57 57 25 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: colon +Encoding: 58 58 26 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: semicolon +Encoding: 59 59 27 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: less +Encoding: 60 60 28 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: equal +Encoding: 61 61 29 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: greater +Encoding: 62 62 30 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: question +Encoding: 63 63 31 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: at +Encoding: 64 64 32 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: A +Encoding: 65 65 33 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: B +Encoding: 66 66 34 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: C +Encoding: 67 67 35 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: D +Encoding: 68 68 36 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: E +Encoding: 69 69 37 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: F +Encoding: 70 70 38 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: G +Encoding: 71 71 39 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: H +Encoding: 72 72 40 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: I +Encoding: 73 73 41 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: J +Encoding: 74 74 42 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: K +Encoding: 75 75 43 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: L +Encoding: 76 76 44 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: M +Encoding: 77 77 45 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: N +Encoding: 78 78 46 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: O +Encoding: 79 79 47 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: P +Encoding: 80 80 48 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: Q +Encoding: 81 81 49 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: R +Encoding: 82 82 50 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: S +Encoding: 83 83 51 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: T +Encoding: 84 84 52 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: U +Encoding: 85 85 53 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: V +Encoding: 86 86 54 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: W +Encoding: 87 87 55 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: X +Encoding: 88 88 56 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: Y +Encoding: 89 89 57 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: Z +Encoding: 90 90 58 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: bracketleft +Encoding: 91 91 59 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: backslash +Encoding: 92 92 60 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: bracketright +Encoding: 93 93 61 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: asciicircum +Encoding: 94 94 62 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: underscore +Encoding: 95 95 63 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: grave +Encoding: 96 96 64 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: a +Encoding: 97 97 65 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: b +Encoding: 98 98 66 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: c +Encoding: 99 99 67 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: d +Encoding: 100 100 68 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: e +Encoding: 101 101 69 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: f +Encoding: 102 102 70 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: g +Encoding: 103 103 71 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: h +Encoding: 104 104 72 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: i +Encoding: 105 105 73 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: j +Encoding: 106 106 74 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: k +Encoding: 107 107 75 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: l +Encoding: 108 108 76 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: m +Encoding: 109 109 77 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: n +Encoding: 110 110 78 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: o +Encoding: 111 111 79 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: p +Encoding: 112 112 80 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: q +Encoding: 113 113 81 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: r +Encoding: 114 114 82 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: s +Encoding: 115 115 83 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: t +Encoding: 116 116 84 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: u +Encoding: 117 117 85 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: v +Encoding: 118 118 86 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: w +Encoding: 119 119 87 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: x +Encoding: 120 120 88 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: y +Encoding: 121 121 89 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: z +Encoding: 122 122 90 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: braceleft +Encoding: 123 123 91 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: bar +Encoding: 124 124 92 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: braceright +Encoding: 125 125 93 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: asciitilde +Encoding: 126 126 94 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: uni007F +Encoding: 127 127 95 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar +EndChars +BitmapFont: 6 96 4 2 1 +BDFStartProperties: 20 +FONT 1 "-FontForge-Brutalist-Regular-R-Normal--6-60-75-75-P-40-ISO8859-1" +SIZE 1 "6 100 100" +FONTBOUNDINGBOX 1 "4 6 0 -1" +FAMILY_NAME 16 "brutalist" +WEIGHT_NAME 16 "Regular" +SLANT 16 "R" +SETWIDTH_NAME 16 "Normal" +PIXEL_SIZE 18 6 +POINT_SIZE 18 60 +RESOLUTION_X 19 100 +RESOLUTION_Y 19 100 +SPACING 16 "C" +AVERAGE_WIDTH 18 40 +CHARSET_REGISTRY 16 "ISO8859" +CHARSET_ENCODING 16 "1" +FONTNAME_REGISTRY 16 "" +FONT_ASCENT 18 4 +FONT_DESCENT 18 2 +MIN_SPACE 18 6 +FIGURE_WIDTH 18 4 +BDFEndProperties +Resolution: 100 +BDFChar: 0 32 5 3 3 -2 -2 +z +BDFChar: 1 33 5 0 0 -2 3 +J:N0#!.Y%L +BDFChar: 2 34 5 0 2 2 3 +TV)8b +BDFChar: 3 35 5 0 2 -2 3 +T\uK9i1L&M +BDFChar: 4 36 5 0 2 -2 3 +5iBFci'78B +BDFChar: 5 37 5 0 2 -2 3 +THHKbJ=llB +BDFChar: 6 38 5 0 2 -2 3 +5bLB8TO7a" +BDFChar: 7 39 5 0 0 2 3 +J:IV" +BDFChar: 8 40 5 0 2 -2 3 +@" Date: Tue, 2 Jul 2019 18:15:23 -0700 Subject: [PATCH 35/38] Fix Group subscr to detect delete correctly Fixes #1957 --- shared-bindings/displayio/Group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/displayio/Group.c b/shared-bindings/displayio/Group.c index 76719c5808..5a35424ce4 100644 --- a/shared-bindings/displayio/Group.c +++ b/shared-bindings/displayio/Group.c @@ -295,7 +295,7 @@ STATIC mp_obj_t group_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t valu if (value == MP_OBJ_SENTINEL) { // load return common_hal_displayio_group_get(self, index); - } else if (value == mp_const_none) { + } else if (value == MP_OBJ_NULL) { common_hal_displayio_group_pop(self, index); } else { common_hal_displayio_group_set(self, index, value); From 6e5d70fa1929a6ab2b2de4d9fb0fb224d7618700 Mon Sep 17 00:00:00 2001 From: iot49 Date: Wed, 3 Jul 2019 12:02:01 -0700 Subject: [PATCH 36/38] changed type of receiver_buffer_size to uint16_t --- ports/nrf/common-hal/busio/UART.c | 2 +- shared-bindings/busio/UART.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c index 593914afc0..b9e9e55387 100644 --- a/ports/nrf/common-hal/busio/UART.c +++ b/ports/nrf/common-hal/busio/UART.c @@ -131,7 +131,7 @@ void uart_reset(void) { void common_hal_busio_uart_construct (busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, - uint8_t receiver_buffer_size) { + uint16_t receiver_buffer_size) { // Find a free UART peripheral. self->uarte = NULL; for (size_t i = 0 ; i < MP_ARRAY_SIZE(nrfx_uartes); i++) { diff --git a/shared-bindings/busio/UART.h b/shared-bindings/busio/UART.h index e171f8bb45..776a996be8 100644 --- a/shared-bindings/busio/UART.h +++ b/shared-bindings/busio/UART.h @@ -42,7 +42,7 @@ typedef enum { extern void common_hal_busio_uart_construct(busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, - uint8_t receiver_buffer_size); + uint16_t receiver_buffer_size); extern void common_hal_busio_uart_deinit(busio_uart_obj_t *self); extern bool common_hal_busio_uart_deinited(busio_uart_obj_t *self); From 4c72a3991ed53889b2ecba9b3fbb742e261a8cc3 Mon Sep 17 00:00:00 2001 From: iot49 Date: Fri, 5 Jul 2019 10:01:51 -0700 Subject: [PATCH 37/38] updated samd and esp8266 ports --- ports/atmel-samd/common-hal/busio/UART.c | 2 +- ports/esp8266/common-hal/busio/UART.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/common-hal/busio/UART.c b/ports/atmel-samd/common-hal/busio/UART.c index 10618d1cec..b4539eb931 100644 --- a/ports/atmel-samd/common-hal/busio/UART.c +++ b/ports/atmel-samd/common-hal/busio/UART.c @@ -55,7 +55,7 @@ static void usart_async_rxc_callback(const struct usart_async_descriptor *const void common_hal_busio_uart_construct(busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, - uint8_t receiver_buffer_size) { + uint16_t receiver_buffer_size) { Sercom* sercom = NULL; uint8_t sercom_index = 255; // Unset index uint32_t rx_pinmux = 0; diff --git a/ports/esp8266/common-hal/busio/UART.c b/ports/esp8266/common-hal/busio/UART.c index f10e3dc555..e72dce639c 100644 --- a/ports/esp8266/common-hal/busio/UART.c +++ b/ports/esp8266/common-hal/busio/UART.c @@ -40,7 +40,7 @@ extern UartDevice UartDev; void common_hal_busio_uart_construct(busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, - uint8_t receiver_buffer_size) { + uint16_t receiver_buffer_size) { if (rx != mp_const_none || tx != &pin_GPIO2) { nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, translate("Only tx supported on UART1 (GPIO2)."))); } From 64507207da5a5b0a32cf0f8d51d6ca324b7dec21 Mon Sep 17 00:00:00 2001 From: Carl Elkins Date: Mon, 8 Jul 2019 02:08:39 +0100 Subject: [PATCH 38/38] Added conditional compilation around selection of TX pad candidates Original code was correct for SAMD21 New code for SAMD51 only permits pad-0 for TX --- ports/atmel-samd/common-hal/busio/UART.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/common-hal/busio/UART.c b/ports/atmel-samd/common-hal/busio/UART.c index 10618d1cec..c32919365c 100644 --- a/ports/atmel-samd/common-hal/busio/UART.c +++ b/ports/atmel-samd/common-hal/busio/UART.c @@ -88,11 +88,19 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, continue; } potential_sercom = sercom_insts[sercom_index]; - if (potential_sercom->USART.CTRLA.bit.ENABLE != 0 || +#ifdef SAMD21 + if (potential_sercom->USART.CTRLA.bit.ENABLE != 0 || !(tx->sercom[i].pad == 0 || tx->sercom[i].pad == 2)) { continue; } +#endif +#ifdef SAMD51 + if (potential_sercom->USART.CTRLA.bit.ENABLE != 0 || + !(tx->sercom[i].pad == 0)) { + continue; + } +#endif tx_pinmux = PINMUX(tx->number, (i == 0) ? MUX_C : MUX_D); tx_pad = tx->sercom[i].pad; if (rx == mp_const_none) {