From 05d8885a1ab959fabdbb77f99408b2e7dc78b97c Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 16 Jan 2019 12:04:42 -0800 Subject: Rework displays in prep for dynamic support and 8bit parallel. --- main.c | 5 + ports/atmel-samd/Makefile | 3 +- ports/atmel-samd/board_busses.c | 129 ------------------ ports/atmel-samd/board_busses.h | 41 ------ ports/atmel-samd/boards/board.h | 6 - ports/atmel-samd/boards/feather_m4_express/board.c | 9 +- .../boards/feather_m4_express/mpconfigboard.h | 1 + ports/atmel-samd/boards/feather_m4_express/pins.c | 3 +- ports/atmel-samd/boards/pyportal/board.c | 79 +---------- ports/atmel-samd/common-hal/busio/SPI.c | 6 - ports/atmel-samd/common-hal/displayio/FourWire.c | 96 ++----------- ports/atmel-samd/common-hal/displayio/FourWire.h | 13 +- .../atmel-samd/common-hal/displayio/ParallelBus.c | 98 ++++++++++++++ .../atmel-samd/common-hal/displayio/ParallelBus.h | 41 ++++++ ports/atmel-samd/common-hal/microcontroller/Pin.c | 26 ++-- ports/atmel-samd/common-hal/microcontroller/Pin.h | 1 + ports/atmel-samd/supervisor/port.c | 3 - shared-bindings/displayio/Display.c | 149 +++++++++++++++++++++ shared-bindings/displayio/Display.h | 59 ++++++++ shared-bindings/displayio/FourWire.c | 83 +++++------- shared-bindings/displayio/FourWire.h | 29 +--- shared-bindings/displayio/ParallelBus.c | 79 +++++++++++ shared-bindings/displayio/ParallelBus.h | 47 +++++++ shared-module/displayio/Display.c | 149 +++++++++++++++++++++ shared-module/displayio/Display.h | 55 ++++++++ shared-module/displayio/__init__.c | 57 +++----- shared-module/displayio/__init__.h | 16 +++ supervisor/shared/board_busses.c | 130 ++++++++++++++++++ supervisor/shared/board_busses.h | 43 ++++++ supervisor/supervisor.mk | 1 + 30 files changed, 978 insertions(+), 479 deletions(-) delete mode 100644 ports/atmel-samd/board_busses.c delete mode 100644 ports/atmel-samd/board_busses.h create mode 100644 ports/atmel-samd/common-hal/displayio/ParallelBus.c create mode 100644 ports/atmel-samd/common-hal/displayio/ParallelBus.h create mode 100644 shared-bindings/displayio/Display.c create mode 100644 shared-bindings/displayio/Display.h create mode 100644 shared-bindings/displayio/ParallelBus.c create mode 100644 shared-bindings/displayio/ParallelBus.h create mode 100644 shared-module/displayio/Display.c create mode 100644 shared-module/displayio/Display.h create mode 100644 supervisor/shared/board_busses.c create mode 100644 supervisor/shared/board_busses.h diff --git a/main.c b/main.c index 4e0b77cfd..d328fcaa4 100755 --- a/main.c +++ b/main.c @@ -27,6 +27,7 @@ #include #include +#include "shared-module/displayio/__init__.h" #include "extmod/vfs.h" #include "extmod/vfs_fat.h" @@ -49,6 +50,7 @@ #include "supervisor/port.h" #include "supervisor/filesystem.h" #include "supervisor/shared/autoreload.h" +#include "supervisor/shared/board_busses.h" #include "supervisor/shared/translate.h" #include "supervisor/shared/rgb_led_status.h" #include "supervisor/shared/safe_mode.h" @@ -198,10 +200,13 @@ bool run_code_py(safe_mode_t safe_mode) { serial_write_compressed(translate("WARNING: Your code filename has two extensions\n")); } } + // Turn off the display before the heap disappears. + reset_primary_display(); stop_mp(); free_memory(heap); reset_port(); + reset_board_busses(); reset_board(); reset_status_led(); diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 04e42a971..088288fbd 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -238,7 +238,6 @@ SRC_ASF := $(addprefix asf4/$(CHIP_FAMILY)/, $(SRC_ASF)) SRC_C = \ audio_dma.c \ - board_busses.c \ background.c \ fatfs_port.c \ mphalport.c \ @@ -307,6 +306,7 @@ SRC_COMMON_HAL = \ digitalio/__init__.c \ digitalio/DigitalInOut.c \ displayio/FourWire.c \ + displayio/ParallelBus.c \ i2cslave/__init__.c \ i2cslave/I2CSlave.c \ microcontroller/__init__.c \ @@ -379,6 +379,7 @@ SRC_SHARED_MODULE = \ displayio/__init__.c \ displayio/Bitmap.c \ displayio/ColorConverter.c \ + displayio/Display.c \ displayio/Group.c \ displayio/OnDiskBitmap.c \ displayio/Palette.c \ diff --git a/ports/atmel-samd/board_busses.c b/ports/atmel-samd/board_busses.c deleted file mode 100644 index 424c9cc08..000000000 --- a/ports/atmel-samd/board_busses.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include "shared-bindings/busio/I2C.h" -#include "shared-bindings/busio/SPI.h" -#include "shared-bindings/busio/UART.h" - -#include "shared-bindings/microcontroller/Pin.h" -#include "supervisor/shared/translate.h" -#include "mpconfigboard.h" -#include "samd/pins.h" -#include "py/runtime.h" - -#define BOARD_I2C (defined(DEFAULT_I2C_BUS_SDA) && defined(DEFAULT_I2C_BUS_SCL)) -#define BOARD_SPI (defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MISO) && defined(DEFAULT_SPI_BUS_MOSI)) -#define BOARD_UART (defined(DEFAULT_UART_BUS_RX) && defined(DEFAULT_UART_BUS_TX)) - -#if BOARD_I2C -STATIC mp_obj_t i2c_singleton = NULL; - -STATIC mp_obj_t board_i2c(void) { - - if (i2c_singleton == NULL) { - busio_i2c_obj_t *self = m_new_obj(busio_i2c_obj_t); - self->base.type = &busio_i2c_type; - - assert_pin_free(DEFAULT_I2C_BUS_SDA); - assert_pin_free(DEFAULT_I2C_BUS_SCL); - common_hal_busio_i2c_construct(self, DEFAULT_I2C_BUS_SCL, DEFAULT_I2C_BUS_SDA, 400000, 0); - i2c_singleton = (mp_obj_t)self; - } - return i2c_singleton; -} -#else -STATIC mp_obj_t board_i2c(void) { - mp_raise_NotImplementedError(translate("No default I2C bus")); - return NULL; -} -#endif -MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c); - -#if BOARD_SPI -STATIC mp_obj_t spi_singleton = NULL; - -STATIC mp_obj_t board_spi(void) { - if (spi_singleton == NULL) { - busio_spi_obj_t *self = m_new_obj(busio_spi_obj_t); - self->base.type = &busio_spi_type; - assert_pin_free(DEFAULT_SPI_BUS_SCK); - assert_pin_free(DEFAULT_SPI_BUS_MOSI); - assert_pin_free(DEFAULT_SPI_BUS_MISO); - const mcu_pin_obj_t* clock = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_SCK); - const mcu_pin_obj_t* mosi = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MOSI); - const mcu_pin_obj_t* miso = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MISO); - common_hal_busio_spi_construct(self, clock, mosi, miso); - spi_singleton = (mp_obj_t)self; - } - return spi_singleton; -} -#else -STATIC mp_obj_t board_spi(void) { - mp_raise_NotImplementedError(translate("No default SPI bus")); - return NULL; -} -#endif -MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi); - -#if BOARD_UART -STATIC mp_obj_t uart_singleton = NULL; - -STATIC mp_obj_t board_uart(void) { - if (uart_singleton == NULL) { - busio_uart_obj_t *self = m_new_obj(busio_uart_obj_t); - self->base.type = &busio_uart_type; - - assert_pin_free(DEFAULT_UART_BUS_RX); - assert_pin_free(DEFAULT_UART_BUS_TX); - - const mcu_pin_obj_t* rx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RX); - const mcu_pin_obj_t* tx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_TX); - - common_hal_busio_uart_construct(self, tx, rx, 9600, 8, PARITY_NONE, 1, 1000, 64); - uart_singleton = (mp_obj_t)self; - } - return uart_singleton; -} -#else -STATIC mp_obj_t board_uart(void) { - mp_raise_NotImplementedError(translate("No default UART bus")); - return NULL; -} -#endif -MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart); - - -void reset_board_busses(void) { -#if BOARD_I2C - i2c_singleton = NULL; -#endif -#if BOARD_SPI - spi_singleton = NULL; -#endif -#if BOARD_UART - uart_singleton = NULL; -#endif -} diff --git a/ports/atmel-samd/board_busses.h b/ports/atmel-samd/board_busses.h deleted file mode 100644 index 08dd1aae1..000000000 --- a/ports/atmel-samd/board_busses.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARD_BUSSES_H -#define MICROPY_INCLUDED_ATMEL_SAMD_BOARD_BUSSES_H - -void board_i2c(void); -extern mp_obj_fun_builtin_fixed_t board_i2c_obj; - -void board_spi(void); -extern mp_obj_fun_builtin_fixed_t board_spi_obj; - -void board_uart(void); -extern mp_obj_fun_builtin_fixed_t board_uart_obj; - -void reset_board_busses(void); - -#endif // MICROPY_INCLUDED_ATMEL_SAMD_BOARD_BUSSES_H diff --git a/ports/atmel-samd/boards/board.h b/ports/atmel-samd/boards/board.h index 61acc730e..4f0ae9d72 100644 --- a/ports/atmel-samd/boards/board.h +++ b/ports/atmel-samd/boards/board.h @@ -33,12 +33,6 @@ #include "py/mpconfig.h" -#ifdef CIRCUITPY_DISPLAYIO -#include "common-hal/displayio/FourWire.h" - -extern displayio_fourwire_obj_t board_display_obj; -#endif - // Initializes board related state once on start up. void board_init(void); diff --git a/ports/atmel-samd/boards/feather_m4_express/board.c b/ports/atmel-samd/boards/feather_m4_express/board.c index 8096b9b8e..85e9959c9 100644 --- a/ports/atmel-samd/boards/feather_m4_express/board.c +++ b/ports/atmel-samd/boards/feather_m4_express/board.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,6 +26,13 @@ #include "boards/board.h" #include "mpconfigboard.h" +#include "hal/include/hal_gpio.h" + +#include "shared-bindings/displayio/Display.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-module/displayio/mipi_constants.h" + +#include "tick.h" void board_init(void) { } diff --git a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h index ed1dfe763..8510a7dae 100644 --- a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h @@ -43,3 +43,4 @@ #define IGNORE_PIN_PA25 1 #define CIRCUITPY_I2CSLAVE +#define CIRCUITPY_DISPLAYIO (1) diff --git a/ports/atmel-samd/boards/feather_m4_express/pins.c b/ports/atmel-samd/boards/feather_m4_express/pins.c index 5004254c5..23b55e957 100644 --- a/ports/atmel-samd/boards/feather_m4_express/pins.c +++ b/ports/atmel-samd/boards/feather_m4_express/pins.c @@ -1,6 +1,7 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "boards/board.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/pyportal/board.c b/ports/atmel-samd/boards/pyportal/board.c index 9cf3ee8c2..8ec498e8c 100644 --- a/ports/atmel-samd/boards/pyportal/board.c +++ b/ports/atmel-samd/boards/pyportal/board.c @@ -25,88 +25,15 @@ */ #include "boards/board.h" +#include "board_busses.h" #include "mpconfigboard.h" #include "hal/include/hal_gpio.h" -#include "shared-bindings/displayio/FourWire.h" -#include "shared-module/displayio/mipi_constants.h" +#include "shared-module/displayio/__init__.h" #include "tick.h" -displayio_fourwire_obj_t board_display_obj; - -#define DELAY 0x80 - -uint8_t display_init_sequence[] = { - 0xEF, 3, 0x03, 0x80, 0x02, - 0xCF, 3, 0x00, 0xC1, 0x30, - 0xED, 4, 0x64, 0x03, 0x12, 0x81, - 0xE8, 3, 0x85, 0x00, 0x78, - 0xCB, 5, 0x39, 0x2C, 0x00, 0x34, 0x02, - 0xF7, 1, 0x20, - 0xEA, 2, 0x00, 0x00, - 0xc0, 1, 0x23, // Power control VRH[5:0] - 0xc1, 1, 0x10, // Power control SAP[2:0];BT[3:0] - 0xc5, 2, 0x3e, 0x28, // VCM control - 0xc7, 1, 0x86, // VCM control2 - 0x36, 1, 0x38, // Memory Access Control - 0x37, 1, 0x00, // Vertical scroll zero - 0x3a, 1, 0x55, // COLMOD: Pixel Format Set - 0xb1, 2, 0x00, 0x18, // Frame Rate Control (In Normal Mode/Full Colors) - 0xb6, 3, 0x08, 0x82, 0x27, // Display Function Control - 0xF2, 1, 0x00, // 3Gamma Function Disable - 0x26, 1, 0x01, // Gamma curve selected - 0xe0, 15, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, // Set Gamma - 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00, - 0xe1, 15, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, // Set Gamma - 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F, - 0x11, DELAY, 120, // Exit Sleep - 0x29, DELAY, 120, // Display on -}; - - void board_init(void) { - board_display_obj.base.type = &displayio_fourwire_type; - common_hal_displayio_fourwire_construct(&board_display_obj, - &pin_PA13, // Clock - &pin_PA12, // Data - &pin_PB09, // Command or data - &pin_PB06, // Chip select - &pin_PA00, // Reset - 320, // Width - 240, // Height - 0, // column start - 0, // row start - 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 - - uint32_t i = 0; - common_hal_displayio_fourwire_begin_transaction(&board_display_obj); - while (i < sizeof(display_init_sequence)) { - uint8_t *cmd = display_init_sequence + i; - uint8_t data_size = *(cmd + 1); - bool delay = (data_size & DELAY) != 0; - data_size &= ~DELAY; - uint8_t *data = cmd + 2; - common_hal_displayio_fourwire_send(&board_display_obj, true, cmd, 1); - common_hal_displayio_fourwire_send(&board_display_obj, false, data, data_size); - if (delay) { - data_size++; - uint16_t delay_length_ms = *(cmd + 1 + data_size); - if (delay_length_ms == 255) { - delay_length_ms = 500; - } - uint64_t start = ticks_ms; - while (ticks_ms - start < delay_length_ms) {} - } else { - uint64_t start = ticks_ms; - while (ticks_ms - start < 10) {} - } - i += 2 + data_size; - } - common_hal_displayio_fourwire_end_transaction(&board_display_obj); } bool board_requests_safe_mode(void) { @@ -114,5 +41,5 @@ bool board_requests_safe_mode(void) { } void reset_board(void) { - common_hal_displayio_fourwire_show(&board_display_obj, NULL); + common_hal_displayio_display_show(&primary_display_obj, NULL); } diff --git a/ports/atmel-samd/common-hal/busio/SPI.c b/ports/atmel-samd/common-hal/busio/SPI.c index 4de34c975..68382d405 100644 --- a/ports/atmel-samd/common-hal/busio/SPI.c +++ b/ports/atmel-samd/common-hal/busio/SPI.c @@ -65,12 +65,6 @@ void reset_sercoms(void) { if (sercom_instances[i] == MICROPY_HW_APA102_SERCOM) { continue; } - #endif - #ifdef CIRCUITPY_DISPLAYIO - // TODO(tannewt): Make this dynamic. - if (sercom_instances[i] == board_display_obj.bus.spi_desc.dev.prvt) { - continue; - } #endif // SWRST is same for all modes of SERCOMs. sercom_instances[i]->SPI.CTRLA.bit.SWRST = 1; diff --git a/ports/atmel-samd/common-hal/displayio/FourWire.c b/ports/atmel-samd/common-hal/displayio/FourWire.c index 51e6de5a2..7a0bdd0c1 100644 --- a/ports/atmel-samd/common-hal/displayio/FourWire.c +++ b/ports/atmel-samd/common-hal/displayio/FourWire.c @@ -34,13 +34,11 @@ #include "tick.h" void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, - const mcu_pin_obj_t* clock, const mcu_pin_obj_t* data, const mcu_pin_obj_t* command, - const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, uint16_t width, - uint16_t height, int16_t colstart, int16_t rowstart, uint16_t color_depth, - uint8_t set_column_command, uint8_t set_row_command, uint8_t write_ram_command) { + busio_spi_obj_t* spi, const mcu_pin_obj_t* command, + const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset) { - common_hal_busio_spi_construct(&self->bus, clock, data, mp_const_none); - common_hal_busio_spi_never_reset(&self->bus); + self->bus = spi; + common_hal_busio_spi_never_reset(self->bus); common_hal_digitalio_digitalinout_construct(&self->command, command); common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL); @@ -53,93 +51,27 @@ void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, never_reset_pin_number(command->number); never_reset_pin_number(chip_select->number); never_reset_pin_number(reset->number); - - self->width = width; - self->height = height; - self->color_depth = color_depth; - self->set_column_command = set_column_command; - self->set_row_command = set_row_command; - self->write_ram_command = write_ram_command; - self->current_group = NULL; - self->colstart = colstart; - self->rowstart = rowstart; } -bool common_hal_displayio_fourwire_begin_transaction(displayio_fourwire_obj_t* self) { - if (!common_hal_busio_spi_try_lock(&self->bus)) { +bool common_hal_displayio_fourwire_begin_transaction(mp_obj_t obj) { + displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); + if (!common_hal_busio_spi_try_lock(self->bus)) { return false; } // TODO(tannewt): Stop hardcoding SPI frequency, polarity and phase. - common_hal_busio_spi_configure(&self->bus, 48000000, 0, 0, 8); + common_hal_busio_spi_configure(self->bus, 12000000, 0, 0, 8); common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); return true; } -void common_hal_displayio_fourwire_send(displayio_fourwire_obj_t* self, bool command, uint8_t *data, uint32_t data_length) { +void common_hal_displayio_fourwire_send(mp_obj_t obj, bool command, uint8_t *data, uint32_t data_length) { + displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->command, !command); - common_hal_busio_spi_write(&self->bus, data, data_length); + common_hal_busio_spi_write(self->bus, data, data_length); } -void common_hal_displayio_fourwire_end_transaction(displayio_fourwire_obj_t* self) { +void common_hal_displayio_fourwire_end_transaction(mp_obj_t obj) { + displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); - common_hal_busio_spi_unlock(&self->bus); -} - -void common_hal_displayio_fourwire_show(displayio_fourwire_obj_t* self, displayio_group_t* root_group) { - self->current_group = root_group; - common_hal_displayio_fourwire_refresh_soon(self); -} - -void common_hal_displayio_fourwire_refresh_soon(displayio_fourwire_obj_t* self) { - self->refresh = true; -} - -int32_t common_hal_displayio_fourwire_wait_for_frame(displayio_fourwire_obj_t* self) { - uint64_t last_refresh = self->last_refresh; - while (last_refresh == self->last_refresh) { - MICROPY_VM_HOOK_LOOP - } - return 0; -} - -void displayio_fourwire_start_region_update(displayio_fourwire_obj_t* self, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) { - // TODO(tannewt): Handle displays with single byte bounds. - common_hal_displayio_fourwire_begin_transaction(self); - uint16_t data[2]; - common_hal_displayio_fourwire_send(self, true, &self->set_column_command, 1); - data[0] = __builtin_bswap16(x0 + self->colstart); - data[1] = __builtin_bswap16(x1-1 + self->colstart); - common_hal_displayio_fourwire_send(self, false, (uint8_t*) data, 4); - common_hal_displayio_fourwire_send(self, true, &self->set_row_command, 1); - data[0] = __builtin_bswap16(y0 + 1 + self->rowstart); - data[1] = __builtin_bswap16(y1 + self->rowstart); - common_hal_displayio_fourwire_send(self, false, (uint8_t*) data, 4); - common_hal_displayio_fourwire_send(self, true, &self->write_ram_command, 1); -} - -bool displayio_fourwire_send_pixels(displayio_fourwire_obj_t* self, uint32_t* pixels, uint32_t length) { - // TODO: Set this up so its async and 32 bit DMA transfers. - common_hal_displayio_fourwire_send(self, false, (uint8_t*) pixels, length*4); - return true; -} - -void displayio_fourwire_finish_region_update(displayio_fourwire_obj_t* self) { - common_hal_displayio_fourwire_end_transaction(self); -} - -bool displayio_fourwire_frame_queued(displayio_fourwire_obj_t* self) { - // Refresh at ~30 fps. - return (ticks_ms - self->last_refresh) > 32; -} - -bool displayio_fourwire_refresh_queued(displayio_fourwire_obj_t* self) { - return self->refresh || (self->current_group != NULL && displayio_group_needs_refresh(self->current_group)); -} - -void displayio_fourwire_finish_refresh(displayio_fourwire_obj_t* self) { - if (self->current_group != NULL) { - displayio_group_finish_refresh(self->current_group); - } - self->refresh = false; - self->last_refresh = ticks_ms; + common_hal_busio_spi_unlock(self->bus); } diff --git a/ports/atmel-samd/common-hal/displayio/FourWire.h b/ports/atmel-samd/common-hal/displayio/FourWire.h index b99717670..e3ae5781b 100644 --- a/ports/atmel-samd/common-hal/displayio/FourWire.h +++ b/ports/atmel-samd/common-hal/displayio/FourWire.h @@ -33,21 +33,10 @@ typedef struct { mp_obj_base_t base; - busio_spi_obj_t bus; + busio_spi_obj_t* bus; digitalio_digitalinout_obj_t command; digitalio_digitalinout_obj_t chip_select; digitalio_digitalinout_obj_t reset; - uint16_t width; - uint16_t height; - uint16_t color_depth; - uint8_t set_column_command; - uint8_t set_row_command; - uint8_t write_ram_command; - displayio_group_t *current_group; - bool refresh; - uint64_t last_refresh; - int16_t colstart; - int16_t rowstart; } displayio_fourwire_obj_t; #endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_FOURWIRE_H diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.c b/ports/atmel-samd/common-hal/displayio/ParallelBus.c new file mode 100644 index 000000000..f852647a4 --- /dev/null +++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.c @@ -0,0 +1,98 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/displayio/ParallelBus.h" + +#include + +#include "common-hal/microcontroller/Pin.h" +#include "py/runtime.h" +#include "shared-bindings/digitalio/DigitalInOut.h" + +#include "tick.h" + +void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, + const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, + const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, const mcu_pin_obj_t* write) { + + uint8_t data_pin = data0->number; + if (data_pin % 8 != 0 || data_pin % 32 >= 24) { + mp_raise_ValueError(translate("Data 0 pin must be byte aligned")); + } + for (uint8_t i = 0; i < 8; i++) { + if (!pin_number_is_free(data_pin + i)) { + mp_raise_ValueError_varg(translate("Bus pin %d is already in use"), i); + } + } + PortGroup *const g = &PORT->Group[data0->number % 32]; + g->DIRSET.reg = 0xff << data_pin; + self->bus = ((uint8_t*) &g->OUT.reg) + (data0->number % 32 / 8); + + self->command.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->command, command); + common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL); + + self->chip_select.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select); + common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL); + + self->reset.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->reset, reset); + common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); + + self->write.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->write, write); + common_hal_digitalio_digitalinout_switch_to_output(&self->write, true, DRIVE_MODE_PUSH_PULL); + + never_reset_pin_number(command->number); + never_reset_pin_number(chip_select->number); + never_reset_pin_number(reset->number); + never_reset_pin_number(write->number); + for (uint8_t i = 0; i < 8; i++) { + never_reset_pin_number(data_pin + i); + } +} + +bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { + displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); + return true; +} + +void common_hal_displayio_parallelbus_send(mp_obj_t obj, bool command, uint8_t *data, uint32_t data_length) { + displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + common_hal_digitalio_digitalinout_set_value(&self->command, !command); + for (uint32_t i = 0; i < data_length; i++) { + common_hal_digitalio_digitalinout_set_value(&self->write, false); + *self->bus = data[i]; + common_hal_digitalio_digitalinout_set_value(&self->write, true); + } +} + +void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { + displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); +} diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.h b/ports/atmel-samd/common-hal/displayio/ParallelBus.h new file mode 100644 index 000000000..cc45598c5 --- /dev/null +++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.h @@ -0,0 +1,41 @@ +/* + * 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. + */ + +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELBUS_H + +#include "common-hal/digitalio/DigitalInOut.h" + +typedef struct { + mp_obj_base_t base; + uint8_t* bus; + digitalio_digitalinout_obj_t command; + digitalio_digitalinout_obj_t chip_select; + digitalio_digitalinout_obj_t reset; + digitalio_digitalinout_obj_t write; +} displayio_parallelbus_obj_t; + +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELBUS_H diff --git a/ports/atmel-samd/common-hal/microcontroller/Pin.c b/ports/atmel-samd/common-hal/microcontroller/Pin.c index 7dd9c6b09..7d0d97758 100644 --- a/ports/atmel-samd/common-hal/microcontroller/Pin.c +++ b/ports/atmel-samd/common-hal/microcontroller/Pin.c @@ -169,6 +169,20 @@ void claim_pin(const mcu_pin_obj_t* pin) { #endif } +bool pin_number_is_free(uint8_t pin_number) { + PortGroup *const port = &PORT->Group[(enum gpio_port)GPIO_PORT(pin_number)]; + uint8_t pin_index = GPIO_PIN(pin_number); + volatile PORT_PINCFG_Type *state = &port->PINCFG[pin_index]; + volatile PORT_PMUX_Type *pmux = &port->PMUX[pin_index / 2]; + + if (pin_number == PIN_PA30 || pin_number == PIN_PA31) { + return state->bit.PMUXEN == 1 && ((pmux->reg >> (4 * pin_index % 2)) & 0xf) == 0x6; + } + + return state->bit.PMUXEN == 0 && state->bit.INEN == 0 && + state->bit.PULLEN == 0 && (port->DIR.reg & (1 << pin_index)) == 0; +} + bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t* pin) { #ifdef MICROPY_HW_NEOPIXEL if (pin == MICROPY_HW_NEOPIXEL) { @@ -190,15 +204,5 @@ bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t* pin) { } #endif - PortGroup *const port = &PORT->Group[(enum gpio_port)GPIO_PORT(pin->number)]; - uint8_t pin_index = GPIO_PIN(pin->number); - volatile PORT_PINCFG_Type *state = &port->PINCFG[pin_index]; - volatile PORT_PMUX_Type *pmux = &port->PMUX[pin_index / 2]; - - if (pin->number == PIN_PA30 || pin->number == PIN_PA31) { - return state->bit.PMUXEN == 1 && ((pmux->reg >> (4 * pin_index % 2)) & 0xf) == 0x6; - } - - return state->bit.PMUXEN == 0 && state->bit.INEN == 0 && - state->bit.PULLEN == 0 && (port->DIR.reg & (1 << pin_index)) == 0; + return pin_number_is_free(pin->number); } diff --git a/ports/atmel-samd/common-hal/microcontroller/Pin.h b/ports/atmel-samd/common-hal/microcontroller/Pin.h index f798ea300..14887207a 100644 --- a/ports/atmel-samd/common-hal/microcontroller/Pin.h +++ b/ports/atmel-samd/common-hal/microcontroller/Pin.h @@ -45,5 +45,6 @@ void reset_all_pins(void); void reset_pin_number(uint8_t pin_number); void never_reset_pin_number(uint8_t pin_number); void claim_pin(const mcu_pin_obj_t* pin); +bool pin_number_is_free(uint8_t pin_number); #endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_MICROCONTROLLER_PIN_H diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 941838618..7e7e894cb 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -60,7 +60,6 @@ #include "samd/external_interrupts.h" #include "samd/dma.h" #include "shared-bindings/rtc/__init__.h" -#include "board_busses.h" #include "reset.h" #include "tick.h" @@ -226,8 +225,6 @@ void reset_port(void) { reset_all_pins(); - reset_board_busses(); - // Output clocks for debugging. // not supported by SAMD51G; uncomment for SAMD51J or update for 51G // #ifdef SAMD51 diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c new file mode 100644 index 000000000..5db470417 --- /dev/null +++ b/shared-bindings/displayio/Display.c @@ -0,0 +1,149 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/displayio/Display.h" + +#include + +#include "lib/utils/context_manager_helpers.h" +#include "py/binary.h" +#include "py/objproperty.h" +#include "py/runtime.h" +#include "shared-bindings/displayio/Group.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/util.h" +#include "shared-module/displayio/__init__.h" +#include "supervisor/shared/translate.h" + +//| .. currentmodule:: displayio +//| +//| :class:`FourWire` -- Manage updating a display over SPI four wire protocol +//| ========================================================================== +//| +//| Manage updating a display over SPI four wire protocol in the background while Python code runs. +//| It doesn't handle display initialization. +//| +//| .. warning:: This will be changed before 4.0.0. Consider it very experimental. +//| +//| .. class:: Display(display_bus, *, width, height, colstart=0, rowstart=0, color_depth=16, +//| set_column_command=0x2a set_row_command=0x2b, write_ram_command=0x2c) +//| +//| Create a FourWire object associated with the given pins. +//| +STATIC mp_obj_t displayio_display_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_display_bus, ARG_init_sequence, ARG_width, ARG_height, ARG_colstart, ARG_rowstart, ARG_color_depth, ARG_set_column_command, ARG_set_row_command, ARG_write_ram_command }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_display_bus, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_init_sequence, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_width, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = -1} }, + { MP_QSTR_height, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = -1} }, + { MP_QSTR_colstart, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, + { MP_QSTR_rowstart, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, + { MP_QSTR_color_depth, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 16} }, + { MP_QSTR_set_column_command, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0x2a} }, + { MP_QSTR_set_row_command, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0x2b} }, + { MP_QSTR_write_ram_command, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0x2c} }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mp_obj_t display_bus = args[ARG_display_bus].u_obj; + + mp_int_t width = args[ARG_width].u_int; + mp_int_t height = args[ARG_height].u_int; + if (width == -1 || height == -1) { + mp_raise_ValueError(translate("Width and height kwargs required")); + } + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(args[ARG_init_sequence].u_obj, &bufinfo, MP_BUFFER_READ); + + displayio_display_obj_t *self; + if (display_bus == &primary_display.fourwire_bus) { + self = &primary_display.display; + } else { + self = m_new_obj(displayio_display_obj_t); + } + self->base.type = &displayio_display_type; + common_hal_displayio_display_construct(self, + display_bus, width, height, args[ARG_colstart].u_int, args[ARG_rowstart].u_int, + args[ARG_color_depth].u_int, args[ARG_set_column_command].u_int, args[ARG_set_row_command].u_int, + args[ARG_write_ram_command].u_int, bufinfo.buf, bufinfo.len); + + return self; +} + +//| .. method:: show(group) +//| +//| Switches to displaying the given group of layers. +//| +STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in) { + displayio_display_obj_t *self = MP_OBJ_TO_PTR(self_in); + mp_obj_t native_layer = mp_instance_cast_to_native_base(group_in, &displayio_group_type); + if (native_layer == MP_OBJ_NULL) { + mp_raise_ValueError(translate("Must be a Group subclass.")); + } + displayio_group_t* group = MP_OBJ_TO_PTR(native_layer); + common_hal_displayio_display_show(self, group); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_show_obj, displayio_display_obj_show); + +//| .. method:: refresh_soon() +//| +//| Queues up a display refresh that happens in the background. +//| +STATIC mp_obj_t displayio_display_obj_refresh_soon(mp_obj_t self_in) { + displayio_display_obj_t *self = MP_OBJ_TO_PTR(self_in); + common_hal_displayio_display_refresh_soon(self); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_refresh_soon_obj, displayio_display_obj_refresh_soon); + +//| .. method:: wait_for_frame() +//| +//| Waits until the next frame has been transmitted to the display unless the wait count is +//| behind the rendered frames. In that case, this will return immediately with the wait count. +//| +STATIC mp_obj_t displayio_display_obj_wait_for_frame(mp_obj_t self_in) { + displayio_display_obj_t *self = MP_OBJ_TO_PTR(self_in); + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_display_wait_for_frame(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_wait_for_frame_obj, displayio_display_obj_wait_for_frame); + + +STATIC const mp_rom_map_elem_t displayio_display_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&displayio_display_show_obj) }, + { MP_ROM_QSTR(MP_QSTR_refresh_soon), MP_ROM_PTR(&displayio_display_refresh_soon_obj) }, + { MP_ROM_QSTR(MP_QSTR_wait_for_frame), MP_ROM_PTR(&displayio_display_wait_for_frame_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(displayio_display_locals_dict, displayio_display_locals_dict_table); + +const mp_obj_type_t displayio_display_type = { + { &mp_type_type }, + .name = MP_QSTR_Display, + .make_new = displayio_display_make_new, + .locals_dict = (mp_obj_dict_t*)&displayio_display_locals_dict, +}; diff --git a/shared-bindings/displayio/Display.h b/shared-bindings/displayio/Display.h new file mode 100644 index 000000000..4cec66058 --- /dev/null +++ b/shared-bindings/displayio/Display.h @@ -0,0 +1,59 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017, 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_DISPLAY_H +#define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_DISPLAY_H + +#include "common-hal/microcontroller/Pin.h" + +#include "shared-module/displayio/Display.h" +#include "shared-module/displayio/Group.h" + +extern const mp_obj_type_t displayio_display_type; + +#define DELAY 0x80 + +void common_hal_displayio_display_construct(displayio_display_obj_t* self, + mp_obj_t bus, uint16_t width, uint16_t height, + int16_t colstart, int16_t rowstart, uint16_t color_depth, + uint8_t set_column_command, uint8_t set_row_command, uint8_t write_ram_command, + uint8_t* init_sequence, uint16_t init_sequence_len); + +int32_t common_hal_displayio_display_wait_for_frame(displayio_display_obj_t* self); + +void common_hal_displayio_display_show(displayio_display_obj_t* self, displayio_group_t* root_group); + +void common_hal_displayio_display_refresh_soon(displayio_display_obj_t* self); + +void displayio_display_start_region_update(displayio_display_obj_t* self, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1); +void displayio_display_finish_region_update(displayio_display_obj_t* self); +bool displayio_display_frame_queued(displayio_display_obj_t* self); + +bool displayio_display_refresh_queued(displayio_display_obj_t* self); +void displayio_display_finish_refresh(displayio_display_obj_t* self); +bool displayio_display_send_pixels(displayio_display_obj_t* self, uint32_t* pixels, uint32_t length); + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_DISPLAY_H diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c index 80aa814df..674d1c900 100644 --- a/shared-bindings/displayio/FourWire.c +++ b/shared-bindings/displayio/FourWire.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2018-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 @@ -35,6 +35,7 @@ #include "shared-bindings/displayio/Group.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/util.h" +#include "shared-module/displayio/__init__.h" #include "supervisor/shared/translate.h" //| .. currentmodule:: displayio @@ -47,14 +48,44 @@ //| //| .. warning:: This will be changed before 4.0.0. Consider it very experimental. //| -//| .. class:: FourWire(*, clock, data, command, chip_select, width, height, colstart, rowstart, -//| color_depth, set_column_command, set_row_command, write_ram_command) +//| .. class:: FourWire(spi_bus, *, command, chip_select, reset) //| //| Create a FourWire object associated with the given pins. //| 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) { - mp_raise_NotImplementedError(translate("displayio is a work in progress")); - return mp_const_none; + enum { ARG_spi_bus, ARG_command, ARG_chip_select, ARG_reset }; + 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, {.u_obj = mp_const_none} }, + { MP_QSTR_chip_select, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_reset, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mp_obj_t command = args[ARG_command].u_obj; + mp_obj_t chip_select = args[ARG_chip_select].u_obj; + mp_obj_t reset = args[ARG_reset].u_obj; + if (command == mp_const_none || chip_select == mp_const_none) { + mp_raise_ValueError(translate("Command and chip_select required")); + } + + displayio_fourwire_obj_t* self; + mp_obj_t spi = args[ARG_spi_bus].u_obj; + if (board_spi() == spi && primary_display.bus_type == NULL) { + self = &primary_display.fourwire_bus; + primary_display.bus_type = &displayio_fourwire_type; + } else { + // TODO(tannewt): Always check pin free. For now we ignore the primary display. + assert_pin_free(command); + assert_pin_free(chip_select); + assert_pin_free(reset); + self = m_new_obj(displayio_fourwire_obj_t); + } + + common_hal_displayio_fourwire_construct(self, + MP_OBJ_TO_PTR(spi), command, chip_select, reset); + return self; } @@ -68,50 +99,8 @@ STATIC mp_obj_t displayio_fourwire_obj_send(size_t n_args, const mp_obj_t *pos_a } MP_DEFINE_CONST_FUN_OBJ_KW(displayio_fourwire_send_obj, 1, displayio_fourwire_obj_send); -//| .. method:: show(group) -//| -//| Switches do displaying the given group of elements. -//| -STATIC mp_obj_t displayio_fourwire_obj_show(mp_obj_t self_in, mp_obj_t group_in) { - displayio_fourwire_obj_t *self = MP_OBJ_TO_PTR(self_in); - mp_obj_t native_layer = mp_instance_cast_to_native_base(group_in, &displayio_group_type); - if (native_layer == MP_OBJ_NULL) { - mp_raise_ValueError(translate("Must be a Group subclass.")); - } - displayio_group_t* group = MP_OBJ_TO_PTR(native_layer); - common_hal_displayio_fourwire_show(self, group); - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_2(displayio_fourwire_show_obj, displayio_fourwire_obj_show); - -//| .. method:: refresh_soon() -//| -//| Queues up a display refresh that happens in the background. -//| -STATIC mp_obj_t displayio_fourwire_obj_refresh_soon(mp_obj_t self_in) { - displayio_fourwire_obj_t *self = MP_OBJ_TO_PTR(self_in); - common_hal_displayio_fourwire_refresh_soon(self); - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_1(displayio_fourwire_refresh_soon_obj, displayio_fourwire_obj_refresh_soon); - -//| .. method:: wait_for_frame() -//| -//| Waits until the next frame has been transmitted to the display unless the wait count is -//| behind the rendered frames. In that case, this will return immediately with the wait count. -//| -STATIC mp_obj_t displayio_fourwire_obj_wait_for_frame(mp_obj_t self_in) { - displayio_fourwire_obj_t *self = MP_OBJ_TO_PTR(self_in); - return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_fourwire_wait_for_frame(self)); -} -MP_DEFINE_CONST_FUN_OBJ_1(displayio_fourwire_wait_for_frame_obj, displayio_fourwire_obj_wait_for_frame); - - STATIC const mp_rom_map_elem_t displayio_fourwire_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&displayio_fourwire_send_obj) }, - { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&displayio_fourwire_show_obj) }, - { MP_ROM_QSTR(MP_QSTR_refresh_soon), MP_ROM_PTR(&displayio_fourwire_refresh_soon_obj) }, - { MP_ROM_QSTR(MP_QSTR_wait_for_frame), MP_ROM_PTR(&displayio_fourwire_wait_for_frame_obj) }, }; STATIC MP_DEFINE_CONST_DICT(displayio_fourwire_locals_dict, displayio_fourwire_locals_dict_table); diff --git a/shared-bindings/displayio/FourWire.h b/shared-bindings/displayio/FourWire.h index fc51f558d..a9e1bf566 100644 --- a/shared-bindings/displayio/FourWire.h +++ b/shared-bindings/displayio/FourWire.h @@ -31,35 +31,18 @@ #include "common-hal/microcontroller/Pin.h" #include "shared-module/displayio/Group.h" +#include "supervisor/shared/board_busses.h" extern const mp_obj_type_t displayio_fourwire_type; -// TODO(tannewt): Split this apart into FourWire and a Display object because the dimensions and -// commands are also used for the parallel buses. void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, - const mcu_pin_obj_t* clock, const mcu_pin_obj_t* data, const mcu_pin_obj_t* command, - const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, uint16_t width, uint16_t height, - int16_t colstart, int16_t rowstart, uint16_t color_depth, - uint8_t set_column_command, uint8_t set_row_command, uint8_t write_ram_command); + busio_spi_obj_t* spi, const mcu_pin_obj_t* command, + const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset); -int32_t common_hal_displayio_fourwire_wait_for_frame(displayio_fourwire_obj_t* self); +bool common_hal_displayio_fourwire_begin_transaction(mp_obj_t self); -bool common_hal_displayio_fourwire_begin_transaction(displayio_fourwire_obj_t* self); +void common_hal_displayio_fourwire_send(mp_obj_t self, bool command, uint8_t *data, uint32_t data_length); -void common_hal_displayio_fourwire_send(displayio_fourwire_obj_t* self, bool command, uint8_t *data, uint32_t data_length); - -void common_hal_displayio_fourwire_end_transaction(displayio_fourwire_obj_t* self); - -void common_hal_displayio_fourwire_show(displayio_fourwire_obj_t* self, displayio_group_t* root_group); - -void common_hal_displayio_fourwire_refresh_soon(displayio_fourwire_obj_t* self); - -void displayio_fourwire_start_region_update(displayio_fourwire_obj_t* self, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1); -void displayio_fourwire_finish_region_update(displayio_fourwire_obj_t* self); -bool displayio_fourwire_frame_queued(displayio_fourwire_obj_t* self); - -bool displayio_fourwire_refresh_queued(displayio_fourwire_obj_t* self); -void displayio_fourwire_finish_refresh(displayio_fourwire_obj_t* self); -bool displayio_fourwire_send_pixels(displayio_fourwire_obj_t* self, uint32_t* pixels, uint32_t length); +void common_hal_displayio_fourwire_end_transaction(mp_obj_t self); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_FOURWIRE_H diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c new file mode 100644 index 000000000..dddb4ce8a --- /dev/null +++ b/shared-bindings/displayio/ParallelBus.c @@ -0,0 +1,79 @@ +/* + * This file is part of the Micro Python 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 "shared-bindings/displayio/ParallelBus.h" + +#include + +#include "lib/utils/context_manager_helpers.h" +#include "py/binary.h" +#include "py/objproperty.h" +#include "py/runtime.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/util.h" +#include "supervisor/shared/translate.h" + +//| .. currentmodule:: displayio +//| +//| :class:`ParallelBus` -- Manage updating a display over SPI four wire protocol +//| ========================================================================== +//| +//| Manage updating a display over SPI four wire protocol in the background while Python code runs. +//| It doesn't handle display initialization. +//| +//| .. warning:: This will be changed before 4.0.0. Consider it very experimental. +//| +//| .. class:: ParallelBus(*, data0, command, chip_select, reset, write, bus_width=8) +//| +//| Create a ParallelBus object associated with the given pins. +//| +STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + mp_raise_NotImplementedError(translate("displayio is a work in progress")); + return mp_const_none; +} + + +//| .. method:: send(command, data) +//| +//| +STATIC mp_obj_t displayio_parallelbus_obj_send(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + mp_raise_NotImplementedError(translate("displayio is a work in progress")); + + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_KW(displayio_parallelbus_send_obj, 1, displayio_parallelbus_obj_send); + +STATIC const mp_rom_map_elem_t displayio_parallelbus_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&displayio_parallelbus_send_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(displayio_parallelbus_locals_dict, displayio_parallelbus_locals_dict_table); + +const mp_obj_type_t displayio_parallelbus_type = { + { &mp_type_type }, + .name = MP_QSTR_ParallelBus, + .make_new = displayio_parallelbus_make_new, + .locals_dict = (mp_obj_dict_t*)&displayio_parallelbus_locals_dict, +}; diff --git a/shared-bindings/displayio/ParallelBus.h b/shared-bindings/displayio/ParallelBus.h new file mode 100644 index 000000000..f1d1656b1 --- /dev/null +++ b/shared-bindings/displayio/ParallelBus.h @@ -0,0 +1,47 @@ +/* + * This file is part of the Micro Python 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. + */ + +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELBUS_H +#define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELBUS_H + +#include "common-hal/displayio/ParallelBus.h" +#include "common-hal/microcontroller/Pin.h" + +#include "shared-module/displayio/Group.h" + +extern const mp_obj_type_t displayio_parallelbus_type; + +void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, + const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, + const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, const mcu_pin_obj_t* write); + +bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t self); + +void common_hal_displayio_parallelbus_send(mp_obj_t self, bool command, uint8_t *data, uint32_t data_length); + +void common_hal_displayio_parallelbus_end_transaction(mp_obj_t self); + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELBUS_H diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c new file mode 100644 index 000000000..0a14e74bb --- /dev/null +++ b/shared-module/displayio/Display.c @@ -0,0 +1,149 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/displayio/Display.h" + +#include "py/runtime.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-bindings/displayio/ParallelBus.h" + +#include + +#include "tick.h" + +#define DELAY 0x80 + +void common_hal_displayio_display_construct(displayio_display_obj_t* self, + mp_obj_t bus, uint16_t width, uint16_t height, int16_t colstart, int16_t rowstart, + uint16_t color_depth, uint8_t set_column_command, uint8_t set_row_command, + uint8_t write_ram_command, uint8_t* init_sequence, uint16_t init_sequence_len) { + self->width = width; + self->height = height; + self->color_depth = color_depth; + self->set_column_command = set_column_command; + self->set_row_command = set_row_command; + self->write_ram_command = write_ram_command; + self->current_group = NULL; + self->colstart = colstart; + self->rowstart = rowstart; + + if (MP_OBJ_IS_TYPE(bus, &displayio_parallelbus_type)) { + self->begin_transaction = common_hal_displayio_parallelbus_begin_transaction; + self->send = common_hal_displayio_parallelbus_send; + self->end_transaction = common_hal_displayio_parallelbus_end_transaction; + } else if (MP_OBJ_IS_TYPE(bus, &displayio_fourwire_type)) { + self->begin_transaction = common_hal_displayio_fourwire_begin_transaction; + self->send = common_hal_displayio_fourwire_send; + self->end_transaction = common_hal_displayio_fourwire_end_transaction; + } else { + mp_raise_ValueError(translate("Unsupported display bus type")); + } + self->bus = bus; + + uint32_t i = 0; + self->begin_transaction(self->bus); + while (i < init_sequence_len) { + uint8_t *cmd = init_sequence + i; + uint8_t data_size = *(cmd + 1); + bool delay = (data_size & DELAY) != 0; + data_size &= ~DELAY; + uint8_t *data = cmd + 2; + self->send(self->bus, true, cmd, 1); + self->send(self->bus, false, data, data_size); + if (delay) { + data_size++; + uint16_t delay_length_ms = *(cmd + 1 + data_size); + if (delay_length_ms == 255) { + delay_length_ms = 500; + } + uint64_t start = ticks_ms; + while (ticks_ms - start < delay_length_ms) {} + } else { + uint64_t start = ticks_ms; + while (ticks_ms - start < 10) {} + } + i += 2 + data_size; + } + self->end_transaction(self->bus); +} + +void common_hal_displayio_display_show(displayio_display_obj_t* self, displayio_group_t* root_group) { + self->current_group = root_group; + common_hal_displayio_display_refresh_soon(self); +} + +void common_hal_displayio_display_refresh_soon(displayio_display_obj_t* self) { + self->refresh = true; +} + +int32_t common_hal_displayio_display_wait_for_frame(displayio_display_obj_t* self) { + uint64_t last_refresh = self->last_refresh; + while (last_refresh == self->last_refresh) { + MICROPY_VM_HOOK_LOOP + } + return 0; +} + +void displayio_display_start_region_update(displayio_display_obj_t* self, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) { + // TODO(tannewt): Handle displays with single byte bounds. + self->begin_transaction(self->bus); + uint16_t data[2]; + self->send(self->bus, true, &self->set_column_command, 1); + data[0] = __builtin_bswap16(x0 + self->colstart); + data[1] = __builtin_bswap16(x1 + self->colstart); + self->send(self->bus, false, (uint8_t*) data, 4); + self->send(self->bus, true, &self->set_row_command, 1); + data[0] = __builtin_bswap16(y0 + self->rowstart); + data[1] = __builtin_bswap16(y1 + self->rowstart); + self->send(self->bus, false, (uint8_t*) data, 4); + self->send(self->bus, true, &self->write_ram_command, 1); +} + +void displayio_display_finish_region_update(displayio_display_obj_t* self) { + self->end_transaction(self->bus); +} + +bool displayio_display_frame_queued(displayio_display_obj_t* self) { + // Refresh at ~30 fps. + return (ticks_ms - self->last_refresh) > 32; +} + +bool displayio_display_refresh_queued(displayio_display_obj_t* self) { + return self->refresh || (self->current_group != NULL && displayio_group_needs_refresh(self->current_group)); +} + +void displayio_display_finish_refresh(displayio_display_obj_t* self) { + if (self->current_group != NULL) { + displayio_group_finish_refresh(self->current_group); + } + self->refresh = false; + self->last_refresh = ticks_ms; +} + +bool displayio_display_send_pixels(displayio_display_obj_t* self, uint32_t* pixels, uint32_t length) { + self->send(self->bus, false, (uint8_t*) pixels, length * 4); + return true; +} diff --git a/shared-module/displayio/Display.h b/shared-module/displayio/Display.h new file mode 100644 index 000000000..1f1355d31 --- /dev/null +++ b/shared-module/displayio/Display.h @@ -0,0 +1,55 @@ +/* + * 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. + */ + +#ifndef MICROPY_INCLUDED_SHARED_MODULE_DISPLAYIO_DISPLAY_H +#define MICROPY_INCLUDED_SHARED_MODULE_DISPLAYIO_DISPLAY_H + +#include "shared-module/displayio/Group.h" + +typedef bool (*display_bus_begin_transaction)(mp_obj_t bus); +typedef void (*display_bus_send)(mp_obj_t bus, bool command, uint8_t *data, uint32_t data_length); +typedef void (*display_bus_end_transaction)(mp_obj_t bus); + +typedef struct { + mp_obj_base_t base; + mp_obj_t bus; + uint16_t width; + uint16_t height; + uint16_t color_depth; + uint8_t set_column_command; + uint8_t set_row_command; + uint8_t write_ram_command; + displayio_group_t *current_group; + bool refresh; + uint64_t last_refresh; + int16_t colstart; + int16_t rowstart; + display_bus_begin_transaction begin_transaction; + display_bus_send send; + display_bus_end_transaction end_transaction; +} displayio_display_obj_t; + +#endif // MICROPY_INCLUDED_SHARED_MODULE_DISPLAYIO_DISPLAY_H diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index f1a00db9f..b528c3289 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -1,44 +1,17 @@ -#include "shared-bindings/displayio/FourWire.h" -extern displayio_fourwire_obj_t board_display_obj; +#include "shared-module/displayio/__init__.h" -void start_region_update(displayio_fourwire_obj_t* display, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) { - // TODO delegate between different display types - displayio_fourwire_start_region_update(display, x0, y0, x1, y1); -} - -void finish_region_update(displayio_fourwire_obj_t* display) { - // TODO delegate between different display types - displayio_fourwire_finish_region_update(display); -} - -void finish_refresh(displayio_fourwire_obj_t* display) { - // TODO delegate between different display types - displayio_fourwire_finish_refresh(display); -} - -bool frame_queued(displayio_fourwire_obj_t* display) { - // TODO delegate between different display types - return displayio_fourwire_frame_queued(display); -} - -bool refresh_queued(displayio_fourwire_obj_t* display) { - // TODO delegate between different display types - return displayio_fourwire_refresh_queued(display); -} +#include "shared-bindings/displayio/Display.h" -bool send_pixels(displayio_fourwire_obj_t* display, uint32_t* pixels, uint32_t length) { - // TODO delegate between different display types - return displayio_fourwire_send_pixels(display, pixels, length); -} +primary_display_t primary_display; void displayio_refresh_display(void) { - displayio_fourwire_obj_t* display = &board_display_obj; + displayio_display_obj_t* display = &primary_display.display; - if (!frame_queued(display)) { + if (!displayio_display_frame_queued(display)) { return; } - if (refresh_queued(display)) { + if (displayio_display_refresh_queued(display)) { PORT->Group[1].DIRSET.reg = 1 << 22; // We compute the pixels @@ -50,7 +23,7 @@ void displayio_refresh_display(void) { //size_t row_size = (x1 - x0); uint16_t buffer_size = 256; uint32_t buffer[buffer_size / 2]; - start_region_update(display, x0, y0, x1, y1); + displayio_display_start_region_update(display, x0, y0, x1, y1); for (uint16_t y = y0; y < y1; ++y) { for (uint16_t x = x0; x < x1; ++x) { uint16_t* pixel = &(((uint16_t*)buffer)[index]); @@ -72,8 +45,8 @@ void displayio_refresh_display(void) { index += 1; // The buffer is full, send it. if (index >= buffer_size) { - if (!send_pixels(display, buffer, buffer_size / 2)) { - finish_region_update(display); + if (!displayio_display_send_pixels(display, buffer, buffer_size / 2)) { + displayio_display_finish_region_update(display); return; } index = 0; @@ -81,11 +54,15 @@ void displayio_refresh_display(void) { } } // Send the remaining data. - if (index && !send_pixels(display, buffer, index * 2)) { - finish_region_update(display); + if (index && !displayio_display_send_pixels(display, buffer, index * 2)) { + displayio_display_finish_region_update(display); return; } - finish_region_update(display); + displayio_display_finish_region_update(display); } - finish_refresh(display); + displayio_display_finish_refresh(display); +} + +void reset_primary_display(void) { + common_hal_displayio_display_show(&primary_display.display, NULL); } diff --git a/shared-module/displayio/__init__.h b/shared-module/displayio/__init__.h index 556af430d..84db98fcc 100644 --- a/shared-module/displayio/__init__.h +++ b/shared-module/displayio/__init__.h @@ -27,6 +27,22 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H #define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H +#include "shared-bindings/displayio/Display.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-bindings/displayio/ParallelBus.h" + +typedef struct { + union { + displayio_fourwire_obj_t fourwire_bus; + displayio_parallelbus_obj_t parallel_bus; + }; + mp_const_obj_t bus_type; + displayio_display_obj_t display; +} primary_display_t; + +extern primary_display_t primary_display; + void displayio_refresh_display(void); +void reset_primary_display(void); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H diff --git a/supervisor/shared/board_busses.c b/supervisor/shared/board_busses.c new file mode 100644 index 000000000..84919ebff --- /dev/null +++ b/supervisor/shared/board_busses.c @@ -0,0 +1,130 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/busio/I2C.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/busio/UART.h" + +#include "shared-bindings/microcontroller/Pin.h" +#include "supervisor/shared/translate.h" +#include "mpconfigboard.h" +#include "samd/pins.h" +#include "py/runtime.h" + +#define BOARD_I2C (defined(DEFAULT_I2C_BUS_SDA) && defined(DEFAULT_I2C_BUS_SCL)) +#define BOARD_SPI (defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MISO) && defined(DEFAULT_SPI_BUS_MOSI)) +#define BOARD_UART (defined(DEFAULT_UART_BUS_RX) && defined(DEFAULT_UART_BUS_TX)) + +#if BOARD_I2C +STATIC mp_obj_t i2c_singleton = NULL; + +STATIC mp_obj_t board_i2c(void) { + + if (i2c_singleton == NULL) { + busio_i2c_obj_t *self = m_new_obj(busio_i2c_obj_t); + self->base.type = &busio_i2c_type; + + assert_pin_free(DEFAULT_I2C_BUS_SDA); + assert_pin_free(DEFAULT_I2C_BUS_SCL); + common_hal_busio_i2c_construct(self, DEFAULT_I2C_BUS_SCL, DEFAULT_I2C_BUS_SDA, 400000, 0); + i2c_singleton = (mp_obj_t)self; + } + return i2c_singleton; +} +#else +STATIC mp_obj_t board_i2c(void) { + mp_raise_NotImplementedError(translate("No default I2C bus")); + return NULL; +} +#endif +MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c); + +#if BOARD_SPI +STATIC busio_spi_obj_t spi_obj; +STATIC mp_obj_t spi_singleton = NULL; + +mp_obj_t board_spi(void) { + if (spi_singleton == NULL) { + busio_spi_obj_t *self = &spi_obj; + self->base.type = &busio_spi_type; + assert_pin_free(DEFAULT_SPI_BUS_SCK); + assert_pin_free(DEFAULT_SPI_BUS_MOSI); + assert_pin_free(DEFAULT_SPI_BUS_MISO); + const mcu_pin_obj_t* clock = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_SCK); + const mcu_pin_obj_t* mosi = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MOSI); + const mcu_pin_obj_t* miso = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MISO); + common_hal_busio_spi_construct(self, clock, mosi, miso); + spi_singleton = (mp_obj_t)self; + } + return spi_singleton; +} +#else +mp_obj_t board_spi(void) { + mp_raise_NotImplementedError(translate("No default SPI bus")); + return NULL; +} +#endif +MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi); + +#if BOARD_UART +STATIC mp_obj_t uart_singleton = NULL; + +STATIC mp_obj_t board_uart(void) { + if (uart_singleton == NULL) { + busio_uart_obj_t *self = m_new_obj(busio_uart_obj_t); + self->base.type = &busio_uart_type; + + assert_pin_free(DEFAULT_UART_BUS_RX); + assert_pin_free(DEFAULT_UART_BUS_TX); + + const mcu_pin_obj_t* rx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RX); + const mcu_pin_obj_t* tx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_TX); + + common_hal_busio_uart_construct(self, tx, rx, 9600, 8, PARITY_NONE, 1, 1000, 64); + uart_singleton = (mp_obj_t)self; + } + return uart_singleton; +} +#else +STATIC mp_obj_t board_uart(void) { + mp_raise_NotImplementedError(translate("No default UART bus")); + return NULL; +} +#endif +MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart); + + +void reset_board_busses(void) { +#if BOARD_I2C + i2c_singleton = NULL; +#endif +#if BOARD_SPI + spi_singleton = NULL; +#endif +#if BOARD_UART + uart_singleton = NULL; +#endif +} diff --git a/supervisor/shared/board_busses.h b/supervisor/shared/board_busses.h new file mode 100644 index 000000000..f6a8a4296 --- /dev/null +++ b/supervisor/shared/board_busses.h @@ -0,0 +1,43 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SUPERVISOR_SHARED_BOARD_BUSSES_H +#define MICROPY_INCLUDED_SUPERVISOR_SHARED_BOARD_BUSSES_H + +#include "py/obj.h" + +mp_obj_t board_i2c(void); +extern mp_obj_fun_builtin_fixed_t board_i2c_obj; + +mp_obj_t board_spi(void); +extern mp_obj_fun_builtin_fixed_t board_spi_obj; + +mp_obj_t board_uart(void); +extern mp_obj_fun_builtin_fixed_t board_uart_obj; + +void reset_board_busses(void); + +#endif // MICROPY_INCLUDED_SUPERVISOR_SHARED_BOARD_BUSSES_H diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 191af7b25..0bbfd9141 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -2,6 +2,7 @@ SRC_SUPERVISOR = \ main.c \ supervisor/port.c \ supervisor/shared/autoreload.c \ + supervisor/shared/board_busses.c \ supervisor/shared/filesystem.c \ supervisor/shared/flash.c \ supervisor/shared/micropython.c \ -- cgit v1.2.3 From 7a33e588d40e01862b60d6f0b9d2880ad19be030 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 16 Jan 2019 20:41:01 -0500 Subject: Put back native C UUID string parsing and printing (complete rewrite) --- shared-bindings/bleio/UUID.c | 70 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/shared-bindings/bleio/UUID.c b/shared-bindings/bleio/UUID.c index f2df9d095..8b868a1ae 100644 --- a/shared-bindings/bleio/UUID.c +++ b/shared-bindings/bleio/UUID.c @@ -70,20 +70,51 @@ STATIC mp_obj_t bleio_uuid_make_new(const mp_obj_type_t *type, size_t n_args, co common_hal_bleio_uuid_construct(self, uuid16, NULL); } else { - mp_buffer_info_t bufinfo; - if (!mp_get_buffer(value, &bufinfo, MP_BUFFER_READ)) { - mp_raise_ValueError(translate("UUID value is not int or byte buffer")); - } + if (MP_OBJ_IS_STR(value)) { + // 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' + GET_STR_DATA_LEN(value, chars, len); + char hex[32]; + // Validate length, hyphens, and hex digits. + bool good_uuid = + len == 36 && chars[8] == '-' && chars[13] == '-' && chars[18] == '-' && chars[23] == '-'; + if (good_uuid) { + size_t hex_idx = 0; + for (int i = 0; i < len; i++) { + if (unichar_isxdigit(chars[i])) { + hex[hex_idx] = chars[i]; + hex_idx++; + } + } + good_uuid = hex_idx == 32; + } + if (!good_uuid) { + mp_raise_ValueError(translate("UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'")); + } + + size_t hex_idx = 0; + for (int i = 15; i >= 0; i--) { + uuid128[i] = (unichar_xdigit_value(hex[hex_idx]) << 4) | unichar_xdigit_value(hex[hex_idx + 1]); + hex_idx += 2; + } + } else { + // Last possibility is that it's a buf. + mp_buffer_info_t bufinfo; + if (!mp_get_buffer(value, &bufinfo, MP_BUFFER_READ)) { + mp_raise_ValueError(translate("UUID value is not str, int or byte buffer")); + } - if (bufinfo.len != 16) { - mp_raise_ValueError(translate("Byte buffer must be 16 bytes.")); + if (bufinfo.len != 16) { + mp_raise_ValueError(translate("Byte buffer must be 16 bytes.")); + } + + memcpy(uuid128, bufinfo.buf, 16); } - memcpy(uuid128, bufinfo.buf, 16); + // Str and bytes both get constructed the same way here. uint32_t uuid16 = (uuid128[13] << 8) | uuid128[12]; uuid128[12] = 0; uuid128[13] = 0; - common_hal_bleio_uuid_construct(self, uuid16, bufinfo.buf); + common_hal_bleio_uuid_construct(self, uuid16, uuid128); } return MP_OBJ_FROM_PTR(self); @@ -200,9 +231,32 @@ STATIC mp_obj_t bleio_uuid_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_ } } +void bleio_uuid_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { + bleio_uuid_obj_t *self = MP_OBJ_TO_PTR(self_in); + uint32_t size = common_hal_bleio_uuid_get_size(self); + if (size == 16) { + mp_printf(print, "UUID(0x%04x)", common_hal_bleio_uuid_get_uuid16(self)); + } else { + uint8_t uuid128[16]; + (void) common_hal_bleio_uuid_get_uuid128(self, uuid128); + mp_printf(print, "UUID('" + "%02x%02x%02x%02x-" + "%02x%02x-" + "%02x%02x-" + "%02x%02x-" + "%02x%02x%02x%02x%02x%02x')", + uuid128[15], uuid128[14], uuid128[13], uuid128[12], + uuid128[11], uuid128[10], + uuid128[9], uuid128[8], + uuid128[7], uuid128[6], + uuid128[5], uuid128[4], uuid128[3], uuid128[2], uuid128[1], uuid128[0]); + } +} + const mp_obj_type_t bleio_uuid_type = { { &mp_type_type }, .name = MP_QSTR_UUID, + .print = bleio_uuid_print, .make_new = bleio_uuid_make_new, .unary_op = bleio_uuid_unary_op, .binary_op = bleio_uuid_binary_op, -- cgit v1.2.3 From 84292ad89070f1994ed09b59c8a693216a40cd89 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 00:20:16 -0800 Subject: External fourwire works and blinka splash after --- main.c | 2 +- ports/atmel-samd/background.c | 2 +- .../boards/grandcentral_m4_express/mpconfigboard.h | 2 + .../boards/grandcentral_m4_express/pins.c | 2 +- ports/atmel-samd/boards/pyportal/mpconfigboard.h | 2 +- ports/atmel-samd/boards/pyportal/pins.c | 4 +- ports/atmel-samd/common-hal/busio/SPI.c | 13 ++ ports/atmel-samd/common-hal/displayio/FourWire.c | 10 + ports/atmel-samd/common-hal/displayio/FourWire.h | 1 + ports/atmel-samd/common-hal/microcontroller/Pin.c | 2 + shared-bindings/displayio/Display.c | 23 ++- shared-bindings/displayio/FourWire.c | 23 ++- shared-bindings/displayio/FourWire.h | 2 + shared-bindings/displayio/ParallelBus.h | 2 + shared-bindings/displayio/__init__.c | 16 ++ shared-bindings/displayio/__init__.h | 4 +- shared-module/displayio/__init__.c | 220 ++++++++++++++++----- shared-module/displayio/__init__.h | 7 +- 18 files changed, 255 insertions(+), 82 deletions(-) diff --git a/main.c b/main.c index d328fcaa4..02c832e67 100755 --- a/main.c +++ b/main.c @@ -201,7 +201,7 @@ bool run_code_py(safe_mode_t safe_mode) { } } // Turn off the display before the heap disappears. - reset_primary_display(); + reset_displays(); stop_mp(); free_memory(heap); diff --git a/ports/atmel-samd/background.c b/ports/atmel-samd/background.c index 439877d2e..59e03008a 100644 --- a/ports/atmel-samd/background.c +++ b/ports/atmel-samd/background.c @@ -44,7 +44,7 @@ void run_background_tasks(void) { audio_dma_background(); #endif #ifdef CIRCUITPY_DISPLAYIO - displayio_refresh_display(); + displayio_refresh_displays(); #endif #if MICROPY_PY_NETWORK diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h index e1bef0019..465c51b4a 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h @@ -46,3 +46,5 @@ #define IGNORE_PIN_PA25 1 #define CIRCUITPY_I2CSLAVE +#define CIRCUITPY_DISPLAYIO (1) +#define CIRCUITPY_DISPLAY_LIMIT (3) diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c index 081bb701e..0d19a63ef 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c +++ b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from diff --git a/ports/atmel-samd/boards/pyportal/mpconfigboard.h b/ports/atmel-samd/boards/pyportal/mpconfigboard.h index 847e2ba76..f02d4a372 100644 --- a/ports/atmel-samd/boards/pyportal/mpconfigboard.h +++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.h @@ -13,7 +13,7 @@ // QSPI Data pins #define MICROPY_PORT_A ( PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 ) // QSPI CS, and QSPI SCK -#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 ) +#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 | PORT_PB22 ) #define MICROPY_PORT_C ( 0 ) #define MICROPY_PORT_D (0) diff --git a/ports/atmel-samd/boards/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c index ddb8fa08a..4ddc10e52 100644 --- a/ports/atmel-samd/boards/pyportal/pins.c +++ b/ports/atmel-samd/boards/pyportal/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" #include "boards/board.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from @@ -72,7 +72,5 @@ STATIC const mp_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, - - { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&board_display_obj)} }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/common-hal/busio/SPI.c b/ports/atmel-samd/common-hal/busio/SPI.c index 68382d405..8fb831a69 100644 --- a/ports/atmel-samd/common-hal/busio/SPI.c +++ b/ports/atmel-samd/common-hal/busio/SPI.c @@ -54,6 +54,17 @@ void never_reset_sercom(Sercom* sercom) { } } +void allow_reset_sercom(Sercom* sercom) { + // Reset all SERCOMs except the ones being used by on-board devices. + Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS; + for (int i = 0; i < SERCOM_INST_NUM; i++) { + if (sercom_instances[i] == sercom) { + never_reset_sercoms[i] = false; + break; + } + } +} + void reset_sercoms(void) { // Reset all SERCOMs except the ones being used by on-board devices. Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS; @@ -235,6 +246,8 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) { if (common_hal_busio_spi_deinited(self)) { return; } + allow_reset_sercom(self->spi_desc.dev.prvt); + spi_m_sync_disable(&self->spi_desc); spi_m_sync_deinit(&self->spi_desc); reset_pin_number(self->clock_pin); diff --git a/ports/atmel-samd/common-hal/displayio/FourWire.c b/ports/atmel-samd/common-hal/displayio/FourWire.c index 7a0bdd0c1..ab01e2609 100644 --- a/ports/atmel-samd/common-hal/displayio/FourWire.c +++ b/ports/atmel-samd/common-hal/displayio/FourWire.c @@ -53,6 +53,16 @@ void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, never_reset_pin_number(reset->number); } +void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self) { + if (self->bus == &self->inline_bus) { + common_hal_busio_spi_deinit(self->bus); + } + + reset_pin_number(self->command.pin->number); + reset_pin_number(self->chip_select.pin->number); + reset_pin_number(self->reset.pin->number); +} + bool common_hal_displayio_fourwire_begin_transaction(mp_obj_t obj) { displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); if (!common_hal_busio_spi_try_lock(self->bus)) { diff --git a/ports/atmel-samd/common-hal/displayio/FourWire.h b/ports/atmel-samd/common-hal/displayio/FourWire.h index e3ae5781b..234bcf794 100644 --- a/ports/atmel-samd/common-hal/displayio/FourWire.h +++ b/ports/atmel-samd/common-hal/displayio/FourWire.h @@ -34,6 +34,7 @@ typedef struct { mp_obj_base_t base; busio_spi_obj_t* bus; + busio_spi_obj_t inline_bus; digitalio_digitalinout_obj_t command; digitalio_digitalinout_obj_t chip_select; digitalio_digitalinout_obj_t reset; diff --git a/ports/atmel-samd/common-hal/microcontroller/Pin.c b/ports/atmel-samd/common-hal/microcontroller/Pin.c index 7d0d97758..b7d527d04 100644 --- a/ports/atmel-samd/common-hal/microcontroller/Pin.c +++ b/ports/atmel-samd/common-hal/microcontroller/Pin.c @@ -100,6 +100,8 @@ void never_reset_pin_number(uint8_t pin_number) { } void reset_pin_number(uint8_t pin_number) { + never_reset_pins[GPIO_PORT(pin_number)] &= ~(1 << GPIO_PIN(pin_number)); + if (pin_number >= PORT_BITS) { return; } diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 5db470417..21f44965e 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -40,18 +40,19 @@ //| .. currentmodule:: displayio //| -//| :class:`FourWire` -- Manage updating a display over SPI four wire protocol +//| :class:`Display` -- Manage updating a display over a display bus //| ========================================================================== //| -//| Manage updating a display over SPI four wire protocol in the background while Python code runs. -//| It doesn't handle display initialization. +//| This initializes a display and connects it into CircuitPython. Unlike other +//| objects in CircuitPython, Display objects live until `displayio.release_displays()` +//| is called. This is done so that CircuitPython can use the display itself. //| //| .. warning:: This will be changed before 4.0.0. Consider it very experimental. //| //| .. class:: Display(display_bus, *, width, height, colstart=0, rowstart=0, color_depth=16, //| set_column_command=0x2a set_row_command=0x2b, write_ram_command=0x2c) //| -//| Create a FourWire object associated with the given pins. +//| Create a Display object. //| STATIC mp_obj_t displayio_display_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_display_bus, ARG_init_sequence, ARG_width, ARG_height, ARG_colstart, ARG_rowstart, ARG_color_depth, ARG_set_column_command, ARG_set_row_command, ARG_write_ram_command }; @@ -80,11 +81,15 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a mp_buffer_info_t bufinfo; mp_get_buffer_raise(args[ARG_init_sequence].u_obj, &bufinfo, MP_BUFFER_READ); - displayio_display_obj_t *self; - if (display_bus == &primary_display.fourwire_bus) { - self = &primary_display.display; - } else { - self = m_new_obj(displayio_display_obj_t); + displayio_display_obj_t *self = NULL; + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + if (displays[i].display.base.type == NULL) { + self = &displays[i].display; + break; + } + } + if (self == NULL) { + mp_raise_RuntimeError(translate("Display limit reached")); } self->base.type = &displayio_display_type; common_hal_displayio_display_construct(self, diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c index 674d1c900..9833fbc64 100644 --- a/shared-bindings/displayio/FourWire.c +++ b/shared-bindings/displayio/FourWire.c @@ -69,18 +69,21 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_ if (command == mp_const_none || chip_select == mp_const_none) { mp_raise_ValueError(translate("Command and chip_select required")); } + assert_pin_free(command); + assert_pin_free(chip_select); + assert_pin_free(reset); - displayio_fourwire_obj_t* self; + displayio_fourwire_obj_t* self = NULL; mp_obj_t spi = args[ARG_spi_bus].u_obj; - if (board_spi() == spi && primary_display.bus_type == NULL) { - self = &primary_display.fourwire_bus; - primary_display.bus_type = &displayio_fourwire_type; - } else { - // TODO(tannewt): Always check pin free. For now we ignore the primary display. - assert_pin_free(command); - assert_pin_free(chip_select); - assert_pin_free(reset); - self = m_new_obj(displayio_fourwire_obj_t); + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + if (displays[i].fourwire_bus.base.type== NULL) { + self = &displays[i].fourwire_bus; + self->base.type = &displayio_fourwire_type; + break; + } + } + if (self == NULL) { + mp_raise_RuntimeError(translate("Display bus limit reached")); } common_hal_displayio_fourwire_construct(self, diff --git a/shared-bindings/displayio/FourWire.h b/shared-bindings/displayio/FourWire.h index a9e1bf566..3a9f66d4c 100644 --- a/shared-bindings/displayio/FourWire.h +++ b/shared-bindings/displayio/FourWire.h @@ -39,6 +39,8 @@ 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); +void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self); + bool common_hal_displayio_fourwire_begin_transaction(mp_obj_t self); void common_hal_displayio_fourwire_send(mp_obj_t self, bool command, uint8_t *data, uint32_t data_length); diff --git a/shared-bindings/displayio/ParallelBus.h b/shared-bindings/displayio/ParallelBus.h index f1d1656b1..c73934838 100644 --- a/shared-bindings/displayio/ParallelBus.h +++ b/shared-bindings/displayio/ParallelBus.h @@ -38,6 +38,8 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, const mcu_pin_obj_t* write); +void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self); + bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t self); void common_hal_displayio_parallelbus_send(mp_obj_t self, bool command, uint8_t *data, uint32_t data_length); diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c index d485d8095..66cf4d63d 100644 --- a/shared-bindings/displayio/__init__.c +++ b/shared-bindings/displayio/__init__.c @@ -32,6 +32,7 @@ #include "shared-bindings/displayio/__init__.h" #include "shared-bindings/displayio/Bitmap.h" #include "shared-bindings/displayio/ColorConverter.h" +#include "shared-bindings/displayio/Display.h" #include "shared-bindings/displayio/FourWire.h" #include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/OnDiskBitmap.h" @@ -61,6 +62,7 @@ //| //| Bitmap //| ColorConverter +//| Display //| FourWire //| Group //| OnDiskBitmap @@ -71,10 +73,22 @@ //| All libraries change hardware state but are never deinit //| + +//| .. method:: release_displays() +//| +//| Releases any actively used displays so theis pins can be used again. +//| +STATIC mp_obj_t displayio_release_displays(void) { + common_hal_displayio_release_displays(); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_0(displayio_release_displays_obj, displayio_release_displays); + STATIC const mp_rom_map_elem_t displayio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_displayio) }, { MP_ROM_QSTR(MP_QSTR_Bitmap), MP_ROM_PTR(&displayio_bitmap_type) }, { MP_ROM_QSTR(MP_QSTR_ColorConverter), MP_ROM_PTR(&displayio_colorconverter_type) }, + { MP_ROM_QSTR(MP_QSTR_Display), MP_ROM_PTR(&displayio_display_type) }, { MP_ROM_QSTR(MP_QSTR_Group), MP_ROM_PTR(&displayio_group_type) }, { MP_ROM_QSTR(MP_QSTR_OnDiskBitmap), MP_ROM_PTR(&displayio_ondiskbitmap_type) }, { MP_ROM_QSTR(MP_QSTR_Palette), MP_ROM_PTR(&displayio_palette_type) }, @@ -82,6 +96,8 @@ STATIC const mp_rom_map_elem_t displayio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_Sprite), MP_ROM_PTR(&displayio_sprite_type) }, { MP_ROM_QSTR(MP_QSTR_FourWire), MP_ROM_PTR(&displayio_fourwire_type) }, + + { MP_ROM_QSTR(MP_QSTR_release_displays), MP_ROM_PTR(&displayio_release_displays_obj) }, }; STATIC MP_DEFINE_CONST_DICT(displayio_module_globals, displayio_module_globals_table); diff --git a/shared-bindings/displayio/__init__.h b/shared-bindings/displayio/__init__.h index a6663bf57..427ddb47d 100644 --- a/shared-bindings/displayio/__init__.h +++ b/shared-bindings/displayio/__init__.h @@ -27,8 +27,6 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H #define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H -#include "py/obj.h" - -// Nothing now. +void common_hal_displayio_release_displays(void); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index b528c3289..48194f63f 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -1,68 +1,190 @@ +#include #include "shared-module/displayio/__init__.h" +#include "shared-bindings/displayio/Bitmap.h" #include "shared-bindings/displayio/Display.h" +#include "shared-bindings/displayio/Group.h" +#include "shared-bindings/displayio/Palette.h" +#include "shared-bindings/displayio/Sprite.h" -primary_display_t primary_display; +primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT]; -void displayio_refresh_display(void) { - displayio_display_obj_t* display = &primary_display.display; +void displayio_refresh_displays(void) { + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + if (displays[i].display.base.type == NULL) { + continue; + } + displayio_display_obj_t* display = &displays[i].display; - if (!displayio_display_frame_queued(display)) { - return; - } - if (displayio_display_refresh_queued(display)) { - PORT->Group[1].DIRSET.reg = 1 << 22; - - // We compute the pixels - uint16_t x0 = 0; - uint16_t y0 = 0; - uint16_t x1 = display->width; - uint16_t y1 = display->height; - size_t index = 0; - //size_t row_size = (x1 - x0); - uint16_t buffer_size = 256; - uint32_t buffer[buffer_size / 2]; - displayio_display_start_region_update(display, x0, y0, x1, y1); - for (uint16_t y = y0; y < y1; ++y) { - for (uint16_t x = x0; x < x1; ++x) { - uint16_t* pixel = &(((uint16_t*)buffer)[index]); - *pixel = 0; - - PORT->Group[1].OUTTGL.reg = 1 << 22; - - //if (index == 0) { - if (display->current_group != NULL) { - displayio_group_get_pixel(display->current_group, x, y, pixel); - } - // } else { - // *pixel = (((uint16_t*)buffer)[0]); - // } + if (!displayio_display_frame_queued(display)) { + return; + } + if (displayio_display_refresh_queued(display)) { + PORT->Group[1].DIRSET.reg = 1 << 22; + + // We compute the pixels + uint16_t x0 = 0; + uint16_t y0 = 0; + uint16_t x1 = display->width; + uint16_t y1 = display->height; + size_t index = 0; + //size_t row_size = (x1 - x0); + uint16_t buffer_size = 256; + uint32_t buffer[buffer_size / 2]; + displayio_display_start_region_update(display, x0, y0, x1, y1); + for (uint16_t y = y0; y < y1; ++y) { + for (uint16_t x = x0; x < x1; ++x) { + uint16_t* pixel = &(((uint16_t*)buffer)[index]); + *pixel = 0; + + PORT->Group[1].OUTTGL.reg = 1 << 22; + + //if (index == 0) { + if (display->current_group != NULL) { + displayio_group_get_pixel(display->current_group, x, y, pixel); + } + // } else { + // *pixel = (((uint16_t*)buffer)[0]); + // } - PORT->Group[1].OUTTGL.reg = 1 << 22; + PORT->Group[1].OUTTGL.reg = 1 << 22; - index += 1; - // The buffer is full, send it. - if (index >= buffer_size) { - if (!displayio_display_send_pixels(display, buffer, buffer_size / 2)) { - displayio_display_finish_region_update(display); - return; + index += 1; + // The buffer is full, send it. + if (index >= buffer_size) { + if (!displayio_display_send_pixels(display, buffer, buffer_size / 2)) { + displayio_display_finish_region_update(display); + return; + } + index = 0; } - index = 0; } } - } - // Send the remaining data. - if (index && !displayio_display_send_pixels(display, buffer, index * 2)) { + // Send the remaining data. + if (index && !displayio_display_send_pixels(display, buffer, index * 2)) { + displayio_display_finish_region_update(display); + return; + } displayio_display_finish_region_update(display); - return; } - displayio_display_finish_region_update(display); + displayio_display_finish_refresh(display); } - displayio_display_finish_refresh(display); } -void reset_primary_display(void) { - common_hal_displayio_display_show(&primary_display.display, NULL); +uint32_t blinka_bitmap_data[32] = { + 0x00000011, 0x11000000, + 0x00000111, 0x53100000, + 0x00000111, 0x56110000, + 0x00000111, 0x11140000, + 0x00000111, 0x20002000, + 0x00000011, 0x13000000, + 0x00000001, 0x11200000, + 0x00000000, 0x11330000, + 0x00000000, 0x01122000, + 0x00001111, 0x44133000, + 0x00032323, 0x24112200, + 0x00111114, 0x44113300, + 0x00323232, 0x34112200, + 0x11111144, 0x44443300, + 0x11111111, 0x11144401, + 0x23232323, 0x21111110 +}; + +displayio_bitmap_t blinka_bitmap = { + .base = {.type = &displayio_bitmap_type }, + .width = 16, + .height = 16, + .data = blinka_bitmap_data, + .stride = 2, + .bits_per_value = 4, + .x_shift = 3, + .x_mask = 0x7, + .bitmask = 0xf +}; + +uint32_t blinka_transparency[1] = {0x80000000}; +uint32_t blinka_colors[8] = {0x1e910000, 0x72dc722b, 0xffffb05a, 0x00000000, + 0x80000000, 0x00000000, 0x00000000, 0x00000000}; + +displayio_palette_t blinka_palette = { + .base = {.type = &displayio_palette_type }, + .opaque = blinka_transparency, + .colors = blinka_colors, + .color_count = 16, + .needs_refresh = false +}; + +displayio_sprite_t blinka_sprite = { + .base = {.type = &displayio_sprite_type }, + .bitmap = &blinka_bitmap, + .pixel_shader = &blinka_palette, + .x = 0, + .y = 0, + .width = 16, + .height = 16, + .needs_refresh = false +}; + +mp_obj_t splash_children[1] = { + &blinka_sprite, +}; + +displayio_group_t splash = { + .base = {.type = &displayio_group_type }, + .x = 0, + .y = 0, + .size = 1, + .max_size = 1, + .children = splash_children, + .needs_refresh = true +}; + +void reset_displays(void) { + // The SPI buses used by FourWires may be allocated on the heap so we need to move them inline. + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + if (displays[i].fourwire_bus.base.type != &displayio_fourwire_type) { + continue; + } + displayio_fourwire_obj_t* fourwire = &displays[i].fourwire_bus; + if (((uint32_t) fourwire->bus) < ((uint32_t) &displays) || + ((uint32_t) fourwire->bus) > ((uint32_t) &displays + CIRCUITPY_DISPLAY_LIMIT)) { + busio_spi_obj_t* original_spi = fourwire->bus; + memcpy(&fourwire->inline_bus, original_spi, sizeof(busio_spi_obj_t)); + fourwire->bus = &fourwire->inline_bus; + // Check for other displays that use the same spi bus and swap them too. + for (uint8_t j = i + 1; j < CIRCUITPY_DISPLAY_LIMIT; j++) { + if (displays[i].fourwire_bus.bus == original_spi) { + displays[i].fourwire_bus.bus = &fourwire->inline_bus; + } + } + } + } + + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + if (displays[i].display.base.type == NULL) { + continue; + } + displayio_display_obj_t* display = &displays[i].display; + common_hal_displayio_display_show(display, &splash); + } +} + +void common_hal_displayio_release_displays(void) { + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + mp_const_obj_t bus_type = displays[i].fourwire_bus.base.type; + if (bus_type == NULL) { + continue; + } else if (bus_type == &displayio_fourwire_type) { + common_hal_displayio_fourwire_deinit(&displays[i].fourwire_bus); + } else if (bus_type == &displayio_parallelbus_type) { + //common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus); + } + displays[i].fourwire_bus.base.type = NULL; + } + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + displays[i].display.base.type = NULL; + } + // TODO(tannewt): Clear the display datastructures and release everything used. } diff --git a/shared-module/displayio/__init__.h b/shared-module/displayio/__init__.h index 84db98fcc..fdabd4ec4 100644 --- a/shared-module/displayio/__init__.h +++ b/shared-module/displayio/__init__.h @@ -36,13 +36,12 @@ typedef struct { displayio_fourwire_obj_t fourwire_bus; displayio_parallelbus_obj_t parallel_bus; }; - mp_const_obj_t bus_type; displayio_display_obj_t display; } primary_display_t; -extern primary_display_t primary_display; +extern primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT]; -void displayio_refresh_display(void); -void reset_primary_display(void); +void displayio_refresh_displays(void); +void reset_displays(void); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H -- cgit v1.2.3 From 5277138c992b860cfbdb767f18e034c42e31b6a1 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 10:57:05 -0800 Subject: pyportal compiles and tweak blinka colors --- ports/atmel-samd/boards/pyportal/board.c | 57 ++++++++++++++++++++++++++++++-- ports/atmel-samd/mpconfigport.h | 1 + shared-module/displayio/Group.c | 3 ++ shared-module/displayio/Group.h | 1 + shared-module/displayio/__init__.c | 7 ++-- 5 files changed, 64 insertions(+), 5 deletions(-) diff --git a/ports/atmel-samd/boards/pyportal/board.c b/ports/atmel-samd/boards/pyportal/board.c index 8ec498e8c..cf03bb28a 100644 --- a/ports/atmel-samd/boards/pyportal/board.c +++ b/ports/atmel-samd/boards/pyportal/board.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * 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 @@ -25,15 +25,67 @@ */ #include "boards/board.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" #include "mpconfigboard.h" #include "hal/include/hal_gpio.h" #include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" #include "tick.h" +#define DELAY 0x80 + +uint8_t display_init_sequence[] = { + 0xEF, 3, 0x03, 0x80, 0x02, + 0xCF, 3, 0x00, 0xC1, 0x30, + 0xED, 4, 0x64, 0x03, 0x12, 0x81, + 0xE8, 3, 0x85, 0x00, 0x78, + 0xCB, 5, 0x39, 0x2C, 0x00, 0x34, 0x02, + 0xF7, 1, 0x20, + 0xEA, 2, 0x00, 0x00, + 0xc0, 1, 0x23, // Power control VRH[5:0] + 0xc1, 1, 0x10, // Power control SAP[2:0];BT[3:0] + 0xc5, 2, 0x3e, 0x28, // VCM control + 0xc7, 1, 0x86, // VCM control2 + 0x36, 1, 0x38, // Memory Access Control + 0x37, 1, 0x00, // Vertical scroll zero + 0x3a, 1, 0x55, // COLMOD: Pixel Format Set + 0xb1, 2, 0x00, 0x18, // Frame Rate Control (In Normal Mode/Full Colors) + 0xb6, 3, 0x08, 0x82, 0x27, // Display Function Control + 0xF2, 1, 0x00, // 3Gamma Function Disable + 0x26, 1, 0x01, // Gamma curve selected + 0xe0, 15, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, // Set Gamma + 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00, + 0xe1, 15, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, // Set Gamma + 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F, + 0x11, DELAY, 120, // Exit Sleep + 0x29, DELAY, 120, // Display on +}; + void board_init(void) { + displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; + bus->base.type = &displayio_fourwire_type; + common_hal_displayio_fourwire_construct(bus, + board_spi(), + &pin_PB09, // Command or data + &pin_PB06, // Chip select + &pin_PA00); // Reset + + displayio_display_obj_t* display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, + 320, // Width + 240, // Height + 0, // column start + 0, // row start + 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 + display_init_sequence, + sizeof(display_init_sequence)); } bool board_requests_safe_mode(void) { @@ -41,5 +93,4 @@ bool board_requests_safe_mode(void) { } void reset_board(void) { - common_hal_displayio_display_show(&primary_display_obj, NULL); } diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 65b8c94c5..77881fefd 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -192,6 +192,7 @@ typedef long mp_off_t; #define MICROPY_PY_REVERSE_SPECIAL_METHODS (1) #define MICROPY_PY_SYS_EXC_INFO (1) // MICROPY_PY_UERRNO_LIST - Use the default +#define CIRCUITPY_DISPLAY_LIMIT (3) #endif #ifdef LONGINT_IMPL_NONE diff --git a/shared-module/displayio/Group.c b/shared-module/displayio/Group.c index b9923128a..255349d7c 100644 --- a/shared-module/displayio/Group.c +++ b/shared-module/displayio/Group.c @@ -67,11 +67,14 @@ void displayio_group_construct(displayio_group_t* self, mp_obj_t* child_array, u self->children = child_array; self->max_size = max_size; self->needs_refresh = false; + self->scale = 1; } bool displayio_group_get_pixel(displayio_group_t *self, int16_t x, int16_t y, uint16_t* pixel) { x -= self->x; y -= self->y; + x /= self->scale; + y /= self->scale; for (int32_t i = self->size - 1; i >= 0 ; i--) { mp_obj_t layer = self->children[i]; if (MP_OBJ_IS_TYPE(layer, &displayio_sprite_type)) { diff --git a/shared-module/displayio/Group.h b/shared-module/displayio/Group.h index 272f3114c..60f573ff6 100644 --- a/shared-module/displayio/Group.h +++ b/shared-module/displayio/Group.h @@ -36,6 +36,7 @@ typedef struct { mp_obj_base_t base; int16_t x; int16_t y; + uint16_t scale; uint16_t size; uint16_t max_size; mp_obj_t* children; diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index 48194f63f..dc5957c23 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -105,8 +105,10 @@ displayio_bitmap_t blinka_bitmap = { }; uint32_t blinka_transparency[1] = {0x80000000}; -uint32_t blinka_colors[8] = {0x1e910000, 0x72dc722b, 0xffffb05a, 0x00000000, - 0x80000000, 0x00000000, 0x00000000, 0x00000000}; + +// TODO(tannewt): Fix these colors +uint32_t blinka_colors[8] = {0x91780000, 0x879FFC98, 0xffff0000, 0x0000f501, + 0x00000000, 0x00000000, 0x00000000, 0x00000000}; displayio_palette_t blinka_palette = { .base = {.type = &displayio_palette_type }, @@ -135,6 +137,7 @@ displayio_group_t splash = { .base = {.type = &displayio_group_type }, .x = 0, .y = 0, + .scale = 2, .size = 1, .max_size = 1, .children = splash_children, -- cgit v1.2.3 From 2d136d58bf288f0be945ed5cd3efe9113d0acce3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 14:45:29 -0800 Subject: Fix other builds and hallowing --- ports/atmel-samd/boards/arduino_mkr1300/pins.c | 2 +- ports/atmel-samd/boards/arduino_mkrzero/pins.c | 4 +- ports/atmel-samd/boards/arduino_zero/pins.c | 2 +- ports/atmel-samd/boards/catwan_usbstick/pins.c | 2 +- .../boards/circuitplayground_express/pins.c | 2 +- .../circuitplayground_express_crickit/pins.c | 2 +- ports/atmel-samd/boards/cp32-m4/pins.c | 2 +- ports/atmel-samd/boards/datalore_ip_m4/pins.c | 2 +- .../atmel-samd/boards/feather_m0_adalogger/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_basic/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_express/pins.c | 2 +- .../boards/feather_m0_express_crickit/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_rfm69/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_rfm9x/pins.c | 2 +- .../atmel-samd/boards/feather_m0_supersized/pins.c | 2 +- .../boards/feather_radiofruit_zigbee/pins.c | 2 +- ports/atmel-samd/boards/gemma_m0/pins.c | 2 +- .../atmel-samd/boards/hallowing_m0_express/board.c | 47 ++++++-------------- .../atmel-samd/boards/hallowing_m0_express/pins.c | 5 ++- .../atmel-samd/boards/itsybitsy_m0_express/pins.c | 2 +- .../atmel-samd/boards/itsybitsy_m4_express/pins.c | 2 +- ports/atmel-samd/boards/meowmeow/pins.c | 2 +- ports/atmel-samd/boards/metro_m0_express/pins.c | 2 +- ports/atmel-samd/boards/metro_m4_express/pins.c | 2 +- ports/atmel-samd/boards/mini_sam_m4/pins.c | 2 +- ports/atmel-samd/boards/pirkey_m0/pins.c | 2 +- ports/atmel-samd/boards/pyportal/board.c | 12 +++--- ports/atmel-samd/boards/pyportal/pins.c | 3 ++ .../atmel-samd/boards/sparkfun_samd21_mini/pins.c | 16 +++---- ports/atmel-samd/boards/trellis_m4_express/pins.c | 2 +- ports/atmel-samd/boards/trinket_m0/pins.c | 2 +- ports/atmel-samd/boards/trinket_m0_haxpress/pins.c | 2 +- ports/atmel-samd/boards/ugame10/pins.c | 2 +- .../atmel-samd/common-hal/displayio/ParallelBus.c | 38 +++++++++++++--- .../atmel-samd/common-hal/displayio/ParallelBus.h | 4 ++ ports/atmel-samd/mpconfigport.h | 1 + shared-bindings/displayio/ParallelBus.c | 50 ++++++++++++++++++++-- shared-bindings/displayio/ParallelBus.h | 4 +- shared-bindings/displayio/__init__.c | 3 ++ shared-module/displayio/Display.c | 4 +- shared-module/displayio/__init__.c | 17 +++----- 41 files changed, 160 insertions(+), 102 deletions(-) diff --git a/ports/atmel-samd/boards/arduino_mkr1300/pins.c b/ports/atmel-samd/boards/arduino_mkr1300/pins.c index de9f9769c..a5a058ace 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/pins.c +++ b/ports/atmel-samd/boards/arduino_mkr1300/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/arduino_mkrzero/pins.c b/ports/atmel-samd/boards/arduino_mkrzero/pins.c index 3ffd37fa6..654c0d6da 100644 --- a/ports/atmel-samd/boards/arduino_mkrzero/pins.c +++ b/ports/atmel-samd/boards/arduino_mkrzero/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, @@ -31,7 +31,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB22) }, - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB22) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB22) }, { MP_ROM_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_PA12) }, { MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_PA15) }, diff --git a/ports/atmel-samd/boards/arduino_zero/pins.c b/ports/atmel-samd/boards/arduino_zero/pins.c index 8a7ff70e6..f9403bb9a 100644 --- a/ports/atmel-samd/boards/arduino_zero/pins.c +++ b/ports/atmel-samd/boards/arduino_zero/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/catwan_usbstick/pins.c b/ports/atmel-samd/boards/catwan_usbstick/pins.c index 8997b653f..87ee84c0b 100644 --- a/ports/atmel-samd/boards/catwan_usbstick/pins.c +++ b/ports/atmel-samd/boards/catwan_usbstick/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA30) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express/pins.c b/ports/atmel-samd/boards/circuitplayground_express/pins.c index 14ae89c55..70743366e 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c index 14ae89c55..70743366e 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/cp32-m4/pins.c b/ports/atmel-samd/boards/cp32-m4/pins.c index 93c169c8b..9da67dfb4 100644 --- a/ports/atmel-samd/boards/cp32-m4/pins.c +++ b/ports/atmel-samd/boards/cp32-m4/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from diff --git a/ports/atmel-samd/boards/datalore_ip_m4/pins.c b/ports/atmel-samd/boards/datalore_ip_m4/pins.c index 460fd6fef..468a09a47 100644 --- a/ports/atmel-samd/boards/datalore_ip_m4/pins.c +++ b/ports/atmel-samd/boards/datalore_ip_m4/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c index 0029bba1a..d99e62c95 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c +++ b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_m0_basic/pins.c b/ports/atmel-samd/boards/feather_m0_basic/pins.c index 4400a253d..f9b6db63b 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/pins.c +++ b/ports/atmel-samd/boards/feather_m0_basic/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_m0_express/pins.c b/ports/atmel-samd/boards/feather_m0_express/pins.c index cd6c351d4..1eaa98a58 100644 --- a/ports/atmel-samd/boards/feather_m0_express/pins.c +++ b/ports/atmel-samd/boards/feather_m0_express/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c b/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c index cd6c351d4..1eaa98a58 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/pins.c b/ports/atmel-samd/boards/feather_m0_rfm69/pins.c index 7e14b3f25..ba59cb69b 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/pins.c +++ b/ports/atmel-samd/boards/feather_m0_rfm69/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c b/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c index 4e77b7fb9..29a01d405 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_m0_supersized/pins.c b/ports/atmel-samd/boards/feather_m0_supersized/pins.c index cd6c351d4..1eaa98a58 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/pins.c +++ b/ports/atmel-samd/boards/feather_m0_supersized/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/pins.c b/ports/atmel-samd/boards/feather_radiofruit_zigbee/pins.c index cd111e174..211596f78 100755 --- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/pins.c +++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PB02) }, diff --git a/ports/atmel-samd/boards/gemma_m0/pins.c b/ports/atmel-samd/boards/gemma_m0/pins.c index c9c7ea555..b24b45838 100644 --- a/ports/atmel-samd/boards/gemma_m0/pins.c +++ b/ports/atmel-samd/boards/gemma_m0/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, // pad 1 diff --git a/ports/atmel-samd/boards/hallowing_m0_express/board.c b/ports/atmel-samd/boards/hallowing_m0_express/board.c index b47c5fbb2..2b12ae464 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/board.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/board.c @@ -27,6 +27,7 @@ #include "boards/board.h" #include "shared-bindings/displayio/FourWire.h" +#include "shared-module/displayio/__init__.h" #include "shared-module/displayio/mipi_constants.h" #include "tick.h" @@ -68,13 +69,18 @@ uint8_t display_init_sequence[] = { }; void board_init(void) { - board_display_obj.base.type = &displayio_fourwire_type; - common_hal_displayio_fourwire_construct(&board_display_obj, - &pin_PB23, // Clock - &pin_PB22, // Data + displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; + bus->base.type = &displayio_fourwire_type; + common_hal_displayio_fourwire_construct(bus, + board_spi(), &pin_PA28, // Command or data &pin_PA01, // Chip select - &pin_PA27, // Reset + &pin_PA27); // Reset + + displayio_display_obj_t* display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, 128, // Width 128, // Height 2, // column start @@ -82,33 +88,9 @@ void board_init(void) { 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 - - uint32_t i = 0; - common_hal_displayio_fourwire_begin_transaction(&board_display_obj); - while (i < sizeof(display_init_sequence)) { - uint8_t *cmd = display_init_sequence + i; - uint8_t data_size = *(cmd + 1); - bool delay = (data_size & DELAY) != 0; - data_size &= ~DELAY; - uint8_t *data = cmd + 2; - common_hal_displayio_fourwire_send(&board_display_obj, true, cmd, 1); - common_hal_displayio_fourwire_send(&board_display_obj, false, data, data_size); - if (delay) { - data_size++; - uint16_t delay_length_ms = *(cmd + 1 + data_size); - if (delay_length_ms == 255) { - delay_length_ms = 500; - } - uint64_t start = ticks_ms; - while (ticks_ms - start < delay_length_ms) {} - } else { - uint64_t start = ticks_ms; - while (ticks_ms - start < 10) {} - } - i += 2 + data_size; - } - common_hal_displayio_fourwire_end_transaction(&board_display_obj); + MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command + display_init_sequence, + sizeof(display_init_sequence)); } bool board_requests_safe_mode(void) { @@ -116,5 +98,4 @@ bool board_requests_safe_mode(void) { } void reset_board(void) { - common_hal_displayio_fourwire_show(&board_display_obj, NULL); } diff --git a/ports/atmel-samd/boards/hallowing_m0_express/pins.c b/ports/atmel-samd/boards/hallowing_m0_express/pins.c index d1f8609ff..3db1b1752 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/pins.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/pins.c @@ -1,7 +1,8 @@ #include "shared-bindings/board/__init__.h" #include "boards/board.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" +#include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, @@ -62,6 +63,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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(&board_display_obj)} + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c b/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c index 25407bc14..912fba4ed 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c b/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c index 2a89c3037..ed91c88ee 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from diff --git a/ports/atmel-samd/boards/meowmeow/pins.c b/ports/atmel-samd/boards/meowmeow/pins.c index 59c51f4eb..089baad32 100644 --- a/ports/atmel-samd/boards/meowmeow/pins.c +++ b/ports/atmel-samd/boards/meowmeow/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/metro_m0_express/pins.c b/ports/atmel-samd/boards/metro_m0_express/pins.c index 13f0eb0ba..0707a3581 100644 --- a/ports/atmel-samd/boards/metro_m0_express/pins.c +++ b/ports/atmel-samd/boards/metro_m0_express/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/metro_m4_express/pins.c b/ports/atmel-samd/boards/metro_m4_express/pins.c index 0e66817f7..dd419aec6 100644 --- a/ports/atmel-samd/boards/metro_m4_express/pins.c +++ b/ports/atmel-samd/boards/metro_m4_express/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from diff --git a/ports/atmel-samd/boards/mini_sam_m4/pins.c b/ports/atmel-samd/boards/mini_sam_m4/pins.c index 87e210381..f78fe1bc8 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/pins.c +++ b/ports/atmel-samd/boards/mini_sam_m4/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from diff --git a/ports/atmel-samd/boards/pirkey_m0/pins.c b/ports/atmel-samd/boards/pirkey_m0/pins.c index e08302f14..a6dbcefe3 100644 --- a/ports/atmel-samd/boards/pirkey_m0/pins.c +++ b/ports/atmel-samd/boards/pirkey_m0/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_REMOTEIN), MP_ROM_PTR(&pin_PA28) }, diff --git a/ports/atmel-samd/boards/pyportal/board.c b/ports/atmel-samd/boards/pyportal/board.c index cf03bb28a..6e5b37dd2 100644 --- a/ports/atmel-samd/boards/pyportal/board.c +++ b/ports/atmel-samd/boards/pyportal/board.c @@ -64,12 +64,14 @@ uint8_t display_init_sequence[] = { }; void board_init(void) { - displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; - bus->base.type = &displayio_fourwire_type; - common_hal_displayio_fourwire_construct(bus, - board_spi(), - &pin_PB09, // Command or data + displayio_parallelbus_obj_t* bus = &displays[0].parallel_bus; + bus->base.type = &displayio_parallelbus_type; + common_hal_displayio_parallelbus_construct(bus, + &pin_PA16, // Data0 + &pin_PB05, // Command or data &pin_PB06, // Chip select + &pin_PB09, // Write + &pin_PB04, // Read &pin_PA00); // Reset displayio_display_obj_t* display = &displays[0].display; diff --git a/ports/atmel-samd/boards/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c index 4ddc10e52..6b1254dfc 100644 --- a/ports/atmel-samd/boards/pyportal/pins.c +++ b/ports/atmel-samd/boards/pyportal/pins.c @@ -1,6 +1,7 @@ #include "shared-bindings/board/__init__.h" #include "boards/board.h" +#include "shared-module/displayio/__init__.h" #include "supervisor/shared/board_busses.h" // This mapping only includes functional names because pins broken @@ -72,5 +73,7 @@ STATIC const mp_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c b/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c index abe63d064..42cd3736b 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c @@ -1,15 +1,15 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - + // Analog pins { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, - + // Digital pins { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) }, @@ -25,16 +25,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) }, { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, - + // UART pins - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, - + // SPI pins { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA19) }, - + // I2C pins { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) }, @@ -44,7 +44,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_PA27) }, { MP_ROM_QSTR(MP_QSTR_YELLOW_LED), MP_ROM_PTR(&pin_PB03) }, - + // Comm objects { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, diff --git a/ports/atmel-samd/boards/trellis_m4_express/pins.c b/ports/atmel-samd/boards/trellis_m4_express/pins.c index 9626f525f..a9f204318 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/pins.c +++ b/ports/atmel-samd/boards/trellis_m4_express/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from diff --git a/ports/atmel-samd/boards/trinket_m0/pins.c b/ports/atmel-samd/boards/trinket_m0/pins.c index 633017024..b3637bd5b 100644 --- a/ports/atmel-samd/boards/trinket_m0/pins.c +++ b/ports/atmel-samd/boards/trinket_m0/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c b/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c index 633017024..b3637bd5b 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/ugame10/pins.c b/ports/atmel-samd/boards/ugame10/pins.c index 87ace5e96..71db52752 100644 --- a/ports/atmel-samd/boards/ugame10/pins.c +++ b/ports/atmel-samd/boards/ugame10/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_X), MP_ROM_PTR(&pin_PA00) }, diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.c b/ports/atmel-samd/common-hal/displayio/ParallelBus.c index f852647a4..3c287eccd 100644 --- a/ports/atmel-samd/common-hal/displayio/ParallelBus.c +++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.c @@ -35,8 +35,8 @@ #include "tick.h" void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, - const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, - const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, const mcu_pin_obj_t* write) { + const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, + const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { uint8_t data_pin = data0->number; if (data_pin % 8 != 0 || data_pin % 32 >= 24) { @@ -47,8 +47,8 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel mp_raise_ValueError_varg(translate("Bus pin %d is already in use"), i); } } - PortGroup *const g = &PORT->Group[data0->number % 32]; - g->DIRSET.reg = 0xff << data_pin; + PortGroup *const g = &PORT->Group[data0->number / 32]; + g->DIRSET.reg = 0xff << (data_pin % 32); self->bus = ((uint8_t*) &g->OUT.reg) + (data0->number % 32 / 8); self->command.base.type = &digitalio_digitalinout_type; @@ -67,15 +67,36 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel common_hal_digitalio_digitalinout_construct(&self->write, write); common_hal_digitalio_digitalinout_switch_to_output(&self->write, true, DRIVE_MODE_PUSH_PULL); + self->read.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->read, read); + common_hal_digitalio_digitalinout_switch_to_output(&self->read, true, DRIVE_MODE_PUSH_PULL); + + self->data0_pin = data_pin; + self->write_group = &PORT->Group[write->number / 32]; + self->write_mask = 1 << (write->number % 32); + never_reset_pin_number(command->number); never_reset_pin_number(chip_select->number); - never_reset_pin_number(reset->number); never_reset_pin_number(write->number); + never_reset_pin_number(read->number); + never_reset_pin_number(reset->number); for (uint8_t i = 0; i < 8; i++) { never_reset_pin_number(data_pin + i); } } +void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) { + for (uint8_t i = 0; i < 8; i++) { + reset_pin_number(self->data0_pin + i); + } + + reset_pin_number(self->command.pin->number); + reset_pin_number(self->chip_select.pin->number); + reset_pin_number(self->write.pin->number); + reset_pin_number(self->read.pin->number); + reset_pin_number(self->reset.pin->number); +} + bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); @@ -85,10 +106,13 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { void common_hal_displayio_parallelbus_send(mp_obj_t obj, bool command, uint8_t *data, uint32_t data_length) { displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->command, !command); + uint32_t* clear_write = (uint32_t*) &self->write_group->OUTCLR.reg; + uint32_t* set_write = (uint32_t*) &self->write_group->OUTSET.reg; + uint32_t mask = self->write_mask; for (uint32_t i = 0; i < data_length; i++) { - common_hal_digitalio_digitalinout_set_value(&self->write, false); + *clear_write = mask; *self->bus = data[i]; - common_hal_digitalio_digitalinout_set_value(&self->write, true); + *set_write = mask; } } diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.h b/ports/atmel-samd/common-hal/displayio/ParallelBus.h index cc45598c5..630bec351 100644 --- a/ports/atmel-samd/common-hal/displayio/ParallelBus.h +++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.h @@ -36,6 +36,10 @@ typedef struct { digitalio_digitalinout_obj_t chip_select; digitalio_digitalinout_obj_t reset; digitalio_digitalinout_obj_t write; + digitalio_digitalinout_obj_t read; + uint8_t data0_pin; + PortGroup* write_group; + uint32_t write_mask; } displayio_parallelbus_obj_t; #endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELBUS_H diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 77881fefd..a2e4075c4 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -282,6 +282,7 @@ extern const struct _mp_obj_module_t wiznet_module; #endif #ifdef CIRCUITPY_DISPLAYIO + #define CIRCUITPY_DISPLAY_LIMIT (3) #define DISPLAYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_displayio), (mp_obj_t)&displayio_module }, #else #define DISPLAYIO_MODULE diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c index dddb4ce8a..aa861bb81 100644 --- a/shared-bindings/displayio/ParallelBus.c +++ b/shared-bindings/displayio/ParallelBus.c @@ -34,6 +34,7 @@ #include "py/runtime.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/util.h" +#include "shared-module/displayio/__init__.h" #include "supervisor/shared/translate.h" //| .. currentmodule:: displayio @@ -46,13 +47,54 @@ //| //| .. warning:: This will be changed before 4.0.0. Consider it very experimental. //| -//| .. class:: ParallelBus(*, data0, command, chip_select, reset, write, bus_width=8) +//| .. class:: ParallelBus(*, data0, command, chip_select, write, read, reset) //| -//| Create a ParallelBus object associated with the given pins. +//| Create a ParallelBus object associated with the given pins. The bus is inferred from data0 +//| by implying the next 7 additional pins on a given GPIO port. //| STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - mp_raise_NotImplementedError(translate("displayio is a work in progress")); - return mp_const_none; + enum { ARG_data0, ARG_command, ARG_chip_select, ARG_write, ARG_read, ARG_reset }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_data0, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_command, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_chip_select, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_write, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_read, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_reset, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mp_obj_t data0 = args[ARG_data0].u_obj; + mp_obj_t command = args[ARG_command].u_obj; + mp_obj_t chip_select = args[ARG_chip_select].u_obj; + mp_obj_t write = args[ARG_write].u_obj; + mp_obj_t read = args[ARG_read].u_obj; + mp_obj_t reset = args[ARG_reset].u_obj; + if (data0 == mp_const_none || command == mp_const_none || chip_select == mp_const_none || write == mp_const_none || read == mp_const_none) { + mp_raise_ValueError(translate("Data0, command, chip_select, write and read required")); + } + assert_pin_free(data0); + assert_pin_free(command); + assert_pin_free(chip_select); + assert_pin_free(write); + assert_pin_free(read); + assert_pin_free(reset); + + displayio_parallelbus_obj_t* self = NULL; + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + if (displays[i].parallel_bus.base.type== NULL) { + self = &displays[i].parallel_bus; + self->base.type = &displayio_parallelbus_type; + break; + } + } + if (self == NULL) { + mp_raise_RuntimeError(translate("Display bus limit reached")); + } + + common_hal_displayio_parallelbus_construct(self, data0, command, chip_select, write, read, reset); + return self; } diff --git a/shared-bindings/displayio/ParallelBus.h b/shared-bindings/displayio/ParallelBus.h index c73934838..c4cde5ff5 100644 --- a/shared-bindings/displayio/ParallelBus.h +++ b/shared-bindings/displayio/ParallelBus.h @@ -35,8 +35,8 @@ extern const mp_obj_type_t displayio_parallelbus_type; void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, - const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, - const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, const mcu_pin_obj_t* write); + const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, + const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset); void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self); diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c index 66cf4d63d..306f8c08b 100644 --- a/shared-bindings/displayio/__init__.c +++ b/shared-bindings/displayio/__init__.c @@ -37,6 +37,7 @@ #include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/OnDiskBitmap.h" #include "shared-bindings/displayio/Palette.h" +#include "shared-bindings/displayio/ParallelBus.h" #include "shared-bindings/displayio/Shape.h" #include "shared-bindings/displayio/Sprite.h" @@ -67,6 +68,7 @@ //| Group //| OnDiskBitmap //| Palette +//| ParallelBus //| Shape //| Sprite //| @@ -96,6 +98,7 @@ STATIC const mp_rom_map_elem_t displayio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_Sprite), MP_ROM_PTR(&displayio_sprite_type) }, { MP_ROM_QSTR(MP_QSTR_FourWire), MP_ROM_PTR(&displayio_fourwire_type) }, + { MP_ROM_QSTR(MP_QSTR_ParallelBus), MP_ROM_PTR(&displayio_parallelbus_type) }, { MP_ROM_QSTR(MP_QSTR_release_displays), MP_ROM_PTR(&displayio_release_displays_obj) }, }; diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 0a14e74bb..f75f0392f 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -113,10 +113,10 @@ void displayio_display_start_region_update(displayio_display_obj_t* self, uint16 uint16_t data[2]; self->send(self->bus, true, &self->set_column_command, 1); data[0] = __builtin_bswap16(x0 + self->colstart); - data[1] = __builtin_bswap16(x1 + self->colstart); + data[1] = __builtin_bswap16(x1 - 1 + self->colstart); self->send(self->bus, false, (uint8_t*) data, 4); self->send(self->bus, true, &self->set_row_command, 1); - data[0] = __builtin_bswap16(y0 + self->rowstart); + data[0] = __builtin_bswap16(y0 + 1 + self->rowstart); data[1] = __builtin_bswap16(y1 + self->rowstart); self->send(self->bus, false, (uint8_t*) data, 4); self->send(self->bus, true, &self->write_ram_command, 1); diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index dc5957c23..92d97a6ef 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -7,6 +7,7 @@ #include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/Palette.h" #include "shared-bindings/displayio/Sprite.h" +#include "supervisor/usb.h" primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT]; @@ -21,8 +22,6 @@ void displayio_refresh_displays(void) { return; } if (displayio_display_refresh_queued(display)) { - PORT->Group[1].DIRSET.reg = 1 << 22; - // We compute the pixels uint16_t x0 = 0; uint16_t y0 = 0; @@ -38,8 +37,6 @@ void displayio_refresh_displays(void) { uint16_t* pixel = &(((uint16_t*)buffer)[index]); *pixel = 0; - PORT->Group[1].OUTTGL.reg = 1 << 22; - //if (index == 0) { if (display->current_group != NULL) { displayio_group_get_pixel(display->current_group, x, y, pixel); @@ -48,9 +45,6 @@ void displayio_refresh_displays(void) { // *pixel = (((uint16_t*)buffer)[0]); // } - - PORT->Group[1].OUTTGL.reg = 1 << 22; - index += 1; // The buffer is full, send it. if (index >= buffer_size) { @@ -58,6 +52,9 @@ void displayio_refresh_displays(void) { displayio_display_finish_region_update(display); return; } + // TODO(tannewt): Make refresh displays faster so we don't starve other + // background tasks. + usb_background(); index = 0; } } @@ -182,12 +179,12 @@ void common_hal_displayio_release_displays(void) { } else if (bus_type == &displayio_fourwire_type) { common_hal_displayio_fourwire_deinit(&displays[i].fourwire_bus); } else if (bus_type == &displayio_parallelbus_type) { - //common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus); + common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus); } - displays[i].fourwire_bus.base.type = NULL; + displays[i].fourwire_bus.base.type = &mp_type_NoneType; } for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - displays[i].display.base.type = NULL; + displays[i].display.base.type = &mp_type_NoneType; } // TODO(tannewt): Clear the display datastructures and release everything used. } -- cgit v1.2.3 From 760bd8d8a4f0aa0ed8651e89596fb2e6effbc14f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 15:15:59 -0800 Subject: share fourwire and make nrf compile --- ports/atmel-samd/Makefile | 2 +- ports/atmel-samd/common-hal/displayio/FourWire.c | 87 ------------- ports/atmel-samd/common-hal/displayio/FourWire.h | 43 ------- ports/nrf/Makefile | 12 +- ports/nrf/board_busses.c | 114 ----------------- ports/nrf/board_busses.h | 39 ------ ports/nrf/boards/feather_nrf52840_express/pins.c | 4 +- ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c | 2 +- .../makerdiary_nrf52840_mdk_usb_dongle/pins.c | 2 +- ports/nrf/boards/particle_argon/pins.c | 2 +- ports/nrf/boards/particle_boron/pins.c | 2 +- ports/nrf/boards/particle_xenon/pins.c | 2 +- ports/nrf/boards/pca10056/pins.c | 2 +- ports/nrf/boards/pca10059/pins.c | 2 +- ports/nrf/boards/sparkfun_nrf52840_mini/pins.c | 2 +- ports/nrf/common-hal/displayio/ParallelBus.c | 137 +++++++++++++++++++++ ports/nrf/common-hal/displayio/ParallelBus.h | 45 +++++++ ports/nrf/common-hal/microcontroller/Pin.h | 1 + ports/nrf/mpconfigport.h | 2 + shared-bindings/displayio/FourWire.h | 2 +- shared-module/displayio/FourWire.c | 87 +++++++++++++ shared-module/displayio/FourWire.h | 43 +++++++ supervisor/shared/board_busses.c | 1 - 23 files changed, 338 insertions(+), 297 deletions(-) delete mode 100644 ports/atmel-samd/common-hal/displayio/FourWire.c delete mode 100644 ports/atmel-samd/common-hal/displayio/FourWire.h delete mode 100644 ports/nrf/board_busses.c delete mode 100644 ports/nrf/board_busses.h create mode 100644 ports/nrf/common-hal/displayio/ParallelBus.c create mode 100644 ports/nrf/common-hal/displayio/ParallelBus.h create mode 100644 shared-module/displayio/FourWire.c create mode 100644 shared-module/displayio/FourWire.h diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 088288fbd..c8d197b3e 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -305,7 +305,6 @@ SRC_COMMON_HAL = \ busio/UART.c \ digitalio/__init__.c \ digitalio/DigitalInOut.c \ - displayio/FourWire.c \ displayio/ParallelBus.c \ i2cslave/__init__.c \ i2cslave/I2CSlave.c \ @@ -380,6 +379,7 @@ SRC_SHARED_MODULE = \ displayio/Bitmap.c \ displayio/ColorConverter.c \ displayio/Display.c \ + displayio/FourWire.c \ displayio/Group.c \ displayio/OnDiskBitmap.c \ displayio/Palette.c \ diff --git a/ports/atmel-samd/common-hal/displayio/FourWire.c b/ports/atmel-samd/common-hal/displayio/FourWire.c deleted file mode 100644 index ab01e2609..000000000 --- a/ports/atmel-samd/common-hal/displayio/FourWire.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include "shared-bindings/displayio/FourWire.h" - -#include - -#include "shared-bindings/busio/SPI.h" -#include "shared-bindings/digitalio/DigitalInOut.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) { - - self->bus = spi; - common_hal_busio_spi_never_reset(self->bus); - - common_hal_digitalio_digitalinout_construct(&self->command, command); - common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL); - common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select); - common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL); - - common_hal_digitalio_digitalinout_construct(&self->reset, reset); - common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); - - never_reset_pin_number(command->number); - never_reset_pin_number(chip_select->number); - never_reset_pin_number(reset->number); -} - -void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self) { - if (self->bus == &self->inline_bus) { - common_hal_busio_spi_deinit(self->bus); - } - - reset_pin_number(self->command.pin->number); - reset_pin_number(self->chip_select.pin->number); - reset_pin_number(self->reset.pin->number); -} - -bool common_hal_displayio_fourwire_begin_transaction(mp_obj_t obj) { - displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); - if (!common_hal_busio_spi_try_lock(self->bus)) { - return false; - } - // TODO(tannewt): Stop hardcoding SPI frequency, polarity and phase. - common_hal_busio_spi_configure(self->bus, 12000000, 0, 0, 8); - common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); - return true; -} - -void common_hal_displayio_fourwire_send(mp_obj_t obj, bool command, uint8_t *data, uint32_t data_length) { - displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); - common_hal_digitalio_digitalinout_set_value(&self->command, !command); - common_hal_busio_spi_write(self->bus, data, data_length); -} - -void common_hal_displayio_fourwire_end_transaction(mp_obj_t obj) { - displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); - common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); - common_hal_busio_spi_unlock(self->bus); -} diff --git a/ports/atmel-samd/common-hal/displayio/FourWire.h b/ports/atmel-samd/common-hal/displayio/FourWire.h deleted file mode 100644 index 234bcf794..000000000 --- a/ports/atmel-samd/common-hal/displayio/FourWire.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_FOURWIRE_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_FOURWIRE_H - -#include "common-hal/busio/SPI.h" -#include "common-hal/digitalio/DigitalInOut.h" -#include "shared-module/displayio/Group.h" - -typedef struct { - mp_obj_base_t base; - busio_spi_obj_t* bus; - busio_spi_obj_t inline_bus; - digitalio_digitalinout_obj_t command; - digitalio_digitalinout_obj_t chip_select; - digitalio_digitalinout_obj_t reset; -} displayio_fourwire_obj_t; - -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_FOURWIRE_H diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 2bc508475..85e6346a1 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -118,7 +118,6 @@ SRC_C += \ fatfs_port.c \ mphalport.c \ tick.c \ - board_busses.c \ boards/$(BOARD)/board.c \ boards/$(BOARD)/pins.c \ device/$(MCU_VARIANT)/startup_$(MCU_SUB_VARIANT).c \ @@ -156,6 +155,7 @@ SRC_COMMON_HAL += \ busio/__init__.c\ digitalio/DigitalInOut.c \ digitalio/__init__.c \ + displayio/ParallelBus.c \ microcontroller/Pin.c \ microcontroller/Processor.c \ microcontroller/__init__.c \ @@ -214,6 +214,16 @@ SRC_SHARED_MODULE = \ bitbangio/OneWire.c \ bitbangio/SPI.c \ busio/OneWire.c \ + displayio/__init__.c \ + displayio/Bitmap.c \ + displayio/ColorConverter.c \ + displayio/Display.c \ + displayio/FourWire.c \ + displayio/Group.c \ + displayio/OnDiskBitmap.c \ + displayio/Palette.c \ + displayio/Shape.c \ + displayio/Sprite.c \ storage/__init__.c # uheap/__init__.c \ diff --git a/ports/nrf/board_busses.c b/ports/nrf/board_busses.c deleted file mode 100644 index 6d5cbd041..000000000 --- a/ports/nrf/board_busses.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include "shared-bindings/busio/I2C.h" -#include "shared-bindings/busio/SPI.h" -#include "shared-bindings/busio/UART.h" - -#include "shared-bindings/microcontroller/Pin.h" -#include "supervisor/shared/translate.h" -#include "nrf/pins.h" -#include "py/mpconfig.h" -#include "py/runtime.h" - -#if !defined(DEFAULT_I2C_BUS_SDA) || !defined(DEFAULT_I2C_BUS_SCL) - STATIC mp_obj_t board_i2c(void) { - mp_raise_NotImplementedError(translate("No default I2C bus")); - return NULL; - } -#else - STATIC mp_obj_t i2c_singleton = NULL; - - STATIC mp_obj_t board_i2c(void) { - - if (i2c_singleton == NULL) { - busio_i2c_obj_t *self = m_new_obj(busio_i2c_obj_t); - self->base.type = &busio_i2c_type; - - assert_pin_free(DEFAULT_I2C_BUS_SDA); - assert_pin_free(DEFAULT_I2C_BUS_SCL); - common_hal_busio_i2c_construct(self, DEFAULT_I2C_BUS_SCL, DEFAULT_I2C_BUS_SDA, 400000, 0); - i2c_singleton = (mp_obj_t)self; - } - return i2c_singleton; - - } -#endif -MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c); - -#if !defined(DEFAULT_SPI_BUS_SCK) || !defined(DEFAULT_SPI_BUS_MISO) || !defined(DEFAULT_SPI_BUS_MOSI) - STATIC mp_obj_t board_spi(void) { - mp_raise_NotImplementedError(translate("No default SPI bus")); - return NULL; - } -#else - STATIC mp_obj_t spi_singleton = NULL; - - STATIC mp_obj_t board_spi(void) { - - if (spi_singleton == NULL) { - busio_spi_obj_t *self = m_new_obj(busio_spi_obj_t); - self->base.type = &busio_spi_type; - assert_pin_free(DEFAULT_SPI_BUS_SCK); - assert_pin_free(DEFAULT_SPI_BUS_MOSI); - assert_pin_free(DEFAULT_SPI_BUS_MISO); - const mcu_pin_obj_t* clock = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_SCK); - const mcu_pin_obj_t* mosi = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MOSI); - const mcu_pin_obj_t* miso = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MISO); - common_hal_busio_spi_construct(self, clock, mosi, miso); - spi_singleton = (mp_obj_t)self; - } - return spi_singleton; - } -#endif -MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi); - -#if !defined(DEFAULT_UART_BUS_RX) || !defined(DEFAULT_UART_BUS_TX) - STATIC mp_obj_t board_uart(void) { - mp_raise_NotImplementedError(translate("No default UART bus")); - return NULL; - } -#else - STATIC mp_obj_t uart_singleton = NULL; - - STATIC mp_obj_t board_uart(void) { - if (uart_singleton == NULL) { - busio_uart_obj_t *self = m_new_obj(busio_uart_obj_t); - self->base.type = &busio_uart_type; - - assert_pin_free(DEFAULT_UART_BUS_RX); - assert_pin_free(DEFAULT_UART_BUS_TX); - - const mcu_pin_obj_t* rx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RX); - const mcu_pin_obj_t* tx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_TX); - - common_hal_busio_uart_construct(self, tx, rx, 9600, 8, PARITY_NONE, 1, 1000, 64); - uart_singleton = (mp_obj_t)self; - } - return uart_singleton; - } -#endif -MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart); diff --git a/ports/nrf/board_busses.h b/ports/nrf/board_busses.h deleted file mode 100644 index 2a4bfc3d4..000000000 --- a/ports/nrf/board_busses.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_NRF_BOARD_BUSSES_H -#define MICROPY_INCLUDED_NRF_BOARD_BUSSES_H - -void board_i2c(void); -extern mp_obj_fun_builtin_fixed_t board_i2c_obj; - -void board_spi(void); -extern mp_obj_fun_builtin_fixed_t board_spi_obj; - -void board_uart(void); -extern mp_obj_fun_builtin_fixed_t board_uart_obj; - -#endif // MICROPY_INCLUDED_NRF_BOARD_BUSSES_H diff --git a/ports/nrf/boards/feather_nrf52840_express/pins.c b/ports/nrf/boards/feather_nrf52840_express/pins.c index 2f8ac0259..dfb0be6df 100644 --- a/ports/nrf/boards/feather_nrf52840_express/pins.c +++ b/ports/nrf/boards/feather_nrf52840_express/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, @@ -44,7 +44,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P1_15) }, { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_15) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_15) }, - + { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_10) }, }; diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c index 27f0c6797..2d24e8597 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c index 6049ac053..10490c8cb 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, diff --git a/ports/nrf/boards/particle_argon/pins.c b/ports/nrf/boards/particle_argon/pins.c index 0457f0aa8..8c2fb38e6 100644 --- a/ports/nrf/boards/particle_argon/pins.c +++ b/ports/nrf/boards/particle_argon/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/particle_boron/pins.c b/ports/nrf/boards/particle_boron/pins.c index 2bff0a2ce..5981212bf 100644 --- a/ports/nrf/boards/particle_boron/pins.c +++ b/ports/nrf/boards/particle_boron/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/particle_xenon/pins.c b/ports/nrf/boards/particle_xenon/pins.c index 11a29e927..cdd5b5306 100644 --- a/ports/nrf/boards/particle_xenon/pins.c +++ b/ports/nrf/boards/particle_xenon/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/pca10056/pins.c b/ports/nrf/boards/pca10056/pins.c index a57c9d1c9..510b6100e 100644 --- a/ports/nrf/boards/pca10056/pins.c +++ b/ports/nrf/boards/pca10056/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_00), MP_ROM_PTR(&pin_P0_00) }, diff --git a/ports/nrf/boards/pca10059/pins.c b/ports/nrf/boards/pca10059/pins.c index a1916bd04..c43d3a9eb 100644 --- a/ports/nrf/boards/pca10059/pins.c +++ b/ports/nrf/boards/pca10059/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c index 5c50f55c7..f826ac771 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c @@ -1,6 +1,6 @@ #include "shared-bindings/board/__init__.h" -#include "board_busses.h" +#include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P1_15) }, // D1/TX diff --git a/ports/nrf/common-hal/displayio/ParallelBus.c b/ports/nrf/common-hal/displayio/ParallelBus.c new file mode 100644 index 000000000..3afedf736 --- /dev/null +++ b/ports/nrf/common-hal/displayio/ParallelBus.c @@ -0,0 +1,137 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/displayio/ParallelBus.h" + +#include + +#include "common-hal/microcontroller/Pin.h" +#include "py/runtime.h" +#include "shared-bindings/digitalio/DigitalInOut.h" + +#include "tick.h" + +void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self, + const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select, + const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { + + uint8_t data_pin = data0->number; + if (data_pin % 8 != 0 || data_pin % 32 >= 24) { + mp_raise_ValueError(translate("Data 0 pin must be byte aligned")); + } + for (uint8_t i = 0; i < 8; i++) { + if (!pin_number_is_free(data_pin + i)) { + mp_raise_ValueError_varg(translate("Bus pin %d is already in use"), i); + } + } + NRF_GPIO_Type *g; + uint8_t num_pins_in_port; + if (data0->number < P0_PIN_NUM) { + g = NRF_P0; + num_pins_in_port = P0_PIN_NUM; + } else { + g = NRF_P1; + num_pins_in_port = P1_PIN_NUM; + } + g->DIRSET = 0xff << (data_pin % num_pins_in_port); + self->bus = ((uint8_t*) &g->OUT) + (data0->number % num_pins_in_port / 8); + + self->command.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->command, command); + common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL); + + self->chip_select.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select); + common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL); + + self->reset.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->reset, reset); + common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); + + self->write.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->write, write); + common_hal_digitalio_digitalinout_switch_to_output(&self->write, true, DRIVE_MODE_PUSH_PULL); + + self->read.base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(&self->read, read); + common_hal_digitalio_digitalinout_switch_to_output(&self->read, true, DRIVE_MODE_PUSH_PULL); + + self->data0_pin = data_pin; + uint8_t num_pins_in_write_port; + if (data0->number < P0_PIN_NUM) { + self->write_group = NRF_P0; + num_pins_in_write_port = P0_PIN_NUM; + } else { + self->write_group = NRF_P1; + num_pins_in_write_port = P1_PIN_NUM; + } + self->write_mask = 1 << (write->number % num_pins_in_write_port); + + never_reset_pin_number(command->number); + never_reset_pin_number(chip_select->number); + never_reset_pin_number(write->number); + never_reset_pin_number(read->number); + never_reset_pin_number(reset->number); + for (uint8_t i = 0; i < 8; i++) { + never_reset_pin_number(data_pin + i); + } +} + +void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) { + for (uint8_t i = 0; i < 8; i++) { + reset_pin_number(self->data0_pin + i); + } + + reset_pin_number(self->command.pin->number); + reset_pin_number(self->chip_select.pin->number); + reset_pin_number(self->write.pin->number); + reset_pin_number(self->read.pin->number); + reset_pin_number(self->reset.pin->number); +} + +bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { + displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); + return true; +} + +void common_hal_displayio_parallelbus_send(mp_obj_t obj, bool command, uint8_t *data, uint32_t data_length) { + displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + common_hal_digitalio_digitalinout_set_value(&self->command, !command); + uint32_t* clear_write = (uint32_t*) &self->write_group->OUTCLR; + uint32_t* set_write = (uint32_t*) &self->write_group->OUTSET; + uint32_t mask = self->write_mask; + for (uint32_t i = 0; i < data_length; i++) { + *clear_write = mask; + *self->bus = data[i]; + *set_write = mask; + } +} + +void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { + displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj); + common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); +} diff --git a/ports/nrf/common-hal/displayio/ParallelBus.h b/ports/nrf/common-hal/displayio/ParallelBus.h new file mode 100644 index 000000000..5c10d3d42 --- /dev/null +++ b/ports/nrf/common-hal/displayio/ParallelBus.h @@ -0,0 +1,45 @@ +/* + * 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. + */ + +#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#define MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H + +#include "common-hal/digitalio/DigitalInOut.h" + +typedef struct { + mp_obj_base_t base; + uint8_t* bus; + digitalio_digitalinout_obj_t command; + digitalio_digitalinout_obj_t chip_select; + digitalio_digitalinout_obj_t reset; + digitalio_digitalinout_obj_t write; + digitalio_digitalinout_obj_t read; + uint8_t data0_pin; + NRF_GPIO_Type* write_group; + uint32_t write_mask; +} displayio_parallelbus_obj_t; + +#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H diff --git a/ports/nrf/common-hal/microcontroller/Pin.h b/ports/nrf/common-hal/microcontroller/Pin.h index 61be8bc35..735ed90cc 100644 --- a/ports/nrf/common-hal/microcontroller/Pin.h +++ b/ports/nrf/common-hal/microcontroller/Pin.h @@ -44,6 +44,7 @@ void reset_all_pins(void); // need to store a full pointer. void reset_pin_number(uint8_t pin); void claim_pin(const mcu_pin_obj_t* pin); +bool pin_number_is_free(uint8_t pin_number); void never_reset_pin_number(uint8_t pin_number); // Lower 5 bits of a pin number are the pin number in a port. diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index d38b14578..b6e5f9fdf 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -235,5 +235,7 @@ void run_background_tasks(void); //#define CIRCUITPY_BOOT_OUTPUT_FILE "/boot_out.txt" #define CIRCUITPY_DEFAULT_STACK_SIZE 4096 +#define CIRCUITPY_DISPLAYIO (1) +#define CIRCUITPY_DISPLAY_LIMIT (3) #endif diff --git a/shared-bindings/displayio/FourWire.h b/shared-bindings/displayio/FourWire.h index 3a9f66d4c..b8b00372c 100644 --- a/shared-bindings/displayio/FourWire.h +++ b/shared-bindings/displayio/FourWire.h @@ -27,7 +27,7 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_FOURWIRE_H #define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_FOURWIRE_H -#include "common-hal/displayio/FourWire.h" +#include "shared-module/displayio/FourWire.h" #include "common-hal/microcontroller/Pin.h" #include "shared-module/displayio/Group.h" diff --git a/shared-module/displayio/FourWire.c b/shared-module/displayio/FourWire.c new file mode 100644 index 000000000..ab01e2609 --- /dev/null +++ b/shared-module/displayio/FourWire.c @@ -0,0 +1,87 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/displayio/FourWire.h" + +#include + +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/digitalio/DigitalInOut.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) { + + self->bus = spi; + common_hal_busio_spi_never_reset(self->bus); + + common_hal_digitalio_digitalinout_construct(&self->command, command); + common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL); + common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select); + common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL); + + common_hal_digitalio_digitalinout_construct(&self->reset, reset); + common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); + + never_reset_pin_number(command->number); + never_reset_pin_number(chip_select->number); + never_reset_pin_number(reset->number); +} + +void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self) { + if (self->bus == &self->inline_bus) { + common_hal_busio_spi_deinit(self->bus); + } + + reset_pin_number(self->command.pin->number); + reset_pin_number(self->chip_select.pin->number); + reset_pin_number(self->reset.pin->number); +} + +bool common_hal_displayio_fourwire_begin_transaction(mp_obj_t obj) { + displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); + if (!common_hal_busio_spi_try_lock(self->bus)) { + return false; + } + // TODO(tannewt): Stop hardcoding SPI frequency, polarity and phase. + common_hal_busio_spi_configure(self->bus, 12000000, 0, 0, 8); + common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); + return true; +} + +void common_hal_displayio_fourwire_send(mp_obj_t obj, bool command, uint8_t *data, uint32_t data_length) { + displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); + common_hal_digitalio_digitalinout_set_value(&self->command, !command); + common_hal_busio_spi_write(self->bus, data, data_length); +} + +void common_hal_displayio_fourwire_end_transaction(mp_obj_t obj) { + displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); + common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); + common_hal_busio_spi_unlock(self->bus); +} diff --git a/shared-module/displayio/FourWire.h b/shared-module/displayio/FourWire.h new file mode 100644 index 000000000..234bcf794 --- /dev/null +++ b/shared-module/displayio/FourWire.h @@ -0,0 +1,43 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_FOURWIRE_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_FOURWIRE_H + +#include "common-hal/busio/SPI.h" +#include "common-hal/digitalio/DigitalInOut.h" +#include "shared-module/displayio/Group.h" + +typedef struct { + mp_obj_base_t base; + busio_spi_obj_t* bus; + busio_spi_obj_t inline_bus; + digitalio_digitalinout_obj_t command; + digitalio_digitalinout_obj_t chip_select; + digitalio_digitalinout_obj_t reset; +} displayio_fourwire_obj_t; + +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_FOURWIRE_H diff --git a/supervisor/shared/board_busses.c b/supervisor/shared/board_busses.c index 84919ebff..38308ccee 100644 --- a/supervisor/shared/board_busses.c +++ b/supervisor/shared/board_busses.c @@ -31,7 +31,6 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/shared/translate.h" #include "mpconfigboard.h" -#include "samd/pins.h" #include "py/runtime.h" #define BOARD_I2C (defined(DEFAULT_I2C_BUS_SDA) && defined(DEFAULT_I2C_BUS_SCL)) -- cgit v1.2.3 From 6404aaf411d7fe5fd96f3a8cbf7a1cb7580a09e7 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 18:19:07 -0800 Subject: Fix up nrf and using board.SPI in FourWire --- main.c | 7 ++- ports/atmel-samd/background.c | 5 +- ports/atmel-samd/mpconfigport.h | 2 + ports/nrf/background.c | 15 ++++-- ports/nrf/boards/feather_nrf52840_express/pins.c | 68 +++++++++++++----------- ports/nrf/common-hal/microcontroller/Pin.c | 7 ++- ports/nrf/mpconfigport.h | 2 + shared-bindings/displayio/Display.c | 3 +- shared-bindings/displayio/FourWire.c | 11 ++-- shared-bindings/displayio/ParallelBus.c | 3 +- shared-module/displayio/FourWire.c | 8 +-- shared-module/displayio/__init__.c | 3 ++ supervisor/shared/board_busses.c | 25 +++++++-- supervisor/shared/board_busses.h | 6 +-- 14 files changed, 109 insertions(+), 56 deletions(-) diff --git a/main.c b/main.c index 02c832e67..e137f7d47 100755 --- a/main.c +++ b/main.c @@ -27,7 +27,6 @@ #include #include -#include "shared-module/displayio/__init__.h" #include "extmod/vfs.h" #include "extmod/vfs_fat.h" @@ -62,6 +61,10 @@ #include "shared-module/network/__init__.h" #endif +#ifdef CIRCUITPY_DISPLAYIO +#include "shared-module/displayio/__init__.h" +#endif + void do_str(const char *src, mp_parse_input_kind_t input_kind) { mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, src, strlen(src), 0); if (lex == NULL) { @@ -200,8 +203,10 @@ bool run_code_py(safe_mode_t safe_mode) { serial_write_compressed(translate("WARNING: Your code filename has two extensions\n")); } } + #ifdef CIRCUITPY_DISPLAYIO // Turn off the display before the heap disappears. reset_displays(); + #endif stop_mp(); free_memory(heap); diff --git a/ports/atmel-samd/background.c b/ports/atmel-samd/background.c index 59e03008a..4f3257f3f 100644 --- a/ports/atmel-samd/background.c +++ b/ports/atmel-samd/background.c @@ -30,10 +30,13 @@ #include "supervisor/usb.h" #include "py/runtime.h" -#include "shared-module/displayio/__init__.h" #include "shared-module/network/__init__.h" #include "supervisor/shared/stack.h" +#ifdef CIRCUITPY_DISPLAYIO +#include "shared-module/displayio/__init__.h" +#endif + volatile uint64_t last_finished_tick = 0; bool stack_ok_so_far = true; diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index a2e4075c4..12410b0be 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -285,6 +285,7 @@ extern const struct _mp_obj_module_t wiznet_module; #define CIRCUITPY_DISPLAY_LIMIT (3) #define DISPLAYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_displayio), (mp_obj_t)&displayio_module }, #else + #define CIRCUITPY_DISPLAY_LIMIT (0) #define DISPLAYIO_MODULE #endif @@ -338,6 +339,7 @@ extern const struct _mp_obj_module_t wiznet_module; #define MICROPY_PY_BUILTINS_COMPLEX (0) #define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (0) + #define CIRCUITPY_DISPLAY_LIMIT (0) #endif // Disabled for now. diff --git a/ports/nrf/background.c b/ports/nrf/background.c index f022b5bc9..69c76fd06 100644 --- a/ports/nrf/background.c +++ b/ports/nrf/background.c @@ -24,15 +24,20 @@ * THE SOFTWARE. */ -#ifdef NRF52840 +#include "py/runtime.h" #include "supervisor/usb.h" -#endif - #include "supervisor/shared/stack.h" +#ifdef CIRCUITPY_DISPLAYIO +#include "shared-module/displayio/__init__.h" +#endif + void run_background_tasks(void) { - #ifdef NRF52840 - usb_background(); + usb_background(); + + #ifdef CIRCUITPY_DISPLAYIO + displayio_refresh_displays(); #endif + assert_heap_ok(); } diff --git a/ports/nrf/boards/feather_nrf52840_express/pins.c b/ports/nrf/boards/feather_nrf52840_express/pins.c index dfb0be6df..c6f643761 100644 --- a/ports/nrf/boards/feather_nrf52840_express/pins.c +++ b/ports/nrf/boards/feather_nrf52840_express/pins.c @@ -3,49 +3,53 @@ #include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, - { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_30) }, - { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_28) }, - { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_02) }, - { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_03) }, - { MP_ROM_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_P0_31) }, - { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_29) }, - { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_29) }, - { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_P1_02) }, - { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, - { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, - { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P0_10) }, - { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_08) }, - { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P0_07) }, - { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_26) }, - { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_27) }, - { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P0_06) }, - { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_08) }, - { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P1_09) }, - { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_P0_16) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_P0_16) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_14) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_13) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_15) }, - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_25) }, - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_24) }, - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_12) }, - { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P1_15) }, - { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_15) }, - { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_15) }, - { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_10) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/nrf/common-hal/microcontroller/Pin.c b/ports/nrf/common-hal/microcontroller/Pin.c index 02847e150..268e2f75d 100644 --- a/ports/nrf/common-hal/microcontroller/Pin.c +++ b/ports/nrf/common-hal/microcontroller/Pin.c @@ -142,6 +142,11 @@ void claim_pin(const mcu_pin_obj_t* pin) { #endif } + +bool pin_number_is_free(uint8_t pin_number) { + return !(claimed_pins[nrf_pin_port(pin_number)] & (1 << nrf_relative_pin_number(pin_number))); +} + bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t *pin) { #ifdef MICROPY_HW_NEOPIXEL if (pin == MICROPY_HW_NEOPIXEL) { @@ -163,5 +168,5 @@ bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t *pin) { } #endif - return !(claimed_pins[nrf_pin_port(pin->number)] & (1 << nrf_relative_pin_number(pin->number))); + return pin_number_is_free(pin->number); } diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index b6e5f9fdf..3ec37960b 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -163,6 +163,7 @@ extern const struct _mp_obj_module_t microcontroller_module; extern const struct _mp_obj_module_t bitbangio_module; extern const struct _mp_obj_module_t analogio_module; extern const struct _mp_obj_module_t digitalio_module; +extern const struct _mp_obj_module_t displayio_module; extern const struct _mp_obj_module_t pulseio_module; extern const struct _mp_obj_module_t busio_module; extern const struct _mp_obj_module_t board_module; @@ -195,6 +196,7 @@ extern const struct _mp_obj_module_t bleio_module; { MP_OBJ_NEW_QSTR (MP_QSTR_busio ), (mp_obj_t)&busio_module }, \ { MP_OBJ_NEW_QSTR (MP_QSTR_analogio ), (mp_obj_t)&analogio_module }, \ { MP_OBJ_NEW_QSTR (MP_QSTR_digitalio ), (mp_obj_t)&digitalio_module }, \ + { MP_OBJ_NEW_QSTR (MP_QSTR_displayio ), (mp_obj_t)&displayio_module }, \ { MP_OBJ_NEW_QSTR (MP_QSTR_pulseio ), (mp_obj_t)&pulseio_module }, \ { MP_OBJ_NEW_QSTR (MP_QSTR_microcontroller ), (mp_obj_t)µcontroller_module }, \ { MP_OBJ_NEW_QSTR (MP_QSTR_neopixel_write ), (mp_obj_t)&neopixel_write_module }, \ diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 21f44965e..9028c2865 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -83,7 +83,8 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a displayio_display_obj_t *self = NULL; for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].display.base.type == NULL) { + if (displays[i].display.base.type == NULL || + displays[i].display.base.type == &mp_type_NoneType) { self = &displays[i].display; break; } diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c index 9833fbc64..530eafb51 100644 --- a/shared-bindings/displayio/FourWire.c +++ b/shared-bindings/displayio/FourWire.c @@ -65,18 +65,23 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_ mp_obj_t command = args[ARG_command].u_obj; mp_obj_t chip_select = args[ARG_chip_select].u_obj; - mp_obj_t reset = args[ARG_reset].u_obj; if (command == mp_const_none || chip_select == mp_const_none) { mp_raise_ValueError(translate("Command and chip_select required")); } assert_pin_free(command); assert_pin_free(chip_select); - assert_pin_free(reset); + mp_obj_t reset = args[ARG_reset].u_obj; + if (reset != mp_const_none) { + assert_pin_free(reset); + } else { + reset = NULL; + } displayio_fourwire_obj_t* self = NULL; mp_obj_t spi = args[ARG_spi_bus].u_obj; for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].fourwire_bus.base.type== NULL) { + if (displays[i].fourwire_bus.base.type == NULL || + displays[i].fourwire_bus.base.type == &mp_type_NoneType) { self = &displays[i].fourwire_bus; self->base.type = &displayio_fourwire_type; break; diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c index aa861bb81..e1079acb5 100644 --- a/shared-bindings/displayio/ParallelBus.c +++ b/shared-bindings/displayio/ParallelBus.c @@ -83,7 +83,8 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t displayio_parallelbus_obj_t* self = NULL; for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].parallel_bus.base.type== NULL) { + if (displays[i].parallel_bus.base.type== NULL || + displays[i].parallel_bus.base.type == &mp_type_NoneType) { self = &displays[i].parallel_bus; self->base.type = &displayio_parallelbus_type; break; diff --git a/shared-module/displayio/FourWire.c b/shared-module/displayio/FourWire.c index ab01e2609..9da5c0701 100644 --- a/shared-module/displayio/FourWire.c +++ b/shared-module/displayio/FourWire.c @@ -45,12 +45,14 @@ void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select); common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL); - common_hal_digitalio_digitalinout_construct(&self->reset, reset); - common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); + if (reset != NULL) { + common_hal_digitalio_digitalinout_construct(&self->reset, reset); + common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); + never_reset_pin_number(reset->number); + } never_reset_pin_number(command->number); never_reset_pin_number(chip_select->number); - never_reset_pin_number(reset->number); } void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self) { diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index 92d97a6ef..ccabe9c9d 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -151,6 +151,9 @@ void reset_displays(void) { if (((uint32_t) fourwire->bus) < ((uint32_t) &displays) || ((uint32_t) fourwire->bus) > ((uint32_t) &displays + CIRCUITPY_DISPLAY_LIMIT)) { busio_spi_obj_t* original_spi = fourwire->bus; + if (original_spi == board_spi()) { + continue; + } memcpy(&fourwire->inline_bus, original_spi, sizeof(busio_spi_obj_t)); fourwire->bus = &fourwire->inline_bus; // Check for other displays that use the same spi bus and swap them too. diff --git a/supervisor/shared/board_busses.c b/supervisor/shared/board_busses.c index 38308ccee..ed1f98a58 100644 --- a/supervisor/shared/board_busses.c +++ b/supervisor/shared/board_busses.c @@ -33,6 +33,10 @@ #include "mpconfigboard.h" #include "py/runtime.h" +#ifdef CIRCUITPY_DISPLAYIO +#include "shared-module/displayio/__init__.h" +#endif + #define BOARD_I2C (defined(DEFAULT_I2C_BUS_SDA) && defined(DEFAULT_I2C_BUS_SCL)) #define BOARD_SPI (defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MISO) && defined(DEFAULT_SPI_BUS_MOSI)) #define BOARD_UART (defined(DEFAULT_UART_BUS_RX) && defined(DEFAULT_UART_BUS_TX)) @@ -40,7 +44,7 @@ #if BOARD_I2C STATIC mp_obj_t i2c_singleton = NULL; -STATIC mp_obj_t board_i2c(void) { +mp_obj_t board_i2c(void) { if (i2c_singleton == NULL) { busio_i2c_obj_t *self = m_new_obj(busio_i2c_obj_t); @@ -54,7 +58,7 @@ STATIC mp_obj_t board_i2c(void) { return i2c_singleton; } #else -STATIC mp_obj_t board_i2c(void) { +mp_obj_t board_i2c(void) { mp_raise_NotImplementedError(translate("No default I2C bus")); return NULL; } @@ -91,7 +95,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi); #if BOARD_UART STATIC mp_obj_t uart_singleton = NULL; -STATIC mp_obj_t board_uart(void) { +mp_obj_t board_uart(void) { if (uart_singleton == NULL) { busio_uart_obj_t *self = m_new_obj(busio_uart_obj_t); self->base.type = &busio_uart_type; @@ -108,7 +112,7 @@ STATIC mp_obj_t board_uart(void) { return uart_singleton; } #else -STATIC mp_obj_t board_uart(void) { +mp_obj_t board_uart(void) { mp_raise_NotImplementedError(translate("No default UART bus")); return NULL; } @@ -121,7 +125,18 @@ void reset_board_busses(void) { i2c_singleton = NULL; #endif #if BOARD_SPI - spi_singleton = NULL; + bool display_using_spi = false; + #ifdef CIRCUITPY_DISPLAYIO + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + if (displays[i].fourwire_bus.bus == spi_singleton) { + display_using_spi = true; + break; + } + } + #endif + if (!display_using_spi) { + spi_singleton = NULL; + } #endif #if BOARD_UART uart_singleton = NULL; diff --git a/supervisor/shared/board_busses.h b/supervisor/shared/board_busses.h index f6a8a4296..0ccb3ba6a 100644 --- a/supervisor/shared/board_busses.h +++ b/supervisor/shared/board_busses.h @@ -30,13 +30,13 @@ #include "py/obj.h" mp_obj_t board_i2c(void); -extern mp_obj_fun_builtin_fixed_t board_i2c_obj; +MP_DECLARE_CONST_FUN_OBJ_0(board_i2c_obj); mp_obj_t board_spi(void); -extern mp_obj_fun_builtin_fixed_t board_spi_obj; +MP_DECLARE_CONST_FUN_OBJ_0(board_spi_obj); mp_obj_t board_uart(void); -extern mp_obj_fun_builtin_fixed_t board_uart_obj; +MP_DECLARE_CONST_FUN_OBJ_0(board_uart_obj); void reset_board_busses(void); -- cgit v1.2.3 From fddc98858afb19b87a2ed65b4d2b301b3e1ce667 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 18:51:40 -0800 Subject: fix nonetype handling and nrf never reset --- ports/nrf/common-hal/microcontroller/Pin.c | 2 +- shared-module/displayio/__init__.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/nrf/common-hal/microcontroller/Pin.c b/ports/nrf/common-hal/microcontroller/Pin.c index 268e2f75d..112654c7e 100644 --- a/ports/nrf/common-hal/microcontroller/Pin.c +++ b/ports/nrf/common-hal/microcontroller/Pin.c @@ -53,7 +53,7 @@ void reset_all_pins(void) { } for (uint32_t pin = 0; pin < NUMBER_OF_PINS; ++pin) { - if (!(never_reset_pins[nrf_pin_port(pin)] & (1 << nrf_relative_pin_number(pin)))) { + if ((never_reset_pins[nrf_pin_port(pin)] & (1 << nrf_relative_pin_number(pin))) != 0) { continue; } nrf_gpio_cfg_default(pin); diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index ccabe9c9d..c8132e2f9 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -13,7 +13,7 @@ primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT]; void displayio_refresh_displays(void) { for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].display.base.type == NULL) { + if (displays[i].display.base.type == NULL || displays[i].display.base.type == &mp_type_NoneType) { continue; } displayio_display_obj_t* display = &displays[i].display; -- cgit v1.2.3 From 96e2c717fc9fa94ad6fd3784d1a9dd693efdb780 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 22:10:11 -0800 Subject: Fix build --- ports/atmel-samd/mpconfigport.h | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 12410b0be..86edc9039 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -192,7 +192,6 @@ typedef long mp_off_t; #define MICROPY_PY_REVERSE_SPECIAL_METHODS (1) #define MICROPY_PY_SYS_EXC_INFO (1) // MICROPY_PY_UERRNO_LIST - Use the default -#define CIRCUITPY_DISPLAY_LIMIT (3) #endif #ifdef LONGINT_IMPL_NONE -- cgit v1.2.3 From 41dad1ea1eb5126ec7e80173a0fb74d9707b1e56 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 11:43:35 -0800 Subject: Fix pin defs --- .../boards/grandcentral_m4_express/pins.c | 228 ++++++++++----------- ports/atmel-samd/boards/metro_m4_express/pins.c | 62 +++--- ports/atmel-samd/boards/pyportal/pins.c | 88 ++++---- 3 files changed, 189 insertions(+), 189 deletions(-) diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c index 0d19a63ef..26d0e71a0 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c +++ b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c @@ -5,129 +5,129 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_map_elem_t board_global_dict_table[] = { - { MP_OBJ_NEW_QSTR(MP_QSTR_AREF), (mp_obj_t)&pin_PA03 }, +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_OBJ_NEW_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_PA03) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A0), (mp_obj_t)&pin_PA02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A1), (mp_obj_t)&pin_PA05 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A2), (mp_obj_t)&pin_PB03 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A3), (mp_obj_t)&pin_PC00 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A4), (mp_obj_t)&pin_PC01 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A5), (mp_obj_t)&pin_PC02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A6), (mp_obj_t)&pin_PC03 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A7), (mp_obj_t)&pin_PB04 }, + { 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_PB03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PC00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PC01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PC02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PC03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A8), (mp_obj_t)&pin_PB05 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A9), (mp_obj_t)&pin_PB06 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A10), (mp_obj_t)&pin_PB07 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A11), (mp_obj_t)&pin_PB08 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A12), (mp_obj_t)&pin_PB09 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A13), (mp_obj_t)&pin_PA04 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A14), (mp_obj_t)&pin_PA06 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A15), (mp_obj_t)&pin_PA07 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PB07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PB08) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A12), MP_ROM_PTR(&pin_PB09) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A13), MP_ROM_PTR(&pin_PA04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A14), MP_ROM_PTR(&pin_PA06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A15), MP_ROM_PTR(&pin_PA07) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D0), (mp_obj_t)&pin_PB25 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PB25 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D1), (mp_obj_t)&pin_PB24 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PB24 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D2), (mp_obj_t)&pin_PC18 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D3), (mp_obj_t)&pin_PC19 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D4), (mp_obj_t)&pin_PC20 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D5), (mp_obj_t)&pin_PC21 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D6), (mp_obj_t)&pin_PD20 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D7), (mp_obj_t)&pin_PD21 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D8), (mp_obj_t)&pin_PB18 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D9), (mp_obj_t)&pin_PB02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D10), (mp_obj_t)&pin_PB22 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D11), (mp_obj_t)&pin_PB23 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D12), (mp_obj_t)&pin_PB00 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D13), (mp_obj_t)&pin_PB01 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB25) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB25) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB24) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB24) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PC18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PC19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PC20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PD20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PD21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PB02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PB22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PB23) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PB00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB01) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TX3), (mp_obj_t)&pin_PB16 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D14), (mp_obj_t)&pin_PB16 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_RX3), (mp_obj_t)&pin_PB17 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D15), (mp_obj_t)&pin_PB17 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TX2), (mp_obj_t)&pin_PC22 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D16), (mp_obj_t)&pin_PC22 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_RX2), (mp_obj_t)&pin_PC23 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D17), (mp_obj_t)&pin_PC23 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TX1), (mp_obj_t)&pin_PB12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D18), (mp_obj_t)&pin_PB12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_RX1), (mp_obj_t)&pin_PB13 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D19), (mp_obj_t)&pin_PB13 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D20), (mp_obj_t)&pin_PB20 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), (mp_obj_t)&pin_PB20 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D21), (mp_obj_t)&pin_PB21 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), (mp_obj_t)&pin_PB21 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX3), MP_ROM_PTR(&pin_PB16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX3), MP_ROM_PTR(&pin_PB17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PB17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_PC22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_PC22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_PC23) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_PC23) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_PB12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_PB12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_PB13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_PB13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_PB20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_PB21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB21) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D22), (mp_obj_t)&pin_PD12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D23), (mp_obj_t)&pin_PA15 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D24), (mp_obj_t)&pin_PC17 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SCL1), (mp_obj_t)&pin_PC17 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D25), (mp_obj_t)&pin_PC16 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SDA1), (mp_obj_t)&pin_PC16 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D26), (mp_obj_t)&pin_PA12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_DEN1), (mp_obj_t)&pin_PA12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D27), (mp_obj_t)&pin_PA13 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_DEN2), (mp_obj_t)&pin_PA13 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D28), (mp_obj_t)&pin_PA14 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_CLK), (mp_obj_t)&pin_PA14 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D29), (mp_obj_t)&pin_PB19 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_XCLK), (mp_obj_t)&pin_PB19 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D30), (mp_obj_t)&pin_PA23 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D7), (mp_obj_t)&pin_PA23 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D31), (mp_obj_t)&pin_PA22 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D6), (mp_obj_t)&pin_PA22 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D32), (mp_obj_t)&pin_PA21 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D5), (mp_obj_t)&pin_PA21 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D33), (mp_obj_t)&pin_PA20 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D4), (mp_obj_t)&pin_PA20 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D34), (mp_obj_t)&pin_PA19 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D3), (mp_obj_t)&pin_PA19 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D35), (mp_obj_t)&pin_PA18 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D2), (mp_obj_t)&pin_PA18 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D36), (mp_obj_t)&pin_PA17 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D1), (mp_obj_t)&pin_PA17 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D37), (mp_obj_t)&pin_PA16 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D0), (mp_obj_t)&pin_PA16 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D38), (mp_obj_t)&pin_PB15 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D9), (mp_obj_t)&pin_PB15 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D39), (mp_obj_t)&pin_PB14 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D8), (mp_obj_t)&pin_PB14 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D40), (mp_obj_t)&pin_PC13 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D11), (mp_obj_t)&pin_PC13 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D41), (mp_obj_t)&pin_PC12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D10), (mp_obj_t)&pin_PC12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D42), (mp_obj_t)&pin_PC15 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D13), (mp_obj_t)&pin_PC15 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D43), (mp_obj_t)&pin_PC14 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D12), (mp_obj_t)&pin_PC14 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D44), (mp_obj_t)&pin_PC11 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D45), (mp_obj_t)&pin_PC10 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D46), (mp_obj_t)&pin_PC06 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D47), (mp_obj_t)&pin_PC07 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D48), (mp_obj_t)&pin_PC04 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D49), (mp_obj_t)&pin_PC05 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D50), (mp_obj_t)&pin_PD11 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), (mp_obj_t)&pin_PD11 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D51), (mp_obj_t)&pin_PD08 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), (mp_obj_t)&pin_PD08 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D52), (mp_obj_t)&pin_PD09 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), (mp_obj_t)&pin_PD09 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D53), (mp_obj_t)&pin_PD10 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SS), (mp_obj_t)&pin_PD10 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_PD12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_PA15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_PC17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_PC17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_PC16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_PC16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_PA12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_DEN1), MP_ROM_PTR(&pin_PA12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_PA13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_DEN2), MP_ROM_PTR(&pin_PA13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_PA14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_CLK), MP_ROM_PTR(&pin_PA14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_PB19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_XCLK), MP_ROM_PTR(&pin_PB19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_PA23) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D7), MP_ROM_PTR(&pin_PA23) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_PA22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D6), MP_ROM_PTR(&pin_PA22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_PA21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D5), MP_ROM_PTR(&pin_PA21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_PA20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D4), MP_ROM_PTR(&pin_PA20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_PA19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D3), MP_ROM_PTR(&pin_PA19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_PA18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D2), MP_ROM_PTR(&pin_PA18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_PA17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D1), MP_ROM_PTR(&pin_PA17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_PA16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D0), MP_ROM_PTR(&pin_PA16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D38), MP_ROM_PTR(&pin_PB15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D9), MP_ROM_PTR(&pin_PB15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D39), MP_ROM_PTR(&pin_PB14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D8), MP_ROM_PTR(&pin_PB14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_PC13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D11), MP_ROM_PTR(&pin_PC13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_PC12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D10), MP_ROM_PTR(&pin_PC12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_PC15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D13), MP_ROM_PTR(&pin_PC15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D43), MP_ROM_PTR(&pin_PC14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PCC_D12), MP_ROM_PTR(&pin_PC14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D44), MP_ROM_PTR(&pin_PC11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D45), MP_ROM_PTR(&pin_PC10) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D46), MP_ROM_PTR(&pin_PC06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D47), MP_ROM_PTR(&pin_PC07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D48), MP_ROM_PTR(&pin_PC04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D49), MP_ROM_PTR(&pin_PC05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D50), MP_ROM_PTR(&pin_PD11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PD11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D51), MP_ROM_PTR(&pin_PD08) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PD08) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D52), MP_ROM_PTR(&pin_PD09) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PD09) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D53), MP_ROM_PTR(&pin_PD10) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PD10) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SD_MOSI), (mp_obj_t)&pin_PB26 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SD_SCK), (mp_obj_t)&pin_PB27 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), (mp_obj_t)&pin_PB28 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SD_MISO), (mp_obj_t)&pin_PB29 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_PB26) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_PB27) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PB28) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_PB29) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CARD_DETECT), (mp_obj_t)&pin_PB31 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CARD_DETECT), MP_ROM_PTR(&pin_PB31) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), (mp_obj_t)&pin_PC24 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PC24) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX), (mp_obj_t)&pin_PC31 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX), (mp_obj_t)&pin_PC30 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PC31) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PC30) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, diff --git a/ports/atmel-samd/boards/metro_m4_express/pins.c b/ports/atmel-samd/boards/metro_m4_express/pins.c index dd419aec6..63ae319a2 100644 --- a/ports/atmel-samd/boards/metro_m4_express/pins.c +++ b/ports/atmel-samd/boards/metro_m4_express/pins.c @@ -5,42 +5,42 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_map_elem_t board_global_dict_table[] = { - { MP_OBJ_NEW_QSTR(MP_QSTR_A0), (mp_obj_t)&pin_PA02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A1), (mp_obj_t)&pin_PA05 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A2), (mp_obj_t)&pin_PA06 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A3), (mp_obj_t)&pin_PA04 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A4), (mp_obj_t)&pin_PB08 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A5), (mp_obj_t)&pin_PB09 }, +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_PA06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB08) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB09) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D0), (mp_obj_t)&pin_PA23 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PA23 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D1), (mp_obj_t)&pin_PA22 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PA22 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D2), (mp_obj_t)&pin_PB17 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D3), (mp_obj_t)&pin_PB16 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D4), (mp_obj_t)&pin_PB13 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D5), (mp_obj_t)&pin_PB14 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D6), (mp_obj_t)&pin_PB15 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D7), (mp_obj_t)&pin_PB12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D8), (mp_obj_t)&pin_PA21 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D9), (mp_obj_t)&pin_PA20 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D10), (mp_obj_t)&pin_PA18 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D11), (mp_obj_t)&pin_PA19 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D12), (mp_obj_t)&pin_PA17 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D13), (mp_obj_t)&pin_PA16 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA23) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA23) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PB13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PB14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PB15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D13),MP_ROM_PTR(&pin_PA16) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), (mp_obj_t)&pin_PB02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), (mp_obj_t)&pin_PB03 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_PB02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_PB03) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), (mp_obj_t)&pin_PB22 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL),MP_ROM_PTR(&pin_PB22) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), (mp_obj_t)&pin_PA13 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), (mp_obj_t)&pin_PA12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), (mp_obj_t)&pin_PA14 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK),MP_ROM_PTR(&pin_PA13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_PA12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_PA14) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX), (mp_obj_t)&pin_PB06 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX), (mp_obj_t)&pin_PA27 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX),MP_ROM_PTR(&pin_PB06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX),MP_ROM_PTR(&pin_PA27) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, diff --git a/ports/atmel-samd/boards/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c index 6b1254dfc..9a5c5b1a5 100644 --- a/ports/atmel-samd/boards/pyportal/pins.c +++ b/ports/atmel-samd/boards/pyportal/pins.c @@ -7,68 +7,68 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_map_elem_t board_global_dict_table[] = { - { MP_OBJ_NEW_QSTR(MP_QSTR_AUDIO_OUT), (mp_obj_t)&pin_PA02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_A0), (mp_obj_t)&pin_PA02 }, // analog out/in +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_OBJ_NEW_QSTR(MP_QSTR_AUDIO_OUT), MP_ROM_PTR(&pin_PA02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, // analog out/in // STEMMA connectors - { MP_OBJ_NEW_QSTR(MP_QSTR_A1), (mp_obj_t)&pin_PB02 }, // SDA - { MP_OBJ_NEW_QSTR(MP_QSTR_A2), (mp_obj_t)&pin_PB03 }, // SCL - { MP_OBJ_NEW_QSTR(MP_QSTR_A3), (mp_obj_t)&pin_PB00 }, // D3 - { MP_OBJ_NEW_QSTR(MP_QSTR_D3), (mp_obj_t)&pin_PB00 }, // D3 - { MP_OBJ_NEW_QSTR(MP_QSTR_A4), (mp_obj_t)&pin_PB01 }, // D4 - { MP_OBJ_NEW_QSTR(MP_QSTR_D4), (mp_obj_t)&pin_PB01 }, // D4 + { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, // SDA + { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB03) }, // SCL + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB00) }, // D3 + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB00) }, // D3 + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB01) }, // D4 + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PB01) }, // D4 // Indicator LED - { MP_OBJ_NEW_QSTR(MP_QSTR_D13), (mp_obj_t)&pin_PA27 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_L), (mp_obj_t)&pin_PA27 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), (mp_obj_t)&pin_PB22 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA27) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_PA27) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL),MP_ROM_PTR(&pin_PB22) }, // LCD pins - { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RESET), (mp_obj_t)&pin_PA00 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RD), (mp_obj_t)&pin_PB04 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RS), (mp_obj_t)&pin_PB05 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_CS), (mp_obj_t)&pin_PB06 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_TE), (mp_obj_t)&pin_PB07 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_WR), (mp_obj_t)&pin_PB09 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_BACKLIGHT), (mp_obj_t)&pin_PB31 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA0), (mp_obj_t)&pin_PA16 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA1), (mp_obj_t)&pin_PA17 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA2), (mp_obj_t)&pin_PA18 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA3), (mp_obj_t)&pin_PA19 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA4), (mp_obj_t)&pin_PA20 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA5), (mp_obj_t)&pin_PA21 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA6), (mp_obj_t)&pin_PA22 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA7), (mp_obj_t)&pin_PA23 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_PA00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RD), MP_ROM_PTR(&pin_PB04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RS), MP_ROM_PTR(&pin_PB05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_PB06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_TE), MP_ROM_PTR(&pin_PB07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_WR), MP_ROM_PTR(&pin_PB09) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_PB31) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA0), MP_ROM_PTR(&pin_PA16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA1), MP_ROM_PTR(&pin_PA17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA2), MP_ROM_PTR(&pin_PA18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA3), MP_ROM_PTR(&pin_PA19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA4), MP_ROM_PTR(&pin_PA20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA5), MP_ROM_PTR(&pin_PA21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA6), MP_ROM_PTR(&pin_PA22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA7), MP_ROM_PTR(&pin_PA23) }, // Touch pins - { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_YD), (mp_obj_t)&pin_PA04 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_XL), (mp_obj_t)&pin_PA05 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_YU), (mp_obj_t)&pin_PA06 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_XR), (mp_obj_t)&pin_PB08 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_YD), MP_ROM_PTR(&pin_PA04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_XL), MP_ROM_PTR(&pin_PA05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_YU), MP_ROM_PTR(&pin_PA06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_XR), MP_ROM_PTR(&pin_PB08) }, // ESP control - { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_CS), (mp_obj_t)&pin_PA15 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), (mp_obj_t)&pin_PB14 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_GPIO0), (mp_obj_t)&pin_PB15 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), (mp_obj_t)&pin_PB16 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_CS), MP_ROM_PTR(&pin_PA15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PB14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_GPIO0), MP_ROM_PTR(&pin_PB15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_PB16) }, // UART - { MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PB12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PB13 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB13) }, // SPI - { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), (mp_obj_t)&pin_PA12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), (mp_obj_t)&pin_PA13 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), (mp_obj_t)&pin_PA14 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_PA12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK),MP_ROM_PTR(&pin_PA13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_PA14) }, // I2C - { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), (mp_obj_t)&pin_PB02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), (mp_obj_t)&pin_PB03 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_PB02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_PB03) }, // SD Card - { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), (mp_obj_t)&pin_PB30 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CARD_DETECT), (mp_obj_t)&pin_PA01 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS),MP_ROM_PTR(&pin_PB30) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CARD_DETECT),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) }, -- cgit v1.2.3 From 427766ac6913ae3b838e29f5cd1dc9b782c7d56a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 11:44:53 -0800 Subject: Update translations --- locale/ID.po | 288 +++++++++++++++++++++++--------------- locale/circuitpython.pot | 273 ++++++++++++++++++++++-------------- locale/de_DE.po | 308 ++++++++++++++++++++++++---------------- locale/en_US.po | 273 ++++++++++++++++++++++-------------- locale/es.po | 355 ++++++++++++++++++++++++++++------------------- locale/fil.po | 335 ++++++++++++++++++++++++++------------------ locale/fr.po | 327 ++++++++++++++++++++++++++----------------- locale/it_IT.po | 325 ++++++++++++++++++++++++++----------------- locale/pt_BR.po | 308 ++++++++++++++++++++++++---------------- 9 files changed, 1705 insertions(+), 1087 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 952e12d4d..ae18a14d0 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-01-10 21:32-0500\n" +"POT-Creation-Date: 2019-01-18 11:43-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -151,11 +151,11 @@ msgstr "argumen-argumen tidak valid" msgid "script compilation not supported" msgstr "kompilasi script tidak didukung" -#: main.c:150 +#: main.c:155 msgid " output:\n" msgstr "output:\n" -#: main.c:164 main.c:237 +#: main.c:169 main.c:247 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -163,30 +163,30 @@ msgstr "" "Auto-reload aktif. Silahkan simpan data-data (files) melalui USB untuk " "menjalankannya atau masuk ke REPL untukmenonaktifkan.\n" -#: main.c:166 +#: main.c:171 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Berjalan di mode aman(safe mode)! Auto-reload tidak aktif.\n" -#: main.c:168 main.c:239 +#: main.c:173 main.c:249 msgid "Auto-reload is off.\n" msgstr "Auto-reload tidak aktif.\n" -#: main.c:182 +#: main.c:187 msgid "Running in safe mode! Not running saved code.\n" msgstr "" "Berjalan di mode aman(safe mode)! tidak menjalankan kode yang tersimpan.\n" -#: main.c:198 +#: main.c:203 msgid "WARNING: Your code filename has two extensions\n" msgstr "PERINGATAN: Nama file kode anda mempunyai dua ekstensi\n" -#: main.c:244 +#: main.c:254 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" "Tekan tombol apa saja untuk masuk ke dalam REPL. Gunakan CTRL+D untuk reset " "(Reload)" -#: main.c:407 +#: main.c:417 msgid "soft reboot\n" msgstr "memulai ulang software(soft reboot)\n" @@ -203,18 +203,6 @@ msgstr "kalibrasi adalah read only" msgid "calibration is out of range" msgstr "kalibrasi keluar dari jangkauan" -#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 -msgid "No default I2C bus" -msgstr "Tidak ada standar bus I2C" - -#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64 -msgid "No default SPI bus" -msgstr "Tidak ada standar bus SPI" - -#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91 -msgid "No default UART bus" -msgstr "Tidak ada standar bus UART" - #: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63 #: ports/nrf/common-hal/analogio/AnalogIn.c:39 msgid "Pin does not have ADC capabilities" @@ -333,7 +321,7 @@ msgid "Not enough pins available" msgstr "Pin yang tersedia tidak cukup" #: ports/atmel-samd/common-hal/busio/I2C.c:78 -#: ports/atmel-samd/common-hal/busio/SPI.c:171 +#: ports/atmel-samd/common-hal/busio/SPI.c:176 #: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:84 @@ -381,6 +369,17 @@ msgstr "Tidak ada pin TX" msgid "Cannot get pull while in output mode" msgstr "Tidak bisa mendapatkan pull pada saat mode output" +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:43 +#: ports/nrf/common-hal/displayio/ParallelBus.c:43 +msgid "Data 0 pin must be byte aligned" +msgstr "" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:47 +#: ports/nrf/common-hal/displayio/ParallelBus.c:47 +#, fuzzy, c-format +msgid "Bus pin %d is already in use" +msgstr "DAC sudah digunakan" + #: ports/atmel-samd/common-hal/microcontroller/__init__.c:74 #: ports/esp8266/common-hal/microcontroller/__init__.c:64 msgid "Cannot reset into bootloader because no bootloader is present." @@ -901,46 +900,46 @@ msgstr "Tidak tahu cara meloloskan objek ke fungsi native" msgid "[addrinfo error %d]" msgstr "[addrinfo error %d]" -#: py/argcheck.c:44 +#: py/argcheck.c:53 msgid "function does not take keyword arguments" msgstr "fungsi tidak dapat mengambil argumen keyword" -#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "fungsi mengambil posisi argumen %d tapi %d yang diberikan" -#: py/argcheck.c:64 +#: py/argcheck.c:73 #, c-format msgid "function missing %d required positional arguments" msgstr "fungsi kehilangan %d argumen posisi yang dibutuhkan" -#: py/argcheck.c:72 +#: py/argcheck.c:81 #, c-format msgid "function expected at most %d arguments, got %d" msgstr "fungsi diharapkan setidaknya %d argumen, hanya mendapatkan %d" -#: py/argcheck.c:97 +#: py/argcheck.c:106 msgid "'%q' argument required" msgstr "'%q' argumen dibutuhkan" -#: py/argcheck.c:122 +#: py/argcheck.c:131 msgid "extra positional arguments given" msgstr "argumen posisi ekstra telah diberikan" -#: py/argcheck.c:130 +#: py/argcheck.c:139 msgid "extra keyword arguments given" msgstr "argumen keyword ekstra telah diberikan" -#: py/argcheck.c:142 +#: py/argcheck.c:151 msgid "argument num/types mismatch" msgstr "argumen num/types tidak cocok" -#: py/argcheck.c:147 +#: py/argcheck.c:156 msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "argumen keyword belum diimplementasi - gunakan args normal" -#: py/bc.c:88 py/objnamedtuple.c:108 +#: py/bc.c:88 py/objnamedtuple.c:109 msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() mengambil posisi argumen %d tapi %d yang diberikan" @@ -952,11 +951,11 @@ msgstr "argumen keyword tidak diharapkan" msgid "keywords must be strings" msgstr "keyword harus berupa string" -#: py/bc.c:206 py/objnamedtuple.c:138 +#: py/bc.c:206 py/objnamedtuple.c:139 msgid "function got multiple values for argument '%q'" msgstr "fungsi mendapatkan nilai ganda untuk argumen '%q'" -#: py/bc.c:218 py/objnamedtuple.c:130 +#: py/bc.c:218 py/objnamedtuple.c:131 msgid "unexpected keyword argument '%q'" msgstr "keyword argumen '%q' tidak diharapkan" @@ -1544,11 +1543,11 @@ msgstr "" msgid "empty" msgstr "" -#: py/objdict.c:314 +#: py/objdict.c:312 msgid "popitem(): dictionary is empty" msgstr "" -#: py/objdict.c:357 +#: py/objdict.c:355 msgid "dict update sequence has wrong length" msgstr "" @@ -1809,69 +1808,69 @@ msgstr "" msgid "string index out of range" msgstr "" -#: py/objtype.c:358 +#: py/objtype.c:368 msgid "__init__() should return None" msgstr "" -#: py/objtype.c:360 +#: py/objtype.c:370 #, c-format msgid "__init__() should return None, not '%s'" msgstr "" -#: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065 +#: py/objtype.c:633 py/objtype.c:1287 py/runtime.c:1065 msgid "unreadable attribute" msgstr "" -#: py/objtype.c:868 py/runtime.c:653 +#: py/objtype.c:878 py/runtime.c:653 msgid "object not callable" msgstr "" -#: py/objtype.c:870 py/runtime.c:655 +#: py/objtype.c:880 py/runtime.c:655 #, c-format msgid "'%s' object is not callable" msgstr "" -#: py/objtype.c:978 +#: py/objtype.c:988 msgid "type takes 1 or 3 arguments" msgstr "" -#: py/objtype.c:989 +#: py/objtype.c:999 msgid "cannot create instance" msgstr "" -#: py/objtype.c:991 +#: py/objtype.c:1001 msgid "cannot create '%q' instances" msgstr "" -#: py/objtype.c:1047 +#: py/objtype.c:1059 msgid "can't add special method to already-subclassed class" msgstr "" -#: py/objtype.c:1091 py/objtype.c:1097 +#: py/objtype.c:1103 py/objtype.c:1109 msgid "type is not an acceptable base type" msgstr "" -#: py/objtype.c:1100 +#: py/objtype.c:1112 msgid "type '%q' is not an acceptable base type" msgstr "" -#: py/objtype.c:1137 +#: py/objtype.c:1149 msgid "multiple inheritance not supported" msgstr "" -#: py/objtype.c:1164 +#: py/objtype.c:1176 msgid "multiple bases have instance lay-out conflict" msgstr "" -#: py/objtype.c:1205 +#: py/objtype.c:1217 msgid "first argument to super() must be type" msgstr "" -#: py/objtype.c:1370 +#: py/objtype.c:1382 msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: py/objtype.c:1384 +#: py/objtype.c:1396 msgid "issubclass() arg 1 must be a class" msgstr "" @@ -2067,8 +2066,8 @@ msgstr "" msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "" -#: shared-bindings/audiobusio/I2SOut.c:225 -#: shared-bindings/audioio/AudioOut.c:226 +#: shared-bindings/audiobusio/I2SOut.c:222 +#: shared-bindings/audioio/AudioOut.c:223 msgid "Not playing" msgstr "" @@ -2105,29 +2104,29 @@ msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" msgstr "" -#: shared-bindings/audioio/Mixer.c:94 +#: shared-bindings/audioio/Mixer.c:91 msgid "Invalid voice count" msgstr "" -#: shared-bindings/audioio/Mixer.c:99 +#: shared-bindings/audioio/Mixer.c:96 msgid "Invalid channel count" msgstr "" -#: shared-bindings/audioio/Mixer.c:103 +#: shared-bindings/audioio/Mixer.c:100 msgid "Sample rate must be positive" msgstr "" -#: shared-bindings/audioio/Mixer.c:107 +#: shared-bindings/audioio/Mixer.c:104 msgid "bits_per_sample must be 8 or 16" msgstr "" -#: shared-bindings/audioio/RawSample.c:98 +#: shared-bindings/audioio/RawSample.c:95 msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" msgstr "" -#: shared-bindings/audioio/RawSample.c:104 +#: shared-bindings/audioio/RawSample.c:101 msgid "buffer must be a bytes-like object" msgstr "" @@ -2136,52 +2135,52 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" -#: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 -#: shared-bindings/busio/SPI.c:133 +#: shared-bindings/bitbangio/I2C.c:109 shared-bindings/bitbangio/SPI.c:119 +#: shared-bindings/busio/SPI.c:130 msgid "Function requires lock" msgstr "" -#: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210 +#: shared-bindings/bitbangio/I2C.c:193 shared-bindings/busio/I2C.c:207 msgid "Buffer must be at least length 1" msgstr "" -#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175 +#: shared-bindings/bitbangio/SPI.c:149 shared-bindings/busio/SPI.c:172 msgid "Invalid polarity" msgstr "" -#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179 +#: shared-bindings/bitbangio/SPI.c:153 shared-bindings/busio/SPI.c:176 msgid "Invalid phase" msgstr "" -#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183 +#: shared-bindings/bitbangio/SPI.c:157 shared-bindings/busio/SPI.c:180 msgid "Invalid number of bits" msgstr "" -#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348 +#: shared-bindings/bitbangio/SPI.c:282 shared-bindings/busio/SPI.c:345 msgid "buffer slices must be of equal length" msgstr "" -#: shared-bindings/bleio/Address.c:119 +#: shared-bindings/bleio/Address.c:115 #, c-format msgid "Address is not %d bytes long or is in wrong format" msgstr "" -#: shared-bindings/bleio/Address.c:126 +#: shared-bindings/bleio/Address.c:122 #, fuzzy, c-format msgid "Address must be %d bytes long" msgstr "buffers harus mempunyai panjang yang sama" -#: shared-bindings/bleio/Characteristic.c:81 -#: shared-bindings/bleio/Descriptor.c:93 shared-bindings/bleio/Service.c:78 +#: shared-bindings/bleio/Characteristic.c:74 +#: shared-bindings/bleio/Descriptor.c:86 shared-bindings/bleio/Service.c:66 msgid "Expected a UUID" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:68 +#: shared-bindings/bleio/CharacteristicBuffer.c:61 #, fuzzy msgid "buffer_size must be >= 1" msgstr "buffers harus mempunyai panjang yang sama" -#: shared-bindings/bleio/CharacteristicBuffer.c:72 +#: shared-bindings/bleio/CharacteristicBuffer.c:65 msgid "Expected a Characteristic" msgstr "" @@ -2201,20 +2200,20 @@ msgstr "" msgid "Can't advertise in Central mode" msgstr "" -#: shared-bindings/bleio/Peripheral.c:111 +#: shared-bindings/bleio/Peripheral.c:106 msgid "services includes an object that is not a Service" msgstr "" -#: shared-bindings/bleio/Peripheral.c:124 +#: shared-bindings/bleio/Peripheral.c:119 #, fuzzy msgid "name must be a string" msgstr "keyword harus berupa string" -#: shared-bindings/bleio/Service.c:90 +#: shared-bindings/bleio/Service.c:84 msgid "characteristics includes an object that is not a Characteristic" msgstr "" -#: shared-bindings/bleio/Service.c:96 +#: shared-bindings/bleio/Service.c:90 msgid "Characteristic UUID doesn't match Service UUID" msgstr "" @@ -2235,19 +2234,19 @@ msgstr "buffers harus mempunyai panjang yang sama" msgid "not a 128-bit UUID" msgstr "" -#: shared-bindings/busio/I2C.c:120 +#: shared-bindings/busio/I2C.c:117 msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:106 +#: shared-bindings/busio/UART.c:103 msgid "bits must be 7, 8 or 9" msgstr "" -#: shared-bindings/busio/UART.c:118 +#: shared-bindings/busio/UART.c:115 msgid "stop must be 1 or 2" msgstr "" -#: shared-bindings/busio/UART.c:123 +#: shared-bindings/busio/UART.c:120 msgid "timeout >100 (units are now seconds, not msecs)" msgstr "" @@ -2273,7 +2272,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "" -#: shared-bindings/displayio/Bitmap.c:84 +#: shared-bindings/displayio/Bitmap.c:84 shared-bindings/displayio/Shape.c:88 msgid "y should be an int" msgstr "" @@ -2289,45 +2288,78 @@ msgstr "" msgid "color should be an int" msgstr "" -#: shared-bindings/displayio/FourWire.c:55 -#: shared-bindings/displayio/FourWire.c:64 +#: shared-bindings/displayio/Display.c:79 +msgid "Width and height kwargs required" +msgstr "" + +#: shared-bindings/displayio/Display.c:93 +msgid "Display limit reached" +msgstr "" + +#: shared-bindings/displayio/Display.c:112 +msgid "Must be a Group subclass." +msgstr "" + +#: shared-bindings/displayio/FourWire.c:69 +msgid "Command and chip_select required" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:91 +#: shared-bindings/displayio/ParallelBus.c:94 +msgid "Display bus limit reached" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:104 +#: shared-bindings/displayio/ParallelBus.c:106 msgid "displayio is a work in progress" msgstr "" -#: shared-bindings/displayio/Group.c:65 +#: shared-bindings/displayio/Group.c:62 msgid "Group must have size at least 1" msgstr "" -#: shared-bindings/displayio/Palette.c:96 +#: shared-bindings/displayio/Palette.c:93 msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" -#: shared-bindings/displayio/Palette.c:102 +#: shared-bindings/displayio/Palette.c:99 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" -#: shared-bindings/displayio/Palette.c:106 +#: shared-bindings/displayio/Palette.c:103 msgid "color must be between 0x000000 and 0xffffff" msgstr "" -#: shared-bindings/displayio/Palette.c:110 +#: shared-bindings/displayio/Palette.c:107 msgid "color buffer must be a buffer or int" msgstr "" -#: shared-bindings/displayio/Palette.c:123 -#: shared-bindings/displayio/Palette.c:137 +#: shared-bindings/displayio/Palette.c:120 +#: shared-bindings/displayio/Palette.c:134 msgid "palette_index should be an int" msgstr "" -#: shared-bindings/displayio/Sprite.c:48 +#: shared-bindings/displayio/ParallelBus.c:75 +msgid "Data0, command, chip_select, write and read required" +msgstr "" + +#: shared-bindings/displayio/Shape.c:92 +msgid "start_x should be an int" +msgstr "" + +#: shared-bindings/displayio/Shape.c:96 +msgid "end_x should be an int" +msgstr "" + +#: shared-bindings/displayio/Sprite.c:49 msgid "position must be 2-tuple" msgstr "" -#: shared-bindings/displayio/Sprite.c:97 +#: shared-bindings/displayio/Sprite.c:102 msgid "unsupported bitmap type" msgstr "" -#: shared-bindings/displayio/Sprite.c:162 +#: shared-bindings/displayio/Sprite.c:167 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgstr "" @@ -2339,15 +2371,15 @@ msgstr "" msgid "expected a DigitalInOut" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:98 +#: shared-bindings/i2cslave/I2CSlave.c:95 msgid "can't convert address to int" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:101 +#: shared-bindings/i2cslave/I2CSlave.c:98 msgid "address out of bounds" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:107 +#: shared-bindings/i2cslave/I2CSlave.c:104 msgid "addresses is empty" msgstr "" @@ -2389,29 +2421,29 @@ msgstr "" msgid "No hardware random available" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:164 +#: shared-bindings/pulseio/PWMOut.c:162 msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:195 +#: shared-bindings/pulseio/PWMOut.c:193 msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" -#: shared-bindings/pulseio/PulseIn.c:275 +#: shared-bindings/pulseio/PulseIn.c:272 msgid "Cannot delete values" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:281 +#: shared-bindings/pulseio/PulseIn.c:278 msgid "Slices not supported" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:287 +#: shared-bindings/pulseio/PulseIn.c:284 msgid "index must be int" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:293 +#: shared-bindings/pulseio/PulseIn.c:290 msgid "Read-only" msgstr "" @@ -2577,11 +2609,20 @@ msgstr "" msgid "row must be packed and word aligned" msgstr "" +#: shared-module/displayio/Display.c:62 +#, fuzzy +msgid "Unsupported display bus type" +msgstr "Baudrate tidak didukung" + #: shared-module/displayio/Group.c:39 msgid "Group full" msgstr "" -#: shared-module/displayio/Group.c:48 +#: shared-module/displayio/Group.c:46 +msgid "Layer must be a Group or Sprite subclass." +msgstr "" + +#: shared-module/displayio/Group.c:55 msgid "Group empty" msgstr "" @@ -2599,6 +2640,19 @@ msgstr "" msgid "Only true color (24 bpp or higher) BMP supported %x" msgstr "" +#: shared-module/displayio/Shape.c:60 +msgid "y value out of bounds" +msgstr "" + +#: shared-module/displayio/Shape.c:63 +msgid "x value out of bounds" +msgstr "" + +#: shared-module/displayio/Shape.c:67 +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." msgstr "" @@ -2624,6 +2678,18 @@ msgstr "" msgid "USB Error" msgstr "" +#: supervisor/shared/board_busses.c:62 +msgid "No default I2C bus" +msgstr "Tidak ada standar bus I2C" + +#: supervisor/shared/board_busses.c:89 +msgid "No default SPI bus" +msgstr "Tidak ada standar bus SPI" + +#: supervisor/shared/board_busses.c:116 +msgid "No default UART bus" +msgstr "Tidak ada standar bus UART" + #: supervisor/shared/safe_mode.c:97 msgid "You requested starting safe mode by " msgstr "Anda mengajukan untuk memulai mode aman pada (safe mode) pada " @@ -2688,13 +2754,6 @@ msgstr "" #~ msgid "Invalid UUID string length" #~ msgstr "Panjang string UUID tidak valid" -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parameter UUID tidak valid" - -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n" - #~ msgid "" #~ "enough power for the whole circuit and press reset (after ejecting " #~ "CIRCUITPY).\n" @@ -2702,6 +2761,13 @@ msgstr "" #~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut " #~ "CIRCUITPY).\n" +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n" + +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parameter UUID tidak valid" + #~ msgid "" #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 5c85d09a8..e52ee4df4 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-01-10 21:32-0500\n" +"POT-Creation-Date: 2019-01-18 11:43-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -151,37 +151,37 @@ msgstr "" msgid "script compilation not supported" msgstr "" -#: main.c:150 +#: main.c:155 msgid " output:\n" msgstr "" -#: main.c:164 main.c:237 +#: main.c:169 main.c:247 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" -#: main.c:166 +#: main.c:171 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "" -#: main.c:168 main.c:239 +#: main.c:173 main.c:249 msgid "Auto-reload is off.\n" msgstr "" -#: main.c:182 +#: main.c:187 msgid "Running in safe mode! Not running saved code.\n" msgstr "" -#: main.c:198 +#: main.c:203 msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: main.c:244 +#: main.c:254 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" -#: main.c:407 +#: main.c:417 msgid "soft reboot\n" msgstr "" @@ -198,18 +198,6 @@ msgstr "" msgid "calibration is out of range" msgstr "" -#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 -msgid "No default I2C bus" -msgstr "" - -#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64 -msgid "No default SPI bus" -msgstr "" - -#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91 -msgid "No default UART bus" -msgstr "" - #: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63 #: ports/nrf/common-hal/analogio/AnalogIn.c:39 msgid "Pin does not have ADC capabilities" @@ -326,7 +314,7 @@ msgid "Not enough pins available" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c:78 -#: ports/atmel-samd/common-hal/busio/SPI.c:171 +#: ports/atmel-samd/common-hal/busio/SPI.c:176 #: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:84 @@ -374,6 +362,17 @@ msgstr "" msgid "Cannot get pull while in output mode" msgstr "" +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:43 +#: ports/nrf/common-hal/displayio/ParallelBus.c:43 +msgid "Data 0 pin must be byte aligned" +msgstr "" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:47 +#: ports/nrf/common-hal/displayio/ParallelBus.c:47 +#, c-format +msgid "Bus pin %d is already in use" +msgstr "" + #: ports/atmel-samd/common-hal/microcontroller/__init__.c:74 #: ports/esp8266/common-hal/microcontroller/__init__.c:64 msgid "Cannot reset into bootloader because no bootloader is present." @@ -874,46 +873,46 @@ msgstr "" msgid "[addrinfo error %d]" msgstr "" -#: py/argcheck.c:44 +#: py/argcheck.c:53 msgid "function does not take keyword arguments" msgstr "" -#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" -#: py/argcheck.c:64 +#: py/argcheck.c:73 #, c-format msgid "function missing %d required positional arguments" msgstr "" -#: py/argcheck.c:72 +#: py/argcheck.c:81 #, c-format msgid "function expected at most %d arguments, got %d" msgstr "" -#: py/argcheck.c:97 +#: py/argcheck.c:106 msgid "'%q' argument required" msgstr "" -#: py/argcheck.c:122 +#: py/argcheck.c:131 msgid "extra positional arguments given" msgstr "" -#: py/argcheck.c:130 +#: py/argcheck.c:139 msgid "extra keyword arguments given" msgstr "" -#: py/argcheck.c:142 +#: py/argcheck.c:151 msgid "argument num/types mismatch" msgstr "" -#: py/argcheck.c:147 +#: py/argcheck.c:156 msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -#: py/bc.c:88 py/objnamedtuple.c:108 +#: py/bc.c:88 py/objnamedtuple.c:109 msgid "%q() takes %d positional arguments but %d were given" msgstr "" @@ -925,11 +924,11 @@ msgstr "" msgid "keywords must be strings" msgstr "" -#: py/bc.c:206 py/objnamedtuple.c:138 +#: py/bc.c:206 py/objnamedtuple.c:139 msgid "function got multiple values for argument '%q'" msgstr "" -#: py/bc.c:218 py/objnamedtuple.c:130 +#: py/bc.c:218 py/objnamedtuple.c:131 msgid "unexpected keyword argument '%q'" msgstr "" @@ -1511,11 +1510,11 @@ msgstr "" msgid "empty" msgstr "" -#: py/objdict.c:314 +#: py/objdict.c:312 msgid "popitem(): dictionary is empty" msgstr "" -#: py/objdict.c:357 +#: py/objdict.c:355 msgid "dict update sequence has wrong length" msgstr "" @@ -1776,69 +1775,69 @@ msgstr "" msgid "string index out of range" msgstr "" -#: py/objtype.c:358 +#: py/objtype.c:368 msgid "__init__() should return None" msgstr "" -#: py/objtype.c:360 +#: py/objtype.c:370 #, c-format msgid "__init__() should return None, not '%s'" msgstr "" -#: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065 +#: py/objtype.c:633 py/objtype.c:1287 py/runtime.c:1065 msgid "unreadable attribute" msgstr "" -#: py/objtype.c:868 py/runtime.c:653 +#: py/objtype.c:878 py/runtime.c:653 msgid "object not callable" msgstr "" -#: py/objtype.c:870 py/runtime.c:655 +#: py/objtype.c:880 py/runtime.c:655 #, c-format msgid "'%s' object is not callable" msgstr "" -#: py/objtype.c:978 +#: py/objtype.c:988 msgid "type takes 1 or 3 arguments" msgstr "" -#: py/objtype.c:989 +#: py/objtype.c:999 msgid "cannot create instance" msgstr "" -#: py/objtype.c:991 +#: py/objtype.c:1001 msgid "cannot create '%q' instances" msgstr "" -#: py/objtype.c:1047 +#: py/objtype.c:1059 msgid "can't add special method to already-subclassed class" msgstr "" -#: py/objtype.c:1091 py/objtype.c:1097 +#: py/objtype.c:1103 py/objtype.c:1109 msgid "type is not an acceptable base type" msgstr "" -#: py/objtype.c:1100 +#: py/objtype.c:1112 msgid "type '%q' is not an acceptable base type" msgstr "" -#: py/objtype.c:1137 +#: py/objtype.c:1149 msgid "multiple inheritance not supported" msgstr "" -#: py/objtype.c:1164 +#: py/objtype.c:1176 msgid "multiple bases have instance lay-out conflict" msgstr "" -#: py/objtype.c:1205 +#: py/objtype.c:1217 msgid "first argument to super() must be type" msgstr "" -#: py/objtype.c:1370 +#: py/objtype.c:1382 msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: py/objtype.c:1384 +#: py/objtype.c:1396 msgid "issubclass() arg 1 must be a class" msgstr "" @@ -2034,8 +2033,8 @@ msgstr "" msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "" -#: shared-bindings/audiobusio/I2SOut.c:225 -#: shared-bindings/audioio/AudioOut.c:226 +#: shared-bindings/audiobusio/I2SOut.c:222 +#: shared-bindings/audioio/AudioOut.c:223 msgid "Not playing" msgstr "" @@ -2072,29 +2071,29 @@ msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" msgstr "" -#: shared-bindings/audioio/Mixer.c:94 +#: shared-bindings/audioio/Mixer.c:91 msgid "Invalid voice count" msgstr "" -#: shared-bindings/audioio/Mixer.c:99 +#: shared-bindings/audioio/Mixer.c:96 msgid "Invalid channel count" msgstr "" -#: shared-bindings/audioio/Mixer.c:103 +#: shared-bindings/audioio/Mixer.c:100 msgid "Sample rate must be positive" msgstr "" -#: shared-bindings/audioio/Mixer.c:107 +#: shared-bindings/audioio/Mixer.c:104 msgid "bits_per_sample must be 8 or 16" msgstr "" -#: shared-bindings/audioio/RawSample.c:98 +#: shared-bindings/audioio/RawSample.c:95 msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" msgstr "" -#: shared-bindings/audioio/RawSample.c:104 +#: shared-bindings/audioio/RawSample.c:101 msgid "buffer must be a bytes-like object" msgstr "" @@ -2103,51 +2102,51 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" -#: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 -#: shared-bindings/busio/SPI.c:133 +#: shared-bindings/bitbangio/I2C.c:109 shared-bindings/bitbangio/SPI.c:119 +#: shared-bindings/busio/SPI.c:130 msgid "Function requires lock" msgstr "" -#: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210 +#: shared-bindings/bitbangio/I2C.c:193 shared-bindings/busio/I2C.c:207 msgid "Buffer must be at least length 1" msgstr "" -#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175 +#: shared-bindings/bitbangio/SPI.c:149 shared-bindings/busio/SPI.c:172 msgid "Invalid polarity" msgstr "" -#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179 +#: shared-bindings/bitbangio/SPI.c:153 shared-bindings/busio/SPI.c:176 msgid "Invalid phase" msgstr "" -#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183 +#: shared-bindings/bitbangio/SPI.c:157 shared-bindings/busio/SPI.c:180 msgid "Invalid number of bits" msgstr "" -#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348 +#: shared-bindings/bitbangio/SPI.c:282 shared-bindings/busio/SPI.c:345 msgid "buffer slices must be of equal length" msgstr "" -#: shared-bindings/bleio/Address.c:119 +#: shared-bindings/bleio/Address.c:115 #, c-format msgid "Address is not %d bytes long or is in wrong format" msgstr "" -#: shared-bindings/bleio/Address.c:126 +#: shared-bindings/bleio/Address.c:122 #, c-format msgid "Address must be %d bytes long" msgstr "" -#: shared-bindings/bleio/Characteristic.c:81 -#: shared-bindings/bleio/Descriptor.c:93 shared-bindings/bleio/Service.c:78 +#: shared-bindings/bleio/Characteristic.c:74 +#: shared-bindings/bleio/Descriptor.c:86 shared-bindings/bleio/Service.c:66 msgid "Expected a UUID" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:68 +#: shared-bindings/bleio/CharacteristicBuffer.c:61 msgid "buffer_size must be >= 1" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:72 +#: shared-bindings/bleio/CharacteristicBuffer.c:65 msgid "Expected a Characteristic" msgstr "" @@ -2167,19 +2166,19 @@ msgstr "" msgid "Can't advertise in Central mode" msgstr "" -#: shared-bindings/bleio/Peripheral.c:111 +#: shared-bindings/bleio/Peripheral.c:106 msgid "services includes an object that is not a Service" msgstr "" -#: shared-bindings/bleio/Peripheral.c:124 +#: shared-bindings/bleio/Peripheral.c:119 msgid "name must be a string" msgstr "" -#: shared-bindings/bleio/Service.c:90 +#: shared-bindings/bleio/Service.c:84 msgid "characteristics includes an object that is not a Characteristic" msgstr "" -#: shared-bindings/bleio/Service.c:96 +#: shared-bindings/bleio/Service.c:90 msgid "Characteristic UUID doesn't match Service UUID" msgstr "" @@ -2199,19 +2198,19 @@ msgstr "" msgid "not a 128-bit UUID" msgstr "" -#: shared-bindings/busio/I2C.c:120 +#: shared-bindings/busio/I2C.c:117 msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:106 +#: shared-bindings/busio/UART.c:103 msgid "bits must be 7, 8 or 9" msgstr "" -#: shared-bindings/busio/UART.c:118 +#: shared-bindings/busio/UART.c:115 msgid "stop must be 1 or 2" msgstr "" -#: shared-bindings/busio/UART.c:123 +#: shared-bindings/busio/UART.c:120 msgid "timeout >100 (units are now seconds, not msecs)" msgstr "" @@ -2237,7 +2236,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "" -#: shared-bindings/displayio/Bitmap.c:84 +#: shared-bindings/displayio/Bitmap.c:84 shared-bindings/displayio/Shape.c:88 msgid "y should be an int" msgstr "" @@ -2253,45 +2252,78 @@ msgstr "" msgid "color should be an int" msgstr "" -#: shared-bindings/displayio/FourWire.c:55 -#: shared-bindings/displayio/FourWire.c:64 +#: shared-bindings/displayio/Display.c:79 +msgid "Width and height kwargs required" +msgstr "" + +#: shared-bindings/displayio/Display.c:93 +msgid "Display limit reached" +msgstr "" + +#: shared-bindings/displayio/Display.c:112 +msgid "Must be a Group subclass." +msgstr "" + +#: shared-bindings/displayio/FourWire.c:69 +msgid "Command and chip_select required" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:91 +#: shared-bindings/displayio/ParallelBus.c:94 +msgid "Display bus limit reached" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:104 +#: shared-bindings/displayio/ParallelBus.c:106 msgid "displayio is a work in progress" msgstr "" -#: shared-bindings/displayio/Group.c:65 +#: shared-bindings/displayio/Group.c:62 msgid "Group must have size at least 1" msgstr "" -#: shared-bindings/displayio/Palette.c:96 +#: shared-bindings/displayio/Palette.c:93 msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" -#: shared-bindings/displayio/Palette.c:102 +#: shared-bindings/displayio/Palette.c:99 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" -#: shared-bindings/displayio/Palette.c:106 +#: shared-bindings/displayio/Palette.c:103 msgid "color must be between 0x000000 and 0xffffff" msgstr "" -#: shared-bindings/displayio/Palette.c:110 +#: shared-bindings/displayio/Palette.c:107 msgid "color buffer must be a buffer or int" msgstr "" -#: shared-bindings/displayio/Palette.c:123 -#: shared-bindings/displayio/Palette.c:137 +#: shared-bindings/displayio/Palette.c:120 +#: shared-bindings/displayio/Palette.c:134 msgid "palette_index should be an int" msgstr "" -#: shared-bindings/displayio/Sprite.c:48 +#: shared-bindings/displayio/ParallelBus.c:75 +msgid "Data0, command, chip_select, write and read required" +msgstr "" + +#: shared-bindings/displayio/Shape.c:92 +msgid "start_x should be an int" +msgstr "" + +#: shared-bindings/displayio/Shape.c:96 +msgid "end_x should be an int" +msgstr "" + +#: shared-bindings/displayio/Sprite.c:49 msgid "position must be 2-tuple" msgstr "" -#: shared-bindings/displayio/Sprite.c:97 +#: shared-bindings/displayio/Sprite.c:102 msgid "unsupported bitmap type" msgstr "" -#: shared-bindings/displayio/Sprite.c:162 +#: shared-bindings/displayio/Sprite.c:167 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgstr "" @@ -2303,15 +2335,15 @@ msgstr "" msgid "expected a DigitalInOut" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:98 +#: shared-bindings/i2cslave/I2CSlave.c:95 msgid "can't convert address to int" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:101 +#: shared-bindings/i2cslave/I2CSlave.c:98 msgid "address out of bounds" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:107 +#: shared-bindings/i2cslave/I2CSlave.c:104 msgid "addresses is empty" msgstr "" @@ -2353,29 +2385,29 @@ msgstr "" msgid "No hardware random available" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:164 +#: shared-bindings/pulseio/PWMOut.c:162 msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:195 +#: shared-bindings/pulseio/PWMOut.c:193 msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" -#: shared-bindings/pulseio/PulseIn.c:275 +#: shared-bindings/pulseio/PulseIn.c:272 msgid "Cannot delete values" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:281 +#: shared-bindings/pulseio/PulseIn.c:278 msgid "Slices not supported" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:287 +#: shared-bindings/pulseio/PulseIn.c:284 msgid "index must be int" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:293 +#: shared-bindings/pulseio/PulseIn.c:290 msgid "Read-only" msgstr "" @@ -2541,11 +2573,19 @@ msgstr "" msgid "row must be packed and word aligned" msgstr "" +#: shared-module/displayio/Display.c:62 +msgid "Unsupported display bus type" +msgstr "" + #: shared-module/displayio/Group.c:39 msgid "Group full" msgstr "" -#: shared-module/displayio/Group.c:48 +#: shared-module/displayio/Group.c:46 +msgid "Layer must be a Group or Sprite subclass." +msgstr "" + +#: shared-module/displayio/Group.c:55 msgid "Group empty" msgstr "" @@ -2563,6 +2603,19 @@ msgstr "" msgid "Only true color (24 bpp or higher) BMP supported %x" msgstr "" +#: shared-module/displayio/Shape.c:60 +msgid "y value out of bounds" +msgstr "" + +#: shared-module/displayio/Shape.c:63 +msgid "x value out of bounds" +msgstr "" + +#: shared-module/displayio/Shape.c:67 +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." msgstr "" @@ -2588,6 +2641,18 @@ msgstr "" msgid "USB Error" msgstr "" +#: supervisor/shared/board_busses.c:62 +msgid "No default I2C bus" +msgstr "" + +#: supervisor/shared/board_busses.c:89 +msgid "No default SPI bus" +msgstr "" + +#: supervisor/shared/board_busses.c:116 +msgid "No default UART bus" +msgstr "" + #: supervisor/shared/safe_mode.c:97 msgid "You requested starting safe mode by " msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 47098b66a..a6d7b6103 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-01-10 21:32-0500\n" +"POT-Creation-Date: 2019-01-18 11:43-0800\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: Sebastian Plamauer\n" "Language-Team: \n" @@ -151,11 +151,11 @@ msgstr "ungültige argumente" msgid "script compilation not supported" msgstr "kompilieren von Skripten ist nicht unterstützt" -#: main.c:150 +#: main.c:155 msgid " output:\n" msgstr " Ausgabe:\n" -#: main.c:164 main.c:237 +#: main.c:169 main.c:247 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -163,29 +163,29 @@ msgstr "" "Automatisches Neuladen ist aktiv. Speichere Dateien über USB um sie " "auszuführen oder verbinde dich mit der REPL um zu deaktivieren.\n" -#: main.c:166 +#: main.c:171 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Sicherheitsmodus aktiv! Automatisches Neuladen ist deaktiviert.\n" -#: main.c:168 main.c:239 +#: main.c:173 main.c:249 msgid "Auto-reload is off.\n" msgstr "Automatisches Neuladen ist deaktiviert.\n" -#: main.c:182 +#: main.c:187 msgid "Running in safe mode! Not running saved code.\n" msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n" -#: main.c:198 +#: main.c:203 msgid "WARNING: Your code filename has two extensions\n" msgstr "WARNUNG: Der Dateiname deines codes hat zwei Dateityperweiterungen\n" -#: main.c:244 +#: main.c:254 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" "Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum neu " "laden" -#: main.c:407 +#: main.c:417 msgid "soft reboot\n" msgstr "soft reboot\n" @@ -202,18 +202,6 @@ msgstr "Kalibrierung ist Schreibgeschützt" msgid "calibration is out of range" msgstr "Kalibrierung ist außerhalb der Reichweite" -#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 -msgid "No default I2C bus" -msgstr "Kein Standard I2C Bus" - -#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64 -msgid "No default SPI bus" -msgstr "Kein Standard SPI Bus" - -#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91 -msgid "No default UART bus" -msgstr "Kein Standard UART Bus" - #: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63 #: ports/nrf/common-hal/analogio/AnalogIn.c:39 msgid "Pin does not have ADC capabilities" @@ -330,7 +318,7 @@ msgid "Not enough pins available" msgstr "Nicht genug Pins vorhanden" #: ports/atmel-samd/common-hal/busio/I2C.c:78 -#: ports/atmel-samd/common-hal/busio/SPI.c:171 +#: ports/atmel-samd/common-hal/busio/SPI.c:176 #: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:84 @@ -378,6 +366,17 @@ msgstr "Kein TX Pin" msgid "Cannot get pull while in output mode" msgstr "Pull up im Ausgabemodus nicht möglich" +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:43 +#: ports/nrf/common-hal/displayio/ParallelBus.c:43 +msgid "Data 0 pin must be byte aligned" +msgstr "" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:47 +#: ports/nrf/common-hal/displayio/ParallelBus.c:47 +#, fuzzy, c-format +msgid "Bus pin %d is already in use" +msgstr "DAC wird schon benutzt" + #: ports/atmel-samd/common-hal/microcontroller/__init__.c:74 #: ports/esp8266/common-hal/microcontroller/__init__.c:64 msgid "Cannot reset into bootloader because no bootloader is present." @@ -901,46 +900,46 @@ msgstr "" msgid "[addrinfo error %d]" msgstr "" -#: py/argcheck.c:44 +#: py/argcheck.c:53 msgid "function does not take keyword arguments" msgstr "" -#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" -#: py/argcheck.c:64 +#: py/argcheck.c:73 #, c-format msgid "function missing %d required positional arguments" msgstr "" -#: py/argcheck.c:72 +#: py/argcheck.c:81 #, c-format msgid "function expected at most %d arguments, got %d" msgstr "" -#: py/argcheck.c:97 +#: py/argcheck.c:106 msgid "'%q' argument required" msgstr "" -#: py/argcheck.c:122 +#: py/argcheck.c:131 msgid "extra positional arguments given" msgstr "" -#: py/argcheck.c:130 +#: py/argcheck.c:139 msgid "extra keyword arguments given" msgstr "" -#: py/argcheck.c:142 +#: py/argcheck.c:151 msgid "argument num/types mismatch" msgstr "" -#: py/argcheck.c:147 +#: py/argcheck.c:156 msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -#: py/bc.c:88 py/objnamedtuple.c:108 +#: py/bc.c:88 py/objnamedtuple.c:109 msgid "%q() takes %d positional arguments but %d were given" msgstr "" @@ -952,11 +951,11 @@ msgstr "" msgid "keywords must be strings" msgstr "" -#: py/bc.c:206 py/objnamedtuple.c:138 +#: py/bc.c:206 py/objnamedtuple.c:139 msgid "function got multiple values for argument '%q'" msgstr "" -#: py/bc.c:218 py/objnamedtuple.c:130 +#: py/bc.c:218 py/objnamedtuple.c:131 msgid "unexpected keyword argument '%q'" msgstr "" @@ -1540,11 +1539,11 @@ msgstr "" msgid "empty" msgstr "" -#: py/objdict.c:314 +#: py/objdict.c:312 msgid "popitem(): dictionary is empty" msgstr "" -#: py/objdict.c:357 +#: py/objdict.c:355 msgid "dict update sequence has wrong length" msgstr "" @@ -1805,69 +1804,69 @@ msgstr "" msgid "string index out of range" msgstr "" -#: py/objtype.c:358 +#: py/objtype.c:368 msgid "__init__() should return None" msgstr "" -#: py/objtype.c:360 +#: py/objtype.c:370 #, c-format msgid "__init__() should return None, not '%s'" msgstr "" -#: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065 +#: py/objtype.c:633 py/objtype.c:1287 py/runtime.c:1065 msgid "unreadable attribute" msgstr "" -#: py/objtype.c:868 py/runtime.c:653 +#: py/objtype.c:878 py/runtime.c:653 msgid "object not callable" msgstr "" -#: py/objtype.c:870 py/runtime.c:655 +#: py/objtype.c:880 py/runtime.c:655 #, c-format msgid "'%s' object is not callable" msgstr "" -#: py/objtype.c:978 +#: py/objtype.c:988 msgid "type takes 1 or 3 arguments" msgstr "" -#: py/objtype.c:989 +#: py/objtype.c:999 msgid "cannot create instance" msgstr "" -#: py/objtype.c:991 +#: py/objtype.c:1001 msgid "cannot create '%q' instances" msgstr "" -#: py/objtype.c:1047 +#: py/objtype.c:1059 msgid "can't add special method to already-subclassed class" msgstr "" -#: py/objtype.c:1091 py/objtype.c:1097 +#: py/objtype.c:1103 py/objtype.c:1109 msgid "type is not an acceptable base type" msgstr "" -#: py/objtype.c:1100 +#: py/objtype.c:1112 msgid "type '%q' is not an acceptable base type" msgstr "" -#: py/objtype.c:1137 +#: py/objtype.c:1149 msgid "multiple inheritance not supported" msgstr "" -#: py/objtype.c:1164 +#: py/objtype.c:1176 msgid "multiple bases have instance lay-out conflict" msgstr "" -#: py/objtype.c:1205 +#: py/objtype.c:1217 msgid "first argument to super() must be type" msgstr "" -#: py/objtype.c:1370 +#: py/objtype.c:1382 msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: py/objtype.c:1384 +#: py/objtype.c:1396 msgid "issubclass() arg 1 must be a class" msgstr "" @@ -2063,8 +2062,8 @@ msgstr "" msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "" -#: shared-bindings/audiobusio/I2SOut.c:225 -#: shared-bindings/audioio/AudioOut.c:226 +#: shared-bindings/audiobusio/I2SOut.c:222 +#: shared-bindings/audioio/AudioOut.c:223 msgid "Not playing" msgstr "" @@ -2101,32 +2100,32 @@ msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" msgstr "" -#: shared-bindings/audioio/Mixer.c:94 +#: shared-bindings/audioio/Mixer.c:91 #, fuzzy msgid "Invalid voice count" msgstr "Ungültiger clock pin" -#: shared-bindings/audioio/Mixer.c:99 +#: shared-bindings/audioio/Mixer.c:96 #, fuzzy msgid "Invalid channel count" msgstr "Ungültiger clock pin" -#: shared-bindings/audioio/Mixer.c:103 +#: shared-bindings/audioio/Mixer.c:100 msgid "Sample rate must be positive" msgstr "" -#: shared-bindings/audioio/Mixer.c:107 +#: shared-bindings/audioio/Mixer.c:104 #, fuzzy msgid "bits_per_sample must be 8 or 16" msgstr "bits müssen 8 sein" -#: shared-bindings/audioio/RawSample.c:98 +#: shared-bindings/audioio/RawSample.c:95 msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" msgstr "" -#: shared-bindings/audioio/RawSample.c:104 +#: shared-bindings/audioio/RawSample.c:101 msgid "buffer must be a bytes-like object" msgstr "" @@ -2135,52 +2134,52 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" -#: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 -#: shared-bindings/busio/SPI.c:133 +#: shared-bindings/bitbangio/I2C.c:109 shared-bindings/bitbangio/SPI.c:119 +#: shared-bindings/busio/SPI.c:130 msgid "Function requires lock" msgstr "" -#: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210 +#: shared-bindings/bitbangio/I2C.c:193 shared-bindings/busio/I2C.c:207 msgid "Buffer must be at least length 1" msgstr "" -#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175 +#: shared-bindings/bitbangio/SPI.c:149 shared-bindings/busio/SPI.c:172 msgid "Invalid polarity" msgstr "" -#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179 +#: shared-bindings/bitbangio/SPI.c:153 shared-bindings/busio/SPI.c:176 msgid "Invalid phase" msgstr "" -#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183 +#: shared-bindings/bitbangio/SPI.c:157 shared-bindings/busio/SPI.c:180 msgid "Invalid number of bits" msgstr "" -#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348 +#: shared-bindings/bitbangio/SPI.c:282 shared-bindings/busio/SPI.c:345 msgid "buffer slices must be of equal length" msgstr "" -#: shared-bindings/bleio/Address.c:119 +#: shared-bindings/bleio/Address.c:115 #, c-format msgid "Address is not %d bytes long or is in wrong format" msgstr "" -#: shared-bindings/bleio/Address.c:126 +#: shared-bindings/bleio/Address.c:122 #, fuzzy, c-format msgid "Address must be %d bytes long" msgstr "Buffer müssen gleich lang sein" -#: shared-bindings/bleio/Characteristic.c:81 -#: shared-bindings/bleio/Descriptor.c:93 shared-bindings/bleio/Service.c:78 +#: shared-bindings/bleio/Characteristic.c:74 +#: shared-bindings/bleio/Descriptor.c:86 shared-bindings/bleio/Service.c:66 msgid "Expected a UUID" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:68 +#: shared-bindings/bleio/CharacteristicBuffer.c:61 #, fuzzy msgid "buffer_size must be >= 1" msgstr "Buffer müssen gleich lang sein" -#: shared-bindings/bleio/CharacteristicBuffer.c:72 +#: shared-bindings/bleio/CharacteristicBuffer.c:65 #, fuzzy msgid "Expected a Characteristic" msgstr "Kann das Merkmal nicht hinzufügen." @@ -2201,20 +2200,20 @@ msgstr "" msgid "Can't advertise in Central mode" msgstr "" -#: shared-bindings/bleio/Peripheral.c:111 +#: shared-bindings/bleio/Peripheral.c:106 msgid "services includes an object that is not a Service" msgstr "" -#: shared-bindings/bleio/Peripheral.c:124 +#: shared-bindings/bleio/Peripheral.c:119 #, fuzzy msgid "name must be a string" msgstr "heap muss eine Liste sein" -#: shared-bindings/bleio/Service.c:90 +#: shared-bindings/bleio/Service.c:84 msgid "characteristics includes an object that is not a Characteristic" msgstr "" -#: shared-bindings/bleio/Service.c:96 +#: shared-bindings/bleio/Service.c:90 msgid "Characteristic UUID doesn't match Service UUID" msgstr "" @@ -2235,19 +2234,19 @@ msgstr "Buffer müssen gleich lang sein" msgid "not a 128-bit UUID" msgstr "" -#: shared-bindings/busio/I2C.c:120 +#: shared-bindings/busio/I2C.c:117 msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:106 +#: shared-bindings/busio/UART.c:103 msgid "bits must be 7, 8 or 9" msgstr "" -#: shared-bindings/busio/UART.c:118 +#: shared-bindings/busio/UART.c:115 msgid "stop must be 1 or 2" msgstr "" -#: shared-bindings/busio/UART.c:123 +#: shared-bindings/busio/UART.c:120 msgid "timeout >100 (units are now seconds, not msecs)" msgstr "" @@ -2273,7 +2272,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "" -#: shared-bindings/displayio/Bitmap.c:84 +#: shared-bindings/displayio/Bitmap.c:84 shared-bindings/displayio/Shape.c:88 msgid "y should be an int" msgstr "" @@ -2289,46 +2288,79 @@ msgstr "" msgid "color should be an int" msgstr "" -#: shared-bindings/displayio/FourWire.c:55 -#: shared-bindings/displayio/FourWire.c:64 +#: shared-bindings/displayio/Display.c:79 +msgid "Width and height kwargs required" +msgstr "" + +#: shared-bindings/displayio/Display.c:93 +msgid "Display limit reached" +msgstr "" + +#: shared-bindings/displayio/Display.c:112 +msgid "Must be a Group subclass." +msgstr "" + +#: shared-bindings/displayio/FourWire.c:69 +msgid "Command and chip_select required" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:91 +#: shared-bindings/displayio/ParallelBus.c:94 +msgid "Display bus limit reached" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:104 +#: shared-bindings/displayio/ParallelBus.c:106 msgid "displayio is a work in progress" msgstr "" -#: shared-bindings/displayio/Group.c:65 +#: shared-bindings/displayio/Group.c:62 msgid "Group must have size at least 1" msgstr "" -#: shared-bindings/displayio/Palette.c:96 +#: shared-bindings/displayio/Palette.c:93 msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" -#: shared-bindings/displayio/Palette.c:102 +#: shared-bindings/displayio/Palette.c:99 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" -#: shared-bindings/displayio/Palette.c:106 +#: shared-bindings/displayio/Palette.c:103 msgid "color must be between 0x000000 and 0xffffff" msgstr "" -#: shared-bindings/displayio/Palette.c:110 +#: shared-bindings/displayio/Palette.c:107 msgid "color buffer must be a buffer or int" msgstr "" -#: shared-bindings/displayio/Palette.c:123 -#: shared-bindings/displayio/Palette.c:137 +#: shared-bindings/displayio/Palette.c:120 +#: shared-bindings/displayio/Palette.c:134 msgid "palette_index should be an int" msgstr "" -#: shared-bindings/displayio/Sprite.c:48 +#: shared-bindings/displayio/ParallelBus.c:75 +msgid "Data0, command, chip_select, write and read required" +msgstr "" + +#: shared-bindings/displayio/Shape.c:92 +msgid "start_x should be an int" +msgstr "" + +#: shared-bindings/displayio/Shape.c:96 +msgid "end_x should be an int" +msgstr "" + +#: shared-bindings/displayio/Sprite.c:49 msgid "position must be 2-tuple" msgstr "" -#: shared-bindings/displayio/Sprite.c:97 +#: shared-bindings/displayio/Sprite.c:102 #, fuzzy msgid "unsupported bitmap type" msgstr "Baudrate wird nicht unterstütz" -#: shared-bindings/displayio/Sprite.c:162 +#: shared-bindings/displayio/Sprite.c:167 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgstr "" @@ -2340,15 +2372,15 @@ msgstr "" msgid "expected a DigitalInOut" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:98 +#: shared-bindings/i2cslave/I2CSlave.c:95 msgid "can't convert address to int" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:101 +#: shared-bindings/i2cslave/I2CSlave.c:98 msgid "address out of bounds" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:107 +#: shared-bindings/i2cslave/I2CSlave.c:104 msgid "addresses is empty" msgstr "" @@ -2390,29 +2422,29 @@ msgstr "" msgid "No hardware random available" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:164 +#: shared-bindings/pulseio/PWMOut.c:162 msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:195 +#: shared-bindings/pulseio/PWMOut.c:193 msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" -#: shared-bindings/pulseio/PulseIn.c:275 +#: shared-bindings/pulseio/PulseIn.c:272 msgid "Cannot delete values" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:281 +#: shared-bindings/pulseio/PulseIn.c:278 msgid "Slices not supported" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:287 +#: shared-bindings/pulseio/PulseIn.c:284 msgid "index must be int" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:293 +#: shared-bindings/pulseio/PulseIn.c:290 msgid "Read-only" msgstr "" @@ -2578,11 +2610,20 @@ msgstr "" msgid "row must be packed and word aligned" msgstr "" +#: shared-module/displayio/Display.c:62 +#, fuzzy +msgid "Unsupported display bus type" +msgstr "Baudrate wird nicht unterstütz" + #: shared-module/displayio/Group.c:39 msgid "Group full" msgstr "" -#: shared-module/displayio/Group.c:48 +#: shared-module/displayio/Group.c:46 +msgid "Layer must be a Group or Sprite subclass." +msgstr "" + +#: shared-module/displayio/Group.c:55 msgid "Group empty" msgstr "" @@ -2601,6 +2642,19 @@ msgstr "" msgid "Only true color (24 bpp or higher) BMP supported %x" msgstr "" +#: shared-module/displayio/Shape.c:60 +msgid "y value out of bounds" +msgstr "" + +#: shared-module/displayio/Shape.c:63 +msgid "x value out of bounds" +msgstr "" + +#: shared-module/displayio/Shape.c:67 +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." msgstr "Kann '/' nicht remounten when USB aktiv ist" @@ -2626,6 +2680,18 @@ msgstr "USB beschäftigt" msgid "USB Error" msgstr "USB Fehler" +#: supervisor/shared/board_busses.c:62 +msgid "No default I2C bus" +msgstr "Kein Standard I2C Bus" + +#: supervisor/shared/board_busses.c:89 +msgid "No default SPI bus" +msgstr "Kein Standard SPI Bus" + +#: supervisor/shared/board_busses.c:116 +msgid "No default UART bus" +msgstr "Kein Standard UART Bus" + #: supervisor/shared/safe_mode.c:97 msgid "You requested starting safe mode by " msgstr "Du hast das Starten im Sicherheitsmodus ausgelöst durch " @@ -2691,12 +2757,24 @@ msgstr "" #~ msgid "Invalid UUID parameter" #~ msgstr "Ungültiger UUID-Parameter" -#~ msgid "Invalid Service type" -#~ msgstr "Ungültiger Diensttyp" +#~ msgid "Can not add Service." +#~ msgstr "Kann den Dienst nicht hinzufügen." + +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Kann GAP Parameter nicht anwenden." #~ msgid "Can not apply advertisement data. status: 0x%02x" #~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "CircuitPython ist abgestürzt. Ups!\n" + +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." + +#~ msgid "Invalid Service type" +#~ msgstr "Ungültiger Diensttyp" + #~ msgid "" #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "" @@ -2705,15 +2783,6 @@ msgstr "" #~ msgid "Can not encode UUID, to check length." #~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen." -#~ msgid "Can not add Characteristic." -#~ msgstr "Kann das Merkmal nicht hinzufügen." - -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "CircuitPython ist abgestürzt. Ups!\n" - -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Kann GAP Parameter nicht anwenden." - #~ msgid "" #~ "enough power for the whole circuit and press reset (after ejecting " #~ "CIRCUITPY).\n" @@ -2721,14 +2790,11 @@ msgstr "" #~ "genug Strom für den ganzen Schaltkreis liefert und drücke reset (nach dem " #~ "sicheren Auswerfen von CIRCUITPY.)\n" +#~ msgid "Can not add Characteristic." +#~ msgstr "Kann das Merkmal nicht hinzufügen." + #~ msgid "Can encode UUID into the advertisement packet." #~ msgstr "Kann UUID in das advertisement packet kodieren." #~ msgid "Can not query for the device address." #~ msgstr "Kann nicht nach der Geräteadresse suchen." - -#~ msgid "Can not add Service." -#~ msgstr "Kann den Dienst nicht hinzufügen." - -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." diff --git a/locale/en_US.po b/locale/en_US.po index ee47b08ea..1fd9cd377 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-01-10 21:31-0500\n" +"POT-Creation-Date: 2019-01-18 11:43-0800\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -151,37 +151,37 @@ msgstr "" msgid "script compilation not supported" msgstr "" -#: main.c:150 +#: main.c:155 msgid " output:\n" msgstr "" -#: main.c:164 main.c:237 +#: main.c:169 main.c:247 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" -#: main.c:166 +#: main.c:171 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "" -#: main.c:168 main.c:239 +#: main.c:173 main.c:249 msgid "Auto-reload is off.\n" msgstr "" -#: main.c:182 +#: main.c:187 msgid "Running in safe mode! Not running saved code.\n" msgstr "" -#: main.c:198 +#: main.c:203 msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: main.c:244 +#: main.c:254 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" -#: main.c:407 +#: main.c:417 msgid "soft reboot\n" msgstr "" @@ -198,18 +198,6 @@ msgstr "" msgid "calibration is out of range" msgstr "" -#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 -msgid "No default I2C bus" -msgstr "" - -#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64 -msgid "No default SPI bus" -msgstr "" - -#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91 -msgid "No default UART bus" -msgstr "" - #: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63 #: ports/nrf/common-hal/analogio/AnalogIn.c:39 msgid "Pin does not have ADC capabilities" @@ -326,7 +314,7 @@ msgid "Not enough pins available" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c:78 -#: ports/atmel-samd/common-hal/busio/SPI.c:171 +#: ports/atmel-samd/common-hal/busio/SPI.c:176 #: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:84 @@ -374,6 +362,17 @@ msgstr "" msgid "Cannot get pull while in output mode" msgstr "" +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:43 +#: ports/nrf/common-hal/displayio/ParallelBus.c:43 +msgid "Data 0 pin must be byte aligned" +msgstr "" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:47 +#: ports/nrf/common-hal/displayio/ParallelBus.c:47 +#, c-format +msgid "Bus pin %d is already in use" +msgstr "" + #: ports/atmel-samd/common-hal/microcontroller/__init__.c:74 #: ports/esp8266/common-hal/microcontroller/__init__.c:64 msgid "Cannot reset into bootloader because no bootloader is present." @@ -874,46 +873,46 @@ msgstr "" msgid "[addrinfo error %d]" msgstr "" -#: py/argcheck.c:44 +#: py/argcheck.c:53 msgid "function does not take keyword arguments" msgstr "" -#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" -#: py/argcheck.c:64 +#: py/argcheck.c:73 #, c-format msgid "function missing %d required positional arguments" msgstr "" -#: py/argcheck.c:72 +#: py/argcheck.c:81 #, c-format msgid "function expected at most %d arguments, got %d" msgstr "" -#: py/argcheck.c:97 +#: py/argcheck.c:106 msgid "'%q' argument required" msgstr "" -#: py/argcheck.c:122 +#: py/argcheck.c:131 msgid "extra positional arguments given" msgstr "" -#: py/argcheck.c:130 +#: py/argcheck.c:139 msgid "extra keyword arguments given" msgstr "" -#: py/argcheck.c:142 +#: py/argcheck.c:151 msgid "argument num/types mismatch" msgstr "" -#: py/argcheck.c:147 +#: py/argcheck.c:156 msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -#: py/bc.c:88 py/objnamedtuple.c:108 +#: py/bc.c:88 py/objnamedtuple.c:109 msgid "%q() takes %d positional arguments but %d were given" msgstr "" @@ -925,11 +924,11 @@ msgstr "" msgid "keywords must be strings" msgstr "" -#: py/bc.c:206 py/objnamedtuple.c:138 +#: py/bc.c:206 py/objnamedtuple.c:139 msgid "function got multiple values for argument '%q'" msgstr "" -#: py/bc.c:218 py/objnamedtuple.c:130 +#: py/bc.c:218 py/objnamedtuple.c:131 msgid "unexpected keyword argument '%q'" msgstr "" @@ -1511,11 +1510,11 @@ msgstr "" msgid "empty" msgstr "" -#: py/objdict.c:314 +#: py/objdict.c:312 msgid "popitem(): dictionary is empty" msgstr "" -#: py/objdict.c:357 +#: py/objdict.c:355 msgid "dict update sequence has wrong length" msgstr "" @@ -1776,69 +1775,69 @@ msgstr "" msgid "string index out of range" msgstr "" -#: py/objtype.c:358 +#: py/objtype.c:368 msgid "__init__() should return None" msgstr "" -#: py/objtype.c:360 +#: py/objtype.c:370 #, c-format msgid "__init__() should return None, not '%s'" msgstr "" -#: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065 +#: py/objtype.c:633 py/objtype.c:1287 py/runtime.c:1065 msgid "unreadable attribute" msgstr "" -#: py/objtype.c:868 py/runtime.c:653 +#: py/objtype.c:878 py/runtime.c:653 msgid "object not callable" msgstr "" -#: py/objtype.c:870 py/runtime.c:655 +#: py/objtype.c:880 py/runtime.c:655 #, c-format msgid "'%s' object is not callable" msgstr "" -#: py/objtype.c:978 +#: py/objtype.c:988 msgid "type takes 1 or 3 arguments" msgstr "" -#: py/objtype.c:989 +#: py/objtype.c:999 msgid "cannot create instance" msgstr "" -#: py/objtype.c:991 +#: py/objtype.c:1001 msgid "cannot create '%q' instances" msgstr "" -#: py/objtype.c:1047 +#: py/objtype.c:1059 msgid "can't add special method to already-subclassed class" msgstr "" -#: py/objtype.c:1091 py/objtype.c:1097 +#: py/objtype.c:1103 py/objtype.c:1109 msgid "type is not an acceptable base type" msgstr "" -#: py/objtype.c:1100 +#: py/objtype.c:1112 msgid "type '%q' is not an acceptable base type" msgstr "" -#: py/objtype.c:1137 +#: py/objtype.c:1149 msgid "multiple inheritance not supported" msgstr "" -#: py/objtype.c:1164 +#: py/objtype.c:1176 msgid "multiple bases have instance lay-out conflict" msgstr "" -#: py/objtype.c:1205 +#: py/objtype.c:1217 msgid "first argument to super() must be type" msgstr "" -#: py/objtype.c:1370 +#: py/objtype.c:1382 msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: py/objtype.c:1384 +#: py/objtype.c:1396 msgid "issubclass() arg 1 must be a class" msgstr "" @@ -2034,8 +2033,8 @@ msgstr "" msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "" -#: shared-bindings/audiobusio/I2SOut.c:225 -#: shared-bindings/audioio/AudioOut.c:226 +#: shared-bindings/audiobusio/I2SOut.c:222 +#: shared-bindings/audioio/AudioOut.c:223 msgid "Not playing" msgstr "" @@ -2072,29 +2071,29 @@ msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" msgstr "" -#: shared-bindings/audioio/Mixer.c:94 +#: shared-bindings/audioio/Mixer.c:91 msgid "Invalid voice count" msgstr "" -#: shared-bindings/audioio/Mixer.c:99 +#: shared-bindings/audioio/Mixer.c:96 msgid "Invalid channel count" msgstr "" -#: shared-bindings/audioio/Mixer.c:103 +#: shared-bindings/audioio/Mixer.c:100 msgid "Sample rate must be positive" msgstr "" -#: shared-bindings/audioio/Mixer.c:107 +#: shared-bindings/audioio/Mixer.c:104 msgid "bits_per_sample must be 8 or 16" msgstr "" -#: shared-bindings/audioio/RawSample.c:98 +#: shared-bindings/audioio/RawSample.c:95 msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" msgstr "" -#: shared-bindings/audioio/RawSample.c:104 +#: shared-bindings/audioio/RawSample.c:101 msgid "buffer must be a bytes-like object" msgstr "" @@ -2103,51 +2102,51 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" -#: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 -#: shared-bindings/busio/SPI.c:133 +#: shared-bindings/bitbangio/I2C.c:109 shared-bindings/bitbangio/SPI.c:119 +#: shared-bindings/busio/SPI.c:130 msgid "Function requires lock" msgstr "" -#: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210 +#: shared-bindings/bitbangio/I2C.c:193 shared-bindings/busio/I2C.c:207 msgid "Buffer must be at least length 1" msgstr "" -#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175 +#: shared-bindings/bitbangio/SPI.c:149 shared-bindings/busio/SPI.c:172 msgid "Invalid polarity" msgstr "" -#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179 +#: shared-bindings/bitbangio/SPI.c:153 shared-bindings/busio/SPI.c:176 msgid "Invalid phase" msgstr "" -#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183 +#: shared-bindings/bitbangio/SPI.c:157 shared-bindings/busio/SPI.c:180 msgid "Invalid number of bits" msgstr "" -#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348 +#: shared-bindings/bitbangio/SPI.c:282 shared-bindings/busio/SPI.c:345 msgid "buffer slices must be of equal length" msgstr "" -#: shared-bindings/bleio/Address.c:119 +#: shared-bindings/bleio/Address.c:115 #, c-format msgid "Address is not %d bytes long or is in wrong format" msgstr "" -#: shared-bindings/bleio/Address.c:126 +#: shared-bindings/bleio/Address.c:122 #, c-format msgid "Address must be %d bytes long" msgstr "" -#: shared-bindings/bleio/Characteristic.c:81 -#: shared-bindings/bleio/Descriptor.c:93 shared-bindings/bleio/Service.c:78 +#: shared-bindings/bleio/Characteristic.c:74 +#: shared-bindings/bleio/Descriptor.c:86 shared-bindings/bleio/Service.c:66 msgid "Expected a UUID" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:68 +#: shared-bindings/bleio/CharacteristicBuffer.c:61 msgid "buffer_size must be >= 1" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:72 +#: shared-bindings/bleio/CharacteristicBuffer.c:65 msgid "Expected a Characteristic" msgstr "" @@ -2167,19 +2166,19 @@ msgstr "" msgid "Can't advertise in Central mode" msgstr "" -#: shared-bindings/bleio/Peripheral.c:111 +#: shared-bindings/bleio/Peripheral.c:106 msgid "services includes an object that is not a Service" msgstr "" -#: shared-bindings/bleio/Peripheral.c:124 +#: shared-bindings/bleio/Peripheral.c:119 msgid "name must be a string" msgstr "" -#: shared-bindings/bleio/Service.c:90 +#: shared-bindings/bleio/Service.c:84 msgid "characteristics includes an object that is not a Characteristic" msgstr "" -#: shared-bindings/bleio/Service.c:96 +#: shared-bindings/bleio/Service.c:90 msgid "Characteristic UUID doesn't match Service UUID" msgstr "" @@ -2199,19 +2198,19 @@ msgstr "" msgid "not a 128-bit UUID" msgstr "" -#: shared-bindings/busio/I2C.c:120 +#: shared-bindings/busio/I2C.c:117 msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:106 +#: shared-bindings/busio/UART.c:103 msgid "bits must be 7, 8 or 9" msgstr "" -#: shared-bindings/busio/UART.c:118 +#: shared-bindings/busio/UART.c:115 msgid "stop must be 1 or 2" msgstr "" -#: shared-bindings/busio/UART.c:123 +#: shared-bindings/busio/UART.c:120 msgid "timeout >100 (units are now seconds, not msecs)" msgstr "" @@ -2237,7 +2236,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "" -#: shared-bindings/displayio/Bitmap.c:84 +#: shared-bindings/displayio/Bitmap.c:84 shared-bindings/displayio/Shape.c:88 msgid "y should be an int" msgstr "" @@ -2253,45 +2252,78 @@ msgstr "" msgid "color should be an int" msgstr "" -#: shared-bindings/displayio/FourWire.c:55 -#: shared-bindings/displayio/FourWire.c:64 +#: shared-bindings/displayio/Display.c:79 +msgid "Width and height kwargs required" +msgstr "" + +#: shared-bindings/displayio/Display.c:93 +msgid "Display limit reached" +msgstr "" + +#: shared-bindings/displayio/Display.c:112 +msgid "Must be a Group subclass." +msgstr "" + +#: shared-bindings/displayio/FourWire.c:69 +msgid "Command and chip_select required" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:91 +#: shared-bindings/displayio/ParallelBus.c:94 +msgid "Display bus limit reached" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:104 +#: shared-bindings/displayio/ParallelBus.c:106 msgid "displayio is a work in progress" msgstr "" -#: shared-bindings/displayio/Group.c:65 +#: shared-bindings/displayio/Group.c:62 msgid "Group must have size at least 1" msgstr "" -#: shared-bindings/displayio/Palette.c:96 +#: shared-bindings/displayio/Palette.c:93 msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" -#: shared-bindings/displayio/Palette.c:102 +#: shared-bindings/displayio/Palette.c:99 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" -#: shared-bindings/displayio/Palette.c:106 +#: shared-bindings/displayio/Palette.c:103 msgid "color must be between 0x000000 and 0xffffff" msgstr "" -#: shared-bindings/displayio/Palette.c:110 +#: shared-bindings/displayio/Palette.c:107 msgid "color buffer must be a buffer or int" msgstr "" -#: shared-bindings/displayio/Palette.c:123 -#: shared-bindings/displayio/Palette.c:137 +#: shared-bindings/displayio/Palette.c:120 +#: shared-bindings/displayio/Palette.c:134 msgid "palette_index should be an int" msgstr "" -#: shared-bindings/displayio/Sprite.c:48 +#: shared-bindings/displayio/ParallelBus.c:75 +msgid "Data0, command, chip_select, write and read required" +msgstr "" + +#: shared-bindings/displayio/Shape.c:92 +msgid "start_x should be an int" +msgstr "" + +#: shared-bindings/displayio/Shape.c:96 +msgid "end_x should be an int" +msgstr "" + +#: shared-bindings/displayio/Sprite.c:49 msgid "position must be 2-tuple" msgstr "" -#: shared-bindings/displayio/Sprite.c:97 +#: shared-bindings/displayio/Sprite.c:102 msgid "unsupported bitmap type" msgstr "" -#: shared-bindings/displayio/Sprite.c:162 +#: shared-bindings/displayio/Sprite.c:167 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgstr "" @@ -2303,15 +2335,15 @@ msgstr "" msgid "expected a DigitalInOut" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:98 +#: shared-bindings/i2cslave/I2CSlave.c:95 msgid "can't convert address to int" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:101 +#: shared-bindings/i2cslave/I2CSlave.c:98 msgid "address out of bounds" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:107 +#: shared-bindings/i2cslave/I2CSlave.c:104 msgid "addresses is empty" msgstr "" @@ -2353,29 +2385,29 @@ msgstr "" msgid "No hardware random available" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:164 +#: shared-bindings/pulseio/PWMOut.c:162 msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:195 +#: shared-bindings/pulseio/PWMOut.c:193 msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" -#: shared-bindings/pulseio/PulseIn.c:275 +#: shared-bindings/pulseio/PulseIn.c:272 msgid "Cannot delete values" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:281 +#: shared-bindings/pulseio/PulseIn.c:278 msgid "Slices not supported" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:287 +#: shared-bindings/pulseio/PulseIn.c:284 msgid "index must be int" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:293 +#: shared-bindings/pulseio/PulseIn.c:290 msgid "Read-only" msgstr "" @@ -2541,11 +2573,19 @@ msgstr "" msgid "row must be packed and word aligned" msgstr "" +#: shared-module/displayio/Display.c:62 +msgid "Unsupported display bus type" +msgstr "" + #: shared-module/displayio/Group.c:39 msgid "Group full" msgstr "" -#: shared-module/displayio/Group.c:48 +#: shared-module/displayio/Group.c:46 +msgid "Layer must be a Group or Sprite subclass." +msgstr "" + +#: shared-module/displayio/Group.c:55 msgid "Group empty" msgstr "" @@ -2563,6 +2603,19 @@ msgstr "" msgid "Only true color (24 bpp or higher) BMP supported %x" msgstr "" +#: shared-module/displayio/Shape.c:60 +msgid "y value out of bounds" +msgstr "" + +#: shared-module/displayio/Shape.c:63 +msgid "x value out of bounds" +msgstr "" + +#: shared-module/displayio/Shape.c:67 +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." msgstr "" @@ -2588,6 +2641,18 @@ msgstr "" msgid "USB Error" msgstr "" +#: supervisor/shared/board_busses.c:62 +msgid "No default I2C bus" +msgstr "" + +#: supervisor/shared/board_busses.c:89 +msgid "No default SPI bus" +msgstr "" + +#: supervisor/shared/board_busses.c:116 +msgid "No default UART bus" +msgstr "" + #: supervisor/shared/safe_mode.c:97 msgid "You requested starting safe mode by " msgstr "" diff --git a/locale/es.po b/locale/es.po index 1278e92cb..8dd8ef920 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-01-10 21:32-0500\n" +"POT-Creation-Date: 2019-01-18 11:43-0800\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -152,11 +152,11 @@ msgstr "argumentos inválidos" msgid "script compilation not supported" msgstr "script de compilación no soportado" -#: main.c:150 +#: main.c:155 msgid " output:\n" msgstr " salida:\n" -#: main.c:164 main.c:237 +#: main.c:169 main.c:247 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -164,28 +164,28 @@ msgstr "" "Auto-reload habilitado. Simplemente guarda los archivos via USB para " "ejecutarlos o entra al REPL para desabilitarlos.\n" -#: main.c:166 +#: main.c:171 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Ejecutando en modo seguro! La auto-recarga esta deshabilitada.\n" -#: main.c:168 main.c:239 +#: main.c:173 main.c:249 msgid "Auto-reload is off.\n" msgstr "Auto-recarga deshabilitada.\n" -#: main.c:182 +#: main.c:187 msgid "Running in safe mode! Not running saved code.\n" msgstr "Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n" -#: main.c:198 +#: main.c:203 msgid "WARNING: Your code filename has two extensions\n" msgstr "ADVERTENCIA: El nombre de archivo de tu código tiene dos extensiones\n" -#: main.c:244 +#: main.c:254 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" "Presiona cualquier tecla para entrar al REPL. Usa CTRL-D para recargar." -#: main.c:407 +#: main.c:417 msgid "soft reboot\n" msgstr "reinicio suave\n" @@ -204,18 +204,6 @@ msgstr "calibration es de solo lectura" msgid "calibration is out of range" msgstr "calibration esta fuera de rango" -#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 -msgid "No default I2C bus" -msgstr "Sin bus I2C por defecto" - -#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64 -msgid "No default SPI bus" -msgstr "Sin bus SPI por defecto" - -#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91 -msgid "No default UART bus" -msgstr "Sin bus UART por defecto" - #: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63 #: ports/nrf/common-hal/analogio/AnalogIn.c:39 msgid "Pin does not have ADC capabilities" @@ -332,7 +320,7 @@ msgid "Not enough pins available" msgstr "No hay suficientes pines disponibles" #: ports/atmel-samd/common-hal/busio/I2C.c:78 -#: ports/atmel-samd/common-hal/busio/SPI.c:171 +#: ports/atmel-samd/common-hal/busio/SPI.c:176 #: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:84 @@ -380,6 +368,18 @@ msgstr "Sin pin TX" msgid "Cannot get pull while in output mode" msgstr "No puede ser pull mientras este en modo de salida" +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:43 +#: ports/nrf/common-hal/displayio/ParallelBus.c:43 +#, fuzzy +msgid "Data 0 pin must be byte aligned" +msgstr "graphic debe ser 2048 bytes de largo" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:47 +#: ports/nrf/common-hal/displayio/ParallelBus.c:47 +#, fuzzy, c-format +msgid "Bus pin %d is already in use" +msgstr "DAC ya está siendo utilizado" + #: ports/atmel-samd/common-hal/microcontroller/__init__.c:74 #: ports/esp8266/common-hal/microcontroller/__init__.c:64 msgid "Cannot reset into bootloader because no bootloader is present." @@ -897,48 +897,48 @@ msgstr "No se sabe cómo pasar objeto a función nativa" msgid "[addrinfo error %d]" msgstr "[addrinfo error %d]" -#: py/argcheck.c:44 +#: py/argcheck.c:53 msgid "function does not take keyword arguments" msgstr "la función no tiene argumentos por palabra clave" -#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "la función toma %d argumentos posicionales pero le fueron dados %d" -#: py/argcheck.c:64 +#: py/argcheck.c:73 #, c-format msgid "function missing %d required positional arguments" msgstr "a la función le hacen falta %d argumentos posicionales requeridos" -#: py/argcheck.c:72 +#: py/argcheck.c:81 #, c-format msgid "function expected at most %d arguments, got %d" msgstr "la función esperaba minimo %d argumentos, tiene %d" -#: py/argcheck.c:97 +#: py/argcheck.c:106 msgid "'%q' argument required" msgstr "argumento '%q' requerido" -#: py/argcheck.c:122 +#: py/argcheck.c:131 msgid "extra positional arguments given" msgstr "argumento posicional adicional dado" -#: py/argcheck.c:130 +#: py/argcheck.c:139 msgid "extra keyword arguments given" msgstr "argumento(s) por palabra clave adicionales fueron dados" -#: py/argcheck.c:142 +#: py/argcheck.c:151 msgid "argument num/types mismatch" msgstr "argumento número/tipos no coinciden" -#: py/argcheck.c:147 +#: py/argcheck.c:156 msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" "argumento(s) por palabra clave aún no implementados - usa argumentos " "normales en su lugar" -#: py/bc.c:88 py/objnamedtuple.c:108 +#: py/bc.c:88 py/objnamedtuple.c:109 msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() toma %d argumentos posicionales pero %d fueron dados" @@ -950,11 +950,11 @@ msgstr "argumento por palabra clave inesperado" msgid "keywords must be strings" msgstr "palabras clave deben ser strings" -#: py/bc.c:206 py/objnamedtuple.c:138 +#: py/bc.c:206 py/objnamedtuple.c:139 msgid "function got multiple values for argument '%q'" msgstr "la función tiene múltiples valores para el argumento '%q'" -#: py/bc.c:218 py/objnamedtuple.c:130 +#: py/bc.c:218 py/objnamedtuple.c:131 msgid "unexpected keyword argument '%q'" msgstr "argumento por palabra clave inesperado '%q'" @@ -1546,11 +1546,11 @@ msgstr "lleno" msgid "empty" msgstr "vacío" -#: py/objdict.c:314 +#: py/objdict.c:312 msgid "popitem(): dictionary is empty" msgstr "popitem(): diccionario vacío" -#: py/objdict.c:357 +#: py/objdict.c:355 msgid "dict update sequence has wrong length" msgstr "la secuencia de actualizacion del dict tiene una longitud incorrecta" @@ -1731,7 +1731,9 @@ msgstr "atributos aún no soportados" #: py/objstr.c:1079 msgid "" "can't switch from manual field specification to automatic field numbering" -msgstr "no se puede cambiar de especificación de campo manual a numeración automática de campos" +msgstr "" +"no se puede cambiar de especificación de campo manual a numeración " +"automática de campos" #: py/objstr.c:1171 msgid "invalid format specifier" @@ -1796,7 +1798,8 @@ msgstr "carácter no soportado '%c' (0x%x) en índice %d" #: py/objstr.c:1577 msgid "not all arguments converted during string formatting" -msgstr "no todos los argumentos fueron convertidos durante el formato de string" +msgstr "" +"no todos los argumentos fueron convertidos durante el formato de string" #: py/objstr.c:2102 msgid "can't convert to str implicitly" @@ -1815,69 +1818,69 @@ msgstr "índices de string deben ser enteros, no %s" msgid "string index out of range" msgstr "string index fuera de rango" -#: py/objtype.c:358 +#: py/objtype.c:368 msgid "__init__() should return None" msgstr "__init__() deberia devolver None" -#: py/objtype.c:360 +#: py/objtype.c:370 #, c-format msgid "__init__() should return None, not '%s'" msgstr "__init__() deberia devolver None, no '%s'" -#: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065 +#: py/objtype.c:633 py/objtype.c:1287 py/runtime.c:1065 msgid "unreadable attribute" msgstr "atributo no legible" -#: py/objtype.c:868 py/runtime.c:653 +#: py/objtype.c:878 py/runtime.c:653 msgid "object not callable" msgstr "objeto no puede ser llamado" -#: py/objtype.c:870 py/runtime.c:655 +#: py/objtype.c:880 py/runtime.c:655 #, c-format msgid "'%s' object is not callable" msgstr "objeto '%s' no puede ser llamado" -#: py/objtype.c:978 +#: py/objtype.c:988 msgid "type takes 1 or 3 arguments" msgstr "type acepta 1 o 3 argumentos" -#: py/objtype.c:989 +#: py/objtype.c:999 msgid "cannot create instance" msgstr "no se puede crear instancia" -#: py/objtype.c:991 +#: py/objtype.c:1001 msgid "cannot create '%q' instances" msgstr "no se pueden crear '%q' instancias" -#: py/objtype.c:1047 +#: py/objtype.c:1059 msgid "can't add special method to already-subclassed class" msgstr "no se puede agregar un método a una clase ya subclasificada" -#: py/objtype.c:1091 py/objtype.c:1097 +#: py/objtype.c:1103 py/objtype.c:1109 msgid "type is not an acceptable base type" msgstr "type no es un tipo de base aceptable" -#: py/objtype.c:1100 +#: py/objtype.c:1112 msgid "type '%q' is not an acceptable base type" msgstr "type '%q' no es un tipo de base aceptable" -#: py/objtype.c:1137 +#: py/objtype.c:1149 msgid "multiple inheritance not supported" msgstr "herencia multiple no soportada" -#: py/objtype.c:1164 +#: py/objtype.c:1176 msgid "multiple bases have instance lay-out conflict" msgstr "" -#: py/objtype.c:1205 +#: py/objtype.c:1217 msgid "first argument to super() must be type" msgstr "primer argumento para super() debe ser de tipo" -#: py/objtype.c:1370 +#: py/objtype.c:1382 msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 debe ser una clase o tuple de clases" -#: py/objtype.c:1384 +#: py/objtype.c:1396 msgid "issubclass() arg 1 must be a class" msgstr "issubclass() arg 1 debe ser una clase" @@ -2075,8 +2078,8 @@ msgstr "chars buffer muy pequeño" msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "AnalogOut es solo de 16 bits. Value debe ser menos a 65536." -#: shared-bindings/audiobusio/I2SOut.c:225 -#: shared-bindings/audioio/AudioOut.c:226 +#: shared-bindings/audiobusio/I2SOut.c:222 +#: shared-bindings/audioio/AudioOut.c:223 msgid "Not playing" msgstr "" @@ -2115,23 +2118,23 @@ msgstr "" "el buffer de destino debe ser un bytearray o array de tipo 'B' para " "bit_depth = 8" -#: shared-bindings/audioio/Mixer.c:94 +#: shared-bindings/audioio/Mixer.c:91 msgid "Invalid voice count" msgstr "Cuenta de voces inválida" -#: shared-bindings/audioio/Mixer.c:99 +#: shared-bindings/audioio/Mixer.c:96 msgid "Invalid channel count" msgstr "Cuenta de canales inválida" -#: shared-bindings/audioio/Mixer.c:103 +#: shared-bindings/audioio/Mixer.c:100 msgid "Sample rate must be positive" msgstr "Sample rate debe ser positivo" -#: shared-bindings/audioio/Mixer.c:107 +#: shared-bindings/audioio/Mixer.c:104 msgid "bits_per_sample must be 8 or 16" msgstr "bits_per_sample debe ser 8 o 16" -#: shared-bindings/audioio/RawSample.c:98 +#: shared-bindings/audioio/RawSample.c:95 msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" @@ -2139,7 +2142,7 @@ msgstr "" "sample_source buffer debe ser un bytearray o un array de tipo 'h', 'H', 'b' " "o'B'" -#: shared-bindings/audioio/RawSample.c:104 +#: shared-bindings/audioio/RawSample.c:101 msgid "buffer must be a bytes-like object" msgstr "buffer debe de ser un objeto bytes-like" @@ -2148,53 +2151,53 @@ msgstr "buffer debe de ser un objeto bytes-like" msgid "file must be a file opened in byte mode" msgstr "el archivo deberia ser una archivo abierto en modo byte" -#: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 -#: shared-bindings/busio/SPI.c:133 +#: shared-bindings/bitbangio/I2C.c:109 shared-bindings/bitbangio/SPI.c:119 +#: shared-bindings/busio/SPI.c:130 msgid "Function requires lock" msgstr "La función requiere lock" -#: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210 +#: shared-bindings/bitbangio/I2C.c:193 shared-bindings/busio/I2C.c:207 msgid "Buffer must be at least length 1" msgstr "Buffer debe ser de longitud 1 como minimo" -#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175 +#: shared-bindings/bitbangio/SPI.c:149 shared-bindings/busio/SPI.c:172 msgid "Invalid polarity" msgstr "Polaridad inválida" -#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179 +#: shared-bindings/bitbangio/SPI.c:153 shared-bindings/busio/SPI.c:176 msgid "Invalid phase" msgstr "Fase inválida" -#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183 +#: shared-bindings/bitbangio/SPI.c:157 shared-bindings/busio/SPI.c:180 msgid "Invalid number of bits" msgstr "Numero inválido de bits" -#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348 +#: shared-bindings/bitbangio/SPI.c:282 shared-bindings/busio/SPI.c:345 msgid "buffer slices must be of equal length" msgstr "" -#: shared-bindings/bleio/Address.c:119 +#: shared-bindings/bleio/Address.c:115 #, c-format msgid "Address is not %d bytes long or is in wrong format" msgstr "" -#: shared-bindings/bleio/Address.c:126 +#: shared-bindings/bleio/Address.c:122 #, fuzzy, c-format msgid "Address must be %d bytes long" msgstr "palette debe ser 32 bytes de largo" -#: shared-bindings/bleio/Characteristic.c:81 -#: shared-bindings/bleio/Descriptor.c:93 shared-bindings/bleio/Service.c:78 +#: shared-bindings/bleio/Characteristic.c:74 +#: shared-bindings/bleio/Descriptor.c:86 shared-bindings/bleio/Service.c:66 #, fuzzy msgid "Expected a UUID" msgstr "Se espera un %q" -#: shared-bindings/bleio/CharacteristicBuffer.c:68 +#: shared-bindings/bleio/CharacteristicBuffer.c:61 #, fuzzy msgid "buffer_size must be >= 1" msgstr "los buffers deben de tener la misma longitud" -#: shared-bindings/bleio/CharacteristicBuffer.c:72 +#: shared-bindings/bleio/CharacteristicBuffer.c:65 #, fuzzy msgid "Expected a Characteristic" msgstr "No se puede agregar la Característica." @@ -2215,20 +2218,20 @@ msgstr "No se puede cambiar el nombre en modo Central" msgid "Can't advertise in Central mode" msgstr "" -#: shared-bindings/bleio/Peripheral.c:111 +#: shared-bindings/bleio/Peripheral.c:106 msgid "services includes an object that is not a Service" msgstr "" -#: shared-bindings/bleio/Peripheral.c:124 +#: shared-bindings/bleio/Peripheral.c:119 #, fuzzy msgid "name must be a string" msgstr "palabras clave deben ser strings" -#: shared-bindings/bleio/Service.c:90 +#: shared-bindings/bleio/Service.c:84 msgid "characteristics includes an object that is not a Characteristic" msgstr "" -#: shared-bindings/bleio/Service.c:96 +#: shared-bindings/bleio/Service.c:90 msgid "Characteristic UUID doesn't match Service UUID" msgstr "" @@ -2249,19 +2252,19 @@ msgstr "buffer debe de ser un objeto bytes-like" msgid "not a 128-bit UUID" msgstr "" -#: shared-bindings/busio/I2C.c:120 +#: shared-bindings/busio/I2C.c:117 msgid "Function requires lock." msgstr "La función requiere lock" -#: shared-bindings/busio/UART.c:106 +#: shared-bindings/busio/UART.c:103 msgid "bits must be 7, 8 or 9" msgstr "bits deben ser 7, 8 o 9" -#: shared-bindings/busio/UART.c:118 +#: shared-bindings/busio/UART.c:115 msgid "stop must be 1 or 2" msgstr "stop debe ser 1 o 2" -#: shared-bindings/busio/UART.c:123 +#: shared-bindings/busio/UART.c:120 msgid "timeout >100 (units are now seconds, not msecs)" msgstr "" @@ -2287,7 +2290,7 @@ msgstr "Pull no se usa cuando la dirección es output." msgid "Unsupported pull value." msgstr "valor pull no soportado." -#: shared-bindings/displayio/Bitmap.c:84 +#: shared-bindings/displayio/Bitmap.c:84 shared-bindings/displayio/Shape.c:88 msgid "y should be an int" msgstr "y deberia ser un int" @@ -2303,45 +2306,80 @@ msgstr "row data debe ser un buffer" msgid "color should be an int" msgstr "color deberia ser un int" -#: shared-bindings/displayio/FourWire.c:55 -#: shared-bindings/displayio/FourWire.c:64 +#: shared-bindings/displayio/Display.c:79 +msgid "Width and height kwargs required" +msgstr "" + +#: shared-bindings/displayio/Display.c:93 +msgid "Display limit reached" +msgstr "" + +#: shared-bindings/displayio/Display.c:112 +msgid "Must be a Group subclass." +msgstr "" + +#: shared-bindings/displayio/FourWire.c:69 +msgid "Command and chip_select required" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:91 +#: shared-bindings/displayio/ParallelBus.c:94 +msgid "Display bus limit reached" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:104 +#: shared-bindings/displayio/ParallelBus.c:106 msgid "displayio is a work in progress" msgstr "displayio todavia esta en desarrollo" -#: shared-bindings/displayio/Group.c:65 +#: shared-bindings/displayio/Group.c:62 msgid "Group must have size at least 1" msgstr "Group debe tener size de minimo 1" -#: shared-bindings/displayio/Palette.c:96 +#: shared-bindings/displayio/Palette.c:93 msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "color buffer deberia ser un bytearray o array de tipo 'b' o 'B'" -#: shared-bindings/displayio/Palette.c:102 +#: shared-bindings/displayio/Palette.c:99 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" -#: shared-bindings/displayio/Palette.c:106 +#: shared-bindings/displayio/Palette.c:103 msgid "color must be between 0x000000 and 0xffffff" msgstr "color debe estar entre 0x000000 y 0xffffff" -#: shared-bindings/displayio/Palette.c:110 +#: shared-bindings/displayio/Palette.c:107 msgid "color buffer must be a buffer or int" msgstr "color buffer deber ser un buffer o un int" -#: shared-bindings/displayio/Palette.c:123 -#: shared-bindings/displayio/Palette.c:137 +#: shared-bindings/displayio/Palette.c:120 +#: shared-bindings/displayio/Palette.c:134 msgid "palette_index should be an int" msgstr "palette_index deberia ser un int" -#: shared-bindings/displayio/Sprite.c:48 +#: shared-bindings/displayio/ParallelBus.c:75 +msgid "Data0, command, chip_select, write and read required" +msgstr "" + +#: shared-bindings/displayio/Shape.c:92 +#, fuzzy +msgid "start_x should be an int" +msgstr "y deberia ser un int" + +#: shared-bindings/displayio/Shape.c:96 +#, fuzzy +msgid "end_x should be an int" +msgstr "y deberia ser un int" + +#: shared-bindings/displayio/Sprite.c:49 msgid "position must be 2-tuple" msgstr "posición debe ser 2-tuple" -#: shared-bindings/displayio/Sprite.c:97 +#: shared-bindings/displayio/Sprite.c:102 msgid "unsupported bitmap type" msgstr "tipo de bitmap no soportado" -#: shared-bindings/displayio/Sprite.c:162 +#: shared-bindings/displayio/Sprite.c:167 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgstr "pixel_shader debe ser displayio.Palette o displayio.ColorConverter" @@ -2353,15 +2391,15 @@ msgstr "muchos argumentos" msgid "expected a DigitalInOut" msgstr "se espera un DigitalInOut" -#: shared-bindings/i2cslave/I2CSlave.c:98 +#: shared-bindings/i2cslave/I2CSlave.c:95 msgid "can't convert address to int" msgstr "no se puede convertir address a int" -#: shared-bindings/i2cslave/I2CSlave.c:101 +#: shared-bindings/i2cslave/I2CSlave.c:98 msgid "address out of bounds" msgstr "address fuera de límites" -#: shared-bindings/i2cslave/I2CSlave.c:107 +#: shared-bindings/i2cslave/I2CSlave.c:104 msgid "addresses is empty" msgstr "addresses esta vacío" @@ -2403,29 +2441,29 @@ msgstr "Bytes debe estar entre 0 y 255." msgid "No hardware random available" msgstr "No hay hardware random disponible" -#: shared-bindings/pulseio/PWMOut.c:164 +#: shared-bindings/pulseio/PWMOut.c:162 msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:195 +#: shared-bindings/pulseio/PWMOut.c:193 msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" -#: shared-bindings/pulseio/PulseIn.c:275 +#: shared-bindings/pulseio/PulseIn.c:272 msgid "Cannot delete values" msgstr "No se puede eliminar valores" -#: shared-bindings/pulseio/PulseIn.c:281 +#: shared-bindings/pulseio/PulseIn.c:278 msgid "Slices not supported" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:287 +#: shared-bindings/pulseio/PulseIn.c:284 msgid "index must be int" msgstr "indice debe ser int" -#: shared-bindings/pulseio/PulseIn.c:293 +#: shared-bindings/pulseio/PulseIn.c:290 msgid "Read-only" msgstr "Solo-lectura" @@ -2593,11 +2631,20 @@ msgstr "Solo se admiten bit maps de color de 8 bits o menos" msgid "row must be packed and word aligned" msgstr "la fila debe estar empacada y la palabra alineada" +#: shared-module/displayio/Display.c:62 +#, fuzzy +msgid "Unsupported display bus type" +msgstr "tipo de bitmap no soportado" + #: shared-module/displayio/Group.c:39 msgid "Group full" msgstr "Group lleno" -#: shared-module/displayio/Group.c:48 +#: shared-module/displayio/Group.c:46 +msgid "Layer must be a Group or Sprite subclass." +msgstr "" + +#: shared-module/displayio/Group.c:55 msgid "Group empty" msgstr "Group vacío" @@ -2615,6 +2662,21 @@ msgstr "Solo formato Windows, BMP sin comprimir soportado %d" msgid "Only true color (24 bpp or higher) BMP supported %x" msgstr "Solo color verdadero (24 bpp o superior) BMP admitido %x" +#: shared-module/displayio/Shape.c:60 +#, fuzzy +msgid "y value out of bounds" +msgstr "address fuera de límites" + +#: shared-module/displayio/Shape.c:63 +#, fuzzy +msgid "x value out of bounds" +msgstr "address fuera de límites" + +#: shared-module/displayio/Shape.c:67 +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." msgstr "No se puede volver a montar '/' cuando el USB esta activo." @@ -2640,6 +2702,18 @@ msgstr "USB ocupado" msgid "USB Error" msgstr "Error USB" +#: supervisor/shared/board_busses.c:62 +msgid "No default I2C bus" +msgstr "Sin bus I2C por defecto" + +#: supervisor/shared/board_busses.c:89 +msgid "No default SPI bus" +msgstr "Sin bus SPI por defecto" + +#: supervisor/shared/board_busses.c:116 +msgid "No default UART bus" +msgstr "Sin bus UART por defecto" + #: supervisor/shared/safe_mode.c:97 msgid "You requested starting safe mode by " msgstr "Solicitaste iniciar en modo seguro por " @@ -2663,7 +2737,8 @@ msgid "" " with the contents of your CIRCUITPY drive and this message:\n" msgstr "" "Parece que nuestro código de CircuitPython ha fallado con fuerza. Whoops!\n" -"Por favor, crea un issue en https://github.com/adafruit/circuitpython/issues\n" +"Por favor, crea un issue en https://github.com/adafruit/circuitpython/" +"issues\n" " con el contenido de su unidad CIRCUITPY y este mensaje:\n" #: supervisor/shared/safe_mode.c:111 @@ -2688,8 +2763,8 @@ msgid "" msgstr "" "La alimentación del microcontrolador cayó. Por favor asegurate de que tu " "fuente de alimentación provee\n" -"suficiente energia para todo el circuito y presiona el botón de reset (despues" -"de expulsar CIRCUITPY).\n" +"suficiente energia para todo el circuito y presiona el botón de reset " +"(despuesde expulsar CIRCUITPY).\n" #: supervisor/shared/safe_mode.c:120 msgid "" @@ -2705,8 +2780,11 @@ msgid "" "The reset button was pressed while booting CircuitPython. Press again to " "exit safe mode.\n" msgstr "" -"El botón reset fue presionado mientras arrancaba CircuitPython. Presiona otra" -" vez para salir del modo seguro.\n" +"El botón reset fue presionado mientras arrancaba CircuitPython. Presiona " +"otra vez para salir del modo seguro.\n" + +#~ msgid "Wrong address length" +#~ msgstr "Longitud de address erronea" #~ msgid "Invalid UUID string length" #~ msgstr "Longitud de string UUID inválida" @@ -2714,17 +2792,34 @@ msgstr "" #~ msgid "Invalid UUID parameter" #~ msgstr "Parámetro UUID inválido" -#~ msgid "Wrong address length" -#~ msgstr "Longitud de address erronea" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "No se pueden aplicar los parámetros GAP." + +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "No se pueden establecer los parámetros PPCP." + +#~ msgid "Invalid Service type" +#~ msgstr "Tipo de Servicio inválido" + +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." #~ msgid "Wrong number of bytes provided" #~ msgstr "Numero erroneo de bytes dados" -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "No se pueden aplicar los parámetros GAP." +#, fuzzy +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Por favor registra un issue en la siguiente URL con el contenidos de tu " +#~ "unidad de almacenamiento CIRCUITPY:\n" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "suficiente poder para todo el circuito y presiona reset (después de " +#~ "expulsar CIRCUITPY).\n" #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" #~ msgstr "" @@ -2736,34 +2831,14 @@ msgstr "" #~ msgid "Can not encode UUID, to check length." #~ msgstr "No se puede codificar el UUID, para revisar la longitud." +#~ msgid "Can not apply device name in the stack." +#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." + #~ msgid "Can not query for the device address." #~ msgstr "No se puede consultar la dirección del dispositivo." -#, fuzzy -#~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" -#~ msgstr "" -#~ "Por favor registra un issue en la siguiente URL con el contenidos de tu " -#~ "unidad de almacenamiento CIRCUITPY:\n" - -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." - -#~ msgid "Invalid Service type" -#~ msgstr "Tipo de Servicio inválido" - #~ msgid "Can not add Service." #~ msgstr "No se puede agregar el Servicio." #~ msgid "Can not apply advertisement data. status: 0x%02x" #~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x" - -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "No se pueden establecer los parámetros PPCP." - -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "suficiente poder para todo el circuito y presiona reset (después de " -#~ "expulsar CIRCUITPY).\n" diff --git a/locale/fil.po b/locale/fil.po index 5daa673f7..59c415066 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-01-10 21:32-0500\n" +"POT-Creation-Date: 2019-01-18 11:43-0800\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -151,11 +151,11 @@ msgstr "mali ang mga argumento" msgid "script compilation not supported" msgstr "script kompilasyon hindi supportado" -#: main.c:150 +#: main.c:155 msgid " output:\n" msgstr " output:\n" -#: main.c:164 main.c:237 +#: main.c:169 main.c:247 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -163,29 +163,29 @@ msgstr "" "Ang awtomatikong pag re-reload ay ON. i-save lamang ang mga files sa USB " "para patakbuhin sila o pasukin ang REPL para i-disable ito.\n" -#: main.c:166 +#: main.c:171 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Tumatakbo sa safe mode! Awtomatikong pag re-reload ay OFF.\n" -#: main.c:168 main.c:239 +#: main.c:173 main.c:249 msgid "Auto-reload is off.\n" msgstr "Awtomatikong pag re-reload ay OFF.\n" -#: main.c:182 +#: main.c:187 msgid "Running in safe mode! Not running saved code.\n" msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n" -#: main.c:198 +#: main.c:203 msgid "WARNING: Your code filename has two extensions\n" msgstr "BABALA: Ang pangalan ng file ay may dalawang extension\n" -#: main.c:244 +#: main.c:254 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" "Pindutin ang anumang key upang pumasok sa REPL. Gamitin ang CTRL-D upang i-" "reload." -#: main.c:407 +#: main.c:417 msgid "soft reboot\n" msgstr "malambot na reboot\n" @@ -202,18 +202,6 @@ msgstr "pagkakalibrate ay basahin lamang" msgid "calibration is out of range" msgstr "kalibrasion ay wala sa sakop" -#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 -msgid "No default I2C bus" -msgstr "Walang default na I2C bus" - -#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64 -msgid "No default SPI bus" -msgstr "Walang default SPI bus" - -#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91 -msgid "No default UART bus" -msgstr "Walang default UART bus" - #: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63 #: ports/nrf/common-hal/analogio/AnalogIn.c:39 msgid "Pin does not have ADC capabilities" @@ -330,7 +318,7 @@ msgid "Not enough pins available" msgstr "Hindi sapat ang magagamit na pins" #: ports/atmel-samd/common-hal/busio/I2C.c:78 -#: ports/atmel-samd/common-hal/busio/SPI.c:171 +#: ports/atmel-samd/common-hal/busio/SPI.c:176 #: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:84 @@ -378,6 +366,18 @@ msgstr "Walang TX pin" msgid "Cannot get pull while in output mode" msgstr "Hindi makakakuha ng pull habang nasa output mode" +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:43 +#: ports/nrf/common-hal/displayio/ParallelBus.c:43 +#, fuzzy +msgid "Data 0 pin must be byte aligned" +msgstr "graphic ay dapat 2048 bytes ang haba" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:47 +#: ports/nrf/common-hal/displayio/ParallelBus.c:47 +#, fuzzy, c-format +msgid "Bus pin %d is already in use" +msgstr "Ginagamit na ang DAC" + #: ports/atmel-samd/common-hal/microcontroller/__init__.c:74 #: ports/esp8266/common-hal/microcontroller/__init__.c:64 msgid "Cannot reset into bootloader because no bootloader is present." @@ -898,49 +898,49 @@ msgstr "Hindi alam ipasa ang object sa native function" msgid "[addrinfo error %d]" msgstr "[addrinfo error %d]" -#: py/argcheck.c:44 +#: py/argcheck.c:53 msgid "function does not take keyword arguments" msgstr "ang function ay hindi kumukuha ng mga argumento ng keyword" -#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" "ang function ay kumuhuha ng %d positional arguments ngunit %d ang ibinigay" -#: py/argcheck.c:64 +#: py/argcheck.c:73 #, c-format msgid "function missing %d required positional arguments" msgstr "function kulang ng %d required na positional arguments" -#: py/argcheck.c:72 +#: py/argcheck.c:81 #, c-format msgid "function expected at most %d arguments, got %d" msgstr "function na inaasahang %d ang argumento, ngunit %d ang nakuha" -#: py/argcheck.c:97 +#: py/argcheck.c:106 msgid "'%q' argument required" msgstr "'%q' argument kailangan" -#: py/argcheck.c:122 +#: py/argcheck.c:131 msgid "extra positional arguments given" msgstr "dagdag na positional argument na ibinigay" -#: py/argcheck.c:130 +#: py/argcheck.c:139 msgid "extra keyword arguments given" msgstr "dagdag na keyword argument na ibinigay" -#: py/argcheck.c:142 +#: py/argcheck.c:151 msgid "argument num/types mismatch" msgstr "hindi tugma ang argument num/types" -#: py/argcheck.c:147 +#: py/argcheck.c:156 msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" "kindi pa ipinapatupad ang (mga) argument(s) ng keyword - gumamit ng normal " "args" -#: py/bc.c:88 py/objnamedtuple.c:108 +#: py/bc.c:88 py/objnamedtuple.c:109 msgid "%q() takes %d positional arguments but %d were given" msgstr "" "Ang %q() ay kumukuha ng %d positional arguments pero %d lang ang binigay" @@ -953,11 +953,11 @@ msgstr "hindi inaasahang argumento ng keyword" msgid "keywords must be strings" msgstr "ang keywords dapat strings" -#: py/bc.c:206 py/objnamedtuple.c:138 +#: py/bc.c:206 py/objnamedtuple.c:139 msgid "function got multiple values for argument '%q'" msgstr "ang function ay nakakuha ng maraming values para sa argument '%q'" -#: py/bc.c:218 py/objnamedtuple.c:130 +#: py/bc.c:218 py/objnamedtuple.c:131 msgid "unexpected keyword argument '%q'" msgstr "hindi inaasahang argumento ng keyword na '%q'" @@ -1548,11 +1548,11 @@ msgstr "puno" msgid "empty" msgstr "walang laman" -#: py/objdict.c:314 +#: py/objdict.c:312 msgid "popitem(): dictionary is empty" msgstr "popitem(): dictionary ay walang laman" -#: py/objdict.c:357 +#: py/objdict.c:355 msgid "dict update sequence has wrong length" msgstr "may mali sa haba ng dict update sequence" @@ -1819,70 +1819,70 @@ msgstr "ang indeks ng string ay dapat na integer, hindi %s" msgid "string index out of range" msgstr "indeks ng string wala sa sakop" -#: py/objtype.c:358 +#: py/objtype.c:368 msgid "__init__() should return None" msgstr "__init __ () dapat magbalik na None" -#: py/objtype.c:360 +#: py/objtype.c:370 #, c-format msgid "__init__() should return None, not '%s'" msgstr "__init__() dapat magbalink na None, hindi '%s'" -#: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065 +#: py/objtype.c:633 py/objtype.c:1287 py/runtime.c:1065 msgid "unreadable attribute" msgstr "hindi mabasa ang attribute" -#: py/objtype.c:868 py/runtime.c:653 +#: py/objtype.c:878 py/runtime.c:653 msgid "object not callable" msgstr "hindi matatawag ang object" -#: py/objtype.c:870 py/runtime.c:655 +#: py/objtype.c:880 py/runtime.c:655 #, c-format msgid "'%s' object is not callable" msgstr "'%s' object hindi matatawag" -#: py/objtype.c:978 +#: py/objtype.c:988 msgid "type takes 1 or 3 arguments" msgstr "type kumuhuha ng 1 o 3 arguments" -#: py/objtype.c:989 +#: py/objtype.c:999 msgid "cannot create instance" msgstr "hindi magawa ang instance" -#: py/objtype.c:991 +#: py/objtype.c:1001 msgid "cannot create '%q' instances" msgstr "hindi magawa '%q' instances" -#: py/objtype.c:1047 +#: py/objtype.c:1059 msgid "can't add special method to already-subclassed class" msgstr "" "hindi madagdag ang isang espesyal na method sa isang na i-subclass na class" -#: py/objtype.c:1091 py/objtype.c:1097 +#: py/objtype.c:1103 py/objtype.c:1109 msgid "type is not an acceptable base type" msgstr "hindi puede ang type para sa base type" -#: py/objtype.c:1100 +#: py/objtype.c:1112 msgid "type '%q' is not an acceptable base type" msgstr "hindi maari ang type na '%q' para sa base type" -#: py/objtype.c:1137 +#: py/objtype.c:1149 msgid "multiple inheritance not supported" msgstr "maraming inhertance hindi sinusuportahan" -#: py/objtype.c:1164 +#: py/objtype.c:1176 msgid "multiple bases have instance lay-out conflict" msgstr "maraming bases ay may instance lay-out conflict" -#: py/objtype.c:1205 +#: py/objtype.c:1217 msgid "first argument to super() must be type" msgstr "unang argument ng super() ay dapat type" -#: py/objtype.c:1370 +#: py/objtype.c:1382 msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "issubclass() arg 2 ay dapat na class o tuple ng classes" -#: py/objtype.c:1384 +#: py/objtype.c:1396 msgid "issubclass() arg 1 must be a class" msgstr "issubclass() arg 1 ay dapat na class" @@ -2080,8 +2080,8 @@ msgstr "masyadong maliit ang buffer" msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "AnalogOut ay 16 bits. Value ay dapat hindi hihigit pa sa 65536." -#: shared-bindings/audiobusio/I2SOut.c:225 -#: shared-bindings/audioio/AudioOut.c:226 +#: shared-bindings/audiobusio/I2SOut.c:222 +#: shared-bindings/audioio/AudioOut.c:223 msgid "Not playing" msgstr "Hindi playing" @@ -2123,23 +2123,23 @@ msgstr "" "ang destination buffer ay dapat na isang bytearray o array ng uri na 'B' " "para sa bit_depth = 8" -#: shared-bindings/audioio/Mixer.c:94 +#: shared-bindings/audioio/Mixer.c:91 msgid "Invalid voice count" msgstr "Maling bilang ng voice" -#: shared-bindings/audioio/Mixer.c:99 +#: shared-bindings/audioio/Mixer.c:96 msgid "Invalid channel count" msgstr "Maling bilang ng channel" -#: shared-bindings/audioio/Mixer.c:103 +#: shared-bindings/audioio/Mixer.c:100 msgid "Sample rate must be positive" msgstr "Sample rate ay dapat positibo" -#: shared-bindings/audioio/Mixer.c:107 +#: shared-bindings/audioio/Mixer.c:104 msgid "bits_per_sample must be 8 or 16" msgstr "bits_per_sample ay dapat 8 o 16" -#: shared-bindings/audioio/RawSample.c:98 +#: shared-bindings/audioio/RawSample.c:95 msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" @@ -2147,7 +2147,7 @@ msgstr "" "ang sample_source buffer ay dapat na isang bytearray o array ng uri na 'h', " "'H', 'b' o'B'" -#: shared-bindings/audioio/RawSample.c:104 +#: shared-bindings/audioio/RawSample.c:101 msgid "buffer must be a bytes-like object" msgstr "buffer ay dapat bytes-like object" @@ -2156,53 +2156,53 @@ msgstr "buffer ay dapat bytes-like object" msgid "file must be a file opened in byte mode" msgstr "file ay dapat buksan sa byte mode" -#: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 -#: shared-bindings/busio/SPI.c:133 +#: shared-bindings/bitbangio/I2C.c:109 shared-bindings/bitbangio/SPI.c:119 +#: shared-bindings/busio/SPI.c:130 msgid "Function requires lock" msgstr "Function nangangailangan ng lock" -#: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210 +#: shared-bindings/bitbangio/I2C.c:193 shared-bindings/busio/I2C.c:207 msgid "Buffer must be at least length 1" msgstr "Buffer dapat ay hindi baba sa 1 na haba" -#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175 +#: shared-bindings/bitbangio/SPI.c:149 shared-bindings/busio/SPI.c:172 msgid "Invalid polarity" msgstr "Mali ang polarity" -#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179 +#: shared-bindings/bitbangio/SPI.c:153 shared-bindings/busio/SPI.c:176 msgid "Invalid phase" msgstr "Mali ang phase" -#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183 +#: shared-bindings/bitbangio/SPI.c:157 shared-bindings/busio/SPI.c:180 msgid "Invalid number of bits" msgstr "Mali ang bilang ng bits" -#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348 +#: shared-bindings/bitbangio/SPI.c:282 shared-bindings/busio/SPI.c:345 msgid "buffer slices must be of equal length" msgstr "aarehas na haba dapat ang buffer slices" -#: shared-bindings/bleio/Address.c:119 +#: shared-bindings/bleio/Address.c:115 #, c-format msgid "Address is not %d bytes long or is in wrong format" msgstr "" -#: shared-bindings/bleio/Address.c:126 +#: shared-bindings/bleio/Address.c:122 #, fuzzy, c-format msgid "Address must be %d bytes long" msgstr "ang palette ay dapat 32 bytes ang haba" -#: shared-bindings/bleio/Characteristic.c:81 -#: shared-bindings/bleio/Descriptor.c:93 shared-bindings/bleio/Service.c:78 +#: shared-bindings/bleio/Characteristic.c:74 +#: shared-bindings/bleio/Descriptor.c:86 shared-bindings/bleio/Service.c:66 #, fuzzy msgid "Expected a UUID" msgstr "Umasa ng %q" -#: shared-bindings/bleio/CharacteristicBuffer.c:68 +#: shared-bindings/bleio/CharacteristicBuffer.c:61 #, fuzzy msgid "buffer_size must be >= 1" msgstr "aarehas na haba dapat ang buffer slices" -#: shared-bindings/bleio/CharacteristicBuffer.c:72 +#: shared-bindings/bleio/CharacteristicBuffer.c:65 #, fuzzy msgid "Expected a Characteristic" msgstr "Hindi mabasa and Characteristic." @@ -2223,20 +2223,20 @@ msgstr "Hindi mapalitan ang pangalan sa Central mode" msgid "Can't advertise in Central mode" msgstr "Hindi ma advertise habang nasa Central mode" -#: shared-bindings/bleio/Peripheral.c:111 +#: shared-bindings/bleio/Peripheral.c:106 msgid "services includes an object that is not a Service" msgstr "" -#: shared-bindings/bleio/Peripheral.c:124 +#: shared-bindings/bleio/Peripheral.c:119 #, fuzzy msgid "name must be a string" msgstr "ang keywords dapat strings" -#: shared-bindings/bleio/Service.c:90 +#: shared-bindings/bleio/Service.c:84 msgid "characteristics includes an object that is not a Characteristic" msgstr "" -#: shared-bindings/bleio/Service.c:96 +#: shared-bindings/bleio/Service.c:90 msgid "Characteristic UUID doesn't match Service UUID" msgstr "" @@ -2257,19 +2257,19 @@ msgstr "buffer ay dapat bytes-like object" msgid "not a 128-bit UUID" msgstr "" -#: shared-bindings/busio/I2C.c:120 +#: shared-bindings/busio/I2C.c:117 msgid "Function requires lock." msgstr "Kailangan ng lock ang function." -#: shared-bindings/busio/UART.c:106 +#: shared-bindings/busio/UART.c:103 msgid "bits must be 7, 8 or 9" msgstr "bits ay dapat 7, 8 o 9" -#: shared-bindings/busio/UART.c:118 +#: shared-bindings/busio/UART.c:115 msgid "stop must be 1 or 2" msgstr "stop dapat 1 o 2" -#: shared-bindings/busio/UART.c:123 +#: shared-bindings/busio/UART.c:120 msgid "timeout >100 (units are now seconds, not msecs)" msgstr "timeout >100 (units ay seconds, hindi na msecs)" @@ -2295,7 +2295,7 @@ msgstr "Pull hindi ginagamit kapag ang direksyon ay output." msgid "Unsupported pull value." msgstr "Hindi suportado ang pull value." -#: shared-bindings/displayio/Bitmap.c:84 +#: shared-bindings/displayio/Bitmap.c:84 shared-bindings/displayio/Shape.c:88 msgid "y should be an int" msgstr "y ay dapat int" @@ -2311,45 +2311,80 @@ msgstr "row data ay dapat na buffer" msgid "color should be an int" msgstr "color ay dapat na int" -#: shared-bindings/displayio/FourWire.c:55 -#: shared-bindings/displayio/FourWire.c:64 +#: shared-bindings/displayio/Display.c:79 +msgid "Width and height kwargs required" +msgstr "" + +#: shared-bindings/displayio/Display.c:93 +msgid "Display limit reached" +msgstr "" + +#: shared-bindings/displayio/Display.c:112 +msgid "Must be a Group subclass." +msgstr "" + +#: shared-bindings/displayio/FourWire.c:69 +msgid "Command and chip_select required" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:91 +#: shared-bindings/displayio/ParallelBus.c:94 +msgid "Display bus limit reached" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:104 +#: shared-bindings/displayio/ParallelBus.c:106 msgid "displayio is a work in progress" msgstr "displayio ay nasa gitna ng konstruksiyon" -#: shared-bindings/displayio/Group.c:65 +#: shared-bindings/displayio/Group.c:62 msgid "Group must have size at least 1" msgstr "Group dapat ay hindi baba sa 1 na haba" -#: shared-bindings/displayio/Palette.c:96 +#: shared-bindings/displayio/Palette.c:93 msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "ang color buffer ay dapat bytearray o array na type ‘b’ or ‘B’" -#: shared-bindings/displayio/Palette.c:102 +#: shared-bindings/displayio/Palette.c:99 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "color buffer ay dapat na 3 bytes (RGB) o 4 bytes (RGB + pad byte)" -#: shared-bindings/displayio/Palette.c:106 +#: shared-bindings/displayio/Palette.c:103 msgid "color must be between 0x000000 and 0xffffff" msgstr "color ay dapat mula sa 0x000000 hangang 0xffffff" -#: shared-bindings/displayio/Palette.c:110 +#: shared-bindings/displayio/Palette.c:107 msgid "color buffer must be a buffer or int" msgstr "color buffer ay dapat buffer or int" -#: shared-bindings/displayio/Palette.c:123 -#: shared-bindings/displayio/Palette.c:137 +#: shared-bindings/displayio/Palette.c:120 +#: shared-bindings/displayio/Palette.c:134 msgid "palette_index should be an int" msgstr "palette_index ay dapat na int" -#: shared-bindings/displayio/Sprite.c:48 +#: shared-bindings/displayio/ParallelBus.c:75 +msgid "Data0, command, chip_select, write and read required" +msgstr "" + +#: shared-bindings/displayio/Shape.c:92 +#, fuzzy +msgid "start_x should be an int" +msgstr "y ay dapat int" + +#: shared-bindings/displayio/Shape.c:96 +#, fuzzy +msgid "end_x should be an int" +msgstr "y ay dapat int" + +#: shared-bindings/displayio/Sprite.c:49 msgid "position must be 2-tuple" msgstr "position ay dapat 2-tuple" -#: shared-bindings/displayio/Sprite.c:97 +#: shared-bindings/displayio/Sprite.c:102 msgid "unsupported bitmap type" msgstr "Hindi supportadong tipo ng bitmap" -#: shared-bindings/displayio/Sprite.c:162 +#: shared-bindings/displayio/Sprite.c:167 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgstr "pixel_shader ay dapat displayio.Palette o displayio.ColorConverter" @@ -2361,15 +2396,15 @@ msgstr "masyadong maraming argumento" msgid "expected a DigitalInOut" msgstr "umasa ng DigitalInOut" -#: shared-bindings/i2cslave/I2CSlave.c:98 +#: shared-bindings/i2cslave/I2CSlave.c:95 msgid "can't convert address to int" msgstr "hindi ma i-convert ang address sa INT" -#: shared-bindings/i2cslave/I2CSlave.c:101 +#: shared-bindings/i2cslave/I2CSlave.c:98 msgid "address out of bounds" msgstr "wala sa sakop ang address" -#: shared-bindings/i2cslave/I2CSlave.c:107 +#: shared-bindings/i2cslave/I2CSlave.c:104 msgid "addresses is empty" msgstr "walang laman ang address" @@ -2411,30 +2446,30 @@ msgstr "Sa gitna ng 0 o 255 dapat ang bytes." msgid "No hardware random available" msgstr "Walang magagamit na hardware random" -#: shared-bindings/pulseio/PWMOut.c:164 +#: shared-bindings/pulseio/PWMOut.c:162 msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "PWM duty_cycle ay dapat sa loob ng 0 at 65535 (16 bit resolution)" -#: shared-bindings/pulseio/PWMOut.c:195 +#: shared-bindings/pulseio/PWMOut.c:193 msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" "PWM frequency hindi writable kapag variable_frequency ay False sa pag buo." -#: shared-bindings/pulseio/PulseIn.c:275 +#: shared-bindings/pulseio/PulseIn.c:272 msgid "Cannot delete values" msgstr "Hindi mabura ang values" -#: shared-bindings/pulseio/PulseIn.c:281 +#: shared-bindings/pulseio/PulseIn.c:278 msgid "Slices not supported" msgstr "Hindi suportado ang Slices" -#: shared-bindings/pulseio/PulseIn.c:287 +#: shared-bindings/pulseio/PulseIn.c:284 msgid "index must be int" msgstr "index ay dapat int" -#: shared-bindings/pulseio/PulseIn.c:293 +#: shared-bindings/pulseio/PulseIn.c:290 msgid "Read-only" msgstr "Basahin-lamang" @@ -2602,11 +2637,20 @@ msgstr "Tanging bit maps na may 8 bit color o mas mababa ang supportado" msgid "row must be packed and word aligned" msgstr "row ay dapat packed at ang word nakahanay" +#: shared-module/displayio/Display.c:62 +#, fuzzy +msgid "Unsupported display bus type" +msgstr "Hindi supportadong tipo ng bitmap" + #: shared-module/displayio/Group.c:39 msgid "Group full" msgstr "Puno ang group" -#: shared-module/displayio/Group.c:48 +#: shared-module/displayio/Group.c:46 +msgid "Layer must be a Group or Sprite subclass." +msgstr "" + +#: shared-module/displayio/Group.c:55 msgid "Group empty" msgstr "Walang laman ang group" @@ -2624,6 +2668,21 @@ msgstr "Tanging Windows format, uncompressed BMP lamang ang supportado %d" msgid "Only true color (24 bpp or higher) BMP supported %x" msgstr "Dapat true color (24 bpp o mas mataas) BMP lamang ang supportado %x" +#: shared-module/displayio/Shape.c:60 +#, fuzzy +msgid "y value out of bounds" +msgstr "wala sa sakop ang address" + +#: shared-module/displayio/Shape.c:63 +#, fuzzy +msgid "x value out of bounds" +msgstr "wala sa sakop ang address" + +#: shared-module/displayio/Shape.c:67 +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." msgstr "Hindi ma-remount '/' kapag aktibo ang USB." @@ -2649,6 +2708,18 @@ msgstr "Busy ang USB" msgid "USB Error" msgstr "May pagkakamali ang USB" +#: supervisor/shared/board_busses.c:62 +msgid "No default I2C bus" +msgstr "Walang default na I2C bus" + +#: supervisor/shared/board_busses.c:89 +msgid "No default SPI bus" +msgstr "Walang default SPI bus" + +#: supervisor/shared/board_busses.c:116 +msgid "No default UART bus" +msgstr "Walang default UART bus" + #: supervisor/shared/safe_mode.c:97 msgid "You requested starting safe mode by " msgstr "Ikaw ang humiling sa safe mode sa pamamagitan ng " @@ -2718,23 +2789,42 @@ msgstr "" "Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin " "ulit para lumabas sa safe mode.\n" +#~ msgid "Wrong address length" +#~ msgstr "Mali ang address length" + #~ msgid "Invalid UUID string length" #~ msgstr "Mali ang UUID string length" #~ msgid "Invalid UUID parameter" #~ msgstr "Mali ang UUID parameter" -#~ msgid "Wrong address length" -#~ msgstr "Mali ang address length" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Hindi ma-apply ang GAP parameters." + +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Hindi ma-set ang PPCP parameters." + +#~ msgid "Invalid Service type" +#~ msgstr "Mali ang tipo ng serbisyo" + +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Maaring i-encode ang UUID sa advertisement packet." #~ msgid "Wrong number of bytes provided" #~ msgstr "Mali ang bilang ng bytes" -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Hindi ma-apply ang GAP parameters." +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY " +#~ "drive:\n" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang " +#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n" #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" #~ msgstr "" @@ -2747,33 +2837,14 @@ msgstr "" #~ msgid "Can not encode UUID, to check length." #~ msgstr "Hindi ma-encode UUID, para suriin ang haba." +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." + #~ msgid "Can not query for the device address." #~ msgstr "Hindi maaaring mag-query para sa address ng device." -#~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" -#~ msgstr "" -#~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY " -#~ "drive:\n" - -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Maaring i-encode ang UUID sa advertisement packet." - -#~ msgid "Invalid Service type" -#~ msgstr "Mali ang tipo ng serbisyo" - #~ msgid "Can not add Service." #~ msgstr "Hindi maidaragdag ang serbisyo." #~ msgid "Can not apply advertisement data. status: 0x%02x" #~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x" - -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Hindi ma-set ang PPCP parameters." - -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang " -#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n" diff --git a/locale/fr.po b/locale/fr.po index b27cfeb79..4ef9d9f87 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-10 21:32-0500\n" +"POT-Creation-Date: 2019-01-18 11:43-0800\n" "PO-Revision-Date: 2018-12-23 20:05+0100\n" "Last-Translator: Pierrick Couturier \n" "Language-Team: fr\n" @@ -150,11 +150,11 @@ msgstr "arguments invalides" msgid "script compilation not supported" msgstr "compilation de script non supporté" -#: main.c:150 +#: main.c:155 msgid " output:\n" msgstr " sortie:\n" -#: main.c:164 main.c:237 +#: main.c:169 main.c:247 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -162,27 +162,27 @@ msgstr "" "Auto-chargement activé. Copiez simplement les fichiers en USB pour les " "lancer ou entrez sur REPL pour le désactiver.\n" -#: main.c:166 +#: main.c:171 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Mode sans-échec. Auto-rechargement désactivé.\n" -#: main.c:168 main.c:239 +#: main.c:173 main.c:249 msgid "Auto-reload is off.\n" msgstr "Auto-rechargement désactivé.\n" -#: main.c:182 +#: main.c:187 msgid "Running in safe mode! Not running saved code.\n" msgstr "Mode sans-échec! Le code sauvegardé ne s'éxecute pas.\n" -#: main.c:198 +#: main.c:203 msgid "WARNING: Your code filename has two extensions\n" msgstr "ATTENTION: le nom de fichier de votre code a deux extensions\n" -#: main.c:244 +#: main.c:254 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "Appuyez sur une touche pour entrer sur REPL ou CTRL-D pour recharger." -#: main.c:407 +#: main.c:417 msgid "soft reboot\n" msgstr "redémarrage logiciel\n" @@ -199,18 +199,6 @@ msgstr "calibration en lecture seule" msgid "calibration is out of range" msgstr "calibration hors gamme" -#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 -msgid "No default I2C bus" -msgstr "Pas de bus I2C par défaut" - -#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64 -msgid "No default SPI bus" -msgstr "Pas de bus SPI par défaut" - -#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91 -msgid "No default UART bus" -msgstr "Pas de bus UART par défaut" - #: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63 #: ports/nrf/common-hal/analogio/AnalogIn.c:39 msgid "Pin does not have ADC capabilities" @@ -327,7 +315,7 @@ msgid "Not enough pins available" msgstr "Pas assez de broches disponibles" #: ports/atmel-samd/common-hal/busio/I2C.c:78 -#: ports/atmel-samd/common-hal/busio/SPI.c:171 +#: ports/atmel-samd/common-hal/busio/SPI.c:176 #: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:84 @@ -375,6 +363,18 @@ msgstr "Pas de broche TX" msgid "Cannot get pull while in output mode" msgstr "Ne peux être tiré ('pull') en mode 'output'" +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:43 +#: ports/nrf/common-hal/displayio/ParallelBus.c:43 +#, fuzzy +msgid "Data 0 pin must be byte aligned" +msgstr "le graphic doit être long de 2048 octets" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:47 +#: ports/nrf/common-hal/displayio/ParallelBus.c:47 +#, fuzzy, c-format +msgid "Bus pin %d is already in use" +msgstr "DAC déjà utilisé" + #: ports/atmel-samd/common-hal/microcontroller/__init__.c:74 #: ports/esp8266/common-hal/microcontroller/__init__.c:64 msgid "Cannot reset into bootloader because no bootloader is present." @@ -900,47 +900,47 @@ msgstr "Ne sais pas comment passer l'objet à une fonction native" msgid "[addrinfo error %d]" msgstr "" -#: py/argcheck.c:44 +#: py/argcheck.c:53 msgid "function does not take keyword arguments" msgstr "la fonction ne prend pas d'arguments nommés" -#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "la fonction prend %d argument(s) mais %d ont été donné(s)" -#: py/argcheck.c:64 +#: py/argcheck.c:73 #, c-format msgid "function missing %d required positional arguments" msgstr "il manque %d arguments obligatoires à la fonction" -#: py/argcheck.c:72 +#: py/argcheck.c:81 #, c-format msgid "function expected at most %d arguments, got %d" msgstr "la fonction attendait au plus %d arguments, reçu %d" -#: py/argcheck.c:97 +#: py/argcheck.c:106 msgid "'%q' argument required" msgstr "'%q' argument requis" -#: py/argcheck.c:122 +#: py/argcheck.c:131 msgid "extra positional arguments given" msgstr "argument positionnel donné en plus" -#: py/argcheck.c:130 +#: py/argcheck.c:139 msgid "extra keyword arguments given" msgstr "argument nommé donné en plus" -#: py/argcheck.c:142 +#: py/argcheck.c:151 msgid "argument num/types mismatch" msgstr "argument num/types ne correspond pas" -#: py/argcheck.c:147 +#: py/argcheck.c:156 msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" "argument(s) nommé(s) pas encore implémenté - utilisez les arguments normaux" -#: py/bc.c:88 py/objnamedtuple.c:108 +#: py/bc.c:88 py/objnamedtuple.c:109 msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() prend %d arguments mais %d ont été donnés" @@ -952,11 +952,11 @@ msgstr "argument nommé imprévu" msgid "keywords must be strings" msgstr "les noms doivent être des chaînes de caractère" -#: py/bc.c:206 py/objnamedtuple.c:138 +#: py/bc.c:206 py/objnamedtuple.c:139 msgid "function got multiple values for argument '%q'" msgstr "la fonction a reçu plusieurs valeurs pour l'argument '%q'" -#: py/bc.c:218 py/objnamedtuple.c:130 +#: py/bc.c:218 py/objnamedtuple.c:131 msgid "unexpected keyword argument '%q'" msgstr "argument nommé '%q' imprévu" @@ -1546,11 +1546,11 @@ msgstr "plein" msgid "empty" msgstr "vide" -#: py/objdict.c:314 +#: py/objdict.c:312 msgid "popitem(): dictionary is empty" msgstr "popitem(): dictionnaire vide" -#: py/objdict.c:357 +#: py/objdict.c:355 msgid "dict update sequence has wrong length" msgstr "la séquence de mise à jour de dict a une mauvaise longueur" @@ -1818,71 +1818,71 @@ msgstr "les indices de chaîne de caractère doivent être des entiers, pas %s" msgid "string index out of range" msgstr "index de chaîne hors gamme" -#: py/objtype.c:358 +#: py/objtype.c:368 msgid "__init__() should return None" msgstr "__init__() doit retourner None" -#: py/objtype.c:360 +#: py/objtype.c:370 #, c-format msgid "__init__() should return None, not '%s'" msgstr "__init__() doit retourner None, pas '%s'" -#: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065 +#: py/objtype.c:633 py/objtype.c:1287 py/runtime.c:1065 msgid "unreadable attribute" msgstr "attribut illisible" -#: py/objtype.c:868 py/runtime.c:653 +#: py/objtype.c:878 py/runtime.c:653 msgid "object not callable" msgstr "objet non appelable" -#: py/objtype.c:870 py/runtime.c:655 +#: py/objtype.c:880 py/runtime.c:655 #, c-format msgid "'%s' object is not callable" msgstr "objet '%s' non appelable" -#: py/objtype.c:978 +#: py/objtype.c:988 msgid "type takes 1 or 3 arguments" msgstr "le type prend 1 ou 3 arguments" -#: py/objtype.c:989 +#: py/objtype.c:999 msgid "cannot create instance" msgstr "ne peut pas créer une instance" -#: py/objtype.c:991 +#: py/objtype.c:1001 msgid "cannot create '%q' instances" msgstr "ne peut pas créer une instance de '%q'" -#: py/objtype.c:1047 +#: py/objtype.c:1059 msgid "can't add special method to already-subclassed class" msgstr "" "impossible d'ajouter une méthode spécial à une classe déjà sous-classée" -#: py/objtype.c:1091 py/objtype.c:1097 +#: py/objtype.c:1103 py/objtype.c:1109 msgid "type is not an acceptable base type" msgstr "le type n'est pas un type de base accepté" -#: py/objtype.c:1100 +#: py/objtype.c:1112 msgid "type '%q' is not an acceptable base type" msgstr "le type '%q' n'est pas un type de base accepté" -#: py/objtype.c:1137 +#: py/objtype.c:1149 msgid "multiple inheritance not supported" msgstr "héritage multiple non supporté" -#: py/objtype.c:1164 +#: py/objtype.c:1176 msgid "multiple bases have instance lay-out conflict" msgstr "de multiple bases ont un conflit de lay-out d'instance" -#: py/objtype.c:1205 +#: py/objtype.c:1217 msgid "first argument to super() must be type" msgstr "le premier argument de super() doit être un type" -#: py/objtype.c:1370 +#: py/objtype.c:1382 msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" "l'argument 2 de issubclass() doit être une classe ou un tuple de classes" -#: py/objtype.c:1384 +#: py/objtype.c:1396 msgid "issubclass() arg 1 must be a class" msgstr "l'argument 1 de issubclass() doit être une classe" @@ -2082,8 +2082,8 @@ msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "" "AnalogOut est seulement 16 bits. Les valeurs doivent être inf. à 65536." -#: shared-bindings/audiobusio/I2SOut.c:225 -#: shared-bindings/audioio/AudioOut.c:226 +#: shared-bindings/audiobusio/I2SOut.c:222 +#: shared-bindings/audioio/AudioOut.c:223 msgid "Not playing" msgstr "Ne joue pas" @@ -2122,26 +2122,26 @@ msgid "" msgstr "" "le tampon de destination doit être un tableau de type 'B' pour bit_depth = 8" -#: shared-bindings/audioio/Mixer.c:94 +#: shared-bindings/audioio/Mixer.c:91 #, fuzzy msgid "Invalid voice count" msgstr "Type de service invalide" -#: shared-bindings/audioio/Mixer.c:99 +#: shared-bindings/audioio/Mixer.c:96 msgid "Invalid channel count" msgstr "" -#: shared-bindings/audioio/Mixer.c:103 +#: shared-bindings/audioio/Mixer.c:100 #, fuzzy msgid "Sample rate must be positive" msgstr "le taux d'échantillonage doit être positif" -#: shared-bindings/audioio/Mixer.c:107 +#: shared-bindings/audioio/Mixer.c:104 #, fuzzy msgid "bits_per_sample must be 8 or 16" msgstr "bits doivent être 8 ou 16" -#: shared-bindings/audioio/RawSample.c:98 +#: shared-bindings/audioio/RawSample.c:95 msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" @@ -2149,7 +2149,7 @@ msgstr "" "le tampon de sample_source doit être un bytearray ou un tableau de type " "'h','H', 'b' ou 'B'" -#: shared-bindings/audioio/RawSample.c:104 +#: shared-bindings/audioio/RawSample.c:101 msgid "buffer must be a bytes-like object" msgstr "le tampon doit être un objet bytes-like" @@ -2158,53 +2158,53 @@ msgstr "le tampon doit être un objet bytes-like" msgid "file must be a file opened in byte mode" msgstr "le fichier doit être un fichier ouvert en mode 'byte'" -#: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 -#: shared-bindings/busio/SPI.c:133 +#: shared-bindings/bitbangio/I2C.c:109 shared-bindings/bitbangio/SPI.c:119 +#: shared-bindings/busio/SPI.c:130 msgid "Function requires lock" msgstr "La fonction nécessite un verrou" -#: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210 +#: shared-bindings/bitbangio/I2C.c:193 shared-bindings/busio/I2C.c:207 msgid "Buffer must be at least length 1" msgstr "Le tampon doit être de longueur au moins 1" -#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175 +#: shared-bindings/bitbangio/SPI.c:149 shared-bindings/busio/SPI.c:172 msgid "Invalid polarity" msgstr "Polarité invalide" -#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179 +#: shared-bindings/bitbangio/SPI.c:153 shared-bindings/busio/SPI.c:176 msgid "Invalid phase" msgstr "Phase invalide" -#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183 +#: shared-bindings/bitbangio/SPI.c:157 shared-bindings/busio/SPI.c:180 msgid "Invalid number of bits" msgstr "Nombre de bits invalide" -#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348 +#: shared-bindings/bitbangio/SPI.c:282 shared-bindings/busio/SPI.c:345 msgid "buffer slices must be of equal length" msgstr "les slices de tampon doivent être de longueurs égales" -#: shared-bindings/bleio/Address.c:119 +#: shared-bindings/bleio/Address.c:115 #, c-format msgid "Address is not %d bytes long or is in wrong format" msgstr "" -#: shared-bindings/bleio/Address.c:126 +#: shared-bindings/bleio/Address.c:122 #, fuzzy, c-format msgid "Address must be %d bytes long" msgstr "la palette doit être longue de 32 octets" -#: shared-bindings/bleio/Characteristic.c:81 -#: shared-bindings/bleio/Descriptor.c:93 shared-bindings/bleio/Service.c:78 +#: shared-bindings/bleio/Characteristic.c:74 +#: shared-bindings/bleio/Descriptor.c:86 shared-bindings/bleio/Service.c:66 #, fuzzy msgid "Expected a UUID" msgstr "Attendu : %q" -#: shared-bindings/bleio/CharacteristicBuffer.c:68 +#: shared-bindings/bleio/CharacteristicBuffer.c:61 #, fuzzy msgid "buffer_size must be >= 1" msgstr "les slices de tampon doivent être de longueurs égales" -#: shared-bindings/bleio/CharacteristicBuffer.c:72 +#: shared-bindings/bleio/CharacteristicBuffer.c:65 #, fuzzy msgid "Expected a Characteristic" msgstr "Impossible d'ajouter la Characteristic." @@ -2225,20 +2225,20 @@ msgstr "Modification du nom impossible en mode Central" msgid "Can't advertise in Central mode" msgstr "" -#: shared-bindings/bleio/Peripheral.c:111 +#: shared-bindings/bleio/Peripheral.c:106 msgid "services includes an object that is not a Service" msgstr "" -#: shared-bindings/bleio/Peripheral.c:124 +#: shared-bindings/bleio/Peripheral.c:119 #, fuzzy msgid "name must be a string" msgstr "les noms doivent être des chaînes de caractère" -#: shared-bindings/bleio/Service.c:90 +#: shared-bindings/bleio/Service.c:84 msgid "characteristics includes an object that is not a Characteristic" msgstr "" -#: shared-bindings/bleio/Service.c:96 +#: shared-bindings/bleio/Service.c:90 msgid "Characteristic UUID doesn't match Service UUID" msgstr "" @@ -2259,19 +2259,19 @@ msgstr "le tampon doit être un objet bytes-like" msgid "not a 128-bit UUID" msgstr "" -#: shared-bindings/busio/I2C.c:120 +#: shared-bindings/busio/I2C.c:117 msgid "Function requires lock." msgstr "La fonction nécessite un verrou." -#: shared-bindings/busio/UART.c:106 +#: shared-bindings/busio/UART.c:103 msgid "bits must be 7, 8 or 9" msgstr "bits doivent être 7, 8 ou 9" -#: shared-bindings/busio/UART.c:118 +#: shared-bindings/busio/UART.c:115 msgid "stop must be 1 or 2" msgstr "stop doit être 1 ou 2" -#: shared-bindings/busio/UART.c:123 +#: shared-bindings/busio/UART.c:120 msgid "timeout >100 (units are now seconds, not msecs)" msgstr "timeout >100 (exprimé en secondes, pas en ms)" @@ -2297,7 +2297,7 @@ msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'." msgid "Unsupported pull value." msgstr "Valeur de tirage 'pull' non supportée." -#: shared-bindings/displayio/Bitmap.c:84 +#: shared-bindings/displayio/Bitmap.c:84 shared-bindings/displayio/Shape.c:88 #, fuzzy msgid "y should be an int" msgstr "y doit être un entier (int)" @@ -2318,53 +2318,88 @@ msgstr "les données de ligne doivent être un tampon" msgid "color should be an int" msgstr "la couleur doit être un entier (int)" -#: shared-bindings/displayio/FourWire.c:55 -#: shared-bindings/displayio/FourWire.c:64 +#: shared-bindings/displayio/Display.c:79 +msgid "Width and height kwargs required" +msgstr "" + +#: shared-bindings/displayio/Display.c:93 +msgid "Display limit reached" +msgstr "" + +#: shared-bindings/displayio/Display.c:112 +msgid "Must be a Group subclass." +msgstr "" + +#: shared-bindings/displayio/FourWire.c:69 +msgid "Command and chip_select required" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:91 +#: shared-bindings/displayio/ParallelBus.c:94 +msgid "Display bus limit reached" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:104 +#: shared-bindings/displayio/ParallelBus.c:106 msgid "displayio is a work in progress" msgstr "displayio est en cours de développement" -#: shared-bindings/displayio/Group.c:65 +#: shared-bindings/displayio/Group.c:62 #, fuzzy msgid "Group must have size at least 1" msgstr "Le tampon doit être de longueur au moins 1" -#: shared-bindings/displayio/Palette.c:96 +#: shared-bindings/displayio/Palette.c:93 #, fuzzy msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" "le tampon de couleur doit être un bytearray ou un tableau de type 'b' ou 'B'" -#: shared-bindings/displayio/Palette.c:102 +#: shared-bindings/displayio/Palette.c:99 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "le tampon de couleur doit faire 3 octets (RVB) ou 4 (RVB + pad byte)" -#: shared-bindings/displayio/Palette.c:106 +#: shared-bindings/displayio/Palette.c:103 #, fuzzy msgid "color must be between 0x000000 and 0xffffff" msgstr "la couleur doit être entre 0x000000 et 0xffffff" -#: shared-bindings/displayio/Palette.c:110 +#: shared-bindings/displayio/Palette.c:107 #, fuzzy msgid "color buffer must be a buffer or int" msgstr "le tampon de couleur doit être un tampon ou un entier" -#: shared-bindings/displayio/Palette.c:123 -#: shared-bindings/displayio/Palette.c:137 +#: shared-bindings/displayio/Palette.c:120 +#: shared-bindings/displayio/Palette.c:134 #, fuzzy msgid "palette_index should be an int" msgstr "palette_index devrait être un entier (int)'" -#: shared-bindings/displayio/Sprite.c:48 +#: shared-bindings/displayio/ParallelBus.c:75 +msgid "Data0, command, chip_select, write and read required" +msgstr "" + +#: shared-bindings/displayio/Shape.c:92 +#, fuzzy +msgid "start_x should be an int" +msgstr "y doit être un entier (int)" + +#: shared-bindings/displayio/Shape.c:96 +#, fuzzy +msgid "end_x should be an int" +msgstr "y doit être un entier (int)" + +#: shared-bindings/displayio/Sprite.c:49 #, fuzzy msgid "position must be 2-tuple" msgstr "position doit être un 2-tuple" -#: shared-bindings/displayio/Sprite.c:97 +#: shared-bindings/displayio/Sprite.c:102 #, fuzzy msgid "unsupported bitmap type" msgstr "type de bitmap non supporté" -#: shared-bindings/displayio/Sprite.c:162 +#: shared-bindings/displayio/Sprite.c:167 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgstr "" "pixel_shader doit être un objet displayio.Palette ou displayio.ColorConverter" @@ -2377,16 +2412,16 @@ msgstr "trop d'arguments" msgid "expected a DigitalInOut" msgstr "objet DigitalInOut attendu" -#: shared-bindings/i2cslave/I2CSlave.c:98 +#: shared-bindings/i2cslave/I2CSlave.c:95 #, fuzzy msgid "can't convert address to int" msgstr "ne peut convertir %s en entier int" -#: shared-bindings/i2cslave/I2CSlave.c:101 +#: shared-bindings/i2cslave/I2CSlave.c:98 msgid "address out of bounds" msgstr "adresse hors limites" -#: shared-bindings/i2cslave/I2CSlave.c:107 +#: shared-bindings/i2cslave/I2CSlave.c:104 msgid "addresses is empty" msgstr "adresses vides" @@ -2428,14 +2463,14 @@ msgstr "Les octets 'bytes' doivent être entre 0 et 255" msgid "No hardware random available" msgstr "Pas de source matérielle d'aléa disponible" -#: shared-bindings/pulseio/PWMOut.c:164 +#: shared-bindings/pulseio/PWMOut.c:162 msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "" "La valeur de cycle PWM doit être entre 0 et 65535 inclus (résolution de 16 " "bits)" -#: shared-bindings/pulseio/PWMOut.c:195 +#: shared-bindings/pulseio/PWMOut.c:193 #, fuzzy msgid "" "PWM frequency not writable when variable_frequency is False on construction." @@ -2443,19 +2478,19 @@ msgstr "" "La fréquence de PWM n'est pas modifiable quand variable_frequency est False " "à la construction." -#: shared-bindings/pulseio/PulseIn.c:275 +#: shared-bindings/pulseio/PulseIn.c:272 msgid "Cannot delete values" msgstr "Impossible de supprimer les valeurs" -#: shared-bindings/pulseio/PulseIn.c:281 +#: shared-bindings/pulseio/PulseIn.c:278 msgid "Slices not supported" msgstr "Slices non supportées" -#: shared-bindings/pulseio/PulseIn.c:287 +#: shared-bindings/pulseio/PulseIn.c:284 msgid "index must be int" msgstr "l'index doit être un entier" -#: shared-bindings/pulseio/PulseIn.c:293 +#: shared-bindings/pulseio/PulseIn.c:290 msgid "Read-only" msgstr "Lecture seule" @@ -2624,11 +2659,20 @@ msgstr "Seules les bitmaps de 8bits par couleur ou moins sont supportées" msgid "row must be packed and word aligned" msgstr "" +#: shared-module/displayio/Display.c:62 +#, fuzzy +msgid "Unsupported display bus type" +msgstr "type de bitmap non supporté" + #: shared-module/displayio/Group.c:39 msgid "Group full" msgstr "Groupe plein" -#: shared-module/displayio/Group.c:48 +#: shared-module/displayio/Group.c:46 +msgid "Layer must be a Group or Sprite subclass." +msgstr "" + +#: shared-module/displayio/Group.c:55 #, fuzzy msgid "Group empty" msgstr "Groupe vide" @@ -2648,6 +2692,21 @@ msgstr "Seul les BMP non-compressé au format Windows sont supportés %d" msgid "Only true color (24 bpp or higher) BMP supported %x" msgstr "Seul les BMP 24bits ou plus sont supportés %x" +#: shared-module/displayio/Shape.c:60 +#, fuzzy +msgid "y value out of bounds" +msgstr "adresse hors limites" + +#: shared-module/displayio/Shape.c:63 +#, fuzzy +msgid "x value out of bounds" +msgstr "adresse hors limites" + +#: shared-module/displayio/Shape.c:67 +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." msgstr "'/' ne peut être remonté quand l'USB est actif." @@ -2673,6 +2732,18 @@ msgstr "USB occupé" msgid "USB Error" msgstr "Erreur USB" +#: supervisor/shared/board_busses.c:62 +msgid "No default I2C bus" +msgstr "Pas de bus I2C par défaut" + +#: supervisor/shared/board_busses.c:89 +msgid "No default SPI bus" +msgstr "Pas de bus SPI par défaut" + +#: supervisor/shared/board_busses.c:116 +msgid "No default UART bus" +msgstr "Pas de bus UART par défaut" + #: supervisor/shared/safe_mode.c:97 msgid "You requested starting safe mode by " msgstr "Vous avez demandé à démarrer en mode sans-échec par " @@ -2747,27 +2818,37 @@ msgstr "" "Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. " "Appuyer denouveau pour quitter de le mode sans-échec.\n" +#~ msgid "Wrong address length" +#~ msgstr "Mauvaise longueur d'adresse" + #~ msgid "Invalid UUID string length" #~ msgstr "Longeur de chaîne UUID invalide" #~ msgid "Invalid UUID parameter" #~ msgstr "Paramètre UUID invalide" -#~ msgid "Wrong address length" -#~ msgstr "Mauvaise longueur d'adresse" +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n" + +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Impossible d'appliquer les paramètres GAP" + +#~ msgid "Can not add Characteristic." +#~ msgstr "Impossible d'ajouter la Characteristic." + +#~ msgid "Can not add Service." +#~ msgstr "Impossible d'ajouter le Service" #, fuzzy #~ msgid "Wrong number of bytes provided" #~ msgstr "mauvais nombre d'octets fourni'" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n" +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur." -#~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" -#~ msgstr "" -#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n" +#~ msgid "Invalid Service type" +#~ msgstr "Type de service invalide" #, fuzzy #~ msgid "value_size must be power of two" @@ -2783,27 +2864,17 @@ msgstr "" #~ "assez de puissance pour l'ensemble du circuit et appuyez sur " #~ "'reset' (après avoir éjecter CIRCUITPY).\n" +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n" + #, fuzzy #~ msgid "palette must be displayio.Palette" #~ msgstr "la palette doit être une displayio.Palette" -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur." - -#~ msgid "Can not add Service." -#~ msgstr "Impossible d'ajouter le Service" - -#~ msgid "Can not add Characteristic." -#~ msgstr "Impossible d'ajouter la Characteristic." - #~ msgid "Can not apply device name in the stack." #~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile" #~ msgid "Can not query for the device address." #~ msgstr "Impossible d'obtenir l'adresse du périphérique" - -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Impossible d'appliquer les paramètres GAP" - -#~ msgid "Invalid Service type" -#~ msgstr "Type de service invalide" diff --git a/locale/it_IT.po b/locale/it_IT.po index 9b54d5dc9..47aff5166 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-01-10 21:32-0500\n" +"POT-Creation-Date: 2019-01-18 11:43-0800\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -151,11 +151,11 @@ msgstr "argomenti non validi" msgid "script compilation not supported" msgstr "compilazione dello scrip non suportata" -#: main.c:150 +#: main.c:155 msgid " output:\n" msgstr " output:\n" -#: main.c:164 main.c:237 +#: main.c:169 main.c:247 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -163,28 +163,28 @@ msgstr "" "L'auto-reload è attivo. Salva i file su USB per eseguirli o entra nel REPL " "per disabilitarlo.\n" -#: main.c:166 +#: main.c:171 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Modalità sicura in esecuzione! Auto-reload disattivato.\n" -#: main.c:168 main.c:239 +#: main.c:173 main.c:249 msgid "Auto-reload is off.\n" msgstr "Auto-reload disattivato.\n" -#: main.c:182 +#: main.c:187 msgid "Running in safe mode! Not running saved code.\n" msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n" -#: main.c:198 +#: main.c:203 msgid "WARNING: Your code filename has two extensions\n" msgstr "ATTENZIONE: Il nome del sorgente ha due estensioni\n" -#: main.c:244 +#: main.c:254 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" "Premi un qualunque tasto per entrare nel REPL. Usa CTRL-D per ricaricare." -#: main.c:407 +#: main.c:417 msgid "soft reboot\n" msgstr "soft reboot\n" @@ -201,18 +201,6 @@ msgstr "la calibrazione è in sola lettura" msgid "calibration is out of range" msgstr "la calibrazione è fuori intervallo" -#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 -msgid "No default I2C bus" -msgstr "Nessun bus I2C predefinito" - -#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64 -msgid "No default SPI bus" -msgstr "Nessun bus SPI predefinito" - -#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91 -msgid "No default UART bus" -msgstr "Nessun bus UART predefinito" - #: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63 #: ports/nrf/common-hal/analogio/AnalogIn.c:39 msgid "Pin does not have ADC capabilities" @@ -331,7 +319,7 @@ msgid "Not enough pins available" msgstr "Non sono presenti abbastanza pin" #: ports/atmel-samd/common-hal/busio/I2C.c:78 -#: ports/atmel-samd/common-hal/busio/SPI.c:171 +#: ports/atmel-samd/common-hal/busio/SPI.c:176 #: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:84 @@ -379,6 +367,18 @@ msgstr "Nessun pin TX" msgid "Cannot get pull while in output mode" msgstr "" +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:43 +#: ports/nrf/common-hal/displayio/ParallelBus.c:43 +#, fuzzy +msgid "Data 0 pin must be byte aligned" +msgstr "graphic deve essere lunga 2048 byte" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:47 +#: ports/nrf/common-hal/displayio/ParallelBus.c:47 +#, fuzzy, c-format +msgid "Bus pin %d is already in use" +msgstr "DAC già in uso" + #: ports/atmel-samd/common-hal/microcontroller/__init__.c:74 #: ports/esp8266/common-hal/microcontroller/__init__.c:64 msgid "Cannot reset into bootloader because no bootloader is present." @@ -901,49 +901,49 @@ msgstr "Non so come passare l'oggetto alla funzione nativa" msgid "[addrinfo error %d]" msgstr "[errore addrinfo %d]" -#: py/argcheck.c:44 +#: py/argcheck.c:53 msgid "function does not take keyword arguments" msgstr "la funzione non prende argomenti nominati" -#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" "la funzione prende %d argomenti posizionali ma ne sono stati forniti %d" -#: py/argcheck.c:64 +#: py/argcheck.c:73 #, c-format msgid "function missing %d required positional arguments" msgstr "mancano %d argomenti posizionali obbligatori alla funzione" -#: py/argcheck.c:72 +#: py/argcheck.c:81 #, c-format msgid "function expected at most %d arguments, got %d" msgstr "la funzione prevede al massimo %d argmoneti, ma ne ha ricevuti %d" -#: py/argcheck.c:97 +#: py/argcheck.c:106 msgid "'%q' argument required" msgstr "'%q' argomento richiesto" -#: py/argcheck.c:122 +#: py/argcheck.c:131 msgid "extra positional arguments given" msgstr "argomenti posizonali extra dati" -#: py/argcheck.c:130 +#: py/argcheck.c:139 msgid "extra keyword arguments given" msgstr "argomento nominato aggiuntivo fornito" -#: py/argcheck.c:142 +#: py/argcheck.c:151 msgid "argument num/types mismatch" msgstr "discrepanza di numero/tipo di argomenti" -#: py/argcheck.c:147 +#: py/argcheck.c:156 msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" "argomento(i) nominati non ancora implementati - usare invece argomenti " "normali" -#: py/bc.c:88 py/objnamedtuple.c:108 +#: py/bc.c:88 py/objnamedtuple.c:109 msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() prende %d argomenti posizionali ma ne sono stati forniti %d" @@ -955,11 +955,11 @@ msgstr "argomento nominato inaspettato" msgid "keywords must be strings" msgstr "argomenti nominati devono essere stringhe" -#: py/bc.c:206 py/objnamedtuple.c:138 +#: py/bc.c:206 py/objnamedtuple.c:139 msgid "function got multiple values for argument '%q'" msgstr "la funzione ha ricevuto valori multipli per l'argomento '%q'" -#: py/bc.c:218 py/objnamedtuple.c:130 +#: py/bc.c:218 py/objnamedtuple.c:131 msgid "unexpected keyword argument '%q'" msgstr "argomento nominato '%q' inaspettato" @@ -1546,11 +1546,11 @@ msgstr "pieno" msgid "empty" msgstr "vuoto" -#: py/objdict.c:314 +#: py/objdict.c:312 msgid "popitem(): dictionary is empty" msgstr "popitem(): il dizionario è vuoto" -#: py/objdict.c:357 +#: py/objdict.c:355 msgid "dict update sequence has wrong length" msgstr "sequanza di aggiornamento del dizionario ha la lunghezza errata" @@ -1814,71 +1814,71 @@ msgstr "indici della stringa devono essere interi, non %s" msgid "string index out of range" msgstr "indice della stringa fuori intervallo" -#: py/objtype.c:358 +#: py/objtype.c:368 msgid "__init__() should return None" msgstr "__init__() deve ritornare None" -#: py/objtype.c:360 +#: py/objtype.c:370 #, c-format msgid "__init__() should return None, not '%s'" msgstr "__init__() deve ritornare None, non '%s'" -#: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065 +#: py/objtype.c:633 py/objtype.c:1287 py/runtime.c:1065 msgid "unreadable attribute" msgstr "attributo non leggibile" -#: py/objtype.c:868 py/runtime.c:653 +#: py/objtype.c:878 py/runtime.c:653 msgid "object not callable" msgstr "" -#: py/objtype.c:870 py/runtime.c:655 +#: py/objtype.c:880 py/runtime.c:655 #, c-format msgid "'%s' object is not callable" msgstr "" -#: py/objtype.c:978 +#: py/objtype.c:988 msgid "type takes 1 or 3 arguments" msgstr "tipo prende 1 o 3 argomenti" -#: py/objtype.c:989 +#: py/objtype.c:999 msgid "cannot create instance" msgstr "impossibile creare un istanza" -#: py/objtype.c:991 +#: py/objtype.c:1001 msgid "cannot create '%q' instances" msgstr "creare '%q' istanze" -#: py/objtype.c:1047 +#: py/objtype.c:1059 msgid "can't add special method to already-subclassed class" msgstr "" -#: py/objtype.c:1091 py/objtype.c:1097 +#: py/objtype.c:1103 py/objtype.c:1109 msgid "type is not an acceptable base type" msgstr "il tipo non è un tipo di base accettabile" -#: py/objtype.c:1100 +#: py/objtype.c:1112 msgid "type '%q' is not an acceptable base type" msgstr "il tipo '%q' non è un tipo di base accettabile" -#: py/objtype.c:1137 +#: py/objtype.c:1149 msgid "multiple inheritance not supported" msgstr "ereditarietà multipla non supportata" -#: py/objtype.c:1164 +#: py/objtype.c:1176 msgid "multiple bases have instance lay-out conflict" msgstr "" -#: py/objtype.c:1205 +#: py/objtype.c:1217 msgid "first argument to super() must be type" msgstr "" -#: py/objtype.c:1370 +#: py/objtype.c:1382 msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" "il secondo argomento di issubclass() deve essere una classe o una tupla di " "classi" -#: py/objtype.c:1384 +#: py/objtype.c:1396 msgid "issubclass() arg 1 must be a class" msgstr "il primo argomento di issubclass() deve essere una classe" @@ -2076,8 +2076,8 @@ msgstr "buffer dei caratteri troppo piccolo" msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "AnalogOut ha solo 16 bit. Il valore deve essere meno di 65536." -#: shared-bindings/audiobusio/I2SOut.c:225 -#: shared-bindings/audioio/AudioOut.c:226 +#: shared-bindings/audiobusio/I2SOut.c:222 +#: shared-bindings/audioio/AudioOut.c:223 msgid "Not playing" msgstr "In pausa" @@ -2118,27 +2118,27 @@ msgstr "" "il buffer di destinazione deve essere un bytearray o un array di tipo 'B' " "con bit_depth = 8" -#: shared-bindings/audioio/Mixer.c:94 +#: shared-bindings/audioio/Mixer.c:91 #, fuzzy msgid "Invalid voice count" msgstr "Tipo di servizio non valido" -#: shared-bindings/audioio/Mixer.c:99 +#: shared-bindings/audioio/Mixer.c:96 #, fuzzy msgid "Invalid channel count" msgstr "Argomento non valido" -#: shared-bindings/audioio/Mixer.c:103 +#: shared-bindings/audioio/Mixer.c:100 #, fuzzy msgid "Sample rate must be positive" msgstr "STA deve essere attiva" -#: shared-bindings/audioio/Mixer.c:107 +#: shared-bindings/audioio/Mixer.c:104 #, fuzzy msgid "bits_per_sample must be 8 or 16" msgstr "i bit devono essere 7, 8 o 9" -#: shared-bindings/audioio/RawSample.c:98 +#: shared-bindings/audioio/RawSample.c:95 msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" @@ -2146,7 +2146,7 @@ msgstr "" "il buffer sample_source deve essere un bytearray o un array di tipo 'h', " "'H', 'b' o 'B'" -#: shared-bindings/audioio/RawSample.c:104 +#: shared-bindings/audioio/RawSample.c:101 msgid "buffer must be a bytes-like object" msgstr "" @@ -2155,53 +2155,53 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" -#: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 -#: shared-bindings/busio/SPI.c:133 +#: shared-bindings/bitbangio/I2C.c:109 shared-bindings/bitbangio/SPI.c:119 +#: shared-bindings/busio/SPI.c:130 msgid "Function requires lock" msgstr "" -#: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210 +#: shared-bindings/bitbangio/I2C.c:193 shared-bindings/busio/I2C.c:207 msgid "Buffer must be at least length 1" msgstr "Il buffer deve essere lungo almeno 1" -#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175 +#: shared-bindings/bitbangio/SPI.c:149 shared-bindings/busio/SPI.c:172 msgid "Invalid polarity" msgstr "Polarità non valida" -#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179 +#: shared-bindings/bitbangio/SPI.c:153 shared-bindings/busio/SPI.c:176 msgid "Invalid phase" msgstr "Fase non valida" -#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183 +#: shared-bindings/bitbangio/SPI.c:157 shared-bindings/busio/SPI.c:180 msgid "Invalid number of bits" msgstr "Numero di bit non valido" -#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348 +#: shared-bindings/bitbangio/SPI.c:282 shared-bindings/busio/SPI.c:345 msgid "buffer slices must be of equal length" msgstr "slice del buffer devono essere della stessa lunghezza" -#: shared-bindings/bleio/Address.c:119 +#: shared-bindings/bleio/Address.c:115 #, c-format msgid "Address is not %d bytes long or is in wrong format" msgstr "" -#: shared-bindings/bleio/Address.c:126 +#: shared-bindings/bleio/Address.c:122 #, fuzzy, c-format msgid "Address must be %d bytes long" msgstr "la palette deve essere lunga 32 byte" -#: shared-bindings/bleio/Characteristic.c:81 -#: shared-bindings/bleio/Descriptor.c:93 shared-bindings/bleio/Service.c:78 +#: shared-bindings/bleio/Characteristic.c:74 +#: shared-bindings/bleio/Descriptor.c:86 shared-bindings/bleio/Service.c:66 #, fuzzy msgid "Expected a UUID" msgstr "Atteso un %q" -#: shared-bindings/bleio/CharacteristicBuffer.c:68 +#: shared-bindings/bleio/CharacteristicBuffer.c:61 #, fuzzy msgid "buffer_size must be >= 1" msgstr "slice del buffer devono essere della stessa lunghezza" -#: shared-bindings/bleio/CharacteristicBuffer.c:72 +#: shared-bindings/bleio/CharacteristicBuffer.c:65 #, fuzzy msgid "Expected a Characteristic" msgstr "Non è possibile aggiungere Characteristic." @@ -2222,20 +2222,20 @@ msgstr "" msgid "Can't advertise in Central mode" msgstr "" -#: shared-bindings/bleio/Peripheral.c:111 +#: shared-bindings/bleio/Peripheral.c:106 msgid "services includes an object that is not a Service" msgstr "" -#: shared-bindings/bleio/Peripheral.c:124 +#: shared-bindings/bleio/Peripheral.c:119 #, fuzzy msgid "name must be a string" msgstr "argomenti nominati devono essere stringhe" -#: shared-bindings/bleio/Service.c:90 +#: shared-bindings/bleio/Service.c:84 msgid "characteristics includes an object that is not a Characteristic" msgstr "" -#: shared-bindings/bleio/Service.c:96 +#: shared-bindings/bleio/Service.c:90 msgid "Characteristic UUID doesn't match Service UUID" msgstr "" @@ -2256,19 +2256,19 @@ msgstr "i buffer devono essere della stessa lunghezza" msgid "not a 128-bit UUID" msgstr "" -#: shared-bindings/busio/I2C.c:120 +#: shared-bindings/busio/I2C.c:117 msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:106 +#: shared-bindings/busio/UART.c:103 msgid "bits must be 7, 8 or 9" msgstr "i bit devono essere 7, 8 o 9" -#: shared-bindings/busio/UART.c:118 +#: shared-bindings/busio/UART.c:115 msgid "stop must be 1 or 2" msgstr "" -#: shared-bindings/busio/UART.c:123 +#: shared-bindings/busio/UART.c:120 msgid "timeout >100 (units are now seconds, not msecs)" msgstr "" @@ -2294,7 +2294,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "Valore di pull non supportato." -#: shared-bindings/displayio/Bitmap.c:84 +#: shared-bindings/displayio/Bitmap.c:84 shared-bindings/displayio/Shape.c:88 msgid "y should be an int" msgstr "y dovrebbe essere un int" @@ -2310,47 +2310,82 @@ msgstr "valori della riga devono essere un buffer" msgid "color should be an int" msgstr "il colore deve essere un int" -#: shared-bindings/displayio/FourWire.c:55 -#: shared-bindings/displayio/FourWire.c:64 +#: shared-bindings/displayio/Display.c:79 +msgid "Width and height kwargs required" +msgstr "" + +#: shared-bindings/displayio/Display.c:93 +msgid "Display limit reached" +msgstr "" + +#: shared-bindings/displayio/Display.c:112 +msgid "Must be a Group subclass." +msgstr "" + +#: shared-bindings/displayio/FourWire.c:69 +msgid "Command and chip_select required" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:91 +#: shared-bindings/displayio/ParallelBus.c:94 +msgid "Display bus limit reached" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:104 +#: shared-bindings/displayio/ParallelBus.c:106 msgid "displayio is a work in progress" msgstr "" -#: shared-bindings/displayio/Group.c:65 +#: shared-bindings/displayio/Group.c:62 msgid "Group must have size at least 1" msgstr "Il gruppo deve avere dimensione almeno 1" -#: shared-bindings/displayio/Palette.c:96 +#: shared-bindings/displayio/Palette.c:93 msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" "buffer del colore deve essere un bytearray o un array di tipo 'b' o 'B'" -#: shared-bindings/displayio/Palette.c:102 +#: shared-bindings/displayio/Palette.c:99 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" "il buffer del colore deve esseer di 3 byte (RGB) o 4 byte (RGB + pad byte)" -#: shared-bindings/displayio/Palette.c:106 +#: shared-bindings/displayio/Palette.c:103 msgid "color must be between 0x000000 and 0xffffff" msgstr "il colore deve essere compreso tra 0x000000 e 0xffffff" -#: shared-bindings/displayio/Palette.c:110 +#: shared-bindings/displayio/Palette.c:107 msgid "color buffer must be a buffer or int" msgstr "il buffer del colore deve essere un buffer o un int" -#: shared-bindings/displayio/Palette.c:123 -#: shared-bindings/displayio/Palette.c:137 +#: shared-bindings/displayio/Palette.c:120 +#: shared-bindings/displayio/Palette.c:134 msgid "palette_index should be an int" msgstr "palette_index deve essere un int" -#: shared-bindings/displayio/Sprite.c:48 +#: shared-bindings/displayio/ParallelBus.c:75 +msgid "Data0, command, chip_select, write and read required" +msgstr "" + +#: shared-bindings/displayio/Shape.c:92 +#, fuzzy +msgid "start_x should be an int" +msgstr "y dovrebbe essere un int" + +#: shared-bindings/displayio/Shape.c:96 +#, fuzzy +msgid "end_x should be an int" +msgstr "y dovrebbe essere un int" + +#: shared-bindings/displayio/Sprite.c:49 msgid "position must be 2-tuple" msgstr "position deve essere una 2-tuple" -#: shared-bindings/displayio/Sprite.c:97 +#: shared-bindings/displayio/Sprite.c:102 msgid "unsupported bitmap type" msgstr "tipo di bitmap non supportato" -#: shared-bindings/displayio/Sprite.c:162 +#: shared-bindings/displayio/Sprite.c:167 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgstr "pixel_shader deve essere displayio.Palette o displayio.ColorConverter" @@ -2362,15 +2397,15 @@ msgstr "troppi argomenti" msgid "expected a DigitalInOut" msgstr "DigitalInOut atteso" -#: shared-bindings/i2cslave/I2CSlave.c:98 +#: shared-bindings/i2cslave/I2CSlave.c:95 msgid "can't convert address to int" msgstr "impossible convertire indirizzo in int" -#: shared-bindings/i2cslave/I2CSlave.c:101 +#: shared-bindings/i2cslave/I2CSlave.c:98 msgid "address out of bounds" msgstr "indirizzo fuori limite" -#: shared-bindings/i2cslave/I2CSlave.c:107 +#: shared-bindings/i2cslave/I2CSlave.c:104 msgid "addresses is empty" msgstr "gli indirizzi sono vuoti" @@ -2412,14 +2447,14 @@ msgstr "I byte devono essere compresi tra 0 e 255" msgid "No hardware random available" msgstr "Nessun generatore hardware di numeri casuali disponibile" -#: shared-bindings/pulseio/PWMOut.c:164 +#: shared-bindings/pulseio/PWMOut.c:162 msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "" "duty_cycle del PWM deve essere compresa tra 0 e 65535 inclusiva (risoluzione " "a 16 bit)" -#: shared-bindings/pulseio/PWMOut.c:195 +#: shared-bindings/pulseio/PWMOut.c:193 #, fuzzy msgid "" "PWM frequency not writable when variable_frequency is False on construction." @@ -2427,19 +2462,19 @@ msgstr "" "frequenza PWM frequency non è scrivibile quando variable_frequency è " "impostato nel costruttore a False." -#: shared-bindings/pulseio/PulseIn.c:275 +#: shared-bindings/pulseio/PulseIn.c:272 msgid "Cannot delete values" msgstr "Impossibile cancellare valori" -#: shared-bindings/pulseio/PulseIn.c:281 +#: shared-bindings/pulseio/PulseIn.c:278 msgid "Slices not supported" msgstr "Slice non supportate" -#: shared-bindings/pulseio/PulseIn.c:287 +#: shared-bindings/pulseio/PulseIn.c:284 msgid "index must be int" msgstr "l'indice deve essere int" -#: shared-bindings/pulseio/PulseIn.c:293 +#: shared-bindings/pulseio/PulseIn.c:290 msgid "Read-only" msgstr "Sola lettura" @@ -2608,11 +2643,20 @@ msgstr "Sono supportate solo bitmap con colori a 8 bit o meno" msgid "row must be packed and word aligned" msgstr "la riga deve essere compattata e allineata alla parola" +#: shared-module/displayio/Display.c:62 +#, fuzzy +msgid "Unsupported display bus type" +msgstr "tipo di bitmap non supportato" + #: shared-module/displayio/Group.c:39 msgid "Group full" msgstr "Gruppo pieno" -#: shared-module/displayio/Group.c:48 +#: shared-module/displayio/Group.c:46 +msgid "Layer must be a Group or Sprite subclass." +msgstr "" + +#: shared-module/displayio/Group.c:55 msgid "Group empty" msgstr "Gruppo vuoto" @@ -2630,6 +2674,21 @@ msgstr "Formato solo di Windows, BMP non compresso supportato %d" msgid "Only true color (24 bpp or higher) BMP supported %x" msgstr "Solo BMP true color (24 bpp o superiore) sono supportati %x" +#: shared-module/displayio/Shape.c:60 +#, fuzzy +msgid "y value out of bounds" +msgstr "indirizzo fuori limite" + +#: shared-module/displayio/Shape.c:63 +#, fuzzy +msgid "x value out of bounds" +msgstr "indirizzo fuori limite" + +#: shared-module/displayio/Shape.c:67 +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." msgstr "Non è possibile rimontare '/' mentre l'USB è attiva." @@ -2655,6 +2714,18 @@ msgstr "USB occupata" msgid "USB Error" msgstr "Errore USB" +#: supervisor/shared/board_busses.c:62 +msgid "No default I2C bus" +msgstr "Nessun bus I2C predefinito" + +#: supervisor/shared/board_busses.c:89 +msgid "No default SPI bus" +msgstr "Nessun bus SPI predefinito" + +#: supervisor/shared/board_busses.c:116 +msgid "No default UART bus" +msgstr "Nessun bus UART predefinito" + #: supervisor/shared/safe_mode.c:97 msgid "You requested starting safe mode by " msgstr "È stato richiesto l'avvio in modalità sicura da " @@ -2716,28 +2787,44 @@ msgid "" "exit safe mode.\n" msgstr "" +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parametro UUID non valido" + #~ msgid "Invalid UUID string length" #~ msgstr "Lunghezza della stringa UUID non valida" -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parametro UUID non valido" +#~ msgid "Invalid Service type" +#~ msgstr "Tipo di servizio non valido" #, fuzzy #~ msgid "Wrong number of bytes provided" #~ msgstr "numero di argomenti errato" -#~ msgid "Invalid Service type" -#~ msgstr "Tipo di servizio non valido" - #~ msgid "Can not apply advertisement data. status: 0x%02x" #~ msgstr "Impossible inserire dati advertisement. status: 0x%02x" +#~ msgid "Can not add Service." +#~ msgstr "Non è possibile aggiungere Service." + +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver " +#~ "espulso CIRCUITPY).\n" + #~ msgid "" #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "" #~ "Ti preghiamo di compilare una issue con il contenuto del tuo drie " #~ "CIRCUITPY:\n" +#~ msgid "Can not query for the device address." +#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." + +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement." + #~ msgid "Can not encode UUID, to check length." #~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare." @@ -2749,27 +2836,11 @@ msgstr "" #~ "Sembra che il codice del core di CircuitPython sia crashato malamente. " #~ "Whoops!\n" -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Impossibile impostare i parametri PPCP." - #~ msgid "Cannot apply GAP parameters." #~ msgstr "Impossibile applicare i parametri GAP." -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver " -#~ "espulso CIRCUITPY).\n" - -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement." - -#~ msgid "Can not query for the device address." -#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." - -#~ msgid "Can not add Service." -#~ msgstr "Non è possibile aggiungere Service." +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Impossibile impostare i parametri PPCP." #~ msgid "Can not apply device name in the stack." #~ msgstr "Non è possibile inserire il nome del dipositivo nella lista." diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 85fe90909..e610577a1 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-01-10 21:32-0500\n" +"POT-Creation-Date: 2019-01-18 11:43-0800\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n" "Last-Translator: \n" "Language-Team: \n" @@ -151,37 +151,37 @@ msgstr "argumentos inválidos" msgid "script compilation not supported" msgstr "compilação de script não suportada" -#: main.c:150 +#: main.c:155 msgid " output:\n" msgstr " saída:\n" -#: main.c:164 main.c:237 +#: main.c:169 main.c:247 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" -#: main.c:166 +#: main.c:171 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Rodando em modo seguro! Atualização automática está desligada.\n" -#: main.c:168 main.c:239 +#: main.c:173 main.c:249 msgid "Auto-reload is off.\n" msgstr "A atualização automática está desligada.\n" -#: main.c:182 +#: main.c:187 msgid "Running in safe mode! Not running saved code.\n" msgstr "Rodando em modo seguro! Não está executando o código salvo.\n" -#: main.c:198 +#: main.c:203 msgid "WARNING: Your code filename has two extensions\n" msgstr "AVISO: Seu arquivo de código tem duas extensões\n" -#: main.c:244 +#: main.c:254 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" -#: main.c:407 +#: main.c:417 msgid "soft reboot\n" msgstr "" @@ -198,18 +198,6 @@ msgstr "Calibração é somente leitura" msgid "calibration is out of range" msgstr "Calibração está fora do intervalo" -#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 -msgid "No default I2C bus" -msgstr "Nenhum barramento I2C padrão" - -#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64 -msgid "No default SPI bus" -msgstr "Nenhum barramento SPI padrão" - -#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91 -msgid "No default UART bus" -msgstr "Nenhum barramento UART padrão" - #: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63 #: ports/nrf/common-hal/analogio/AnalogIn.c:39 msgid "Pin does not have ADC capabilities" @@ -326,7 +314,7 @@ msgid "Not enough pins available" msgstr "Não há pinos suficientes disponíveis" #: ports/atmel-samd/common-hal/busio/I2C.c:78 -#: ports/atmel-samd/common-hal/busio/SPI.c:171 +#: ports/atmel-samd/common-hal/busio/SPI.c:176 #: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:84 @@ -374,6 +362,17 @@ msgstr "Nenhum pino TX" msgid "Cannot get pull while in output mode" msgstr "" +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:43 +#: ports/nrf/common-hal/displayio/ParallelBus.c:43 +msgid "Data 0 pin must be byte aligned" +msgstr "" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c:47 +#: ports/nrf/common-hal/displayio/ParallelBus.c:47 +#, fuzzy, c-format +msgid "Bus pin %d is already in use" +msgstr "DAC em uso" + #: ports/atmel-samd/common-hal/microcontroller/__init__.c:74 #: ports/esp8266/common-hal/microcontroller/__init__.c:64 msgid "Cannot reset into bootloader because no bootloader is present." @@ -890,46 +889,46 @@ msgstr "Não sabe como passar o objeto para a função nativa" msgid "[addrinfo error %d]" msgstr "" -#: py/argcheck.c:44 +#: py/argcheck.c:53 msgid "function does not take keyword arguments" msgstr "função não aceita argumentos de palavras-chave" -#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "função leva %d argumentos posicionais, mas apenas %d foram passadas" -#: py/argcheck.c:64 +#: py/argcheck.c:73 #, c-format msgid "function missing %d required positional arguments" msgstr "função ausente %d requer argumentos posicionais" -#: py/argcheck.c:72 +#: py/argcheck.c:81 #, c-format msgid "function expected at most %d arguments, got %d" msgstr "função esperada na maioria dos %d argumentos, obteve %d" -#: py/argcheck.c:97 +#: py/argcheck.c:106 msgid "'%q' argument required" msgstr "'%q' argumento(s) requerido(s)" -#: py/argcheck.c:122 +#: py/argcheck.c:131 msgid "extra positional arguments given" msgstr "argumentos extra posicionais passados" -#: py/argcheck.c:130 +#: py/argcheck.c:139 msgid "extra keyword arguments given" msgstr "argumentos extras de palavras-chave passados" -#: py/argcheck.c:142 +#: py/argcheck.c:151 msgid "argument num/types mismatch" msgstr "" -#: py/argcheck.c:147 +#: py/argcheck.c:156 msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -#: py/bc.c:88 py/objnamedtuple.c:108 +#: py/bc.c:88 py/objnamedtuple.c:109 msgid "%q() takes %d positional arguments but %d were given" msgstr "" @@ -941,11 +940,11 @@ msgstr "" msgid "keywords must be strings" msgstr "" -#: py/bc.c:206 py/objnamedtuple.c:138 +#: py/bc.c:206 py/objnamedtuple.c:139 msgid "function got multiple values for argument '%q'" msgstr "" -#: py/bc.c:218 py/objnamedtuple.c:130 +#: py/bc.c:218 py/objnamedtuple.c:131 msgid "unexpected keyword argument '%q'" msgstr "" @@ -1529,11 +1528,11 @@ msgstr "cheio" msgid "empty" msgstr "vazio" -#: py/objdict.c:314 +#: py/objdict.c:312 msgid "popitem(): dictionary is empty" msgstr "" -#: py/objdict.c:357 +#: py/objdict.c:355 msgid "dict update sequence has wrong length" msgstr "" @@ -1794,69 +1793,69 @@ msgstr "" msgid "string index out of range" msgstr "" -#: py/objtype.c:358 +#: py/objtype.c:368 msgid "__init__() should return None" msgstr "" -#: py/objtype.c:360 +#: py/objtype.c:370 #, c-format msgid "__init__() should return None, not '%s'" msgstr "" -#: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065 +#: py/objtype.c:633 py/objtype.c:1287 py/runtime.c:1065 msgid "unreadable attribute" msgstr "atributo ilegível" -#: py/objtype.c:868 py/runtime.c:653 +#: py/objtype.c:878 py/runtime.c:653 msgid "object not callable" msgstr "" -#: py/objtype.c:870 py/runtime.c:655 +#: py/objtype.c:880 py/runtime.c:655 #, c-format msgid "'%s' object is not callable" msgstr "" -#: py/objtype.c:978 +#: py/objtype.c:988 msgid "type takes 1 or 3 arguments" msgstr "" -#: py/objtype.c:989 +#: py/objtype.c:999 msgid "cannot create instance" msgstr "não é possível criar instância" -#: py/objtype.c:991 +#: py/objtype.c:1001 msgid "cannot create '%q' instances" msgstr "" -#: py/objtype.c:1047 +#: py/objtype.c:1059 msgid "can't add special method to already-subclassed class" msgstr "" -#: py/objtype.c:1091 py/objtype.c:1097 +#: py/objtype.c:1103 py/objtype.c:1109 msgid "type is not an acceptable base type" msgstr "" -#: py/objtype.c:1100 +#: py/objtype.c:1112 msgid "type '%q' is not an acceptable base type" msgstr "" -#: py/objtype.c:1137 +#: py/objtype.c:1149 msgid "multiple inheritance not supported" msgstr "" -#: py/objtype.c:1164 +#: py/objtype.c:1176 msgid "multiple bases have instance lay-out conflict" msgstr "" -#: py/objtype.c:1205 +#: py/objtype.c:1217 msgid "first argument to super() must be type" msgstr "" -#: py/objtype.c:1370 +#: py/objtype.c:1382 msgid "issubclass() arg 2 must be a class or a tuple of classes" msgstr "" -#: py/objtype.c:1384 +#: py/objtype.c:1396 msgid "issubclass() arg 1 must be a class" msgstr "" @@ -2052,8 +2051,8 @@ msgstr "" msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "" -#: shared-bindings/audiobusio/I2SOut.c:225 -#: shared-bindings/audioio/AudioOut.c:226 +#: shared-bindings/audiobusio/I2SOut.c:222 +#: shared-bindings/audioio/AudioOut.c:223 msgid "Not playing" msgstr "" @@ -2090,32 +2089,32 @@ msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" msgstr "" -#: shared-bindings/audioio/Mixer.c:94 +#: shared-bindings/audioio/Mixer.c:91 #, fuzzy msgid "Invalid voice count" msgstr "certificado inválido" -#: shared-bindings/audioio/Mixer.c:99 +#: shared-bindings/audioio/Mixer.c:96 #, fuzzy msgid "Invalid channel count" msgstr "certificado inválido" -#: shared-bindings/audioio/Mixer.c:103 +#: shared-bindings/audioio/Mixer.c:100 msgid "Sample rate must be positive" msgstr "" -#: shared-bindings/audioio/Mixer.c:107 +#: shared-bindings/audioio/Mixer.c:104 #, fuzzy msgid "bits_per_sample must be 8 or 16" msgstr "bits devem ser 8" -#: shared-bindings/audioio/RawSample.c:98 +#: shared-bindings/audioio/RawSample.c:95 msgid "" "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " "'B'" msgstr "" -#: shared-bindings/audioio/RawSample.c:104 +#: shared-bindings/audioio/RawSample.c:101 msgid "buffer must be a bytes-like object" msgstr "" @@ -2124,53 +2123,53 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" -#: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 -#: shared-bindings/busio/SPI.c:133 +#: shared-bindings/bitbangio/I2C.c:109 shared-bindings/bitbangio/SPI.c:119 +#: shared-bindings/busio/SPI.c:130 msgid "Function requires lock" msgstr "" -#: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210 +#: shared-bindings/bitbangio/I2C.c:193 shared-bindings/busio/I2C.c:207 msgid "Buffer must be at least length 1" msgstr "" -#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175 +#: shared-bindings/bitbangio/SPI.c:149 shared-bindings/busio/SPI.c:172 msgid "Invalid polarity" msgstr "" -#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179 +#: shared-bindings/bitbangio/SPI.c:153 shared-bindings/busio/SPI.c:176 msgid "Invalid phase" msgstr "Fase Inválida" -#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183 +#: shared-bindings/bitbangio/SPI.c:157 shared-bindings/busio/SPI.c:180 msgid "Invalid number of bits" msgstr "Número inválido de bits" -#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348 +#: shared-bindings/bitbangio/SPI.c:282 shared-bindings/busio/SPI.c:345 msgid "buffer slices must be of equal length" msgstr "" -#: shared-bindings/bleio/Address.c:119 +#: shared-bindings/bleio/Address.c:115 #, c-format msgid "Address is not %d bytes long or is in wrong format" msgstr "" -#: shared-bindings/bleio/Address.c:126 +#: shared-bindings/bleio/Address.c:122 #, fuzzy, c-format msgid "Address must be %d bytes long" msgstr "buffers devem ser o mesmo tamanho" -#: shared-bindings/bleio/Characteristic.c:81 -#: shared-bindings/bleio/Descriptor.c:93 shared-bindings/bleio/Service.c:78 +#: shared-bindings/bleio/Characteristic.c:74 +#: shared-bindings/bleio/Descriptor.c:86 shared-bindings/bleio/Service.c:66 #, fuzzy msgid "Expected a UUID" msgstr "Esperado um" -#: shared-bindings/bleio/CharacteristicBuffer.c:68 +#: shared-bindings/bleio/CharacteristicBuffer.c:61 #, fuzzy msgid "buffer_size must be >= 1" msgstr "buffers devem ser o mesmo tamanho" -#: shared-bindings/bleio/CharacteristicBuffer.c:72 +#: shared-bindings/bleio/CharacteristicBuffer.c:65 #, fuzzy msgid "Expected a Characteristic" msgstr "Não é possível adicionar Característica." @@ -2191,20 +2190,20 @@ msgstr "" msgid "Can't advertise in Central mode" msgstr "" -#: shared-bindings/bleio/Peripheral.c:111 +#: shared-bindings/bleio/Peripheral.c:106 msgid "services includes an object that is not a Service" msgstr "" -#: shared-bindings/bleio/Peripheral.c:124 +#: shared-bindings/bleio/Peripheral.c:119 #, fuzzy msgid "name must be a string" msgstr "heap deve ser uma lista" -#: shared-bindings/bleio/Service.c:90 +#: shared-bindings/bleio/Service.c:84 msgid "characteristics includes an object that is not a Characteristic" msgstr "" -#: shared-bindings/bleio/Service.c:96 +#: shared-bindings/bleio/Service.c:90 msgid "Characteristic UUID doesn't match Service UUID" msgstr "" @@ -2225,19 +2224,19 @@ msgstr "buffers devem ser o mesmo tamanho" msgid "not a 128-bit UUID" msgstr "" -#: shared-bindings/busio/I2C.c:120 +#: shared-bindings/busio/I2C.c:117 msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:106 +#: shared-bindings/busio/UART.c:103 msgid "bits must be 7, 8 or 9" msgstr "" -#: shared-bindings/busio/UART.c:118 +#: shared-bindings/busio/UART.c:115 msgid "stop must be 1 or 2" msgstr "" -#: shared-bindings/busio/UART.c:123 +#: shared-bindings/busio/UART.c:120 msgid "timeout >100 (units are now seconds, not msecs)" msgstr "" @@ -2263,7 +2262,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "" -#: shared-bindings/displayio/Bitmap.c:84 +#: shared-bindings/displayio/Bitmap.c:84 shared-bindings/displayio/Shape.c:88 msgid "y should be an int" msgstr "y deve ser um int" @@ -2279,45 +2278,80 @@ msgstr "" msgid "color should be an int" msgstr "cor deve ser um int" -#: shared-bindings/displayio/FourWire.c:55 -#: shared-bindings/displayio/FourWire.c:64 +#: shared-bindings/displayio/Display.c:79 +msgid "Width and height kwargs required" +msgstr "" + +#: shared-bindings/displayio/Display.c:93 +msgid "Display limit reached" +msgstr "" + +#: shared-bindings/displayio/Display.c:112 +msgid "Must be a Group subclass." +msgstr "" + +#: shared-bindings/displayio/FourWire.c:69 +msgid "Command and chip_select required" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:91 +#: shared-bindings/displayio/ParallelBus.c:94 +msgid "Display bus limit reached" +msgstr "" + +#: shared-bindings/displayio/FourWire.c:104 +#: shared-bindings/displayio/ParallelBus.c:106 msgid "displayio is a work in progress" msgstr "" -#: shared-bindings/displayio/Group.c:65 +#: shared-bindings/displayio/Group.c:62 msgid "Group must have size at least 1" msgstr "Grupo deve ter tamanho pelo menos 1" -#: shared-bindings/displayio/Palette.c:96 +#: shared-bindings/displayio/Palette.c:93 msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" -#: shared-bindings/displayio/Palette.c:102 +#: shared-bindings/displayio/Palette.c:99 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" -#: shared-bindings/displayio/Palette.c:106 +#: shared-bindings/displayio/Palette.c:103 msgid "color must be between 0x000000 and 0xffffff" msgstr "cor deve estar entre 0x000000 e 0xffffff" -#: shared-bindings/displayio/Palette.c:110 +#: shared-bindings/displayio/Palette.c:107 msgid "color buffer must be a buffer or int" msgstr "" -#: shared-bindings/displayio/Palette.c:123 -#: shared-bindings/displayio/Palette.c:137 +#: shared-bindings/displayio/Palette.c:120 +#: shared-bindings/displayio/Palette.c:134 msgid "palette_index should be an int" msgstr "" -#: shared-bindings/displayio/Sprite.c:48 +#: shared-bindings/displayio/ParallelBus.c:75 +msgid "Data0, command, chip_select, write and read required" +msgstr "" + +#: shared-bindings/displayio/Shape.c:92 +#, fuzzy +msgid "start_x should be an int" +msgstr "y deve ser um int" + +#: shared-bindings/displayio/Shape.c:96 +#, fuzzy +msgid "end_x should be an int" +msgstr "y deve ser um int" + +#: shared-bindings/displayio/Sprite.c:49 msgid "position must be 2-tuple" msgstr "" -#: shared-bindings/displayio/Sprite.c:97 +#: shared-bindings/displayio/Sprite.c:102 msgid "unsupported bitmap type" msgstr "" -#: shared-bindings/displayio/Sprite.c:162 +#: shared-bindings/displayio/Sprite.c:167 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgstr "" @@ -2329,15 +2363,15 @@ msgstr "muitos argumentos" msgid "expected a DigitalInOut" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:98 +#: shared-bindings/i2cslave/I2CSlave.c:95 msgid "can't convert address to int" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:101 +#: shared-bindings/i2cslave/I2CSlave.c:98 msgid "address out of bounds" msgstr "" -#: shared-bindings/i2cslave/I2CSlave.c:107 +#: shared-bindings/i2cslave/I2CSlave.c:104 msgid "addresses is empty" msgstr "" @@ -2379,29 +2413,29 @@ msgstr "Os bytes devem estar entre 0 e 255." msgid "No hardware random available" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:164 +#: shared-bindings/pulseio/PWMOut.c:162 msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "" -#: shared-bindings/pulseio/PWMOut.c:195 +#: shared-bindings/pulseio/PWMOut.c:193 msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" -#: shared-bindings/pulseio/PulseIn.c:275 +#: shared-bindings/pulseio/PulseIn.c:272 msgid "Cannot delete values" msgstr "Não é possível excluir valores" -#: shared-bindings/pulseio/PulseIn.c:281 +#: shared-bindings/pulseio/PulseIn.c:278 msgid "Slices not supported" msgstr "" -#: shared-bindings/pulseio/PulseIn.c:287 +#: shared-bindings/pulseio/PulseIn.c:284 msgid "index must be int" msgstr "index deve ser int" -#: shared-bindings/pulseio/PulseIn.c:293 +#: shared-bindings/pulseio/PulseIn.c:290 msgid "Read-only" msgstr "Somente leitura" @@ -2568,11 +2602,20 @@ msgstr "Apenas bit maps de cores de 8 bit ou menos são suportados" msgid "row must be packed and word aligned" msgstr "Linha deve ser comprimida e com as palavras alinhadas" +#: shared-module/displayio/Display.c:62 +#, fuzzy +msgid "Unsupported display bus type" +msgstr "Taxa de transmissão não suportada" + #: shared-module/displayio/Group.c:39 msgid "Group full" msgstr "Grupo cheio" -#: shared-module/displayio/Group.c:48 +#: shared-module/displayio/Group.c:46 +msgid "Layer must be a Group or Sprite subclass." +msgstr "" + +#: shared-module/displayio/Group.c:55 msgid "Group empty" msgstr "Grupo vazio" @@ -2590,6 +2633,19 @@ msgstr "Apenas formato Windows, BMP descomprimido suportado" msgid "Only true color (24 bpp or higher) BMP supported %x" msgstr "Apenas cores verdadeiras (24 bpp ou maior) BMP suportadas" +#: shared-module/displayio/Shape.c:60 +msgid "y value out of bounds" +msgstr "" + +#: shared-module/displayio/Shape.c:63 +msgid "x value out of bounds" +msgstr "" + +#: shared-module/displayio/Shape.c:67 +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." msgstr "Não é possível remontar '/' enquanto o USB estiver ativo." @@ -2615,6 +2671,18 @@ msgstr "USB ocupada" msgid "USB Error" msgstr "Erro na USB" +#: supervisor/shared/board_busses.c:62 +msgid "No default I2C bus" +msgstr "Nenhum barramento I2C padrão" + +#: supervisor/shared/board_busses.c:89 +msgid "No default SPI bus" +msgstr "Nenhum barramento SPI padrão" + +#: supervisor/shared/board_busses.c:116 +msgid "No default UART bus" +msgstr "Nenhum barramento UART padrão" + #: supervisor/shared/safe_mode.c:97 msgid "You requested starting safe mode by " msgstr "Você solicitou o início do modo de segurança" @@ -2670,32 +2738,32 @@ msgid "" "exit safe mode.\n" msgstr "" +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parâmetro UUID inválido" + +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x" + #~ msgid "Can not add Characteristic." #~ msgstr "Não é possível adicionar Característica." -#~ msgid "Can not query for the device address." -#~ msgstr "Não é possível consultar o endereço do dispositivo." +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Não é possível definir parâmetros PPCP." +#~ msgid "Invalid Service type" +#~ msgstr "Tipo de serviço inválido" #~ msgid "Can encode UUID into the advertisement packet." #~ msgstr "Pode codificar o UUID no pacote de anúncios." -#~ msgid "Invalid Service type" -#~ msgstr "Tipo de serviço inválido" - -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Não é possível aplicar parâmetros GAP." +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Não é possível definir parâmetros PPCP." #~ msgid "Baud rate too high for this SPI peripheral" #~ msgstr "Taxa de transmissão muito alta para esse periférico SPI" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." - -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x" +#~ msgid "Can not query for the device address." +#~ msgstr "Não é possível consultar o endereço do dispositivo." -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parâmetro UUID inválido" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Não é possível aplicar parâmetros GAP." -- cgit v1.2.3 From 0318a9a9bcbceab308323788cb9e579da166710e Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 11:53:09 -0800 Subject: More make_new fixes for unix build --- extmod/moductypes.c | 4 ++-- extmod/modutimeq.c | 4 ++-- extmod/moduzlib.c | 4 ++-- extmod/modwebsocket.c | 4 ++-- ports/unix/file.c | 4 ++-- ports/unix/modffi.c | 6 +++--- ports/unix/modusocket.c | 4 ++-- py/modio.c | 4 ++-- py/objdeque.c | 4 ++-- py/objfun.c | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/extmod/moductypes.c b/extmod/moductypes.c index e627cd146..9eea30bf3 100644 --- a/extmod/moductypes.c +++ b/extmod/moductypes.c @@ -122,8 +122,8 @@ STATIC NORETURN void syntax_error(void) { mp_raise_TypeError(translate("syntax error in uctypes descriptor")); } -STATIC mp_obj_t uctypes_struct_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_arg_check_num(n_args, n_kw, 2, 3, false); +STATIC mp_obj_t uctypes_struct_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { + mp_arg_check_num(n_args, kw_args, 2, 3, false); mp_obj_uctypes_struct_t *o = m_new_obj(mp_obj_uctypes_struct_t); o->base.type = type; o->addr = (void*)(uintptr_t)mp_obj_int_get_truncated(args[0]); diff --git a/extmod/modutimeq.c b/extmod/modutimeq.c index 614820443..99b51016d 100644 --- a/extmod/modutimeq.c +++ b/extmod/modutimeq.c @@ -76,8 +76,8 @@ STATIC bool time_less_than(struct qentry *item, struct qentry *parent) { return res && res < (MODULO / 2); } -STATIC mp_obj_t utimeq_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_arg_check_num(n_args, n_kw, 1, 1, false); +STATIC mp_obj_t utimeq_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { + mp_arg_check_num(n_args, kw_args, 1, 1, false); mp_uint_t alloc = mp_obj_get_int(args[0]); mp_obj_utimeq_t *o = m_new_obj_var(mp_obj_utimeq_t, struct qentry, alloc); o->base.type = type; diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c index 253deac1e..7f15d02a8 100644 --- a/extmod/moduzlib.c +++ b/extmod/moduzlib.c @@ -69,8 +69,8 @@ STATIC int read_src_stream(TINF_DATA *data) { return c; } -STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_arg_check_num(n_args, n_kw, 1, 2, false); +STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { + mp_arg_check_num(n_args, kw_args, 1, 2, false); mp_get_stream_raise(args[0], MP_STREAM_OP_READ); mp_obj_decompio_t *o = m_new_obj(mp_obj_decompio_t); o->base.type = type; diff --git a/extmod/modwebsocket.c b/extmod/modwebsocket.c index c556f2b77..997c7e262 100644 --- a/extmod/modwebsocket.c +++ b/extmod/modwebsocket.c @@ -57,8 +57,8 @@ typedef struct _mp_obj_websocket_t { STATIC mp_uint_t websocket_write(mp_obj_t self_in, const void *buf, mp_uint_t size, int *errcode); -STATIC mp_obj_t websocket_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_arg_check_num(n_args, n_kw, 1, 2, false); +STATIC mp_obj_t websocket_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { + mp_arg_check_num(n_args, kw_args, 1, 2, false); mp_get_stream_raise(args[0], MP_STREAM_OP_READ | MP_STREAM_OP_WRITE | MP_STREAM_OP_IOCTL); mp_obj_websocket_t *o = m_new_obj(mp_obj_websocket_t); o->base.type = type; diff --git a/ports/unix/file.c b/ports/unix/file.c index 98ac1b3cc..c0cf6dcc4 100644 --- a/ports/unix/file.c +++ b/ports/unix/file.c @@ -205,9 +205,9 @@ STATIC mp_obj_t fdfile_open(const mp_obj_type_t *type, mp_arg_val_t *args) { return MP_OBJ_FROM_PTR(o); } -STATIC mp_obj_t fdfile_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { +STATIC mp_obj_t fdfile_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { mp_arg_val_t arg_vals[FILE_OPEN_NUM_ARGS]; - mp_arg_parse_all_kw_array(n_args, n_kw, args, FILE_OPEN_NUM_ARGS, file_open_args, arg_vals); + mp_arg_parse_all(n_args, args, kw_args, FILE_OPEN_NUM_ARGS, file_open_args, arg_vals); return fdfile_open(type, arg_vals); } diff --git a/ports/unix/modffi.c b/ports/unix/modffi.c index fcbcebc39..03dc9e4ec 100644 --- a/ports/unix/modffi.c +++ b/ports/unix/modffi.c @@ -304,9 +304,9 @@ STATIC mp_obj_t ffimod_addr(mp_obj_t self_in, mp_obj_t symname_in) { } MP_DEFINE_CONST_FUN_OBJ_2(ffimod_addr_obj, ffimod_addr); -STATIC mp_obj_t ffimod_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { +STATIC mp_obj_t ffimod_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { (void)n_args; - (void)n_kw; + (void)kw_args; const char *fname = NULL; if (args[0] != mp_const_none) { @@ -481,7 +481,7 @@ STATIC const mp_obj_type_t opaque_type = { */ STATIC mp_obj_t mod_ffi_open(size_t n_args, const mp_obj_t *args) { - return ffimod_make_new(&ffimod_type, n_args, 0, args); + return ffimod_make_new(&ffimod_type, n_args, args, NULL); } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_ffi_open_obj, 1, 2, mod_ffi_open); diff --git a/ports/unix/modusocket.c b/ports/unix/modusocket.c index 9b9869f5b..84e9298fd 100644 --- a/ports/unix/modusocket.c +++ b/ports/unix/modusocket.c @@ -325,9 +325,9 @@ STATIC mp_obj_t socket_makefile(size_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_makefile_obj, 1, 3, socket_makefile); -STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type_in, size_t n_args, size_t n_kw, const mp_obj_t *args) { +STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type_in, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { (void)type_in; - (void)n_kw; + (void)kw_args; int family = AF_INET; int type = SOCK_STREAM; diff --git a/py/modio.c b/py/modio.c index 9b09de96e..9918159cb 100644 --- a/py/modio.c +++ b/py/modio.c @@ -46,11 +46,11 @@ STATIC const mp_obj_type_t mp_type_iobase; STATIC mp_obj_base_t iobase_singleton = {&mp_type_iobase}; -STATIC mp_obj_t iobase_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { +STATIC mp_obj_t iobase_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { (void)type; (void)n_args; - (void)n_kw; (void)args; + (void)kw_args; return MP_OBJ_FROM_PTR(&iobase_singleton); } diff --git a/py/objdeque.c b/py/objdeque.c index dd0141831..b2785b5b6 100644 --- a/py/objdeque.c +++ b/py/objdeque.c @@ -44,8 +44,8 @@ typedef struct _mp_obj_deque_t { #define FLAG_CHECK_OVERFLOW 1 } mp_obj_deque_t; -STATIC mp_obj_t deque_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_arg_check_num(n_args, n_kw, 2, 3, false); +STATIC mp_obj_t deque_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { + mp_arg_check_num(n_args, kw_args, 2, 3, false); /* Initialization from existing sequence is not supported, so an empty tuple must be passed as such. */ diff --git a/py/objfun.c b/py/objfun.c index 2ada0b3f1..b8364815b 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -436,7 +436,7 @@ typedef mp_uint_t (*viper_fun_4_t)(mp_uint_t, mp_uint_t, mp_uint_t, mp_uint_t); STATIC mp_obj_t fun_viper_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp_obj_t *args) { mp_obj_fun_viper_t *self = self_in; - mp_arg_check_num(n_args, n_kw, self->n_args, self->n_args, false); + mp_arg_check_num_kw_array(n_args, n_kw, self->n_args, self->n_args, false); void *fun = MICROPY_MAKE_POINTER_CALLABLE(self->fun_data); -- cgit v1.2.3 From 58a2009cc11ac6b080d182854d0f669a6f65647a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 12:52:27 -0800 Subject: Fix unix build --- extmod/machine_i2c.c | 10 ++++------ extmod/machine_pinbase.c | 4 ++-- extmod/machine_signal.c | 10 +++++----- extmod/machine_spi.c | 14 +++++++------- ports/unix/Makefile | 8 ++++++++ 5 files changed, 26 insertions(+), 20 deletions(-) diff --git a/extmod/machine_i2c.c b/extmod/machine_i2c.c index b91f1a1eb..85b46a9f6 100644 --- a/extmod/machine_i2c.c +++ b/extmod/machine_i2c.c @@ -287,14 +287,14 @@ STATIC void machine_i2c_obj_init_helper(machine_i2c_obj_t *self, size_t n_args, mp_hal_i2c_init(self, args[ARG_freq].u_int); } -STATIC mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { +STATIC mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { // check the id argument, if given if (n_args > 0) { if (args[0] != MP_OBJ_NEW_SMALL_INT(-1)) { #if defined(MICROPY_PY_MACHINE_I2C_MAKE_NEW) // dispatch to port-specific constructor - extern mp_obj_t MICROPY_PY_MACHINE_I2C_MAKE_NEW(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args); - return MICROPY_PY_MACHINE_I2C_MAKE_NEW(type, n_args, n_kw, args); + extern mp_obj_t MICROPY_PY_MACHINE_I2C_MAKE_NEW(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *all_args, mp_map_t *kw_args); + return MICROPY_PY_MACHINE_I2C_MAKE_NEW(type, n_args, args, kw_args); #else mp_raise_ValueError(translate("invalid I2C peripheral")); #endif @@ -306,9 +306,7 @@ STATIC mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, s // create new soft I2C object machine_i2c_obj_t *self = m_new_obj(machine_i2c_obj_t); self->base.type = &machine_i2c_type; - mp_map_t kw_args; - mp_map_init_fixed_table(&kw_args, n_kw, args + n_args); - machine_i2c_obj_init_helper(self, n_args, args, &kw_args); + machine_i2c_obj_init_helper(self, n_args, args, kw_args); return (mp_obj_t)self; } diff --git a/extmod/machine_pinbase.c b/extmod/machine_pinbase.c index 070c5cde9..997a6fd99 100644 --- a/extmod/machine_pinbase.c +++ b/extmod/machine_pinbase.c @@ -45,11 +45,11 @@ STATIC const mp_pinbase_t pinbase_singleton = { .base = { &machine_pinbase_type }, }; -STATIC mp_obj_t pinbase_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { +STATIC mp_obj_t pinbase_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { (void)type; (void)n_args; - (void)n_kw; (void)args; + (void)kw_args; return MP_OBJ_FROM_PTR(&pinbase_singleton); } diff --git a/extmod/machine_signal.c b/extmod/machine_signal.c index 3f9f5af94..62658cbb1 100644 --- a/extmod/machine_signal.c +++ b/extmod/machine_signal.c @@ -42,7 +42,7 @@ typedef struct _machine_signal_t { bool invert; } machine_signal_t; -STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { +STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { mp_obj_t pin = args[0]; bool invert = false; @@ -96,9 +96,9 @@ STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, size_t // Otherwise there should be 1 or 2 args { if (n_args == 1) { - if (n_kw == 0) { - } else if (n_kw == 1 && args[1] == MP_OBJ_NEW_QSTR(MP_QSTR_invert)) { - invert = mp_obj_is_true(args[2]); + if (kw_args == NULL || kw_args->used == 0) { + } else if (kw_args->used == 1 && kw_args->table[0].key == MP_OBJ_NEW_QSTR(MP_QSTR_invert)) { + invert = mp_obj_is_true(kw_args->table[0].value); } else { goto error; } @@ -133,7 +133,7 @@ STATIC mp_uint_t signal_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_t arg // fast method for getting/setting signal value STATIC mp_obj_t signal_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_arg_check_num(n_args, n_kw, 0, 1, false); + mp_arg_check_num_kw_array(n_args, n_kw, 0, 1, false); if (n_args == 0) { // get pin return MP_OBJ_NEW_SMALL_INT(mp_virtual_pin_read(self_in)); diff --git a/extmod/machine_spi.c b/extmod/machine_spi.c index 3bbab2824..c5707a3d0 100644 --- a/extmod/machine_spi.c +++ b/extmod/machine_spi.c @@ -43,16 +43,16 @@ /******************************************************************************/ // MicroPython bindings for generic machine.SPI -STATIC mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args); +STATIC mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args); -mp_obj_t mp_machine_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { +mp_obj_t mp_machine_spi_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { // check the id argument, if given if (n_args > 0) { if (args[0] != MP_OBJ_NEW_SMALL_INT(-1)) { #if defined(MICROPY_PY_MACHINE_SPI_MAKE_NEW) // dispatch to port-specific constructor - extern mp_obj_t MICROPY_PY_MACHINE_SPI_MAKE_NEW(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args); - return MICROPY_PY_MACHINE_SPI_MAKE_NEW(type, n_args, n_kw, args); + extern mp_obj_t MICROPY_PY_MACHINE_SPI_MAKE_NEW(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args); + return MICROPY_PY_MACHINE_SPI_MAKE_NEW(type, n_args, args, kw_args); #else mp_raise_ValueError(translate("invalid SPI peripheral")); #endif @@ -62,7 +62,7 @@ mp_obj_t mp_machine_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_ } // software SPI - return mp_machine_soft_spi_make_new(type, n_args, n_kw, args); + return mp_machine_soft_spi_make_new(type, n_args, args, kw_args); } STATIC mp_obj_t machine_spi_init(size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { @@ -180,7 +180,7 @@ STATIC void mp_machine_soft_spi_print(const mp_print_t *print, mp_obj_t self_in, mp_hal_pin_name(self->spi.sck), mp_hal_pin_name(self->spi.mosi), mp_hal_pin_name(self->spi.miso)); } -STATIC mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { +STATIC mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *all_args, mp_map_t *kw_args) { enum { ARG_baudrate, ARG_polarity, ARG_phase, ARG_bits, ARG_firstbit, ARG_sck, ARG_mosi, ARG_miso }; static const mp_arg_t allowed_args[] = { { MP_QSTR_baudrate, MP_ARG_INT, {.u_int = 500000} }, @@ -193,7 +193,7 @@ STATIC mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n { MP_QSTR_miso, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; - mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + mp_arg_parse_all(n_args, all_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); // create new object mp_machine_soft_spi_obj_t *self = m_new_obj(mp_machine_soft_spi_obj_t); diff --git a/ports/unix/Makefile b/ports/unix/Makefile index 8775ec11a..99b65ec1b 100644 --- a/ports/unix/Makefile +++ b/ports/unix/Makefile @@ -154,6 +154,14 @@ SRC_C = \ supervisor/shared/translate.c \ $(SRC_MOD) +PY_EXTMOD_O_BASENAME += \ + extmod/machine_mem.o \ + extmod/machine_pinbase.o \ + extmod/machine_signal.o \ + extmod/machine_pulse.o \ + extmod/machine_i2c.o \ + extmod/machine_spi.o + LIB_SRC_C = $(addprefix lib/,\ $(LIB_SRC_C_EXTRA) \ timeutils/timeutils.c \ -- cgit v1.2.3 From dc024cf411e5a77bffc3662aa581c667284e67e6 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 12:59:23 -0800 Subject: Add a bit more to the docs --- shared-bindings/displayio/Display.c | 37 ++++++++++++++++++++++++++++++--- shared-bindings/displayio/FourWire.c | 5 +++++ shared-bindings/displayio/ParallelBus.c | 9 +++++++- shared-bindings/displayio/__init__.c | 11 +++++----- 4 files changed, 52 insertions(+), 10 deletions(-) diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 9028c2865..501b96549 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -49,10 +49,41 @@ //| //| .. warning:: This will be changed before 4.0.0. Consider it very experimental. //| -//| .. class:: Display(display_bus, *, width, height, colstart=0, rowstart=0, color_depth=16, -//| set_column_command=0x2a set_row_command=0x2b, write_ram_command=0x2c) +//| .. class:: Display(display_bus, init_sequence, *, width, height, colstart=0, rowstart=0, color_depth=16, set_column_command=0x2a, set_row_command=0x2b, write_ram_command=0x2c) //| -//| Create a Display object. +//| Create a Display object on the given display bus (`displayio.FourWire` or `displayio.ParallelBus`). +//| +//| The ``init_sequence`` is bitbacked to minimize the ram impact. Every command begins with a +//| command byte followed by a byte to determine the parameter count and if a delay is need after. +//| When the top bit of the second byte is 1, the next byte will be the delay time in milliseconds. +//| The remaining 7 bits are the parameter count excluding any delay byte. The third through final +//| bytes are the remaining command parameters. The next byte will begin a new command definition. +//| Here is a portion of ILI9341 init code: +//| +//| .. code-block:: python +//| +//| init_sequence = (b"\xe1\x0f\x00\x0E\x14\x03\x11\x07\x31\xC1\x48\x08\x0F\x0C\x31\x36\x0F" # Set Gamma +//| b"\x11\x80\x78"# Exit Sleep then delay 0x78 (120ms) +//| b"\x29\x80\x78"# Display on then delay 0x78 (120ms) +//| ) +//| display = displayio.Display(display_bus, init_sequence, width=320, height=240) +//| +//| The first command is 0xe1 with 15 (0xf) parameters following. The second and third are 0x11 and +//| 0x29 respectively with delays (0x80) of 120ms (0x78) and no parameters. Multiple byte literals +//| (b"") are merged together on load. The parens are needed to allow byte literals on subsequent +//| lines. +//| +//| :param displayio.FourWire or displayio.ParallelBus display_bus: The bus that the display is connected to +//| :param buffer init_sequence: Byte-packed initialization sequence. +//| :param int width: Width in pixels +//| :param int height: Height in pixels +//| :param int colstart: The index if the first visible column +//| :param int rowstart: The index if the first visible row +//| :param int color_depth: The number of bits of color per pixel transmitted. (Some displays +//| support 18 bit but 16 is easier to transmit. The last bit is extrapolated.) +//| :param int set_column_command: Command used to set the start and end columns to update +//| :param int set_row_command: Command used so set the start and end rows to update +//| :param int write_ram_command: Command used to write pixels values into the update region //| STATIC mp_obj_t displayio_display_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_display_bus, ARG_init_sequence, ARG_width, ARG_height, ARG_colstart, ARG_rowstart, ARG_color_depth, ARG_set_column_command, ARG_set_row_command, ARG_write_ram_command }; diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c index 530eafb51..561e2871e 100644 --- a/shared-bindings/displayio/FourWire.c +++ b/shared-bindings/displayio/FourWire.c @@ -52,6 +52,11 @@ //| //| Create a FourWire object associated with the given pins. //| +//| :param busio.SPI spi_bus: The SPI bus that make up the clock and data lines +//| :param microcontroller.Pin command: Data or command pin +//| :param microcontroller.Pin chip_select: Chip select pin +//| :param microcontroller.Pin reset: Reset pin +//| 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 }; static const mp_arg_t allowed_args[] = { diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c index e1079acb5..2f9967866 100644 --- a/shared-bindings/displayio/ParallelBus.c +++ b/shared-bindings/displayio/ParallelBus.c @@ -40,7 +40,7 @@ //| .. currentmodule:: displayio //| //| :class:`ParallelBus` -- Manage updating a display over SPI four wire protocol -//| ========================================================================== +//| ============================================================================== //| //| Manage updating a display over SPI four wire protocol in the background while Python code runs. //| It doesn't handle display initialization. @@ -52,6 +52,13 @@ //| Create a ParallelBus object associated with the given pins. The bus is inferred from data0 //| by implying the next 7 additional pins on a given GPIO port. //| +//| :param microcontroller.Pin: The first data pin. The rest are implied +//| :param microcontroller.Pin command: Data or command pin +//| :param microcontroller.Pin chip_select: Chip select pin +//| :param microcontroller.Pin write: Write pin +//| :param microcontroller.Pin read: Read pin +//| :param microcontroller.Pin reset: Reset pin +//| STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_data0, ARG_command, ARG_chip_select, ARG_write, ARG_read, ARG_reset }; static const mp_arg_t allowed_args[] = { diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c index 306f8c08b..6ed1218b2 100644 --- a/shared-bindings/displayio/__init__.c +++ b/shared-bindings/displayio/__init__.c @@ -46,13 +46,10 @@ //| //| .. module:: displayio //| :synopsis: Native helpers for driving displays -//| :platform: SAMD21, SAMD51 +//| :platform: SAMD21, SAMD51, nRF52 //| //| The `displayio` module contains classes to manage display output -//| including synchronizing with refresh rates and partial updating. It does -//| not include display initialization commands. It should live in a Python -//| driver for use when a display is connected to a board. It should also be -//| built into the board init when the board has the display on it. +//| including synchronizing with refresh rates and partial updating. //| //| .. warning:: This will be changed before 4.0.0. Consider it very experimental. //| @@ -78,7 +75,9 @@ //| .. method:: release_displays() //| -//| Releases any actively used displays so theis pins can be used again. +//| Releases any actively used displays so their busses and pins can be used again. This will also +//| release the builtin display on boards that have one. You will need to reinitialize it yourself +//| afterwards. //| STATIC mp_obj_t displayio_release_displays(void) { common_hal_displayio_release_displays(); -- cgit v1.2.3 From ae52c964c2cdb91643b05f180353d95895260245 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 13:47:40 -0800 Subject: Cleanup display rework for PR. Fixes #1465. Fixes #1337. Fixes #1168 --- ports/atmel-samd/boards/feather_m4_express/board.c | 9 +-------- ports/atmel-samd/boards/feather_m4_express/pins.c | 1 - shared-module/displayio/__init__.c | 11 +++-------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/ports/atmel-samd/boards/feather_m4_express/board.c b/ports/atmel-samd/boards/feather_m4_express/board.c index 85e9959c9..8096b9b8e 100644 --- a/ports/atmel-samd/boards/feather_m4_express/board.c +++ b/ports/atmel-samd/boards/feather_m4_express/board.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * 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 @@ -26,13 +26,6 @@ #include "boards/board.h" #include "mpconfigboard.h" -#include "hal/include/hal_gpio.h" - -#include "shared-bindings/displayio/Display.h" -#include "shared-bindings/displayio/FourWire.h" -#include "shared-module/displayio/mipi_constants.h" - -#include "tick.h" void board_init(void) { } diff --git a/ports/atmel-samd/boards/feather_m4_express/pins.c b/ports/atmel-samd/boards/feather_m4_express/pins.c index 23b55e957..cec9fe37f 100644 --- a/ports/atmel-samd/boards/feather_m4_express/pins.c +++ b/ports/atmel-samd/boards/feather_m4_express/pins.c @@ -1,6 +1,5 @@ #include "shared-bindings/board/__init__.h" -#include "boards/board.h" #include "supervisor/shared/board_busses.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index c8132e2f9..59a5cf398 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -37,13 +37,9 @@ void displayio_refresh_displays(void) { uint16_t* pixel = &(((uint16_t*)buffer)[index]); *pixel = 0; - //if (index == 0) { - if (display->current_group != NULL) { - displayio_group_get_pixel(display->current_group, x, y, pixel); - } - // } else { - // *pixel = (((uint16_t*)buffer)[0]); - // } + if (display->current_group != NULL) { + displayio_group_get_pixel(display->current_group, x, y, pixel); + } index += 1; // The buffer is full, send it. @@ -189,5 +185,4 @@ void common_hal_displayio_release_displays(void) { for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { displays[i].display.base.type = &mp_type_NoneType; } - // TODO(tannewt): Clear the display datastructures and release everything used. } -- cgit v1.2.3 From edc8383e2297156134a58067899eefacd5764802 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 16:37:06 -0800 Subject: Improvements thanks to danh's review --- ports/atmel-samd/common-hal/displayio/ParallelBus.c | 9 ++++++++- ports/nrf/common-hal/displayio/ParallelBus.c | 5 ++++- shared-bindings/displayio/Display.c | 6 +++--- shared-bindings/displayio/FourWire.c | 9 +++------ shared-bindings/displayio/ParallelBus.c | 15 ++++++--------- supervisor/shared/board_busses.c | 2 ++ 6 files changed, 26 insertions(+), 20 deletions(-) diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.c b/ports/atmel-samd/common-hal/displayio/ParallelBus.c index 3c287eccd..7a5f61448 100644 --- a/ports/atmel-samd/common-hal/displayio/ParallelBus.c +++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.c @@ -39,7 +39,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { uint8_t data_pin = data0->number; - if (data_pin % 8 != 0 || data_pin % 32 >= 24) { + if (data_pin % 8 != 0) { mp_raise_ValueError(translate("Data 0 pin must be byte aligned")); } for (uint8_t i = 0; i < 8; i++) { @@ -49,6 +49,13 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel } PortGroup *const g = &PORT->Group[data0->number / 32]; g->DIRSET.reg = 0xff << (data_pin % 32); + uint32_t wrconfig = PORT_WRCONFIG_WRPINCFG | PORT_WRCONFIG_DRVSTR; + if (data_pin % 32 > 15) { + wrconfig |= PORT_WRCONFIG_HWSEL | (0xff << ((data_pin % 32) - 16)); + } else { + wrconfig |= 0xff << (data_pin % 32); + } + g->WRCONFIG.reg = wrconfig; self->bus = ((uint8_t*) &g->OUT.reg) + (data0->number % 32 / 8); self->command.base.type = &digitalio_digitalinout_type; diff --git a/ports/nrf/common-hal/displayio/ParallelBus.c b/ports/nrf/common-hal/displayio/ParallelBus.c index 3afedf736..42231be52 100644 --- a/ports/nrf/common-hal/displayio/ParallelBus.c +++ b/ports/nrf/common-hal/displayio/ParallelBus.c @@ -39,7 +39,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) { uint8_t data_pin = data0->number; - if (data_pin % 8 != 0 || data_pin % 32 >= 24) { + if (data_pin % 8 != 0) { mp_raise_ValueError(translate("Data 0 pin must be byte aligned")); } for (uint8_t i = 0; i < 8; i++) { @@ -57,6 +57,9 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel num_pins_in_port = P1_PIN_NUM; } g->DIRSET = 0xff << (data_pin % num_pins_in_port); + for (uint8_t i = 0; i < 8; i++) { + g->PIN_CNF[data_pin + i] |= NRF_GPIO_PIN_S0S1 << GPIO_PIN_CNF_DRIVE_Pos; + } self->bus = ((uint8_t*) &g->OUT) + (data0->number % num_pins_in_port / 8); self->command.base.type = &digitalio_digitalinout_type; diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 501b96549..4de6c2b24 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -90,8 +90,8 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a static const mp_arg_t allowed_args[] = { { MP_QSTR_display_bus, MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_init_sequence, MP_ARG_REQUIRED | MP_ARG_OBJ }, - { MP_QSTR_width, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = -1} }, - { MP_QSTR_height, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = -1} }, + { MP_QSTR_width, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, }, + { MP_QSTR_height, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, }, { MP_QSTR_colstart, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, { MP_QSTR_rowstart, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, { MP_QSTR_color_depth, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 16} }, @@ -121,7 +121,7 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a } } if (self == NULL) { - mp_raise_RuntimeError(translate("Display limit reached")); + mp_raise_RuntimeError(translate("Too many displays")); } self->base.type = &displayio_display_type; common_hal_displayio_display_construct(self, diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c index 561e2871e..dceb4fe69 100644 --- a/shared-bindings/displayio/FourWire.c +++ b/shared-bindings/displayio/FourWire.c @@ -61,8 +61,8 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_ enum { ARG_spi_bus, ARG_command, ARG_chip_select, ARG_reset }; 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, {.u_obj = mp_const_none} }, - { MP_QSTR_chip_select, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { 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_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -70,9 +70,6 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_ mp_obj_t command = args[ARG_command].u_obj; mp_obj_t chip_select = args[ARG_chip_select].u_obj; - if (command == mp_const_none || chip_select == mp_const_none) { - mp_raise_ValueError(translate("Command and chip_select required")); - } assert_pin_free(command); assert_pin_free(chip_select); mp_obj_t reset = args[ARG_reset].u_obj; @@ -93,7 +90,7 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_ } } if (self == NULL) { - mp_raise_RuntimeError(translate("Display bus limit reached")); + mp_raise_RuntimeError(translate("Too many display busses")); } common_hal_displayio_fourwire_construct(self, diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c index 2f9967866..916c5f852 100644 --- a/shared-bindings/displayio/ParallelBus.c +++ b/shared-bindings/displayio/ParallelBus.c @@ -62,11 +62,11 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_data0, ARG_command, ARG_chip_select, ARG_write, ARG_read, ARG_reset }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_data0, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, - { MP_QSTR_command, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, - { MP_QSTR_chip_select, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, - { MP_QSTR_write, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, - { MP_QSTR_read, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_data0, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, + { MP_QSTR_command, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, + { MP_QSTR_chip_select, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, + { MP_QSTR_write, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, + { MP_QSTR_read, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_reset, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -78,9 +78,6 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t mp_obj_t write = args[ARG_write].u_obj; mp_obj_t read = args[ARG_read].u_obj; mp_obj_t reset = args[ARG_reset].u_obj; - if (data0 == mp_const_none || command == mp_const_none || chip_select == mp_const_none || write == mp_const_none || read == mp_const_none) { - mp_raise_ValueError(translate("Data0, command, chip_select, write and read required")); - } assert_pin_free(data0); assert_pin_free(command); assert_pin_free(chip_select); @@ -98,7 +95,7 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t } } if (self == NULL) { - mp_raise_RuntimeError(translate("Display bus limit reached")); + mp_raise_RuntimeError(translate("Too many display busses")); } common_hal_displayio_parallelbus_construct(self, data0, command, chip_select, write, read, reset); diff --git a/supervisor/shared/board_busses.c b/supervisor/shared/board_busses.c index ed1f98a58..8a1c7bf86 100644 --- a/supervisor/shared/board_busses.c +++ b/supervisor/shared/board_busses.c @@ -66,6 +66,8 @@ mp_obj_t board_i2c(void) { MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c); #if BOARD_SPI +// Statically allocate the SPI object so it can live past the end of the heap and into the next VM. +// That way it can be used by built-in FourWire displays and be accessible through board.SPI(). STATIC busio_spi_obj_t spi_obj; STATIC mp_obj_t spi_singleton = NULL; -- cgit v1.2.3 From b41d386d02f26e81dc1f234826fde7d24b020531 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 17:04:18 -0800 Subject: simplify arg checking for display --- shared-bindings/displayio/Display.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 4de6c2b24..d61732f6f 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -104,11 +104,6 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a mp_obj_t display_bus = args[ARG_display_bus].u_obj; - mp_int_t width = args[ARG_width].u_int; - mp_int_t height = args[ARG_height].u_int; - if (width == -1 || height == -1) { - mp_raise_ValueError(translate("Width and height kwargs required")); - } mp_buffer_info_t bufinfo; mp_get_buffer_raise(args[ARG_init_sequence].u_obj, &bufinfo, MP_BUFFER_READ); @@ -125,7 +120,7 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a } self->base.type = &displayio_display_type; common_hal_displayio_display_construct(self, - display_bus, width, height, args[ARG_colstart].u_int, args[ARG_rowstart].u_int, + display_bus, args[ARG_width].u_int, args[ARG_height].u_int, args[ARG_colstart].u_int, args[ARG_rowstart].u_int, args[ARG_color_depth].u_int, args[ARG_set_column_command].u_int, args[ARG_set_row_command].u_int, args[ARG_write_ram_command].u_int, bufinfo.buf, bufinfo.len); -- cgit v1.2.3 From b569e8bab044bb54210e12254a5c22342edb1296 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 17:09:56 -0800 Subject: More make_new updates --- extmod/modframebuf.c | 4 ++-- extmod/vfs_posix.c | 4 ++-- extmod/vfs_posix_file.c | 4 ++-- py/modio.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extmod/modframebuf.c b/extmod/modframebuf.c index 413540540..f92312a23 100644 --- a/extmod/modframebuf.c +++ b/extmod/modframebuf.c @@ -259,8 +259,8 @@ STATIC void fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, u formats[fb->format].fill_rect(fb, x, y, xend - x, yend - y, col); } -STATIC mp_obj_t framebuf_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_arg_check_num(n_args, n_kw, 4, 5, false); +STATIC mp_obj_t framebuf_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { + mp_arg_check_num(n_args, kw_args, 4, 5, false); mp_obj_framebuf_t *o = m_new_obj(mp_obj_framebuf_t); o->base.type = type; diff --git a/extmod/vfs_posix.c b/extmod/vfs_posix.c index 39e197f29..d28dfe451 100644 --- a/extmod/vfs_posix.c +++ b/extmod/vfs_posix.c @@ -90,8 +90,8 @@ STATIC mp_import_stat_t mp_vfs_posix_import_stat(void *self_in, const char *path return MP_IMPORT_STAT_NO_EXIST; } -STATIC mp_obj_t vfs_posix_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_arg_check_num(n_args, n_kw, 0, 1, false); +STATIC mp_obj_t vfs_posix_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { + mp_arg_check_num(n_args, kw_args, 0, 1, false); mp_obj_vfs_posix_t *vfs = m_new_obj(mp_obj_vfs_posix_t); vfs->base.type = type; diff --git a/extmod/vfs_posix_file.c b/extmod/vfs_posix_file.c index 3eca47eb4..b760b3847 100644 --- a/extmod/vfs_posix_file.c +++ b/extmod/vfs_posix_file.c @@ -109,14 +109,14 @@ mp_obj_t mp_vfs_posix_file_open(const mp_obj_type_t *type, mp_obj_t file_in, mp_ return MP_OBJ_FROM_PTR(o); } -STATIC mp_obj_t vfs_posix_file_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { +STATIC mp_obj_t vfs_posix_file_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { static const mp_arg_t allowed_args[] = { { MP_QSTR_file, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_rom_obj = MP_ROM_PTR(&mp_const_none_obj)} }, { MP_QSTR_mode, MP_ARG_OBJ, {.u_rom_obj = MP_ROM_QSTR(MP_QSTR_r)} }, }; mp_arg_val_t arg_vals[MP_ARRAY_SIZE(allowed_args)]; - mp_arg_parse_all_kw_array(n_args, n_kw, args, MP_ARRAY_SIZE(allowed_args), allowed_args, arg_vals); + mp_arg_parse_all(n_args, args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, arg_vals); return mp_vfs_posix_file_open(type, arg_vals[0].u_obj, arg_vals[1].u_obj); } diff --git a/py/modio.c b/py/modio.c index 9918159cb..d7c1a58a8 100644 --- a/py/modio.c +++ b/py/modio.c @@ -113,8 +113,8 @@ typedef struct _mp_obj_bufwriter_t { byte buf[0]; } mp_obj_bufwriter_t; -STATIC mp_obj_t bufwriter_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_arg_check_num(n_args, n_kw, 2, 2, false); +STATIC mp_obj_t bufwriter_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { + mp_arg_check_num(n_args, kw_args, 2, 2, false); size_t alloc = mp_obj_get_int(args[1]); mp_obj_bufwriter_t *o = m_new_obj_var(mp_obj_bufwriter_t, byte, alloc); o->base.type = type; -- cgit v1.2.3 From 28cfd8a5135a1e420b56d693cef20fc1a4721081 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 19 Jan 2019 19:45:35 -0500 Subject: CharacteristicBuffer: make it be a stream class; add locking --- ports/nrf/Makefile | 1 + ports/nrf/common-hal/bleio/Characteristic.c | 2 +- ports/nrf/common-hal/bleio/CharacteristicBuffer.c | 80 +++++++++-- ports/nrf/common-hal/bleio/CharacteristicBuffer.h | 5 +- ports/nrf/common-hal/bleio/Device.c | 2 + ports/nrf/common-hal/busio/UART.c | 39 ++---- ports/nrf/sd_mutex.c | 56 ++++++++ ports/nrf/sd_mutex.h | 46 +++++++ py/ringbuf.h | 32 ++++- py/stream.c | 2 +- shared-bindings/bleio/CharacteristicBuffer.c | 159 ++++++++++++++++++++-- shared-bindings/bleio/CharacteristicBuffer.h | 9 +- shared-bindings/busio/UART.c | 4 +- 13 files changed, 371 insertions(+), 66 deletions(-) create mode 100644 ports/nrf/sd_mutex.c create mode 100644 ports/nrf/sd_mutex.h diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 2bc508475..1b4aef050 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -142,6 +142,7 @@ SRC_C += \ peripherals/nrf/$(MCU_CHIP)/pins.c \ peripherals/nrf/$(MCU_CHIP)/power.c \ peripherals/nrf/timers.c \ + sd_mutex.c \ supervisor/shared/memory.c diff --git a/ports/nrf/common-hal/bleio/Characteristic.c b/ports/nrf/common-hal/bleio/Characteristic.c index 0bade8d01..1db564549 100644 --- a/ports/nrf/common-hal/bleio/Characteristic.c +++ b/ports/nrf/common-hal/bleio/Characteristic.c @@ -36,9 +36,9 @@ #include "common-hal/bleio/Characteristic.h" #include "shared-module/bleio/Characteristic.h" -// TODO - should these be per object?? ***** STATIC volatile bleio_characteristic_obj_t *m_read_characteristic; STATIC volatile uint8_t m_tx_in_progress; +// Serialize gattc writes that send a response. This might be done per object? STATIC nrf_mutex_t *m_write_mutex; STATIC uint16_t get_cccd(bleio_characteristic_obj_t *characteristic) { diff --git a/ports/nrf/common-hal/bleio/CharacteristicBuffer.c b/ports/nrf/common-hal/bleio/CharacteristicBuffer.c index 4bd3e147f..42e45abdf 100644 --- a/ports/nrf/common-hal/bleio/CharacteristicBuffer.c +++ b/ports/nrf/common-hal/bleio/CharacteristicBuffer.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2018 Artur Pacholec + * Copyright (c) 2019 Dan Halbert for Adafruit Industries * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,9 +29,13 @@ #include "ble_drv.h" #include "ble_gatts.h" -#include "nrf_soc.h" +#include "sd_mutex.h" +#include "lib/utils/interrupt_char.h" #include "py/runtime.h" +#include "py/stream.h" + +#include "tick.h" #include "common-hal/bleio/__init__.h" #include "common-hal/bleio/CharacteristicBuffer.h" @@ -43,10 +47,13 @@ STATIC void characteristic_buffer_on_ble_evt(ble_evt_t *ble_evt, void *param) { ble_gatts_evt_write_t *evt_write = &ble_evt->evt.gatts_evt.params.write; // Event handle must match the handle for my characteristic. if (evt_write->handle == self->characteristic->handle) { - // Push all the data onto the ring buffer. + // Push all the data onto the ring buffer, but wait for any reads to finish. + sd_mutex_acquire_wait_no_vm(&self->ringbuf_mutex); for (size_t i = 0; i < evt_write->len; i++) { ringbuf_put(&self->ringbuf, evt_write->data[i]); } + // Don't check for errors: we're in an event handler. + sd_mutex_release(&self->ringbuf_mutex); break; } } @@ -54,22 +61,75 @@ STATIC void characteristic_buffer_on_ble_evt(ble_evt_t *ble_evt, void *param) { } -// Assumes that buffer_size has been validated before call. -void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic, size_t buffer_size) { +// Assumes that timeout and buffer_size have been validated before call. +void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self, + bleio_characteristic_obj_t *characteristic, + mp_float_t timeout, + size_t buffer_size) { self->characteristic = characteristic; + self->timeout_ms = timeout * 1000; // This is a macro. - ringbuf_alloc(&self->ringbuf, buffer_size); + // true means long-lived, so it won't be moved. + ringbuf_alloc(&self->ringbuf, buffer_size, true); + sd_mutex_new(&self->ringbuf_mutex); ble_drv_add_event_handler(characteristic_buffer_on_ble_evt, self); } -// Returns a uint8_t byte value, or -1 if no data is available. -int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_t *self) { - return ringbuf_get(&self->ringbuf); +int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_t *self, uint8_t *data, size_t len, int *errcode) { + uint64_t start_ticks = ticks_ms; + + // Wait for all bytes received or timeout + while ( (ringbuf_count(&self->ringbuf) < len) && (ticks_ms - start_ticks < self->timeout_ms) ) { +#ifdef MICROPY_VM_HOOK_LOOP + MICROPY_VM_HOOK_LOOP ; + // Allow user to break out of a timeout with a KeyboardInterrupt. + if ( mp_hal_is_interrupted() ) { + return 0; + } +#endif + } + + // Copy received data. Lock out writes while copying. + sd_mutex_acquire_wait(&self->ringbuf_mutex); + + size_t rx_bytes = MIN(ringbuf_count(&self->ringbuf), len); + for ( size_t i = 0; i < rx_bytes; i++ ) { + data[i] = ringbuf_get(&self->ringbuf); + } + + // Writes now OK. + sd_mutex_release_check(&self->ringbuf_mutex); + + return rx_bytes; +} + +uint32_t common_hal_bleio_characteristic_buffer_rx_characters_available(bleio_characteristic_buffer_obj_t *self) { + return ringbuf_count(&self->ringbuf); +} + +void common_hal_bleio_characteristic_buffer_clear_rx_buffer(bleio_characteristic_buffer_obj_t *self) { + // prevent conflict with uart irq + sd_mutex_acquire_wait(&self->ringbuf_mutex); + ringbuf_clear(&self->ringbuf); + sd_mutex_release_check(&self->ringbuf_mutex); +} + +bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer_obj_t *self) { + return self->characteristic == NULL; } void common_hal_bleio_characteristic_buffer_deinit(bleio_characteristic_buffer_obj_t *self) { - ble_drv_remove_event_handler(characteristic_buffer_on_ble_evt, self); + if (!common_hal_bleio_characteristic_buffer_deinited(self)) { + ble_drv_remove_event_handler(characteristic_buffer_on_ble_evt, self); + } +} + +bool common_hal_bleio_characteristic_buffer_connected(bleio_characteristic_buffer_obj_t *self) { + return self->characteristic != NULL && + self->characteristic->service != NULL && + self->characteristic->service->device != NULL && + common_hal_bleio_device_get_conn_handle(self->characteristic->service->device) != BLE_CONN_HANDLE_INVALID; } diff --git a/ports/nrf/common-hal/bleio/CharacteristicBuffer.h b/ports/nrf/common-hal/bleio/CharacteristicBuffer.h index f9ff7dd66..f5c715154 100644 --- a/ports/nrf/common-hal/bleio/CharacteristicBuffer.h +++ b/ports/nrf/common-hal/bleio/CharacteristicBuffer.h @@ -27,15 +27,18 @@ #ifndef MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H #define MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H -#include "py/ringbuf.h" +#include "nrf_soc.h" +#include "py/ringbuf.h" #include "shared-bindings/bleio/Characteristic.h" typedef struct { mp_obj_base_t base; bleio_characteristic_obj_t *characteristic; + uint32_t timeout_ms; // Ring buffer storing consecutive incoming values. ringbuf_t ringbuf; + nrf_mutex_t ringbuf_mutex; } bleio_characteristic_buffer_obj_t; #endif // MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H diff --git a/ports/nrf/common-hal/bleio/Device.c b/ports/nrf/common-hal/bleio/Device.c index 50c738abe..5f625829e 100644 --- a/ports/nrf/common-hal/bleio/Device.c +++ b/ports/nrf/common-hal/bleio/Device.c @@ -262,11 +262,13 @@ STATIC bool discover_services(bleio_device_obj_t *device, uint16_t start_handle) mp_raise_OSError_msg(translate("Failed to discover services")); } + // Serialize discovery. err_code = sd_mutex_acquire(m_discovery_mutex); if (err_code != NRF_SUCCESS) { mp_raise_OSError_msg(translate("Failed to acquire mutex")); } + // Wait for someone else to release m_discovery_mutex. while (sd_mutex_acquire(m_discovery_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) { #ifdef MICROPY_VM_HOOK_LOOP MICROPY_VM_HOOK_LOOP diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c index 912956369..43868f506 100644 --- a/ports/nrf/common-hal/busio/UART.c +++ b/ports/nrf/common-hal/busio/UART.c @@ -52,33 +52,6 @@ static uint32_t get_nrf_baud (uint32_t baudrate); -static uint16_t ringbuf_count(ringbuf_t *r) -{ - volatile int count = r->iput - r->iget; - if ( count < 0 ) { - count += r->size; - } - - return (uint16_t) count; -} - -static void ringbuf_clear(ringbuf_t *r) -{ - r->iput = r->iget = 0; -} - -// will overwrite old data -static void ringbuf_put_n(ringbuf_t* r, uint8_t* buf, uint8_t bufsize) -{ - for(uint8_t i=0; i < bufsize; i++) { - if ( ringbuf_put(r, buf[i]) < 0 ) { - // if full overwrite old data - (void) ringbuf_get(r); - ringbuf_put(r, buf[i]); - } - } -} - static void uart_callback_irq (const nrfx_uarte_event_t * event, void * context) { busio_uart_obj_t* self = (busio_uart_obj_t*) context; @@ -145,16 +118,20 @@ void common_hal_busio_uart_construct (busio_uart_obj_t *self, // Init buffer for rx if ( rx != mp_const_none ) { - self->rbuf.buf = (uint8_t *) gc_alloc(receiver_buffer_size, false, false); + // Initially allocate the UART's buffer in the long-lived part of the + // heap. UARTs are generally long-lived objects, but the "make long- + // lived" machinery is incapable of moving internal pointers like + // self->buffer, so do it manually. (However, as long as internal + // pointers like this are NOT moved, allocating the buffer + // in the long-lived pool is not strictly necessary) + // (This is a macro.) + ringbuf_alloc(&self->rbuf, receiver_buffer_size, true); if ( !self->rbuf.buf ) { nrfx_uarte_uninit(&self->uarte); mp_raise_msg(&mp_type_MemoryError, translate("Failed to allocate RX buffer")); } - self->rbuf.size = receiver_buffer_size; - self->rbuf.iget = self->rbuf.iput = 0; - self->rx_pin_number = rx->number; claim_pin(rx); } diff --git a/ports/nrf/sd_mutex.c b/ports/nrf/sd_mutex.c new file mode 100644 index 000000000..7682ffa62 --- /dev/null +++ b/ports/nrf/sd_mutex.c @@ -0,0 +1,56 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Dan Halbert for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/mpconfig.h" +#include "py/runtime.h" +#include "nrf_soc.h" + +void sd_mutex_acquire_check(nrf_mutex_t* p_mutex) { + uint32_t err_code = sd_mutex_acquire(p_mutex); + if (err_code != NRF_SUCCESS) { + mp_raise_OSError_msg_varg(translate("Failed to acquire mutex, err 0x%04x"), err_code); + } +} + +void sd_mutex_acquire_wait(nrf_mutex_t* p_mutex) { + while (sd_mutex_acquire(p_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) { +#ifdef MICROPY_VM_HOOK_LOOP + MICROPY_VM_HOOK_LOOP +#endif + } +} + +void sd_mutex_acquire_wait_no_vm(nrf_mutex_t* p_mutex) { + while (sd_mutex_acquire(p_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) { + } +} + +void sd_mutex_release_check(nrf_mutex_t* p_mutex) { + uint32_t err_code = sd_mutex_release(p_mutex); + if (err_code != NRF_SUCCESS) { + mp_raise_OSError_msg_varg(translate("Failed to release mutex, err 0x%04x"), err_code); + } +} diff --git a/ports/nrf/sd_mutex.h b/ports/nrf/sd_mutex.h new file mode 100644 index 000000000..ca4691720 --- /dev/null +++ b/ports/nrf/sd_mutex.h @@ -0,0 +1,46 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Dan Halbert for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_NRF_SD_MUTEX_H +#define MICROPY_INCLUDED_NRF_SD_MUTEX_H + +#include "nrf_soc.h" + +// Helpers for common usage of nrf_mutex. + +// Try to acquire a mutex right now. Raise exception if we can't get it. +void sd_mutex_acquire_check(nrf_mutex_t* p_mutex); + +// Wait for a mutex to become available. Run VM background tasks while waiting. +void sd_mutex_acquire_wait(nrf_mutex_t* p_mutex); + +// Wait for a mutex to become available.. Block VM while waiting. +void sd_mutex_acquire_wait_no_vm(nrf_mutex_t* p_mutex); + +// Release a mutex, and raise exception on error. +void sd_mutex_release_check(nrf_mutex_t* p_mutex); + +#endif // MICROPY_INCLUDED_NRF_SD_MUTEX_H diff --git a/py/ringbuf.h b/py/ringbuf.h index c62e20e1d..5f82cc096 100644 --- a/py/ringbuf.h +++ b/py/ringbuf.h @@ -26,6 +26,8 @@ #ifndef MICROPY_INCLUDED_PY_RINGBUF_H #define MICROPY_INCLUDED_PY_RINGBUF_H +#include "py/gc.h" + #include typedef struct _ringbuf_t { @@ -40,9 +42,9 @@ typedef struct _ringbuf_t { // ringbuf_t buf = {buf_array, sizeof(buf_array)}; // Dynamic initialization. This creates root pointer! -#define ringbuf_alloc(r, sz) \ +#define ringbuf_alloc(r, sz, long_lived) \ { \ - (r)->buf = m_new(uint8_t, sz); \ + (r)->buf = gc_alloc(sz, false, long_lived); \ (r)->size = sz; \ (r)->iget = (r)->iput = 0; \ } @@ -71,4 +73,30 @@ static inline int ringbuf_put(ringbuf_t *r, uint8_t v) { return 0; } +static inline uint16_t ringbuf_count(ringbuf_t *r) +{ + volatile int count = r->iput - r->iget; + if ( count < 0 ) { + count += r->size; + } + + return (uint16_t) count; +} + +static inline void ringbuf_clear(ringbuf_t *r) +{ + r->iput = r->iget = 0; +} + +// will overwrite old data +static inline void ringbuf_put_n(ringbuf_t* r, uint8_t* buf, uint8_t bufsize) +{ + for(uint8_t i=0; i < bufsize; i++) { + if ( ringbuf_put(r, buf[i]) < 0 ) { + // if full overwrite old data + (void) ringbuf_get(r); + ringbuf_put(r, buf[i]); + } + } +} #endif // MICROPY_INCLUDED_PY_RINGBUF_H diff --git a/py/stream.c b/py/stream.c index aca9b8460..9d8be445c 100644 --- a/py/stream.c +++ b/py/stream.c @@ -103,7 +103,7 @@ STATIC mp_obj_t stream_read_generic(size_t n_args, const mp_obj_t *args, byte fl // CPython does a readall, but here we silently let negatives through, // and they will cause a MemoryError. mp_int_t sz; - if (n_args == 1 || ((sz = mp_obj_get_int(args[1])) == -1)) { + if (n_args == 1 || args[1] == mp_const_none || ((sz = mp_obj_get_int(args[1])) == -1)) { return stream_readall(args[0]); } diff --git a/shared-bindings/bleio/CharacteristicBuffer.c b/shared-bindings/bleio/CharacteristicBuffer.c index 2bb4448c4..32629ca19 100644 --- a/shared-bindings/bleio/CharacteristicBuffer.c +++ b/shared-bindings/bleio/CharacteristicBuffer.c @@ -24,10 +24,21 @@ * THE SOFTWARE. */ +#include "py/mperrno.h" +#include "py/ioctl.h" #include "py/objproperty.h" #include "py/runtime.h" +#include "py/stream.h" + #include "shared-bindings/bleio/CharacteristicBuffer.h" #include "shared-bindings/bleio/UUID.h" +#include "shared-bindings/util.h" + +STATIC void raise_error_if_not_connected(bleio_characteristic_buffer_obj_t *self) { + if (!common_hal_bleio_characteristic_buffer_connected(self)) { + mp_raise_ValueError(translate("Not connected")); + } +} //| .. currentmodule:: bleio //| @@ -36,27 +47,34 @@ //| //| Accumulates a Characteristic's incoming values in a FIFO buffer. //| -//| .. class:: CharacteristicBuffer(Characteristic, buffer_size=0) +//| .. class:: CharacteristicBuffer(Characteristic, *, timeout=1, buffer_size=64) //| //| Create a new Characteristic object identified by the specified UUID. //| //| :param bleio.Characteristic characteristic: The characteristic to monitor +//| :param int timeout: the timeout in seconds to wait for the first character and between subsequent characters.//| //| :param int buffer_size: Size of ring buffer that stores incoming data coming from client. //| Must be >= 1. //| STATIC mp_obj_t bleio_characteristic_buffer_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_characteristic, ARG_buffer_size, }; + enum { ARG_characteristic, ARG_timeout, ARG_buffer_size, }; static const mp_arg_t allowed_args[] = { { MP_QSTR_characteristic, MP_ARG_REQUIRED | MP_ARG_OBJ }, - { MP_QSTR_buffer_size, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NEW_SMALL_INT(1)} }, + { MP_QSTR_buffer_size, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 64} }, }; 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); const mp_obj_t characteristic = args[ARG_characteristic].u_obj; - const int buffer_size = args[ARG_buffer_size].u_int; + mp_float_t timeout = mp_obj_get_float(args[ARG_timeout].u_obj); + if (timeout < 0.0f) { + mp_raise_ValueError(translate("timeout must be >= 0.0")); + } + + const int buffer_size = args[ARG_buffer_size].u_int; if (buffer_size < 1) { mp_raise_ValueError(translate("buffer_size must be >= 1")); } @@ -69,30 +87,117 @@ STATIC mp_obj_t bleio_characteristic_buffer_make_new(const mp_obj_type_t *type, self->base.type = &bleio_characteristic_buffer_type; self->characteristic = MP_OBJ_TO_PTR(characteristic); - common_hal_bleio_characteristic_buffer_construct(self, self->characteristic, buffer_size); + common_hal_bleio_characteristic_buffer_construct(self, self->characteristic, timeout, buffer_size); return MP_OBJ_FROM_PTR(self); } - -//| .. method:: read() +// These are standard stream methods. Code is in py/stream.c. +// +//| .. method:: read(nbytes=None) +//| +//| Read characters. If ``nbytes`` is specified then read at most that many +//| bytes. Otherwise, read everything that arrives until the connection +//| times out. Providing the number of bytes expected is highly recommended +//| because it will be faster. +//| +//| :return: Data read +//| :rtype: bytes or None +//| +//| .. method:: readinto(buf) //| -//| Read a single byte from the buffer. If no character is available, return None. -STATIC mp_obj_t bleio_characteristic_buffer_read(mp_obj_t self_in) { +//| Read bytes into the ``buf``. Read at most ``len(buf)`` bytes. +//| +//| :return: number of bytes read and stored into ``buf`` +//| :rtype: int or None (on a non-blocking error) +//| +//| .. method:: readline() +//| +//| Read a line, ending in a newline character. +//| +//| :return: the line read +//| :rtype: int or None +//| + +// These three methods are used by the shared stream methods. +STATIC mp_uint_t bleio_characteristic_buffer_read(mp_obj_t self_in, void *buf_in, mp_uint_t size, int *errcode) { bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in); + raise_error_if_deinited(common_hal_bleio_characteristic_buffer_deinited(self)); + raise_error_if_not_connected(self); + byte *buf = buf_in; - int byte = common_hal_bleio_characteristic_buffer_read(self); - if (byte == -1) { - return mp_const_none; + // make sure we want at least 1 char + if (size == 0) { + return 0; } - return MP_OBJ_NEW_SMALL_INT(byte); + return common_hal_bleio_characteristic_buffer_read(self, buf, size, errcode); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_read_obj, bleio_characteristic_buffer_read); + +STATIC mp_uint_t bleio_characteristic_buffer_write(mp_obj_t self_in, const void *buf_in, mp_uint_t size, int *errcode) { + mp_raise_NotImplementedError(translate("CharacteristicBuffer writing not provided")); + return 0; +} + +STATIC mp_uint_t bleio_characteristic_buffer_ioctl(mp_obj_t self_in, mp_uint_t request, mp_uint_t arg, int *errcode) { + bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in); + raise_error_if_deinited(common_hal_bleio_characteristic_buffer_deinited(self)); + raise_error_if_not_connected(self); + if (!common_hal_bleio_characteristic_buffer_connected(self)) { + mp_raise_ValueError(translate("Not connected.")); + } + mp_uint_t ret; + if (request == MP_IOCTL_POLL) { + mp_uint_t flags = arg; + ret = 0; + if ((flags & MP_IOCTL_POLL_RD) && common_hal_bleio_characteristic_buffer_rx_characters_available(self) > 0) { + ret |= MP_IOCTL_POLL_RD; + } +// No writing provided. +// if ((flags & MP_IOCTL_POLL_WR) && common_hal_busio_uart_ready_to_tx(self)) { +// ret |= MP_IOCTL_POLL_WR; +// } + } else { + *errcode = MP_EINVAL; + ret = MP_STREAM_ERROR; + } + return ret; +} + +//| .. attribute:: in_waiting +//| +//| The number of bytes in the input buffer, available to be read +//| +STATIC mp_obj_t bleio_characteristic_buffer_obj_get_in_waiting(mp_obj_t self_in) { + bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in); + raise_error_if_deinited(common_hal_bleio_characteristic_buffer_deinited(self)); + return MP_OBJ_NEW_SMALL_INT(common_hal_bleio_characteristic_buffer_rx_characters_available(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_get_in_waiting_obj, bleio_characteristic_buffer_obj_get_in_waiting); + +const mp_obj_property_t bleio_characteristic_buffer_in_waiting_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&bleio_characteristic_buffer_get_in_waiting_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj}, +}; + +//| .. method:: reset_input_buffer() +//| +//| Discard any unread characters in the input buffer. +//| +STATIC mp_obj_t bleio_characteristic_buffer_obj_reset_input_buffer(mp_obj_t self_in) { + bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in); + raise_error_if_deinited(common_hal_bleio_characteristic_buffer_deinited(self)); + common_hal_bleio_characteristic_buffer_clear_rx_buffer(self); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_reset_input_buffer_obj, bleio_characteristic_buffer_obj_reset_input_buffer); //| .. method:: deinit() //| //| Disable permanently. +//| STATIC mp_obj_t bleio_characteristic_buffer_deinit(mp_obj_t self_in) { bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in); common_hal_bleio_characteristic_buffer_deinit(self); @@ -101,15 +206,39 @@ STATIC mp_obj_t bleio_characteristic_buffer_deinit(mp_obj_t self_in) { STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_deinit_obj, bleio_characteristic_buffer_deinit); STATIC const mp_rom_map_elem_t bleio_characteristic_buffer_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&bleio_characteristic_buffer_read_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&bleio_characteristic_buffer_deinit_obj) }, + + // Standard stream methods. + { MP_OBJ_NEW_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_stream_read_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_readline), MP_ROM_PTR(&mp_stream_unbuffered_readline_obj)}, + { MP_OBJ_NEW_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&mp_stream_readinto_obj) }, + // CharacteristicBuffer is currently read-only. + // { MP_OBJ_NEW_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_reset_input_buffer), MP_ROM_PTR(&bleio_characteristic_buffer_reset_input_buffer_obj) }, + // Properties + { MP_ROM_QSTR(MP_QSTR_in_waiting), MP_ROM_PTR(&bleio_characteristic_buffer_in_waiting_obj) }, + }; STATIC MP_DEFINE_CONST_DICT(bleio_characteristic_buffer_locals_dict, bleio_characteristic_buffer_locals_dict_table); +STATIC const mp_stream_p_t characteristic_buffer_stream_p = { + .read = bleio_characteristic_buffer_read, + .write = bleio_characteristic_buffer_write, + .ioctl = bleio_characteristic_buffer_ioctl, + .is_text = false, + // Match PySerial when possible, such as disallowing optional length argument for .readinto() + .pyserial_compatibility = true, +}; + + const mp_obj_type_t bleio_characteristic_buffer_type = { { &mp_type_type }, .name = MP_QSTR_CharacteristicBuffer, .make_new = bleio_characteristic_buffer_make_new, + .getiter = mp_identity_getiter, + .iternext = mp_stream_unbuffered_iter, + .protocol = &characteristic_buffer_stream_p, .locals_dict = (mp_obj_dict_t*)&bleio_characteristic_buffer_locals_dict }; diff --git a/shared-bindings/bleio/CharacteristicBuffer.h b/shared-bindings/bleio/CharacteristicBuffer.h index c5d7580da..f25017c19 100644 --- a/shared-bindings/bleio/CharacteristicBuffer.h +++ b/shared-bindings/bleio/CharacteristicBuffer.h @@ -31,9 +31,12 @@ extern const mp_obj_type_t bleio_characteristic_buffer_type; -extern void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic, size_t buffer_size); -// Returns a uint8_t byte value, or -1 if no data is available. -int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_t *self); +extern void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic, mp_float_t timeout, size_t buffer_size); +int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_t *self, uint8_t *data, size_t len, int *errcode); +uint32_t common_hal_bleio_characteristic_buffer_rx_characters_available(bleio_characteristic_buffer_obj_t *self); +void common_hal_bleio_characteristic_buffer_clear_rx_buffer(bleio_characteristic_buffer_obj_t *self); +bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer_obj_t *self); int common_hal_bleio_characteristic_buffer_deinit(bleio_characteristic_buffer_obj_t *self); +bool common_hal_bleio_characteristic_buffer_connected(bleio_characteristic_buffer_obj_t *self); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_CHARACTERISTICBUFFER_H diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c index cd0ca3f36..85bf498a4 100644 --- a/shared-bindings/busio/UART.c +++ b/shared-bindings/busio/UART.c @@ -62,7 +62,7 @@ //| //| *New in CircuitPython 4.0:* ``timeout`` has incompatibly changed units from milliseconds to seconds. //| The new upper limit on ``timeout`` is meant to catch mistaken use of milliseconds. - +//| typedef struct { mp_obj_base_t base; } busio_uart_parity_obj_t; @@ -172,7 +172,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_ //| Read bytes into the ``buf``. Read at most ``len(buf)`` bytes. //| //| :return: number of bytes read and stored into ``buf`` -//| :rtype: bytes or None +//| :rtype: int or None (on a non-blocking error) //| //| *New in CircuitPython 4.0:* No length parameter is permitted. -- cgit v1.2.3 From e44ba8b9c41041580b3cdd533878ad055c2824eb Mon Sep 17 00:00:00 2001 From: Pascal Deneaux Date: Sun, 20 Jan 2019 02:17:53 +0100 Subject: Update de_DE.po changed and inserted some translations and fixed typos. --- locale/de_DE.po | 95 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/locale/de_DE.po b/locale/de_DE.po index 47098b66a..beeb9ea7a 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -509,8 +509,7 @@ msgstr "Dateisystem kann nicht wieder gemounted werden." #: ports/esp8266/common-hal/storage/__init__.c:38 msgid "Use esptool to erase flash and re-upload Python instead" -msgstr "" -"Benutze esptool um den flash zu löschen und stattdessen Python hochzuladen" +msgstr "Benutze esptool um den flash zu löschen und stattdessen Python hochzuladen" #: ports/esp8266/esp_mphal.c:154 msgid "C-level assert" @@ -651,110 +650,110 @@ msgstr "" #: ports/nrf/common-hal/analogio/AnalogOut.c:37 msgid "AnalogOut functionality not supported" -msgstr "" +msgstr "AnalogOut-Funktion wird nicht unterstützt" #: ports/nrf/common-hal/bleio/Adapter.c:41 #, c-format msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX" -msgstr "" +msgstr "Soft device assert, id: 0x%08lX, pc: 0x%08lX" #: ports/nrf/common-hal/bleio/Adapter.c:110 #, fuzzy msgid "Failed to change softdevice state" -msgstr "Kann advertisement nicht stoppen. Status: 0x%02x" +msgstr "Fehler beim Ändern des Softdevice-Status" #: ports/nrf/common-hal/bleio/Adapter.c:119 #, fuzzy msgid "Failed to get softdevice state" -msgstr "Kann advertisement nicht stoppen. Status: 0x%02x" +msgstr "Fehler beim Abrufen des Softdevice-Status" #: ports/nrf/common-hal/bleio/Adapter.c:138 msgid "Failed to get local address" -msgstr "" +msgstr "Lokale Adresse konnte nicht abgerufen werden" #: ports/nrf/common-hal/bleio/Broadcaster.c:48 msgid "interval not in range 0.0020 to 10.24" -msgstr "" +msgstr "Das Interval ist nicht im Bereich 0.0020 bis 10.24" #: ports/nrf/common-hal/bleio/Broadcaster.c:58 #: ports/nrf/common-hal/bleio/Peripheral.c:56 #, fuzzy msgid "Data too large for advertisement packet" -msgstr "Daten können nicht in das advertisement packet eingefügt werden." +msgstr "Zu vielen Daten für das advertisement packet" #: ports/nrf/common-hal/bleio/Broadcaster.c:83 #: ports/nrf/common-hal/bleio/Peripheral.c:324 #, fuzzy, c-format msgid "Failed to start advertising, err 0x%04x" -msgstr "Kann advertisement nicht starten. Status: 0x%02x" +msgstr "Kann advertisement nicht starten. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Broadcaster.c:96 #: ports/nrf/common-hal/bleio/Peripheral.c:336 #, fuzzy, c-format msgid "Failed to stop advertising, err 0x%04x" -msgstr "Kann advertisement nicht stoppen. Status: 0x%02x" +msgstr "Kann advertisement nicht stoppen. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c:59 #, fuzzy, c-format msgid "Failed to read CCCD value, err 0x%04x" -msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x" +msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c:89 #, fuzzy, c-format msgid "Failed to read gatts value, err 0x%04x" -msgstr "Kann den Attributwert nicht schreiben. Status: 0x%02x" +msgstr "Kann den Attributwert nicht schreiben. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c:106 #, fuzzy, c-format msgid "Failed to write gatts value, err 0x%04x" -msgstr "Kann den Attributwert nicht schreiben. Status: 0x%02x" +msgstr "Kann den Attributwert nicht schreiben. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c:132 #, fuzzy, c-format msgid "Failed to notify or indicate attribute value, err %0x04x" -msgstr "Kann den Attributwert nicht mitteilen. Status: 0x%02x" +msgstr "Kann den Attributwert nicht mitteilen. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c:144 #, fuzzy, c-format msgid "Failed to read attribute value, err %0x04x" -msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x" +msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c:172 #, fuzzy, c-format msgid "Failed to acquire mutex, err 0x%04x" -msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x" +msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c:178 #, fuzzy, c-format msgid "Failed to write attribute value, err 0x%04x" -msgstr "Kann den Attributwert nicht schreiben. Status: 0x%02x" +msgstr "Kann den Attributwert nicht schreiben. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c:189 #, fuzzy, c-format msgid "Failed to release mutex, err 0x%04x" -msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x" +msgstr "Mutex konnte nicht freigegeben werden. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c:251 #: ports/nrf/common-hal/bleio/Characteristic.c:284 msgid "bad GATT role" -msgstr "" +msgstr "bad GATT role" #: ports/nrf/common-hal/bleio/Device.c:80 #: ports/nrf/common-hal/bleio/Device.c:112 #, fuzzy msgid "Data too large for the advertisement packet" -msgstr "Daten können nicht in das advertisement packet eingefügt werden." +msgstr "Daten sind zu groß für das advertisement packet" #: ports/nrf/common-hal/bleio/Device.c:262 #, fuzzy msgid "Failed to discover services" -msgstr "Kann advertisement nicht stoppen. Status: 0x%02x" +msgstr "Es konnten keine Dienste gefunden werden" #: ports/nrf/common-hal/bleio/Device.c:267 #: ports/nrf/common-hal/bleio/Device.c:300 #, fuzzy msgid "Failed to acquire mutex" -msgstr "Konnte keinen RX Buffer allozieren" +msgstr "Akquirieren des Mutex gescheitert" #: ports/nrf/common-hal/bleio/Device.c:278 #: ports/nrf/common-hal/bleio/Device.c:311 @@ -762,105 +761,105 @@ msgstr "Konnte keinen RX Buffer allozieren" #: ports/nrf/common-hal/bleio/Device.c:376 #, fuzzy msgid "Failed to release mutex" -msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x" +msgstr "Loslassen des Mutex gescheitert" #: ports/nrf/common-hal/bleio/Device.c:387 #, fuzzy msgid "Failed to continue scanning" -msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%02x" +msgstr "Der Scanvorgang kann nicht fortgesetzt werden" #: ports/nrf/common-hal/bleio/Device.c:419 #, fuzzy msgid "Failed to connect:" -msgstr "Kann nicht verbinden. Status: 0x%02x" +msgstr "Das Verbinden ist fehlgeschlagen:" #: ports/nrf/common-hal/bleio/Device.c:489 #, fuzzy msgid "Failed to add service" -msgstr "Kann advertisement nicht stoppen. Status: 0x%02x" +msgstr "Dienst konnte nicht hinzugefügt werden" #: ports/nrf/common-hal/bleio/Device.c:506 #, fuzzy msgid "Failed to start advertising" -msgstr "Kann advertisement nicht starten. Status: 0x%02x" +msgstr "Kann advertisement nicht starten" #: ports/nrf/common-hal/bleio/Device.c:523 #, fuzzy msgid "Failed to stop advertising" -msgstr "Kann advertisement nicht stoppen. Status: 0x%02x" +msgstr "Kann advertisement nicht stoppen" #: ports/nrf/common-hal/bleio/Device.c:548 #, fuzzy msgid "Failed to start scanning" -msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%02x" +msgstr "Der Scanvorgang kann nicht gestartet werden" #: ports/nrf/common-hal/bleio/Device.c:564 #, fuzzy msgid "Failed to create mutex" -msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x" +msgstr "Erstellen des Mutex ist fehlgeschlagen" #: ports/nrf/common-hal/bleio/Peripheral.c:304 #, fuzzy, c-format msgid "Failed to add service, err 0x%04x" -msgstr "Kann advertisement nicht stoppen. Status: 0x%02x" +msgstr "Dienst konnte nicht hinzugefügt werden. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Scanner.c:75 #, fuzzy, c-format msgid "Failed to continue scanning, err 0x%04x" -msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%02x" +msgstr "Der Scanvorgang kann nicht fortgesetzt werden. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Scanner.c:101 #, fuzzy, c-format msgid "Failed to start scanning, err 0x%04x" -msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%02x" +msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Service.c:88 #, fuzzy, c-format msgid "Failed to add characteristic, err 0x%04x" -msgstr "Kann advertisement nicht stoppen. Status: 0x%02x" +msgstr "Fehler beim Hinzufügen des Merkmals. Status: 0x%04x" #: ports/nrf/common-hal/bleio/Service.c:92 msgid "Characteristic already in use by another Service." -msgstr "" +msgstr "Merkmal wird bereits von einem anderen Dienst verwendet." #: ports/nrf/common-hal/bleio/UUID.c:54 #, fuzzy, c-format msgid "Failed to register Vendor-Specific UUID, err 0x%04x" -msgstr "Kann keine herstellerspezifische 128-Bit-UUID hinzufügen." +msgstr "Kann keine herstellerspezifische UUID hinzufügen. Status: 0x%04x" #: ports/nrf/common-hal/bleio/UUID.c:73 #, c-format msgid "Could not decode ble_uuid, err 0x%04x" -msgstr "" +msgstr "Konnte ble_uuid nicht decodieren. Status: 0x%04x" #: ports/nrf/common-hal/bleio/UUID.c:88 msgid "Unexpected nrfx uuid type" -msgstr "" +msgstr "Unerwarteter nrfx uuid-Typ" #: ports/nrf/common-hal/busio/I2C.c:98 #, fuzzy msgid "All I2C peripherals are in use" -msgstr "Alle timer werden benutzt" +msgstr "Alle I2C-Peripheriegeräte sind in Benutzung" #: ports/nrf/common-hal/busio/SPI.c:133 #, fuzzy msgid "All SPI peripherals are in use" -msgstr "Alle timer werden benutzt" +msgstr "Alle SPI-Peripheriegeräte sind in Benutzung" #: ports/nrf/common-hal/busio/UART.c:49 #, c-format msgid "error = 0x%08lX" -msgstr "" +msgstr "error = 0x%08lX" #: ports/nrf/common-hal/busio/UART.c:122 #, fuzzy msgid "Invalid buffer size" -msgstr "ungültiger dupterm index" +msgstr "Ungültige Puffergröße" #: ports/nrf/common-hal/busio/UART.c:126 #, fuzzy msgid "Odd parity is not supported" -msgstr "bytes mit merh als 8 bits werden nicht unterstützt" +msgstr "bytes mit mehr als 8 bits werden nicht unterstützt" #: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362 #: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372 @@ -868,17 +867,17 @@ msgstr "bytes mit merh als 8 bits werden nicht unterstützt" #: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392 #: ports/nrf/common-hal/busio/UART.c:400 msgid "busio.UART not available" -msgstr "" +msgstr "Kann busio.UART nicht finden" #: ports/nrf/common-hal/microcontroller/Processor.c:48 #, fuzzy msgid "Cannot get temperature" -msgstr "Kann PPCP Parameter nicht setzen." +msgstr "Kann Temperatur nicht holen" #: ports/nrf/common-hal/pulseio/PWMOut.c:161 #, fuzzy msgid "All PWM peripherals are in use" -msgstr "Alle timer werden benutzt" +msgstr "Alle PWM-Peripheriegeräte werden verwendet" #: ports/unix/modffi.c:138 msgid "Unknown type" @@ -890,7 +889,7 @@ msgstr "Fehler in ffi_prep_cif" #: ports/unix/modffi.c:270 msgid "ffi_prep_closure_loc" -msgstr "" +msgstr "ffi_prep_closure_loc" #: ports/unix/modffi.c:413 msgid "Don't know how to pass object to native function" -- cgit v1.2.3 From 62df7ab73053fcf7b7eac54adbc90be9328df347 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 20 Jan 2019 15:10:09 -0500 Subject: Improve struct compatibility with CPython --- py/binary.c | 7 ++- py/modstruct.c | 16 +++++- shared-bindings/struct/__init__.c | 63 +++++++++++++-------- shared-bindings/struct/__init__.h | 2 +- shared-module/struct/__init__.c | 113 ++++++++++++++++++++++---------------- 5 files changed, 126 insertions(+), 75 deletions(-) diff --git a/py/binary.c b/py/binary.c index ca851c936..9c3a49e8f 100644 --- a/py/binary.c +++ b/py/binary.c @@ -49,7 +49,7 @@ size_t mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) { switch (struct_type) { case '<': case '>': switch (val_type) { - case 'b': case 'B': + case 'b': case 'B': case 'x': size = 1; break; case 'h': case 'H': size = 2; break; @@ -79,7 +79,7 @@ size_t mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) { // particular (or any) ABI. switch (val_type) { case BYTEARRAY_TYPECODE: - case 'b': case 'B': + case 'b': case 'B': case 'x': align = size = 1; break; case 'h': case 'H': align = alignof(short); @@ -126,6 +126,7 @@ mp_obj_t mp_binary_get_val_array(char typecode, void *p, mp_uint_t index) { break; case BYTEARRAY_TYPECODE: case 'B': + case 'x': // value will be discarded val = ((unsigned char*)p)[index]; break; case 'h': @@ -364,6 +365,8 @@ void mp_binary_set_val_array_from_int(char typecode, void *p, mp_uint_t index, m case 'B': ((unsigned char*)p)[index] = val; break; + case 'x': + ((unsigned char*)p)[index] = 0; case 'h': ((short*)p)[index] = val; break; diff --git a/py/modstruct.c b/py/modstruct.c index 3f1b2f8b8..a238d3935 100644 --- a/py/modstruct.c +++ b/py/modstruct.c @@ -97,7 +97,10 @@ STATIC size_t calc_size_items(const char *fmt, size_t *total_sz) { total_cnt += 1; size += cnt; } else { - total_cnt += cnt; + // Pad bytes are skipped and don't get included in the item count. + if (*fmt != 'x') { + total_cnt += cnt; + } mp_uint_t align; size_t sz = mp_binary_get_size(fmt_type, *fmt, &align); while (cnt--) { @@ -166,7 +169,10 @@ STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *args) { } else { while (cnt--) { item = mp_binary_get_val(fmt_type, *fmt, &p); - res->items[i++] = item; + // Pad bytes ('x') are just skipped. + if (*fmt != 'x') { + res->items[i++] = item; + } } } fmt++; @@ -204,7 +210,11 @@ STATIC void struct_pack_into_internal(mp_obj_t fmt_in, byte *p, size_t n_args, c } else { // If we run out of args then we just finish; CPython would raise struct.error while (cnt-- && i < n_args) { - mp_binary_set_val(fmt_type, *fmt, args[i++], &p); + mp_binary_set_val(fmt_type, *fmt, args[i], &p); + // Pad bytes don't have a corresponding argument. + if (*fmt != 'x') { + i++; + } } } fmt++; diff --git a/shared-bindings/struct/__init__.c b/shared-bindings/struct/__init__.c index 093597785..9240a15bb 100644 --- a/shared-bindings/struct/__init__.c +++ b/shared-bindings/struct/__init__.c @@ -51,7 +51,7 @@ //| //| Supported size/byte order prefixes: *@*, *<*, *>*, *!*. //| -//| Supported format codes: *b*, *B*, *h*, *H*, *i*, *I*, *l*, *L*, *q*, *Q*, +//| Supported format codes: *b*, *B*, *x*, *h*, *H*, *i*, *I*, *l*, *L*, *q*, *Q*, //| *s*, *P*, *f*, *d* (the latter 2 depending on the floating-point support). //| @@ -74,7 +74,6 @@ MP_DEFINE_CONST_FUN_OBJ_1(struct_calcsize_obj, struct_calcsize); //| STATIC mp_obj_t struct_pack(size_t n_args, const mp_obj_t *args) { - // TODO: "The arguments must match the values required by the format exactly." mp_int_t size = MP_OBJ_SMALL_INT_VALUE(struct_calcsize(args[0])); vstr_t vstr; vstr_init_len(&vstr, size); @@ -115,49 +114,67 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_pack_into_obj, 3, MP_OBJ_FUN_ARGS_MAX //| .. function:: unpack(fmt, data) //| //| Unpack from the data according to the format string fmt. The return value -//| is a tuple of the unpacked values. +//| is a tuple of the unpacked values. The buffer size must match the size +//| required by the format. //| -//| .. function:: unpack_from(fmt, data, offset) +STATIC mp_obj_t struct_unpack(size_t n_args, const mp_obj_t *args) { + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ); + byte *p = bufinfo.buf; + byte *end_p = &p[bufinfo.len]; + + // true means check the size must be exactly right. + return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[0] , p, end_p, true)); +} +MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_obj, 2, 3, struct_unpack); + +//| .. function:: unpack_from(fmt, data, offset=0) //| //| Unpack from the data starting at offset according to the format string fmt. //| offset may be negative to count from the end of buffer. The return value is -//| a tuple of the unpacked values. +//| a tuple of the unpacked values. The buffer size must be at least as big +//| as the size required by the form. //| -STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *args) { - // unpack requires that the buffer be exactly the right size. - // unpack_from requires that the buffer be "big enough". - // Since we implement unpack and unpack_from using the same function - // we relax the "exact" requirement, and only implement "big enough". +STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_format, ARG_buffer, ARG_offset }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_format, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_offset, MP_ARG_INT, {.u_int = 0} }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + mp_buffer_info_t bufinfo; - mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ); + mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_READ); byte *p = bufinfo.buf; byte *end_p = &p[bufinfo.len]; - if (n_args > 2) { - mp_int_t offset = mp_obj_get_int(args[2]); - // offset arg provided + mp_int_t offset = args[ARG_offset].u_int; + if (offset < 0) { + // negative offsets are relative to the end of the buffer + offset = bufinfo.len + offset; if (offset < 0) { - // negative offsets are relative to the end of the buffer - offset = bufinfo.len + offset; - if (offset < 0) { - mp_raise_RuntimeError(translate("buffer too small")); - } + mp_raise_RuntimeError(translate("buffer too small")); } - p += offset; } + p += offset; - return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[0] , p, end_p)); + // false means the size doesn't have to be exact. struct.unpack_from() only requires + // that be buffer be big enough. + return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[ARG_format].u_obj, p, end_p, false)); } -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_from_obj, 2, 3, struct_unpack_from); +MP_DEFINE_CONST_FUN_OBJ_KW(struct_unpack_from_obj, 0, struct_unpack_from); STATIC const mp_rom_map_elem_t mp_module_struct_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_struct) }, { MP_ROM_QSTR(MP_QSTR_calcsize), MP_ROM_PTR(&struct_calcsize_obj) }, { MP_ROM_QSTR(MP_QSTR_pack), MP_ROM_PTR(&struct_pack_obj) }, { MP_ROM_QSTR(MP_QSTR_pack_into), MP_ROM_PTR(&struct_pack_into_obj) }, - { MP_ROM_QSTR(MP_QSTR_unpack), MP_ROM_PTR(&struct_unpack_from_obj) }, + { MP_ROM_QSTR(MP_QSTR_unpack), MP_ROM_PTR(&struct_unpack_obj) }, { MP_ROM_QSTR(MP_QSTR_unpack_from), MP_ROM_PTR(&struct_unpack_from_obj) }, }; diff --git a/shared-bindings/struct/__init__.h b/shared-bindings/struct/__init__.h index c4e867aaa..a7e72b11c 100644 --- a/shared-bindings/struct/__init__.h +++ b/shared-bindings/struct/__init__.h @@ -29,6 +29,6 @@ void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args); mp_uint_t shared_modules_struct_calcsize(mp_obj_t fmt_in); -mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p); +mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p, bool exact_size); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_RANDOM___INIT___H diff --git a/shared-module/struct/__init__.c b/shared-module/struct/__init__.c index 78c04f07b..28e7c0c3f 100644 --- a/shared-module/struct/__init__.c +++ b/shared-module/struct/__init__.c @@ -71,45 +71,6 @@ mp_uint_t get_fmt_num(const char **p) { return val; } -void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args) { - const char *fmt = mp_obj_str_get_str(fmt_in); - char fmt_type = get_fmt_type(&fmt); - - size_t i; - for (i = 0; i < n_args;) { - mp_uint_t sz = 1; - if (*fmt == '\0') { - // more arguments given than used by format string; CPython raises struct.error here - mp_raise_RuntimeError(translate("too many arguments provided with the given format")); - } - struct_validate_format(*fmt); - - if (unichar_isdigit(*fmt)) { - sz = get_fmt_num(&fmt); - } - if (p + sz > end_p) { - mp_raise_RuntimeError(translate("buffer too small")); - } - - if (*fmt == 's') { - mp_buffer_info_t bufinfo; - mp_get_buffer_raise(args[i++], &bufinfo, MP_BUFFER_READ); - mp_uint_t to_copy = sz; - if (bufinfo.len < to_copy) { - to_copy = bufinfo.len; - } - memcpy(p, bufinfo.buf, to_copy); - memset(p + to_copy, 0, sz - to_copy); - p += sz; - } else { - while (sz--) { - mp_binary_set_val(fmt_type, *fmt, args[i++], &p); - } - } - fmt++; - } -} - mp_uint_t calcsize_items(const char *fmt) { mp_uint_t cnt = 0; while (*fmt) { @@ -120,7 +81,10 @@ mp_uint_t calcsize_items(const char *fmt) { num = 1; } } - cnt += num; + // Pad bytes are skipped and don't get included in the item count. + if (*fmt != 'x') { + cnt += num; + } fmt++; } return cnt; @@ -155,14 +119,71 @@ mp_uint_t shared_modules_struct_calcsize(mp_obj_t fmt_in) { return size; } +void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args) { + const char *fmt = mp_obj_str_get_str(fmt_in); + char fmt_type = get_fmt_type(&fmt); + const mp_uint_t total_sz = shared_modules_struct_calcsize(fmt_in); + + if (p + total_sz != end_p) { + mp_raise_msg_varg(&mp_type_RuntimeError, translate("unpack requires a buffer of %d bytes"), total_sz); + } + + size_t i; + for (i = 0; i < n_args;) { + mp_uint_t sz = 1; + if (*fmt == '\0') { + // more arguments given than used by format string; CPython raises struct.error here + mp_raise_RuntimeError(translate("too many arguments provided with the given format")); + } + struct_validate_format(*fmt); + + if (unichar_isdigit(*fmt)) { + sz = get_fmt_num(&fmt); + } + + if (*fmt == 's') { + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(args[i++], &bufinfo, MP_BUFFER_READ); + mp_uint_t to_copy = sz; + if (bufinfo.len < to_copy) { + to_copy = bufinfo.len; + } + memcpy(p, bufinfo.buf, to_copy); + memset(p + to_copy, 0, sz - to_copy); + p += sz; + } else { + while (sz--) { + mp_binary_set_val(fmt_type, *fmt, args[i], &p); + // Pad bytes don't have a corresponding argument. + if (*fmt != 'x') { + i++; + } + } + } + fmt++; + } +} -mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p) { +mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p, bool exact_size) { const char *fmt = mp_obj_str_get_str(fmt_in); char fmt_type = get_fmt_type(&fmt); - mp_uint_t num_items = calcsize_items(fmt); + const mp_uint_t num_items = calcsize_items(fmt); + const mp_uint_t total_sz = shared_modules_struct_calcsize(fmt_in); mp_obj_tuple_t *res = MP_OBJ_TO_PTR(mp_obj_new_tuple(num_items, NULL)); + // If exact_size, make sure the buffer is exactly the right size. + // Otherwise just make sure it's big enough. + if (exact_size) { + if (p + total_sz != end_p) { + mp_raise_RuntimeError(translate("buffer size must match format")); + } + } else { + if (p + total_sz > end_p) { + mp_raise_RuntimeError(translate("buffer too small")); + } + } + for (uint i = 0; i < num_items;) { mp_uint_t sz = 1; @@ -171,9 +192,6 @@ mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byt if (unichar_isdigit(*fmt)) { sz = get_fmt_num(&fmt); } - if (p + sz > end_p) { - mp_raise_RuntimeError(translate("buffer too small")); - } mp_obj_t item; if (*fmt == 's') { item = mp_obj_new_bytes(p, sz); @@ -182,7 +200,10 @@ mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byt } else { while (sz--) { item = mp_binary_get_val(fmt_type, *fmt, &p); - res->items[i++] = item; + // Pad bytes are not stored. + if (*fmt != 'x') { + res->items[i++] = item; + } } } fmt++; -- cgit v1.2.3 From 7a09af73ec7f4a11a1404dff6276e09072d06983 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 20 Jan 2019 15:10:09 -0500 Subject: Improve struct compatibility with CPython --- py/binary.c | 7 ++- py/modstruct.c | 16 +++++- shared-bindings/struct/__init__.c | 63 +++++++++++++-------- shared-bindings/struct/__init__.h | 2 +- shared-module/struct/__init__.c | 113 ++++++++++++++++++++++---------------- 5 files changed, 126 insertions(+), 75 deletions(-) diff --git a/py/binary.c b/py/binary.c index ca851c936..9c3a49e8f 100644 --- a/py/binary.c +++ b/py/binary.c @@ -49,7 +49,7 @@ size_t mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) { switch (struct_type) { case '<': case '>': switch (val_type) { - case 'b': case 'B': + case 'b': case 'B': case 'x': size = 1; break; case 'h': case 'H': size = 2; break; @@ -79,7 +79,7 @@ size_t mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) { // particular (or any) ABI. switch (val_type) { case BYTEARRAY_TYPECODE: - case 'b': case 'B': + case 'b': case 'B': case 'x': align = size = 1; break; case 'h': case 'H': align = alignof(short); @@ -126,6 +126,7 @@ mp_obj_t mp_binary_get_val_array(char typecode, void *p, mp_uint_t index) { break; case BYTEARRAY_TYPECODE: case 'B': + case 'x': // value will be discarded val = ((unsigned char*)p)[index]; break; case 'h': @@ -364,6 +365,8 @@ void mp_binary_set_val_array_from_int(char typecode, void *p, mp_uint_t index, m case 'B': ((unsigned char*)p)[index] = val; break; + case 'x': + ((unsigned char*)p)[index] = 0; case 'h': ((short*)p)[index] = val; break; diff --git a/py/modstruct.c b/py/modstruct.c index 3f1b2f8b8..a238d3935 100644 --- a/py/modstruct.c +++ b/py/modstruct.c @@ -97,7 +97,10 @@ STATIC size_t calc_size_items(const char *fmt, size_t *total_sz) { total_cnt += 1; size += cnt; } else { - total_cnt += cnt; + // Pad bytes are skipped and don't get included in the item count. + if (*fmt != 'x') { + total_cnt += cnt; + } mp_uint_t align; size_t sz = mp_binary_get_size(fmt_type, *fmt, &align); while (cnt--) { @@ -166,7 +169,10 @@ STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *args) { } else { while (cnt--) { item = mp_binary_get_val(fmt_type, *fmt, &p); - res->items[i++] = item; + // Pad bytes ('x') are just skipped. + if (*fmt != 'x') { + res->items[i++] = item; + } } } fmt++; @@ -204,7 +210,11 @@ STATIC void struct_pack_into_internal(mp_obj_t fmt_in, byte *p, size_t n_args, c } else { // If we run out of args then we just finish; CPython would raise struct.error while (cnt-- && i < n_args) { - mp_binary_set_val(fmt_type, *fmt, args[i++], &p); + mp_binary_set_val(fmt_type, *fmt, args[i], &p); + // Pad bytes don't have a corresponding argument. + if (*fmt != 'x') { + i++; + } } } fmt++; diff --git a/shared-bindings/struct/__init__.c b/shared-bindings/struct/__init__.c index 093597785..9240a15bb 100644 --- a/shared-bindings/struct/__init__.c +++ b/shared-bindings/struct/__init__.c @@ -51,7 +51,7 @@ //| //| Supported size/byte order prefixes: *@*, *<*, *>*, *!*. //| -//| Supported format codes: *b*, *B*, *h*, *H*, *i*, *I*, *l*, *L*, *q*, *Q*, +//| Supported format codes: *b*, *B*, *x*, *h*, *H*, *i*, *I*, *l*, *L*, *q*, *Q*, //| *s*, *P*, *f*, *d* (the latter 2 depending on the floating-point support). //| @@ -74,7 +74,6 @@ MP_DEFINE_CONST_FUN_OBJ_1(struct_calcsize_obj, struct_calcsize); //| STATIC mp_obj_t struct_pack(size_t n_args, const mp_obj_t *args) { - // TODO: "The arguments must match the values required by the format exactly." mp_int_t size = MP_OBJ_SMALL_INT_VALUE(struct_calcsize(args[0])); vstr_t vstr; vstr_init_len(&vstr, size); @@ -115,49 +114,67 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_pack_into_obj, 3, MP_OBJ_FUN_ARGS_MAX //| .. function:: unpack(fmt, data) //| //| Unpack from the data according to the format string fmt. The return value -//| is a tuple of the unpacked values. +//| is a tuple of the unpacked values. The buffer size must match the size +//| required by the format. //| -//| .. function:: unpack_from(fmt, data, offset) +STATIC mp_obj_t struct_unpack(size_t n_args, const mp_obj_t *args) { + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ); + byte *p = bufinfo.buf; + byte *end_p = &p[bufinfo.len]; + + // true means check the size must be exactly right. + return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[0] , p, end_p, true)); +} +MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_obj, 2, 3, struct_unpack); + +//| .. function:: unpack_from(fmt, data, offset=0) //| //| Unpack from the data starting at offset according to the format string fmt. //| offset may be negative to count from the end of buffer. The return value is -//| a tuple of the unpacked values. +//| a tuple of the unpacked values. The buffer size must be at least as big +//| as the size required by the form. //| -STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *args) { - // unpack requires that the buffer be exactly the right size. - // unpack_from requires that the buffer be "big enough". - // Since we implement unpack and unpack_from using the same function - // we relax the "exact" requirement, and only implement "big enough". +STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_format, ARG_buffer, ARG_offset }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_format, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_offset, MP_ARG_INT, {.u_int = 0} }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + mp_buffer_info_t bufinfo; - mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ); + mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_READ); byte *p = bufinfo.buf; byte *end_p = &p[bufinfo.len]; - if (n_args > 2) { - mp_int_t offset = mp_obj_get_int(args[2]); - // offset arg provided + mp_int_t offset = args[ARG_offset].u_int; + if (offset < 0) { + // negative offsets are relative to the end of the buffer + offset = bufinfo.len + offset; if (offset < 0) { - // negative offsets are relative to the end of the buffer - offset = bufinfo.len + offset; - if (offset < 0) { - mp_raise_RuntimeError(translate("buffer too small")); - } + mp_raise_RuntimeError(translate("buffer too small")); } - p += offset; } + p += offset; - return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[0] , p, end_p)); + // false means the size doesn't have to be exact. struct.unpack_from() only requires + // that be buffer be big enough. + return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[ARG_format].u_obj, p, end_p, false)); } -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_from_obj, 2, 3, struct_unpack_from); +MP_DEFINE_CONST_FUN_OBJ_KW(struct_unpack_from_obj, 0, struct_unpack_from); STATIC const mp_rom_map_elem_t mp_module_struct_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_struct) }, { MP_ROM_QSTR(MP_QSTR_calcsize), MP_ROM_PTR(&struct_calcsize_obj) }, { MP_ROM_QSTR(MP_QSTR_pack), MP_ROM_PTR(&struct_pack_obj) }, { MP_ROM_QSTR(MP_QSTR_pack_into), MP_ROM_PTR(&struct_pack_into_obj) }, - { MP_ROM_QSTR(MP_QSTR_unpack), MP_ROM_PTR(&struct_unpack_from_obj) }, + { MP_ROM_QSTR(MP_QSTR_unpack), MP_ROM_PTR(&struct_unpack_obj) }, { MP_ROM_QSTR(MP_QSTR_unpack_from), MP_ROM_PTR(&struct_unpack_from_obj) }, }; diff --git a/shared-bindings/struct/__init__.h b/shared-bindings/struct/__init__.h index c4e867aaa..a7e72b11c 100644 --- a/shared-bindings/struct/__init__.h +++ b/shared-bindings/struct/__init__.h @@ -29,6 +29,6 @@ void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args); mp_uint_t shared_modules_struct_calcsize(mp_obj_t fmt_in); -mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p); +mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p, bool exact_size); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_RANDOM___INIT___H diff --git a/shared-module/struct/__init__.c b/shared-module/struct/__init__.c index 78c04f07b..28e7c0c3f 100644 --- a/shared-module/struct/__init__.c +++ b/shared-module/struct/__init__.c @@ -71,45 +71,6 @@ mp_uint_t get_fmt_num(const char **p) { return val; } -void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args) { - const char *fmt = mp_obj_str_get_str(fmt_in); - char fmt_type = get_fmt_type(&fmt); - - size_t i; - for (i = 0; i < n_args;) { - mp_uint_t sz = 1; - if (*fmt == '\0') { - // more arguments given than used by format string; CPython raises struct.error here - mp_raise_RuntimeError(translate("too many arguments provided with the given format")); - } - struct_validate_format(*fmt); - - if (unichar_isdigit(*fmt)) { - sz = get_fmt_num(&fmt); - } - if (p + sz > end_p) { - mp_raise_RuntimeError(translate("buffer too small")); - } - - if (*fmt == 's') { - mp_buffer_info_t bufinfo; - mp_get_buffer_raise(args[i++], &bufinfo, MP_BUFFER_READ); - mp_uint_t to_copy = sz; - if (bufinfo.len < to_copy) { - to_copy = bufinfo.len; - } - memcpy(p, bufinfo.buf, to_copy); - memset(p + to_copy, 0, sz - to_copy); - p += sz; - } else { - while (sz--) { - mp_binary_set_val(fmt_type, *fmt, args[i++], &p); - } - } - fmt++; - } -} - mp_uint_t calcsize_items(const char *fmt) { mp_uint_t cnt = 0; while (*fmt) { @@ -120,7 +81,10 @@ mp_uint_t calcsize_items(const char *fmt) { num = 1; } } - cnt += num; + // Pad bytes are skipped and don't get included in the item count. + if (*fmt != 'x') { + cnt += num; + } fmt++; } return cnt; @@ -155,14 +119,71 @@ mp_uint_t shared_modules_struct_calcsize(mp_obj_t fmt_in) { return size; } +void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args) { + const char *fmt = mp_obj_str_get_str(fmt_in); + char fmt_type = get_fmt_type(&fmt); + const mp_uint_t total_sz = shared_modules_struct_calcsize(fmt_in); + + if (p + total_sz != end_p) { + mp_raise_msg_varg(&mp_type_RuntimeError, translate("unpack requires a buffer of %d bytes"), total_sz); + } + + size_t i; + for (i = 0; i < n_args;) { + mp_uint_t sz = 1; + if (*fmt == '\0') { + // more arguments given than used by format string; CPython raises struct.error here + mp_raise_RuntimeError(translate("too many arguments provided with the given format")); + } + struct_validate_format(*fmt); + + if (unichar_isdigit(*fmt)) { + sz = get_fmt_num(&fmt); + } + + if (*fmt == 's') { + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(args[i++], &bufinfo, MP_BUFFER_READ); + mp_uint_t to_copy = sz; + if (bufinfo.len < to_copy) { + to_copy = bufinfo.len; + } + memcpy(p, bufinfo.buf, to_copy); + memset(p + to_copy, 0, sz - to_copy); + p += sz; + } else { + while (sz--) { + mp_binary_set_val(fmt_type, *fmt, args[i], &p); + // Pad bytes don't have a corresponding argument. + if (*fmt != 'x') { + i++; + } + } + } + fmt++; + } +} -mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p) { +mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p, bool exact_size) { const char *fmt = mp_obj_str_get_str(fmt_in); char fmt_type = get_fmt_type(&fmt); - mp_uint_t num_items = calcsize_items(fmt); + const mp_uint_t num_items = calcsize_items(fmt); + const mp_uint_t total_sz = shared_modules_struct_calcsize(fmt_in); mp_obj_tuple_t *res = MP_OBJ_TO_PTR(mp_obj_new_tuple(num_items, NULL)); + // If exact_size, make sure the buffer is exactly the right size. + // Otherwise just make sure it's big enough. + if (exact_size) { + if (p + total_sz != end_p) { + mp_raise_RuntimeError(translate("buffer size must match format")); + } + } else { + if (p + total_sz > end_p) { + mp_raise_RuntimeError(translate("buffer too small")); + } + } + for (uint i = 0; i < num_items;) { mp_uint_t sz = 1; @@ -171,9 +192,6 @@ mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byt if (unichar_isdigit(*fmt)) { sz = get_fmt_num(&fmt); } - if (p + sz > end_p) { - mp_raise_RuntimeError(translate("buffer too small")); - } mp_obj_t item; if (*fmt == 's') { item = mp_obj_new_bytes(p, sz); @@ -182,7 +200,10 @@ mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byt } else { while (sz--) { item = mp_binary_get_val(fmt_type, *fmt, &p); - res->items[i++] = item; + // Pad bytes are not stored. + if (*fmt != 'x') { + res->items[i++] = item; + } } } fmt++; -- cgit v1.2.3 From 5ddc50473a37959fcac5a768013c825b1b1d8d23 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sun, 20 Jan 2019 16:18:34 -0800 Subject: Check for null kw_args --- py/objnamedtuple.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/py/objnamedtuple.c b/py/objnamedtuple.c index 781a1871b..a044fe3ff 100644 --- a/py/objnamedtuple.c +++ b/py/objnamedtuple.c @@ -96,7 +96,10 @@ void namedtuple_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_obj_t namedtuple_make_new(const mp_obj_type_t *type_in, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_namedtuple_type_t *type = (const mp_obj_namedtuple_type_t*)type_in; size_t num_fields = type->n_fields; - size_t n_kw = kw_args->used; + size_t n_kw = 0; + if (kw_args != NULL) { + n_kw = kw_args->used; + } if (n_args + n_kw != num_fields) { if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { mp_arg_error_terse_mismatch(); -- cgit v1.2.3 From 479b28660006a0e4f2febb67a0bd8e517290cd78 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sun, 20 Jan 2019 17:32:43 -0800 Subject: Fix dict_make_new --- py/objdict.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/py/objdict.c b/py/objdict.c index f672ac039..683fcb748 100644 --- a/py/objdict.c +++ b/py/objdict.c @@ -91,7 +91,10 @@ STATIC mp_obj_t dict_make_new(const mp_obj_type_t *type, size_t n_args, const mp } #endif if (n_args > 0 || kw_args != NULL) { - mp_obj_t args2[2] = {dict_out, args[0]}; // args[0] is always valid, even if it's not a positional arg + mp_obj_t args2[2] = {dict_out, NULL}; // args[0] is always valid, even if it's not a positional arg + if (n_args > 0) { + args2[1] = args[0]; + } dict_update(n_args + 1, args2, kw_args); // dict_update will check that n_args + 1 == 1 or 2 } return dict_out; -- cgit v1.2.3 From 3d11dd077c225e6b1c01ff9befd2d6fcc910c553 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sun, 20 Jan 2019 17:33:18 -0800 Subject: Update translations --- locale/ID.po | 74 +++++++++++++----------------- locale/circuitpython.pot | 50 ++++++++------------- locale/de_DE.po | 104 +++++++++++++++++++----------------------- locale/en_US.po | 50 ++++++++------------- locale/es.po | 112 +++++++++++++++++++++------------------------- locale/fil.po | 114 +++++++++++++++++++++-------------------------- locale/fr.po | 112 +++++++++++++++++++++------------------------- locale/it_IT.po | 102 +++++++++++++++++++----------------------- locale/pt_BR.po | 84 +++++++++++++++------------------- 9 files changed, 347 insertions(+), 455 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index ae18a14d0..8547493e9 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-01-18 11:43-0800\n" +"POT-Creation-Date: 2019-01-20 17:33-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,8 +21,8 @@ msgstr "" msgid "invalid I2C peripheral" msgstr "perangkat I2C tidak valid" -#: extmod/machine_i2c.c:340 extmod/machine_i2c.c:354 extmod/machine_i2c.c:368 -#: extmod/machine_i2c.c:392 +#: extmod/machine_i2c.c:338 extmod/machine_i2c.c:352 extmod/machine_i2c.c:366 +#: extmod/machine_i2c.c:390 msgid "I2C operation not supported" msgstr "operasi I2C tidak didukung" @@ -904,7 +904,7 @@ msgstr "[addrinfo error %d]" msgid "function does not take keyword arguments" msgstr "fungsi tidak dapat mengambil argumen keyword" -#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:108 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "fungsi mengambil posisi argumen %d tapi %d yang diberikan" @@ -939,7 +939,7 @@ msgstr "argumen num/types tidak cocok" msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "argumen keyword belum diimplementasi - gunakan args normal" -#: py/bc.c:88 py/objnamedtuple.c:109 +#: py/bc.c:88 py/objnamedtuple.c:112 msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() mengambil posisi argumen %d tapi %d yang diberikan" @@ -951,11 +951,11 @@ msgstr "argumen keyword tidak diharapkan" msgid "keywords must be strings" msgstr "keyword harus berupa string" -#: py/bc.c:206 py/objnamedtuple.c:139 +#: py/bc.c:206 py/objnamedtuple.c:142 msgid "function got multiple values for argument '%q'" msgstr "fungsi mendapatkan nilai ganda untuk argumen '%q'" -#: py/bc.c:218 py/objnamedtuple.c:131 +#: py/bc.c:218 py/objnamedtuple.c:134 msgid "unexpected keyword argument '%q'" msgstr "keyword argumen '%q' tidak diharapkan" @@ -1543,11 +1543,11 @@ msgstr "" msgid "empty" msgstr "" -#: py/objdict.c:312 +#: py/objdict.c:315 msgid "popitem(): dictionary is empty" msgstr "" -#: py/objdict.c:355 +#: py/objdict.c:358 msgid "dict update sequence has wrong length" msgstr "" @@ -2288,29 +2288,21 @@ msgstr "" msgid "color should be an int" msgstr "" -#: shared-bindings/displayio/Display.c:79 -msgid "Width and height kwargs required" +#: shared-bindings/displayio/Display.c:119 +msgid "Too many displays" msgstr "" -#: shared-bindings/displayio/Display.c:93 -msgid "Display limit reached" -msgstr "" - -#: shared-bindings/displayio/Display.c:112 +#: shared-bindings/displayio/Display.c:138 msgid "Must be a Group subclass." msgstr "" -#: shared-bindings/displayio/FourWire.c:69 -msgid "Command and chip_select required" -msgstr "" - -#: shared-bindings/displayio/FourWire.c:91 -#: shared-bindings/displayio/ParallelBus.c:94 -msgid "Display bus limit reached" +#: shared-bindings/displayio/FourWire.c:93 +#: shared-bindings/displayio/ParallelBus.c:98 +msgid "Too many display busses" msgstr "" -#: shared-bindings/displayio/FourWire.c:104 -#: shared-bindings/displayio/ParallelBus.c:106 +#: shared-bindings/displayio/FourWire.c:106 +#: shared-bindings/displayio/ParallelBus.c:110 msgid "displayio is a work in progress" msgstr "" @@ -2339,10 +2331,6 @@ msgstr "" msgid "palette_index should be an int" msgstr "" -#: shared-bindings/displayio/ParallelBus.c:75 -msgid "Data0, command, chip_select, write and read required" -msgstr "" - #: shared-bindings/displayio/Shape.c:92 msgid "start_x should be an int" msgstr "" @@ -2682,11 +2670,11 @@ msgstr "" msgid "No default I2C bus" msgstr "Tidak ada standar bus I2C" -#: supervisor/shared/board_busses.c:89 +#: supervisor/shared/board_busses.c:91 msgid "No default SPI bus" msgstr "Tidak ada standar bus SPI" -#: supervisor/shared/board_busses.c:116 +#: supervisor/shared/board_busses.c:118 msgid "No default UART bus" msgstr "Tidak ada standar bus UART" @@ -2751,24 +2739,24 @@ msgid "" "exit safe mode.\n" msgstr "" -#~ msgid "Invalid UUID string length" -#~ msgstr "Panjang string UUID tidak valid" - #~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "" -#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut " -#~ "CIRCUITPY).\n" +#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n" + +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parameter UUID tidak valid" #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" #~ msgstr "" #~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n" -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parameter UUID tidak valid" - #~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" #~ msgstr "" -#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n" +#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut " +#~ "CIRCUITPY).\n" + +#~ msgid "Invalid UUID string length" +#~ msgstr "Panjang string UUID tidak valid" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index e52ee4df4..0a9e67685 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-01-18 11:43-0800\n" +"POT-Creation-Date: 2019-01-20 17:33-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,8 +21,8 @@ msgstr "" msgid "invalid I2C peripheral" msgstr "" -#: extmod/machine_i2c.c:340 extmod/machine_i2c.c:354 extmod/machine_i2c.c:368 -#: extmod/machine_i2c.c:392 +#: extmod/machine_i2c.c:338 extmod/machine_i2c.c:352 extmod/machine_i2c.c:366 +#: extmod/machine_i2c.c:390 msgid "I2C operation not supported" msgstr "" @@ -877,7 +877,7 @@ msgstr "" msgid "function does not take keyword arguments" msgstr "" -#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:108 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -912,7 +912,7 @@ msgstr "" msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -#: py/bc.c:88 py/objnamedtuple.c:109 +#: py/bc.c:88 py/objnamedtuple.c:112 msgid "%q() takes %d positional arguments but %d were given" msgstr "" @@ -924,11 +924,11 @@ msgstr "" msgid "keywords must be strings" msgstr "" -#: py/bc.c:206 py/objnamedtuple.c:139 +#: py/bc.c:206 py/objnamedtuple.c:142 msgid "function got multiple values for argument '%q'" msgstr "" -#: py/bc.c:218 py/objnamedtuple.c:131 +#: py/bc.c:218 py/objnamedtuple.c:134 msgid "unexpected keyword argument '%q'" msgstr "" @@ -1510,11 +1510,11 @@ msgstr "" msgid "empty" msgstr "" -#: py/objdict.c:312 +#: py/objdict.c:315 msgid "popitem(): dictionary is empty" msgstr "" -#: py/objdict.c:355 +#: py/objdict.c:358 msgid "dict update sequence has wrong length" msgstr "" @@ -2252,29 +2252,21 @@ msgstr "" msgid "color should be an int" msgstr "" -#: shared-bindings/displayio/Display.c:79 -msgid "Width and height kwargs required" +#: shared-bindings/displayio/Display.c:119 +msgid "Too many displays" msgstr "" -#: shared-bindings/displayio/Display.c:93 -msgid "Display limit reached" -msgstr "" - -#: shared-bindings/displayio/Display.c:112 +#: shared-bindings/displayio/Display.c:138 msgid "Must be a Group subclass." msgstr "" -#: shared-bindings/displayio/FourWire.c:69 -msgid "Command and chip_select required" -msgstr "" - -#: shared-bindings/displayio/FourWire.c:91 -#: shared-bindings/displayio/ParallelBus.c:94 -msgid "Display bus limit reached" +#: shared-bindings/displayio/FourWire.c:93 +#: shared-bindings/displayio/ParallelBus.c:98 +msgid "Too many display busses" msgstr "" -#: shared-bindings/displayio/FourWire.c:104 -#: shared-bindings/displayio/ParallelBus.c:106 +#: shared-bindings/displayio/FourWire.c:106 +#: shared-bindings/displayio/ParallelBus.c:110 msgid "displayio is a work in progress" msgstr "" @@ -2303,10 +2295,6 @@ msgstr "" msgid "palette_index should be an int" msgstr "" -#: shared-bindings/displayio/ParallelBus.c:75 -msgid "Data0, command, chip_select, write and read required" -msgstr "" - #: shared-bindings/displayio/Shape.c:92 msgid "start_x should be an int" msgstr "" @@ -2645,11 +2633,11 @@ msgstr "" msgid "No default I2C bus" msgstr "" -#: supervisor/shared/board_busses.c:89 +#: supervisor/shared/board_busses.c:91 msgid "No default SPI bus" msgstr "" -#: supervisor/shared/board_busses.c:116 +#: supervisor/shared/board_busses.c:118 msgid "No default UART bus" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index a6d7b6103..170104e9f 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-01-18 11:43-0800\n" +"POT-Creation-Date: 2019-01-20 17:33-0800\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: Sebastian Plamauer\n" "Language-Team: \n" @@ -21,8 +21,8 @@ msgstr "" msgid "invalid I2C peripheral" msgstr "ungültige I2C Schnittstelle" -#: extmod/machine_i2c.c:340 extmod/machine_i2c.c:354 extmod/machine_i2c.c:368 -#: extmod/machine_i2c.c:392 +#: extmod/machine_i2c.c:338 extmod/machine_i2c.c:352 extmod/machine_i2c.c:366 +#: extmod/machine_i2c.c:390 msgid "I2C operation not supported" msgstr "I2C-operation nicht unterstützt" @@ -904,7 +904,7 @@ msgstr "" msgid "function does not take keyword arguments" msgstr "" -#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:108 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -939,7 +939,7 @@ msgstr "" msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -#: py/bc.c:88 py/objnamedtuple.c:109 +#: py/bc.c:88 py/objnamedtuple.c:112 msgid "%q() takes %d positional arguments but %d were given" msgstr "" @@ -951,11 +951,11 @@ msgstr "" msgid "keywords must be strings" msgstr "" -#: py/bc.c:206 py/objnamedtuple.c:139 +#: py/bc.c:206 py/objnamedtuple.c:142 msgid "function got multiple values for argument '%q'" msgstr "" -#: py/bc.c:218 py/objnamedtuple.c:131 +#: py/bc.c:218 py/objnamedtuple.c:134 msgid "unexpected keyword argument '%q'" msgstr "" @@ -1539,11 +1539,11 @@ msgstr "" msgid "empty" msgstr "" -#: py/objdict.c:312 +#: py/objdict.c:315 msgid "popitem(): dictionary is empty" msgstr "" -#: py/objdict.c:355 +#: py/objdict.c:358 msgid "dict update sequence has wrong length" msgstr "" @@ -2288,29 +2288,21 @@ msgstr "" msgid "color should be an int" msgstr "" -#: shared-bindings/displayio/Display.c:79 -msgid "Width and height kwargs required" +#: shared-bindings/displayio/Display.c:119 +msgid "Too many displays" msgstr "" -#: shared-bindings/displayio/Display.c:93 -msgid "Display limit reached" -msgstr "" - -#: shared-bindings/displayio/Display.c:112 +#: shared-bindings/displayio/Display.c:138 msgid "Must be a Group subclass." msgstr "" -#: shared-bindings/displayio/FourWire.c:69 -msgid "Command and chip_select required" -msgstr "" - -#: shared-bindings/displayio/FourWire.c:91 -#: shared-bindings/displayio/ParallelBus.c:94 -msgid "Display bus limit reached" +#: shared-bindings/displayio/FourWire.c:93 +#: shared-bindings/displayio/ParallelBus.c:98 +msgid "Too many display busses" msgstr "" -#: shared-bindings/displayio/FourWire.c:104 -#: shared-bindings/displayio/ParallelBus.c:106 +#: shared-bindings/displayio/FourWire.c:106 +#: shared-bindings/displayio/ParallelBus.c:110 msgid "displayio is a work in progress" msgstr "" @@ -2339,10 +2331,6 @@ msgstr "" msgid "palette_index should be an int" msgstr "" -#: shared-bindings/displayio/ParallelBus.c:75 -msgid "Data0, command, chip_select, write and read required" -msgstr "" - #: shared-bindings/displayio/Shape.c:92 msgid "start_x should be an int" msgstr "" @@ -2684,11 +2672,11 @@ msgstr "USB Fehler" msgid "No default I2C bus" msgstr "Kein Standard I2C Bus" -#: supervisor/shared/board_busses.c:89 +#: supervisor/shared/board_busses.c:91 msgid "No default SPI bus" msgstr "Kein Standard SPI Bus" -#: supervisor/shared/board_busses.c:116 +#: supervisor/shared/board_busses.c:118 msgid "No default UART bus" msgstr "Kein Standard UART Bus" @@ -2754,34 +2742,19 @@ msgstr "" #~ msgid "Invalid UUID string length" #~ msgstr "Ungültige UUID-Stringlänge" -#~ msgid "Invalid UUID parameter" -#~ msgstr "Ungültiger UUID-Parameter" - -#~ msgid "Can not add Service." -#~ msgstr "Kann den Dienst nicht hinzufügen." - -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Kann GAP Parameter nicht anwenden." - -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" - -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "CircuitPython ist abgestürzt. Ups!\n" - -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." - -#~ msgid "Invalid Service type" -#~ msgstr "Ungültiger Diensttyp" +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Kann UUID in das advertisement packet kodieren." #~ msgid "" #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "" #~ "Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n" -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen." +#~ msgid "Invalid UUID parameter" +#~ msgstr "Ungültiger UUID-Parameter" + +#~ msgid "Invalid Service type" +#~ msgstr "Ungültiger Diensttyp" #~ msgid "" #~ "enough power for the whole circuit and press reset (after ejecting " @@ -2790,11 +2763,26 @@ msgstr "" #~ "genug Strom für den ganzen Schaltkreis liefert und drücke reset (nach dem " #~ "sicheren Auswerfen von CIRCUITPY.)\n" -#~ msgid "Can not add Characteristic." -#~ msgstr "Kann das Merkmal nicht hinzufügen." - -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Kann UUID in das advertisement packet kodieren." +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." #~ msgid "Can not query for the device address." #~ msgstr "Kann nicht nach der Geräteadresse suchen." + +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen." + +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Kann GAP Parameter nicht anwenden." + +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" + +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "CircuitPython ist abgestürzt. Ups!\n" + +#~ msgid "Can not add Service." +#~ msgstr "Kann den Dienst nicht hinzufügen." + +#~ msgid "Can not add Characteristic." +#~ msgstr "Kann das Merkmal nicht hinzufügen." diff --git a/locale/en_US.po b/locale/en_US.po index 1fd9cd377..acd5f54cb 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-01-18 11:43-0800\n" +"POT-Creation-Date: 2019-01-20 17:33-0800\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -21,8 +21,8 @@ msgstr "" msgid "invalid I2C peripheral" msgstr "" -#: extmod/machine_i2c.c:340 extmod/machine_i2c.c:354 extmod/machine_i2c.c:368 -#: extmod/machine_i2c.c:392 +#: extmod/machine_i2c.c:338 extmod/machine_i2c.c:352 extmod/machine_i2c.c:366 +#: extmod/machine_i2c.c:390 msgid "I2C operation not supported" msgstr "" @@ -877,7 +877,7 @@ msgstr "" msgid "function does not take keyword arguments" msgstr "" -#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:108 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -912,7 +912,7 @@ msgstr "" msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -#: py/bc.c:88 py/objnamedtuple.c:109 +#: py/bc.c:88 py/objnamedtuple.c:112 msgid "%q() takes %d positional arguments but %d were given" msgstr "" @@ -924,11 +924,11 @@ msgstr "" msgid "keywords must be strings" msgstr "" -#: py/bc.c:206 py/objnamedtuple.c:139 +#: py/bc.c:206 py/objnamedtuple.c:142 msgid "function got multiple values for argument '%q'" msgstr "" -#: py/bc.c:218 py/objnamedtuple.c:131 +#: py/bc.c:218 py/objnamedtuple.c:134 msgid "unexpected keyword argument '%q'" msgstr "" @@ -1510,11 +1510,11 @@ msgstr "" msgid "empty" msgstr "" -#: py/objdict.c:312 +#: py/objdict.c:315 msgid "popitem(): dictionary is empty" msgstr "" -#: py/objdict.c:355 +#: py/objdict.c:358 msgid "dict update sequence has wrong length" msgstr "" @@ -2252,29 +2252,21 @@ msgstr "" msgid "color should be an int" msgstr "" -#: shared-bindings/displayio/Display.c:79 -msgid "Width and height kwargs required" +#: shared-bindings/displayio/Display.c:119 +msgid "Too many displays" msgstr "" -#: shared-bindings/displayio/Display.c:93 -msgid "Display limit reached" -msgstr "" - -#: shared-bindings/displayio/Display.c:112 +#: shared-bindings/displayio/Display.c:138 msgid "Must be a Group subclass." msgstr "" -#: shared-bindings/displayio/FourWire.c:69 -msgid "Command and chip_select required" -msgstr "" - -#: shared-bindings/displayio/FourWire.c:91 -#: shared-bindings/displayio/ParallelBus.c:94 -msgid "Display bus limit reached" +#: shared-bindings/displayio/FourWire.c:93 +#: shared-bindings/displayio/ParallelBus.c:98 +msgid "Too many display busses" msgstr "" -#: shared-bindings/displayio/FourWire.c:104 -#: shared-bindings/displayio/ParallelBus.c:106 +#: shared-bindings/displayio/FourWire.c:106 +#: shared-bindings/displayio/ParallelBus.c:110 msgid "displayio is a work in progress" msgstr "" @@ -2303,10 +2295,6 @@ msgstr "" msgid "palette_index should be an int" msgstr "" -#: shared-bindings/displayio/ParallelBus.c:75 -msgid "Data0, command, chip_select, write and read required" -msgstr "" - #: shared-bindings/displayio/Shape.c:92 msgid "start_x should be an int" msgstr "" @@ -2645,11 +2633,11 @@ msgstr "" msgid "No default I2C bus" msgstr "" -#: supervisor/shared/board_busses.c:89 +#: supervisor/shared/board_busses.c:91 msgid "No default SPI bus" msgstr "" -#: supervisor/shared/board_busses.c:116 +#: supervisor/shared/board_busses.c:118 msgid "No default UART bus" msgstr "" diff --git a/locale/es.po b/locale/es.po index 8dd8ef920..799fc68bf 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-01-18 11:43-0800\n" +"POT-Creation-Date: 2019-01-20 17:33-0800\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -22,8 +22,8 @@ msgstr "" msgid "invalid I2C peripheral" msgstr "periférico I2C inválido" -#: extmod/machine_i2c.c:340 extmod/machine_i2c.c:354 extmod/machine_i2c.c:368 -#: extmod/machine_i2c.c:392 +#: extmod/machine_i2c.c:338 extmod/machine_i2c.c:352 extmod/machine_i2c.c:366 +#: extmod/machine_i2c.c:390 msgid "I2C operation not supported" msgstr "operación I2C no soportada" @@ -901,7 +901,7 @@ msgstr "[addrinfo error %d]" msgid "function does not take keyword arguments" msgstr "la función no tiene argumentos por palabra clave" -#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:108 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "la función toma %d argumentos posicionales pero le fueron dados %d" @@ -938,7 +938,7 @@ msgstr "" "argumento(s) por palabra clave aún no implementados - usa argumentos " "normales en su lugar" -#: py/bc.c:88 py/objnamedtuple.c:109 +#: py/bc.c:88 py/objnamedtuple.c:112 msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() toma %d argumentos posicionales pero %d fueron dados" @@ -950,11 +950,11 @@ msgstr "argumento por palabra clave inesperado" msgid "keywords must be strings" msgstr "palabras clave deben ser strings" -#: py/bc.c:206 py/objnamedtuple.c:139 +#: py/bc.c:206 py/objnamedtuple.c:142 msgid "function got multiple values for argument '%q'" msgstr "la función tiene múltiples valores para el argumento '%q'" -#: py/bc.c:218 py/objnamedtuple.c:131 +#: py/bc.c:218 py/objnamedtuple.c:134 msgid "unexpected keyword argument '%q'" msgstr "argumento por palabra clave inesperado '%q'" @@ -1546,11 +1546,11 @@ msgstr "lleno" msgid "empty" msgstr "vacío" -#: py/objdict.c:312 +#: py/objdict.c:315 msgid "popitem(): dictionary is empty" msgstr "popitem(): diccionario vacío" -#: py/objdict.c:355 +#: py/objdict.c:358 msgid "dict update sequence has wrong length" msgstr "la secuencia de actualizacion del dict tiene una longitud incorrecta" @@ -2306,29 +2306,21 @@ msgstr "row data debe ser un buffer" msgid "color should be an int" msgstr "color deberia ser un int" -#: shared-bindings/displayio/Display.c:79 -msgid "Width and height kwargs required" +#: shared-bindings/displayio/Display.c:119 +msgid "Too many displays" msgstr "" -#: shared-bindings/displayio/Display.c:93 -msgid "Display limit reached" -msgstr "" - -#: shared-bindings/displayio/Display.c:112 +#: shared-bindings/displayio/Display.c:138 msgid "Must be a Group subclass." msgstr "" -#: shared-bindings/displayio/FourWire.c:69 -msgid "Command and chip_select required" +#: shared-bindings/displayio/FourWire.c:93 +#: shared-bindings/displayio/ParallelBus.c:98 +msgid "Too many display busses" msgstr "" -#: shared-bindings/displayio/FourWire.c:91 -#: shared-bindings/displayio/ParallelBus.c:94 -msgid "Display bus limit reached" -msgstr "" - -#: shared-bindings/displayio/FourWire.c:104 -#: shared-bindings/displayio/ParallelBus.c:106 +#: shared-bindings/displayio/FourWire.c:106 +#: shared-bindings/displayio/ParallelBus.c:110 msgid "displayio is a work in progress" msgstr "displayio todavia esta en desarrollo" @@ -2357,10 +2349,6 @@ msgstr "color buffer deber ser un buffer o un int" msgid "palette_index should be an int" msgstr "palette_index deberia ser un int" -#: shared-bindings/displayio/ParallelBus.c:75 -msgid "Data0, command, chip_select, write and read required" -msgstr "" - #: shared-bindings/displayio/Shape.c:92 #, fuzzy msgid "start_x should be an int" @@ -2706,11 +2694,11 @@ msgstr "Error USB" msgid "No default I2C bus" msgstr "Sin bus I2C por defecto" -#: supervisor/shared/board_busses.c:89 +#: supervisor/shared/board_busses.c:91 msgid "No default SPI bus" msgstr "Sin bus SPI por defecto" -#: supervisor/shared/board_busses.c:116 +#: supervisor/shared/board_busses.c:118 msgid "No default UART bus" msgstr "Sin bus UART por defecto" @@ -2783,29 +2771,31 @@ msgstr "" "El botón reset fue presionado mientras arrancaba CircuitPython. Presiona " "otra vez para salir del modo seguro.\n" -#~ msgid "Wrong address length" -#~ msgstr "Longitud de address erronea" - #~ msgid "Invalid UUID string length" #~ msgstr "Longitud de string UUID inválida" #~ msgid "Invalid UUID parameter" #~ msgstr "Parámetro UUID inválido" -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "No se pueden aplicar los parámetros GAP." +#~ msgid "Can not query for the device address." +#~ msgstr "No se puede consultar la dirección del dispositivo." + +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n" #~ msgid "Cannot set PPCP parameters." #~ msgstr "No se pueden establecer los parámetros PPCP." -#~ msgid "Invalid Service type" -#~ msgstr "Tipo de Servicio inválido" - -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "suficiente poder para todo el circuito y presiona reset (después de " +#~ "expulsar CIRCUITPY).\n" -#~ msgid "Wrong number of bytes provided" -#~ msgstr "Numero erroneo de bytes dados" +#~ msgid "Can not apply device name in the stack." +#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." #, fuzzy #~ msgid "" @@ -2814,31 +2804,29 @@ msgstr "" #~ "Por favor registra un issue en la siguiente URL con el contenidos de tu " #~ "unidad de almacenamiento CIRCUITPY:\n" -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "suficiente poder para todo el circuito y presiona reset (después de " -#~ "expulsar CIRCUITPY).\n" +#~ msgid "Wrong address length" +#~ msgstr "Longitud de address erronea" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n" +#~ msgid "Wrong number of bytes provided" +#~ msgstr "Numero erroneo de bytes dados" -#~ msgid "Baud rate too high for this SPI peripheral" -#~ msgstr "Baud rate demasiado alto para este periférico SPI" +#~ msgid "Can not add Service." +#~ msgstr "No se puede agregar el Servicio." + +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "No se pueden aplicar los parámetros GAP." #~ msgid "Can not encode UUID, to check length." #~ msgstr "No se puede codificar el UUID, para revisar la longitud." -#~ msgid "Can not apply device name in the stack." -#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." - -#~ msgid "Can not query for the device address." -#~ msgstr "No se puede consultar la dirección del dispositivo." - -#~ msgid "Can not add Service." -#~ msgstr "No se puede agregar el Servicio." +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." #~ msgid "Can not apply advertisement data. status: 0x%02x" #~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x" + +#~ msgid "Invalid Service type" +#~ msgstr "Tipo de Servicio inválido" + +#~ msgid "Baud rate too high for this SPI peripheral" +#~ msgstr "Baud rate demasiado alto para este periférico SPI" diff --git a/locale/fil.po b/locale/fil.po index 59c415066..6b3e408c7 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-01-18 11:43-0800\n" +"POT-Creation-Date: 2019-01-20 17:33-0800\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -21,8 +21,8 @@ msgstr "" msgid "invalid I2C peripheral" msgstr "maling I2C peripheral" -#: extmod/machine_i2c.c:340 extmod/machine_i2c.c:354 extmod/machine_i2c.c:368 -#: extmod/machine_i2c.c:392 +#: extmod/machine_i2c.c:338 extmod/machine_i2c.c:352 extmod/machine_i2c.c:366 +#: extmod/machine_i2c.c:390 msgid "I2C operation not supported" msgstr "Hindi supportado ang operasyong I2C" @@ -902,7 +902,7 @@ msgstr "[addrinfo error %d]" msgid "function does not take keyword arguments" msgstr "ang function ay hindi kumukuha ng mga argumento ng keyword" -#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:108 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -940,7 +940,7 @@ msgstr "" "kindi pa ipinapatupad ang (mga) argument(s) ng keyword - gumamit ng normal " "args" -#: py/bc.c:88 py/objnamedtuple.c:109 +#: py/bc.c:88 py/objnamedtuple.c:112 msgid "%q() takes %d positional arguments but %d were given" msgstr "" "Ang %q() ay kumukuha ng %d positional arguments pero %d lang ang binigay" @@ -953,11 +953,11 @@ msgstr "hindi inaasahang argumento ng keyword" msgid "keywords must be strings" msgstr "ang keywords dapat strings" -#: py/bc.c:206 py/objnamedtuple.c:139 +#: py/bc.c:206 py/objnamedtuple.c:142 msgid "function got multiple values for argument '%q'" msgstr "ang function ay nakakuha ng maraming values para sa argument '%q'" -#: py/bc.c:218 py/objnamedtuple.c:131 +#: py/bc.c:218 py/objnamedtuple.c:134 msgid "unexpected keyword argument '%q'" msgstr "hindi inaasahang argumento ng keyword na '%q'" @@ -1548,11 +1548,11 @@ msgstr "puno" msgid "empty" msgstr "walang laman" -#: py/objdict.c:312 +#: py/objdict.c:315 msgid "popitem(): dictionary is empty" msgstr "popitem(): dictionary ay walang laman" -#: py/objdict.c:355 +#: py/objdict.c:358 msgid "dict update sequence has wrong length" msgstr "may mali sa haba ng dict update sequence" @@ -2311,29 +2311,21 @@ msgstr "row data ay dapat na buffer" msgid "color should be an int" msgstr "color ay dapat na int" -#: shared-bindings/displayio/Display.c:79 -msgid "Width and height kwargs required" +#: shared-bindings/displayio/Display.c:119 +msgid "Too many displays" msgstr "" -#: shared-bindings/displayio/Display.c:93 -msgid "Display limit reached" -msgstr "" - -#: shared-bindings/displayio/Display.c:112 +#: shared-bindings/displayio/Display.c:138 msgid "Must be a Group subclass." msgstr "" -#: shared-bindings/displayio/FourWire.c:69 -msgid "Command and chip_select required" +#: shared-bindings/displayio/FourWire.c:93 +#: shared-bindings/displayio/ParallelBus.c:98 +msgid "Too many display busses" msgstr "" -#: shared-bindings/displayio/FourWire.c:91 -#: shared-bindings/displayio/ParallelBus.c:94 -msgid "Display bus limit reached" -msgstr "" - -#: shared-bindings/displayio/FourWire.c:104 -#: shared-bindings/displayio/ParallelBus.c:106 +#: shared-bindings/displayio/FourWire.c:106 +#: shared-bindings/displayio/ParallelBus.c:110 msgid "displayio is a work in progress" msgstr "displayio ay nasa gitna ng konstruksiyon" @@ -2362,10 +2354,6 @@ msgstr "color buffer ay dapat buffer or int" msgid "palette_index should be an int" msgstr "palette_index ay dapat na int" -#: shared-bindings/displayio/ParallelBus.c:75 -msgid "Data0, command, chip_select, write and read required" -msgstr "" - #: shared-bindings/displayio/Shape.c:92 #, fuzzy msgid "start_x should be an int" @@ -2712,11 +2700,11 @@ msgstr "May pagkakamali ang USB" msgid "No default I2C bus" msgstr "Walang default na I2C bus" -#: supervisor/shared/board_busses.c:89 +#: supervisor/shared/board_busses.c:91 msgid "No default SPI bus" msgstr "Walang default SPI bus" -#: supervisor/shared/board_busses.c:116 +#: supervisor/shared/board_busses.c:118 msgid "No default UART bus" msgstr "Walang default UART bus" @@ -2789,29 +2777,31 @@ msgstr "" "Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin " "ulit para lumabas sa safe mode.\n" -#~ msgid "Wrong address length" -#~ msgstr "Mali ang address length" - #~ msgid "Invalid UUID string length" #~ msgstr "Mali ang UUID string length" #~ msgid "Invalid UUID parameter" #~ msgstr "Mali ang UUID parameter" -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Hindi ma-apply ang GAP parameters." +#~ msgid "Can not query for the device address." +#~ msgstr "Hindi maaaring mag-query para sa address ng device." + +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n" #~ msgid "Cannot set PPCP parameters." #~ msgstr "Hindi ma-set ang PPCP parameters." -#~ msgid "Invalid Service type" -#~ msgstr "Mali ang tipo ng serbisyo" - -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Maaring i-encode ang UUID sa advertisement packet." +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang " +#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n" -#~ msgid "Wrong number of bytes provided" -#~ msgstr "Mali ang bilang ng bytes" +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." #~ msgid "" #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" @@ -2819,32 +2809,30 @@ msgstr "" #~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY " #~ "drive:\n" -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang " -#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n" +#~ msgid "Wrong address length" +#~ msgstr "Mali ang address length" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n" +#~ msgid "Wrong number of bytes provided" +#~ msgstr "Mali ang bilang ng bytes" -#, fuzzy -#~ msgid "palette must be displayio.Palette" -#~ msgstr "ang palette ay dapat 32 bytes ang haba" +#~ msgid "Can not add Service." +#~ msgstr "Hindi maidaragdag ang serbisyo." + +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Hindi ma-apply ang GAP parameters." #~ msgid "Can not encode UUID, to check length." #~ msgstr "Hindi ma-encode UUID, para suriin ang haba." -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." - -#~ msgid "Can not query for the device address." -#~ msgstr "Hindi maaaring mag-query para sa address ng device." - -#~ msgid "Can not add Service." -#~ msgstr "Hindi maidaragdag ang serbisyo." +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Maaring i-encode ang UUID sa advertisement packet." #~ msgid "Can not apply advertisement data. status: 0x%02x" #~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x" + +#~ msgid "Invalid Service type" +#~ msgstr "Mali ang tipo ng serbisyo" + +#, fuzzy +#~ msgid "palette must be displayio.Palette" +#~ msgstr "ang palette ay dapat 32 bytes ang haba" diff --git a/locale/fr.po b/locale/fr.po index 4ef9d9f87..236ce4345 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-18 11:43-0800\n" +"POT-Creation-Date: 2019-01-20 17:33-0800\n" "PO-Revision-Date: 2018-12-23 20:05+0100\n" "Last-Translator: Pierrick Couturier \n" "Language-Team: fr\n" @@ -20,8 +20,8 @@ msgstr "" msgid "invalid I2C peripheral" msgstr "périphérique I2C invalide" -#: extmod/machine_i2c.c:340 extmod/machine_i2c.c:354 extmod/machine_i2c.c:368 -#: extmod/machine_i2c.c:392 +#: extmod/machine_i2c.c:338 extmod/machine_i2c.c:352 extmod/machine_i2c.c:366 +#: extmod/machine_i2c.c:390 msgid "I2C operation not supported" msgstr "opération sur I2C non supportée" @@ -904,7 +904,7 @@ msgstr "" msgid "function does not take keyword arguments" msgstr "la fonction ne prend pas d'arguments nommés" -#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:108 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "la fonction prend %d argument(s) mais %d ont été donné(s)" @@ -940,7 +940,7 @@ msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" "argument(s) nommé(s) pas encore implémenté - utilisez les arguments normaux" -#: py/bc.c:88 py/objnamedtuple.c:109 +#: py/bc.c:88 py/objnamedtuple.c:112 msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() prend %d arguments mais %d ont été donnés" @@ -952,11 +952,11 @@ msgstr "argument nommé imprévu" msgid "keywords must be strings" msgstr "les noms doivent être des chaînes de caractère" -#: py/bc.c:206 py/objnamedtuple.c:139 +#: py/bc.c:206 py/objnamedtuple.c:142 msgid "function got multiple values for argument '%q'" msgstr "la fonction a reçu plusieurs valeurs pour l'argument '%q'" -#: py/bc.c:218 py/objnamedtuple.c:131 +#: py/bc.c:218 py/objnamedtuple.c:134 msgid "unexpected keyword argument '%q'" msgstr "argument nommé '%q' imprévu" @@ -1546,11 +1546,11 @@ msgstr "plein" msgid "empty" msgstr "vide" -#: py/objdict.c:312 +#: py/objdict.c:315 msgid "popitem(): dictionary is empty" msgstr "popitem(): dictionnaire vide" -#: py/objdict.c:355 +#: py/objdict.c:358 msgid "dict update sequence has wrong length" msgstr "la séquence de mise à jour de dict a une mauvaise longueur" @@ -2318,29 +2318,21 @@ msgstr "les données de ligne doivent être un tampon" msgid "color should be an int" msgstr "la couleur doit être un entier (int)" -#: shared-bindings/displayio/Display.c:79 -msgid "Width and height kwargs required" +#: shared-bindings/displayio/Display.c:119 +msgid "Too many displays" msgstr "" -#: shared-bindings/displayio/Display.c:93 -msgid "Display limit reached" -msgstr "" - -#: shared-bindings/displayio/Display.c:112 +#: shared-bindings/displayio/Display.c:138 msgid "Must be a Group subclass." msgstr "" -#: shared-bindings/displayio/FourWire.c:69 -msgid "Command and chip_select required" +#: shared-bindings/displayio/FourWire.c:93 +#: shared-bindings/displayio/ParallelBus.c:98 +msgid "Too many display busses" msgstr "" -#: shared-bindings/displayio/FourWire.c:91 -#: shared-bindings/displayio/ParallelBus.c:94 -msgid "Display bus limit reached" -msgstr "" - -#: shared-bindings/displayio/FourWire.c:104 -#: shared-bindings/displayio/ParallelBus.c:106 +#: shared-bindings/displayio/FourWire.c:106 +#: shared-bindings/displayio/ParallelBus.c:110 msgid "displayio is a work in progress" msgstr "displayio est en cours de développement" @@ -2375,10 +2367,6 @@ msgstr "le tampon de couleur doit être un tampon ou un entier" msgid "palette_index should be an int" msgstr "palette_index devrait être un entier (int)'" -#: shared-bindings/displayio/ParallelBus.c:75 -msgid "Data0, command, chip_select, write and read required" -msgstr "" - #: shared-bindings/displayio/Shape.c:92 #, fuzzy msgid "start_x should be an int" @@ -2736,11 +2724,11 @@ msgstr "Erreur USB" msgid "No default I2C bus" msgstr "Pas de bus I2C par défaut" -#: supervisor/shared/board_busses.c:89 +#: supervisor/shared/board_busses.c:91 msgid "No default SPI bus" msgstr "Pas de bus SPI par défaut" -#: supervisor/shared/board_busses.c:116 +#: supervisor/shared/board_busses.c:118 msgid "No default UART bus" msgstr "Pas de bus UART par défaut" @@ -2818,44 +2806,47 @@ msgstr "" "Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. " "Appuyer denouveau pour quitter de le mode sans-échec.\n" -#~ msgid "Wrong address length" -#~ msgstr "Mauvaise longueur d'adresse" - #~ msgid "Invalid UUID string length" #~ msgstr "Longeur de chaîne UUID invalide" #~ msgid "Invalid UUID parameter" #~ msgstr "Paramètre UUID invalide" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n" +#, fuzzy +#~ msgid "palette must be displayio.Palette" +#~ msgstr "la palette doit être une displayio.Palette" + +#, fuzzy +#~ msgid "value_size must be power of two" +#~ msgstr "value_size doit être une puissance de 2" #~ msgid "Cannot apply GAP parameters." #~ msgstr "Impossible d'appliquer les paramètres GAP" -#~ msgid "Can not add Characteristic." -#~ msgstr "Impossible d'ajouter la Characteristic." - -#~ msgid "Can not add Service." -#~ msgstr "Impossible d'ajouter le Service" +#~ msgid "Invalid Service type" +#~ msgstr "Type de service invalide" -#, fuzzy -#~ msgid "Wrong number of bytes provided" -#~ msgstr "mauvais nombre d'octets fourni'" +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n" #~ msgid "Can not encode UUID, to check length." #~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur." -#~ msgid "Invalid Service type" -#~ msgstr "Type de service invalide" +#~ msgid "Wrong address length" +#~ msgstr "Mauvaise longueur d'adresse" #, fuzzy -#~ msgid "value_size must be power of two" -#~ msgstr "value_size doit être une puissance de 2" +#~ msgid "Wrong number of bytes provided" +#~ msgstr "mauvais nombre d'octets fourni'" -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Impossible d'appliquer les paramètres PPCP" +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile" + +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n" #~ msgid "" #~ "enough power for the whole circuit and press reset (after ejecting " @@ -2864,17 +2855,14 @@ msgstr "" #~ "assez de puissance pour l'ensemble du circuit et appuyez sur " #~ "'reset' (après avoir éjecter CIRCUITPY).\n" -#~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" -#~ msgstr "" -#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n" - -#, fuzzy -#~ msgid "palette must be displayio.Palette" -#~ msgstr "la palette doit être une displayio.Palette" - -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile" +#~ msgid "Can not add Service." +#~ msgstr "Impossible d'ajouter le Service" #~ msgid "Can not query for the device address." #~ msgstr "Impossible d'obtenir l'adresse du périphérique" + +#~ msgid "Can not add Characteristic." +#~ msgstr "Impossible d'ajouter la Characteristic." + +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Impossible d'appliquer les paramètres PPCP" diff --git a/locale/it_IT.po b/locale/it_IT.po index 47aff5166..225e51cf5 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-01-18 11:43-0800\n" +"POT-Creation-Date: 2019-01-20 17:33-0800\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -21,8 +21,8 @@ msgstr "" msgid "invalid I2C peripheral" msgstr "periferica I2C invalida" -#: extmod/machine_i2c.c:340 extmod/machine_i2c.c:354 extmod/machine_i2c.c:368 -#: extmod/machine_i2c.c:392 +#: extmod/machine_i2c.c:338 extmod/machine_i2c.c:352 extmod/machine_i2c.c:366 +#: extmod/machine_i2c.c:390 msgid "I2C operation not supported" msgstr "operazione I2C non supportata" @@ -905,7 +905,7 @@ msgstr "[errore addrinfo %d]" msgid "function does not take keyword arguments" msgstr "la funzione non prende argomenti nominati" -#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:108 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -943,7 +943,7 @@ msgstr "" "argomento(i) nominati non ancora implementati - usare invece argomenti " "normali" -#: py/bc.c:88 py/objnamedtuple.c:109 +#: py/bc.c:88 py/objnamedtuple.c:112 msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() prende %d argomenti posizionali ma ne sono stati forniti %d" @@ -955,11 +955,11 @@ msgstr "argomento nominato inaspettato" msgid "keywords must be strings" msgstr "argomenti nominati devono essere stringhe" -#: py/bc.c:206 py/objnamedtuple.c:139 +#: py/bc.c:206 py/objnamedtuple.c:142 msgid "function got multiple values for argument '%q'" msgstr "la funzione ha ricevuto valori multipli per l'argomento '%q'" -#: py/bc.c:218 py/objnamedtuple.c:131 +#: py/bc.c:218 py/objnamedtuple.c:134 msgid "unexpected keyword argument '%q'" msgstr "argomento nominato '%q' inaspettato" @@ -1546,11 +1546,11 @@ msgstr "pieno" msgid "empty" msgstr "vuoto" -#: py/objdict.c:312 +#: py/objdict.c:315 msgid "popitem(): dictionary is empty" msgstr "popitem(): il dizionario è vuoto" -#: py/objdict.c:355 +#: py/objdict.c:358 msgid "dict update sequence has wrong length" msgstr "sequanza di aggiornamento del dizionario ha la lunghezza errata" @@ -2310,29 +2310,21 @@ msgstr "valori della riga devono essere un buffer" msgid "color should be an int" msgstr "il colore deve essere un int" -#: shared-bindings/displayio/Display.c:79 -msgid "Width and height kwargs required" +#: shared-bindings/displayio/Display.c:119 +msgid "Too many displays" msgstr "" -#: shared-bindings/displayio/Display.c:93 -msgid "Display limit reached" -msgstr "" - -#: shared-bindings/displayio/Display.c:112 +#: shared-bindings/displayio/Display.c:138 msgid "Must be a Group subclass." msgstr "" -#: shared-bindings/displayio/FourWire.c:69 -msgid "Command and chip_select required" -msgstr "" - -#: shared-bindings/displayio/FourWire.c:91 -#: shared-bindings/displayio/ParallelBus.c:94 -msgid "Display bus limit reached" +#: shared-bindings/displayio/FourWire.c:93 +#: shared-bindings/displayio/ParallelBus.c:98 +msgid "Too many display busses" msgstr "" -#: shared-bindings/displayio/FourWire.c:104 -#: shared-bindings/displayio/ParallelBus.c:106 +#: shared-bindings/displayio/FourWire.c:106 +#: shared-bindings/displayio/ParallelBus.c:110 msgid "displayio is a work in progress" msgstr "" @@ -2363,10 +2355,6 @@ msgstr "il buffer del colore deve essere un buffer o un int" msgid "palette_index should be an int" msgstr "palette_index deve essere un int" -#: shared-bindings/displayio/ParallelBus.c:75 -msgid "Data0, command, chip_select, write and read required" -msgstr "" - #: shared-bindings/displayio/Shape.c:92 #, fuzzy msgid "start_x should be an int" @@ -2718,11 +2706,11 @@ msgstr "Errore USB" msgid "No default I2C bus" msgstr "Nessun bus I2C predefinito" -#: supervisor/shared/board_busses.c:89 +#: supervisor/shared/board_busses.c:91 msgid "No default SPI bus" msgstr "Nessun bus SPI predefinito" -#: supervisor/shared/board_busses.c:116 +#: supervisor/shared/board_busses.c:118 msgid "No default UART bus" msgstr "Nessun bus UART predefinito" @@ -2787,12 +2775,12 @@ msgid "" "exit safe mode.\n" msgstr "" -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parametro UUID non valido" - #~ msgid "Invalid UUID string length" #~ msgstr "Lunghezza della stringa UUID non valida" +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parametro UUID non valido" + #~ msgid "Invalid Service type" #~ msgstr "Tipo di servizio non valido" @@ -2800,18 +2788,14 @@ msgstr "" #~ msgid "Wrong number of bytes provided" #~ msgstr "numero di argomenti errato" -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x" +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Impossibile impostare i parametri PPCP." -#~ msgid "Can not add Service." -#~ msgstr "Non è possibile aggiungere Service." +#~ msgid "Can not add Characteristic." +#~ msgstr "Non è possibile aggiungere Characteristic." -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver " -#~ "espulso CIRCUITPY).\n" +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare." #~ msgid "" #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" @@ -2819,28 +2803,32 @@ msgstr "" #~ "Ti preghiamo di compilare una issue con il contenuto del tuo drie " #~ "CIRCUITPY:\n" -#~ msgid "Can not query for the device address." -#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." - #~ msgid "Can encode UUID into the advertisement packet." #~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement." -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare." +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista." -#~ msgid "Can not add Characteristic." -#~ msgstr "Non è possibile aggiungere Characteristic." +#~ msgid "Can not add Service." +#~ msgstr "Non è possibile aggiungere Service." + +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x" + +#~ msgid "Can not query for the device address." +#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" #~ msgstr "" #~ "Sembra che il codice del core di CircuitPython sia crashato malamente. " #~ "Whoops!\n" +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver " +#~ "espulso CIRCUITPY).\n" + #~ msgid "Cannot apply GAP parameters." #~ msgstr "Impossibile applicare i parametri GAP." - -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Impossibile impostare i parametri PPCP." - -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista." diff --git a/locale/pt_BR.po b/locale/pt_BR.po index e610577a1..a0d81d182 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-01-18 11:43-0800\n" +"POT-Creation-Date: 2019-01-20 17:33-0800\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n" "Last-Translator: \n" "Language-Team: \n" @@ -21,8 +21,8 @@ msgstr "" msgid "invalid I2C peripheral" msgstr "periférico I2C inválido" -#: extmod/machine_i2c.c:340 extmod/machine_i2c.c:354 extmod/machine_i2c.c:368 -#: extmod/machine_i2c.c:392 +#: extmod/machine_i2c.c:338 extmod/machine_i2c.c:352 extmod/machine_i2c.c:366 +#: extmod/machine_i2c.c:390 msgid "I2C operation not supported" msgstr "I2C operação não suportada" @@ -893,7 +893,7 @@ msgstr "" msgid "function does not take keyword arguments" msgstr "função não aceita argumentos de palavras-chave" -#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:105 +#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:108 #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "função leva %d argumentos posicionais, mas apenas %d foram passadas" @@ -928,7 +928,7 @@ msgstr "" msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -#: py/bc.c:88 py/objnamedtuple.c:109 +#: py/bc.c:88 py/objnamedtuple.c:112 msgid "%q() takes %d positional arguments but %d were given" msgstr "" @@ -940,11 +940,11 @@ msgstr "" msgid "keywords must be strings" msgstr "" -#: py/bc.c:206 py/objnamedtuple.c:139 +#: py/bc.c:206 py/objnamedtuple.c:142 msgid "function got multiple values for argument '%q'" msgstr "" -#: py/bc.c:218 py/objnamedtuple.c:131 +#: py/bc.c:218 py/objnamedtuple.c:134 msgid "unexpected keyword argument '%q'" msgstr "" @@ -1528,11 +1528,11 @@ msgstr "cheio" msgid "empty" msgstr "vazio" -#: py/objdict.c:312 +#: py/objdict.c:315 msgid "popitem(): dictionary is empty" msgstr "" -#: py/objdict.c:355 +#: py/objdict.c:358 msgid "dict update sequence has wrong length" msgstr "" @@ -2278,29 +2278,21 @@ msgstr "" msgid "color should be an int" msgstr "cor deve ser um int" -#: shared-bindings/displayio/Display.c:79 -msgid "Width and height kwargs required" +#: shared-bindings/displayio/Display.c:119 +msgid "Too many displays" msgstr "" -#: shared-bindings/displayio/Display.c:93 -msgid "Display limit reached" -msgstr "" - -#: shared-bindings/displayio/Display.c:112 +#: shared-bindings/displayio/Display.c:138 msgid "Must be a Group subclass." msgstr "" -#: shared-bindings/displayio/FourWire.c:69 -msgid "Command and chip_select required" +#: shared-bindings/displayio/FourWire.c:93 +#: shared-bindings/displayio/ParallelBus.c:98 +msgid "Too many display busses" msgstr "" -#: shared-bindings/displayio/FourWire.c:91 -#: shared-bindings/displayio/ParallelBus.c:94 -msgid "Display bus limit reached" -msgstr "" - -#: shared-bindings/displayio/FourWire.c:104 -#: shared-bindings/displayio/ParallelBus.c:106 +#: shared-bindings/displayio/FourWire.c:106 +#: shared-bindings/displayio/ParallelBus.c:110 msgid "displayio is a work in progress" msgstr "" @@ -2329,10 +2321,6 @@ msgstr "" msgid "palette_index should be an int" msgstr "" -#: shared-bindings/displayio/ParallelBus.c:75 -msgid "Data0, command, chip_select, write and read required" -msgstr "" - #: shared-bindings/displayio/Shape.c:92 #, fuzzy msgid "start_x should be an int" @@ -2675,11 +2663,11 @@ msgstr "Erro na USB" msgid "No default I2C bus" msgstr "Nenhum barramento I2C padrão" -#: supervisor/shared/board_busses.c:89 +#: supervisor/shared/board_busses.c:91 msgid "No default SPI bus" msgstr "Nenhum barramento SPI padrão" -#: supervisor/shared/board_busses.c:116 +#: supervisor/shared/board_busses.c:118 msgid "No default UART bus" msgstr "Nenhum barramento UART padrão" @@ -2738,32 +2726,32 @@ msgid "" "exit safe mode.\n" msgstr "" -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parâmetro UUID inválido" +#~ msgid "Can not query for the device address." +#~ msgstr "Não é possível consultar o endereço do dispositivo." -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x" +#~ msgid "Invalid Service type" +#~ msgstr "Tipo de serviço inválido" + +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." + +#~ msgid "Baud rate too high for this SPI peripheral" +#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI" #~ msgid "Can not add Characteristic." #~ msgstr "Não é possível adicionar Característica." -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Não é possível aplicar parâmetros GAP." -#~ msgid "Invalid Service type" -#~ msgstr "Tipo de serviço inválido" +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parâmetro UUID inválido" + +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x" #~ msgid "Can encode UUID into the advertisement packet." #~ msgstr "Pode codificar o UUID no pacote de anúncios." #~ msgid "Cannot set PPCP parameters." #~ msgstr "Não é possível definir parâmetros PPCP." - -#~ msgid "Baud rate too high for this SPI peripheral" -#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI" - -#~ msgid "Can not query for the device address." -#~ msgstr "Não é possível consultar o endereço do dispositivo." - -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Não é possível aplicar parâmetros GAP." -- cgit v1.2.3 From 9558b3afa7d90e1f84070088b0f7c4c21def4683 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 20 Jan 2019 22:46:32 -0500 Subject: make translate --- locale/ID.po | 44 +++++++++++++-------- locale/circuitpython.pot | 19 ++++++--- locale/de_DE.po | 82 +++++++++++++++++++++----------------- locale/en_US.po | 19 ++++++--- locale/es.po | 98 +++++++++++++++++++++++++--------------------- locale/fil.po | 100 ++++++++++++++++++++++++++--------------------- locale/fr.po | 98 +++++++++++++++++++++++++--------------------- locale/it_IT.po | 96 +++++++++++++++++++++++++-------------------- locale/pt_BR.po | 58 +++++++++++++++------------ 9 files changed, 351 insertions(+), 263 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 8547493e9..cf317b42d 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-01-20 17:33-0800\n" +"POT-Creation-Date: 2019-01-20 22:46-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1363,9 +1363,9 @@ msgstr "" msgid "schedule stack full" msgstr "" -#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 -#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 -#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 +#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 +#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 +#: shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "" @@ -2649,10 +2649,20 @@ msgstr "" msgid "'S' and 'O' are not supported format types" msgstr "" -#: shared-module/struct/__init__.c:83 +#: shared-module/struct/__init__.c:128 +#, fuzzy, c-format +msgid "unpack requires a buffer of %d bytes" +msgstr "Gagal untuk megalokasikan buffer RX dari %d byte" + +#: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "" +#: shared-module/struct/__init__.c:179 +#, fuzzy +msgid "buffer size must match format" +msgstr "buffers harus mempunyai panjang yang sama" + #: shared-module/usb_hid/Device.c:45 #, c-format msgid "Buffer incorrect size. Should be %d bytes." @@ -2739,24 +2749,24 @@ msgid "" "exit safe mode.\n" msgstr "" +#~ msgid "Invalid UUID string length" +#~ msgstr "Panjang string UUID tidak valid" + #~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" #~ msgstr "" -#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n" - -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parameter UUID tidak valid" +#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut " +#~ "CIRCUITPY).\n" #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" #~ msgstr "" #~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n" +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parameter UUID tidak valid" + #~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "" -#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut " -#~ "CIRCUITPY).\n" - -#~ msgid "Invalid UUID string length" -#~ msgstr "Panjang string UUID tidak valid" +#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 0a9e67685..4962a67ab 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-01-20 17:33-0800\n" +"POT-Creation-Date: 2019-01-20 22:46-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1330,9 +1330,9 @@ msgstr "" msgid "schedule stack full" msgstr "" -#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 -#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 -#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 +#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 +#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 +#: shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "" @@ -2612,10 +2612,19 @@ msgstr "" msgid "'S' and 'O' are not supported format types" msgstr "" -#: shared-module/struct/__init__.c:83 +#: shared-module/struct/__init__.c:128 +#, c-format +msgid "unpack requires a buffer of %d bytes" +msgstr "" + +#: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "" +#: shared-module/struct/__init__.c:179 +msgid "buffer size must match format" +msgstr "" + #: shared-module/usb_hid/Device.c:45 #, c-format msgid "Buffer incorrect size. Should be %d bytes." diff --git a/locale/de_DE.po b/locale/de_DE.po index 170104e9f..fe16a724b 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-01-20 17:33-0800\n" +"POT-Creation-Date: 2019-01-20 22:46-0500\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: Sebastian Plamauer\n" "Language-Team: \n" @@ -1359,9 +1359,9 @@ msgstr "" msgid "schedule stack full" msgstr "" -#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 -#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 -#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 +#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 +#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 +#: shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "" @@ -2651,10 +2651,20 @@ msgstr "Kann '/' nicht remounten when USB aktiv ist" msgid "'S' and 'O' are not supported format types" msgstr "" -#: shared-module/struct/__init__.c:83 +#: shared-module/struct/__init__.c:128 +#, fuzzy, c-format +msgid "unpack requires a buffer of %d bytes" +msgstr "Konnte keine RX Buffer mit %d allozieren" + +#: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "" +#: shared-module/struct/__init__.c:179 +#, fuzzy +msgid "buffer size must match format" +msgstr "Buffer müssen gleich lang sein" + #: shared-module/usb_hid/Device.c:45 #, c-format msgid "Buffer incorrect size. Should be %d bytes." @@ -2739,22 +2749,29 @@ msgid "" "exit safe mode.\n" msgstr "" -#~ msgid "Invalid UUID string length" -#~ msgstr "Ungültige UUID-Stringlänge" +#~ msgid "Can not add Characteristic." +#~ msgstr "Kann das Merkmal nicht hinzufügen." -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Kann UUID in das advertisement packet kodieren." +#~ msgid "Can not add Service." +#~ msgstr "Kann den Dienst nicht hinzufügen." -#~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" -#~ msgstr "" -#~ "Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n" +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "CircuitPython ist abgestürzt. Ups!\n" -#~ msgid "Invalid UUID parameter" -#~ msgstr "Ungültiger UUID-Parameter" +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" -#~ msgid "Invalid Service type" -#~ msgstr "Ungültiger Diensttyp" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Kann GAP Parameter nicht anwenden." + +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen." + +#~ msgid "Can not query for the device address." +#~ msgstr "Kann nicht nach der Geräteadresse suchen." + +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." #~ msgid "" #~ "enough power for the whole circuit and press reset (after ejecting " @@ -2763,26 +2780,19 @@ msgstr "" #~ "genug Strom für den ganzen Schaltkreis liefert und drücke reset (nach dem " #~ "sicheren Auswerfen von CIRCUITPY.)\n" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." - -#~ msgid "Can not query for the device address." -#~ msgstr "Kann nicht nach der Geräteadresse suchen." - -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen." - -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Kann GAP Parameter nicht anwenden." +#~ msgid "Invalid Service type" +#~ msgstr "Ungültiger Diensttyp" -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" +#~ msgid "Invalid UUID parameter" +#~ msgstr "Ungültiger UUID-Parameter" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "CircuitPython ist abgestürzt. Ups!\n" +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n" -#~ msgid "Can not add Service." -#~ msgstr "Kann den Dienst nicht hinzufügen." +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Kann UUID in das advertisement packet kodieren." -#~ msgid "Can not add Characteristic." -#~ msgstr "Kann das Merkmal nicht hinzufügen." +#~ msgid "Invalid UUID string length" +#~ msgstr "Ungültige UUID-Stringlänge" diff --git a/locale/en_US.po b/locale/en_US.po index acd5f54cb..33b1e614b 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-01-20 17:33-0800\n" +"POT-Creation-Date: 2019-01-20 22:46-0500\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -1330,9 +1330,9 @@ msgstr "" msgid "schedule stack full" msgstr "" -#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 -#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 -#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 +#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 +#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 +#: shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "" @@ -2612,10 +2612,19 @@ msgstr "" msgid "'S' and 'O' are not supported format types" msgstr "" -#: shared-module/struct/__init__.c:83 +#: shared-module/struct/__init__.c:128 +#, c-format +msgid "unpack requires a buffer of %d bytes" +msgstr "" + +#: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "" +#: shared-module/struct/__init__.c:179 +msgid "buffer size must match format" +msgstr "" + #: shared-module/usb_hid/Device.c:45 #, c-format msgid "Buffer incorrect size. Should be %d bytes." diff --git a/locale/es.po b/locale/es.po index 799fc68bf..6daa4170b 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-01-20 17:33-0800\n" +"POT-Creation-Date: 2019-01-20 22:46-0500\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -1366,9 +1366,9 @@ msgstr "división por cero" msgid "schedule stack full" msgstr "" -#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 -#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 -#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 +#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 +#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 +#: shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "buffer demasiado pequeño" @@ -2673,10 +2673,20 @@ msgstr "No se puede volver a montar '/' cuando el USB esta activo." msgid "'S' and 'O' are not supported format types" msgstr "'S' y 'O' no son compatibles con los tipos de formato" -#: shared-module/struct/__init__.c:83 +#: shared-module/struct/__init__.c:128 +#, fuzzy, c-format +msgid "unpack requires a buffer of %d bytes" +msgstr "Falló la asignación del buffer RX de %d bytes" + +#: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "demasiados argumentos provistos con el formato dado" +#: shared-module/struct/__init__.c:179 +#, fuzzy +msgid "buffer size must match format" +msgstr "los buffers deben de tener la misma longitud" + #: shared-module/usb_hid/Device.c:45 #, c-format msgid "Buffer incorrect size. Should be %d bytes." @@ -2771,31 +2781,32 @@ msgstr "" "El botón reset fue presionado mientras arrancaba CircuitPython. Presiona " "otra vez para salir del modo seguro.\n" -#~ msgid "Invalid UUID string length" -#~ msgstr "Longitud de string UUID inválida" +#~ msgid "Baud rate too high for this SPI peripheral" +#~ msgstr "Baud rate demasiado alto para este periférico SPI" -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parámetro UUID inválido" +#~ msgid "Invalid Service type" +#~ msgstr "Tipo de Servicio inválido" -#~ msgid "Can not query for the device address." -#~ msgstr "No se puede consultar la dirección del dispositivo." +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n" +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "No se pueden establecer los parámetros PPCP." +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "No se puede codificar el UUID, para revisar la longitud." -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "suficiente poder para todo el circuito y presiona reset (después de " -#~ "expulsar CIRCUITPY).\n" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "No se pueden aplicar los parámetros GAP." -#~ msgid "Can not apply device name in the stack." -#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." +#~ msgid "Can not add Service." +#~ msgstr "No se puede agregar el Servicio." + +#~ msgid "Wrong number of bytes provided" +#~ msgstr "Numero erroneo de bytes dados" + +#~ msgid "Wrong address length" +#~ msgstr "Longitud de address erronea" #, fuzzy #~ msgid "" @@ -2804,29 +2815,28 @@ msgstr "" #~ "Por favor registra un issue en la siguiente URL con el contenidos de tu " #~ "unidad de almacenamiento CIRCUITPY:\n" -#~ msgid "Wrong address length" -#~ msgstr "Longitud de address erronea" - -#~ msgid "Wrong number of bytes provided" -#~ msgstr "Numero erroneo de bytes dados" - -#~ msgid "Can not add Service." -#~ msgstr "No se puede agregar el Servicio." +#~ msgid "Can not apply device name in the stack." +#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "No se pueden aplicar los parámetros GAP." +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "suficiente poder para todo el circuito y presiona reset (después de " +#~ "expulsar CIRCUITPY).\n" -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "No se puede codificar el UUID, para revisar la longitud." +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "No se pueden establecer los parámetros PPCP." -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n" -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x" +#~ msgid "Can not query for the device address." +#~ msgstr "No se puede consultar la dirección del dispositivo." -#~ msgid "Invalid Service type" -#~ msgstr "Tipo de Servicio inválido" +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parámetro UUID inválido" -#~ msgid "Baud rate too high for this SPI peripheral" -#~ msgstr "Baud rate demasiado alto para este periférico SPI" +#~ msgid "Invalid UUID string length" +#~ msgstr "Longitud de string UUID inválida" diff --git a/locale/fil.po b/locale/fil.po index 6b3e408c7..8d112726e 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-01-20 17:33-0800\n" +"POT-Creation-Date: 2019-01-20 22:46-0500\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -1367,9 +1367,9 @@ msgstr "dibisyon ng zero" msgid "schedule stack full" msgstr "puno na ang schedule stack" -#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 -#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 -#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 +#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 +#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 +#: shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "masyadong maliit ang buffer" @@ -2679,10 +2679,20 @@ msgstr "Hindi ma-remount '/' kapag aktibo ang USB." msgid "'S' and 'O' are not supported format types" msgstr "Ang 'S' at 'O' ay hindi suportadong uri ng format" -#: shared-module/struct/__init__.c:83 +#: shared-module/struct/__init__.c:128 +#, fuzzy, c-format +msgid "unpack requires a buffer of %d bytes" +msgstr "Nabigong ilaan ang RX buffer ng %d bytes" + +#: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format" +#: shared-module/struct/__init__.c:179 +#, fuzzy +msgid "buffer size must match format" +msgstr "aarehas na haba dapat ang buffer slices" + #: shared-module/usb_hid/Device.c:45 #, c-format msgid "Buffer incorrect size. Should be %d bytes." @@ -2777,31 +2787,33 @@ msgstr "" "Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin " "ulit para lumabas sa safe mode.\n" -#~ msgid "Invalid UUID string length" -#~ msgstr "Mali ang UUID string length" +#, fuzzy +#~ msgid "palette must be displayio.Palette" +#~ msgstr "ang palette ay dapat 32 bytes ang haba" -#~ msgid "Invalid UUID parameter" -#~ msgstr "Mali ang UUID parameter" +#~ msgid "Invalid Service type" +#~ msgstr "Mali ang tipo ng serbisyo" -#~ msgid "Can not query for the device address." -#~ msgstr "Hindi maaaring mag-query para sa address ng device." +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n" +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Maaring i-encode ang UUID sa advertisement packet." -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Hindi ma-set ang PPCP parameters." +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Hindi ma-encode UUID, para suriin ang haba." -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang " -#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Hindi ma-apply ang GAP parameters." -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." +#~ msgid "Can not add Service." +#~ msgstr "Hindi maidaragdag ang serbisyo." + +#~ msgid "Wrong number of bytes provided" +#~ msgstr "Mali ang bilang ng bytes" + +#~ msgid "Wrong address length" +#~ msgstr "Mali ang address length" #~ msgid "" #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" @@ -2809,30 +2821,28 @@ msgstr "" #~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY " #~ "drive:\n" -#~ msgid "Wrong address length" -#~ msgstr "Mali ang address length" - -#~ msgid "Wrong number of bytes provided" -#~ msgstr "Mali ang bilang ng bytes" - -#~ msgid "Can not add Service." -#~ msgstr "Hindi maidaragdag ang serbisyo." +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Hindi ma-apply ang GAP parameters." +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang " +#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n" -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Hindi ma-encode UUID, para suriin ang haba." +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Hindi ma-set ang PPCP parameters." -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Maaring i-encode ang UUID sa advertisement packet." +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n" -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x" +#~ msgid "Can not query for the device address." +#~ msgstr "Hindi maaaring mag-query para sa address ng device." -#~ msgid "Invalid Service type" -#~ msgstr "Mali ang tipo ng serbisyo" +#~ msgid "Invalid UUID parameter" +#~ msgstr "Mali ang UUID parameter" -#, fuzzy -#~ msgid "palette must be displayio.Palette" -#~ msgstr "ang palette ay dapat 32 bytes ang haba" +#~ msgid "Invalid UUID string length" +#~ msgstr "Mali ang UUID string length" diff --git a/locale/fr.po b/locale/fr.po index 236ce4345..2110a4c6e 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-20 17:33-0800\n" +"POT-Creation-Date: 2019-01-20 22:46-0500\n" "PO-Revision-Date: 2018-12-23 20:05+0100\n" "Last-Translator: Pierrick Couturier \n" "Language-Team: fr\n" @@ -1366,9 +1366,9 @@ msgstr "division par zéro" msgid "schedule stack full" msgstr "pile de plannification pleine" -#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 -#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 -#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 +#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 +#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 +#: shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "tampon trop petit" @@ -2703,10 +2703,20 @@ msgstr "'/' ne peut être remonté quand l'USB est actif." msgid "'S' and 'O' are not supported format types" msgstr "'S' et 'O' ne sont pas des types de format supportés" -#: shared-module/struct/__init__.c:83 +#: shared-module/struct/__init__.c:128 +#, fuzzy, c-format +msgid "unpack requires a buffer of %d bytes" +msgstr "Echec de l'allocation de %d octets du tampon RX" + +#: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "trop d'arguments fournis avec ce format" +#: shared-module/struct/__init__.c:179 +#, fuzzy +msgid "buffer size must match format" +msgstr "les slices de tampon doivent être de longueurs égales" + #: shared-module/usb_hid/Device.c:45 #, c-format msgid "Buffer incorrect size. Should be %d bytes." @@ -2806,63 +2816,63 @@ msgstr "" "Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. " "Appuyer denouveau pour quitter de le mode sans-échec.\n" -#~ msgid "Invalid UUID string length" -#~ msgstr "Longeur de chaîne UUID invalide" - -#~ msgid "Invalid UUID parameter" -#~ msgstr "Paramètre UUID invalide" - -#, fuzzy -#~ msgid "palette must be displayio.Palette" -#~ msgstr "la palette doit être une displayio.Palette" +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Impossible d'appliquer les paramètres PPCP" -#, fuzzy -#~ msgid "value_size must be power of two" -#~ msgstr "value_size doit être une puissance de 2" +#~ msgid "Can not add Characteristic." +#~ msgstr "Impossible d'ajouter la Characteristic." -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Impossible d'appliquer les paramètres GAP" +#~ msgid "Can not query for the device address." +#~ msgstr "Impossible d'obtenir l'adresse du périphérique" -#~ msgid "Invalid Service type" -#~ msgstr "Type de service invalide" +#~ msgid "Can not add Service." +#~ msgstr "Impossible d'ajouter le Service" #~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" #~ msgstr "" -#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n" +#~ "assez de puissance pour l'ensemble du circuit et appuyez sur " +#~ "'reset' (après avoir éjecter CIRCUITPY).\n" -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur." +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n" -#~ msgid "Wrong address length" -#~ msgstr "Mauvaise longueur d'adresse" +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile" #, fuzzy #~ msgid "Wrong number of bytes provided" #~ msgstr "mauvais nombre d'octets fourni'" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile" +#~ msgid "Wrong address length" +#~ msgstr "Mauvaise longueur d'adresse" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n" +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur." #~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "" -#~ "assez de puissance pour l'ensemble du circuit et appuyez sur " -#~ "'reset' (après avoir éjecter CIRCUITPY).\n" +#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n" -#~ msgid "Can not add Service." -#~ msgstr "Impossible d'ajouter le Service" +#~ msgid "Invalid Service type" +#~ msgstr "Type de service invalide" -#~ msgid "Can not query for the device address." -#~ msgstr "Impossible d'obtenir l'adresse du périphérique" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Impossible d'appliquer les paramètres GAP" -#~ msgid "Can not add Characteristic." -#~ msgstr "Impossible d'ajouter la Characteristic." +#, fuzzy +#~ msgid "value_size must be power of two" +#~ msgstr "value_size doit être une puissance de 2" -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Impossible d'appliquer les paramètres PPCP" +#, fuzzy +#~ msgid "palette must be displayio.Palette" +#~ msgstr "la palette doit être une displayio.Palette" + +#~ msgid "Invalid UUID parameter" +#~ msgstr "Paramètre UUID invalide" + +#~ msgid "Invalid UUID string length" +#~ msgstr "Longeur de chaîne UUID invalide" diff --git a/locale/it_IT.po b/locale/it_IT.po index 225e51cf5..cb413f073 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-01-20 17:33-0800\n" +"POT-Creation-Date: 2019-01-20 22:46-0500\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -1366,9 +1366,9 @@ msgstr "divisione per zero" msgid "schedule stack full" msgstr "" -#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 -#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 -#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 +#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 +#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 +#: shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "buffer troppo piccolo" @@ -2685,10 +2685,20 @@ msgstr "Non è possibile rimontare '/' mentre l'USB è attiva." msgid "'S' and 'O' are not supported format types" msgstr "'S' e 'O' non sono formati supportati" -#: shared-module/struct/__init__.c:83 +#: shared-module/struct/__init__.c:128 +#, fuzzy, c-format +msgid "unpack requires a buffer of %d bytes" +msgstr "Fallita allocazione del buffer RX di %d byte" + +#: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "troppi argomenti forniti con il formato specificato" +#: shared-module/struct/__init__.c:179 +#, fuzzy +msgid "buffer size must match format" +msgstr "slice del buffer devono essere della stessa lunghezza" + #: shared-module/usb_hid/Device.c:45 #, c-format msgid "Buffer incorrect size. Should be %d bytes." @@ -2775,27 +2785,35 @@ msgid "" "exit safe mode.\n" msgstr "" -#~ msgid "Invalid UUID string length" -#~ msgstr "Lunghezza della stringa UUID non valida" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Impossibile applicare i parametri GAP." -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parametro UUID non valido" +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver " +#~ "espulso CIRCUITPY).\n" -#~ msgid "Invalid Service type" -#~ msgstr "Tipo di servizio non valido" +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. " +#~ "Whoops!\n" -#, fuzzy -#~ msgid "Wrong number of bytes provided" -#~ msgstr "numero di argomenti errato" +#~ msgid "Can not query for the device address." +#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Impossibile impostare i parametri PPCP." +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x" -#~ msgid "Can not add Characteristic." -#~ msgstr "Non è possibile aggiungere Characteristic." +#~ msgid "Can not add Service." +#~ msgstr "Non è possibile aggiungere Service." -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare." +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista." + +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement." #~ msgid "" #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" @@ -2803,32 +2821,24 @@ msgstr "" #~ "Ti preghiamo di compilare una issue con il contenuto del tuo drie " #~ "CIRCUITPY:\n" -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement." - -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista." +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare." -#~ msgid "Can not add Service." -#~ msgstr "Non è possibile aggiungere Service." +#~ msgid "Can not add Characteristic." +#~ msgstr "Non è possibile aggiungere Characteristic." -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x" +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Impossibile impostare i parametri PPCP." -#~ msgid "Can not query for the device address." -#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." +#, fuzzy +#~ msgid "Wrong number of bytes provided" +#~ msgstr "numero di argomenti errato" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. " -#~ "Whoops!\n" +#~ msgid "Invalid Service type" +#~ msgstr "Tipo di servizio non valido" -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver " -#~ "espulso CIRCUITPY).\n" +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parametro UUID non valido" -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Impossibile applicare i parametri GAP." +#~ msgid "Invalid UUID string length" +#~ msgstr "Lunghezza della stringa UUID non valida" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index a0d81d182..457850a55 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-01-20 17:33-0800\n" +"POT-Creation-Date: 2019-01-20 22:46-0500\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n" "Last-Translator: \n" "Language-Team: \n" @@ -1348,9 +1348,9 @@ msgstr "divisão por zero" msgid "schedule stack full" msgstr "" -#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 -#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 -#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 +#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 +#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 +#: shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "" @@ -2642,10 +2642,20 @@ msgstr "Não é possível remontar '/' enquanto o USB estiver ativo." msgid "'S' and 'O' are not supported format types" msgstr "'S' e 'O' não são tipos de formato suportados" -#: shared-module/struct/__init__.c:83 +#: shared-module/struct/__init__.c:128 +#, fuzzy, c-format +msgid "unpack requires a buffer of %d bytes" +msgstr "Falha ao alocar buffer RX de %d bytes" + +#: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "Muitos argumentos fornecidos com o formato dado" +#: shared-module/struct/__init__.c:179 +#, fuzzy +msgid "buffer size must match format" +msgstr "buffers devem ser o mesmo tamanho" + #: shared-module/usb_hid/Device.c:45 #, c-format msgid "Buffer incorrect size. Should be %d bytes." @@ -2726,32 +2736,32 @@ msgid "" "exit safe mode.\n" msgstr "" -#~ msgid "Can not query for the device address." -#~ msgstr "Não é possível consultar o endereço do dispositivo." - -#~ msgid "Invalid Service type" -#~ msgstr "Tipo de serviço inválido" +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Não é possível definir parâmetros PPCP." -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Pode codificar o UUID no pacote de anúncios." -#~ msgid "Baud rate too high for this SPI peripheral" -#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI" +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x" -#~ msgid "Can not add Characteristic." -#~ msgstr "Não é possível adicionar Característica." +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parâmetro UUID inválido" #~ msgid "Cannot apply GAP parameters." #~ msgstr "Não é possível aplicar parâmetros GAP." -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parâmetro UUID inválido" +#~ msgid "Can not add Characteristic." +#~ msgstr "Não é possível adicionar Característica." -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x" +#~ msgid "Baud rate too high for this SPI peripheral" +#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI" -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Pode codificar o UUID no pacote de anúncios." +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Não é possível definir parâmetros PPCP." +#~ msgid "Invalid Service type" +#~ msgstr "Tipo de serviço inválido" + +#~ msgid "Can not query for the device address." +#~ msgstr "Não é possível consultar o endereço do dispositivo." -- cgit v1.2.3 From ab2ad7ba4542c2e133ced64ccb8e9d0b4065e86f Mon Sep 17 00:00:00 2001 From: Bryan Siepert Date: Sun, 20 Jan 2019 22:33:22 -0800 Subject: adding height and width to OnDiskBitmap for #1460 --- shared-bindings/displayio/OnDiskBitmap.c | 44 ++++++++++++++++++++++++++++++++ shared-bindings/displayio/OnDiskBitmap.h | 3 +++ shared-module/displayio/OnDiskBitmap.c | 8 ++++++ 3 files changed, 55 insertions(+) diff --git a/shared-bindings/displayio/OnDiskBitmap.c b/shared-bindings/displayio/OnDiskBitmap.c index 46cb5913c..d6d3b9862 100644 --- a/shared-bindings/displayio/OnDiskBitmap.c +++ b/shared-bindings/displayio/OnDiskBitmap.c @@ -29,7 +29,9 @@ #include #include "py/runtime.h" +#include "py/objproperty.h" #include "supervisor/shared/translate.h" +#include "shared-bindings/displayio/OnDiskBitmap.h" //| .. currentmodule:: displayio //| @@ -92,7 +94,49 @@ STATIC mp_obj_t displayio_ondiskbitmap_make_new(const mp_obj_type_t *type, size_ return MP_OBJ_FROM_PTR(self); } +//| .. attribute:: width +//| +//| Width of the bitmap. (read only) +//| +STATIC mp_obj_t displayio_ondiskbitmap_obj_get_width(mp_obj_t self_in) { + displayio_ondiskbitmap_t *self = MP_OBJ_TO_PTR(self_in); + + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_ondiskbitmap_get_width(self)); +} + +MP_DEFINE_CONST_FUN_OBJ_1(displayio_ondiskbitmap_get_width_obj, displayio_ondiskbitmap_obj_get_width); + +const mp_obj_property_t displayio_ondiskbitmap_width_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_ondiskbitmap_get_width_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj}, + +}; + +//| .. attribute:: height +//| +//| Height of the bitmap. (read only) +//| +STATIC mp_obj_t displayio_ondiskbitmap_obj_get_height(mp_obj_t self_in) { + displayio_ondiskbitmap_t *self = MP_OBJ_TO_PTR(self_in); + + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_ondiskbitmap_get_height(self)); +} + +MP_DEFINE_CONST_FUN_OBJ_1(displayio_ondiskbitmap_get_height_obj, displayio_ondiskbitmap_obj_get_height); + +const mp_obj_property_t displayio_ondiskbitmap_height_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_ondiskbitmap_get_height_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj}, + +}; + STATIC const mp_rom_map_elem_t displayio_ondiskbitmap_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&displayio_ondiskbitmap_height_obj) }, + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&displayio_ondiskbitmap_width_obj) }, }; STATIC MP_DEFINE_CONST_DICT(displayio_ondiskbitmap_locals_dict, displayio_ondiskbitmap_locals_dict_table); diff --git a/shared-bindings/displayio/OnDiskBitmap.h b/shared-bindings/displayio/OnDiskBitmap.h index ab8b8dcd8..9a6c81f8f 100644 --- a/shared-bindings/displayio/OnDiskBitmap.h +++ b/shared-bindings/displayio/OnDiskBitmap.h @@ -37,4 +37,7 @@ void common_hal_displayio_ondiskbitmap_construct(displayio_ondiskbitmap_t *self, uint32_t common_hal_displayio_ondiskbitmap_get_pixel(displayio_ondiskbitmap_t *bitmap, int16_t x, int16_t y); +uint16_t common_hal_displayio_ondiskbitmap_get_height(displayio_ondiskbitmap_t *self); + +uint16_t common_hal_displayio_ondiskbitmap_get_width(displayio_ondiskbitmap_t *self); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO_ONDISKBITMAP_H diff --git a/shared-module/displayio/OnDiskBitmap.c b/shared-module/displayio/OnDiskBitmap.c index 6e4a4c6f0..aa2ca3e10 100644 --- a/shared-module/displayio/OnDiskBitmap.c +++ b/shared-module/displayio/OnDiskBitmap.c @@ -91,3 +91,11 @@ uint32_t common_hal_displayio_ondiskbitmap_get_pixel(displayio_ondiskbitmap_t *s } return 0; } + +uint16_t common_hal_displayio_ondiskbitmap_get_height(displayio_ondiskbitmap_t *self) { + return self->height; +} + +uint16_t common_hal_displayio_ondiskbitmap_get_width(displayio_ondiskbitmap_t *self) { + return self->width; +} -- cgit v1.2.3 From 777408ff8d45b9a73dbf0bcf8c083ade0b5152e5 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 21 Jan 2019 11:45:38 -0500 Subject: struct.pack_into incorrect buffer size check --- shared-module/struct/__init__.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-module/struct/__init__.c b/shared-module/struct/__init__.c index 28e7c0c3f..245dbbda9 100644 --- a/shared-module/struct/__init__.c +++ b/shared-module/struct/__init__.c @@ -124,8 +124,8 @@ void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size char fmt_type = get_fmt_type(&fmt); const mp_uint_t total_sz = shared_modules_struct_calcsize(fmt_in); - if (p + total_sz != end_p) { - mp_raise_msg_varg(&mp_type_RuntimeError, translate("unpack requires a buffer of %d bytes"), total_sz); + if (p + total_sz > end_p) { + mp_raise_RuntimeError(translate("buffer too small")); } size_t i; -- cgit v1.2.3 From 6aa9f69b19898a1fdb7a233dafb06b10d119a2a8 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 21 Jan 2019 21:51:22 -0500 Subject: make translateimgrofybeepboopbop --- locale/ID.po | 125 ++++++++++++++++++-------------- locale/circuitpython.pot | 95 ++++++++++++++----------- locale/de_DE.po | 167 ++++++++++++++++++++++++------------------- locale/en_US.po | 95 ++++++++++++++----------- locale/es.po | 179 +++++++++++++++++++++++++--------------------- locale/fil.po | 181 ++++++++++++++++++++++++++--------------------- locale/fr.po | 177 +++++++++++++++++++++++++-------------------- locale/it_IT.po | 177 +++++++++++++++++++++++++-------------------- locale/pt_BR.po | 137 ++++++++++++++++++++--------------- 9 files changed, 756 insertions(+), 577 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index cf317b42d..e06e07063 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-01-20 22:46-0500\n" +"POT-Creation-Date: 2019-01-21 21:50-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -341,12 +341,12 @@ msgid "bytes > 8 bits not supported" msgstr "byte > 8 bit tidak didukung" #: ports/atmel-samd/common-hal/busio/UART.c:73 -#: ports/nrf/common-hal/busio/UART.c:118 +#: ports/nrf/common-hal/busio/UART.c:91 msgid "tx and rx cannot both be None" msgstr "tx dan rx keduanya tidak boleh kosong" #: ports/atmel-samd/common-hal/busio/UART.c:146 -#: ports/nrf/common-hal/busio/UART.c:152 +#: ports/nrf/common-hal/busio/UART.c:132 msgid "Failed to allocate RX buffer" msgstr "Gagal untuk mengalokasikan buffer RX" @@ -355,12 +355,12 @@ msgid "Could not initialize UART" msgstr "Tidak dapat menginisialisasi UART" #: ports/atmel-samd/common-hal/busio/UART.c:241 -#: ports/nrf/common-hal/busio/UART.c:197 +#: ports/nrf/common-hal/busio/UART.c:174 msgid "No RX pin" msgstr "Tidak pin RX" #: ports/atmel-samd/common-hal/busio/UART.c:300 -#: ports/nrf/common-hal/busio/UART.c:232 +#: ports/nrf/common-hal/busio/UART.c:209 msgid "No TX pin" msgstr "Tidak ada pin TX" @@ -723,7 +723,7 @@ msgstr "Gagal untuk melaporkan nilai atribut, status: 0x%08lX" msgid "Failed to read attribute value, err %0x04x" msgstr "Gagal untuk membaca nilai atribut, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Characteristic.c:172 +#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34 #, fuzzy, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX" @@ -733,7 +733,7 @@ msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX" msgid "Failed to write attribute value, err 0x%04x" msgstr "Gagal untuk menulis nilai atribut, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Characteristic.c:189 +#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54 #, fuzzy, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX" @@ -754,51 +754,51 @@ msgstr "Tidak bisa menyesuaikan data ke dalam paket advertisment" msgid "Failed to discover services" msgstr "Gagal untuk menemukan layanan, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:267 -#: ports/nrf/common-hal/bleio/Device.c:300 +#: ports/nrf/common-hal/bleio/Device.c:268 +#: ports/nrf/common-hal/bleio/Device.c:302 #, fuzzy msgid "Failed to acquire mutex" msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:278 -#: ports/nrf/common-hal/bleio/Device.c:311 -#: ports/nrf/common-hal/bleio/Device.c:342 -#: ports/nrf/common-hal/bleio/Device.c:376 +#: ports/nrf/common-hal/bleio/Device.c:280 +#: ports/nrf/common-hal/bleio/Device.c:313 +#: ports/nrf/common-hal/bleio/Device.c:344 +#: ports/nrf/common-hal/bleio/Device.c:378 #, fuzzy msgid "Failed to release mutex" msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:387 +#: ports/nrf/common-hal/bleio/Device.c:389 #, fuzzy msgid "Failed to continue scanning" msgstr "Gagal untuk melanjutkan scanning, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:419 +#: ports/nrf/common-hal/bleio/Device.c:421 #, fuzzy msgid "Failed to connect:" msgstr "Gagal untuk menyambungkan, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:489 +#: ports/nrf/common-hal/bleio/Device.c:491 #, fuzzy msgid "Failed to add service" msgstr "Gagal untuk menambahkan layanan, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:506 +#: ports/nrf/common-hal/bleio/Device.c:508 #, fuzzy msgid "Failed to start advertising" msgstr "Gagal untuk memulai advertisement, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:523 +#: ports/nrf/common-hal/bleio/Device.c:525 #, fuzzy msgid "Failed to stop advertising" msgstr "Gagal untuk memberhentikan advertisement, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:548 +#: ports/nrf/common-hal/bleio/Device.c:550 #, fuzzy msgid "Failed to start scanning" msgstr "Gagal untuk melakukan scanning, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:564 +#: ports/nrf/common-hal/bleio/Device.c:566 #, fuzzy msgid "Failed to create mutex" msgstr "Gagal untuk membuat mutex, status: 0x%08lX" @@ -854,19 +854,19 @@ msgstr "Semua perangkat SPI sedang digunakan" msgid "error = 0x%08lX" msgstr "error = 0x%08lX" -#: ports/nrf/common-hal/busio/UART.c:122 +#: ports/nrf/common-hal/busio/UART.c:95 msgid "Invalid buffer size" msgstr "Ukuran buffer tidak valid" -#: ports/nrf/common-hal/busio/UART.c:126 +#: ports/nrf/common-hal/busio/UART.c:99 msgid "Odd parity is not supported" msgstr "Parity ganjil tidak didukung" -#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362 -#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372 -#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383 -#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392 -#: ports/nrf/common-hal/busio/UART.c:400 +#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339 +#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369 +#: ports/nrf/common-hal/busio/UART.c:377 msgid "busio.UART not available" msgstr "busio.UART tidak tersedia" @@ -1365,7 +1365,7 @@ msgstr "" #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 -#: shared-module/struct/__init__.c:183 +#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "" @@ -2131,7 +2131,7 @@ msgid "buffer must be a bytes-like object" msgstr "" #: shared-bindings/audioio/WaveFile.c:78 -#: shared-bindings/displayio/OnDiskBitmap.c:85 +#: shared-bindings/displayio/OnDiskBitmap.c:87 msgid "file must be a file opened in byte mode" msgstr "" @@ -2175,15 +2175,33 @@ msgstr "buffers harus mempunyai panjang yang sama" msgid "Expected a UUID" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:61 +#: shared-bindings/bleio/CharacteristicBuffer.c:39 +#, fuzzy +msgid "Not connected" +msgstr "Tidak dapat menyambungkan ke AP" + +#: shared-bindings/bleio/CharacteristicBuffer.c:74 +#, fuzzy +msgid "timeout must be >= 0.0" +msgstr "bits harus memilki nilai 8" + +#: shared-bindings/bleio/CharacteristicBuffer.c:79 #, fuzzy msgid "buffer_size must be >= 1" msgstr "buffers harus mempunyai panjang yang sama" -#: shared-bindings/bleio/CharacteristicBuffer.c:65 +#: shared-bindings/bleio/CharacteristicBuffer.c:83 msgid "Expected a Characteristic" msgstr "" +#: shared-bindings/bleio/CharacteristicBuffer.c:138 +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:147 +msgid "Not connected." +msgstr "" + #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" msgstr "" @@ -2221,16 +2239,20 @@ msgstr "" msgid "UUID integer value not in range 0 to 0xffff" msgstr "" -#: shared-bindings/bleio/UUID.c:75 -msgid "UUID value is not int or byte buffer" +#: shared-bindings/bleio/UUID.c:91 +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgstr "" -#: shared-bindings/bleio/UUID.c:79 +#: shared-bindings/bleio/UUID.c:103 +msgid "UUID value is not str, int or byte buffer" +msgstr "" + +#: shared-bindings/bleio/UUID.c:107 #, fuzzy msgid "Byte buffer must be 16 bytes." msgstr "buffers harus mempunyai panjang yang sama" -#: shared-bindings/bleio/UUID.c:120 +#: shared-bindings/bleio/UUID.c:151 msgid "not a 128-bit UUID" msgstr "" @@ -2649,11 +2671,6 @@ msgstr "" msgid "'S' and 'O' are not supported format types" msgstr "" -#: shared-module/struct/__init__.c:128 -#, fuzzy, c-format -msgid "unpack requires a buffer of %d bytes" -msgstr "Gagal untuk megalokasikan buffer RX dari %d byte" - #: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "" @@ -2749,24 +2766,28 @@ msgid "" "exit safe mode.\n" msgstr "" -#~ msgid "Invalid UUID string length" -#~ msgstr "Panjang string UUID tidak valid" - #~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "" -#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut " -#~ "CIRCUITPY).\n" +#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n" + +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parameter UUID tidak valid" #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" #~ msgstr "" #~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n" -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parameter UUID tidak valid" - #~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" #~ msgstr "" -#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n" +#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut " +#~ "CIRCUITPY).\n" + +#~ msgid "Invalid UUID string length" +#~ msgstr "Panjang string UUID tidak valid" + +#, fuzzy +#~ msgid "unpack requires a buffer of %d bytes" +#~ msgstr "Gagal untuk megalokasikan buffer RX dari %d byte" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 4962a67ab..c041ec86c 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-01-20 22:46-0500\n" +"POT-Creation-Date: 2019-01-21 21:50-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -334,12 +334,12 @@ msgid "bytes > 8 bits not supported" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c:73 -#: ports/nrf/common-hal/busio/UART.c:118 +#: ports/nrf/common-hal/busio/UART.c:91 msgid "tx and rx cannot both be None" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c:146 -#: ports/nrf/common-hal/busio/UART.c:152 +#: ports/nrf/common-hal/busio/UART.c:132 msgid "Failed to allocate RX buffer" msgstr "" @@ -348,12 +348,12 @@ msgid "Could not initialize UART" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c:241 -#: ports/nrf/common-hal/busio/UART.c:197 +#: ports/nrf/common-hal/busio/UART.c:174 msgid "No RX pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c:300 -#: ports/nrf/common-hal/busio/UART.c:232 +#: ports/nrf/common-hal/busio/UART.c:209 msgid "No TX pin" msgstr "" @@ -708,7 +708,7 @@ msgstr "" msgid "Failed to read attribute value, err %0x04x" msgstr "" -#: ports/nrf/common-hal/bleio/Characteristic.c:172 +#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34 #, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "" @@ -718,7 +718,7 @@ msgstr "" msgid "Failed to write attribute value, err 0x%04x" msgstr "" -#: ports/nrf/common-hal/bleio/Characteristic.c:189 +#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54 #, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "" @@ -737,43 +737,43 @@ msgstr "" msgid "Failed to discover services" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:267 -#: ports/nrf/common-hal/bleio/Device.c:300 +#: ports/nrf/common-hal/bleio/Device.c:268 +#: ports/nrf/common-hal/bleio/Device.c:302 msgid "Failed to acquire mutex" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:278 -#: ports/nrf/common-hal/bleio/Device.c:311 -#: ports/nrf/common-hal/bleio/Device.c:342 -#: ports/nrf/common-hal/bleio/Device.c:376 +#: ports/nrf/common-hal/bleio/Device.c:280 +#: ports/nrf/common-hal/bleio/Device.c:313 +#: ports/nrf/common-hal/bleio/Device.c:344 +#: ports/nrf/common-hal/bleio/Device.c:378 msgid "Failed to release mutex" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:387 +#: ports/nrf/common-hal/bleio/Device.c:389 msgid "Failed to continue scanning" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:419 +#: ports/nrf/common-hal/bleio/Device.c:421 msgid "Failed to connect:" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:489 +#: ports/nrf/common-hal/bleio/Device.c:491 msgid "Failed to add service" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:506 +#: ports/nrf/common-hal/bleio/Device.c:508 msgid "Failed to start advertising" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:523 +#: ports/nrf/common-hal/bleio/Device.c:525 msgid "Failed to stop advertising" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:548 +#: ports/nrf/common-hal/bleio/Device.c:550 msgid "Failed to start scanning" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:564 +#: ports/nrf/common-hal/bleio/Device.c:566 msgid "Failed to create mutex" msgstr "" @@ -828,19 +828,19 @@ msgstr "" msgid "error = 0x%08lX" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:122 +#: ports/nrf/common-hal/busio/UART.c:95 msgid "Invalid buffer size" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:126 +#: ports/nrf/common-hal/busio/UART.c:99 msgid "Odd parity is not supported" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362 -#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372 -#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383 -#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392 -#: ports/nrf/common-hal/busio/UART.c:400 +#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339 +#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369 +#: ports/nrf/common-hal/busio/UART.c:377 msgid "busio.UART not available" msgstr "" @@ -1332,7 +1332,7 @@ msgstr "" #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 -#: shared-module/struct/__init__.c:183 +#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "" @@ -2098,7 +2098,7 @@ msgid "buffer must be a bytes-like object" msgstr "" #: shared-bindings/audioio/WaveFile.c:78 -#: shared-bindings/displayio/OnDiskBitmap.c:85 +#: shared-bindings/displayio/OnDiskBitmap.c:87 msgid "file must be a file opened in byte mode" msgstr "" @@ -2142,14 +2142,30 @@ msgstr "" msgid "Expected a UUID" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:61 +#: shared-bindings/bleio/CharacteristicBuffer.c:39 +msgid "Not connected" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:74 +msgid "timeout must be >= 0.0" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:79 msgid "buffer_size must be >= 1" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:65 +#: shared-bindings/bleio/CharacteristicBuffer.c:83 msgid "Expected a Characteristic" msgstr "" +#: shared-bindings/bleio/CharacteristicBuffer.c:138 +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:147 +msgid "Not connected." +msgstr "" + #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" msgstr "" @@ -2186,15 +2202,19 @@ msgstr "" msgid "UUID integer value not in range 0 to 0xffff" msgstr "" -#: shared-bindings/bleio/UUID.c:75 -msgid "UUID value is not int or byte buffer" +#: shared-bindings/bleio/UUID.c:91 +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "" + +#: shared-bindings/bleio/UUID.c:103 +msgid "UUID value is not str, int or byte buffer" msgstr "" -#: shared-bindings/bleio/UUID.c:79 +#: shared-bindings/bleio/UUID.c:107 msgid "Byte buffer must be 16 bytes." msgstr "" -#: shared-bindings/bleio/UUID.c:120 +#: shared-bindings/bleio/UUID.c:151 msgid "not a 128-bit UUID" msgstr "" @@ -2612,11 +2632,6 @@ msgstr "" msgid "'S' and 'O' are not supported format types" msgstr "" -#: shared-module/struct/__init__.c:128 -#, c-format -msgid "unpack requires a buffer of %d bytes" -msgstr "" - #: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index dfa492ed0..3a3b4da51 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-01-20 22:46-0500\n" +"POT-Creation-Date: 2019-01-21 21:50-0500\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: Sebastian Plamauer\n" "Language-Team: \n" @@ -338,12 +338,12 @@ msgid "bytes > 8 bits not supported" msgstr "bytes mit merh als 8 bits werden nicht unterstützt" #: ports/atmel-samd/common-hal/busio/UART.c:73 -#: ports/nrf/common-hal/busio/UART.c:118 +#: ports/nrf/common-hal/busio/UART.c:91 msgid "tx and rx cannot both be None" msgstr "tx und rx können nicht beide None sein" #: ports/atmel-samd/common-hal/busio/UART.c:146 -#: ports/nrf/common-hal/busio/UART.c:152 +#: ports/nrf/common-hal/busio/UART.c:132 msgid "Failed to allocate RX buffer" msgstr "Konnte keinen RX Buffer allozieren" @@ -352,12 +352,12 @@ msgid "Could not initialize UART" msgstr "Konnte UART nicht initialisieren" #: ports/atmel-samd/common-hal/busio/UART.c:241 -#: ports/nrf/common-hal/busio/UART.c:197 +#: ports/nrf/common-hal/busio/UART.c:174 msgid "No RX pin" msgstr "Kein RX Pin" #: ports/atmel-samd/common-hal/busio/UART.c:300 -#: ports/nrf/common-hal/busio/UART.c:232 +#: ports/nrf/common-hal/busio/UART.c:209 msgid "No TX pin" msgstr "Kein TX Pin" @@ -508,7 +508,8 @@ msgstr "Dateisystem kann nicht wieder gemounted werden." #: ports/esp8266/common-hal/storage/__init__.c:38 msgid "Use esptool to erase flash and re-upload Python instead" -msgstr "Benutze esptool um den flash zu löschen und stattdessen Python hochzuladen" +msgstr "" +"Benutze esptool um den flash zu löschen und stattdessen Python hochzuladen" #: ports/esp8266/esp_mphal.c:154 msgid "C-level assert" @@ -717,7 +718,7 @@ msgstr "Kann den Attributwert nicht mitteilen. Status: 0x%04x" msgid "Failed to read attribute value, err %0x04x" msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x" -#: ports/nrf/common-hal/bleio/Characteristic.c:172 +#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34 #, fuzzy, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x" @@ -727,7 +728,7 @@ msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x" msgid "Failed to write attribute value, err 0x%04x" msgstr "Kann den Attributwert nicht schreiben. Status: 0x%04x" -#: ports/nrf/common-hal/bleio/Characteristic.c:189 +#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54 #, fuzzy, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "Mutex konnte nicht freigegeben werden. Status: 0x%04x" @@ -748,51 +749,51 @@ msgstr "Daten sind zu groß für das advertisement packet" msgid "Failed to discover services" msgstr "Es konnten keine Dienste gefunden werden" -#: ports/nrf/common-hal/bleio/Device.c:267 -#: ports/nrf/common-hal/bleio/Device.c:300 +#: ports/nrf/common-hal/bleio/Device.c:268 +#: ports/nrf/common-hal/bleio/Device.c:302 #, fuzzy msgid "Failed to acquire mutex" msgstr "Akquirieren des Mutex gescheitert" -#: ports/nrf/common-hal/bleio/Device.c:278 -#: ports/nrf/common-hal/bleio/Device.c:311 -#: ports/nrf/common-hal/bleio/Device.c:342 -#: ports/nrf/common-hal/bleio/Device.c:376 +#: ports/nrf/common-hal/bleio/Device.c:280 +#: ports/nrf/common-hal/bleio/Device.c:313 +#: ports/nrf/common-hal/bleio/Device.c:344 +#: ports/nrf/common-hal/bleio/Device.c:378 #, fuzzy msgid "Failed to release mutex" msgstr "Loslassen des Mutex gescheitert" -#: ports/nrf/common-hal/bleio/Device.c:387 +#: ports/nrf/common-hal/bleio/Device.c:389 #, fuzzy msgid "Failed to continue scanning" msgstr "Der Scanvorgang kann nicht fortgesetzt werden" -#: ports/nrf/common-hal/bleio/Device.c:419 +#: ports/nrf/common-hal/bleio/Device.c:421 #, fuzzy msgid "Failed to connect:" msgstr "Das Verbinden ist fehlgeschlagen:" -#: ports/nrf/common-hal/bleio/Device.c:489 +#: ports/nrf/common-hal/bleio/Device.c:491 #, fuzzy msgid "Failed to add service" msgstr "Dienst konnte nicht hinzugefügt werden" -#: ports/nrf/common-hal/bleio/Device.c:506 +#: ports/nrf/common-hal/bleio/Device.c:508 #, fuzzy msgid "Failed to start advertising" msgstr "Kann advertisement nicht starten" -#: ports/nrf/common-hal/bleio/Device.c:523 +#: ports/nrf/common-hal/bleio/Device.c:525 #, fuzzy msgid "Failed to stop advertising" msgstr "Kann advertisement nicht stoppen" -#: ports/nrf/common-hal/bleio/Device.c:548 +#: ports/nrf/common-hal/bleio/Device.c:550 #, fuzzy msgid "Failed to start scanning" msgstr "Der Scanvorgang kann nicht gestartet werden" -#: ports/nrf/common-hal/bleio/Device.c:564 +#: ports/nrf/common-hal/bleio/Device.c:566 #, fuzzy msgid "Failed to create mutex" msgstr "Erstellen des Mutex ist fehlgeschlagen" @@ -850,21 +851,21 @@ msgstr "Alle SPI-Peripheriegeräte sind in Benutzung" msgid "error = 0x%08lX" msgstr "error = 0x%08lX" -#: ports/nrf/common-hal/busio/UART.c:122 +#: ports/nrf/common-hal/busio/UART.c:95 #, fuzzy msgid "Invalid buffer size" msgstr "Ungültige Puffergröße" -#: ports/nrf/common-hal/busio/UART.c:126 +#: ports/nrf/common-hal/busio/UART.c:99 #, fuzzy msgid "Odd parity is not supported" msgstr "bytes mit mehr als 8 bits werden nicht unterstützt" -#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362 -#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372 -#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383 -#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392 -#: ports/nrf/common-hal/busio/UART.c:400 +#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339 +#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369 +#: ports/nrf/common-hal/busio/UART.c:377 msgid "busio.UART not available" msgstr "Kann busio.UART nicht finden" @@ -1360,7 +1361,7 @@ msgstr "" #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 -#: shared-module/struct/__init__.c:183 +#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "" @@ -2129,7 +2130,7 @@ msgid "buffer must be a bytes-like object" msgstr "" #: shared-bindings/audioio/WaveFile.c:78 -#: shared-bindings/displayio/OnDiskBitmap.c:85 +#: shared-bindings/displayio/OnDiskBitmap.c:87 msgid "file must be a file opened in byte mode" msgstr "" @@ -2173,16 +2174,35 @@ msgstr "Buffer müssen gleich lang sein" msgid "Expected a UUID" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:61 +#: shared-bindings/bleio/CharacteristicBuffer.c:39 +#, fuzzy +msgid "Not connected" +msgstr "Kann nicht zu AP verbinden" + +#: shared-bindings/bleio/CharacteristicBuffer.c:74 +#, fuzzy +msgid "timeout must be >= 0.0" +msgstr "bits müssen 8 sein" + +#: shared-bindings/bleio/CharacteristicBuffer.c:79 #, fuzzy msgid "buffer_size must be >= 1" msgstr "Buffer müssen gleich lang sein" -#: shared-bindings/bleio/CharacteristicBuffer.c:65 +#: shared-bindings/bleio/CharacteristicBuffer.c:83 #, fuzzy msgid "Expected a Characteristic" msgstr "Kann das Merkmal nicht hinzufügen." +#: shared-bindings/bleio/CharacteristicBuffer.c:138 +#, fuzzy +msgid "CharacteristicBuffer writing not provided" +msgstr "Merkmal wird bereits von einem anderen Dienst verwendet." + +#: shared-bindings/bleio/CharacteristicBuffer.c:147 +msgid "Not connected." +msgstr "" + #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" msgstr "" @@ -2220,16 +2240,20 @@ msgstr "" msgid "UUID integer value not in range 0 to 0xffff" msgstr "" -#: shared-bindings/bleio/UUID.c:75 -msgid "UUID value is not int or byte buffer" +#: shared-bindings/bleio/UUID.c:91 +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "" + +#: shared-bindings/bleio/UUID.c:103 +msgid "UUID value is not str, int or byte buffer" msgstr "" -#: shared-bindings/bleio/UUID.c:79 +#: shared-bindings/bleio/UUID.c:107 #, fuzzy msgid "Byte buffer must be 16 bytes." msgstr "Buffer müssen gleich lang sein" -#: shared-bindings/bleio/UUID.c:120 +#: shared-bindings/bleio/UUID.c:151 msgid "not a 128-bit UUID" msgstr "" @@ -2650,11 +2674,6 @@ msgstr "Kann '/' nicht remounten when USB aktiv ist" msgid "'S' and 'O' are not supported format types" msgstr "" -#: shared-module/struct/__init__.c:128 -#, fuzzy, c-format -msgid "unpack requires a buffer of %d bytes" -msgstr "Konnte keine RX Buffer mit %d allozieren" - #: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "" @@ -2748,29 +2767,22 @@ msgid "" "exit safe mode.\n" msgstr "" -#~ msgid "Can not add Characteristic." -#~ msgstr "Kann das Merkmal nicht hinzufügen." - -#~ msgid "Can not add Service." -#~ msgstr "Kann den Dienst nicht hinzufügen." - -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "CircuitPython ist abgestürzt. Ups!\n" - -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" +#~ msgid "Invalid UUID string length" +#~ msgstr "Ungültige UUID-Stringlänge" -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Kann GAP Parameter nicht anwenden." +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Kann UUID in das advertisement packet kodieren." -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen." +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n" -#~ msgid "Can not query for the device address." -#~ msgstr "Kann nicht nach der Geräteadresse suchen." +#~ msgid "Invalid UUID parameter" +#~ msgstr "Ungültiger UUID-Parameter" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." +#~ msgid "Invalid Service type" +#~ msgstr "Ungültiger Diensttyp" #~ msgid "" #~ "enough power for the whole circuit and press reset (after ejecting " @@ -2779,19 +2791,30 @@ msgstr "" #~ "genug Strom für den ganzen Schaltkreis liefert und drücke reset (nach dem " #~ "sicheren Auswerfen von CIRCUITPY.)\n" -#~ msgid "Invalid Service type" -#~ msgstr "Ungültiger Diensttyp" +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." -#~ msgid "Invalid UUID parameter" -#~ msgstr "Ungültiger UUID-Parameter" +#~ msgid "Can not query for the device address." +#~ msgstr "Kann nicht nach der Geräteadresse suchen." -#~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" -#~ msgstr "" -#~ "Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n" +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen." -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Kann UUID in das advertisement packet kodieren." +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Kann GAP Parameter nicht anwenden." -#~ msgid "Invalid UUID string length" -#~ msgstr "Ungültige UUID-Stringlänge" +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" + +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "CircuitPython ist abgestürzt. Ups!\n" + +#~ msgid "Can not add Service." +#~ msgstr "Kann den Dienst nicht hinzufügen." + +#~ msgid "Can not add Characteristic." +#~ msgstr "Kann das Merkmal nicht hinzufügen." + +#, fuzzy +#~ msgid "unpack requires a buffer of %d bytes" +#~ msgstr "Konnte keine RX Buffer mit %d allozieren" diff --git a/locale/en_US.po b/locale/en_US.po index 33b1e614b..d62e9fd20 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-01-20 22:46-0500\n" +"POT-Creation-Date: 2019-01-21 21:50-0500\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -334,12 +334,12 @@ msgid "bytes > 8 bits not supported" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c:73 -#: ports/nrf/common-hal/busio/UART.c:118 +#: ports/nrf/common-hal/busio/UART.c:91 msgid "tx and rx cannot both be None" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c:146 -#: ports/nrf/common-hal/busio/UART.c:152 +#: ports/nrf/common-hal/busio/UART.c:132 msgid "Failed to allocate RX buffer" msgstr "" @@ -348,12 +348,12 @@ msgid "Could not initialize UART" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c:241 -#: ports/nrf/common-hal/busio/UART.c:197 +#: ports/nrf/common-hal/busio/UART.c:174 msgid "No RX pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c:300 -#: ports/nrf/common-hal/busio/UART.c:232 +#: ports/nrf/common-hal/busio/UART.c:209 msgid "No TX pin" msgstr "" @@ -708,7 +708,7 @@ msgstr "" msgid "Failed to read attribute value, err %0x04x" msgstr "" -#: ports/nrf/common-hal/bleio/Characteristic.c:172 +#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34 #, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "" @@ -718,7 +718,7 @@ msgstr "" msgid "Failed to write attribute value, err 0x%04x" msgstr "" -#: ports/nrf/common-hal/bleio/Characteristic.c:189 +#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54 #, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "" @@ -737,43 +737,43 @@ msgstr "" msgid "Failed to discover services" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:267 -#: ports/nrf/common-hal/bleio/Device.c:300 +#: ports/nrf/common-hal/bleio/Device.c:268 +#: ports/nrf/common-hal/bleio/Device.c:302 msgid "Failed to acquire mutex" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:278 -#: ports/nrf/common-hal/bleio/Device.c:311 -#: ports/nrf/common-hal/bleio/Device.c:342 -#: ports/nrf/common-hal/bleio/Device.c:376 +#: ports/nrf/common-hal/bleio/Device.c:280 +#: ports/nrf/common-hal/bleio/Device.c:313 +#: ports/nrf/common-hal/bleio/Device.c:344 +#: ports/nrf/common-hal/bleio/Device.c:378 msgid "Failed to release mutex" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:387 +#: ports/nrf/common-hal/bleio/Device.c:389 msgid "Failed to continue scanning" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:419 +#: ports/nrf/common-hal/bleio/Device.c:421 msgid "Failed to connect:" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:489 +#: ports/nrf/common-hal/bleio/Device.c:491 msgid "Failed to add service" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:506 +#: ports/nrf/common-hal/bleio/Device.c:508 msgid "Failed to start advertising" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:523 +#: ports/nrf/common-hal/bleio/Device.c:525 msgid "Failed to stop advertising" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:548 +#: ports/nrf/common-hal/bleio/Device.c:550 msgid "Failed to start scanning" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:564 +#: ports/nrf/common-hal/bleio/Device.c:566 msgid "Failed to create mutex" msgstr "" @@ -828,19 +828,19 @@ msgstr "" msgid "error = 0x%08lX" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:122 +#: ports/nrf/common-hal/busio/UART.c:95 msgid "Invalid buffer size" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:126 +#: ports/nrf/common-hal/busio/UART.c:99 msgid "Odd parity is not supported" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362 -#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372 -#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383 -#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392 -#: ports/nrf/common-hal/busio/UART.c:400 +#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339 +#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369 +#: ports/nrf/common-hal/busio/UART.c:377 msgid "busio.UART not available" msgstr "" @@ -1332,7 +1332,7 @@ msgstr "" #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 -#: shared-module/struct/__init__.c:183 +#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "" @@ -2098,7 +2098,7 @@ msgid "buffer must be a bytes-like object" msgstr "" #: shared-bindings/audioio/WaveFile.c:78 -#: shared-bindings/displayio/OnDiskBitmap.c:85 +#: shared-bindings/displayio/OnDiskBitmap.c:87 msgid "file must be a file opened in byte mode" msgstr "" @@ -2142,14 +2142,30 @@ msgstr "" msgid "Expected a UUID" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:61 +#: shared-bindings/bleio/CharacteristicBuffer.c:39 +msgid "Not connected" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:74 +msgid "timeout must be >= 0.0" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:79 msgid "buffer_size must be >= 1" msgstr "" -#: shared-bindings/bleio/CharacteristicBuffer.c:65 +#: shared-bindings/bleio/CharacteristicBuffer.c:83 msgid "Expected a Characteristic" msgstr "" +#: shared-bindings/bleio/CharacteristicBuffer.c:138 +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:147 +msgid "Not connected." +msgstr "" + #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" msgstr "" @@ -2186,15 +2202,19 @@ msgstr "" msgid "UUID integer value not in range 0 to 0xffff" msgstr "" -#: shared-bindings/bleio/UUID.c:75 -msgid "UUID value is not int or byte buffer" +#: shared-bindings/bleio/UUID.c:91 +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "" + +#: shared-bindings/bleio/UUID.c:103 +msgid "UUID value is not str, int or byte buffer" msgstr "" -#: shared-bindings/bleio/UUID.c:79 +#: shared-bindings/bleio/UUID.c:107 msgid "Byte buffer must be 16 bytes." msgstr "" -#: shared-bindings/bleio/UUID.c:120 +#: shared-bindings/bleio/UUID.c:151 msgid "not a 128-bit UUID" msgstr "" @@ -2612,11 +2632,6 @@ msgstr "" msgid "'S' and 'O' are not supported format types" msgstr "" -#: shared-module/struct/__init__.c:128 -#, c-format -msgid "unpack requires a buffer of %d bytes" -msgstr "" - #: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "" diff --git a/locale/es.po b/locale/es.po index 6daa4170b..446fe7bc5 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-01-20 22:46-0500\n" +"POT-Creation-Date: 2019-01-21 21:50-0500\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -340,12 +340,12 @@ msgid "bytes > 8 bits not supported" msgstr "bytes > 8 bits no soportados" #: ports/atmel-samd/common-hal/busio/UART.c:73 -#: ports/nrf/common-hal/busio/UART.c:118 +#: ports/nrf/common-hal/busio/UART.c:91 msgid "tx and rx cannot both be None" msgstr "Ambos tx y rx no pueden ser None" #: ports/atmel-samd/common-hal/busio/UART.c:146 -#: ports/nrf/common-hal/busio/UART.c:152 +#: ports/nrf/common-hal/busio/UART.c:132 msgid "Failed to allocate RX buffer" msgstr "Ha fallado la asignación del buffer RX" @@ -354,12 +354,12 @@ msgid "Could not initialize UART" msgstr "No se puede inicializar la UART" #: ports/atmel-samd/common-hal/busio/UART.c:241 -#: ports/nrf/common-hal/busio/UART.c:197 +#: ports/nrf/common-hal/busio/UART.c:174 msgid "No RX pin" msgstr "Sin pin RX" #: ports/atmel-samd/common-hal/busio/UART.c:300 -#: ports/nrf/common-hal/busio/UART.c:232 +#: ports/nrf/common-hal/busio/UART.c:209 msgid "No TX pin" msgstr "Sin pin TX" @@ -720,7 +720,7 @@ msgstr "No se puede notificar el valor del anuncio. status: 0x%02x" msgid "Failed to read attribute value, err %0x04x" msgstr "No se puede leer el valor del atributo. status 0x%02x" -#: ports/nrf/common-hal/bleio/Characteristic.c:172 +#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34 #, fuzzy, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "No se puede adquirir el mutex, status: 0x%08lX" @@ -730,7 +730,7 @@ msgstr "No se puede adquirir el mutex, status: 0x%08lX" msgid "Failed to write attribute value, err 0x%04x" msgstr "No se puede escribir el valor del atributo. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Characteristic.c:189 +#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54 #, fuzzy, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "No se puede liberar el mutex, status: 0x%08lX" @@ -751,51 +751,51 @@ msgstr "Los datos no caben en el paquete de anuncio." msgid "Failed to discover services" msgstr "No se puede descubrir servicios, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:267 -#: ports/nrf/common-hal/bleio/Device.c:300 +#: ports/nrf/common-hal/bleio/Device.c:268 +#: ports/nrf/common-hal/bleio/Device.c:302 #, fuzzy msgid "Failed to acquire mutex" msgstr "No se puede adquirir el mutex, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:278 -#: ports/nrf/common-hal/bleio/Device.c:311 -#: ports/nrf/common-hal/bleio/Device.c:342 -#: ports/nrf/common-hal/bleio/Device.c:376 +#: ports/nrf/common-hal/bleio/Device.c:280 +#: ports/nrf/common-hal/bleio/Device.c:313 +#: ports/nrf/common-hal/bleio/Device.c:344 +#: ports/nrf/common-hal/bleio/Device.c:378 #, fuzzy msgid "Failed to release mutex" msgstr "No se puede liberar el mutex, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:387 +#: ports/nrf/common-hal/bleio/Device.c:389 #, fuzzy msgid "Failed to continue scanning" msgstr "No se puede iniciar el escaneo. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:419 +#: ports/nrf/common-hal/bleio/Device.c:421 #, fuzzy msgid "Failed to connect:" msgstr "No se puede conectar. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:489 +#: ports/nrf/common-hal/bleio/Device.c:491 #, fuzzy msgid "Failed to add service" msgstr "No se puede detener el anuncio. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:506 +#: ports/nrf/common-hal/bleio/Device.c:508 #, fuzzy msgid "Failed to start advertising" msgstr "No se puede inicar el anuncio. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:523 +#: ports/nrf/common-hal/bleio/Device.c:525 #, fuzzy msgid "Failed to stop advertising" msgstr "No se puede detener el anuncio. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:548 +#: ports/nrf/common-hal/bleio/Device.c:550 #, fuzzy msgid "Failed to start scanning" msgstr "No se puede iniciar el escaneo. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:564 +#: ports/nrf/common-hal/bleio/Device.c:566 #, fuzzy msgid "Failed to create mutex" msgstr "No se puede leer el valor del atributo. status 0x%02x" @@ -851,19 +851,19 @@ msgstr "Todos los timers están siendo usados" msgid "error = 0x%08lX" msgstr "error = 0x%08lx" -#: ports/nrf/common-hal/busio/UART.c:122 +#: ports/nrf/common-hal/busio/UART.c:95 msgid "Invalid buffer size" msgstr "Tamaño de buffer inválido" -#: ports/nrf/common-hal/busio/UART.c:126 +#: ports/nrf/common-hal/busio/UART.c:99 msgid "Odd parity is not supported" msgstr "Paridad impar no soportada" -#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362 -#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372 -#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383 -#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392 -#: ports/nrf/common-hal/busio/UART.c:400 +#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339 +#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369 +#: ports/nrf/common-hal/busio/UART.c:377 msgid "busio.UART not available" msgstr "busio.UART no disponible" @@ -1368,7 +1368,7 @@ msgstr "" #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 -#: shared-module/struct/__init__.c:183 +#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "buffer demasiado pequeño" @@ -2147,7 +2147,7 @@ msgid "buffer must be a bytes-like object" msgstr "buffer debe de ser un objeto bytes-like" #: shared-bindings/audioio/WaveFile.c:78 -#: shared-bindings/displayio/OnDiskBitmap.c:85 +#: shared-bindings/displayio/OnDiskBitmap.c:87 msgid "file must be a file opened in byte mode" msgstr "el archivo deberia ser una archivo abierto en modo byte" @@ -2192,16 +2192,34 @@ msgstr "palette debe ser 32 bytes de largo" msgid "Expected a UUID" msgstr "Se espera un %q" -#: shared-bindings/bleio/CharacteristicBuffer.c:61 +#: shared-bindings/bleio/CharacteristicBuffer.c:39 +#, fuzzy +msgid "Not connected" +msgstr "No se puede conectar a AP" + +#: shared-bindings/bleio/CharacteristicBuffer.c:74 +#, fuzzy +msgid "timeout must be >= 0.0" +msgstr "bits debe ser 8" + +#: shared-bindings/bleio/CharacteristicBuffer.c:79 #, fuzzy msgid "buffer_size must be >= 1" msgstr "los buffers deben de tener la misma longitud" -#: shared-bindings/bleio/CharacteristicBuffer.c:65 +#: shared-bindings/bleio/CharacteristicBuffer.c:83 #, fuzzy msgid "Expected a Characteristic" msgstr "No se puede agregar la Característica." +#: shared-bindings/bleio/CharacteristicBuffer.c:138 +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:147 +msgid "Not connected." +msgstr "" + #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" msgstr "No se pueden agregar servicio en modo Central" @@ -2239,16 +2257,20 @@ msgstr "" msgid "UUID integer value not in range 0 to 0xffff" msgstr "" -#: shared-bindings/bleio/UUID.c:75 -msgid "UUID value is not int or byte buffer" +#: shared-bindings/bleio/UUID.c:91 +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "" + +#: shared-bindings/bleio/UUID.c:103 +msgid "UUID value is not str, int or byte buffer" msgstr "" -#: shared-bindings/bleio/UUID.c:79 +#: shared-bindings/bleio/UUID.c:107 #, fuzzy msgid "Byte buffer must be 16 bytes." msgstr "buffer debe de ser un objeto bytes-like" -#: shared-bindings/bleio/UUID.c:120 +#: shared-bindings/bleio/UUID.c:151 msgid "not a 128-bit UUID" msgstr "" @@ -2673,11 +2695,6 @@ msgstr "No se puede volver a montar '/' cuando el USB esta activo." msgid "'S' and 'O' are not supported format types" msgstr "'S' y 'O' no son compatibles con los tipos de formato" -#: shared-module/struct/__init__.c:128 -#, fuzzy, c-format -msgid "unpack requires a buffer of %d bytes" -msgstr "Falló la asignación del buffer RX de %d bytes" - #: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "demasiados argumentos provistos con el formato dado" @@ -2781,32 +2798,31 @@ msgstr "" "El botón reset fue presionado mientras arrancaba CircuitPython. Presiona " "otra vez para salir del modo seguro.\n" -#~ msgid "Baud rate too high for this SPI peripheral" -#~ msgstr "Baud rate demasiado alto para este periférico SPI" - -#~ msgid "Invalid Service type" -#~ msgstr "Tipo de Servicio inválido" - -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x" +#~ msgid "Invalid UUID string length" +#~ msgstr "Longitud de string UUID inválida" -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parámetro UUID inválido" -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "No se puede codificar el UUID, para revisar la longitud." +#~ msgid "Can not query for the device address." +#~ msgstr "No se puede consultar la dirección del dispositivo." -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "No se pueden aplicar los parámetros GAP." +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n" -#~ msgid "Can not add Service." -#~ msgstr "No se puede agregar el Servicio." +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "No se pueden establecer los parámetros PPCP." -#~ msgid "Wrong number of bytes provided" -#~ msgstr "Numero erroneo de bytes dados" +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "suficiente poder para todo el circuito y presiona reset (después de " +#~ "expulsar CIRCUITPY).\n" -#~ msgid "Wrong address length" -#~ msgstr "Longitud de address erronea" +#~ msgid "Can not apply device name in the stack." +#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." #, fuzzy #~ msgid "" @@ -2815,28 +2831,33 @@ msgstr "" #~ "Por favor registra un issue en la siguiente URL con el contenidos de tu " #~ "unidad de almacenamiento CIRCUITPY:\n" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." +#~ msgid "Wrong address length" +#~ msgstr "Longitud de address erronea" -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "suficiente poder para todo el circuito y presiona reset (después de " -#~ "expulsar CIRCUITPY).\n" +#~ msgid "Wrong number of bytes provided" +#~ msgstr "Numero erroneo de bytes dados" -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "No se pueden establecer los parámetros PPCP." +#~ msgid "Can not add Service." +#~ msgstr "No se puede agregar el Servicio." -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "No se pueden aplicar los parámetros GAP." -#~ msgid "Can not query for the device address." -#~ msgstr "No se puede consultar la dirección del dispositivo." +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "No se puede codificar el UUID, para revisar la longitud." -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parámetro UUID inválido" +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." -#~ msgid "Invalid UUID string length" -#~ msgstr "Longitud de string UUID inválida" +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x" + +#~ msgid "Invalid Service type" +#~ msgstr "Tipo de Servicio inválido" + +#~ msgid "Baud rate too high for this SPI peripheral" +#~ msgstr "Baud rate demasiado alto para este periférico SPI" + +#, fuzzy +#~ msgid "unpack requires a buffer of %d bytes" +#~ msgstr "Falló la asignación del buffer RX de %d bytes" diff --git a/locale/fil.po b/locale/fil.po index 8d112726e..ad9134f8e 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-01-20 22:46-0500\n" +"POT-Creation-Date: 2019-01-21 21:50-0500\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -338,12 +338,12 @@ msgid "bytes > 8 bits not supported" msgstr "hindi sinusuportahan ang bytes > 8 bits" #: ports/atmel-samd/common-hal/busio/UART.c:73 -#: ports/nrf/common-hal/busio/UART.c:118 +#: ports/nrf/common-hal/busio/UART.c:91 msgid "tx and rx cannot both be None" msgstr "tx at rx hindi pwedeng parehas na None" #: ports/atmel-samd/common-hal/busio/UART.c:146 -#: ports/nrf/common-hal/busio/UART.c:152 +#: ports/nrf/common-hal/busio/UART.c:132 msgid "Failed to allocate RX buffer" msgstr "Nabigong ilaan ang RX buffer" @@ -352,12 +352,12 @@ msgid "Could not initialize UART" msgstr "Hindi ma-initialize ang UART" #: ports/atmel-samd/common-hal/busio/UART.c:241 -#: ports/nrf/common-hal/busio/UART.c:197 +#: ports/nrf/common-hal/busio/UART.c:174 msgid "No RX pin" msgstr "Walang RX pin" #: ports/atmel-samd/common-hal/busio/UART.c:300 -#: ports/nrf/common-hal/busio/UART.c:232 +#: ports/nrf/common-hal/busio/UART.c:209 msgid "No TX pin" msgstr "Walang TX pin" @@ -720,7 +720,7 @@ msgstr "Hindi mabalitaan ang attribute value, status: 0x%08lX" msgid "Failed to read attribute value, err %0x04x" msgstr "Hindi mabasa ang value ng attribute, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Characteristic.c:172 +#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34 #, fuzzy, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX" @@ -730,7 +730,7 @@ msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX" msgid "Failed to write attribute value, err 0x%04x" msgstr "Hindi maisulat ang attribute value, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Characteristic.c:189 +#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54 #, fuzzy, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX" @@ -751,51 +751,51 @@ msgstr "Hindi makasya ang data sa loob ng advertisement packet" msgid "Failed to discover services" msgstr "Nabigo sa pagdiscover ng services, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:267 -#: ports/nrf/common-hal/bleio/Device.c:300 +#: ports/nrf/common-hal/bleio/Device.c:268 +#: ports/nrf/common-hal/bleio/Device.c:302 #, fuzzy msgid "Failed to acquire mutex" msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:278 -#: ports/nrf/common-hal/bleio/Device.c:311 -#: ports/nrf/common-hal/bleio/Device.c:342 -#: ports/nrf/common-hal/bleio/Device.c:376 +#: ports/nrf/common-hal/bleio/Device.c:280 +#: ports/nrf/common-hal/bleio/Device.c:313 +#: ports/nrf/common-hal/bleio/Device.c:344 +#: ports/nrf/common-hal/bleio/Device.c:378 #, fuzzy msgid "Failed to release mutex" msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:387 +#: ports/nrf/common-hal/bleio/Device.c:389 #, fuzzy msgid "Failed to continue scanning" msgstr "Hindi maituloy ang pag scan, status: 0x%0xlX" -#: ports/nrf/common-hal/bleio/Device.c:419 +#: ports/nrf/common-hal/bleio/Device.c:421 #, fuzzy msgid "Failed to connect:" msgstr "Hindi makaconnect, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:489 +#: ports/nrf/common-hal/bleio/Device.c:491 #, fuzzy msgid "Failed to add service" msgstr "Hindi matagumpay ang paglagay ng service, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:506 +#: ports/nrf/common-hal/bleio/Device.c:508 #, fuzzy msgid "Failed to start advertising" msgstr "Hindi masimulaan ang advertisement, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:523 +#: ports/nrf/common-hal/bleio/Device.c:525 #, fuzzy msgid "Failed to stop advertising" msgstr "Hindi mahinto ang advertisement, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:548 +#: ports/nrf/common-hal/bleio/Device.c:550 #, fuzzy msgid "Failed to start scanning" msgstr "Hindi masimulaan mag i-scan, status: 0x%0xlX" -#: ports/nrf/common-hal/bleio/Device.c:564 +#: ports/nrf/common-hal/bleio/Device.c:566 #, fuzzy msgid "Failed to create mutex" msgstr "Hindi matagumpay ang pagbuo ng mutex, status: 0x%0xlX" @@ -852,19 +852,19 @@ msgstr "Lahat ng SPI peripherals ay ginagamit" msgid "error = 0x%08lX" msgstr "error = 0x%08lX" -#: ports/nrf/common-hal/busio/UART.c:122 +#: ports/nrf/common-hal/busio/UART.c:95 msgid "Invalid buffer size" msgstr "Mali ang buffer size" -#: ports/nrf/common-hal/busio/UART.c:126 +#: ports/nrf/common-hal/busio/UART.c:99 msgid "Odd parity is not supported" msgstr "Odd na parity ay hindi supportado" -#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362 -#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372 -#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383 -#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392 -#: ports/nrf/common-hal/busio/UART.c:400 +#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339 +#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369 +#: ports/nrf/common-hal/busio/UART.c:377 msgid "busio.UART not available" msgstr "busio.UART hindi available" @@ -1369,7 +1369,7 @@ msgstr "puno na ang schedule stack" #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 -#: shared-module/struct/__init__.c:183 +#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "masyadong maliit ang buffer" @@ -2152,7 +2152,7 @@ msgid "buffer must be a bytes-like object" msgstr "buffer ay dapat bytes-like object" #: shared-bindings/audioio/WaveFile.c:78 -#: shared-bindings/displayio/OnDiskBitmap.c:85 +#: shared-bindings/displayio/OnDiskBitmap.c:87 msgid "file must be a file opened in byte mode" msgstr "file ay dapat buksan sa byte mode" @@ -2197,16 +2197,34 @@ msgstr "ang palette ay dapat 32 bytes ang haba" msgid "Expected a UUID" msgstr "Umasa ng %q" -#: shared-bindings/bleio/CharacteristicBuffer.c:61 +#: shared-bindings/bleio/CharacteristicBuffer.c:39 +#, fuzzy +msgid "Not connected" +msgstr "Hindi maka connect sa AP" + +#: shared-bindings/bleio/CharacteristicBuffer.c:74 +#, fuzzy +msgid "timeout must be >= 0.0" +msgstr "bits ay dapat walo (8)" + +#: shared-bindings/bleio/CharacteristicBuffer.c:79 #, fuzzy msgid "buffer_size must be >= 1" msgstr "aarehas na haba dapat ang buffer slices" -#: shared-bindings/bleio/CharacteristicBuffer.c:65 +#: shared-bindings/bleio/CharacteristicBuffer.c:83 #, fuzzy msgid "Expected a Characteristic" msgstr "Hindi mabasa and Characteristic." +#: shared-bindings/bleio/CharacteristicBuffer.c:138 +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:147 +msgid "Not connected." +msgstr "" + #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" msgstr "Hindi maarang maglagay ng service sa Central mode" @@ -2244,16 +2262,20 @@ msgstr "" msgid "UUID integer value not in range 0 to 0xffff" msgstr "" -#: shared-bindings/bleio/UUID.c:75 -msgid "UUID value is not int or byte buffer" +#: shared-bindings/bleio/UUID.c:91 +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgstr "" -#: shared-bindings/bleio/UUID.c:79 +#: shared-bindings/bleio/UUID.c:103 +msgid "UUID value is not str, int or byte buffer" +msgstr "" + +#: shared-bindings/bleio/UUID.c:107 #, fuzzy msgid "Byte buffer must be 16 bytes." msgstr "buffer ay dapat bytes-like object" -#: shared-bindings/bleio/UUID.c:120 +#: shared-bindings/bleio/UUID.c:151 msgid "not a 128-bit UUID" msgstr "" @@ -2679,11 +2701,6 @@ msgstr "Hindi ma-remount '/' kapag aktibo ang USB." msgid "'S' and 'O' are not supported format types" msgstr "Ang 'S' at 'O' ay hindi suportadong uri ng format" -#: shared-module/struct/__init__.c:128 -#, fuzzy, c-format -msgid "unpack requires a buffer of %d bytes" -msgstr "Nabigong ilaan ang RX buffer ng %d bytes" - #: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format" @@ -2787,33 +2804,31 @@ msgstr "" "Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin " "ulit para lumabas sa safe mode.\n" -#, fuzzy -#~ msgid "palette must be displayio.Palette" -#~ msgstr "ang palette ay dapat 32 bytes ang haba" - -#~ msgid "Invalid Service type" -#~ msgstr "Mali ang tipo ng serbisyo" - -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x" +#~ msgid "Invalid UUID string length" +#~ msgstr "Mali ang UUID string length" -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Maaring i-encode ang UUID sa advertisement packet." +#~ msgid "Invalid UUID parameter" +#~ msgstr "Mali ang UUID parameter" -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Hindi ma-encode UUID, para suriin ang haba." +#~ msgid "Can not query for the device address." +#~ msgstr "Hindi maaaring mag-query para sa address ng device." -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Hindi ma-apply ang GAP parameters." +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n" -#~ msgid "Can not add Service." -#~ msgstr "Hindi maidaragdag ang serbisyo." +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Hindi ma-set ang PPCP parameters." -#~ msgid "Wrong number of bytes provided" -#~ msgstr "Mali ang bilang ng bytes" +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang " +#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n" -#~ msgid "Wrong address length" -#~ msgstr "Mali ang address length" +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." #~ msgid "" #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" @@ -2821,28 +2836,34 @@ msgstr "" #~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY " #~ "drive:\n" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." +#~ msgid "Wrong address length" +#~ msgstr "Mali ang address length" -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang " -#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n" +#~ msgid "Wrong number of bytes provided" +#~ msgstr "Mali ang bilang ng bytes" -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Hindi ma-set ang PPCP parameters." +#~ msgid "Can not add Service." +#~ msgstr "Hindi maidaragdag ang serbisyo." -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Hindi ma-apply ang GAP parameters." -#~ msgid "Can not query for the device address." -#~ msgstr "Hindi maaaring mag-query para sa address ng device." +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Hindi ma-encode UUID, para suriin ang haba." -#~ msgid "Invalid UUID parameter" -#~ msgstr "Mali ang UUID parameter" +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Maaring i-encode ang UUID sa advertisement packet." -#~ msgid "Invalid UUID string length" -#~ msgstr "Mali ang UUID string length" +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x" + +#~ msgid "Invalid Service type" +#~ msgstr "Mali ang tipo ng serbisyo" + +#, fuzzy +#~ msgid "palette must be displayio.Palette" +#~ msgstr "ang palette ay dapat 32 bytes ang haba" + +#, fuzzy +#~ msgid "unpack requires a buffer of %d bytes" +#~ msgstr "Nabigong ilaan ang RX buffer ng %d bytes" diff --git a/locale/fr.po b/locale/fr.po index 2110a4c6e..4c7fb0502 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-20 22:46-0500\n" +"POT-Creation-Date: 2019-01-21 21:50-0500\n" "PO-Revision-Date: 2018-12-23 20:05+0100\n" "Last-Translator: Pierrick Couturier \n" "Language-Team: fr\n" @@ -335,12 +335,12 @@ msgid "bytes > 8 bits not supported" msgstr "octets > 8 bits non supporté" #: ports/atmel-samd/common-hal/busio/UART.c:73 -#: ports/nrf/common-hal/busio/UART.c:118 +#: ports/nrf/common-hal/busio/UART.c:91 msgid "tx and rx cannot both be None" msgstr "tx et rx ne peuvent être None tous les deux" #: ports/atmel-samd/common-hal/busio/UART.c:146 -#: ports/nrf/common-hal/busio/UART.c:152 +#: ports/nrf/common-hal/busio/UART.c:132 msgid "Failed to allocate RX buffer" msgstr "Echec de l'allocation du tampon RX" @@ -349,12 +349,12 @@ msgid "Could not initialize UART" msgstr "L'UART n'a pu être initialisé" #: ports/atmel-samd/common-hal/busio/UART.c:241 -#: ports/nrf/common-hal/busio/UART.c:197 +#: ports/nrf/common-hal/busio/UART.c:174 msgid "No RX pin" msgstr "Pas de broche RX" #: ports/atmel-samd/common-hal/busio/UART.c:300 -#: ports/nrf/common-hal/busio/UART.c:232 +#: ports/nrf/common-hal/busio/UART.c:209 msgid "No TX pin" msgstr "Pas de broche TX" @@ -717,7 +717,7 @@ msgstr "Impossible de notifier la valeur de l'attribut. status: 0x%08lX" msgid "Failed to read attribute value, err %0x04x" msgstr "Impossible de lire la valeur de l'attribut. status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Characteristic.c:172 +#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34 #, fuzzy, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "Echec de l'obtention de mutex, status: 0x%08lX" @@ -727,7 +727,7 @@ msgstr "Echec de l'obtention de mutex, status: 0x%08lX" msgid "Failed to write attribute value, err 0x%04x" msgstr "Impossible d'écrire la valeur de l'attribut. status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Characteristic.c:189 +#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54 #, fuzzy, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "Impossible de libérer mutex, status: 0x%08lX" @@ -747,51 +747,51 @@ msgstr "" msgid "Failed to discover services" msgstr "Echec de la découverte de services, statut: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:267 -#: ports/nrf/common-hal/bleio/Device.c:300 +#: ports/nrf/common-hal/bleio/Device.c:268 +#: ports/nrf/common-hal/bleio/Device.c:302 #, fuzzy msgid "Failed to acquire mutex" msgstr "Echec de l'obtention de mutex, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:278 -#: ports/nrf/common-hal/bleio/Device.c:311 -#: ports/nrf/common-hal/bleio/Device.c:342 -#: ports/nrf/common-hal/bleio/Device.c:376 +#: ports/nrf/common-hal/bleio/Device.c:280 +#: ports/nrf/common-hal/bleio/Device.c:313 +#: ports/nrf/common-hal/bleio/Device.c:344 +#: ports/nrf/common-hal/bleio/Device.c:378 #, fuzzy msgid "Failed to release mutex" msgstr "Impossible de libérer mutex, status: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:387 +#: ports/nrf/common-hal/bleio/Device.c:389 #, fuzzy msgid "Failed to continue scanning" msgstr "Impossible de commencer à scanner. statut: 0x%0xlX" -#: ports/nrf/common-hal/bleio/Device.c:419 +#: ports/nrf/common-hal/bleio/Device.c:421 #, fuzzy msgid "Failed to connect:" msgstr "Connection impossible. statut: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:489 +#: ports/nrf/common-hal/bleio/Device.c:491 #, fuzzy msgid "Failed to add service" msgstr "Echec de l'ajout de service, statut: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:506 +#: ports/nrf/common-hal/bleio/Device.c:508 #, fuzzy msgid "Failed to start advertising" msgstr "Echec de l'ajout de service, statut: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:523 +#: ports/nrf/common-hal/bleio/Device.c:525 #, fuzzy msgid "Failed to stop advertising" msgstr "Echec de l'ajout de service, statut: 0x%08lX" -#: ports/nrf/common-hal/bleio/Device.c:548 +#: ports/nrf/common-hal/bleio/Device.c:550 #, fuzzy msgid "Failed to start scanning" msgstr "Impossible de commencer à scanner, statut: 0x%0xlX" -#: ports/nrf/common-hal/bleio/Device.c:564 +#: ports/nrf/common-hal/bleio/Device.c:566 #, fuzzy msgid "Failed to create mutex" msgstr "Echec de la création de mutex, statut: 0x%0xlX" @@ -850,21 +850,21 @@ msgstr "Tous les périphériques SPI sont utilisés" msgid "error = 0x%08lX" msgstr "erreur = 0x%08lX" -#: ports/nrf/common-hal/busio/UART.c:122 +#: ports/nrf/common-hal/busio/UART.c:95 #, fuzzy msgid "Invalid buffer size" msgstr "longueur de tampon invalide" -#: ports/nrf/common-hal/busio/UART.c:126 +#: ports/nrf/common-hal/busio/UART.c:99 #, fuzzy msgid "Odd parity is not supported" msgstr "parité impaire non supportée" -#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362 -#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372 -#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383 -#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392 -#: ports/nrf/common-hal/busio/UART.c:400 +#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339 +#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369 +#: ports/nrf/common-hal/busio/UART.c:377 #, fuzzy msgid "busio.UART not available" msgstr "busio.UART n'est pas disponible" @@ -1368,7 +1368,7 @@ msgstr "pile de plannification pleine" #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 -#: shared-module/struct/__init__.c:183 +#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "tampon trop petit" @@ -2154,7 +2154,7 @@ msgid "buffer must be a bytes-like object" msgstr "le tampon doit être un objet bytes-like" #: shared-bindings/audioio/WaveFile.c:78 -#: shared-bindings/displayio/OnDiskBitmap.c:85 +#: shared-bindings/displayio/OnDiskBitmap.c:87 msgid "file must be a file opened in byte mode" msgstr "le fichier doit être un fichier ouvert en mode 'byte'" @@ -2199,16 +2199,34 @@ msgstr "la palette doit être longue de 32 octets" msgid "Expected a UUID" msgstr "Attendu : %q" -#: shared-bindings/bleio/CharacteristicBuffer.c:61 +#: shared-bindings/bleio/CharacteristicBuffer.c:39 +#, fuzzy +msgid "Not connected" +msgstr "Impossible de se connecter à 'AP'" + +#: shared-bindings/bleio/CharacteristicBuffer.c:74 +#, fuzzy +msgid "timeout must be >= 0.0" +msgstr "les bits doivent être 8" + +#: shared-bindings/bleio/CharacteristicBuffer.c:79 #, fuzzy msgid "buffer_size must be >= 1" msgstr "les slices de tampon doivent être de longueurs égales" -#: shared-bindings/bleio/CharacteristicBuffer.c:65 +#: shared-bindings/bleio/CharacteristicBuffer.c:83 #, fuzzy msgid "Expected a Characteristic" msgstr "Impossible d'ajouter la Characteristic." +#: shared-bindings/bleio/CharacteristicBuffer.c:138 +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:147 +msgid "Not connected." +msgstr "" + #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" msgstr "Impossible d'ajouter des service en mode Central" @@ -2246,16 +2264,20 @@ msgstr "" msgid "UUID integer value not in range 0 to 0xffff" msgstr "" -#: shared-bindings/bleio/UUID.c:75 -msgid "UUID value is not int or byte buffer" +#: shared-bindings/bleio/UUID.c:91 +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "" + +#: shared-bindings/bleio/UUID.c:103 +msgid "UUID value is not str, int or byte buffer" msgstr "" -#: shared-bindings/bleio/UUID.c:79 +#: shared-bindings/bleio/UUID.c:107 #, fuzzy msgid "Byte buffer must be 16 bytes." msgstr "le tampon doit être un objet bytes-like" -#: shared-bindings/bleio/UUID.c:120 +#: shared-bindings/bleio/UUID.c:151 msgid "not a 128-bit UUID" msgstr "" @@ -2703,11 +2725,6 @@ msgstr "'/' ne peut être remonté quand l'USB est actif." msgid "'S' and 'O' are not supported format types" msgstr "'S' et 'O' ne sont pas des types de format supportés" -#: shared-module/struct/__init__.c:128 -#, fuzzy, c-format -msgid "unpack requires a buffer of %d bytes" -msgstr "Echec de l'allocation de %d octets du tampon RX" - #: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "trop d'arguments fournis avec ce format" @@ -2816,63 +2833,67 @@ msgstr "" "Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. " "Appuyer denouveau pour quitter de le mode sans-échec.\n" -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Impossible d'appliquer les paramètres PPCP" +#~ msgid "Invalid UUID string length" +#~ msgstr "Longeur de chaîne UUID invalide" -#~ msgid "Can not add Characteristic." -#~ msgstr "Impossible d'ajouter la Characteristic." +#~ msgid "Invalid UUID parameter" +#~ msgstr "Paramètre UUID invalide" -#~ msgid "Can not query for the device address." -#~ msgstr "Impossible d'obtenir l'adresse du périphérique" +#, fuzzy +#~ msgid "palette must be displayio.Palette" +#~ msgstr "la palette doit être une displayio.Palette" -#~ msgid "Can not add Service." -#~ msgstr "Impossible d'ajouter le Service" +#, fuzzy +#~ msgid "value_size must be power of two" +#~ msgstr "value_size doit être une puissance de 2" + +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Impossible d'appliquer les paramètres GAP" + +#~ msgid "Invalid Service type" +#~ msgstr "Type de service invalide" #~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "" -#~ "assez de puissance pour l'ensemble du circuit et appuyez sur " -#~ "'reset' (après avoir éjecter CIRCUITPY).\n" +#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n" +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur." -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile" +#~ msgid "Wrong address length" +#~ msgstr "Mauvaise longueur d'adresse" #, fuzzy #~ msgid "Wrong number of bytes provided" #~ msgstr "mauvais nombre d'octets fourni'" -#~ msgid "Wrong address length" -#~ msgstr "Mauvaise longueur d'adresse" +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile" -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur." +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n" #~ msgid "" -#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" #~ msgstr "" -#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n" - -#~ msgid "Invalid Service type" -#~ msgstr "Type de service invalide" +#~ "assez de puissance pour l'ensemble du circuit et appuyez sur " +#~ "'reset' (après avoir éjecter CIRCUITPY).\n" -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Impossible d'appliquer les paramètres GAP" +#~ msgid "Can not add Service." +#~ msgstr "Impossible d'ajouter le Service" -#, fuzzy -#~ msgid "value_size must be power of two" -#~ msgstr "value_size doit être une puissance de 2" +#~ msgid "Can not query for the device address." +#~ msgstr "Impossible d'obtenir l'adresse du périphérique" -#, fuzzy -#~ msgid "palette must be displayio.Palette" -#~ msgstr "la palette doit être une displayio.Palette" +#~ msgid "Can not add Characteristic." +#~ msgstr "Impossible d'ajouter la Characteristic." -#~ msgid "Invalid UUID parameter" -#~ msgstr "Paramètre UUID invalide" +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Impossible d'appliquer les paramètres PPCP" -#~ msgid "Invalid UUID string length" -#~ msgstr "Longeur de chaîne UUID invalide" +#, fuzzy +#~ msgid "unpack requires a buffer of %d bytes" +#~ msgstr "Echec de l'allocation de %d octets du tampon RX" diff --git a/locale/it_IT.po b/locale/it_IT.po index cb413f073..8f5fb5684 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-01-20 22:46-0500\n" +"POT-Creation-Date: 2019-01-21 21:50-0500\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -339,12 +339,12 @@ msgid "bytes > 8 bits not supported" msgstr "byte > 8 bit non supportati" #: ports/atmel-samd/common-hal/busio/UART.c:73 -#: ports/nrf/common-hal/busio/UART.c:118 +#: ports/nrf/common-hal/busio/UART.c:91 msgid "tx and rx cannot both be None" msgstr "tx e rx non possono essere entrambi None" #: ports/atmel-samd/common-hal/busio/UART.c:146 -#: ports/nrf/common-hal/busio/UART.c:152 +#: ports/nrf/common-hal/busio/UART.c:132 msgid "Failed to allocate RX buffer" msgstr "Impossibile allocare buffer RX" @@ -353,12 +353,12 @@ msgid "Could not initialize UART" msgstr "Impossibile inizializzare l'UART" #: ports/atmel-samd/common-hal/busio/UART.c:241 -#: ports/nrf/common-hal/busio/UART.c:197 +#: ports/nrf/common-hal/busio/UART.c:174 msgid "No RX pin" msgstr "Nessun pin RX" #: ports/atmel-samd/common-hal/busio/UART.c:300 -#: ports/nrf/common-hal/busio/UART.c:232 +#: ports/nrf/common-hal/busio/UART.c:209 msgid "No TX pin" msgstr "Nessun pin TX" @@ -719,7 +719,7 @@ msgstr "Impossibile notificare valore dell'attributo. status: 0x%02x" msgid "Failed to read attribute value, err %0x04x" msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Characteristic.c:172 +#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34 #, fuzzy, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" @@ -729,7 +729,7 @@ msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" msgid "Failed to write attribute value, err 0x%04x" msgstr "Impossibile scrivere valore dell'attributo. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Characteristic.c:189 +#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54 #, fuzzy, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" @@ -750,51 +750,51 @@ msgstr "Impossibile inserire dati nel pacchetto di advertisement." msgid "Failed to discover services" msgstr "Impossibile fermare advertisement. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:267 -#: ports/nrf/common-hal/bleio/Device.c:300 +#: ports/nrf/common-hal/bleio/Device.c:268 +#: ports/nrf/common-hal/bleio/Device.c:302 #, fuzzy msgid "Failed to acquire mutex" msgstr "Impossibile allocare buffer RX" -#: ports/nrf/common-hal/bleio/Device.c:278 -#: ports/nrf/common-hal/bleio/Device.c:311 -#: ports/nrf/common-hal/bleio/Device.c:342 -#: ports/nrf/common-hal/bleio/Device.c:376 +#: ports/nrf/common-hal/bleio/Device.c:280 +#: ports/nrf/common-hal/bleio/Device.c:313 +#: ports/nrf/common-hal/bleio/Device.c:344 +#: ports/nrf/common-hal/bleio/Device.c:378 #, fuzzy msgid "Failed to release mutex" msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:387 +#: ports/nrf/common-hal/bleio/Device.c:389 #, fuzzy msgid "Failed to continue scanning" msgstr "Impossible iniziare la scansione. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:419 +#: ports/nrf/common-hal/bleio/Device.c:421 #, fuzzy msgid "Failed to connect:" msgstr "Impossibile connettersi. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:489 +#: ports/nrf/common-hal/bleio/Device.c:491 #, fuzzy msgid "Failed to add service" msgstr "Impossibile fermare advertisement. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:506 +#: ports/nrf/common-hal/bleio/Device.c:508 #, fuzzy msgid "Failed to start advertising" msgstr "Impossibile avviare advertisement. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:523 +#: ports/nrf/common-hal/bleio/Device.c:525 #, fuzzy msgid "Failed to stop advertising" msgstr "Impossibile fermare advertisement. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:548 +#: ports/nrf/common-hal/bleio/Device.c:550 #, fuzzy msgid "Failed to start scanning" msgstr "Impossible iniziare la scansione. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:564 +#: ports/nrf/common-hal/bleio/Device.c:566 #, fuzzy msgid "Failed to create mutex" msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" @@ -851,21 +851,21 @@ msgstr "Tutte le periferiche SPI sono in uso" msgid "error = 0x%08lX" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:122 +#: ports/nrf/common-hal/busio/UART.c:95 #, fuzzy msgid "Invalid buffer size" msgstr "lunghezza del buffer non valida" -#: ports/nrf/common-hal/busio/UART.c:126 +#: ports/nrf/common-hal/busio/UART.c:99 #, fuzzy msgid "Odd parity is not supported" msgstr "operazione I2C non supportata" -#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362 -#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372 -#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383 -#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392 -#: ports/nrf/common-hal/busio/UART.c:400 +#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339 +#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369 +#: ports/nrf/common-hal/busio/UART.c:377 #, fuzzy msgid "busio.UART not available" msgstr "busio.UART non ancora implementato" @@ -1368,7 +1368,7 @@ msgstr "" #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 -#: shared-module/struct/__init__.c:183 +#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "buffer troppo piccolo" @@ -2151,7 +2151,7 @@ msgid "buffer must be a bytes-like object" msgstr "" #: shared-bindings/audioio/WaveFile.c:78 -#: shared-bindings/displayio/OnDiskBitmap.c:85 +#: shared-bindings/displayio/OnDiskBitmap.c:87 msgid "file must be a file opened in byte mode" msgstr "" @@ -2196,16 +2196,34 @@ msgstr "la palette deve essere lunga 32 byte" msgid "Expected a UUID" msgstr "Atteso un %q" -#: shared-bindings/bleio/CharacteristicBuffer.c:61 +#: shared-bindings/bleio/CharacteristicBuffer.c:39 +#, fuzzy +msgid "Not connected" +msgstr "Impossible connettersi all'AP" + +#: shared-bindings/bleio/CharacteristicBuffer.c:74 +#, fuzzy +msgid "timeout must be >= 0.0" +msgstr "i bit devono essere 8" + +#: shared-bindings/bleio/CharacteristicBuffer.c:79 #, fuzzy msgid "buffer_size must be >= 1" msgstr "slice del buffer devono essere della stessa lunghezza" -#: shared-bindings/bleio/CharacteristicBuffer.c:65 +#: shared-bindings/bleio/CharacteristicBuffer.c:83 #, fuzzy msgid "Expected a Characteristic" msgstr "Non è possibile aggiungere Characteristic." +#: shared-bindings/bleio/CharacteristicBuffer.c:138 +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:147 +msgid "Not connected." +msgstr "" + #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" msgstr "" @@ -2243,16 +2261,20 @@ msgstr "" msgid "UUID integer value not in range 0 to 0xffff" msgstr "" -#: shared-bindings/bleio/UUID.c:75 -msgid "UUID value is not int or byte buffer" +#: shared-bindings/bleio/UUID.c:91 +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "" + +#: shared-bindings/bleio/UUID.c:103 +msgid "UUID value is not str, int or byte buffer" msgstr "" -#: shared-bindings/bleio/UUID.c:79 +#: shared-bindings/bleio/UUID.c:107 #, fuzzy msgid "Byte buffer must be 16 bytes." msgstr "i buffer devono essere della stessa lunghezza" -#: shared-bindings/bleio/UUID.c:120 +#: shared-bindings/bleio/UUID.c:151 msgid "not a 128-bit UUID" msgstr "" @@ -2685,11 +2707,6 @@ msgstr "Non è possibile rimontare '/' mentre l'USB è attiva." msgid "'S' and 'O' are not supported format types" msgstr "'S' e 'O' non sono formati supportati" -#: shared-module/struct/__init__.c:128 -#, fuzzy, c-format -msgid "unpack requires a buffer of %d bytes" -msgstr "Fallita allocazione del buffer RX di %d byte" - #: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "troppi argomenti forniti con il formato specificato" @@ -2785,35 +2802,27 @@ msgid "" "exit safe mode.\n" msgstr "" -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Impossibile applicare i parametri GAP." - -#~ msgid "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver " -#~ "espulso CIRCUITPY).\n" +#~ msgid "Invalid UUID string length" +#~ msgstr "Lunghezza della stringa UUID non valida" -#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -#~ msgstr "" -#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. " -#~ "Whoops!\n" +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parametro UUID non valido" -#~ msgid "Can not query for the device address." -#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." +#~ msgid "Invalid Service type" +#~ msgstr "Tipo di servizio non valido" -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x" +#, fuzzy +#~ msgid "Wrong number of bytes provided" +#~ msgstr "numero di argomenti errato" -#~ msgid "Can not add Service." -#~ msgstr "Non è possibile aggiungere Service." +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Impossibile impostare i parametri PPCP." -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista." +#~ msgid "Can not add Characteristic." +#~ msgstr "Non è possibile aggiungere Characteristic." -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement." +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare." #~ msgid "" #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" @@ -2821,24 +2830,36 @@ msgstr "" #~ "Ti preghiamo di compilare una issue con il contenuto del tuo drie " #~ "CIRCUITPY:\n" -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare." +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement." -#~ msgid "Can not add Characteristic." -#~ msgstr "Non è possibile aggiungere Characteristic." +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista." -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Impossibile impostare i parametri PPCP." +#~ msgid "Can not add Service." +#~ msgstr "Non è possibile aggiungere Service." -#, fuzzy -#~ msgid "Wrong number of bytes provided" -#~ msgstr "numero di argomenti errato" +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x" -#~ msgid "Invalid Service type" -#~ msgstr "Tipo di servizio non valido" +#~ msgid "Can not query for the device address." +#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parametro UUID non valido" +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. " +#~ "Whoops!\n" -#~ msgid "Invalid UUID string length" -#~ msgstr "Lunghezza della stringa UUID non valida" +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver " +#~ "espulso CIRCUITPY).\n" + +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Impossibile applicare i parametri GAP." + +#, fuzzy +#~ msgid "unpack requires a buffer of %d bytes" +#~ msgstr "Fallita allocazione del buffer RX di %d byte" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 457850a55..c0583d8bc 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-01-20 22:46-0500\n" +"POT-Creation-Date: 2019-01-21 21:50-0500\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n" "Last-Translator: \n" "Language-Team: \n" @@ -334,12 +334,12 @@ msgid "bytes > 8 bits not supported" msgstr "bytes > 8 bits não suportado" #: ports/atmel-samd/common-hal/busio/UART.c:73 -#: ports/nrf/common-hal/busio/UART.c:118 +#: ports/nrf/common-hal/busio/UART.c:91 msgid "tx and rx cannot both be None" msgstr "TX e RX não podem ser ambos" #: ports/atmel-samd/common-hal/busio/UART.c:146 -#: ports/nrf/common-hal/busio/UART.c:152 +#: ports/nrf/common-hal/busio/UART.c:132 msgid "Failed to allocate RX buffer" msgstr "Falha ao alocar buffer RX" @@ -348,12 +348,12 @@ msgid "Could not initialize UART" msgstr "Não foi possível inicializar o UART" #: ports/atmel-samd/common-hal/busio/UART.c:241 -#: ports/nrf/common-hal/busio/UART.c:197 +#: ports/nrf/common-hal/busio/UART.c:174 msgid "No RX pin" msgstr "Nenhum pino RX" #: ports/atmel-samd/common-hal/busio/UART.c:300 -#: ports/nrf/common-hal/busio/UART.c:232 +#: ports/nrf/common-hal/busio/UART.c:209 msgid "No TX pin" msgstr "Nenhum pino TX" @@ -711,7 +711,7 @@ msgstr "Não é possível gravar o valor do atributo. status: 0x%02x" msgid "Failed to read attribute value, err %0x04x" msgstr "Não é possível ler o valor do atributo. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Characteristic.c:172 +#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34 #, fuzzy, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "Não é possível ler o valor do atributo. status: 0x%02x" @@ -721,7 +721,7 @@ msgstr "Não é possível ler o valor do atributo. status: 0x%02x" msgid "Failed to write attribute value, err 0x%04x" msgstr "Não é possível gravar o valor do atributo. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Characteristic.c:189 +#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54 #, fuzzy, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "Não é possível ler o valor do atributo. status: 0x%02x" @@ -742,49 +742,49 @@ msgstr "Não é possível ajustar dados no pacote de anúncios." msgid "Failed to discover services" msgstr "Não pode parar propaganda. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:267 -#: ports/nrf/common-hal/bleio/Device.c:300 +#: ports/nrf/common-hal/bleio/Device.c:268 +#: ports/nrf/common-hal/bleio/Device.c:302 #, fuzzy msgid "Failed to acquire mutex" msgstr "Falha ao alocar buffer RX" -#: ports/nrf/common-hal/bleio/Device.c:278 -#: ports/nrf/common-hal/bleio/Device.c:311 -#: ports/nrf/common-hal/bleio/Device.c:342 -#: ports/nrf/common-hal/bleio/Device.c:376 +#: ports/nrf/common-hal/bleio/Device.c:280 +#: ports/nrf/common-hal/bleio/Device.c:313 +#: ports/nrf/common-hal/bleio/Device.c:344 +#: ports/nrf/common-hal/bleio/Device.c:378 #, fuzzy msgid "Failed to release mutex" msgstr "Não é possível ler o valor do atributo. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:387 +#: ports/nrf/common-hal/bleio/Device.c:389 msgid "Failed to continue scanning" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:419 +#: ports/nrf/common-hal/bleio/Device.c:421 msgid "Failed to connect:" msgstr "" -#: ports/nrf/common-hal/bleio/Device.c:489 +#: ports/nrf/common-hal/bleio/Device.c:491 #, fuzzy msgid "Failed to add service" msgstr "Não pode parar propaganda. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:506 +#: ports/nrf/common-hal/bleio/Device.c:508 #, fuzzy msgid "Failed to start advertising" msgstr "Não é possível iniciar o anúncio. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:523 +#: ports/nrf/common-hal/bleio/Device.c:525 #, fuzzy msgid "Failed to stop advertising" msgstr "Não pode parar propaganda. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:548 +#: ports/nrf/common-hal/bleio/Device.c:550 #, fuzzy msgid "Failed to start scanning" msgstr "Não é possível iniciar o anúncio. status: 0x%02x" -#: ports/nrf/common-hal/bleio/Device.c:564 +#: ports/nrf/common-hal/bleio/Device.c:566 #, fuzzy msgid "Failed to create mutex" msgstr "Não é possível ler o valor do atributo. status: 0x%02x" @@ -840,21 +840,21 @@ msgstr "Todos os periféricos SPI estão em uso" msgid "error = 0x%08lX" msgstr "erro = 0x%08lX" -#: ports/nrf/common-hal/busio/UART.c:122 +#: ports/nrf/common-hal/busio/UART.c:95 #, fuzzy msgid "Invalid buffer size" msgstr "Arquivo inválido" -#: ports/nrf/common-hal/busio/UART.c:126 +#: ports/nrf/common-hal/busio/UART.c:99 #, fuzzy msgid "Odd parity is not supported" msgstr "I2C operação não suportada" -#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362 -#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372 -#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383 -#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392 -#: ports/nrf/common-hal/busio/UART.c:400 +#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339 +#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369 +#: ports/nrf/common-hal/busio/UART.c:377 msgid "busio.UART not available" msgstr "busio.UART não disponível" @@ -1350,7 +1350,7 @@ msgstr "" #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161 -#: shared-module/struct/__init__.c:183 +#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183 msgid "buffer too small" msgstr "" @@ -2119,7 +2119,7 @@ msgid "buffer must be a bytes-like object" msgstr "" #: shared-bindings/audioio/WaveFile.c:78 -#: shared-bindings/displayio/OnDiskBitmap.c:85 +#: shared-bindings/displayio/OnDiskBitmap.c:87 msgid "file must be a file opened in byte mode" msgstr "" @@ -2164,16 +2164,34 @@ msgstr "buffers devem ser o mesmo tamanho" msgid "Expected a UUID" msgstr "Esperado um" -#: shared-bindings/bleio/CharacteristicBuffer.c:61 +#: shared-bindings/bleio/CharacteristicBuffer.c:39 +#, fuzzy +msgid "Not connected" +msgstr "Não é possível conectar-se ao AP" + +#: shared-bindings/bleio/CharacteristicBuffer.c:74 +#, fuzzy +msgid "timeout must be >= 0.0" +msgstr "bits devem ser 8" + +#: shared-bindings/bleio/CharacteristicBuffer.c:79 #, fuzzy msgid "buffer_size must be >= 1" msgstr "buffers devem ser o mesmo tamanho" -#: shared-bindings/bleio/CharacteristicBuffer.c:65 +#: shared-bindings/bleio/CharacteristicBuffer.c:83 #, fuzzy msgid "Expected a Characteristic" msgstr "Não é possível adicionar Característica." +#: shared-bindings/bleio/CharacteristicBuffer.c:138 +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: shared-bindings/bleio/CharacteristicBuffer.c:147 +msgid "Not connected." +msgstr "" + #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" msgstr "" @@ -2211,16 +2229,20 @@ msgstr "" msgid "UUID integer value not in range 0 to 0xffff" msgstr "" -#: shared-bindings/bleio/UUID.c:75 -msgid "UUID value is not int or byte buffer" +#: shared-bindings/bleio/UUID.c:91 +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgstr "" -#: shared-bindings/bleio/UUID.c:79 +#: shared-bindings/bleio/UUID.c:103 +msgid "UUID value is not str, int or byte buffer" +msgstr "" + +#: shared-bindings/bleio/UUID.c:107 #, fuzzy msgid "Byte buffer must be 16 bytes." msgstr "buffers devem ser o mesmo tamanho" -#: shared-bindings/bleio/UUID.c:120 +#: shared-bindings/bleio/UUID.c:151 msgid "not a 128-bit UUID" msgstr "" @@ -2642,11 +2664,6 @@ msgstr "Não é possível remontar '/' enquanto o USB estiver ativo." msgid "'S' and 'O' are not supported format types" msgstr "'S' e 'O' não são tipos de formato suportados" -#: shared-module/struct/__init__.c:128 -#, fuzzy, c-format -msgid "unpack requires a buffer of %d bytes" -msgstr "Falha ao alocar buffer RX de %d bytes" - #: shared-module/struct/__init__.c:136 msgid "too many arguments provided with the given format" msgstr "Muitos argumentos fornecidos com o formato dado" @@ -2736,32 +2753,36 @@ msgid "" "exit safe mode.\n" msgstr "" -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Não é possível definir parâmetros PPCP." +#~ msgid "Can not query for the device address." +#~ msgstr "Não é possível consultar o endereço do dispositivo." -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Pode codificar o UUID no pacote de anúncios." +#~ msgid "Invalid Service type" +#~ msgstr "Tipo de serviço inválido" -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x" +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." -#~ msgid "Invalid UUID parameter" -#~ msgstr "Parâmetro UUID inválido" +#~ msgid "Baud rate too high for this SPI peripheral" +#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI" + +#~ msgid "Can not add Characteristic." +#~ msgstr "Não é possível adicionar Característica." #~ msgid "Cannot apply GAP parameters." #~ msgstr "Não é possível aplicar parâmetros GAP." -#~ msgid "Can not add Characteristic." -#~ msgstr "Não é possível adicionar Característica." +#~ msgid "Invalid UUID parameter" +#~ msgstr "Parâmetro UUID inválido" -#~ msgid "Baud rate too high for this SPI peripheral" -#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI" +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Pode codificar o UUID no pacote de anúncios." -#~ msgid "Invalid Service type" -#~ msgstr "Tipo de serviço inválido" +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Não é possível definir parâmetros PPCP." -#~ msgid "Can not query for the device address." -#~ msgstr "Não é possível consultar o endereço do dispositivo." +#, fuzzy +#~ msgid "unpack requires a buffer of %d bytes" +#~ msgstr "Falha ao alocar buffer RX de %d bytes" -- cgit v1.2.3 From 3d3c50f9273858fcaa5686760daf49db39b1e36c Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Tue, 22 Jan 2019 15:39:54 -0500 Subject: tell people that esp8266 is no longer supported Closes #1483 --- ports/esp8266/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/esp8266/Makefile b/ports/esp8266/Makefile index d38285c91..4f23dfff1 100644 --- a/ports/esp8266/Makefile +++ b/ports/esp8266/Makefile @@ -216,7 +216,8 @@ SRC_QSTR += $(SRC_C) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) $( # Append any auto-generated sources that are needed by sources listed in SRC_QSTR SRC_QSTR_AUTO_DEPS += -all: $(BUILD)/libaxtls.a $(FWBIN) +all: + @echo "CircuitPython 4.0.0 and later do not support esp8266 boards." CONFVARS_FILE = $(BUILD)/confvars -- cgit v1.2.3