From 05d8885a1ab959fabdbb77f99408b2e7dc78b97c Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 16 Jan 2019 12:04:42 -0800 Subject: [PATCH 01/20] Rework displays in prep for dynamic support and 8bit parallel. --- main.c | 5 + ports/atmel-samd/Makefile | 3 +- ports/atmel-samd/boards/board.h | 6 - .../boards/feather_m4_express/board.c | 9 +- .../boards/feather_m4_express/mpconfigboard.h | 1 + .../boards/feather_m4_express/pins.c | 3 +- ports/atmel-samd/boards/pyportal/board.c | 79 +--------- ports/atmel-samd/common-hal/busio/SPI.c | 6 - .../common-hal/displayio/FourWire.c | 96 ++--------- .../common-hal/displayio/FourWire.h | 13 +- .../common-hal/displayio/ParallelBus.c | 98 ++++++++++++ .../common-hal/displayio/ParallelBus.h | 41 +++++ .../common-hal/microcontroller/Pin.c | 26 +-- .../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 ++ .../shared}/board_busses.c | 7 +- .../shared}/board_busses.h | 14 +- supervisor/supervisor.mk | 1 + 28 files changed, 817 insertions(+), 318 deletions(-) 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 rename {ports/atmel-samd => supervisor/shared}/board_busses.c (97%) rename {ports/atmel-samd => supervisor/shared}/board_busses.h (83%) diff --git a/main.c b/main.c index 4e0b77cfd5..d328fcaa4e 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 04e42a971a..088288fbdc 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/boards/board.h b/ports/atmel-samd/boards/board.h index 61acc730ef..4f0ae9d728 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 8096b9b8ea..85e9959c9c 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 ed1dfe763a..8510a7daee 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 5004254c52..23b55e9577 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 9cf3ee8c22..8ec498e8cd 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 4de34c975c..68382d405d 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 51e6de5a22..7a0bdd0c16 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 b997176701..e3ae5781b5 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 0000000000..f852647a4b --- /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 0000000000..cc45598c5b --- /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 7dd9c6b09a..7d0d97758c 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 f798ea300c..14887207aa 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 9418386185..7e7e894cbe 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 0000000000..5db4704179 --- /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 0000000000..4cec660586 --- /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 80aa814df2..674d1c9008 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 fc51f558dd..a9e1bf566a 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 0000000000..dddb4ce8ac --- /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 0000000000..f1d1656b11 --- /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 0000000000..0a14e74bb3 --- /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 0000000000..1f1355d31b --- /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 f1a00db9f7..b528c32896 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); -} +#include "shared-bindings/displayio/Display.h" -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); -} - -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 556af430d5..84db98fcce 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/ports/atmel-samd/board_busses.c b/supervisor/shared/board_busses.c similarity index 97% rename from ports/atmel-samd/board_busses.c rename to supervisor/shared/board_busses.c index 424c9cc08f..84919ebff1 100644 --- a/ports/atmel-samd/board_busses.c +++ b/supervisor/shared/board_busses.c @@ -63,11 +63,12 @@ STATIC mp_obj_t board_i2c(void) { 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; -STATIC mp_obj_t board_spi(void) { +mp_obj_t board_spi(void) { if (spi_singleton == NULL) { - busio_spi_obj_t *self = m_new_obj(busio_spi_obj_t); + 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); @@ -81,7 +82,7 @@ STATIC mp_obj_t board_spi(void) { return spi_singleton; } #else -STATIC mp_obj_t board_spi(void) { +mp_obj_t board_spi(void) { mp_raise_NotImplementedError(translate("No default SPI bus")); return NULL; } diff --git a/ports/atmel-samd/board_busses.h b/supervisor/shared/board_busses.h similarity index 83% rename from ports/atmel-samd/board_busses.h rename to supervisor/shared/board_busses.h index 08dd1aae12..f6a8a42966 100644 --- a/ports/atmel-samd/board_busses.h +++ b/supervisor/shared/board_busses.h @@ -24,18 +24,20 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_BOARD_BUSSES_H -#define MICROPY_INCLUDED_ATMEL_SAMD_BOARD_BUSSES_H +#ifndef MICROPY_INCLUDED_SUPERVISOR_SHARED_BOARD_BUSSES_H +#define MICROPY_INCLUDED_SUPERVISOR_SHARED_BOARD_BUSSES_H -void board_i2c(void); +#include "py/obj.h" + +mp_obj_t board_i2c(void); extern mp_obj_fun_builtin_fixed_t board_i2c_obj; -void board_spi(void); +mp_obj_t board_spi(void); extern mp_obj_fun_builtin_fixed_t board_spi_obj; -void board_uart(void); +mp_obj_t 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 +#endif // MICROPY_INCLUDED_SUPERVISOR_SHARED_BOARD_BUSSES_H diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 191af7b255..0bbfd9141d 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 \ From 84292ad89070f1994ed09b59c8a693216a40cd89 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 00:20:16 -0800 Subject: [PATCH 02/20] External fourwire works and blinka splash after --- main.c | 2 +- ports/atmel-samd/background.c | 2 +- .../grandcentral_m4_express/mpconfigboard.h | 2 + .../boards/grandcentral_m4_express/pins.c | 2 +- .../boards/pyportal/mpconfigboard.h | 2 +- ports/atmel-samd/boards/pyportal/pins.c | 4 +- ports/atmel-samd/common-hal/busio/SPI.c | 13 ++ .../common-hal/displayio/FourWire.c | 10 + .../common-hal/displayio/FourWire.h | 1 + .../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 | 216 ++++++++++++++---- shared-module/displayio/__init__.h | 7 +- 18 files changed, 253 insertions(+), 80 deletions(-) diff --git a/main.c b/main.c index d328fcaa4e..02c832e675 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 439877d2e7..59e03008a9 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 e1bef00194..465c51b4ab 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 081bb701e7..0d19a63efd 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 847e2ba764..f02d4a372b 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 ddb8fa08a2..4ddc10e52a 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 68382d405d..8fb831a69a 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 7a0bdd0c16..ab01e26091 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 e3ae5781b5..234bcf794f 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 7d0d97758c..b7d527d042 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 5db4704179..21f44965ea 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 674d1c9008..9833fbc640 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 a9e1bf566a..3a9f66d4c5 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 f1d1656b11..c739348389 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 d485d8095e..66cf4d63d6 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 a6663bf572..427ddb47dd 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 b528c32896..48194f63f0 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_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; + + 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; + } + } + } + // 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); + } + displayio_display_finish_refresh(display); } - 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; +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 +}; - PORT->Group[1].OUTTGL.reg = 1 << 22; +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 +}; - //if (index == 0) { - if (display->current_group != NULL) { - displayio_group_get_pixel(display->current_group, x, y, pixel); - } - // } else { - // *pixel = (((uint16_t*)buffer)[0]); - // } +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 +}; - PORT->Group[1].OUTTGL.reg = 1 << 22; +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 +}; - 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; +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; } } } - // 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); } - displayio_display_finish_refresh(display); + + 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 reset_primary_display(void) { - common_hal_displayio_display_show(&primary_display.display, NULL); +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 84db98fcce..fdabd4ec4e 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 From 5277138c992b860cfbdb767f18e034c42e31b6a1 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 10:57:05 -0800 Subject: [PATCH 03/20] 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 8ec498e8cd..cf03bb28a2 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 65b8c94c5b..77881fefd3 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 b9923128a0..255349d7cd 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 272f3114ce..60f573ff6f 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 48194f63f0..dc5957c232 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, From 2d136d58bf288f0be945ed5cd3efe9113d0acce3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 14:45:29 -0800 Subject: [PATCH 04/20] Fix other builds and hallowing --- .../atmel-samd/boards/arduino_mkr1300/pins.c | 2 +- .../atmel-samd/boards/arduino_mkrzero/pins.c | 4 +- ports/atmel-samd/boards/arduino_zero/pins.c | 2 +- .../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 +- .../boards/feather_m0_adalogger/pins.c | 2 +- .../atmel-samd/boards/feather_m0_basic/pins.c | 2 +- .../boards/feather_m0_express/pins.c | 2 +- .../boards/feather_m0_express_crickit/pins.c | 2 +- .../atmel-samd/boards/feather_m0_rfm69/pins.c | 2 +- .../atmel-samd/boards/feather_m0_rfm9x/pins.c | 2 +- .../boards/feather_m0_supersized/pins.c | 2 +- .../boards/feather_radiofruit_zigbee/pins.c | 2 +- ports/atmel-samd/boards/gemma_m0/pins.c | 2 +- .../boards/hallowing_m0_express/board.c | 47 ++++++----------- .../boards/hallowing_m0_express/pins.c | 5 +- .../boards/itsybitsy_m0_express/pins.c | 2 +- .../boards/itsybitsy_m4_express/pins.c | 2 +- ports/atmel-samd/boards/meowmeow/pins.c | 2 +- .../atmel-samd/boards/metro_m0_express/pins.c | 2 +- .../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 ++ .../boards/sparkfun_samd21_mini/pins.c | 16 +++--- .../boards/trellis_m4_express/pins.c | 2 +- ports/atmel-samd/boards/trinket_m0/pins.c | 2 +- .../boards/trinket_m0_haxpress/pins.c | 2 +- ports/atmel-samd/boards/ugame10/pins.c | 2 +- .../common-hal/displayio/ParallelBus.c | 38 +++++++++++--- .../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 de9f9769c8..a5a058acec 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 3ffd37fa6e..654c0d6dae 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 8a7ff70e6d..f9403bb9ad 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 8997b653ff..87ee84c0be 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 14ae89c55e..70743366ed 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 14ae89c55e..70743366ed 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 93c169c8b5..9da67dfb44 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 460fd6fefa..468a09a476 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 0029bba1a3..d99e62c955 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 4400a253da..f9b6db63be 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 cd6c351d49..1eaa98a586 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 cd6c351d49..1eaa98a586 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 7e14b3f251..ba59cb69b6 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 4e77b7fb97..29a01d4056 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 cd6c351d49..1eaa98a586 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 cd111e1745..211596f786 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 c9c7ea555b..b24b458388 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 b47c5fbb22..2b12ae464f 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 d1f8609ffa..3db1b17524 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 25407bc147..912fba4edc 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 2a89c3037e..ed91c88ee7 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 59c51f4ebf..089baad32e 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 13f0eb0ba2..0707a35819 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 0e66817f7c..dd419aec67 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 87e2103814..f78fe1bc83 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 e08302f140..a6dbcefe3e 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 cf03bb28a2..6e5b37dd2c 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 4ddc10e52a..6b1254dfcd 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 abe63d0644..42cd3736b8 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 9626f525f3..a9f2043185 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 6330170249..b3637bd5bb 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 6330170249..b3637bd5bb 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 87ace5e96f..71db52752f 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 f852647a4b..3c287eccd6 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 cc45598c5b..630bec351b 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 77881fefd3..a2e4075c45 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 dddb4ce8ac..aa861bb81a 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 c739348389..c4cde5ff53 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 66cf4d63d6..306f8c08bf 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 0a14e74bb3..f75f0392f7 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 dc5957c232..92d97a6efe 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. } From 760bd8d8a4f0aa0ed8651e89596fb2e6effbc14f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 15:15:59 -0800 Subject: [PATCH 05/20] share fourwire and make nrf compile --- ports/atmel-samd/Makefile | 2 +- ports/nrf/Makefile | 12 +- ports/nrf/board_busses.c | 114 --------------- .../boards/feather_nrf52840_express/pins.c | 4 +- .../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 +- .../nrf/boards/sparkfun_nrf52840_mini/pins.c | 2 +- ports/nrf/common-hal/displayio/ParallelBus.c | 137 ++++++++++++++++++ .../displayio/ParallelBus.h} | 28 ++-- ports/nrf/common-hal/microcontroller/Pin.h | 1 + ports/nrf/mpconfigport.h | 2 + shared-bindings/displayio/FourWire.h | 2 +- .../displayio/FourWire.c | 0 .../displayio/FourWire.h | 0 supervisor/shared/board_busses.c | 1 - 20 files changed, 180 insertions(+), 139 deletions(-) delete mode 100644 ports/nrf/board_busses.c create mode 100644 ports/nrf/common-hal/displayio/ParallelBus.c rename ports/nrf/{board_busses.h => common-hal/displayio/ParallelBus.h} (63%) rename {ports/atmel-samd/common-hal => shared-module}/displayio/FourWire.c (100%) rename {ports/atmel-samd/common-hal => shared-module}/displayio/FourWire.h (100%) diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 088288fbdc..c8d197b3ef 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/nrf/Makefile b/ports/nrf/Makefile index 2bc5084754..85e6346a11 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 6d5cbd041e..0000000000 --- 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/boards/feather_nrf52840_express/pins.c b/ports/nrf/boards/feather_nrf52840_express/pins.c index 2f8ac02599..dfb0be6df7 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 27f0c67974..2d24e85979 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 6049ac0538..10490c8cb1 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 0457f0aa86..8c2fb38e63 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 2bff0a2ce4..5981212bf6 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 11a29e9273..cdd5b5306c 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 a57c9d1c95..510b6100e3 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 a1916bd046..c43d3a9eb6 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 5c50f55c7c..f826ac771d 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 0000000000..3afedf7363 --- /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/board_busses.h b/ports/nrf/common-hal/displayio/ParallelBus.h similarity index 63% rename from ports/nrf/board_busses.h rename to ports/nrf/common-hal/displayio/ParallelBus.h index 2a4bfc3d4b..5c10d3d42a 100644 --- a/ports/nrf/board_busses.h +++ b/ports/nrf/common-hal/displayio/ParallelBus.h @@ -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 @@ -24,16 +24,22 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_NRF_BOARD_BUSSES_H -#define MICROPY_INCLUDED_NRF_BOARD_BUSSES_H +#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#define MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H -void board_i2c(void); -extern mp_obj_fun_builtin_fixed_t board_i2c_obj; +#include "common-hal/digitalio/DigitalInOut.h" -void board_spi(void); -extern mp_obj_fun_builtin_fixed_t board_spi_obj; +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; -void board_uart(void); -extern mp_obj_fun_builtin_fixed_t board_uart_obj; - -#endif // MICROPY_INCLUDED_NRF_BOARD_BUSSES_H +#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 61be8bc358..735ed90cca 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 d38b145783..b6e5f9fdf4 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 3a9f66d4c5..b8b00372ce 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/ports/atmel-samd/common-hal/displayio/FourWire.c b/shared-module/displayio/FourWire.c similarity index 100% rename from ports/atmel-samd/common-hal/displayio/FourWire.c rename to shared-module/displayio/FourWire.c diff --git a/ports/atmel-samd/common-hal/displayio/FourWire.h b/shared-module/displayio/FourWire.h similarity index 100% rename from ports/atmel-samd/common-hal/displayio/FourWire.h rename to shared-module/displayio/FourWire.h diff --git a/supervisor/shared/board_busses.c b/supervisor/shared/board_busses.c index 84919ebff1..38308ccee3 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)) From 6404aaf411d7fe5fd96f3a8cbf7a1cb7580a09e7 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 18:19:07 -0800 Subject: [PATCH 06/20] 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 ++-- .../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 02c832e675..e137f7d47d 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 59e03008a9..4f3257f3fd 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 a2e4075c45..12410b0bef 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 f022b5bc91..69c76fd066 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 dfb0be6df7..c6f643761d 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 02847e1505..268e2f75da 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 b6e5f9fdf4..3ec37960b9 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 21f44965ea..9028c28654 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 9833fbc640..530eafb51f 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 aa861bb81a..e1079acb58 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 ab01e26091..9da5c07012 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 92d97a6efe..ccabe9c9d5 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 38308ccee3..ed1f98a58b 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 f6a8a42966..0ccb3ba6a6 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); From fddc98858afb19b87a2ed65b4d2b301b3e1ce667 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 18:51:40 -0800 Subject: [PATCH 07/20] 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 268e2f75da..112654c7e0 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 ccabe9c9d5..c8132e2f94 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; From 96e2c717fc9fa94ad6fd3784d1a9dd693efdb780 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Jan 2019 22:10:11 -0800 Subject: [PATCH 08/20] 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 12410b0bef..86edc9039f 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 From 41dad1ea1eb5126ec7e80173a0fb74d9707b1e56 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 11:43:35 -0800 Subject: [PATCH 09/20] Fix pin defs --- .../boards/grandcentral_m4_express/pins.c | 228 +++++++++--------- .../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 0d19a63efd..26d0e71a0e 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 dd419aec67..63ae319a2b 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 6b1254dfcd..9a5c5b1a5c 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) }, From 427766ac6913ae3b838e29f5cd1dc9b782c7d56a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 11:44:53 -0800 Subject: [PATCH 10/20] 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 | 326 +++++++++++++++++++++-------------- 9 files changed, 1714 insertions(+), 1096 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 952e12d4d3..ae18a14d0d 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 5c85d09a80..e52ee4df47 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 47098b66ac..a6d7b6103c 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 ee47b08eab..1fd9cd3779 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 1278e92cbd..8dd8ef9200 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 5daa673f70..59c4150665 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 b27cfeb799..4ef9d9f872 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 9b54d5dc9a..47aff51660 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 85fe90909c..e610577a1c 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 "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 "Cannot set PPCP parameters." -#~ msgstr "Não é possível definir parâmetros PPCP." - -#~ 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 "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 "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 "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 device name in the stack." +#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." + +#~ 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 "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." From 0318a9a9bcbceab308323788cb9e579da166710e Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 11:53:09 -0800 Subject: [PATCH 11/20] 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 e627cd1462..9eea30bf3e 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 614820443b..99b51016d8 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 253deac1e6..7f15d02a8e 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 c556f2b770..997c7e2625 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 98ac1b3cc2..c0cf6dcc43 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 fcbcebc390..03dc9e4ec6 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 9b9869f5b1..84e9298fd3 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 9b09de96e4..9918159cb5 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 dd0141831d..b2785b5b60 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 2ada0b3f16..b8364815be 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); From 58a2009cc11ac6b080d182854d0f669a6f65647a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 12:52:27 -0800 Subject: [PATCH 12/20] 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 b91f1a1ebd..85b46a9f6b 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 070c5cde9d..997a6fd991 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 3f9f5af947..62658cbb17 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 3bbab28242..c5707a3d0b 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 8775ec11ac..99b65ec1bc 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 \ From dc024cf411e5a77bffc3662aa581c667284e67e6 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 12:59:23 -0800 Subject: [PATCH 13/20] 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 9028c28654..501b965490 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 530eafb51f..561e2871ef 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 e1079acb58..2f99678662 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 306f8c08bf..6ed1218b2b 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(); From ae52c964c2cdb91643b05f180353d95895260245 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 13:47:40 -0800 Subject: [PATCH 14/20] 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 85e9959c9c..8096b9b8ea 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 23b55e9577..cec9fe37f1 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 c8132e2f94..59a5cf398e 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. } From edc8383e2297156134a58067899eefacd5764802 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 16:37:06 -0800 Subject: [PATCH 15/20] Improvements thanks to danh's review --- .../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 3c287eccd6..7a5f61448a 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 3afedf7363..42231be527 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 501b965490..4de6c2b248 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 561e2871ef..dceb4fe692 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 2f99678662..916c5f8523 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 ed1f98a58b..8a1c7bf86d 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; From b41d386d02f26e81dc1f234826fde7d24b020531 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 17:04:18 -0800 Subject: [PATCH 16/20] 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 4de6c2b248..d61732f6f9 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); From b569e8bab044bb54210e12254a5c22342edb1296 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 18 Jan 2019 17:09:56 -0800 Subject: [PATCH 17/20] 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 4135405409..f92312a231 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 39e197f293..d28dfe4516 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 3eca47eb45..b760b38474 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 9918159cb5..d7c1a58a8c 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; From 5ddc50473a37959fcac5a768013c825b1b1d8d23 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sun, 20 Jan 2019 16:18:34 -0800 Subject: [PATCH 18/20] 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 781a1871bf..a044fe3ff8 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(); From 479b28660006a0e4f2febb67a0bd8e517290cd78 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sun, 20 Jan 2019 17:32:43 -0800 Subject: [PATCH 19/20] 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 f672ac039e..683fcb748e 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; From 3d11dd077c225e6b1c01ff9befd2d6fcc910c553 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sun, 20 Jan 2019 17:33:18 -0800 Subject: [PATCH 20/20] Update translations --- locale/ID.po | 76 ++++++++++-------------- locale/circuitpython.pot | 50 ++++++---------- locale/de_DE.po | 106 +++++++++++++++------------------ locale/en_US.po | 50 ++++++---------- locale/es.po | 116 ++++++++++++++++-------------------- locale/fil.po | 116 ++++++++++++++++-------------------- locale/fr.po | 124 ++++++++++++++++++--------------------- locale/it_IT.po | 118 +++++++++++++++++-------------------- locale/pt_BR.po | 86 ++++++++++++--------------- 9 files changed, 367 insertions(+), 475 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index ae18a14d0d..8547493e96 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" +#: 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 "" @@ -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,8 +2739,17 @@ 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" +#~ msgstr "" +#~ "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 "" #~ "enough power for the whole circuit and press reset (after ejecting " @@ -2761,14 +2758,5 @@ 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 "" -#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n" +#~ msgid "Invalid UUID string length" +#~ msgstr "Panjang string UUID tidak valid" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index e52ee4df47..0a9e67685f 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" +#: 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 "" @@ -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 a6d7b6103c..170104e9fe 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" +#: 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 "" @@ -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,11 +2742,35 @@ msgstr "" #~ msgid "Invalid UUID string length" #~ msgstr "Ungültige UUID-Stringlänge" +#~ 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 "Invalid UUID parameter" #~ msgstr "Ungültiger UUID-Parameter" -#~ msgid "Can not add Service." -#~ msgstr "Kann den Dienst nicht hinzufügen." +#~ msgid "Invalid Service type" +#~ msgstr "Ungültiger Diensttyp" + +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ 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." @@ -2769,32 +2781,8 @@ msgstr "" #~ 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 "" -#~ "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 "" -#~ "enough power for the whole circuit and press reset (after ejecting " -#~ "CIRCUITPY).\n" -#~ msgstr "" -#~ "genug Strom für den ganzen Schaltkreis liefert und drücke reset (nach dem " -#~ "sicheren Auswerfen von CIRCUITPY.)\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." - -#~ 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." diff --git a/locale/en_US.po b/locale/en_US.po index 1fd9cd3779..acd5f54cb4 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" +#: 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 "" @@ -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 8dd8ef9200..799fc68bf6 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,37 +2771,22 @@ 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 "Wrong number of bytes provided" -#~ msgstr "Numero erroneo de bytes dados" - -#, 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 "" #~ "enough power for the whole circuit and press reset (after ejecting " #~ "CIRCUITPY).\n" @@ -2821,24 +2794,39 @@ 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 "" -#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n" - -#~ msgid "Baud rate too high for this SPI peripheral" -#~ msgstr "Baud rate demasiado alto para este periférico SPI" - -#~ 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 "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 "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 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 59c4150665..6b3e408c7d 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,36 +2777,22 @@ 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 "Wrong number of bytes provided" -#~ msgstr "Mali ang bilang ng bytes" - -#~ 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 "" #~ "enough power for the whole circuit and press reset (after ejecting " #~ "CIRCUITPY).\n" @@ -2826,25 +2800,39 @@ 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 "" -#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n" - -#, fuzzy -#~ msgid "palette must be displayio.Palette" -#~ msgstr "ang palette ay dapat 32 bytes ang haba" - -#~ 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 "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 "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 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 4ef9d9f872..236ce43456 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" - -#~ 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 "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 "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 set PPCP parameters." -#~ msgstr "Impossible d'appliquer les paramètres PPCP" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Impossible d'appliquer les paramètres GAP" + +#~ msgid "Invalid Service type" +#~ msgstr "Type de service invalide" + +#~ 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 "Wrong address length" +#~ msgstr "Mauvaise longueur d'adresse" + +#, 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 "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 47aff51660..225e51cf57 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" +#: 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 "" @@ -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,12 +2788,41 @@ 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 Characteristic." +#~ msgstr "Non è possibile aggiungere Characteristic." + +#~ 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" +#~ 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 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" @@ -2813,34 +2830,5 @@ 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." - -#~ msgid "Can not add Characteristic." -#~ msgstr "Non è possibile aggiungere Characteristic." - -#~ 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 "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 e610577a1c..a0d81d182b 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 "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 "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 "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 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 apply device name in the stack." -#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." - -#~ 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 "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."