summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extmod/machine_i2c.c10
-rw-r--r--extmod/machine_pinbase.c4
-rw-r--r--extmod/machine_signal.c10
-rw-r--r--extmod/machine_spi.c14
-rw-r--r--extmod/modframebuf.c4
-rw-r--r--extmod/moductypes.c4
-rw-r--r--extmod/modutimeq.c4
-rw-r--r--extmod/moduzlib.c4
-rw-r--r--extmod/modwebsocket.c4
-rw-r--r--extmod/vfs_posix.c4
-rw-r--r--extmod/vfs_posix_file.c4
-rw-r--r--locale/ID.po395
-rw-r--r--locale/circuitpython.pot379
-rw-r--r--locale/de_DE.po528
-rw-r--r--locale/en_US.po379
-rw-r--r--locale/es.po448
-rw-r--r--locale/fil.po450
-rw-r--r--locale/fr.po452
-rw-r--r--locale/it_IT.po428
-rw-r--r--locale/pt_BR.po417
-rwxr-xr-xmain.c10
-rw-r--r--ports/atmel-samd/Makefile5
-rw-r--r--ports/atmel-samd/background.c7
-rw-r--r--ports/atmel-samd/boards/arduino_mkr1300/pins.c2
-rw-r--r--ports/atmel-samd/boards/arduino_mkrzero/pins.c4
-rw-r--r--ports/atmel-samd/boards/arduino_zero/pins.c2
-rw-r--r--ports/atmel-samd/boards/board.h6
-rw-r--r--ports/atmel-samd/boards/catwan_usbstick/pins.c2
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express/pins.c2
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c2
-rw-r--r--ports/atmel-samd/boards/cp32-m4/pins.c2
-rw-r--r--ports/atmel-samd/boards/datalore_ip_m4/pins.c2
-rw-r--r--ports/atmel-samd/boards/feather_m0_adalogger/pins.c2
-rw-r--r--ports/atmel-samd/boards/feather_m0_basic/pins.c2
-rw-r--r--ports/atmel-samd/boards/feather_m0_express/pins.c2
-rw-r--r--ports/atmel-samd/boards/feather_m0_express_crickit/pins.c2
-rw-r--r--ports/atmel-samd/boards/feather_m0_rfm69/pins.c2
-rw-r--r--ports/atmel-samd/boards/feather_m0_rfm9x/pins.c2
-rw-r--r--ports/atmel-samd/boards/feather_m0_supersized/pins.c2
-rw-r--r--ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h1
-rw-r--r--ports/atmel-samd/boards/feather_m4_express/pins.c2
-rwxr-xr-xports/atmel-samd/boards/feather_radiofruit_zigbee/pins.c2
-rw-r--r--ports/atmel-samd/boards/gemma_m0/pins.c2
-rw-r--r--ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/grandcentral_m4_express/pins.c230
-rw-r--r--ports/atmel-samd/boards/hallowing_m0_express/board.c47
-rw-r--r--ports/atmel-samd/boards/hallowing_m0_express/pins.c5
-rw-r--r--ports/atmel-samd/boards/itsybitsy_m0_express/pins.c2
-rw-r--r--ports/atmel-samd/boards/itsybitsy_m4_express/pins.c2
-rw-r--r--ports/atmel-samd/boards/meowmeow/pins.c2
-rw-r--r--ports/atmel-samd/boards/metro_m0_express/pins.c2
-rw-r--r--ports/atmel-samd/boards/metro_m4_express/pins.c64
-rw-r--r--ports/atmel-samd/boards/mini_sam_m4/pins.c2
-rw-r--r--ports/atmel-samd/boards/pirkey_m0/pins.c2
-rw-r--r--ports/atmel-samd/boards/pyportal/board.c58
-rw-r--r--ports/atmel-samd/boards/pyportal/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/pyportal/pins.c93
-rw-r--r--ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c16
-rw-r--r--ports/atmel-samd/boards/trellis_m4_express/pins.c2
-rw-r--r--ports/atmel-samd/boards/trinket_m0/pins.c2
-rw-r--r--ports/atmel-samd/boards/trinket_m0_haxpress/pins.c2
-rw-r--r--ports/atmel-samd/boards/ugame10/pins.c2
-rw-r--r--ports/atmel-samd/common-hal/busio/SPI.c19
-rw-r--r--ports/atmel-samd/common-hal/displayio/FourWire.c145
-rw-r--r--ports/atmel-samd/common-hal/displayio/ParallelBus.c129
-rw-r--r--ports/atmel-samd/common-hal/displayio/ParallelBus.h45
-rw-r--r--ports/atmel-samd/common-hal/microcontroller/Pin.c28
-rw-r--r--ports/atmel-samd/common-hal/microcontroller/Pin.h1
-rw-r--r--ports/atmel-samd/mpconfigport.h3
-rw-r--r--ports/atmel-samd/supervisor/port.c3
-rw-r--r--ports/esp8266/Makefile3
-rwxr-xr-xports/nrf/Makefile17
-rw-r--r--ports/nrf/background.c15
-rw-r--r--ports/nrf/board_busses.c114
-rw-r--r--ports/nrf/boards/feather_nrf52840_express/pins.c72
-rw-r--r--ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c2
-rw-r--r--ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c2
-rw-r--r--ports/nrf/boards/particle_argon/pins.c2
-rw-r--r--ports/nrf/boards/particle_boron/pins.c2
-rw-r--r--ports/nrf/boards/particle_xenon/pins.c2
-rw-r--r--ports/nrf/boards/pca10056/pins.c2
-rw-r--r--ports/nrf/boards/pca10059/pins.c2
-rw-r--r--ports/nrf/boards/sparkfun_nrf52840_mini/pins.c2
-rw-r--r--ports/nrf/common-hal/bleio/Characteristic.c2
-rw-r--r--ports/nrf/common-hal/bleio/CharacteristicBuffer.c80
-rw-r--r--ports/nrf/common-hal/bleio/CharacteristicBuffer.h5
-rw-r--r--ports/nrf/common-hal/bleio/Device.c2
-rw-r--r--ports/nrf/common-hal/busio/UART.c39
-rw-r--r--ports/nrf/common-hal/displayio/ParallelBus.c140
-rw-r--r--ports/nrf/common-hal/displayio/ParallelBus.h (renamed from ports/nrf/board_busses.h)28
-rw-r--r--ports/nrf/common-hal/microcontroller/Pin.c9
-rw-r--r--ports/nrf/common-hal/microcontroller/Pin.h1
-rw-r--r--ports/nrf/mpconfigport.h4
-rw-r--r--ports/nrf/sd_mutex.c56
-rw-r--r--ports/nrf/sd_mutex.h46
-rw-r--r--ports/unix/Makefile8
-rw-r--r--ports/unix/file.c4
-rw-r--r--ports/unix/modffi.c6
-rw-r--r--ports/unix/modusocket.c4
-rw-r--r--py/binary.c7
-rw-r--r--py/modio.c8
-rw-r--r--py/modstruct.c16
-rw-r--r--py/objdeque.c4
-rw-r--r--py/objdict.c5
-rw-r--r--py/objfun.c2
-rw-r--r--py/objnamedtuple.c5
-rw-r--r--py/ringbuf.h32
-rw-r--r--py/stream.c2
-rw-r--r--shared-bindings/bleio/CharacteristicBuffer.c159
-rw-r--r--shared-bindings/bleio/CharacteristicBuffer.h9
-rw-r--r--shared-bindings/bleio/UUID.c70
-rw-r--r--shared-bindings/busio/UART.c4
-rw-r--r--shared-bindings/displayio/Display.c181
-rw-r--r--shared-bindings/displayio/Display.h59
-rw-r--r--shared-bindings/displayio/FourWire.c93
-rw-r--r--shared-bindings/displayio/FourWire.h31
-rw-r--r--shared-bindings/displayio/OnDiskBitmap.c44
-rw-r--r--shared-bindings/displayio/OnDiskBitmap.h3
-rw-r--r--shared-bindings/displayio/ParallelBus.c126
-rw-r--r--shared-bindings/displayio/ParallelBus.h49
-rw-r--r--shared-bindings/displayio/__init__.c28
-rw-r--r--shared-bindings/displayio/__init__.h4
-rw-r--r--shared-bindings/struct/__init__.c63
-rw-r--r--shared-bindings/struct/__init__.h2
-rw-r--r--shared-module/displayio/Display.c149
-rw-r--r--shared-module/displayio/Display.h55
-rw-r--r--shared-module/displayio/FourWire.c89
-rw-r--r--shared-module/displayio/FourWire.h (renamed from ports/atmel-samd/common-hal/displayio/FourWire.h)14
-rw-r--r--shared-module/displayio/Group.c3
-rw-r--r--shared-module/displayio/Group.h1
-rw-r--r--shared-module/displayio/OnDiskBitmap.c8
-rw-r--r--shared-module/displayio/__init__.c241
-rw-r--r--shared-module/displayio/__init__.h17
-rw-r--r--shared-module/struct/__init__.c113
-rw-r--r--supervisor/shared/board_busses.c (renamed from ports/atmel-samd/board_busses.c)35
-rw-r--r--supervisor/shared/board_busses.h (renamed from ports/atmel-samd/board_busses.h)20
-rw-r--r--supervisor/supervisor.mk1
137 files changed, 4752 insertions, 2590 deletions
diff --git a/extmod/machine_i2c.c b/extmod/machine_i2c.c
index b91f1a1eb..85b46a9f6 100644
--- a/extmod/machine_i2c.c
+++ b/extmod/machine_i2c.c
@@ -287,14 +287,14 @@ STATIC void machine_i2c_obj_init_helper(machine_i2c_obj_t *self, size_t n_args,
mp_hal_i2c_init(self, args[ARG_freq].u_int);
}
-STATIC mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
// check the id argument, if given
if (n_args > 0) {
if (args[0] != MP_OBJ_NEW_SMALL_INT(-1)) {
#if defined(MICROPY_PY_MACHINE_I2C_MAKE_NEW)
// dispatch to port-specific constructor
- extern mp_obj_t MICROPY_PY_MACHINE_I2C_MAKE_NEW(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args);
- return MICROPY_PY_MACHINE_I2C_MAKE_NEW(type, n_args, n_kw, args);
+ extern mp_obj_t MICROPY_PY_MACHINE_I2C_MAKE_NEW(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *all_args, mp_map_t *kw_args);
+ return MICROPY_PY_MACHINE_I2C_MAKE_NEW(type, n_args, args, kw_args);
#else
mp_raise_ValueError(translate("invalid I2C peripheral"));
#endif
@@ -306,9 +306,7 @@ STATIC mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, s
// create new soft I2C object
machine_i2c_obj_t *self = m_new_obj(machine_i2c_obj_t);
self->base.type = &machine_i2c_type;
- mp_map_t kw_args;
- mp_map_init_fixed_table(&kw_args, n_kw, args + n_args);
- machine_i2c_obj_init_helper(self, n_args, args, &kw_args);
+ machine_i2c_obj_init_helper(self, n_args, args, kw_args);
return (mp_obj_t)self;
}
diff --git a/extmod/machine_pinbase.c b/extmod/machine_pinbase.c
index 070c5cde9..997a6fd99 100644
--- a/extmod/machine_pinbase.c
+++ b/extmod/machine_pinbase.c
@@ -45,11 +45,11 @@ STATIC const mp_pinbase_t pinbase_singleton = {
.base = { &machine_pinbase_type },
};
-STATIC mp_obj_t pinbase_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t pinbase_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
(void)type;
(void)n_args;
- (void)n_kw;
(void)args;
+ (void)kw_args;
return MP_OBJ_FROM_PTR(&pinbase_singleton);
}
diff --git a/extmod/machine_signal.c b/extmod/machine_signal.c
index 3f9f5af94..62658cbb1 100644
--- a/extmod/machine_signal.c
+++ b/extmod/machine_signal.c
@@ -42,7 +42,7 @@ typedef struct _machine_signal_t {
bool invert;
} machine_signal_t;
-STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
mp_obj_t pin = args[0];
bool invert = false;
@@ -96,9 +96,9 @@ STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, size_t
// Otherwise there should be 1 or 2 args
{
if (n_args == 1) {
- if (n_kw == 0) {
- } else if (n_kw == 1 && args[1] == MP_OBJ_NEW_QSTR(MP_QSTR_invert)) {
- invert = mp_obj_is_true(args[2]);
+ if (kw_args == NULL || kw_args->used == 0) {
+ } else if (kw_args->used == 1 && kw_args->table[0].key == MP_OBJ_NEW_QSTR(MP_QSTR_invert)) {
+ invert = mp_obj_is_true(kw_args->table[0].value);
} else {
goto error;
}
@@ -133,7 +133,7 @@ STATIC mp_uint_t signal_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_t arg
// fast method for getting/setting signal value
STATIC mp_obj_t signal_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 0, 1, false);
+ mp_arg_check_num_kw_array(n_args, n_kw, 0, 1, false);
if (n_args == 0) {
// get pin
return MP_OBJ_NEW_SMALL_INT(mp_virtual_pin_read(self_in));
diff --git a/extmod/machine_spi.c b/extmod/machine_spi.c
index 3bbab2824..c5707a3d0 100644
--- a/extmod/machine_spi.c
+++ b/extmod/machine_spi.c
@@ -43,16 +43,16 @@
/******************************************************************************/
// MicroPython bindings for generic machine.SPI
-STATIC mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args);
+STATIC mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
-mp_obj_t mp_machine_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+mp_obj_t mp_machine_spi_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
// check the id argument, if given
if (n_args > 0) {
if (args[0] != MP_OBJ_NEW_SMALL_INT(-1)) {
#if defined(MICROPY_PY_MACHINE_SPI_MAKE_NEW)
// dispatch to port-specific constructor
- extern mp_obj_t MICROPY_PY_MACHINE_SPI_MAKE_NEW(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args);
- return MICROPY_PY_MACHINE_SPI_MAKE_NEW(type, n_args, n_kw, args);
+ extern mp_obj_t MICROPY_PY_MACHINE_SPI_MAKE_NEW(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args);
+ return MICROPY_PY_MACHINE_SPI_MAKE_NEW(type, n_args, args, kw_args);
#else
mp_raise_ValueError(translate("invalid SPI peripheral"));
#endif
@@ -62,7 +62,7 @@ mp_obj_t mp_machine_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_
}
// software SPI
- return mp_machine_soft_spi_make_new(type, n_args, n_kw, args);
+ return mp_machine_soft_spi_make_new(type, n_args, args, kw_args);
}
STATIC mp_obj_t machine_spi_init(size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
@@ -180,7 +180,7 @@ STATIC void mp_machine_soft_spi_print(const mp_print_t *print, mp_obj_t self_in,
mp_hal_pin_name(self->spi.sck), mp_hal_pin_name(self->spi.mosi), mp_hal_pin_name(self->spi.miso));
}
-STATIC mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
+STATIC mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *all_args, mp_map_t *kw_args) {
enum { ARG_baudrate, ARG_polarity, ARG_phase, ARG_bits, ARG_firstbit, ARG_sck, ARG_mosi, ARG_miso };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_baudrate, MP_ARG_INT, {.u_int = 500000} },
@@ -193,7 +193,7 @@ STATIC mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n
{ MP_QSTR_miso, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
- mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
+ mp_arg_parse_all(n_args, all_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
// create new object
mp_machine_soft_spi_obj_t *self = m_new_obj(mp_machine_soft_spi_obj_t);
diff --git a/extmod/modframebuf.c b/extmod/modframebuf.c
index 413540540..f92312a23 100644
--- a/extmod/modframebuf.c
+++ b/extmod/modframebuf.c
@@ -259,8 +259,8 @@ STATIC void fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, u
formats[fb->format].fill_rect(fb, x, y, xend - x, yend - y, col);
}
-STATIC mp_obj_t framebuf_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 4, 5, false);
+STATIC mp_obj_t framebuf_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
+ mp_arg_check_num(n_args, kw_args, 4, 5, false);
mp_obj_framebuf_t *o = m_new_obj(mp_obj_framebuf_t);
o->base.type = type;
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index e627cd146..9eea30bf3 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -122,8 +122,8 @@ STATIC NORETURN void syntax_error(void) {
mp_raise_TypeError(translate("syntax error in uctypes descriptor"));
}
-STATIC mp_obj_t uctypes_struct_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 2, 3, false);
+STATIC mp_obj_t uctypes_struct_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
+ mp_arg_check_num(n_args, kw_args, 2, 3, false);
mp_obj_uctypes_struct_t *o = m_new_obj(mp_obj_uctypes_struct_t);
o->base.type = type;
o->addr = (void*)(uintptr_t)mp_obj_int_get_truncated(args[0]);
diff --git a/extmod/modutimeq.c b/extmod/modutimeq.c
index 614820443..99b51016d 100644
--- a/extmod/modutimeq.c
+++ b/extmod/modutimeq.c
@@ -76,8 +76,8 @@ STATIC bool time_less_than(struct qentry *item, struct qentry *parent) {
return res && res < (MODULO / 2);
}
-STATIC mp_obj_t utimeq_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 1, 1, false);
+STATIC mp_obj_t utimeq_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
+ mp_arg_check_num(n_args, kw_args, 1, 1, false);
mp_uint_t alloc = mp_obj_get_int(args[0]);
mp_obj_utimeq_t *o = m_new_obj_var(mp_obj_utimeq_t, struct qentry, alloc);
o->base.type = type;
diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c
index 253deac1e..7f15d02a8 100644
--- a/extmod/moduzlib.c
+++ b/extmod/moduzlib.c
@@ -69,8 +69,8 @@ STATIC int read_src_stream(TINF_DATA *data) {
return c;
}
-STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 1, 2, false);
+STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
+ mp_arg_check_num(n_args, kw_args, 1, 2, false);
mp_get_stream_raise(args[0], MP_STREAM_OP_READ);
mp_obj_decompio_t *o = m_new_obj(mp_obj_decompio_t);
o->base.type = type;
diff --git a/extmod/modwebsocket.c b/extmod/modwebsocket.c
index c556f2b77..997c7e262 100644
--- a/extmod/modwebsocket.c
+++ b/extmod/modwebsocket.c
@@ -57,8 +57,8 @@ typedef struct _mp_obj_websocket_t {
STATIC mp_uint_t websocket_write(mp_obj_t self_in, const void *buf, mp_uint_t size, int *errcode);
-STATIC mp_obj_t websocket_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 1, 2, false);
+STATIC mp_obj_t websocket_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
+ mp_arg_check_num(n_args, kw_args, 1, 2, false);
mp_get_stream_raise(args[0], MP_STREAM_OP_READ | MP_STREAM_OP_WRITE | MP_STREAM_OP_IOCTL);
mp_obj_websocket_t *o = m_new_obj(mp_obj_websocket_t);
o->base.type = type;
diff --git a/extmod/vfs_posix.c b/extmod/vfs_posix.c
index 39e197f29..d28dfe451 100644
--- a/extmod/vfs_posix.c
+++ b/extmod/vfs_posix.c
@@ -90,8 +90,8 @@ STATIC mp_import_stat_t mp_vfs_posix_import_stat(void *self_in, const char *path
return MP_IMPORT_STAT_NO_EXIST;
}
-STATIC mp_obj_t vfs_posix_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 0, 1, false);
+STATIC mp_obj_t vfs_posix_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
+ mp_arg_check_num(n_args, kw_args, 0, 1, false);
mp_obj_vfs_posix_t *vfs = m_new_obj(mp_obj_vfs_posix_t);
vfs->base.type = type;
diff --git a/extmod/vfs_posix_file.c b/extmod/vfs_posix_file.c
index 3eca47eb4..b760b3847 100644
--- a/extmod/vfs_posix_file.c
+++ b/extmod/vfs_posix_file.c
@@ -109,14 +109,14 @@ mp_obj_t mp_vfs_posix_file_open(const mp_obj_type_t *type, mp_obj_t file_in, mp_
return MP_OBJ_FROM_PTR(o);
}
-STATIC mp_obj_t vfs_posix_file_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t vfs_posix_file_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_file, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_rom_obj = MP_ROM_PTR(&mp_const_none_obj)} },
{ MP_QSTR_mode, MP_ARG_OBJ, {.u_rom_obj = MP_ROM_QSTR(MP_QSTR_r)} },
};
mp_arg_val_t arg_vals[MP_ARRAY_SIZE(allowed_args)];
- mp_arg_parse_all_kw_array(n_args, n_kw, args, MP_ARRAY_SIZE(allowed_args), allowed_args, arg_vals);
+ mp_arg_parse_all(n_args, args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, arg_vals);
return mp_vfs_posix_file_open(type, arg_vals[0].u_obj, arg_vals[1].u_obj);
}
diff --git a/locale/ID.po b/locale/ID.po
index ec91aad80..f25399844 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-13 23:51-0500\n"
+"POT-Creation-Date: 2019-01-22 14:00-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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"
@@ -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
@@ -353,12 +341,12 @@ msgid "bytes > 8 bits not supported"
msgstr "byte > 8 bit tidak didukung"
#: ports/atmel-samd/common-hal/busio/UART.c:73
-#: ports/nrf/common-hal/busio/UART.c:118
+#: ports/nrf/common-hal/busio/UART.c:91
msgid "tx and rx cannot both be None"
msgstr "tx dan rx keduanya tidak boleh kosong"
#: ports/atmel-samd/common-hal/busio/UART.c:146
-#: ports/nrf/common-hal/busio/UART.c:152
+#: ports/nrf/common-hal/busio/UART.c:132
msgid "Failed to allocate RX buffer"
msgstr "Gagal untuk mengalokasikan buffer RX"
@@ -367,12 +355,12 @@ msgid "Could not initialize UART"
msgstr "Tidak dapat menginisialisasi UART"
#: ports/atmel-samd/common-hal/busio/UART.c:241
-#: ports/nrf/common-hal/busio/UART.c:197
+#: ports/nrf/common-hal/busio/UART.c:174
msgid "No RX pin"
msgstr "Tidak pin RX"
#: ports/atmel-samd/common-hal/busio/UART.c:300
-#: ports/nrf/common-hal/busio/UART.c:232
+#: ports/nrf/common-hal/busio/UART.c:209
msgid "No TX pin"
msgstr "Tidak ada pin TX"
@@ -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."
@@ -724,7 +723,7 @@ msgstr "Gagal untuk melaporkan nilai atribut, status: 0x%08lX"
msgid "Failed to read attribute value, err %0x04x"
msgstr "Gagal untuk membaca nilai atribut, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Characteristic.c:172
+#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34
#, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
@@ -734,7 +733,7 @@ msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
msgid "Failed to write attribute value, err 0x%04x"
msgstr "Gagal untuk menulis nilai atribut, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Characteristic.c:189
+#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54
#, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x"
msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX"
@@ -755,51 +754,51 @@ msgstr "Tidak bisa menyesuaikan data ke dalam paket advertisment"
msgid "Failed to discover services"
msgstr "Gagal untuk menemukan layanan, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:267
-#: ports/nrf/common-hal/bleio/Device.c:300
+#: ports/nrf/common-hal/bleio/Device.c:268
+#: ports/nrf/common-hal/bleio/Device.c:302
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:278
-#: ports/nrf/common-hal/bleio/Device.c:311
-#: ports/nrf/common-hal/bleio/Device.c:342
-#: ports/nrf/common-hal/bleio/Device.c:376
+#: ports/nrf/common-hal/bleio/Device.c:280
+#: ports/nrf/common-hal/bleio/Device.c:313
+#: ports/nrf/common-hal/bleio/Device.c:344
+#: ports/nrf/common-hal/bleio/Device.c:378
#, fuzzy
msgid "Failed to release mutex"
msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:387
+#: ports/nrf/common-hal/bleio/Device.c:389
#, fuzzy
msgid "Failed to continue scanning"
msgstr "Gagal untuk melanjutkan scanning, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:419
+#: ports/nrf/common-hal/bleio/Device.c:421
#, fuzzy
msgid "Failed to connect:"
msgstr "Gagal untuk menyambungkan, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:489
+#: ports/nrf/common-hal/bleio/Device.c:491
#, fuzzy
msgid "Failed to add service"
msgstr "Gagal untuk menambahkan layanan, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:506
+#: ports/nrf/common-hal/bleio/Device.c:508
#, fuzzy
msgid "Failed to start advertising"
msgstr "Gagal untuk memulai advertisement, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:523
+#: ports/nrf/common-hal/bleio/Device.c:525
#, fuzzy
msgid "Failed to stop advertising"
msgstr "Gagal untuk memberhentikan advertisement, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:548
+#: ports/nrf/common-hal/bleio/Device.c:550
#, fuzzy
msgid "Failed to start scanning"
msgstr "Gagal untuk melakukan scanning, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:564
+#: ports/nrf/common-hal/bleio/Device.c:566
#, fuzzy
msgid "Failed to create mutex"
msgstr "Gagal untuk membuat mutex, status: 0x%08lX"
@@ -855,19 +854,19 @@ msgstr "Semua perangkat SPI sedang digunakan"
msgid "error = 0x%08lX"
msgstr "error = 0x%08lX"
-#: ports/nrf/common-hal/busio/UART.c:122
+#: ports/nrf/common-hal/busio/UART.c:95
msgid "Invalid buffer size"
msgstr "Ukuran buffer tidak valid"
-#: ports/nrf/common-hal/busio/UART.c:126
+#: ports/nrf/common-hal/busio/UART.c:99
msgid "Odd parity is not supported"
msgstr "Parity ganjil tidak didukung"
-#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362
-#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372
-#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383
-#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392
-#: ports/nrf/common-hal/busio/UART.c:400
+#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339
+#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349
+#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360
+#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369
+#: ports/nrf/common-hal/busio/UART.c:377
msgid "busio.UART not available"
msgstr "busio.UART tidak tersedia"
@@ -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:108
#, 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:112
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:142
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:134
msgid "unexpected keyword argument '%q'"
msgstr "keyword argumen '%q' tidak diharapkan"
@@ -1364,9 +1363,9 @@ msgstr ""
msgid "schedule stack full"
msgstr ""
-#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244
-#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145
-#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175
+#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
+#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
+#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183
msgid "buffer too small"
msgstr ""
@@ -1544,11 +1543,11 @@ msgstr ""
msgid "empty"
msgstr ""
-#: py/objdict.c:314
+#: py/objdict.c:315
msgid "popitem(): dictionary is empty"
msgstr ""
-#: py/objdict.c:357
+#: py/objdict.c:358
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 ""
@@ -2043,47 +2042,47 @@ msgstr ""
msgid "byte code not implemented"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:101
+#: shared-bindings/_pixelbuf/PixelBuf.c:99
#, c-format
msgid "byteorder is not an instance of ByteOrder (got a %s)"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:106
+#: shared-bindings/_pixelbuf/PixelBuf.c:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:118
+#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:123
+#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:129
+#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:394
+#: shared-bindings/_pixelbuf/PixelBuf.c:392
msgid "Only slices with step=1 (aka None) are supported"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:396
+#: shared-bindings/_pixelbuf/PixelBuf.c:394
msgid "Range out of bounds"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:405
+#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:421
+#: shared-bindings/_pixelbuf/PixelBuf.c:419
#, c-format
msgid "Unmatched number of items on RHS (expected %d, got %d)."
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:444
+#: shared-bindings/_pixelbuf/PixelBuf.c:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
@@ -2115,8 +2114,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 ""
@@ -2153,86 +2152,104 @@ 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 ""
#: shared-bindings/audioio/WaveFile.c:78
-#: shared-bindings/displayio/OnDiskBitmap.c:85
+#: shared-bindings/displayio/OnDiskBitmap.c:87
msgid "file must be a file opened in byte mode"
msgstr ""
-#: 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:39
+#, fuzzy
+msgid "Not connected"
+msgstr "Tidak dapat menyambungkan ke AP"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:74
+#, fuzzy
+msgid "timeout must be >= 0.0"
+msgstr "bits harus memilki nilai 8"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:79
#, fuzzy
msgid "buffer_size must be >= 1"
msgstr "buffers harus mempunyai panjang yang sama"
-#: shared-bindings/bleio/CharacteristicBuffer.c:72
+#: shared-bindings/bleio/CharacteristicBuffer.c:83
msgid "Expected a Characteristic"
msgstr ""
+#: shared-bindings/bleio/CharacteristicBuffer.c:138
+msgid "CharacteristicBuffer writing not provided"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:147
+msgid "Not connected."
+msgstr ""
+
#: shared-bindings/bleio/Device.c:210
msgid "Can't add services in Central mode"
msgstr ""
@@ -2249,20 +2266,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 ""
@@ -2270,32 +2287,36 @@ msgstr ""
msgid "UUID integer value not in range 0 to 0xffff"
msgstr ""
-#: shared-bindings/bleio/UUID.c:75
-msgid "UUID value is not int or byte buffer"
+#: shared-bindings/bleio/UUID.c:91
+msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
msgstr ""
-#: shared-bindings/bleio/UUID.c:79
+#: shared-bindings/bleio/UUID.c:103
+msgid "UUID value is not str, int or byte buffer"
+msgstr ""
+
+#: shared-bindings/bleio/UUID.c:107
#, fuzzy
msgid "Byte buffer must be 16 bytes."
msgstr "buffers harus mempunyai panjang yang sama"
-#: shared-bindings/bleio/UUID.c:120
+#: shared-bindings/bleio/UUID.c:151
msgid "not a 128-bit UUID"
msgstr ""
-#: 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 ""
@@ -2321,7 +2342,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 ""
@@ -2337,45 +2358,66 @@ 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:119
+msgid "Too many displays"
+msgstr ""
+
+#: shared-bindings/displayio/Display.c:138
+msgid "Must be a Group subclass."
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:93
+#: shared-bindings/displayio/ParallelBus.c:98
+msgid "Too many display busses"
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:106
+#: shared-bindings/displayio/ParallelBus.c:110
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/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 ""
@@ -2387,15 +2429,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 ""
@@ -2437,29 +2479,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 ""
@@ -2630,11 +2672,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 ""
@@ -2652,6 +2703,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 ""
@@ -2660,10 +2724,15 @@ msgstr ""
msgid "'S' and 'O' are not supported format types"
msgstr ""
-#: shared-module/struct/__init__.c:83
+#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format"
msgstr ""
+#: shared-module/struct/__init__.c:179
+#, fuzzy
+msgid "buffer size must match format"
+msgstr "buffers harus mempunyai panjang yang sama"
+
#: shared-module/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
@@ -2677,6 +2746,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:91
+msgid "No default SPI bus"
+msgstr "Tidak ada standar bus SPI"
+
+#: supervisor/shared/board_busses.c:118
+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 "
@@ -2738,6 +2819,11 @@ msgid ""
"exit safe mode.\n"
msgstr ""
+#~ 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"
@@ -2755,7 +2841,6 @@ msgstr ""
#~ 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"
+#, fuzzy
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Gagal untuk megalokasikan buffer RX dari %d byte"
diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot
index 37b403826..977cbca27 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-13 23:51-0500\n"
+"POT-Creation-Date: 2019-01-22 14:00-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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 ""
@@ -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
@@ -346,12 +334,12 @@ msgid "bytes > 8 bits not supported"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c:73
-#: ports/nrf/common-hal/busio/UART.c:118
+#: ports/nrf/common-hal/busio/UART.c:91
msgid "tx and rx cannot both be None"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c:146
-#: ports/nrf/common-hal/busio/UART.c:152
+#: ports/nrf/common-hal/busio/UART.c:132
msgid "Failed to allocate RX buffer"
msgstr ""
@@ -360,12 +348,12 @@ msgid "Could not initialize UART"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c:241
-#: ports/nrf/common-hal/busio/UART.c:197
+#: ports/nrf/common-hal/busio/UART.c:174
msgid "No RX pin"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c:300
-#: ports/nrf/common-hal/busio/UART.c:232
+#: ports/nrf/common-hal/busio/UART.c:209
msgid "No TX pin"
msgstr ""
@@ -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."
@@ -709,7 +708,7 @@ msgstr ""
msgid "Failed to read attribute value, err %0x04x"
msgstr ""
-#: ports/nrf/common-hal/bleio/Characteristic.c:172
+#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34
#, c-format
msgid "Failed to acquire mutex, err 0x%04x"
msgstr ""
@@ -719,7 +718,7 @@ msgstr ""
msgid "Failed to write attribute value, err 0x%04x"
msgstr ""
-#: ports/nrf/common-hal/bleio/Characteristic.c:189
+#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54
#, c-format
msgid "Failed to release mutex, err 0x%04x"
msgstr ""
@@ -738,43 +737,43 @@ msgstr ""
msgid "Failed to discover services"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:267
-#: ports/nrf/common-hal/bleio/Device.c:300
+#: ports/nrf/common-hal/bleio/Device.c:268
+#: ports/nrf/common-hal/bleio/Device.c:302
msgid "Failed to acquire mutex"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:278
-#: ports/nrf/common-hal/bleio/Device.c:311
-#: ports/nrf/common-hal/bleio/Device.c:342
-#: ports/nrf/common-hal/bleio/Device.c:376
+#: ports/nrf/common-hal/bleio/Device.c:280
+#: ports/nrf/common-hal/bleio/Device.c:313
+#: ports/nrf/common-hal/bleio/Device.c:344
+#: ports/nrf/common-hal/bleio/Device.c:378
msgid "Failed to release mutex"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:387
+#: ports/nrf/common-hal/bleio/Device.c:389
msgid "Failed to continue scanning"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:419
+#: ports/nrf/common-hal/bleio/Device.c:421
msgid "Failed to connect:"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:489
+#: ports/nrf/common-hal/bleio/Device.c:491
msgid "Failed to add service"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:506
+#: ports/nrf/common-hal/bleio/Device.c:508
msgid "Failed to start advertising"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:523
+#: ports/nrf/common-hal/bleio/Device.c:525
msgid "Failed to stop advertising"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:548
+#: ports/nrf/common-hal/bleio/Device.c:550
msgid "Failed to start scanning"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:564
+#: ports/nrf/common-hal/bleio/Device.c:566
msgid "Failed to create mutex"
msgstr ""
@@ -829,19 +828,19 @@ msgstr ""
msgid "error = 0x%08lX"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c:122
+#: ports/nrf/common-hal/busio/UART.c:95
msgid "Invalid buffer size"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c:126
+#: ports/nrf/common-hal/busio/UART.c:99
msgid "Odd parity is not supported"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362
-#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372
-#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383
-#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392
-#: ports/nrf/common-hal/busio/UART.c:400
+#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339
+#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349
+#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360
+#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369
+#: ports/nrf/common-hal/busio/UART.c:377
msgid "busio.UART not available"
msgstr ""
@@ -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:108
#, 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:112
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:142
msgid "function got multiple values for argument '%q'"
msgstr ""
-#: py/bc.c:218 py/objnamedtuple.c:130
+#: py/bc.c:218 py/objnamedtuple.c:134
msgid "unexpected keyword argument '%q'"
msgstr ""
@@ -1331,9 +1330,9 @@ msgstr ""
msgid "schedule stack full"
msgstr ""
-#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244
-#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145
-#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175
+#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
+#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
+#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183
msgid "buffer too small"
msgstr ""
@@ -1511,11 +1510,11 @@ msgstr ""
msgid "empty"
msgstr ""
-#: py/objdict.c:314
+#: py/objdict.c:315
msgid "popitem(): dictionary is empty"
msgstr ""
-#: py/objdict.c:357
+#: py/objdict.c:358
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 ""
@@ -2010,47 +2009,47 @@ msgstr ""
msgid "byte code not implemented"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:101
+#: shared-bindings/_pixelbuf/PixelBuf.c:99
#, c-format
msgid "byteorder is not an instance of ByteOrder (got a %s)"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:106
+#: shared-bindings/_pixelbuf/PixelBuf.c:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:118
+#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:123
+#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:129
+#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:394
+#: shared-bindings/_pixelbuf/PixelBuf.c:392
msgid "Only slices with step=1 (aka None) are supported"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:396
+#: shared-bindings/_pixelbuf/PixelBuf.c:394
msgid "Range out of bounds"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:405
+#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:421
+#: shared-bindings/_pixelbuf/PixelBuf.c:419
#, c-format
msgid "Unmatched number of items on RHS (expected %d, got %d)."
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:444
+#: shared-bindings/_pixelbuf/PixelBuf.c:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
@@ -2082,8 +2081,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 ""
@@ -2120,85 +2119,101 @@ 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 ""
#: shared-bindings/audioio/WaveFile.c:78
-#: shared-bindings/displayio/OnDiskBitmap.c:85
+#: shared-bindings/displayio/OnDiskBitmap.c:87
msgid "file must be a file opened in byte mode"
msgstr ""
-#: 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:39
+msgid "Not connected"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:74
+msgid "timeout must be >= 0.0"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:79
msgid "buffer_size must be >= 1"
msgstr ""
-#: shared-bindings/bleio/CharacteristicBuffer.c:72
+#: shared-bindings/bleio/CharacteristicBuffer.c:83
msgid "Expected a Characteristic"
msgstr ""
+#: shared-bindings/bleio/CharacteristicBuffer.c:138
+msgid "CharacteristicBuffer writing not provided"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:147
+msgid "Not connected."
+msgstr ""
+
#: shared-bindings/bleio/Device.c:210
msgid "Can't add services in Central mode"
msgstr ""
@@ -2215,19 +2230,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 ""
@@ -2235,31 +2250,35 @@ msgstr ""
msgid "UUID integer value not in range 0 to 0xffff"
msgstr ""
-#: shared-bindings/bleio/UUID.c:75
-msgid "UUID value is not int or byte buffer"
+#: shared-bindings/bleio/UUID.c:91
+msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
+msgstr ""
+
+#: shared-bindings/bleio/UUID.c:103
+msgid "UUID value is not str, int or byte buffer"
msgstr ""
-#: shared-bindings/bleio/UUID.c:79
+#: shared-bindings/bleio/UUID.c:107
msgid "Byte buffer must be 16 bytes."
msgstr ""
-#: shared-bindings/bleio/UUID.c:120
+#: shared-bindings/bleio/UUID.c:151
msgid "not a 128-bit UUID"
msgstr ""
-#: 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 ""
@@ -2285,7 +2304,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 ""
@@ -2301,45 +2320,66 @@ 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:119
+msgid "Too many displays"
+msgstr ""
+
+#: shared-bindings/displayio/Display.c:138
+msgid "Must be a Group subclass."
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:93
+#: shared-bindings/displayio/ParallelBus.c:98
+msgid "Too many display busses"
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:106
+#: shared-bindings/displayio/ParallelBus.c:110
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/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 ""
@@ -2351,15 +2391,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 ""
@@ -2401,29 +2441,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 ""
@@ -2594,11 +2634,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 ""
@@ -2616,6 +2664,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,10 +2685,14 @@ msgstr ""
msgid "'S' and 'O' are not supported format types"
msgstr ""
-#: shared-module/struct/__init__.c:83
+#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format"
msgstr ""
+#: shared-module/struct/__init__.c:179
+msgid "buffer size must match format"
+msgstr ""
+
#: shared-module/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
@@ -2641,6 +2706,18 @@ msgstr ""
msgid "USB Error"
msgstr ""
+#: supervisor/shared/board_busses.c:62
+msgid "No default I2C bus"
+msgstr ""
+
+#: supervisor/shared/board_busses.c:91
+msgid "No default SPI bus"
+msgstr ""
+
+#: supervisor/shared/board_busses.c:118
+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 b8a8a43b6..715773ce4 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-13 23:51-0500\n"
+"POT-Creation-Date: 2019-01-22 14:00-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"
@@ -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
@@ -350,12 +338,12 @@ msgid "bytes > 8 bits not supported"
msgstr "bytes mit merh als 8 bits werden nicht unterstützt"
#: ports/atmel-samd/common-hal/busio/UART.c:73
-#: ports/nrf/common-hal/busio/UART.c:118
+#: ports/nrf/common-hal/busio/UART.c:91
msgid "tx and rx cannot both be None"
msgstr "tx und rx können nicht beide None sein"
#: ports/atmel-samd/common-hal/busio/UART.c:146
-#: ports/nrf/common-hal/busio/UART.c:152
+#: ports/nrf/common-hal/busio/UART.c:132
msgid "Failed to allocate RX buffer"
msgstr "Konnte keinen RX Buffer allozieren"
@@ -364,12 +352,12 @@ msgid "Could not initialize UART"
msgstr "Konnte UART nicht initialisieren"
#: ports/atmel-samd/common-hal/busio/UART.c:241
-#: ports/nrf/common-hal/busio/UART.c:197
+#: ports/nrf/common-hal/busio/UART.c:174
msgid "No RX pin"
msgstr "Kein RX Pin"
#: ports/atmel-samd/common-hal/busio/UART.c:300
-#: ports/nrf/common-hal/busio/UART.c:232
+#: ports/nrf/common-hal/busio/UART.c:209
msgid "No TX pin"
msgstr "Kein TX Pin"
@@ -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."
@@ -651,234 +650,234 @@ msgstr ""
#: ports/nrf/common-hal/analogio/AnalogOut.c:37
msgid "AnalogOut functionality not supported"
-msgstr ""
+msgstr "AnalogOut-Funktion wird nicht unterstützt"
#: ports/nrf/common-hal/bleio/Adapter.c:41
#, c-format
msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX"
-msgstr ""
+msgstr "Soft device assert, id: 0x%08lX, pc: 0x%08lX"
#: ports/nrf/common-hal/bleio/Adapter.c:110
#, fuzzy
msgid "Failed to change softdevice state"
-msgstr "Kann advertisement nicht stoppen. Status: 0x%02x"
+msgstr "Fehler beim Ändern des Softdevice-Status"
#: ports/nrf/common-hal/bleio/Adapter.c:119
#, fuzzy
msgid "Failed to get softdevice state"
-msgstr "Kann advertisement nicht stoppen. Status: 0x%02x"
+msgstr "Fehler beim Abrufen des Softdevice-Status"
#: ports/nrf/common-hal/bleio/Adapter.c:138
msgid "Failed to get local address"
-msgstr ""
+msgstr "Lokale Adresse konnte nicht abgerufen werden"
#: ports/nrf/common-hal/bleio/Broadcaster.c:48
msgid "interval not in range 0.0020 to 10.24"
-msgstr ""
+msgstr "Das Interval ist nicht im Bereich 0.0020 bis 10.24"
#: ports/nrf/common-hal/bleio/Broadcaster.c:58
#: ports/nrf/common-hal/bleio/Peripheral.c:56
#, fuzzy
msgid "Data too large for advertisement packet"
-msgstr "Daten können nicht in das advertisement packet eingefügt werden."
+msgstr "Zu vielen Daten für das advertisement packet"
#: ports/nrf/common-hal/bleio/Broadcaster.c:83
#: ports/nrf/common-hal/bleio/Peripheral.c:324
#, fuzzy, c-format
msgid "Failed to start advertising, err 0x%04x"
-msgstr "Kann advertisement nicht starten. Status: 0x%02x"
+msgstr "Kann advertisement nicht starten. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Broadcaster.c:96
#: ports/nrf/common-hal/bleio/Peripheral.c:336
#, fuzzy, c-format
msgid "Failed to stop advertising, err 0x%04x"
-msgstr "Kann advertisement nicht stoppen. Status: 0x%02x"
+msgstr "Kann advertisement nicht stoppen. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c:59
#, fuzzy, c-format
msgid "Failed to read CCCD value, err 0x%04x"
-msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x"
+msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c:89
#, fuzzy, c-format
msgid "Failed to read gatts value, err 0x%04x"
-msgstr "Kann den Attributwert nicht schreiben. Status: 0x%02x"
+msgstr "Kann den Attributwert nicht schreiben. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c:106
#, fuzzy, c-format
msgid "Failed to write gatts value, err 0x%04x"
-msgstr "Kann den Attributwert nicht schreiben. Status: 0x%02x"
+msgstr "Kann den Attributwert nicht schreiben. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c:132
#, fuzzy, c-format
msgid "Failed to notify or indicate attribute value, err %0x04x"
-msgstr "Kann den Attributwert nicht mitteilen. Status: 0x%02x"
+msgstr "Kann den Attributwert nicht mitteilen. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c:144
#, fuzzy, c-format
msgid "Failed to read attribute value, err %0x04x"
-msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x"
+msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x"
-#: ports/nrf/common-hal/bleio/Characteristic.c:172
+#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34
#, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x"
-msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x"
+msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c:178
#, fuzzy, c-format
msgid "Failed to write attribute value, err 0x%04x"
-msgstr "Kann den Attributwert nicht schreiben. Status: 0x%02x"
+msgstr "Kann den Attributwert nicht schreiben. Status: 0x%04x"
-#: ports/nrf/common-hal/bleio/Characteristic.c:189
+#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54
#, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x"
-msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x"
+msgstr "Mutex konnte nicht freigegeben werden. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c:251
#: ports/nrf/common-hal/bleio/Characteristic.c:284
msgid "bad GATT role"
-msgstr ""
+msgstr "bad GATT role"
#: ports/nrf/common-hal/bleio/Device.c:80
#: ports/nrf/common-hal/bleio/Device.c:112
#, fuzzy
msgid "Data too large for the advertisement packet"
-msgstr "Daten können nicht in das advertisement packet eingefügt werden."
+msgstr "Daten sind zu groß für das advertisement packet"
#: ports/nrf/common-hal/bleio/Device.c:262
#, fuzzy
msgid "Failed to discover services"
-msgstr "Kann advertisement nicht stoppen. Status: 0x%02x"
+msgstr "Es konnten keine Dienste gefunden werden"
-#: ports/nrf/common-hal/bleio/Device.c:267
-#: ports/nrf/common-hal/bleio/Device.c:300
+#: ports/nrf/common-hal/bleio/Device.c:268
+#: ports/nrf/common-hal/bleio/Device.c:302
#, fuzzy
msgid "Failed to acquire mutex"
-msgstr "Konnte keinen RX Buffer allozieren"
+msgstr "Akquirieren des Mutex gescheitert"
-#: ports/nrf/common-hal/bleio/Device.c:278
-#: ports/nrf/common-hal/bleio/Device.c:311
-#: ports/nrf/common-hal/bleio/Device.c:342
-#: ports/nrf/common-hal/bleio/Device.c:376
+#: ports/nrf/common-hal/bleio/Device.c:280
+#: ports/nrf/common-hal/bleio/Device.c:313
+#: ports/nrf/common-hal/bleio/Device.c:344
+#: ports/nrf/common-hal/bleio/Device.c:378
#, fuzzy
msgid "Failed to release mutex"
-msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x"
+msgstr "Loslassen des Mutex gescheitert"
-#: ports/nrf/common-hal/bleio/Device.c:387
+#: ports/nrf/common-hal/bleio/Device.c:389
#, fuzzy
msgid "Failed to continue scanning"
-msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%02x"
+msgstr "Der Scanvorgang kann nicht fortgesetzt werden"
-#: ports/nrf/common-hal/bleio/Device.c:419
+#: ports/nrf/common-hal/bleio/Device.c:421
#, fuzzy
msgid "Failed to connect:"
-msgstr "Kann nicht verbinden. Status: 0x%02x"
+msgstr "Das Verbinden ist fehlgeschlagen:"
-#: ports/nrf/common-hal/bleio/Device.c:489
+#: ports/nrf/common-hal/bleio/Device.c:491
#, fuzzy
msgid "Failed to add service"
-msgstr "Kann advertisement nicht stoppen. Status: 0x%02x"
+msgstr "Dienst konnte nicht hinzugefügt werden"
-#: ports/nrf/common-hal/bleio/Device.c:506
+#: ports/nrf/common-hal/bleio/Device.c:508
#, fuzzy
msgid "Failed to start advertising"
-msgstr "Kann advertisement nicht starten. Status: 0x%02x"
+msgstr "Kann advertisement nicht starten"
-#: ports/nrf/common-hal/bleio/Device.c:523
+#: ports/nrf/common-hal/bleio/Device.c:525
#, fuzzy
msgid "Failed to stop advertising"
-msgstr "Kann advertisement nicht stoppen. Status: 0x%02x"
+msgstr "Kann advertisement nicht stoppen"
-#: ports/nrf/common-hal/bleio/Device.c:548
+#: ports/nrf/common-hal/bleio/Device.c:550
#, fuzzy
msgid "Failed to start scanning"
-msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%02x"
+msgstr "Der Scanvorgang kann nicht gestartet werden"
-#: ports/nrf/common-hal/bleio/Device.c:564
+#: ports/nrf/common-hal/bleio/Device.c:566
#, fuzzy
msgid "Failed to create mutex"
-msgstr "Kann den Attributwert nicht lesen. Status: 0x%02x"
+msgstr "Erstellen des Mutex ist fehlgeschlagen"
#: ports/nrf/common-hal/bleio/Peripheral.c:304
#, fuzzy, c-format
msgid "Failed to add service, err 0x%04x"
-msgstr "Kann advertisement nicht stoppen. Status: 0x%02x"
+msgstr "Dienst konnte nicht hinzugefügt werden. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Scanner.c:75
#, fuzzy, c-format
msgid "Failed to continue scanning, err 0x%04x"
-msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%02x"
+msgstr "Der Scanvorgang kann nicht fortgesetzt werden. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Scanner.c:101
#, fuzzy, c-format
msgid "Failed to start scanning, err 0x%04x"
-msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%02x"
+msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Service.c:88
#, fuzzy, c-format
msgid "Failed to add characteristic, err 0x%04x"
-msgstr "Kann advertisement nicht stoppen. Status: 0x%02x"
+msgstr "Fehler beim Hinzufügen des Merkmals. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Service.c:92
msgid "Characteristic already in use by another Service."
-msgstr ""
+msgstr "Merkmal wird bereits von einem anderen Dienst verwendet."
#: ports/nrf/common-hal/bleio/UUID.c:54
#, fuzzy, c-format
msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
-msgstr "Kann keine herstellerspezifische 128-Bit-UUID hinzufügen."
+msgstr "Kann keine herstellerspezifische UUID hinzufügen. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/UUID.c:73
#, c-format
msgid "Could not decode ble_uuid, err 0x%04x"
-msgstr ""
+msgstr "Konnte ble_uuid nicht decodieren. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/UUID.c:88
msgid "Unexpected nrfx uuid type"
-msgstr ""
+msgstr "Unerwarteter nrfx uuid-Typ"
#: ports/nrf/common-hal/busio/I2C.c:98
#, fuzzy
msgid "All I2C peripherals are in use"
-msgstr "Alle timer werden benutzt"
+msgstr "Alle I2C-Peripheriegeräte sind in Benutzung"
#: ports/nrf/common-hal/busio/SPI.c:133
#, fuzzy
msgid "All SPI peripherals are in use"
-msgstr "Alle timer werden benutzt"
+msgstr "Alle SPI-Peripheriegeräte sind in Benutzung"
#: ports/nrf/common-hal/busio/UART.c:49
#, c-format
msgid "error = 0x%08lX"
-msgstr ""
+msgstr "error = 0x%08lX"
-#: ports/nrf/common-hal/busio/UART.c:122
+#: ports/nrf/common-hal/busio/UART.c:95
#, fuzzy
msgid "Invalid buffer size"
-msgstr "ungültiger dupterm index"
+msgstr "Ungültige Puffergröße"
-#: ports/nrf/common-hal/busio/UART.c:126
+#: ports/nrf/common-hal/busio/UART.c:99
#, fuzzy
msgid "Odd parity is not supported"
-msgstr "bytes mit merh als 8 bits werden nicht unterstützt"
+msgstr "bytes mit mehr als 8 bits werden nicht unterstützt"
-#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362
-#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372
-#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383
-#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392
-#: ports/nrf/common-hal/busio/UART.c:400
+#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339
+#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349
+#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360
+#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369
+#: ports/nrf/common-hal/busio/UART.c:377
msgid "busio.UART not available"
-msgstr ""
+msgstr "Kann busio.UART nicht finden"
#: ports/nrf/common-hal/microcontroller/Processor.c:48
#, fuzzy
msgid "Cannot get temperature"
-msgstr "Kann PPCP Parameter nicht setzen."
+msgstr "Kann Temperatur nicht holen"
#: ports/nrf/common-hal/pulseio/PWMOut.c:161
#, fuzzy
msgid "All PWM peripherals are in use"
-msgstr "Alle timer werden benutzt"
+msgstr "Alle PWM-Peripheriegeräte werden verwendet"
#: ports/unix/modffi.c:138
msgid "Unknown type"
@@ -890,7 +889,7 @@ msgstr "Fehler in ffi_prep_cif"
#: ports/unix/modffi.c:270
msgid "ffi_prep_closure_loc"
-msgstr ""
+msgstr "ffi_prep_closure_loc"
#: ports/unix/modffi.c:413
msgid "Don't know how to pass object to native function"
@@ -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:108
#, 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:112
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:142
msgid "function got multiple values for argument '%q'"
msgstr ""
-#: py/bc.c:218 py/objnamedtuple.c:130
+#: py/bc.c:218 py/objnamedtuple.c:134
msgid "unexpected keyword argument '%q'"
msgstr ""
@@ -1360,9 +1359,9 @@ msgstr ""
msgid "schedule stack full"
msgstr ""
-#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244
-#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145
-#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175
+#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
+#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
+#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183
msgid "buffer too small"
msgstr ""
@@ -1540,11 +1539,11 @@ msgstr ""
msgid "empty"
msgstr ""
-#: py/objdict.c:314
+#: py/objdict.c:315
msgid "popitem(): dictionary is empty"
msgstr ""
-#: py/objdict.c:357
+#: py/objdict.c:358
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 ""
@@ -2039,47 +2038,47 @@ msgstr ""
msgid "byte code not implemented"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:101
+#: shared-bindings/_pixelbuf/PixelBuf.c:99
#, c-format
msgid "byteorder is not an instance of ByteOrder (got a %s)"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:106
+#: shared-bindings/_pixelbuf/PixelBuf.c:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:118
+#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:123
+#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:129
+#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:394
+#: shared-bindings/_pixelbuf/PixelBuf.c:392
msgid "Only slices with step=1 (aka None) are supported"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:396
+#: shared-bindings/_pixelbuf/PixelBuf.c:394
msgid "Range out of bounds"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:405
+#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:421
+#: shared-bindings/_pixelbuf/PixelBuf.c:419
#, c-format
msgid "Unmatched number of items on RHS (expected %d, got %d)."
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:444
+#: shared-bindings/_pixelbuf/PixelBuf.c:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
@@ -2111,8 +2110,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 ""
@@ -2149,90 +2148,109 @@ 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 ""
#: shared-bindings/audioio/WaveFile.c:78
-#: shared-bindings/displayio/OnDiskBitmap.c:85
+#: shared-bindings/displayio/OnDiskBitmap.c:87
msgid "file must be a file opened in byte mode"
msgstr ""
-#: 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:39
+#, fuzzy
+msgid "Not connected"
+msgstr "Kann nicht zu AP verbinden"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:74
+#, fuzzy
+msgid "timeout must be >= 0.0"
+msgstr "bits müssen 8 sein"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:79
#, fuzzy
msgid "buffer_size must be >= 1"
msgstr "Buffer müssen gleich lang sein"
-#: shared-bindings/bleio/CharacteristicBuffer.c:72
+#: shared-bindings/bleio/CharacteristicBuffer.c:83
#, fuzzy
msgid "Expected a Characteristic"
msgstr "Kann das Merkmal nicht hinzufügen."
+#: shared-bindings/bleio/CharacteristicBuffer.c:138
+#, fuzzy
+msgid "CharacteristicBuffer writing not provided"
+msgstr "Merkmal wird bereits von einem anderen Dienst verwendet."
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:147
+msgid "Not connected."
+msgstr ""
+
#: shared-bindings/bleio/Device.c:210
msgid "Can't add services in Central mode"
msgstr ""
@@ -2249,20 +2267,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 ""
@@ -2270,32 +2288,36 @@ msgstr ""
msgid "UUID integer value not in range 0 to 0xffff"
msgstr ""
-#: shared-bindings/bleio/UUID.c:75
-msgid "UUID value is not int or byte buffer"
+#: shared-bindings/bleio/UUID.c:91
+msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
+msgstr ""
+
+#: shared-bindings/bleio/UUID.c:103
+msgid "UUID value is not str, int or byte buffer"
msgstr ""
-#: shared-bindings/bleio/UUID.c:79
+#: shared-bindings/bleio/UUID.c:107
#, fuzzy
msgid "Byte buffer must be 16 bytes."
msgstr "Buffer müssen gleich lang sein"
-#: shared-bindings/bleio/UUID.c:120
+#: shared-bindings/bleio/UUID.c:151
msgid "not a 128-bit UUID"
msgstr ""
-#: 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 ""
@@ -2321,7 +2343,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 ""
@@ -2337,46 +2359,67 @@ 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:119
+msgid "Too many displays"
+msgstr ""
+
+#: shared-bindings/displayio/Display.c:138
+msgid "Must be a Group subclass."
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:93
+#: shared-bindings/displayio/ParallelBus.c:98
+msgid "Too many display busses"
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:106
+#: shared-bindings/displayio/ParallelBus.c:110
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/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 ""
@@ -2388,15 +2431,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 ""
@@ -2438,29 +2481,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 ""
@@ -2631,11 +2674,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 ""
@@ -2654,6 +2706,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"
@@ -2662,10 +2727,15 @@ msgstr "Kann '/' nicht remounten when USB aktiv ist"
msgid "'S' and 'O' are not supported format types"
msgstr ""
-#: shared-module/struct/__init__.c:83
+#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format"
msgstr ""
+#: shared-module/struct/__init__.c:179
+#, fuzzy
+msgid "buffer size must match format"
+msgstr "Buffer müssen gleich lang sein"
+
#: shared-module/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
@@ -2679,6 +2749,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:91
+msgid "No default SPI bus"
+msgstr "Kein Standard SPI Bus"
+
+#: supervisor/shared/board_busses.c:118
+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 "
@@ -2738,50 +2820,54 @@ msgid ""
"exit safe mode.\n"
msgstr ""
+#~ msgid "Can encode UUID into the advertisement packet."
+#~ msgstr "Kann UUID in das advertisement packet kodieren."
+
#~ msgid "Invalid UUID string length"
#~ msgstr "Ungültige UUID-Stringlänge"
-#~ msgid "Invalid UUID parameter"
-#~ msgstr "Ungültiger UUID-Parameter"
+#~ msgid ""
+#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
+#~ msgstr ""
+#~ "Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n"
-#~ msgid "Can not add Service."
-#~ msgstr "Kann den Dienst nicht hinzufügen."
+#~ msgid "Can not add Characteristic."
+#~ msgstr "Kann das Merkmal 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 "Can not encode UUID, to check length."
+#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen."
-#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
-#~ msgstr "CircuitPython ist abgestürzt. Ups!\n"
+#~ msgid "Can not add Service."
+#~ msgstr "Kann den Dienst nicht hinzufügen."
-#~ msgid "Can not 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."
+
+#, fuzzy
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Konnte keine RX Buffer mit %d allozieren"
#~ 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 Characteristic."
-#~ msgstr "Kann das Merkmal nicht hinzufügen."
+#~ msgid "Invalid UUID parameter"
+#~ msgstr "Ungültiger UUID-Parameter"
-#~ msgid "Can encode UUID into the advertisement packet."
-#~ msgstr "Kann UUID in das advertisement packet kodieren."
+#~ msgid "Can not apply device name in the stack."
+#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden."
-#~ msgid "Can not query for the device address."
-#~ msgstr "Kann nicht nach der Geräteadresse suchen."
+#~ msgid "Can not 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"
diff --git a/locale/en_US.po b/locale/en_US.po
index b485fa078..30fcbafac 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-13 23:51-0500\n"
+"POT-Creation-Date: 2019-01-22 14:00-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 ""
@@ -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
@@ -346,12 +334,12 @@ msgid "bytes > 8 bits not supported"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c:73
-#: ports/nrf/common-hal/busio/UART.c:118
+#: ports/nrf/common-hal/busio/UART.c:91
msgid "tx and rx cannot both be None"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c:146
-#: ports/nrf/common-hal/busio/UART.c:152
+#: ports/nrf/common-hal/busio/UART.c:132
msgid "Failed to allocate RX buffer"
msgstr ""
@@ -360,12 +348,12 @@ msgid "Could not initialize UART"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c:241
-#: ports/nrf/common-hal/busio/UART.c:197
+#: ports/nrf/common-hal/busio/UART.c:174
msgid "No RX pin"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c:300
-#: ports/nrf/common-hal/busio/UART.c:232
+#: ports/nrf/common-hal/busio/UART.c:209
msgid "No TX pin"
msgstr ""
@@ -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."
@@ -709,7 +708,7 @@ msgstr ""
msgid "Failed to read attribute value, err %0x04x"
msgstr ""
-#: ports/nrf/common-hal/bleio/Characteristic.c:172
+#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34
#, c-format
msgid "Failed to acquire mutex, err 0x%04x"
msgstr ""
@@ -719,7 +718,7 @@ msgstr ""
msgid "Failed to write attribute value, err 0x%04x"
msgstr ""
-#: ports/nrf/common-hal/bleio/Characteristic.c:189
+#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54
#, c-format
msgid "Failed to release mutex, err 0x%04x"
msgstr ""
@@ -738,43 +737,43 @@ msgstr ""
msgid "Failed to discover services"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:267
-#: ports/nrf/common-hal/bleio/Device.c:300
+#: ports/nrf/common-hal/bleio/Device.c:268
+#: ports/nrf/common-hal/bleio/Device.c:302
msgid "Failed to acquire mutex"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:278
-#: ports/nrf/common-hal/bleio/Device.c:311
-#: ports/nrf/common-hal/bleio/Device.c:342
-#: ports/nrf/common-hal/bleio/Device.c:376
+#: ports/nrf/common-hal/bleio/Device.c:280
+#: ports/nrf/common-hal/bleio/Device.c:313
+#: ports/nrf/common-hal/bleio/Device.c:344
+#: ports/nrf/common-hal/bleio/Device.c:378
msgid "Failed to release mutex"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:387
+#: ports/nrf/common-hal/bleio/Device.c:389
msgid "Failed to continue scanning"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:419
+#: ports/nrf/common-hal/bleio/Device.c:421
msgid "Failed to connect:"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:489
+#: ports/nrf/common-hal/bleio/Device.c:491
msgid "Failed to add service"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:506
+#: ports/nrf/common-hal/bleio/Device.c:508
msgid "Failed to start advertising"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:523
+#: ports/nrf/common-hal/bleio/Device.c:525
msgid "Failed to stop advertising"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:548
+#: ports/nrf/common-hal/bleio/Device.c:550
msgid "Failed to start scanning"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:564
+#: ports/nrf/common-hal/bleio/Device.c:566
msgid "Failed to create mutex"
msgstr ""
@@ -829,19 +828,19 @@ msgstr ""
msgid "error = 0x%08lX"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c:122
+#: ports/nrf/common-hal/busio/UART.c:95
msgid "Invalid buffer size"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c:126
+#: ports/nrf/common-hal/busio/UART.c:99
msgid "Odd parity is not supported"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362
-#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372
-#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383
-#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392
-#: ports/nrf/common-hal/busio/UART.c:400
+#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339
+#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349
+#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360
+#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369
+#: ports/nrf/common-hal/busio/UART.c:377
msgid "busio.UART not available"
msgstr ""
@@ -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:108
#, 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:112
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:142
msgid "function got multiple values for argument '%q'"
msgstr ""
-#: py/bc.c:218 py/objnamedtuple.c:130
+#: py/bc.c:218 py/objnamedtuple.c:134
msgid "unexpected keyword argument '%q'"
msgstr ""
@@ -1331,9 +1330,9 @@ msgstr ""
msgid "schedule stack full"
msgstr ""
-#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244
-#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145
-#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175
+#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
+#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
+#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183
msgid "buffer too small"
msgstr ""
@@ -1511,11 +1510,11 @@ msgstr ""
msgid "empty"
msgstr ""
-#: py/objdict.c:314
+#: py/objdict.c:315
msgid "popitem(): dictionary is empty"
msgstr ""
-#: py/objdict.c:357
+#: py/objdict.c:358
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 ""
@@ -2010,47 +2009,47 @@ msgstr ""
msgid "byte code not implemented"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:101
+#: shared-bindings/_pixelbuf/PixelBuf.c:99
#, c-format
msgid "byteorder is not an instance of ByteOrder (got a %s)"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:106
+#: shared-bindings/_pixelbuf/PixelBuf.c:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:118
+#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:123
+#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:129
+#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:394
+#: shared-bindings/_pixelbuf/PixelBuf.c:392
msgid "Only slices with step=1 (aka None) are supported"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:396
+#: shared-bindings/_pixelbuf/PixelBuf.c:394
msgid "Range out of bounds"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:405
+#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:421
+#: shared-bindings/_pixelbuf/PixelBuf.c:419
#, c-format
msgid "Unmatched number of items on RHS (expected %d, got %d)."
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:444
+#: shared-bindings/_pixelbuf/PixelBuf.c:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
@@ -2082,8 +2081,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 ""
@@ -2120,85 +2119,101 @@ 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 ""
#: shared-bindings/audioio/WaveFile.c:78
-#: shared-bindings/displayio/OnDiskBitmap.c:85
+#: shared-bindings/displayio/OnDiskBitmap.c:87
msgid "file must be a file opened in byte mode"
msgstr ""
-#: 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:39
+msgid "Not connected"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:74
+msgid "timeout must be >= 0.0"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:79
msgid "buffer_size must be >= 1"
msgstr ""
-#: shared-bindings/bleio/CharacteristicBuffer.c:72
+#: shared-bindings/bleio/CharacteristicBuffer.c:83
msgid "Expected a Characteristic"
msgstr ""
+#: shared-bindings/bleio/CharacteristicBuffer.c:138
+msgid "CharacteristicBuffer writing not provided"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:147
+msgid "Not connected."
+msgstr ""
+
#: shared-bindings/bleio/Device.c:210
msgid "Can't add services in Central mode"
msgstr ""
@@ -2215,19 +2230,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 ""
@@ -2235,31 +2250,35 @@ msgstr ""
msgid "UUID integer value not in range 0 to 0xffff"
msgstr ""
-#: shared-bindings/bleio/UUID.c:75
-msgid "UUID value is not int or byte buffer"
+#: shared-bindings/bleio/UUID.c:91
+msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
+msgstr ""
+
+#: shared-bindings/bleio/UUID.c:103
+msgid "UUID value is not str, int or byte buffer"
msgstr ""
-#: shared-bindings/bleio/UUID.c:79
+#: shared-bindings/bleio/UUID.c:107
msgid "Byte buffer must be 16 bytes."
msgstr ""
-#: shared-bindings/bleio/UUID.c:120
+#: shared-bindings/bleio/UUID.c:151
msgid "not a 128-bit UUID"
msgstr ""
-#: 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 ""
@@ -2285,7 +2304,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 ""
@@ -2301,45 +2320,66 @@ 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:119
+msgid "Too many displays"
+msgstr ""
+
+#: shared-bindings/displayio/Display.c:138
+msgid "Must be a Group subclass."
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:93
+#: shared-bindings/displayio/ParallelBus.c:98
+msgid "Too many display busses"
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:106
+#: shared-bindings/displayio/ParallelBus.c:110
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/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 ""
@@ -2351,15 +2391,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 ""
@@ -2401,29 +2441,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 ""
@@ -2594,11 +2634,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 ""
@@ -2616,6 +2664,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,10 +2685,14 @@ msgstr ""
msgid "'S' and 'O' are not supported format types"
msgstr ""
-#: shared-module/struct/__init__.c:83
+#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format"
msgstr ""
+#: shared-module/struct/__init__.c:179
+msgid "buffer size must match format"
+msgstr ""
+
#: shared-module/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
@@ -2641,6 +2706,18 @@ msgstr ""
msgid "USB Error"
msgstr ""
+#: supervisor/shared/board_busses.c:62
+msgid "No default I2C bus"
+msgstr ""
+
+#: supervisor/shared/board_busses.c:91
+msgid "No default SPI bus"
+msgstr ""
+
+#: supervisor/shared/board_busses.c:118
+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 2dd8e0105..f025a49fd 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-13 23:51-0500\n"
+"POT-Creation-Date: 2019-01-22 14:00-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"
@@ -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
@@ -352,12 +340,12 @@ msgid "bytes > 8 bits not supported"
msgstr "bytes > 8 bits no soportados"
#: ports/atmel-samd/common-hal/busio/UART.c:73
-#: ports/nrf/common-hal/busio/UART.c:118
+#: ports/nrf/common-hal/busio/UART.c:91
msgid "tx and rx cannot both be None"
msgstr "Ambos tx y rx no pueden ser None"
#: ports/atmel-samd/common-hal/busio/UART.c:146
-#: ports/nrf/common-hal/busio/UART.c:152
+#: ports/nrf/common-hal/busio/UART.c:132
msgid "Failed to allocate RX buffer"
msgstr "Ha fallado la asignación del buffer RX"
@@ -366,12 +354,12 @@ msgid "Could not initialize UART"
msgstr "No se puede inicializar la UART"
#: ports/atmel-samd/common-hal/busio/UART.c:241
-#: ports/nrf/common-hal/busio/UART.c:197
+#: ports/nrf/common-hal/busio/UART.c:174
msgid "No RX pin"
msgstr "Sin pin RX"
#: ports/atmel-samd/common-hal/busio/UART.c:300
-#: ports/nrf/common-hal/busio/UART.c:232
+#: ports/nrf/common-hal/busio/UART.c:209
msgid "No TX pin"
msgstr "Sin pin TX"
@@ -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."
@@ -720,7 +720,7 @@ msgstr "No se puede notificar el valor del anuncio. status: 0x%02x"
msgid "Failed to read attribute value, err %0x04x"
msgstr "No se puede leer el valor del atributo. status 0x%02x"
-#: ports/nrf/common-hal/bleio/Characteristic.c:172
+#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34
#, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "No se puede adquirir el mutex, status: 0x%08lX"
@@ -730,7 +730,7 @@ msgstr "No se puede adquirir el mutex, status: 0x%08lX"
msgid "Failed to write attribute value, err 0x%04x"
msgstr "No se puede escribir el valor del atributo. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Characteristic.c:189
+#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54
#, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x"
msgstr "No se puede liberar el mutex, status: 0x%08lX"
@@ -751,51 +751,51 @@ msgstr "Los datos no caben en el paquete de anuncio."
msgid "Failed to discover services"
msgstr "No se puede descubrir servicios, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:267
-#: ports/nrf/common-hal/bleio/Device.c:300
+#: ports/nrf/common-hal/bleio/Device.c:268
+#: ports/nrf/common-hal/bleio/Device.c:302
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "No se puede adquirir el mutex, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:278
-#: ports/nrf/common-hal/bleio/Device.c:311
-#: ports/nrf/common-hal/bleio/Device.c:342
-#: ports/nrf/common-hal/bleio/Device.c:376
+#: ports/nrf/common-hal/bleio/Device.c:280
+#: ports/nrf/common-hal/bleio/Device.c:313
+#: ports/nrf/common-hal/bleio/Device.c:344
+#: ports/nrf/common-hal/bleio/Device.c:378
#, fuzzy
msgid "Failed to release mutex"
msgstr "No se puede liberar el mutex, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:387
+#: ports/nrf/common-hal/bleio/Device.c:389
#, fuzzy
msgid "Failed to continue scanning"
msgstr "No se puede iniciar el escaneo. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:419
+#: ports/nrf/common-hal/bleio/Device.c:421
#, fuzzy
msgid "Failed to connect:"
msgstr "No se puede conectar. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:489
+#: ports/nrf/common-hal/bleio/Device.c:491
#, fuzzy
msgid "Failed to add service"
msgstr "No se puede detener el anuncio. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:506
+#: ports/nrf/common-hal/bleio/Device.c:508
#, fuzzy
msgid "Failed to start advertising"
msgstr "No se puede inicar el anuncio. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:523
+#: ports/nrf/common-hal/bleio/Device.c:525
#, fuzzy
msgid "Failed to stop advertising"
msgstr "No se puede detener el anuncio. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:548
+#: ports/nrf/common-hal/bleio/Device.c:550
#, fuzzy
msgid "Failed to start scanning"
msgstr "No se puede iniciar el escaneo. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:564
+#: ports/nrf/common-hal/bleio/Device.c:566
#, fuzzy
msgid "Failed to create mutex"
msgstr "No se puede leer el valor del atributo. status 0x%02x"
@@ -851,19 +851,19 @@ msgstr "Todos los timers están siendo usados"
msgid "error = 0x%08lX"
msgstr "error = 0x%08lx"
-#: ports/nrf/common-hal/busio/UART.c:122
+#: ports/nrf/common-hal/busio/UART.c:95
msgid "Invalid buffer size"
msgstr "Tamaño de buffer inválido"
-#: ports/nrf/common-hal/busio/UART.c:126
+#: ports/nrf/common-hal/busio/UART.c:99
msgid "Odd parity is not supported"
msgstr "Paridad impar no soportada"
-#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362
-#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372
-#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383
-#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392
-#: ports/nrf/common-hal/busio/UART.c:400
+#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339
+#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349
+#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360
+#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369
+#: ports/nrf/common-hal/busio/UART.c:377
msgid "busio.UART not available"
msgstr "busio.UART no disponible"
@@ -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: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"
-#: 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: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:138
+#: 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:130
+#: py/bc.c:218 py/objnamedtuple.c:134
msgid "unexpected keyword argument '%q'"
msgstr "argumento por palabra clave inesperado '%q'"
@@ -1366,9 +1366,9 @@ msgstr "división por cero"
msgid "schedule stack full"
msgstr ""
-#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244
-#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145
-#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175
+#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
+#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
+#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183
msgid "buffer too small"
msgstr "buffer demasiado pequeño"
@@ -1546,11 +1546,11 @@ msgstr "lleno"
msgid "empty"
msgstr "vacío"
-#: py/objdict.c:314
+#: py/objdict.c:315
msgid "popitem(): dictionary is empty"
msgstr "popitem(): diccionario vacío"
-#: py/objdict.c:357
+#: py/objdict.c:358
msgid "dict update sequence has wrong length"
msgstr "la secuencia de actualizacion del dict tiene una longitud incorrecta"
@@ -1818,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"
@@ -2054,49 +2054,49 @@ msgstr "exception no activa para reraise"
msgid "byte code not implemented"
msgstr "codigo byte no implementado"
-#: shared-bindings/_pixelbuf/PixelBuf.c:101
+#: shared-bindings/_pixelbuf/PixelBuf.c:99
#, c-format
msgid "byteorder is not an instance of ByteOrder (got a %s)"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:106
+#: shared-bindings/_pixelbuf/PixelBuf.c:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:118
+#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:123
+#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:129
+#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:394
+#: shared-bindings/_pixelbuf/PixelBuf.c:392
#, fuzzy
msgid "Only slices with step=1 (aka None) are supported"
msgstr "solo se admiten segmentos con step=1 (alias None)"
-#: shared-bindings/_pixelbuf/PixelBuf.c:396
+#: shared-bindings/_pixelbuf/PixelBuf.c:394
#, fuzzy
msgid "Range out of bounds"
msgstr "address fuera de límites"
-#: shared-bindings/_pixelbuf/PixelBuf.c:405
+#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:421
+#: shared-bindings/_pixelbuf/PixelBuf.c:419
#, c-format
msgid "Unmatched number of items on RHS (expected %d, got %d)."
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:444
+#: shared-bindings/_pixelbuf/PixelBuf.c:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
@@ -2129,8 +2129,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 ""
@@ -2169,23 +2169,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'"
@@ -2193,66 +2193,84 @@ 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"
#: shared-bindings/audioio/WaveFile.c:78
-#: shared-bindings/displayio/OnDiskBitmap.c:85
+#: shared-bindings/displayio/OnDiskBitmap.c:87
msgid "file must be a file opened in byte mode"
msgstr "el archivo deberia ser una archivo abierto en modo byte"
-#: 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:39
+#, fuzzy
+msgid "Not connected"
+msgstr "No se puede conectar a AP"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:74
+#, fuzzy
+msgid "timeout must be >= 0.0"
+msgstr "bits debe ser 8"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:79
#, fuzzy
msgid "buffer_size must be >= 1"
msgstr "los buffers deben de tener la misma longitud"
-#: shared-bindings/bleio/CharacteristicBuffer.c:72
+#: shared-bindings/bleio/CharacteristicBuffer.c:83
#, fuzzy
msgid "Expected a Characteristic"
msgstr "No se puede agregar la Característica."
+#: shared-bindings/bleio/CharacteristicBuffer.c:138
+msgid "CharacteristicBuffer writing not provided"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:147
+msgid "Not connected."
+msgstr ""
+
#: shared-bindings/bleio/Device.c:210
msgid "Can't add services in Central mode"
msgstr "No se pueden agregar servicio en modo Central"
@@ -2269,20 +2287,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 ""
@@ -2290,32 +2308,36 @@ msgstr ""
msgid "UUID integer value not in range 0 to 0xffff"
msgstr ""
-#: shared-bindings/bleio/UUID.c:75
-msgid "UUID value is not int or byte buffer"
+#: shared-bindings/bleio/UUID.c:91
+msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
msgstr ""
-#: shared-bindings/bleio/UUID.c:79
+#: shared-bindings/bleio/UUID.c:103
+msgid "UUID value is not str, int or byte buffer"
+msgstr ""
+
+#: shared-bindings/bleio/UUID.c:107
#, fuzzy
msgid "Byte buffer must be 16 bytes."
msgstr "buffer debe de ser un objeto bytes-like"
-#: shared-bindings/bleio/UUID.c:120
+#: shared-bindings/bleio/UUID.c:151
msgid "not a 128-bit UUID"
msgstr ""
-#: 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 ""
@@ -2341,7 +2363,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"
@@ -2357,45 +2379,68 @@ 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:119
+msgid "Too many displays"
+msgstr ""
+
+#: shared-bindings/displayio/Display.c:138
+msgid "Must be a Group subclass."
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:93
+#: shared-bindings/displayio/ParallelBus.c:98
+msgid "Too many display busses"
+msgstr ""
+
+#: 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"
-#: 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/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"
@@ -2407,15 +2452,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"
@@ -2457,29 +2502,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"
@@ -2652,11 +2697,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"
@@ -2674,6 +2728,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."
@@ -2682,10 +2751,15 @@ msgstr "No se puede volver a montar '/' cuando el USB esta activo."
msgid "'S' and 'O' are not supported format types"
msgstr "'S' y 'O' no son compatibles con los tipos de formato"
-#: shared-module/struct/__init__.c:83
+#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format"
msgstr "demasiados argumentos provistos con el formato dado"
+#: shared-module/struct/__init__.c:179
+#, fuzzy
+msgid "buffer size must match format"
+msgstr "los buffers deben de tener la misma longitud"
+
#: shared-module/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
@@ -2699,6 +2773,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:91
+msgid "No default SPI bus"
+msgstr "Sin bus SPI por defecto"
+
+#: supervisor/shared/board_busses.c:118
+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 "
@@ -2768,8 +2854,8 @@ 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 "Can not query for the device address."
+#~ msgstr "No se puede consultar la dirección del dispositivo."
#~ msgid "Invalid UUID string length"
#~ msgstr "Longitud de string UUID inválida"
@@ -2777,20 +2863,37 @@ msgstr ""
#~ 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 "Cannot set PPCP parameters."
#~ msgstr "No se pueden establecer los parámetros PPCP."
+#~ 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 ""
+#~ "enough power for the whole circuit and press reset (after ejecting "
+#~ "CIRCUITPY).\n"
+#~ msgstr ""
+#~ "suficiente poder para todo el circuito y presiona reset (después de "
+#~ "expulsar CIRCUITPY).\n"
+
+#~ msgid "Cannot apply GAP parameters."
+#~ msgstr "No se pueden aplicar los parámetros GAP."
+
#~ msgid "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 "Can not add Service."
+#~ msgstr "No se puede agregar el Servicio."
-#~ msgid "Wrong number of bytes provided"
-#~ msgstr "Numero erroneo de bytes dados"
+#, fuzzy
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Falló la asignación del buffer RX de %d bytes"
+
+#~ msgid "Can not apply device name in the stack."
+#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack."
#, fuzzy
#~ msgid ""
@@ -2799,31 +2902,18 @@ msgstr ""
#~ "Por favor registra un issue en la siguiente URL con el contenidos de tu "
#~ "unidad de almacenamiento CIRCUITPY:\n"
-#~ msgid ""
-#~ "enough power for the whole circuit and press reset (after ejecting "
-#~ "CIRCUITPY).\n"
-#~ msgstr ""
-#~ "suficiente poder para todo el circuito y presiona reset (después de "
-#~ "expulsar CIRCUITPY).\n"
+#~ msgid "Wrong address length"
+#~ msgstr "Longitud de address erronea"
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n"
-#~ msgid "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."
+#~ msgid "Wrong number of bytes provided"
+#~ msgstr "Numero erroneo de bytes dados"
-#~ msgid "Can not add Service."
-#~ msgstr "No se puede agregar el Servicio."
+#~ msgid "Can 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"
diff --git a/locale/fil.po b/locale/fil.po
index efab7c8be..fb392075d 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-13 23:51-0500\n"
+"POT-Creation-Date: 2019-01-22 14:00-0800\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\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"
@@ -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
@@ -350,12 +338,12 @@ msgid "bytes > 8 bits not supported"
msgstr "hindi sinusuportahan ang bytes > 8 bits"
#: ports/atmel-samd/common-hal/busio/UART.c:73
-#: ports/nrf/common-hal/busio/UART.c:118
+#: ports/nrf/common-hal/busio/UART.c:91
msgid "tx and rx cannot both be None"
msgstr "tx at rx hindi pwedeng parehas na None"
#: ports/atmel-samd/common-hal/busio/UART.c:146
-#: ports/nrf/common-hal/busio/UART.c:152
+#: ports/nrf/common-hal/busio/UART.c:132
msgid "Failed to allocate RX buffer"
msgstr "Nabigong ilaan ang RX buffer"
@@ -364,12 +352,12 @@ msgid "Could not initialize UART"
msgstr "Hindi ma-initialize ang UART"
#: ports/atmel-samd/common-hal/busio/UART.c:241
-#: ports/nrf/common-hal/busio/UART.c:197
+#: ports/nrf/common-hal/busio/UART.c:174
msgid "No RX pin"
msgstr "Walang RX pin"
#: ports/atmel-samd/common-hal/busio/UART.c:300
-#: ports/nrf/common-hal/busio/UART.c:232
+#: ports/nrf/common-hal/busio/UART.c:209
msgid "No TX pin"
msgstr "Walang TX pin"
@@ -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."
@@ -720,7 +720,7 @@ msgstr "Hindi mabalitaan ang attribute value, status: 0x%08lX"
msgid "Failed to read attribute value, err %0x04x"
msgstr "Hindi mabasa ang value ng attribute, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Characteristic.c:172
+#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34
#, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX"
@@ -730,7 +730,7 @@ msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX"
msgid "Failed to write attribute value, err 0x%04x"
msgstr "Hindi maisulat ang attribute value, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Characteristic.c:189
+#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54
#, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x"
msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX"
@@ -751,51 +751,51 @@ msgstr "Hindi makasya ang data sa loob ng advertisement packet"
msgid "Failed to discover services"
msgstr "Nabigo sa pagdiscover ng services, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:267
-#: ports/nrf/common-hal/bleio/Device.c:300
+#: ports/nrf/common-hal/bleio/Device.c:268
+#: ports/nrf/common-hal/bleio/Device.c:302
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:278
-#: ports/nrf/common-hal/bleio/Device.c:311
-#: ports/nrf/common-hal/bleio/Device.c:342
-#: ports/nrf/common-hal/bleio/Device.c:376
+#: ports/nrf/common-hal/bleio/Device.c:280
+#: ports/nrf/common-hal/bleio/Device.c:313
+#: ports/nrf/common-hal/bleio/Device.c:344
+#: ports/nrf/common-hal/bleio/Device.c:378
#, fuzzy
msgid "Failed to release mutex"
msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:387
+#: ports/nrf/common-hal/bleio/Device.c:389
#, fuzzy
msgid "Failed to continue scanning"
msgstr "Hindi maituloy ang pag scan, status: 0x%0xlX"
-#: ports/nrf/common-hal/bleio/Device.c:419
+#: ports/nrf/common-hal/bleio/Device.c:421
#, fuzzy
msgid "Failed to connect:"
msgstr "Hindi makaconnect, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:489
+#: ports/nrf/common-hal/bleio/Device.c:491
#, fuzzy
msgid "Failed to add service"
msgstr "Hindi matagumpay ang paglagay ng service, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:506
+#: ports/nrf/common-hal/bleio/Device.c:508
#, fuzzy
msgid "Failed to start advertising"
msgstr "Hindi masimulaan ang advertisement, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:523
+#: ports/nrf/common-hal/bleio/Device.c:525
#, fuzzy
msgid "Failed to stop advertising"
msgstr "Hindi mahinto ang advertisement, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:548
+#: ports/nrf/common-hal/bleio/Device.c:550
#, fuzzy
msgid "Failed to start scanning"
msgstr "Hindi masimulaan mag i-scan, status: 0x%0xlX"
-#: ports/nrf/common-hal/bleio/Device.c:564
+#: ports/nrf/common-hal/bleio/Device.c:566
#, fuzzy
msgid "Failed to create mutex"
msgstr "Hindi matagumpay ang pagbuo ng mutex, status: 0x%0xlX"
@@ -852,19 +852,19 @@ msgstr "Lahat ng SPI peripherals ay ginagamit"
msgid "error = 0x%08lX"
msgstr "error = 0x%08lX"
-#: ports/nrf/common-hal/busio/UART.c:122
+#: ports/nrf/common-hal/busio/UART.c:95
msgid "Invalid buffer size"
msgstr "Mali ang buffer size"
-#: ports/nrf/common-hal/busio/UART.c:126
+#: ports/nrf/common-hal/busio/UART.c:99
msgid "Odd parity is not supported"
msgstr "Odd na parity ay hindi supportado"
-#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362
-#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372
-#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383
-#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392
-#: ports/nrf/common-hal/busio/UART.c:400
+#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339
+#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349
+#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360
+#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369
+#: ports/nrf/common-hal/busio/UART.c:377
msgid "busio.UART not available"
msgstr "busio.UART hindi available"
@@ -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:108
#, 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: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:138
+#: 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:130
+#: py/bc.c:218 py/objnamedtuple.c:134
msgid "unexpected keyword argument '%q'"
msgstr "hindi inaasahang argumento ng keyword na '%q'"
@@ -1367,9 +1367,9 @@ msgstr "dibisyon ng zero"
msgid "schedule stack full"
msgstr "puno na ang schedule stack"
-#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244
-#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145
-#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175
+#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
+#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
+#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183
msgid "buffer too small"
msgstr "masyadong maliit ang buffer"
@@ -1548,11 +1548,11 @@ msgstr "puno"
msgid "empty"
msgstr "walang laman"
-#: py/objdict.c:314
+#: py/objdict.c:315
msgid "popitem(): dictionary is empty"
msgstr "popitem(): dictionary ay walang laman"
-#: py/objdict.c:357
+#: py/objdict.c:358
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"
@@ -2056,49 +2056,49 @@ msgstr "walang aktibong exception para i-reraise"
msgid "byte code not implemented"
msgstr "byte code hindi pa implemented"
-#: shared-bindings/_pixelbuf/PixelBuf.c:101
+#: shared-bindings/_pixelbuf/PixelBuf.c:99
#, c-format
msgid "byteorder is not an instance of ByteOrder (got a %s)"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:106
+#: shared-bindings/_pixelbuf/PixelBuf.c:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:118
+#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:123
+#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:129
+#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:394
+#: shared-bindings/_pixelbuf/PixelBuf.c:392
#, fuzzy
msgid "Only slices with step=1 (aka None) are supported"
msgstr "ang mga slices lamang na may hakbang = 1 (aka None) ang sinusuportahan"
-#: shared-bindings/_pixelbuf/PixelBuf.c:396
+#: shared-bindings/_pixelbuf/PixelBuf.c:394
#, fuzzy
msgid "Range out of bounds"
msgstr "wala sa sakop ang address"
-#: shared-bindings/_pixelbuf/PixelBuf.c:405
+#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:421
+#: shared-bindings/_pixelbuf/PixelBuf.c:419
#, c-format
msgid "Unmatched number of items on RHS (expected %d, got %d)."
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:444
+#: shared-bindings/_pixelbuf/PixelBuf.c:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
@@ -2131,8 +2131,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"
@@ -2174,23 +2174,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'"
@@ -2198,66 +2198,84 @@ 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"
#: shared-bindings/audioio/WaveFile.c:78
-#: shared-bindings/displayio/OnDiskBitmap.c:85
+#: shared-bindings/displayio/OnDiskBitmap.c:87
msgid "file must be a file opened in byte mode"
msgstr "file ay dapat buksan sa byte mode"
-#: 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:39
+#, fuzzy
+msgid "Not connected"
+msgstr "Hindi maka connect sa AP"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:74
+#, fuzzy
+msgid "timeout must be >= 0.0"
+msgstr "bits ay dapat walo (8)"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:79
#, fuzzy
msgid "buffer_size must be >= 1"
msgstr "aarehas na haba dapat ang buffer slices"
-#: shared-bindings/bleio/CharacteristicBuffer.c:72
+#: shared-bindings/bleio/CharacteristicBuffer.c:83
#, fuzzy
msgid "Expected a Characteristic"
msgstr "Hindi mabasa and Characteristic."
+#: shared-bindings/bleio/CharacteristicBuffer.c:138
+msgid "CharacteristicBuffer writing not provided"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:147
+msgid "Not connected."
+msgstr ""
+
#: shared-bindings/bleio/Device.c:210
msgid "Can't add services in Central mode"
msgstr "Hindi maarang maglagay ng service sa Central mode"
@@ -2274,20 +2292,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 ""
@@ -2295,32 +2313,36 @@ msgstr ""
msgid "UUID integer value not in range 0 to 0xffff"
msgstr ""
-#: shared-bindings/bleio/UUID.c:75
-msgid "UUID value is not int or byte buffer"
+#: shared-bindings/bleio/UUID.c:91
+msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
msgstr ""
-#: shared-bindings/bleio/UUID.c:79
+#: shared-bindings/bleio/UUID.c:103
+msgid "UUID value is not str, int or byte buffer"
+msgstr ""
+
+#: shared-bindings/bleio/UUID.c:107
#, fuzzy
msgid "Byte buffer must be 16 bytes."
msgstr "buffer ay dapat bytes-like object"
-#: shared-bindings/bleio/UUID.c:120
+#: shared-bindings/bleio/UUID.c:151
msgid "not a 128-bit UUID"
msgstr ""
-#: 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)"
@@ -2346,7 +2368,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"
@@ -2362,45 +2384,68 @@ 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:119
+msgid "Too many displays"
+msgstr ""
+
+#: shared-bindings/displayio/Display.c:138
+msgid "Must be a Group subclass."
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:93
+#: shared-bindings/displayio/ParallelBus.c:98
+msgid "Too many display busses"
+msgstr ""
+
+#: 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"
-#: 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/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"
@@ -2412,15 +2457,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"
@@ -2462,30 +2507,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"
@@ -2658,11 +2703,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"
@@ -2680,6 +2734,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."
@@ -2688,10 +2757,15 @@ msgstr "Hindi ma-remount '/' kapag aktibo ang USB."
msgid "'S' and 'O' are not supported format types"
msgstr "Ang 'S' at 'O' ay hindi suportadong uri ng format"
-#: shared-module/struct/__init__.c:83
+#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format"
msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format"
+#: shared-module/struct/__init__.c:179
+#, fuzzy
+msgid "buffer size must match format"
+msgstr "aarehas na haba dapat ang buffer slices"
+
#: shared-module/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
@@ -2705,6 +2779,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:91
+msgid "No default SPI bus"
+msgstr "Walang default SPI bus"
+
+#: supervisor/shared/board_busses.c:118
+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 "
@@ -2774,8 +2860,8 @@ 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 "Can not query for the device address."
+#~ msgstr "Hindi maaaring mag-query para sa address ng device."
#~ msgid "Invalid UUID string length"
#~ msgstr "Mali ang UUID string length"
@@ -2783,20 +2869,38 @@ msgstr ""
#~ msgid "Invalid UUID parameter"
#~ msgstr "Mali ang UUID parameter"
-#~ msgid "Cannot apply GAP parameters."
-#~ msgstr "Hindi ma-apply ang GAP parameters."
-
#~ msgid "Cannot set PPCP parameters."
#~ msgstr "Hindi ma-set ang PPCP parameters."
+#, 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 ""
+#~ "enough power for the whole circuit and press reset (after ejecting "
+#~ "CIRCUITPY).\n"
+#~ msgstr ""
+#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang "
+#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n"
+
+#~ msgid "Cannot apply GAP parameters."
+#~ msgstr "Hindi ma-apply ang GAP parameters."
+
#~ msgid "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 "Can not add Service."
+#~ msgstr "Hindi maidaragdag ang serbisyo."
-#~ msgid "Wrong number of bytes provided"
-#~ msgstr "Mali ang bilang ng bytes"
+#, fuzzy
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Nabigong ilaan ang RX buffer ng %d bytes"
+
+#~ msgid "Can not apply device name in the stack."
+#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack."
#~ msgid ""
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
@@ -2804,32 +2908,18 @@ msgstr ""
#~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY "
#~ "drive:\n"
-#~ msgid ""
-#~ "enough power for the whole circuit and press reset (after ejecting "
-#~ "CIRCUITPY).\n"
-#~ msgstr ""
-#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang "
-#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n"
+#~ msgid "Wrong address length"
+#~ msgstr "Mali ang address length"
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n"
-#, 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 "Wrong number of bytes provided"
+#~ msgstr "Mali ang bilang ng bytes"
-#~ msgid "Can not add Service."
-#~ msgstr "Hindi maidaragdag ang serbisyo."
+#~ msgid "Can encode UUID into the advertisement packet."
+#~ msgstr "Maaring i-encode ang UUID sa advertisement packet."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x"
diff --git a/locale/fr.po b/locale/fr.po
index 18e50e084..6a7c235e6 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-13 23:51-0500\n"
+"POT-Creation-Date: 2019-01-22 14:00-0800\n"
"PO-Revision-Date: 2018-12-23 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\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"
@@ -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
@@ -347,12 +335,12 @@ msgid "bytes > 8 bits not supported"
msgstr "octets > 8 bits non supporté"
#: ports/atmel-samd/common-hal/busio/UART.c:73
-#: ports/nrf/common-hal/busio/UART.c:118
+#: ports/nrf/common-hal/busio/UART.c:91
msgid "tx and rx cannot both be None"
msgstr "tx et rx ne peuvent être None tous les deux"
#: ports/atmel-samd/common-hal/busio/UART.c:146
-#: ports/nrf/common-hal/busio/UART.c:152
+#: ports/nrf/common-hal/busio/UART.c:132
msgid "Failed to allocate RX buffer"
msgstr "Echec de l'allocation du tampon RX"
@@ -361,12 +349,12 @@ msgid "Could not initialize UART"
msgstr "L'UART n'a pu être initialisé"
#: ports/atmel-samd/common-hal/busio/UART.c:241
-#: ports/nrf/common-hal/busio/UART.c:197
+#: ports/nrf/common-hal/busio/UART.c:174
msgid "No RX pin"
msgstr "Pas de broche RX"
#: ports/atmel-samd/common-hal/busio/UART.c:300
-#: ports/nrf/common-hal/busio/UART.c:232
+#: ports/nrf/common-hal/busio/UART.c:209
msgid "No TX pin"
msgstr "Pas de broche TX"
@@ -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."
@@ -717,7 +717,7 @@ msgstr "Impossible de notifier la valeur de l'attribut. status: 0x%08lX"
msgid "Failed to read attribute value, err %0x04x"
msgstr "Impossible de lire la valeur de l'attribut. status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Characteristic.c:172
+#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34
#, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Echec de l'obtention de mutex, status: 0x%08lX"
@@ -727,7 +727,7 @@ msgstr "Echec de l'obtention de mutex, status: 0x%08lX"
msgid "Failed to write attribute value, err 0x%04x"
msgstr "Impossible d'écrire la valeur de l'attribut. status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Characteristic.c:189
+#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54
#, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x"
msgstr "Impossible de libérer mutex, status: 0x%08lX"
@@ -747,51 +747,51 @@ msgstr ""
msgid "Failed to discover services"
msgstr "Echec de la découverte de services, statut: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:267
-#: ports/nrf/common-hal/bleio/Device.c:300
+#: ports/nrf/common-hal/bleio/Device.c:268
+#: ports/nrf/common-hal/bleio/Device.c:302
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "Echec de l'obtention de mutex, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:278
-#: ports/nrf/common-hal/bleio/Device.c:311
-#: ports/nrf/common-hal/bleio/Device.c:342
-#: ports/nrf/common-hal/bleio/Device.c:376
+#: ports/nrf/common-hal/bleio/Device.c:280
+#: ports/nrf/common-hal/bleio/Device.c:313
+#: ports/nrf/common-hal/bleio/Device.c:344
+#: ports/nrf/common-hal/bleio/Device.c:378
#, fuzzy
msgid "Failed to release mutex"
msgstr "Impossible de libérer mutex, status: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:387
+#: ports/nrf/common-hal/bleio/Device.c:389
#, fuzzy
msgid "Failed to continue scanning"
msgstr "Impossible de commencer à scanner. statut: 0x%0xlX"
-#: ports/nrf/common-hal/bleio/Device.c:419
+#: ports/nrf/common-hal/bleio/Device.c:421
#, fuzzy
msgid "Failed to connect:"
msgstr "Connection impossible. statut: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:489
+#: ports/nrf/common-hal/bleio/Device.c:491
#, fuzzy
msgid "Failed to add service"
msgstr "Echec de l'ajout de service, statut: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:506
+#: ports/nrf/common-hal/bleio/Device.c:508
#, fuzzy
msgid "Failed to start advertising"
msgstr "Echec de l'ajout de service, statut: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:523
+#: ports/nrf/common-hal/bleio/Device.c:525
#, fuzzy
msgid "Failed to stop advertising"
msgstr "Echec de l'ajout de service, statut: 0x%08lX"
-#: ports/nrf/common-hal/bleio/Device.c:548
+#: ports/nrf/common-hal/bleio/Device.c:550
#, fuzzy
msgid "Failed to start scanning"
msgstr "Impossible de commencer à scanner, statut: 0x%0xlX"
-#: ports/nrf/common-hal/bleio/Device.c:564
+#: ports/nrf/common-hal/bleio/Device.c:566
#, fuzzy
msgid "Failed to create mutex"
msgstr "Echec de la création de mutex, statut: 0x%0xlX"
@@ -850,21 +850,21 @@ msgstr "Tous les périphériques SPI sont utilisés"
msgid "error = 0x%08lX"
msgstr "erreur = 0x%08lX"
-#: ports/nrf/common-hal/busio/UART.c:122
+#: ports/nrf/common-hal/busio/UART.c:95
#, fuzzy
msgid "Invalid buffer size"
msgstr "longueur de tampon invalide"
-#: ports/nrf/common-hal/busio/UART.c:126
+#: ports/nrf/common-hal/busio/UART.c:99
#, fuzzy
msgid "Odd parity is not supported"
msgstr "parité impaire non supportée"
-#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362
-#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372
-#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383
-#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392
-#: ports/nrf/common-hal/busio/UART.c:400
+#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339
+#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349
+#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360
+#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369
+#: ports/nrf/common-hal/busio/UART.c:377
#, fuzzy
msgid "busio.UART not available"
msgstr "busio.UART n'est pas disponible"
@@ -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: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)"
-#: 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: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:138
+#: 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:130
+#: py/bc.c:218 py/objnamedtuple.c:134
msgid "unexpected keyword argument '%q'"
msgstr "argument nommé '%q' imprévu"
@@ -1366,9 +1366,9 @@ msgstr "division par zéro"
msgid "schedule stack full"
msgstr "pile de plannification pleine"
-#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244
-#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145
-#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175
+#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
+#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
+#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183
msgid "buffer too small"
msgstr "tampon trop petit"
@@ -1546,11 +1546,11 @@ msgstr "plein"
msgid "empty"
msgstr "vide"
-#: py/objdict.c:314
+#: py/objdict.c:315
msgid "popitem(): dictionary is empty"
msgstr "popitem(): dictionnaire vide"
-#: py/objdict.c:357
+#: py/objdict.c:358
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"
@@ -2057,49 +2057,49 @@ msgstr "aucune exception active à relever"
msgid "byte code not implemented"
msgstr "bytecode non implémenté"
-#: shared-bindings/_pixelbuf/PixelBuf.c:101
+#: shared-bindings/_pixelbuf/PixelBuf.c:99
#, c-format
msgid "byteorder is not an instance of ByteOrder (got a %s)"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:106
+#: shared-bindings/_pixelbuf/PixelBuf.c:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:118
+#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:123
+#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:129
+#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:394
+#: shared-bindings/_pixelbuf/PixelBuf.c:392
#, fuzzy
msgid "Only slices with step=1 (aka None) are supported"
msgstr "seuls les slices avec 'step=1' (cad None) sont supportées"
-#: shared-bindings/_pixelbuf/PixelBuf.c:396
+#: shared-bindings/_pixelbuf/PixelBuf.c:394
#, fuzzy
msgid "Range out of bounds"
msgstr "adresse hors limites"
-#: shared-bindings/_pixelbuf/PixelBuf.c:405
+#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:421
+#: shared-bindings/_pixelbuf/PixelBuf.c:419
#, c-format
msgid "Unmatched number of items on RHS (expected %d, got %d)."
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:444
+#: shared-bindings/_pixelbuf/PixelBuf.c:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
@@ -2133,8 +2133,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"
@@ -2173,26 +2173,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'"
@@ -2200,66 +2200,84 @@ 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"
#: shared-bindings/audioio/WaveFile.c:78
-#: shared-bindings/displayio/OnDiskBitmap.c:85
+#: shared-bindings/displayio/OnDiskBitmap.c:87
msgid "file must be a file opened in byte mode"
msgstr "le fichier doit être un fichier ouvert en mode 'byte'"
-#: 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:39
+#, fuzzy
+msgid "Not connected"
+msgstr "Impossible de se connecter à 'AP'"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:74
+#, fuzzy
+msgid "timeout must be >= 0.0"
+msgstr "les bits doivent être 8"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:79
#, fuzzy
msgid "buffer_size must be >= 1"
msgstr "les slices de tampon doivent être de longueurs égales"
-#: shared-bindings/bleio/CharacteristicBuffer.c:72
+#: shared-bindings/bleio/CharacteristicBuffer.c:83
#, fuzzy
msgid "Expected a Characteristic"
msgstr "Impossible d'ajouter la Characteristic."
+#: shared-bindings/bleio/CharacteristicBuffer.c:138
+msgid "CharacteristicBuffer writing not provided"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:147
+msgid "Not connected."
+msgstr ""
+
#: shared-bindings/bleio/Device.c:210
msgid "Can't add services in Central mode"
msgstr "Impossible d'ajouter des service en mode Central"
@@ -2276,20 +2294,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 ""
@@ -2297,32 +2315,36 @@ msgstr ""
msgid "UUID integer value not in range 0 to 0xffff"
msgstr ""
-#: shared-bindings/bleio/UUID.c:75
-msgid "UUID value is not int or byte buffer"
+#: shared-bindings/bleio/UUID.c:91
+msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
+msgstr ""
+
+#: shared-bindings/bleio/UUID.c:103
+msgid "UUID value is not str, int or byte buffer"
msgstr ""
-#: shared-bindings/bleio/UUID.c:79
+#: shared-bindings/bleio/UUID.c:107
#, fuzzy
msgid "Byte buffer must be 16 bytes."
msgstr "le tampon doit être un objet bytes-like"
-#: shared-bindings/bleio/UUID.c:120
+#: shared-bindings/bleio/UUID.c:151
msgid "not a 128-bit UUID"
msgstr ""
-#: 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)"
@@ -2348,7 +2370,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)"
@@ -2369,53 +2391,76 @@ 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:119
+msgid "Too many displays"
+msgstr ""
+
+#: shared-bindings/displayio/Display.c:138
+msgid "Must be a Group subclass."
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:93
+#: shared-bindings/displayio/ParallelBus.c:98
+msgid "Too many display busses"
+msgstr ""
+
+#: 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"
-#: 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/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"
@@ -2428,16 +2473,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"
@@ -2479,14 +2524,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."
@@ -2494,19 +2539,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"
@@ -2680,11 +2725,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"
@@ -2704,6 +2758,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."
@@ -2712,10 +2781,15 @@ msgstr "'/' ne peut être remonté quand l'USB est actif."
msgid "'S' and 'O' are not supported format types"
msgstr "'S' et 'O' ne sont pas des types de format supportés"
-#: shared-module/struct/__init__.c:83
+#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format"
msgstr "trop d'arguments fournis avec ce format"
+#: shared-module/struct/__init__.c:179
+#, fuzzy
+msgid "buffer size must match format"
+msgstr "les slices de tampon doivent être de longueurs égales"
+
#: shared-module/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
@@ -2729,6 +2803,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:91
+msgid "No default SPI bus"
+msgstr "Pas de bus SPI par défaut"
+
+#: supervisor/shared/board_busses.c:118
+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 "
@@ -2803,8 +2889,9 @@ 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"
+#, fuzzy
+#~ msgid "palette must be displayio.Palette"
+#~ msgstr "la palette doit être une displayio.Palette"
#~ msgid "Invalid UUID string length"
#~ msgstr "Longeur de chaîne UUID invalide"
@@ -2812,33 +2899,9 @@ msgstr ""
#~ 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"
-
-#, 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"
@@ -2849,17 +2912,44 @@ msgstr ""
#~ "assez de puissance pour l'ensemble du circuit et appuyez sur "
#~ "'reset' (après avoir éjecter CIRCUITPY).\n"
+#~ msgid "Invalid Service type"
+#~ msgstr "Type de service 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 "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"
+
+#, fuzzy
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Echec de l'allocation de %d octets du tampon RX"
+
#~ 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 "palette must be displayio.Palette"
-#~ msgstr "la palette doit être une displayio.Palette"
+#~ msgid "value_size must be power of two"
+#~ msgstr "value_size doit être une puissance de 2"
-#~ msgid "Can not apply device name in the stack."
-#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile"
+#, fuzzy
+#~ msgid "Wrong number of bytes provided"
+#~ msgstr "mauvais nombre d'octets fourni'"
+
+#~ msgid "Can not 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"
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 10fd1a2c6..8147f357f 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-13 23:51-0500\n"
+"POT-Creation-Date: 2019-01-22 14:00-0800\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\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"
@@ -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
@@ -351,12 +339,12 @@ msgid "bytes > 8 bits not supported"
msgstr "byte > 8 bit non supportati"
#: ports/atmel-samd/common-hal/busio/UART.c:73
-#: ports/nrf/common-hal/busio/UART.c:118
+#: ports/nrf/common-hal/busio/UART.c:91
msgid "tx and rx cannot both be None"
msgstr "tx e rx non possono essere entrambi None"
#: ports/atmel-samd/common-hal/busio/UART.c:146
-#: ports/nrf/common-hal/busio/UART.c:152
+#: ports/nrf/common-hal/busio/UART.c:132
msgid "Failed to allocate RX buffer"
msgstr "Impossibile allocare buffer RX"
@@ -365,12 +353,12 @@ msgid "Could not initialize UART"
msgstr "Impossibile inizializzare l'UART"
#: ports/atmel-samd/common-hal/busio/UART.c:241
-#: ports/nrf/common-hal/busio/UART.c:197
+#: ports/nrf/common-hal/busio/UART.c:174
msgid "No RX pin"
msgstr "Nessun pin RX"
#: ports/atmel-samd/common-hal/busio/UART.c:300
-#: ports/nrf/common-hal/busio/UART.c:232
+#: ports/nrf/common-hal/busio/UART.c:209
msgid "No TX pin"
msgstr "Nessun pin TX"
@@ -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."
@@ -719,7 +719,7 @@ msgstr "Impossibile notificare valore dell'attributo. status: 0x%02x"
msgid "Failed to read attribute value, err %0x04x"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Characteristic.c:172
+#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34
#, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
@@ -729,7 +729,7 @@ msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
msgid "Failed to write attribute value, err 0x%04x"
msgstr "Impossibile scrivere valore dell'attributo. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Characteristic.c:189
+#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54
#, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
@@ -750,51 +750,51 @@ msgstr "Impossibile inserire dati nel pacchetto di advertisement."
msgid "Failed to discover services"
msgstr "Impossibile fermare advertisement. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:267
-#: ports/nrf/common-hal/bleio/Device.c:300
+#: ports/nrf/common-hal/bleio/Device.c:268
+#: ports/nrf/common-hal/bleio/Device.c:302
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "Impossibile allocare buffer RX"
-#: ports/nrf/common-hal/bleio/Device.c:278
-#: ports/nrf/common-hal/bleio/Device.c:311
-#: ports/nrf/common-hal/bleio/Device.c:342
-#: ports/nrf/common-hal/bleio/Device.c:376
+#: ports/nrf/common-hal/bleio/Device.c:280
+#: ports/nrf/common-hal/bleio/Device.c:313
+#: ports/nrf/common-hal/bleio/Device.c:344
+#: ports/nrf/common-hal/bleio/Device.c:378
#, fuzzy
msgid "Failed to release mutex"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:387
+#: ports/nrf/common-hal/bleio/Device.c:389
#, fuzzy
msgid "Failed to continue scanning"
msgstr "Impossible iniziare la scansione. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:419
+#: ports/nrf/common-hal/bleio/Device.c:421
#, fuzzy
msgid "Failed to connect:"
msgstr "Impossibile connettersi. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:489
+#: ports/nrf/common-hal/bleio/Device.c:491
#, fuzzy
msgid "Failed to add service"
msgstr "Impossibile fermare advertisement. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:506
+#: ports/nrf/common-hal/bleio/Device.c:508
#, fuzzy
msgid "Failed to start advertising"
msgstr "Impossibile avviare advertisement. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:523
+#: ports/nrf/common-hal/bleio/Device.c:525
#, fuzzy
msgid "Failed to stop advertising"
msgstr "Impossibile fermare advertisement. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:548
+#: ports/nrf/common-hal/bleio/Device.c:550
#, fuzzy
msgid "Failed to start scanning"
msgstr "Impossible iniziare la scansione. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:564
+#: ports/nrf/common-hal/bleio/Device.c:566
#, fuzzy
msgid "Failed to create mutex"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
@@ -851,21 +851,21 @@ msgstr "Tutte le periferiche SPI sono in uso"
msgid "error = 0x%08lX"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c:122
+#: ports/nrf/common-hal/busio/UART.c:95
#, fuzzy
msgid "Invalid buffer size"
msgstr "lunghezza del buffer non valida"
-#: ports/nrf/common-hal/busio/UART.c:126
+#: ports/nrf/common-hal/busio/UART.c:99
#, fuzzy
msgid "Odd parity is not supported"
msgstr "operazione I2C non supportata"
-#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362
-#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372
-#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383
-#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392
-#: ports/nrf/common-hal/busio/UART.c:400
+#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339
+#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349
+#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360
+#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369
+#: ports/nrf/common-hal/busio/UART.c:377
#, fuzzy
msgid "busio.UART not available"
msgstr "busio.UART non ancora implementato"
@@ -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:108
#, 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: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:138
+#: 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:130
+#: py/bc.c:218 py/objnamedtuple.c:134
msgid "unexpected keyword argument '%q'"
msgstr "argomento nominato '%q' inaspettato"
@@ -1366,9 +1366,9 @@ msgstr "divisione per zero"
msgid "schedule stack full"
msgstr ""
-#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244
-#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145
-#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175
+#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
+#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
+#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183
msgid "buffer too small"
msgstr "buffer troppo piccolo"
@@ -1546,11 +1546,11 @@ msgstr "pieno"
msgid "empty"
msgstr "vuoto"
-#: py/objdict.c:314
+#: py/objdict.c:315
msgid "popitem(): dictionary is empty"
msgstr "popitem(): il dizionario è vuoto"
-#: py/objdict.c:357
+#: py/objdict.c:358
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"
@@ -2052,49 +2052,49 @@ msgstr "nessuna eccezione attiva da rilanciare"
msgid "byte code not implemented"
msgstr "byte code non implementato"
-#: shared-bindings/_pixelbuf/PixelBuf.c:101
+#: shared-bindings/_pixelbuf/PixelBuf.c:99
#, c-format
msgid "byteorder is not an instance of ByteOrder (got a %s)"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:106
+#: shared-bindings/_pixelbuf/PixelBuf.c:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:118
+#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:123
+#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:129
+#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:394
+#: shared-bindings/_pixelbuf/PixelBuf.c:392
#, fuzzy
msgid "Only slices with step=1 (aka None) are supported"
msgstr "solo slice con step=1 (aka None) sono supportate"
-#: shared-bindings/_pixelbuf/PixelBuf.c:396
+#: shared-bindings/_pixelbuf/PixelBuf.c:394
#, fuzzy
msgid "Range out of bounds"
msgstr "indirizzo fuori limite"
-#: shared-bindings/_pixelbuf/PixelBuf.c:405
+#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:421
+#: shared-bindings/_pixelbuf/PixelBuf.c:419
#, c-format
msgid "Unmatched number of items on RHS (expected %d, got %d)."
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:444
+#: shared-bindings/_pixelbuf/PixelBuf.c:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
@@ -2127,8 +2127,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"
@@ -2169,27 +2169,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'"
@@ -2197,66 +2197,84 @@ 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 ""
#: shared-bindings/audioio/WaveFile.c:78
-#: shared-bindings/displayio/OnDiskBitmap.c:85
+#: shared-bindings/displayio/OnDiskBitmap.c:87
msgid "file must be a file opened in byte mode"
msgstr ""
-#: 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:39
+#, fuzzy
+msgid "Not connected"
+msgstr "Impossible connettersi all'AP"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:74
+#, fuzzy
+msgid "timeout must be >= 0.0"
+msgstr "i bit devono essere 8"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:79
#, fuzzy
msgid "buffer_size must be >= 1"
msgstr "slice del buffer devono essere della stessa lunghezza"
-#: shared-bindings/bleio/CharacteristicBuffer.c:72
+#: shared-bindings/bleio/CharacteristicBuffer.c:83
#, fuzzy
msgid "Expected a Characteristic"
msgstr "Non è possibile aggiungere Characteristic."
+#: shared-bindings/bleio/CharacteristicBuffer.c:138
+msgid "CharacteristicBuffer writing not provided"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:147
+msgid "Not connected."
+msgstr ""
+
#: shared-bindings/bleio/Device.c:210
msgid "Can't add services in Central mode"
msgstr ""
@@ -2273,20 +2291,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 ""
@@ -2294,32 +2312,36 @@ msgstr ""
msgid "UUID integer value not in range 0 to 0xffff"
msgstr ""
-#: shared-bindings/bleio/UUID.c:75
-msgid "UUID value is not int or byte buffer"
+#: shared-bindings/bleio/UUID.c:91
+msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
+msgstr ""
+
+#: shared-bindings/bleio/UUID.c:103
+msgid "UUID value is not str, int or byte buffer"
msgstr ""
-#: shared-bindings/bleio/UUID.c:79
+#: shared-bindings/bleio/UUID.c:107
#, fuzzy
msgid "Byte buffer must be 16 bytes."
msgstr "i buffer devono essere della stessa lunghezza"
-#: shared-bindings/bleio/UUID.c:120
+#: shared-bindings/bleio/UUID.c:151
msgid "not a 128-bit UUID"
msgstr ""
-#: 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 ""
@@ -2345,7 +2367,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"
@@ -2361,47 +2383,70 @@ 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:119
+msgid "Too many displays"
+msgstr ""
+
+#: shared-bindings/displayio/Display.c:138
+msgid "Must be a Group subclass."
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:93
+#: shared-bindings/displayio/ParallelBus.c:98
+msgid "Too many display busses"
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:106
+#: shared-bindings/displayio/ParallelBus.c:110
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/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"
@@ -2413,15 +2458,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"
@@ -2463,14 +2508,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."
@@ -2478,19 +2523,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"
@@ -2664,11 +2709,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"
@@ -2686,6 +2740,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."
@@ -2694,10 +2763,15 @@ msgstr "Non è possibile rimontare '/' mentre l'USB è attiva."
msgid "'S' and 'O' are not supported format types"
msgstr "'S' e 'O' non sono formati supportati"
-#: shared-module/struct/__init__.c:83
+#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format"
msgstr "troppi argomenti forniti con il formato specificato"
+#: shared-module/struct/__init__.c:179
+#, fuzzy
+msgid "buffer size must match format"
+msgstr "slice del buffer devono essere della stessa lunghezza"
+
#: shared-module/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
@@ -2711,6 +2785,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:91
+msgid "No default SPI bus"
+msgstr "Nessun bus SPI predefinito"
+
+#: supervisor/shared/board_busses.c:118
+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 "
@@ -2778,13 +2864,19 @@ msgstr ""
#~ msgid "Invalid UUID string length"
#~ msgstr "Lunghezza della stringa UUID non valida"
-#~ 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 "Cannot set PPCP parameters."
+#~ msgstr "Impossibile impostare i parametri PPCP."
+
+#~ msgid "Cannot apply GAP parameters."
+#~ msgstr "Impossibile applicare i parametri GAP."
+
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x"
@@ -2798,34 +2890,32 @@ msgstr ""
#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver "
#~ "espulso CIRCUITPY).\n"
+#, fuzzy
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Fallita allocazione del buffer RX di %d byte"
+
+#~ msgid "Can not query for the device address."
+#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo."
+
+#~ 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 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 "Can not apply device name in the stack."
+#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista."
+
#~ 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 5239e3e51..ab604de4a 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-13 23:51-0500\n"
+"POT-Creation-Date: 2019-01-22 14:00-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"
@@ -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
@@ -346,12 +334,12 @@ msgid "bytes > 8 bits not supported"
msgstr "bytes > 8 bits não suportado"
#: ports/atmel-samd/common-hal/busio/UART.c:73
-#: ports/nrf/common-hal/busio/UART.c:118
+#: ports/nrf/common-hal/busio/UART.c:91
msgid "tx and rx cannot both be None"
msgstr "TX e RX não podem ser ambos"
#: ports/atmel-samd/common-hal/busio/UART.c:146
-#: ports/nrf/common-hal/busio/UART.c:152
+#: ports/nrf/common-hal/busio/UART.c:132
msgid "Failed to allocate RX buffer"
msgstr "Falha ao alocar buffer RX"
@@ -360,12 +348,12 @@ msgid "Could not initialize UART"
msgstr "Não foi possível inicializar o UART"
#: ports/atmel-samd/common-hal/busio/UART.c:241
-#: ports/nrf/common-hal/busio/UART.c:197
+#: ports/nrf/common-hal/busio/UART.c:174
msgid "No RX pin"
msgstr "Nenhum pino RX"
#: ports/atmel-samd/common-hal/busio/UART.c:300
-#: ports/nrf/common-hal/busio/UART.c:232
+#: ports/nrf/common-hal/busio/UART.c:209
msgid "No TX pin"
msgstr "Nenhum pino TX"
@@ -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."
@@ -712,7 +711,7 @@ msgstr "Não é possível gravar o valor do atributo. status: 0x%02x"
msgid "Failed to read attribute value, err %0x04x"
msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Characteristic.c:172
+#: ports/nrf/common-hal/bleio/Characteristic.c:172 ports/nrf/sd_mutex.c:34
#, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
@@ -722,7 +721,7 @@ msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
msgid "Failed to write attribute value, err 0x%04x"
msgstr "Não é possível gravar o valor do atributo. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Characteristic.c:189
+#: ports/nrf/common-hal/bleio/Characteristic.c:189 ports/nrf/sd_mutex.c:54
#, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x"
msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
@@ -743,49 +742,49 @@ msgstr "Não é possível ajustar dados no pacote de anúncios."
msgid "Failed to discover services"
msgstr "Não pode parar propaganda. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:267
-#: ports/nrf/common-hal/bleio/Device.c:300
+#: ports/nrf/common-hal/bleio/Device.c:268
+#: ports/nrf/common-hal/bleio/Device.c:302
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "Falha ao alocar buffer RX"
-#: ports/nrf/common-hal/bleio/Device.c:278
-#: ports/nrf/common-hal/bleio/Device.c:311
-#: ports/nrf/common-hal/bleio/Device.c:342
-#: ports/nrf/common-hal/bleio/Device.c:376
+#: ports/nrf/common-hal/bleio/Device.c:280
+#: ports/nrf/common-hal/bleio/Device.c:313
+#: ports/nrf/common-hal/bleio/Device.c:344
+#: ports/nrf/common-hal/bleio/Device.c:378
#, fuzzy
msgid "Failed to release mutex"
msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:387
+#: ports/nrf/common-hal/bleio/Device.c:389
msgid "Failed to continue scanning"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:419
+#: ports/nrf/common-hal/bleio/Device.c:421
msgid "Failed to connect:"
msgstr ""
-#: ports/nrf/common-hal/bleio/Device.c:489
+#: ports/nrf/common-hal/bleio/Device.c:491
#, fuzzy
msgid "Failed to add service"
msgstr "Não pode parar propaganda. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:506
+#: ports/nrf/common-hal/bleio/Device.c:508
#, fuzzy
msgid "Failed to start advertising"
msgstr "Não é possível iniciar o anúncio. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:523
+#: ports/nrf/common-hal/bleio/Device.c:525
#, fuzzy
msgid "Failed to stop advertising"
msgstr "Não pode parar propaganda. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:548
+#: ports/nrf/common-hal/bleio/Device.c:550
#, fuzzy
msgid "Failed to start scanning"
msgstr "Não é possível iniciar o anúncio. status: 0x%02x"
-#: ports/nrf/common-hal/bleio/Device.c:564
+#: ports/nrf/common-hal/bleio/Device.c:566
#, fuzzy
msgid "Failed to create mutex"
msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
@@ -841,21 +840,21 @@ msgstr "Todos os periféricos SPI estão em uso"
msgid "error = 0x%08lX"
msgstr "erro = 0x%08lX"
-#: ports/nrf/common-hal/busio/UART.c:122
+#: ports/nrf/common-hal/busio/UART.c:95
#, fuzzy
msgid "Invalid buffer size"
msgstr "Arquivo inválido"
-#: ports/nrf/common-hal/busio/UART.c:126
+#: ports/nrf/common-hal/busio/UART.c:99
#, fuzzy
msgid "Odd parity is not supported"
msgstr "I2C operação não suportada"
-#: ports/nrf/common-hal/busio/UART.c:358 ports/nrf/common-hal/busio/UART.c:362
-#: ports/nrf/common-hal/busio/UART.c:367 ports/nrf/common-hal/busio/UART.c:372
-#: ports/nrf/common-hal/busio/UART.c:378 ports/nrf/common-hal/busio/UART.c:383
-#: ports/nrf/common-hal/busio/UART.c:388 ports/nrf/common-hal/busio/UART.c:392
-#: ports/nrf/common-hal/busio/UART.c:400
+#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339
+#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349
+#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360
+#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369
+#: ports/nrf/common-hal/busio/UART.c:377
msgid "busio.UART not available"
msgstr "busio.UART não disponível"
@@ -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: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"
-#: 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:112
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:142
msgid "function got multiple values for argument '%q'"
msgstr ""
-#: py/bc.c:218 py/objnamedtuple.c:130
+#: py/bc.c:218 py/objnamedtuple.c:134
msgid "unexpected keyword argument '%q'"
msgstr ""
@@ -1349,9 +1348,9 @@ msgstr "divisão por zero"
msgid "schedule stack full"
msgstr ""
-#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244
-#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145
-#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175
+#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
+#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
+#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183
msgid "buffer too small"
msgstr ""
@@ -1529,11 +1528,11 @@ msgstr "cheio"
msgid "empty"
msgstr "vazio"
-#: py/objdict.c:314
+#: py/objdict.c:315
msgid "popitem(): dictionary is empty"
msgstr ""
-#: py/objdict.c:357
+#: py/objdict.c:358
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 ""
@@ -2028,47 +2027,47 @@ msgstr ""
msgid "byte code not implemented"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:101
+#: shared-bindings/_pixelbuf/PixelBuf.c:99
#, c-format
msgid "byteorder is not an instance of ByteOrder (got a %s)"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:106
+#: shared-bindings/_pixelbuf/PixelBuf.c:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:118
+#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:123
+#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:129
+#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:394
+#: shared-bindings/_pixelbuf/PixelBuf.c:392
msgid "Only slices with step=1 (aka None) are supported"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:396
+#: shared-bindings/_pixelbuf/PixelBuf.c:394
msgid "Range out of bounds"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:405
+#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:421
+#: shared-bindings/_pixelbuf/PixelBuf.c:419
#, c-format
msgid "Unmatched number of items on RHS (expected %d, got %d)."
msgstr ""
-#: shared-bindings/_pixelbuf/PixelBuf.c:444
+#: shared-bindings/_pixelbuf/PixelBuf.c:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
@@ -2101,8 +2100,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 ""
@@ -2139,91 +2138,109 @@ 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 ""
#: shared-bindings/audioio/WaveFile.c:78
-#: shared-bindings/displayio/OnDiskBitmap.c:85
+#: shared-bindings/displayio/OnDiskBitmap.c:87
msgid "file must be a file opened in byte mode"
msgstr ""
-#: 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:39
+#, fuzzy
+msgid "Not connected"
+msgstr "Não é possível conectar-se ao AP"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:74
+#, fuzzy
+msgid "timeout must be >= 0.0"
+msgstr "bits devem ser 8"
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:79
#, fuzzy
msgid "buffer_size must be >= 1"
msgstr "buffers devem ser o mesmo tamanho"
-#: shared-bindings/bleio/CharacteristicBuffer.c:72
+#: shared-bindings/bleio/CharacteristicBuffer.c:83
#, fuzzy
msgid "Expected a Characteristic"
msgstr "Não é possível adicionar Característica."
+#: shared-bindings/bleio/CharacteristicBuffer.c:138
+msgid "CharacteristicBuffer writing not provided"
+msgstr ""
+
+#: shared-bindings/bleio/CharacteristicBuffer.c:147
+msgid "Not connected."
+msgstr ""
+
#: shared-bindings/bleio/Device.c:210
msgid "Can't add services in Central mode"
msgstr ""
@@ -2240,20 +2257,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 ""
@@ -2261,32 +2278,36 @@ msgstr ""
msgid "UUID integer value not in range 0 to 0xffff"
msgstr ""
-#: shared-bindings/bleio/UUID.c:75
-msgid "UUID value is not int or byte buffer"
+#: shared-bindings/bleio/UUID.c:91
+msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
msgstr ""
-#: shared-bindings/bleio/UUID.c:79
+#: shared-bindings/bleio/UUID.c:103
+msgid "UUID value is not str, int or byte buffer"
+msgstr ""
+
+#: shared-bindings/bleio/UUID.c:107
#, fuzzy
msgid "Byte buffer must be 16 bytes."
msgstr "buffers devem ser o mesmo tamanho"
-#: shared-bindings/bleio/UUID.c:120
+#: shared-bindings/bleio/UUID.c:151
msgid "not a 128-bit UUID"
msgstr ""
-#: 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 ""
@@ -2312,7 +2333,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"
@@ -2328,45 +2349,68 @@ 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:119
+msgid "Too many displays"
+msgstr ""
+
+#: shared-bindings/displayio/Display.c:138
+msgid "Must be a Group subclass."
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:93
+#: shared-bindings/displayio/ParallelBus.c:98
+msgid "Too many display busses"
+msgstr ""
+
+#: shared-bindings/displayio/FourWire.c:106
+#: shared-bindings/displayio/ParallelBus.c:110
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/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 ""
@@ -2378,15 +2422,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 ""
@@ -2428,29 +2472,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"
@@ -2622,11 +2666,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"
@@ -2644,6 +2697,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."
@@ -2652,10 +2718,15 @@ msgstr "Não é possível remontar '/' enquanto o USB estiver ativo."
msgid "'S' and 'O' are not supported format types"
msgstr "'S' e 'O' não são tipos de formato suportados"
-#: shared-module/struct/__init__.c:83
+#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format"
msgstr "Muitos argumentos fornecidos com o formato dado"
+#: shared-module/struct/__init__.c:179
+#, fuzzy
+msgid "buffer size must match format"
+msgstr "buffers devem ser o mesmo tamanho"
+
#: shared-module/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
@@ -2669,6 +2740,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:91
+msgid "No default SPI bus"
+msgstr "Nenhum barramento SPI padrão"
+
+#: supervisor/shared/board_busses.c:118
+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"
@@ -2724,8 +2807,18 @@ msgid ""
"exit safe mode.\n"
msgstr ""
-#~ msgid "Invalid UUID parameter"
-#~ msgstr "Parâmetro UUID inválido"
+#~ msgid "Cannot set PPCP parameters."
+#~ msgstr "Não é possível definir parâmetros PPCP."
+
+#~ msgid "Can not query for the device address."
+#~ msgstr "Não é possível consultar o endereço do dispositivo."
+
+#~ msgid "Can encode UUID into the advertisement packet."
+#~ msgstr "Pode codificar o UUID no pacote de anúncios."
+
+#, fuzzy
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Falha ao alocar buffer RX de %d bytes"
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
@@ -2733,23 +2826,17 @@ msgstr ""
#~ msgid "Can not add Characteristic."
#~ msgstr "Não é possível adicionar Característica."
+#~ 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 "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."
diff --git a/main.c b/main.c
index 4e0b77cfd..e137f7d47 100755
--- a/main.c
+++ b/main.c
@@ -49,6 +49,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"
@@ -60,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) {
@@ -198,10 +203,15 @@ 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);
reset_port();
+ reset_board_busses();
reset_board();
reset_status_led();
diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile
index fe8d8554b..797369bd6 100644
--- a/ports/atmel-samd/Makefile
+++ b/ports/atmel-samd/Makefile
@@ -242,7 +242,6 @@ SRC_ASF := $(addprefix asf4/$(CHIP_FAMILY)/, $(SRC_ASF))
SRC_C = \
audio_dma.c \
- board_busses.c \
background.c \
fatfs_port.c \
mphalport.c \
@@ -310,7 +309,7 @@ SRC_COMMON_HAL = \
busio/UART.c \
digitalio/__init__.c \
digitalio/DigitalInOut.c \
- displayio/FourWire.c \
+ displayio/ParallelBus.c \
i2cslave/__init__.c \
i2cslave/I2CSlave.c \
microcontroller/__init__.c \
@@ -383,6 +382,8 @@ SRC_SHARED_MODULE = \
displayio/__init__.c \
displayio/Bitmap.c \
displayio/ColorConverter.c \
+ displayio/Display.c \
+ displayio/FourWire.c \
displayio/Group.c \
displayio/OnDiskBitmap.c \
displayio/Palette.c \
diff --git a/ports/atmel-samd/background.c b/ports/atmel-samd/background.c
index 439877d2e..4f3257f3f 100644
--- a/ports/atmel-samd/background.c
+++ b/ports/atmel-samd/background.c
@@ -30,10 +30,13 @@
#include "supervisor/usb.h"
#include "py/runtime.h"
-#include "shared-module/displayio/__init__.h"
#include "shared-module/network/__init__.h"
#include "supervisor/shared/stack.h"
+#ifdef CIRCUITPY_DISPLAYIO
+#include "shared-module/displayio/__init__.h"
+#endif
+
volatile uint64_t last_finished_tick = 0;
bool stack_ok_so_far = true;
@@ -44,7 +47,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/arduino_mkr1300/pins.c b/ports/atmel-samd/boards/arduino_mkr1300/pins.c
index de9f9769c..a5a058ace 100644
--- a/ports/atmel-samd/boards/arduino_mkr1300/pins.c
+++ b/ports/atmel-samd/boards/arduino_mkr1300/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/arduino_mkrzero/pins.c b/ports/atmel-samd/boards/arduino_mkrzero/pins.c
index 3ffd37fa6..654c0d6da 100644
--- a/ports/atmel-samd/boards/arduino_mkrzero/pins.c
+++ b/ports/atmel-samd/boards/arduino_mkrzero/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
@@ -31,7 +31,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB23) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB23) },
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB22) },
- { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB22) },
+ { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB22) },
{ MP_ROM_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_PA15) },
diff --git a/ports/atmel-samd/boards/arduino_zero/pins.c b/ports/atmel-samd/boards/arduino_zero/pins.c
index 8a7ff70e6..f9403bb9a 100644
--- a/ports/atmel-samd/boards/arduino_zero/pins.c
+++ b/ports/atmel-samd/boards/arduino_zero/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/board.h b/ports/atmel-samd/boards/board.h
index 61acc730e..4f0ae9d72 100644
--- a/ports/atmel-samd/boards/board.h
+++ b/ports/atmel-samd/boards/board.h
@@ -33,12 +33,6 @@
#include "py/mpconfig.h"
-#ifdef CIRCUITPY_DISPLAYIO
-#include "common-hal/displayio/FourWire.h"
-
-extern displayio_fourwire_obj_t board_display_obj;
-#endif
-
// Initializes board related state once on start up.
void board_init(void);
diff --git a/ports/atmel-samd/boards/catwan_usbstick/pins.c b/ports/atmel-samd/boards/catwan_usbstick/pins.c
index 8997b653f..87ee84c0b 100644
--- a/ports/atmel-samd/boards/catwan_usbstick/pins.c
+++ b/ports/atmel-samd/boards/catwan_usbstick/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA30) },
diff --git a/ports/atmel-samd/boards/circuitplayground_express/pins.c b/ports/atmel-samd/boards/circuitplayground_express/pins.c
index 14ae89c55..70743366e 100644
--- a/ports/atmel-samd/boards/circuitplayground_express/pins.c
+++ b/ports/atmel-samd/boards/circuitplayground_express/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c
index 14ae89c55..70743366e 100644
--- a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c
+++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/cp32-m4/pins.c b/ports/atmel-samd/boards/cp32-m4/pins.c
index 93c169c8b..9da67dfb4 100644
--- a/ports/atmel-samd/boards/cp32-m4/pins.c
+++ b/ports/atmel-samd/boards/cp32-m4/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
// This mapping only includes functional names because pins broken
// out on connectors are labeled with their MCU name available from
diff --git a/ports/atmel-samd/boards/datalore_ip_m4/pins.c b/ports/atmel-samd/boards/datalore_ip_m4/pins.c
index 460fd6fef..468a09a47 100644
--- a/ports/atmel-samd/boards/datalore_ip_m4/pins.c
+++ b/ports/atmel-samd/boards/datalore_ip_m4/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
// This mapping only includes functional names because pins broken
// out on connectors are labeled with their MCU name available from
diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c
index 0029bba1a..d99e62c95 100644
--- a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c
+++ b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/feather_m0_basic/pins.c b/ports/atmel-samd/boards/feather_m0_basic/pins.c
index 4400a253d..f9b6db63b 100644
--- a/ports/atmel-samd/boards/feather_m0_basic/pins.c
+++ b/ports/atmel-samd/boards/feather_m0_basic/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/feather_m0_express/pins.c b/ports/atmel-samd/boards/feather_m0_express/pins.c
index cd6c351d4..1eaa98a58 100644
--- a/ports/atmel-samd/boards/feather_m0_express/pins.c
+++ b/ports/atmel-samd/boards/feather_m0_express/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c b/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c
index cd6c351d4..1eaa98a58 100644
--- a/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c
+++ b/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/pins.c b/ports/atmel-samd/boards/feather_m0_rfm69/pins.c
index 7e14b3f25..ba59cb69b 100644
--- a/ports/atmel-samd/boards/feather_m0_rfm69/pins.c
+++ b/ports/atmel-samd/boards/feather_m0_rfm69/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c b/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c
index 4e77b7fb9..29a01d405 100644
--- a/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c
+++ b/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/feather_m0_supersized/pins.c b/ports/atmel-samd/boards/feather_m0_supersized/pins.c
index cd6c351d4..1eaa98a58 100644
--- a/ports/atmel-samd/boards/feather_m0_supersized/pins.c
+++ b/ports/atmel-samd/boards/feather_m0_supersized/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h
index ed1dfe763..8510a7dae 100644
--- a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h
+++ b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h
@@ -43,3 +43,4 @@
#define IGNORE_PIN_PA25 1
#define CIRCUITPY_I2CSLAVE
+#define CIRCUITPY_DISPLAYIO (1)
diff --git a/ports/atmel-samd/boards/feather_m4_express/pins.c b/ports/atmel-samd/boards/feather_m4_express/pins.c
index 5004254c5..cec9fe37f 100644
--- a/ports/atmel-samd/boards/feather_m4_express/pins.c
+++ b/ports/atmel-samd/boards/feather_m4_express/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/pins.c b/ports/atmel-samd/boards/feather_radiofruit_zigbee/pins.c
index cd111e174..211596f78 100755
--- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/pins.c
+++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PB02) },
diff --git a/ports/atmel-samd/boards/gemma_m0/pins.c b/ports/atmel-samd/boards/gemma_m0/pins.c
index c9c7ea555..b24b45838 100644
--- a/ports/atmel-samd/boards/gemma_m0/pins.c
+++ b/ports/atmel-samd/boards/gemma_m0/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, // pad 1
diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h
index e1bef0019..465c51b4a 100644
--- a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h
+++ b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h
@@ -46,3 +46,5 @@
#define IGNORE_PIN_PA25 1
#define CIRCUITPY_I2CSLAVE
+#define CIRCUITPY_DISPLAYIO (1)
+#define CIRCUITPY_DISPLAY_LIMIT (3)
diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c
index 081bb701e..26d0e71a0 100644
--- a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c
+++ b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c
@@ -1,133 +1,133 @@
#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
// 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/hallowing_m0_express/board.c b/ports/atmel-samd/boards/hallowing_m0_express/board.c
index b47c5fbb2..2b12ae464 100644
--- a/ports/atmel-samd/boards/hallowing_m0_express/board.c
+++ b/ports/atmel-samd/boards/hallowing_m0_express/board.c
@@ -27,6 +27,7 @@
#include "boards/board.h"
#include "shared-bindings/displayio/FourWire.h"
+#include "shared-module/displayio/__init__.h"
#include "shared-module/displayio/mipi_constants.h"
#include "tick.h"
@@ -68,13 +69,18 @@ uint8_t display_init_sequence[] = {
};
void board_init(void) {
- board_display_obj.base.type = &displayio_fourwire_type;
- common_hal_displayio_fourwire_construct(&board_display_obj,
- &pin_PB23, // Clock
- &pin_PB22, // Data
+ displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
+ bus->base.type = &displayio_fourwire_type;
+ common_hal_displayio_fourwire_construct(bus,
+ board_spi(),
&pin_PA28, // Command or data
&pin_PA01, // Chip select
- &pin_PA27, // Reset
+ &pin_PA27); // Reset
+
+ displayio_display_obj_t* display = &displays[0].display;
+ display->base.type = &displayio_display_type;
+ common_hal_displayio_display_construct(display,
+ bus,
128, // Width
128, // Height
2, // column start
@@ -82,33 +88,9 @@ void board_init(void) {
16, // Color depth
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
- MIPI_COMMAND_WRITE_MEMORY_START); // Write memory command
-
- uint32_t i = 0;
- common_hal_displayio_fourwire_begin_transaction(&board_display_obj);
- while (i < sizeof(display_init_sequence)) {
- uint8_t *cmd = display_init_sequence + i;
- uint8_t data_size = *(cmd + 1);
- bool delay = (data_size & DELAY) != 0;
- data_size &= ~DELAY;
- uint8_t *data = cmd + 2;
- common_hal_displayio_fourwire_send(&board_display_obj, true, cmd, 1);
- common_hal_displayio_fourwire_send(&board_display_obj, false, data, data_size);
- if (delay) {
- data_size++;
- uint16_t delay_length_ms = *(cmd + 1 + data_size);
- if (delay_length_ms == 255) {
- delay_length_ms = 500;
- }
- uint64_t start = ticks_ms;
- while (ticks_ms - start < delay_length_ms) {}
- } else {
- uint64_t start = ticks_ms;
- while (ticks_ms - start < 10) {}
- }
- i += 2 + data_size;
- }
- common_hal_displayio_fourwire_end_transaction(&board_display_obj);
+ MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
+ display_init_sequence,
+ sizeof(display_init_sequence));
}
bool board_requests_safe_mode(void) {
@@ -116,5 +98,4 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
- common_hal_displayio_fourwire_show(&board_display_obj, NULL);
}
diff --git a/ports/atmel-samd/boards/hallowing_m0_express/pins.c b/ports/atmel-samd/boards/hallowing_m0_express/pins.c
index d1f8609ff..3db1b1752 100644
--- a/ports/atmel-samd/boards/hallowing_m0_express/pins.c
+++ b/ports/atmel-samd/boards/hallowing_m0_express/pins.c
@@ -1,7 +1,8 @@
#include "shared-bindings/board/__init__.h"
#include "boards/board.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
+#include "shared-module/displayio/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
@@ -62,6 +63,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
- { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&board_display_obj)}
+ { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c b/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c
index 25407bc14..912fba4ed 100644
--- a/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c
+++ b/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) },
diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c b/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c
index 2a89c3037..ed91c88ee 100644
--- a/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c
+++ b/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
// This mapping only includes functional names because pins broken
// out on connectors are labeled with their MCU name available from
diff --git a/ports/atmel-samd/boards/meowmeow/pins.c b/ports/atmel-samd/boards/meowmeow/pins.c
index 59c51f4eb..089baad32 100644
--- a/ports/atmel-samd/boards/meowmeow/pins.c
+++ b/ports/atmel-samd/boards/meowmeow/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/metro_m0_express/pins.c b/ports/atmel-samd/boards/metro_m0_express/pins.c
index 13f0eb0ba..0707a3581 100644
--- a/ports/atmel-samd/boards/metro_m0_express/pins.c
+++ b/ports/atmel-samd/boards/metro_m0_express/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
diff --git a/ports/atmel-samd/boards/metro_m4_express/pins.c b/ports/atmel-samd/boards/metro_m4_express/pins.c
index 0e66817f7..63ae319a2 100644
--- a/ports/atmel-samd/boards/metro_m4_express/pins.c
+++ b/ports/atmel-samd/boards/metro_m4_express/pins.c
@@ -1,46 +1,46 @@
#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
// 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/mini_sam_m4/pins.c b/ports/atmel-samd/boards/mini_sam_m4/pins.c
index 87e210381..f78fe1bc8 100644
--- a/ports/atmel-samd/boards/mini_sam_m4/pins.c
+++ b/ports/atmel-samd/boards/mini_sam_m4/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
// This mapping only includes functional names because pins broken
// out on connectors are labeled with their MCU name available from
diff --git a/ports/atmel-samd/boards/pirkey_m0/pins.c b/ports/atmel-samd/boards/pirkey_m0/pins.c
index e08302f14..a6dbcefe3 100644
--- a/ports/atmel-samd/boards/pirkey_m0/pins.c
+++ b/ports/atmel-samd/boards/pirkey_m0/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_REMOTEIN), MP_ROM_PTR(&pin_PA28) },
diff --git a/ports/atmel-samd/boards/pyportal/board.c b/ports/atmel-samd/boards/pyportal/board.c
index 9cf3ee8c2..6e5b37dd2 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,16 +25,15 @@
*/
#include "boards/board.h"
+#include "supervisor/shared/board_busses.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"
-#include "shared-bindings/displayio/FourWire.h"
+#include "shared-module/displayio/__init__.h"
#include "shared-module/displayio/mipi_constants.h"
#include "tick.h"
-displayio_fourwire_obj_t board_display_obj;
-
#define DELAY 0x80
uint8_t display_init_sequence[] = {
@@ -64,15 +63,21 @@ uint8_t display_init_sequence[] = {
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
+ 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_PA00, // Reset
+ &pin_PB09, // Write
+ &pin_PB04, // Read
+ &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
@@ -80,33 +85,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) {
@@ -114,5 +95,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/pyportal/mpconfigboard.h b/ports/atmel-samd/boards/pyportal/mpconfigboard.h
index 847e2ba76..f02d4a372 100644
--- a/ports/atmel-samd/boards/pyportal/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.h
@@ -13,7 +13,7 @@
// QSPI Data pins
#define MICROPY_PORT_A ( PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 )
// QSPI CS, and QSPI SCK
-#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 )
+#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 | PORT_PB22 )
#define MICROPY_PORT_C ( 0 )
#define MICROPY_PORT_D (0)
diff --git a/ports/atmel-samd/boards/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c
index ddb8fa08a..9a5c5b1a5 100644
--- a/ports/atmel-samd/boards/pyportal/pins.c
+++ b/ports/atmel-samd/boards/pyportal/pins.c
@@ -1,78 +1,79 @@
#include "shared-bindings/board/__init__.h"
#include "boards/board.h"
-#include "board_busses.h"
+#include "shared-module/displayio/__init__.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
// 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) },
{ 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/sparkfun_samd21_mini/pins.c b/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c
index abe63d064..42cd3736b 100644
--- a/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c
+++ b/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c
@@ -1,15 +1,15 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
-
+
// Analog pins
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) },
-
+
// Digital pins
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) },
@@ -25,16 +25,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) },
-
+
// UART pins
- { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) },
+ { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) },
-
+
// SPI pins
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA19) },
-
+
// I2C pins
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
@@ -44,7 +44,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_PA27) },
{ MP_ROM_QSTR(MP_QSTR_YELLOW_LED), MP_ROM_PTR(&pin_PB03) },
-
+
// Comm objects
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
diff --git a/ports/atmel-samd/boards/trellis_m4_express/pins.c b/ports/atmel-samd/boards/trellis_m4_express/pins.c
index 9626f525f..a9f204318 100644
--- a/ports/atmel-samd/boards/trellis_m4_express/pins.c
+++ b/ports/atmel-samd/boards/trellis_m4_express/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
// This mapping only includes functional names because pins broken
// out on connectors are labeled with their MCU name available from
diff --git a/ports/atmel-samd/boards/trinket_m0/pins.c b/ports/atmel-samd/boards/trinket_m0/pins.c
index 633017024..b3637bd5b 100644
--- a/ports/atmel-samd/boards/trinket_m0/pins.c
+++ b/ports/atmel-samd/boards/trinket_m0/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) },
diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c b/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c
index 633017024..b3637bd5b 100644
--- a/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c
+++ b/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) },
diff --git a/ports/atmel-samd/boards/ugame10/pins.c b/ports/atmel-samd/boards/ugame10/pins.c
index 87ace5e96..71db52752 100644
--- a/ports/atmel-samd/boards/ugame10/pins.c
+++ b/ports/atmel-samd/boards/ugame10/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_X), MP_ROM_PTR(&pin_PA00) },
diff --git a/ports/atmel-samd/common-hal/busio/SPI.c b/ports/atmel-samd/common-hal/busio/SPI.c
index 4de34c975..8fb831a69 100644
--- a/ports/atmel-samd/common-hal/busio/SPI.c
+++ b/ports/atmel-samd/common-hal/busio/SPI.c
@@ -54,6 +54,17 @@ void never_reset_sercom(Sercom* sercom) {
}
}
+void allow_reset_sercom(Sercom* sercom) {
+ // Reset all SERCOMs except the ones being used by on-board devices.
+ Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS;
+ for (int i = 0; i < SERCOM_INST_NUM; i++) {
+ if (sercom_instances[i] == sercom) {
+ never_reset_sercoms[i] = false;
+ break;
+ }
+ }
+}
+
void reset_sercoms(void) {
// Reset all SERCOMs except the ones being used by on-board devices.
Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS;
@@ -66,12 +77,6 @@ void reset_sercoms(void) {
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;
}
@@ -241,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
deleted file mode 100644
index 51e6de5a2..000000000
--- a/ports/atmel-samd/common-hal/displayio/FourWire.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * This file is part of the MicroPython project, http://micropython.org/
- *
- * The MIT License (MIT)
- *
- * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#include "shared-bindings/displayio/FourWire.h"
-
-#include <stdint.h>
-
-#include "shared-bindings/busio/SPI.h"
-#include "shared-bindings/digitalio/DigitalInOut.h"
-
-#include "tick.h"
-
-void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self,
- 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) {
-
- common_hal_busio_spi_construct(&self->bus, clock, data, mp_const_none);
- common_hal_busio_spi_never_reset(&self->bus);
-
- common_hal_digitalio_digitalinout_construct(&self->command, command);
- common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL);
- common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select);
- common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL);
-
- common_hal_digitalio_digitalinout_construct(&self->reset, reset);
- common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL);
-
- never_reset_pin_number(command->number);
- never_reset_pin_number(chip_select->number);
- never_reset_pin_number(reset->number);
-
- 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)) {
- return false;
- }
- // TODO(tannewt): Stop hardcoding SPI frequency, polarity and phase.
- common_hal_busio_spi_configure(&self->bus, 48000000, 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) {
- common_hal_digitalio_digitalinout_set_value(&self->command, !command);
- common_hal_busio_spi_write(&self->bus, data, data_length);
-}
-
-void common_hal_displayio_fourwire_end_transaction(displayio_fourwire_obj_t* self) {
- 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;
-}
diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.c b/ports/atmel-samd/common-hal/displayio/ParallelBus.c
new file mode 100644
index 000000000..7a5f61448
--- /dev/null
+++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.c
@@ -0,0 +1,129 @@
+/*
+ * 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 <stdint.h>
+
+#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) {
+ 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 % 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;
+ 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;
+ 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(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.reg;
+ uint32_t* set_write = (uint32_t*) &self->write_group->OUTSET.reg;
+ uint32_t mask = self->write_mask;
+ for (uint32_t i = 0; i < data_length; i++) {
+ *clear_write = mask;
+ *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/atmel-samd/common-hal/displayio/ParallelBus.h b/ports/atmel-samd/common-hal/displayio/ParallelBus.h
new file mode 100644
index 000000000..630bec351
--- /dev/null
+++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.h
@@ -0,0 +1,45 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_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;
+ 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/common-hal/microcontroller/Pin.c b/ports/atmel-samd/common-hal/microcontroller/Pin.c
index 7dd9c6b09..b7d527d04 100644
--- a/ports/atmel-samd/common-hal/microcontroller/Pin.c
+++ b/ports/atmel-samd/common-hal/microcontroller/Pin.c
@@ -100,6 +100,8 @@ void never_reset_pin_number(uint8_t pin_number) {
}
void reset_pin_number(uint8_t pin_number) {
+ never_reset_pins[GPIO_PORT(pin_number)] &= ~(1 << GPIO_PIN(pin_number));
+
if (pin_number >= PORT_BITS) {
return;
}
@@ -169,6 +171,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 +206,5 @@ bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t* pin) {
}
#endif
- PortGroup *const port = &PORT->Group[(enum gpio_port)GPIO_PORT(pin->number)];
- uint8_t pin_index = GPIO_PIN(pin->number);
- volatile PORT_PINCFG_Type *state = &port->PINCFG[pin_index];
- volatile PORT_PMUX_Type *pmux = &port->PMUX[pin_index / 2];
-
- if (pin->number == PIN_PA30 || pin->number == PIN_PA31) {
- return state->bit.PMUXEN == 1 && ((pmux->reg >> (4 * pin_index % 2)) & 0xf) == 0x6;
- }
-
- return state->bit.PMUXEN == 0 && state->bit.INEN == 0 &&
- state->bit.PULLEN == 0 && (port->DIR.reg & (1 << pin_index)) == 0;
+ return pin_number_is_free(pin->number);
}
diff --git a/ports/atmel-samd/common-hal/microcontroller/Pin.h b/ports/atmel-samd/common-hal/microcontroller/Pin.h
index f798ea300..14887207a 100644
--- a/ports/atmel-samd/common-hal/microcontroller/Pin.h
+++ b/ports/atmel-samd/common-hal/microcontroller/Pin.h
@@ -45,5 +45,6 @@ void reset_all_pins(void);
void reset_pin_number(uint8_t pin_number);
void never_reset_pin_number(uint8_t pin_number);
void claim_pin(const mcu_pin_obj_t* pin);
+bool pin_number_is_free(uint8_t pin_number);
#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_MICROCONTROLLER_PIN_H
diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h
index 4e3d6073c..e9507e3cc 100644
--- a/ports/atmel-samd/mpconfigport.h
+++ b/ports/atmel-samd/mpconfigport.h
@@ -284,8 +284,10 @@ extern const struct _mp_obj_module_t pixelbuf_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 CIRCUITPY_DISPLAY_LIMIT (0)
#define DISPLAYIO_MODULE
#endif
@@ -345,6 +347,7 @@ extern const struct _mp_obj_module_t pixelbuf_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/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c
index 941838618..7e7e894cb 100644
--- a/ports/atmel-samd/supervisor/port.c
+++ b/ports/atmel-samd/supervisor/port.c
@@ -60,7 +60,6 @@
#include "samd/external_interrupts.h"
#include "samd/dma.h"
#include "shared-bindings/rtc/__init__.h"
-#include "board_busses.h"
#include "reset.h"
#include "tick.h"
@@ -226,8 +225,6 @@ void reset_port(void) {
reset_all_pins();
- reset_board_busses();
-
// Output clocks for debugging.
// not supported by SAMD51G; uncomment for SAMD51J or update for 51G
// #ifdef SAMD51
diff --git a/ports/esp8266/Makefile b/ports/esp8266/Makefile
index 67316b55a..6d63c0d1a 100644
--- a/ports/esp8266/Makefile
+++ b/ports/esp8266/Makefile
@@ -221,7 +221,8 @@ SRC_QSTR += $(SRC_C) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) $(
# Append any auto-generated sources that are needed by sources listed in SRC_QSTR
SRC_QSTR_AUTO_DEPS +=
-all: $(BUILD)/libaxtls.a $(FWBIN)
+all:
+ @echo "CircuitPython 4.0.0 and later do not support esp8266 boards."
CONFVARS_FILE = $(BUILD)/confvars
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index 164cd9abc..a98007661 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 \
@@ -142,6 +141,7 @@ SRC_C += \
peripherals/nrf/$(MCU_CHIP)/pins.c \
peripherals/nrf/$(MCU_CHIP)/power.c \
peripherals/nrf/timers.c \
+ sd_mutex.c \
supervisor/shared/memory.c
@@ -156,6 +156,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,8 +215,18 @@ SRC_SHARED_MODULE = \
bitbangio/OneWire.c \
bitbangio/SPI.c \
busio/OneWire.c \
- storage/__init__.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
+
ifndef EXCLUDE_PIXELBUF
SRC_SHARED_MODULE += _pixelbuf/__init__.c \
diff --git a/ports/nrf/background.c b/ports/nrf/background.c
index f022b5bc9..69c76fd06 100644
--- a/ports/nrf/background.c
+++ b/ports/nrf/background.c
@@ -24,15 +24,20 @@
* THE SOFTWARE.
*/
-#ifdef NRF52840
+#include "py/runtime.h"
#include "supervisor/usb.h"
-#endif
-
#include "supervisor/shared/stack.h"
+#ifdef CIRCUITPY_DISPLAYIO
+#include "shared-module/displayio/__init__.h"
+#endif
+
void run_background_tasks(void) {
- #ifdef NRF52840
- usb_background();
+ usb_background();
+
+ #ifdef CIRCUITPY_DISPLAYIO
+ displayio_refresh_displays();
#endif
+
assert_heap_ok();
}
diff --git a/ports/nrf/board_busses.c b/ports/nrf/board_busses.c
deleted file mode 100644
index 6d5cbd041..000000000
--- a/ports/nrf/board_busses.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * This file is part of the MicroPython project, http://micropython.org/
- *
- * The MIT License (MIT)
- *
- * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#include "shared-bindings/busio/I2C.h"
-#include "shared-bindings/busio/SPI.h"
-#include "shared-bindings/busio/UART.h"
-
-#include "shared-bindings/microcontroller/Pin.h"
-#include "supervisor/shared/translate.h"
-#include "nrf/pins.h"
-#include "py/mpconfig.h"
-#include "py/runtime.h"
-
-#if !defined(DEFAULT_I2C_BUS_SDA) || !defined(DEFAULT_I2C_BUS_SCL)
- STATIC mp_obj_t board_i2c(void) {
- mp_raise_NotImplementedError(translate("No default I2C bus"));
- return NULL;
- }
-#else
- STATIC mp_obj_t i2c_singleton = NULL;
-
- STATIC mp_obj_t board_i2c(void) {
-
- if (i2c_singleton == NULL) {
- busio_i2c_obj_t *self = m_new_obj(busio_i2c_obj_t);
- self->base.type = &busio_i2c_type;
-
- assert_pin_free(DEFAULT_I2C_BUS_SDA);
- assert_pin_free(DEFAULT_I2C_BUS_SCL);
- common_hal_busio_i2c_construct(self, DEFAULT_I2C_BUS_SCL, DEFAULT_I2C_BUS_SDA, 400000, 0);
- i2c_singleton = (mp_obj_t)self;
- }
- return i2c_singleton;
-
- }
-#endif
-MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c);
-
-#if !defined(DEFAULT_SPI_BUS_SCK) || !defined(DEFAULT_SPI_BUS_MISO) || !defined(DEFAULT_SPI_BUS_MOSI)
- STATIC mp_obj_t board_spi(void) {
- mp_raise_NotImplementedError(translate("No default SPI bus"));
- return NULL;
- }
-#else
- STATIC mp_obj_t spi_singleton = NULL;
-
- STATIC mp_obj_t board_spi(void) {
-
- if (spi_singleton == NULL) {
- busio_spi_obj_t *self = m_new_obj(busio_spi_obj_t);
- self->base.type = &busio_spi_type;
- assert_pin_free(DEFAULT_SPI_BUS_SCK);
- assert_pin_free(DEFAULT_SPI_BUS_MOSI);
- assert_pin_free(DEFAULT_SPI_BUS_MISO);
- const mcu_pin_obj_t* clock = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_SCK);
- const mcu_pin_obj_t* mosi = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MOSI);
- const mcu_pin_obj_t* miso = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MISO);
- common_hal_busio_spi_construct(self, clock, mosi, miso);
- spi_singleton = (mp_obj_t)self;
- }
- return spi_singleton;
- }
-#endif
-MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi);
-
-#if !defined(DEFAULT_UART_BUS_RX) || !defined(DEFAULT_UART_BUS_TX)
- STATIC mp_obj_t board_uart(void) {
- mp_raise_NotImplementedError(translate("No default UART bus"));
- return NULL;
- }
-#else
- STATIC mp_obj_t uart_singleton = NULL;
-
- STATIC mp_obj_t board_uart(void) {
- if (uart_singleton == NULL) {
- busio_uart_obj_t *self = m_new_obj(busio_uart_obj_t);
- self->base.type = &busio_uart_type;
-
- assert_pin_free(DEFAULT_UART_BUS_RX);
- assert_pin_free(DEFAULT_UART_BUS_TX);
-
- const mcu_pin_obj_t* rx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RX);
- const mcu_pin_obj_t* tx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_TX);
-
- common_hal_busio_uart_construct(self, tx, rx, 9600, 8, PARITY_NONE, 1, 1000, 64);
- uart_singleton = (mp_obj_t)self;
- }
- return uart_singleton;
- }
-#endif
-MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart);
diff --git a/ports/nrf/boards/feather_nrf52840_express/pins.c b/ports/nrf/boards/feather_nrf52840_express/pins.c
index 2f8ac0259..c6f643761 100644
--- a/ports/nrf/boards/feather_nrf52840_express/pins.c
+++ b/ports/nrf/boards/feather_nrf52840_express/pins.c
@@ -1,51 +1,55 @@
#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) },
- { 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_BLUE_LED), MP_ROM_PTR(&pin_P1_10) },
+ { 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_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/boards/makerdiary_nrf52840_mdk/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c
index 27f0c6797..2d24e8597 100644
--- a/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c
+++ b/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) },
diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c
index 6049ac053..10490c8cb 100644
--- a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c
+++ b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) },
diff --git a/ports/nrf/boards/particle_argon/pins.c b/ports/nrf/boards/particle_argon/pins.c
index 0457f0aa8..8c2fb38e6 100644
--- a/ports/nrf/boards/particle_argon/pins.c
+++ b/ports/nrf/boards/particle_argon/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) },
diff --git a/ports/nrf/boards/particle_boron/pins.c b/ports/nrf/boards/particle_boron/pins.c
index 2bff0a2ce..5981212bf 100644
--- a/ports/nrf/boards/particle_boron/pins.c
+++ b/ports/nrf/boards/particle_boron/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) },
diff --git a/ports/nrf/boards/particle_xenon/pins.c b/ports/nrf/boards/particle_xenon/pins.c
index 11a29e927..cdd5b5306 100644
--- a/ports/nrf/boards/particle_xenon/pins.c
+++ b/ports/nrf/boards/particle_xenon/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) },
diff --git a/ports/nrf/boards/pca10056/pins.c b/ports/nrf/boards/pca10056/pins.c
index a57c9d1c9..510b6100e 100644
--- a/ports/nrf/boards/pca10056/pins.c
+++ b/ports/nrf/boards/pca10056/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_P0_00), MP_ROM_PTR(&pin_P0_00) },
diff --git a/ports/nrf/boards/pca10059/pins.c b/ports/nrf/boards/pca10059/pins.c
index a1916bd04..c43d3a9eb 100644
--- a/ports/nrf/boards/pca10059/pins.c
+++ b/ports/nrf/boards/pca10059/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) },
diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c
index 5c50f55c7..f826ac771 100644
--- a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c
+++ b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P1_15) }, // D1/TX
diff --git a/ports/nrf/common-hal/bleio/Characteristic.c b/ports/nrf/common-hal/bleio/Characteristic.c
index 0bade8d01..1db564549 100644
--- a/ports/nrf/common-hal/bleio/Characteristic.c
+++ b/ports/nrf/common-hal/bleio/Characteristic.c
@@ -36,9 +36,9 @@
#include "common-hal/bleio/Characteristic.h"
#include "shared-module/bleio/Characteristic.h"
-// TODO - should these be per object?? *****
STATIC volatile bleio_characteristic_obj_t *m_read_characteristic;
STATIC volatile uint8_t m_tx_in_progress;
+// Serialize gattc writes that send a response. This might be done per object?
STATIC nrf_mutex_t *m_write_mutex;
STATIC uint16_t get_cccd(bleio_characteristic_obj_t *characteristic) {
diff --git a/ports/nrf/common-hal/bleio/CharacteristicBuffer.c b/ports/nrf/common-hal/bleio/CharacteristicBuffer.c
index 4bd3e147f..42e45abdf 100644
--- a/ports/nrf/common-hal/bleio/CharacteristicBuffer.c
+++ b/ports/nrf/common-hal/bleio/CharacteristicBuffer.c
@@ -3,7 +3,7 @@
*
* The MIT License (MIT)
*
- * Copyright (c) 2018 Artur Pacholec
+ * Copyright (c) 2019 Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -29,9 +29,13 @@
#include "ble_drv.h"
#include "ble_gatts.h"
-#include "nrf_soc.h"
+#include "sd_mutex.h"
+#include "lib/utils/interrupt_char.h"
#include "py/runtime.h"
+#include "py/stream.h"
+
+#include "tick.h"
#include "common-hal/bleio/__init__.h"
#include "common-hal/bleio/CharacteristicBuffer.h"
@@ -43,10 +47,13 @@ STATIC void characteristic_buffer_on_ble_evt(ble_evt_t *ble_evt, void *param) {
ble_gatts_evt_write_t *evt_write = &ble_evt->evt.gatts_evt.params.write;
// Event handle must match the handle for my characteristic.
if (evt_write->handle == self->characteristic->handle) {
- // Push all the data onto the ring buffer.
+ // Push all the data onto the ring buffer, but wait for any reads to finish.
+ sd_mutex_acquire_wait_no_vm(&self->ringbuf_mutex);
for (size_t i = 0; i < evt_write->len; i++) {
ringbuf_put(&self->ringbuf, evt_write->data[i]);
}
+ // Don't check for errors: we're in an event handler.
+ sd_mutex_release(&self->ringbuf_mutex);
break;
}
}
@@ -54,22 +61,75 @@ STATIC void characteristic_buffer_on_ble_evt(ble_evt_t *ble_evt, void *param) {
}
-// Assumes that buffer_size has been validated before call.
-void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic, size_t buffer_size) {
+// Assumes that timeout and buffer_size have been validated before call.
+void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self,
+ bleio_characteristic_obj_t *characteristic,
+ mp_float_t timeout,
+ size_t buffer_size) {
self->characteristic = characteristic;
+ self->timeout_ms = timeout * 1000;
// This is a macro.
- ringbuf_alloc(&self->ringbuf, buffer_size);
+ // true means long-lived, so it won't be moved.
+ ringbuf_alloc(&self->ringbuf, buffer_size, true);
+ sd_mutex_new(&self->ringbuf_mutex);
ble_drv_add_event_handler(characteristic_buffer_on_ble_evt, self);
}
-// Returns a uint8_t byte value, or -1 if no data is available.
-int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_t *self) {
- return ringbuf_get(&self->ringbuf);
+int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_t *self, uint8_t *data, size_t len, int *errcode) {
+ uint64_t start_ticks = ticks_ms;
+
+ // Wait for all bytes received or timeout
+ while ( (ringbuf_count(&self->ringbuf) < len) && (ticks_ms - start_ticks < self->timeout_ms) ) {
+#ifdef MICROPY_VM_HOOK_LOOP
+ MICROPY_VM_HOOK_LOOP ;
+ // Allow user to break out of a timeout with a KeyboardInterrupt.
+ if ( mp_hal_is_interrupted() ) {
+ return 0;
+ }
+#endif
+ }
+
+ // Copy received data. Lock out writes while copying.
+ sd_mutex_acquire_wait(&self->ringbuf_mutex);
+
+ size_t rx_bytes = MIN(ringbuf_count(&self->ringbuf), len);
+ for ( size_t i = 0; i < rx_bytes; i++ ) {
+ data[i] = ringbuf_get(&self->ringbuf);
+ }
+
+ // Writes now OK.
+ sd_mutex_release_check(&self->ringbuf_mutex);
+
+ return rx_bytes;
+}
+
+uint32_t common_hal_bleio_characteristic_buffer_rx_characters_available(bleio_characteristic_buffer_obj_t *self) {
+ return ringbuf_count(&self->ringbuf);
+}
+
+void common_hal_bleio_characteristic_buffer_clear_rx_buffer(bleio_characteristic_buffer_obj_t *self) {
+ // prevent conflict with uart irq
+ sd_mutex_acquire_wait(&self->ringbuf_mutex);
+ ringbuf_clear(&self->ringbuf);
+ sd_mutex_release_check(&self->ringbuf_mutex);
+}
+
+bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer_obj_t *self) {
+ return self->characteristic == NULL;
}
void common_hal_bleio_characteristic_buffer_deinit(bleio_characteristic_buffer_obj_t *self) {
- ble_drv_remove_event_handler(characteristic_buffer_on_ble_evt, self);
+ if (!common_hal_bleio_characteristic_buffer_deinited(self)) {
+ ble_drv_remove_event_handler(characteristic_buffer_on_ble_evt, self);
+ }
+}
+
+bool common_hal_bleio_characteristic_buffer_connected(bleio_characteristic_buffer_obj_t *self) {
+ return self->characteristic != NULL &&
+ self->characteristic->service != NULL &&
+ self->characteristic->service->device != NULL &&
+ common_hal_bleio_device_get_conn_handle(self->characteristic->service->device) != BLE_CONN_HANDLE_INVALID;
}
diff --git a/ports/nrf/common-hal/bleio/CharacteristicBuffer.h b/ports/nrf/common-hal/bleio/CharacteristicBuffer.h
index f9ff7dd66..f5c715154 100644
--- a/ports/nrf/common-hal/bleio/CharacteristicBuffer.h
+++ b/ports/nrf/common-hal/bleio/CharacteristicBuffer.h
@@ -27,15 +27,18 @@
#ifndef MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H
#define MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H
-#include "py/ringbuf.h"
+#include "nrf_soc.h"
+#include "py/ringbuf.h"
#include "shared-bindings/bleio/Characteristic.h"
typedef struct {
mp_obj_base_t base;
bleio_characteristic_obj_t *characteristic;
+ uint32_t timeout_ms;
// Ring buffer storing consecutive incoming values.
ringbuf_t ringbuf;
+ nrf_mutex_t ringbuf_mutex;
} bleio_characteristic_buffer_obj_t;
#endif // MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H
diff --git a/ports/nrf/common-hal/bleio/Device.c b/ports/nrf/common-hal/bleio/Device.c
index 50c738abe..5f625829e 100644
--- a/ports/nrf/common-hal/bleio/Device.c
+++ b/ports/nrf/common-hal/bleio/Device.c
@@ -262,11 +262,13 @@ STATIC bool discover_services(bleio_device_obj_t *device, uint16_t start_handle)
mp_raise_OSError_msg(translate("Failed to discover services"));
}
+ // Serialize discovery.
err_code = sd_mutex_acquire(m_discovery_mutex);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to acquire mutex"));
}
+ // Wait for someone else to release m_discovery_mutex.
while (sd_mutex_acquire(m_discovery_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) {
#ifdef MICROPY_VM_HOOK_LOOP
MICROPY_VM_HOOK_LOOP
diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c
index 912956369..43868f506 100644
--- a/ports/nrf/common-hal/busio/UART.c
+++ b/ports/nrf/common-hal/busio/UART.c
@@ -52,33 +52,6 @@
static uint32_t get_nrf_baud (uint32_t baudrate);
-static uint16_t ringbuf_count(ringbuf_t *r)
-{
- volatile int count = r->iput - r->iget;
- if ( count < 0 ) {
- count += r->size;
- }
-
- return (uint16_t) count;
-}
-
-static void ringbuf_clear(ringbuf_t *r)
-{
- r->iput = r->iget = 0;
-}
-
-// will overwrite old data
-static void ringbuf_put_n(ringbuf_t* r, uint8_t* buf, uint8_t bufsize)
-{
- for(uint8_t i=0; i < bufsize; i++) {
- if ( ringbuf_put(r, buf[i]) < 0 ) {
- // if full overwrite old data
- (void) ringbuf_get(r);
- ringbuf_put(r, buf[i]);
- }
- }
-}
-
static void uart_callback_irq (const nrfx_uarte_event_t * event, void * context) {
busio_uart_obj_t* self = (busio_uart_obj_t*) context;
@@ -145,16 +118,20 @@ void common_hal_busio_uart_construct (busio_uart_obj_t *self,
// Init buffer for rx
if ( rx != mp_const_none ) {
- self->rbuf.buf = (uint8_t *) gc_alloc(receiver_buffer_size, false, false);
+ // Initially allocate the UART's buffer in the long-lived part of the
+ // heap. UARTs are generally long-lived objects, but the "make long-
+ // lived" machinery is incapable of moving internal pointers like
+ // self->buffer, so do it manually. (However, as long as internal
+ // pointers like this are NOT moved, allocating the buffer
+ // in the long-lived pool is not strictly necessary)
+ // (This is a macro.)
+ ringbuf_alloc(&self->rbuf, receiver_buffer_size, true);
if ( !self->rbuf.buf ) {
nrfx_uarte_uninit(&self->uarte);
mp_raise_msg(&mp_type_MemoryError, translate("Failed to allocate RX buffer"));
}
- self->rbuf.size = receiver_buffer_size;
- self->rbuf.iget = self->rbuf.iput = 0;
-
self->rx_pin_number = rx->number;
claim_pin(rx);
}
diff --git a/ports/nrf/common-hal/displayio/ParallelBus.c b/ports/nrf/common-hal/displayio/ParallelBus.c
new file mode 100644
index 000000000..42231be52
--- /dev/null
+++ b/ports/nrf/common-hal/displayio/ParallelBus.c
@@ -0,0 +1,140 @@
+/*
+ * 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 <stdint.h>
+
+#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) {
+ 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);
+ 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;
+ 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
index 2a4bfc3d4..5c10d3d42 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.c b/ports/nrf/common-hal/microcontroller/Pin.c
index 02847e150..112654c7e 100644
--- a/ports/nrf/common-hal/microcontroller/Pin.c
+++ b/ports/nrf/common-hal/microcontroller/Pin.c
@@ -53,7 +53,7 @@ void reset_all_pins(void) {
}
for (uint32_t pin = 0; pin < NUMBER_OF_PINS; ++pin) {
- if (!(never_reset_pins[nrf_pin_port(pin)] & (1 << nrf_relative_pin_number(pin)))) {
+ if ((never_reset_pins[nrf_pin_port(pin)] & (1 << nrf_relative_pin_number(pin))) != 0) {
continue;
}
nrf_gpio_cfg_default(pin);
@@ -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/common-hal/microcontroller/Pin.h b/ports/nrf/common-hal/microcontroller/Pin.h
index 61be8bc35..735ed90cc 100644
--- a/ports/nrf/common-hal/microcontroller/Pin.h
+++ b/ports/nrf/common-hal/microcontroller/Pin.h
@@ -44,6 +44,7 @@ void reset_all_pins(void);
// need to store a full pointer.
void reset_pin_number(uint8_t pin);
void claim_pin(const mcu_pin_obj_t* pin);
+bool pin_number_is_free(uint8_t pin_number);
void never_reset_pin_number(uint8_t pin_number);
// Lower 5 bits of a pin number are the pin number in a port.
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h
index d38b14578..3ec37960b 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -163,6 +163,7 @@ extern const struct _mp_obj_module_t microcontroller_module;
extern const struct _mp_obj_module_t bitbangio_module;
extern const struct _mp_obj_module_t analogio_module;
extern const struct _mp_obj_module_t digitalio_module;
+extern const struct _mp_obj_module_t displayio_module;
extern const struct _mp_obj_module_t pulseio_module;
extern const struct _mp_obj_module_t busio_module;
extern const struct _mp_obj_module_t board_module;
@@ -195,6 +196,7 @@ extern const struct _mp_obj_module_t bleio_module;
{ MP_OBJ_NEW_QSTR (MP_QSTR_busio ), (mp_obj_t)&busio_module }, \
{ MP_OBJ_NEW_QSTR (MP_QSTR_analogio ), (mp_obj_t)&analogio_module }, \
{ MP_OBJ_NEW_QSTR (MP_QSTR_digitalio ), (mp_obj_t)&digitalio_module }, \
+ { MP_OBJ_NEW_QSTR (MP_QSTR_displayio ), (mp_obj_t)&displayio_module }, \
{ MP_OBJ_NEW_QSTR (MP_QSTR_pulseio ), (mp_obj_t)&pulseio_module }, \
{ MP_OBJ_NEW_QSTR (MP_QSTR_microcontroller ), (mp_obj_t)&microcontroller_module }, \
{ MP_OBJ_NEW_QSTR (MP_QSTR_neopixel_write ), (mp_obj_t)&neopixel_write_module }, \
@@ -235,5 +237,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/ports/nrf/sd_mutex.c b/ports/nrf/sd_mutex.c
new file mode 100644
index 000000000..7682ffa62
--- /dev/null
+++ b/ports/nrf/sd_mutex.c
@@ -0,0 +1,56 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Dan Halbert for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "py/mpconfig.h"
+#include "py/runtime.h"
+#include "nrf_soc.h"
+
+void sd_mutex_acquire_check(nrf_mutex_t* p_mutex) {
+ uint32_t err_code = sd_mutex_acquire(p_mutex);
+ if (err_code != NRF_SUCCESS) {
+ mp_raise_OSError_msg_varg(translate("Failed to acquire mutex, err 0x%04x"), err_code);
+ }
+}
+
+void sd_mutex_acquire_wait(nrf_mutex_t* p_mutex) {
+ while (sd_mutex_acquire(p_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) {
+#ifdef MICROPY_VM_HOOK_LOOP
+ MICROPY_VM_HOOK_LOOP
+#endif
+ }
+}
+
+void sd_mutex_acquire_wait_no_vm(nrf_mutex_t* p_mutex) {
+ while (sd_mutex_acquire(p_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) {
+ }
+}
+
+void sd_mutex_release_check(nrf_mutex_t* p_mutex) {
+ uint32_t err_code = sd_mutex_release(p_mutex);
+ if (err_code != NRF_SUCCESS) {
+ mp_raise_OSError_msg_varg(translate("Failed to release mutex, err 0x%04x"), err_code);
+ }
+}
diff --git a/ports/nrf/sd_mutex.h b/ports/nrf/sd_mutex.h
new file mode 100644
index 000000000..ca4691720
--- /dev/null
+++ b/ports/nrf/sd_mutex.h
@@ -0,0 +1,46 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Dan Halbert for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_NRF_SD_MUTEX_H
+#define MICROPY_INCLUDED_NRF_SD_MUTEX_H
+
+#include "nrf_soc.h"
+
+// Helpers for common usage of nrf_mutex.
+
+// Try to acquire a mutex right now. Raise exception if we can't get it.
+void sd_mutex_acquire_check(nrf_mutex_t* p_mutex);
+
+// Wait for a mutex to become available. Run VM background tasks while waiting.
+void sd_mutex_acquire_wait(nrf_mutex_t* p_mutex);
+
+// Wait for a mutex to become available.. Block VM while waiting.
+void sd_mutex_acquire_wait_no_vm(nrf_mutex_t* p_mutex);
+
+// Release a mutex, and raise exception on error.
+void sd_mutex_release_check(nrf_mutex_t* p_mutex);
+
+#endif // MICROPY_INCLUDED_NRF_SD_MUTEX_H
diff --git a/ports/unix/Makefile b/ports/unix/Makefile
index 8775ec11a..99b65ec1b 100644
--- a/ports/unix/Makefile
+++ b/ports/unix/Makefile
@@ -154,6 +154,14 @@ SRC_C = \
supervisor/shared/translate.c \
$(SRC_MOD)
+PY_EXTMOD_O_BASENAME += \
+ extmod/machine_mem.o \
+ extmod/machine_pinbase.o \
+ extmod/machine_signal.o \
+ extmod/machine_pulse.o \
+ extmod/machine_i2c.o \
+ extmod/machine_spi.o
+
LIB_SRC_C = $(addprefix lib/,\
$(LIB_SRC_C_EXTRA) \
timeutils/timeutils.c \
diff --git a/ports/unix/file.c b/ports/unix/file.c
index 98ac1b3cc..c0cf6dcc4 100644
--- a/ports/unix/file.c
+++ b/ports/unix/file.c
@@ -205,9 +205,9 @@ STATIC mp_obj_t fdfile_open(const mp_obj_type_t *type, mp_arg_val_t *args) {
return MP_OBJ_FROM_PTR(o);
}
-STATIC mp_obj_t fdfile_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t fdfile_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
mp_arg_val_t arg_vals[FILE_OPEN_NUM_ARGS];
- mp_arg_parse_all_kw_array(n_args, n_kw, args, FILE_OPEN_NUM_ARGS, file_open_args, arg_vals);
+ mp_arg_parse_all(n_args, args, kw_args, FILE_OPEN_NUM_ARGS, file_open_args, arg_vals);
return fdfile_open(type, arg_vals);
}
diff --git a/ports/unix/modffi.c b/ports/unix/modffi.c
index fcbcebc39..03dc9e4ec 100644
--- a/ports/unix/modffi.c
+++ b/ports/unix/modffi.c
@@ -304,9 +304,9 @@ STATIC mp_obj_t ffimod_addr(mp_obj_t self_in, mp_obj_t symname_in) {
}
MP_DEFINE_CONST_FUN_OBJ_2(ffimod_addr_obj, ffimod_addr);
-STATIC mp_obj_t ffimod_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t ffimod_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
(void)n_args;
- (void)n_kw;
+ (void)kw_args;
const char *fname = NULL;
if (args[0] != mp_const_none) {
@@ -481,7 +481,7 @@ STATIC const mp_obj_type_t opaque_type = {
*/
STATIC mp_obj_t mod_ffi_open(size_t n_args, const mp_obj_t *args) {
- return ffimod_make_new(&ffimod_type, n_args, 0, args);
+ return ffimod_make_new(&ffimod_type, n_args, args, NULL);
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_ffi_open_obj, 1, 2, mod_ffi_open);
diff --git a/ports/unix/modusocket.c b/ports/unix/modusocket.c
index 9b9869f5b..84e9298fd 100644
--- a/ports/unix/modusocket.c
+++ b/ports/unix/modusocket.c
@@ -325,9 +325,9 @@ STATIC mp_obj_t socket_makefile(size_t n_args, const mp_obj_t *args) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_makefile_obj, 1, 3, socket_makefile);
-STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type_in, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type_in, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
(void)type_in;
- (void)n_kw;
+ (void)kw_args;
int family = AF_INET;
int type = SOCK_STREAM;
diff --git a/py/binary.c b/py/binary.c
index ca851c936..9c3a49e8f 100644
--- a/py/binary.c
+++ b/py/binary.c
@@ -49,7 +49,7 @@ size_t mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) {
switch (struct_type) {
case '<': case '>':
switch (val_type) {
- case 'b': case 'B':
+ case 'b': case 'B': case 'x':
size = 1; break;
case 'h': case 'H':
size = 2; break;
@@ -79,7 +79,7 @@ size_t mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) {
// particular (or any) ABI.
switch (val_type) {
case BYTEARRAY_TYPECODE:
- case 'b': case 'B':
+ case 'b': case 'B': case 'x':
align = size = 1; break;
case 'h': case 'H':
align = alignof(short);
@@ -126,6 +126,7 @@ mp_obj_t mp_binary_get_val_array(char typecode, void *p, mp_uint_t index) {
break;
case BYTEARRAY_TYPECODE:
case 'B':
+ case 'x': // value will be discarded
val = ((unsigned char*)p)[index];
break;
case 'h':
@@ -364,6 +365,8 @@ void mp_binary_set_val_array_from_int(char typecode, void *p, mp_uint_t index, m
case 'B':
((unsigned char*)p)[index] = val;
break;
+ case 'x':
+ ((unsigned char*)p)[index] = 0;
case 'h':
((short*)p)[index] = val;
break;
diff --git a/py/modio.c b/py/modio.c
index 9b09de96e..d7c1a58a8 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);
}
@@ -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;
diff --git a/py/modstruct.c b/py/modstruct.c
index 3f1b2f8b8..a238d3935 100644
--- a/py/modstruct.c
+++ b/py/modstruct.c
@@ -97,7 +97,10 @@ STATIC size_t calc_size_items(const char *fmt, size_t *total_sz) {
total_cnt += 1;
size += cnt;
} else {
- total_cnt += cnt;
+ // Pad bytes are skipped and don't get included in the item count.
+ if (*fmt != 'x') {
+ total_cnt += cnt;
+ }
mp_uint_t align;
size_t sz = mp_binary_get_size(fmt_type, *fmt, &align);
while (cnt--) {
@@ -166,7 +169,10 @@ STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *args) {
} else {
while (cnt--) {
item = mp_binary_get_val(fmt_type, *fmt, &p);
- res->items[i++] = item;
+ // Pad bytes ('x') are just skipped.
+ if (*fmt != 'x') {
+ res->items[i++] = item;
+ }
}
}
fmt++;
@@ -204,7 +210,11 @@ STATIC void struct_pack_into_internal(mp_obj_t fmt_in, byte *p, size_t n_args, c
} else {
// If we run out of args then we just finish; CPython would raise struct.error
while (cnt-- && i < n_args) {
- mp_binary_set_val(fmt_type, *fmt, args[i++], &p);
+ mp_binary_set_val(fmt_type, *fmt, args[i], &p);
+ // Pad bytes don't have a corresponding argument.
+ if (*fmt != 'x') {
+ i++;
+ }
}
}
fmt++;
diff --git a/py/objdeque.c b/py/objdeque.c
index dd0141831..b2785b5b6 100644
--- a/py/objdeque.c
+++ b/py/objdeque.c
@@ -44,8 +44,8 @@ typedef struct _mp_obj_deque_t {
#define FLAG_CHECK_OVERFLOW 1
} mp_obj_deque_t;
-STATIC mp_obj_t deque_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 2, 3, false);
+STATIC mp_obj_t deque_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
+ mp_arg_check_num(n_args, kw_args, 2, 3, false);
/* Initialization from existing sequence is not supported, so an empty
tuple must be passed as such. */
diff --git a/py/objdict.c b/py/objdict.c
index f672ac039..683fcb748 100644
--- a/py/objdict.c
+++ b/py/objdict.c
@@ -91,7 +91,10 @@ STATIC mp_obj_t dict_make_new(const mp_obj_type_t *type, size_t n_args, const mp
}
#endif
if (n_args > 0 || kw_args != NULL) {
- mp_obj_t args2[2] = {dict_out, args[0]}; // args[0] is always valid, even if it's not a positional arg
+ mp_obj_t args2[2] = {dict_out, NULL}; // args[0] is always valid, even if it's not a positional arg
+ if (n_args > 0) {
+ args2[1] = args[0];
+ }
dict_update(n_args + 1, args2, kw_args); // dict_update will check that n_args + 1 == 1 or 2
}
return dict_out;
diff --git a/py/objfun.c b/py/objfun.c
index 2ada0b3f1..b8364815b 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -436,7 +436,7 @@ typedef mp_uint_t (*viper_fun_4_t)(mp_uint_t, mp_uint_t, mp_uint_t, mp_uint_t);
STATIC mp_obj_t fun_viper_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_obj_fun_viper_t *self = self_in;
- mp_arg_check_num(n_args, n_kw, self->n_args, self->n_args, false);
+ mp_arg_check_num_kw_array(n_args, n_kw, self->n_args, self->n_args, false);
void *fun = MICROPY_MAKE_POINTER_CALLABLE(self->fun_data);
diff --git a/py/objnamedtuple.c b/py/objnamedtuple.c
index 781a1871b..a044fe3ff 100644
--- a/py/objnamedtuple.c
+++ b/py/objnamedtuple.c
@@ -96,7 +96,10 @@ void namedtuple_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
mp_obj_t namedtuple_make_new(const mp_obj_type_t *type_in, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
const mp_obj_namedtuple_type_t *type = (const mp_obj_namedtuple_type_t*)type_in;
size_t num_fields = type->n_fields;
- size_t n_kw = kw_args->used;
+ size_t n_kw = 0;
+ if (kw_args != NULL) {
+ n_kw = kw_args->used;
+ }
if (n_args + n_kw != num_fields) {
if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
mp_arg_error_terse_mismatch();
diff --git a/py/ringbuf.h b/py/ringbuf.h
index c62e20e1d..5f82cc096 100644
--- a/py/ringbuf.h
+++ b/py/ringbuf.h
@@ -26,6 +26,8 @@
#ifndef MICROPY_INCLUDED_PY_RINGBUF_H
#define MICROPY_INCLUDED_PY_RINGBUF_H
+#include "py/gc.h"
+
#include <stdint.h>
typedef struct _ringbuf_t {
@@ -40,9 +42,9 @@ typedef struct _ringbuf_t {
// ringbuf_t buf = {buf_array, sizeof(buf_array)};
// Dynamic initialization. This creates root pointer!
-#define ringbuf_alloc(r, sz) \
+#define ringbuf_alloc(r, sz, long_lived) \
{ \
- (r)->buf = m_new(uint8_t, sz); \
+ (r)->buf = gc_alloc(sz, false, long_lived); \
(r)->size = sz; \
(r)->iget = (r)->iput = 0; \
}
@@ -71,4 +73,30 @@ static inline int ringbuf_put(ringbuf_t *r, uint8_t v) {
return 0;
}
+static inline uint16_t ringbuf_count(ringbuf_t *r)
+{
+ volatile int count = r->iput - r->iget;
+ if ( count < 0 ) {
+ count += r->size;
+ }
+
+ return (uint16_t) count;
+}
+
+static inline void ringbuf_clear(ringbuf_t *r)
+{
+ r->iput = r->iget = 0;
+}
+
+// will overwrite old data
+static inline void ringbuf_put_n(ringbuf_t* r, uint8_t* buf, uint8_t bufsize)
+{
+ for(uint8_t i=0; i < bufsize; i++) {
+ if ( ringbuf_put(r, buf[i]) < 0 ) {
+ // if full overwrite old data
+ (void) ringbuf_get(r);
+ ringbuf_put(r, buf[i]);
+ }
+ }
+}
#endif // MICROPY_INCLUDED_PY_RINGBUF_H
diff --git a/py/stream.c b/py/stream.c
index aca9b8460..9d8be445c 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -103,7 +103,7 @@ STATIC mp_obj_t stream_read_generic(size_t n_args, const mp_obj_t *args, byte fl
// CPython does a readall, but here we silently let negatives through,
// and they will cause a MemoryError.
mp_int_t sz;
- if (n_args == 1 || ((sz = mp_obj_get_int(args[1])) == -1)) {
+ if (n_args == 1 || args[1] == mp_const_none || ((sz = mp_obj_get_int(args[1])) == -1)) {
return stream_readall(args[0]);
}
diff --git a/shared-bindings/bleio/CharacteristicBuffer.c b/shared-bindings/bleio/CharacteristicBuffer.c
index 2bb4448c4..32629ca19 100644
--- a/shared-bindings/bleio/CharacteristicBuffer.c
+++ b/shared-bindings/bleio/CharacteristicBuffer.c
@@ -24,10 +24,21 @@
* THE SOFTWARE.
*/
+#include "py/mperrno.h"
+#include "py/ioctl.h"
#include "py/objproperty.h"
#include "py/runtime.h"
+#include "py/stream.h"
+
#include "shared-bindings/bleio/CharacteristicBuffer.h"
#include "shared-bindings/bleio/UUID.h"
+#include "shared-bindings/util.h"
+
+STATIC void raise_error_if_not_connected(bleio_characteristic_buffer_obj_t *self) {
+ if (!common_hal_bleio_characteristic_buffer_connected(self)) {
+ mp_raise_ValueError(translate("Not connected"));
+ }
+}
//| .. currentmodule:: bleio
//|
@@ -36,27 +47,34 @@
//|
//| Accumulates a Characteristic's incoming values in a FIFO buffer.
//|
-//| .. class:: CharacteristicBuffer(Characteristic, buffer_size=0)
+//| .. class:: CharacteristicBuffer(Characteristic, *, timeout=1, buffer_size=64)
//|
//| Create a new Characteristic object identified by the specified UUID.
//|
//| :param bleio.Characteristic characteristic: The characteristic to monitor
+//| :param int timeout: the timeout in seconds to wait for the first character and between subsequent characters.//|
//| :param int buffer_size: Size of ring buffer that stores incoming data coming from client.
//| Must be >= 1.
//|
STATIC mp_obj_t bleio_characteristic_buffer_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
- enum { ARG_characteristic, ARG_buffer_size, };
+ enum { ARG_characteristic, ARG_timeout, ARG_buffer_size, };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_characteristic, MP_ARG_REQUIRED | MP_ARG_OBJ },
- { MP_QSTR_buffer_size, MP_ARG_REQUIRED | MP_ARG_INT },
+ { MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NEW_SMALL_INT(1)} },
+ { MP_QSTR_buffer_size, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 64} },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
const mp_obj_t characteristic = args[ARG_characteristic].u_obj;
- const int buffer_size = args[ARG_buffer_size].u_int;
+ mp_float_t timeout = mp_obj_get_float(args[ARG_timeout].u_obj);
+ if (timeout < 0.0f) {
+ mp_raise_ValueError(translate("timeout must be >= 0.0"));
+ }
+
+ const int buffer_size = args[ARG_buffer_size].u_int;
if (buffer_size < 1) {
mp_raise_ValueError(translate("buffer_size must be >= 1"));
}
@@ -69,30 +87,117 @@ STATIC mp_obj_t bleio_characteristic_buffer_make_new(const mp_obj_type_t *type,
self->base.type = &bleio_characteristic_buffer_type;
self->characteristic = MP_OBJ_TO_PTR(characteristic);
- common_hal_bleio_characteristic_buffer_construct(self, self->characteristic, buffer_size);
+ common_hal_bleio_characteristic_buffer_construct(self, self->characteristic, timeout, buffer_size);
return MP_OBJ_FROM_PTR(self);
}
-
-//| .. method:: read()
+// These are standard stream methods. Code is in py/stream.c.
+//
+//| .. method:: read(nbytes=None)
+//|
+//| Read characters. If ``nbytes`` is specified then read at most that many
+//| bytes. Otherwise, read everything that arrives until the connection
+//| times out. Providing the number of bytes expected is highly recommended
+//| because it will be faster.
+//|
+//| :return: Data read
+//| :rtype: bytes or None
+//|
+//| .. method:: readinto(buf)
//|
-//| Read a single byte from the buffer. If no character is available, return None.
-STATIC mp_obj_t bleio_characteristic_buffer_read(mp_obj_t self_in) {
+//| Read bytes into the ``buf``. Read at most ``len(buf)`` bytes.
+//|
+//| :return: number of bytes read and stored into ``buf``
+//| :rtype: int or None (on a non-blocking error)
+//|
+//| .. method:: readline()
+//|
+//| Read a line, ending in a newline character.
+//|
+//| :return: the line read
+//| :rtype: int or None
+//|
+
+// These three methods are used by the shared stream methods.
+STATIC mp_uint_t bleio_characteristic_buffer_read(mp_obj_t self_in, void *buf_in, mp_uint_t size, int *errcode) {
bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ raise_error_if_deinited(common_hal_bleio_characteristic_buffer_deinited(self));
+ raise_error_if_not_connected(self);
+ byte *buf = buf_in;
- int byte = common_hal_bleio_characteristic_buffer_read(self);
- if (byte == -1) {
- return mp_const_none;
+ // make sure we want at least 1 char
+ if (size == 0) {
+ return 0;
}
- return MP_OBJ_NEW_SMALL_INT(byte);
+ return common_hal_bleio_characteristic_buffer_read(self, buf, size, errcode);
}
-STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_read_obj, bleio_characteristic_buffer_read);
+
+STATIC mp_uint_t bleio_characteristic_buffer_write(mp_obj_t self_in, const void *buf_in, mp_uint_t size, int *errcode) {
+ mp_raise_NotImplementedError(translate("CharacteristicBuffer writing not provided"));
+ return 0;
+}
+
+STATIC mp_uint_t bleio_characteristic_buffer_ioctl(mp_obj_t self_in, mp_uint_t request, mp_uint_t arg, int *errcode) {
+ bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ raise_error_if_deinited(common_hal_bleio_characteristic_buffer_deinited(self));
+ raise_error_if_not_connected(self);
+ if (!common_hal_bleio_characteristic_buffer_connected(self)) {
+ mp_raise_ValueError(translate("Not connected."));
+ }
+ mp_uint_t ret;
+ if (request == MP_IOCTL_POLL) {
+ mp_uint_t flags = arg;
+ ret = 0;
+ if ((flags & MP_IOCTL_POLL_RD) && common_hal_bleio_characteristic_buffer_rx_characters_available(self) > 0) {
+ ret |= MP_IOCTL_POLL_RD;
+ }
+// No writing provided.
+// if ((flags & MP_IOCTL_POLL_WR) && common_hal_busio_uart_ready_to_tx(self)) {
+// ret |= MP_IOCTL_POLL_WR;
+// }
+ } else {
+ *errcode = MP_EINVAL;
+ ret = MP_STREAM_ERROR;
+ }
+ return ret;
+}
+
+//| .. attribute:: in_waiting
+//|
+//| The number of bytes in the input buffer, available to be read
+//|
+STATIC mp_obj_t bleio_characteristic_buffer_obj_get_in_waiting(mp_obj_t self_in) {
+ bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ raise_error_if_deinited(common_hal_bleio_characteristic_buffer_deinited(self));
+ return MP_OBJ_NEW_SMALL_INT(common_hal_bleio_characteristic_buffer_rx_characters_available(self));
+}
+MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_get_in_waiting_obj, bleio_characteristic_buffer_obj_get_in_waiting);
+
+const mp_obj_property_t bleio_characteristic_buffer_in_waiting_obj = {
+ .base.type = &mp_type_property,
+ .proxy = {(mp_obj_t)&bleio_characteristic_buffer_get_in_waiting_obj,
+ (mp_obj_t)&mp_const_none_obj,
+ (mp_obj_t)&mp_const_none_obj},
+};
+
+//| .. method:: reset_input_buffer()
+//|
+//| Discard any unread characters in the input buffer.
+//|
+STATIC mp_obj_t bleio_characteristic_buffer_obj_reset_input_buffer(mp_obj_t self_in) {
+ bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ raise_error_if_deinited(common_hal_bleio_characteristic_buffer_deinited(self));
+ common_hal_bleio_characteristic_buffer_clear_rx_buffer(self);
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_reset_input_buffer_obj, bleio_characteristic_buffer_obj_reset_input_buffer);
//| .. method:: deinit()
//|
//| Disable permanently.
+//|
STATIC mp_obj_t bleio_characteristic_buffer_deinit(mp_obj_t self_in) {
bleio_characteristic_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_bleio_characteristic_buffer_deinit(self);
@@ -101,15 +206,39 @@ STATIC mp_obj_t bleio_characteristic_buffer_deinit(mp_obj_t self_in) {
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_deinit_obj, bleio_characteristic_buffer_deinit);
STATIC const mp_rom_map_elem_t bleio_characteristic_buffer_locals_dict_table[] = {
- { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&bleio_characteristic_buffer_read_obj) },
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&bleio_characteristic_buffer_deinit_obj) },
+
+ // Standard stream methods.
+ { MP_OBJ_NEW_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_stream_read_obj) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_readline), MP_ROM_PTR(&mp_stream_unbuffered_readline_obj)},
+ { MP_OBJ_NEW_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&mp_stream_readinto_obj) },
+ // CharacteristicBuffer is currently read-only.
+ // { MP_OBJ_NEW_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_reset_input_buffer), MP_ROM_PTR(&bleio_characteristic_buffer_reset_input_buffer_obj) },
+ // Properties
+ { MP_ROM_QSTR(MP_QSTR_in_waiting), MP_ROM_PTR(&bleio_characteristic_buffer_in_waiting_obj) },
+
};
STATIC MP_DEFINE_CONST_DICT(bleio_characteristic_buffer_locals_dict, bleio_characteristic_buffer_locals_dict_table);
+STATIC const mp_stream_p_t characteristic_buffer_stream_p = {
+ .read = bleio_characteristic_buffer_read,
+ .write = bleio_characteristic_buffer_write,
+ .ioctl = bleio_characteristic_buffer_ioctl,
+ .is_text = false,
+ // Match PySerial when possible, such as disallowing optional length argument for .readinto()
+ .pyserial_compatibility = true,
+};
+
+
const mp_obj_type_t bleio_characteristic_buffer_type = {
{ &mp_type_type },
.name = MP_QSTR_CharacteristicBuffer,
.make_new = bleio_characteristic_buffer_make_new,
+ .getiter = mp_identity_getiter,
+ .iternext = mp_stream_unbuffered_iter,
+ .protocol = &characteristic_buffer_stream_p,
.locals_dict = (mp_obj_dict_t*)&bleio_characteristic_buffer_locals_dict
};
diff --git a/shared-bindings/bleio/CharacteristicBuffer.h b/shared-bindings/bleio/CharacteristicBuffer.h
index c5d7580da..f25017c19 100644
--- a/shared-bindings/bleio/CharacteristicBuffer.h
+++ b/shared-bindings/bleio/CharacteristicBuffer.h
@@ -31,9 +31,12 @@
extern const mp_obj_type_t bleio_characteristic_buffer_type;
-extern void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic, size_t buffer_size);
-// Returns a uint8_t byte value, or -1 if no data is available.
-int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_t *self);
+extern void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic, mp_float_t timeout, size_t buffer_size);
+int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_t *self, uint8_t *data, size_t len, int *errcode);
+uint32_t common_hal_bleio_characteristic_buffer_rx_characters_available(bleio_characteristic_buffer_obj_t *self);
+void common_hal_bleio_characteristic_buffer_clear_rx_buffer(bleio_characteristic_buffer_obj_t *self);
+bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer_obj_t *self);
int common_hal_bleio_characteristic_buffer_deinit(bleio_characteristic_buffer_obj_t *self);
+bool common_hal_bleio_characteristic_buffer_connected(bleio_characteristic_buffer_obj_t *self);
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_CHARACTERISTICBUFFER_H
diff --git a/shared-bindings/bleio/UUID.c b/shared-bindings/bleio/UUID.c
index f2df9d095..8b868a1ae 100644
--- a/shared-bindings/bleio/UUID.c
+++ b/shared-bindings/bleio/UUID.c
@@ -70,20 +70,51 @@ STATIC mp_obj_t bleio_uuid_make_new(const mp_obj_type_t *type, size_t n_args, co
common_hal_bleio_uuid_construct(self, uuid16, NULL);
} else {
- mp_buffer_info_t bufinfo;
- if (!mp_get_buffer(value, &bufinfo, MP_BUFFER_READ)) {
- mp_raise_ValueError(translate("UUID value is not int or byte buffer"));
- }
+ if (MP_OBJ_IS_STR(value)) {
+ // 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
+ GET_STR_DATA_LEN(value, chars, len);
+ char hex[32];
+ // Validate length, hyphens, and hex digits.
+ bool good_uuid =
+ len == 36 && chars[8] == '-' && chars[13] == '-' && chars[18] == '-' && chars[23] == '-';
+ if (good_uuid) {
+ size_t hex_idx = 0;
+ for (int i = 0; i < len; i++) {
+ if (unichar_isxdigit(chars[i])) {
+ hex[hex_idx] = chars[i];
+ hex_idx++;
+ }
+ }
+ good_uuid = hex_idx == 32;
+ }
+ if (!good_uuid) {
+ mp_raise_ValueError(translate("UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"));
+ }
+
+ size_t hex_idx = 0;
+ for (int i = 15; i >= 0; i--) {
+ uuid128[i] = (unichar_xdigit_value(hex[hex_idx]) << 4) | unichar_xdigit_value(hex[hex_idx + 1]);
+ hex_idx += 2;
+ }
+ } else {
+ // Last possibility is that it's a buf.
+ mp_buffer_info_t bufinfo;
+ if (!mp_get_buffer(value, &bufinfo, MP_BUFFER_READ)) {
+ mp_raise_ValueError(translate("UUID value is not str, int or byte buffer"));
+ }
- if (bufinfo.len != 16) {
- mp_raise_ValueError(translate("Byte buffer must be 16 bytes."));
+ if (bufinfo.len != 16) {
+ mp_raise_ValueError(translate("Byte buffer must be 16 bytes."));
+ }
+
+ memcpy(uuid128, bufinfo.buf, 16);
}
- memcpy(uuid128, bufinfo.buf, 16);
+ // Str and bytes both get constructed the same way here.
uint32_t uuid16 = (uuid128[13] << 8) | uuid128[12];
uuid128[12] = 0;
uuid128[13] = 0;
- common_hal_bleio_uuid_construct(self, uuid16, bufinfo.buf);
+ common_hal_bleio_uuid_construct(self, uuid16, uuid128);
}
return MP_OBJ_FROM_PTR(self);
@@ -200,9 +231,32 @@ STATIC mp_obj_t bleio_uuid_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_
}
}
+void bleio_uuid_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
+ bleio_uuid_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ uint32_t size = common_hal_bleio_uuid_get_size(self);
+ if (size == 16) {
+ mp_printf(print, "UUID(0x%04x)", common_hal_bleio_uuid_get_uuid16(self));
+ } else {
+ uint8_t uuid128[16];
+ (void) common_hal_bleio_uuid_get_uuid128(self, uuid128);
+ mp_printf(print, "UUID('"
+ "%02x%02x%02x%02x-"
+ "%02x%02x-"
+ "%02x%02x-"
+ "%02x%02x-"
+ "%02x%02x%02x%02x%02x%02x')",
+ uuid128[15], uuid128[14], uuid128[13], uuid128[12],
+ uuid128[11], uuid128[10],
+ uuid128[9], uuid128[8],
+ uuid128[7], uuid128[6],
+ uuid128[5], uuid128[4], uuid128[3], uuid128[2], uuid128[1], uuid128[0]);
+ }
+}
+
const mp_obj_type_t bleio_uuid_type = {
{ &mp_type_type },
.name = MP_QSTR_UUID,
+ .print = bleio_uuid_print,
.make_new = bleio_uuid_make_new,
.unary_op = bleio_uuid_unary_op,
.binary_op = bleio_uuid_binary_op,
diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c
index cd0ca3f36..85bf498a4 100644
--- a/shared-bindings/busio/UART.c
+++ b/shared-bindings/busio/UART.c
@@ -62,7 +62,7 @@
//|
//| *New in CircuitPython 4.0:* ``timeout`` has incompatibly changed units from milliseconds to seconds.
//| The new upper limit on ``timeout`` is meant to catch mistaken use of milliseconds.
-
+//|
typedef struct {
mp_obj_base_t base;
} busio_uart_parity_obj_t;
@@ -172,7 +172,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_
//| Read bytes into the ``buf``. Read at most ``len(buf)`` bytes.
//|
//| :return: number of bytes read and stored into ``buf``
-//| :rtype: bytes or None
+//| :rtype: int or None (on a non-blocking error)
//|
//| *New in CircuitPython 4.0:* No length parameter is permitted.
diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c
new file mode 100644
index 000000000..d61732f6f
--- /dev/null
+++ b/shared-bindings/displayio/Display.c
@@ -0,0 +1,181 @@
+/*
+ * 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 <stdint.h>
+
+#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:`Display` -- Manage updating a display over a display bus
+//| ==========================================================================
+//|
+//| 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, 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 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 };
+ 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 | 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} },
+ { 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_buffer_info_t bufinfo;
+ mp_get_buffer_raise(args[ARG_init_sequence].u_obj, &bufinfo, MP_BUFFER_READ);
+
+ displayio_display_obj_t *self = NULL;
+ for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
+ if (displays[i].display.base.type == NULL ||
+ displays[i].display.base.type == &mp_type_NoneType) {
+ self = &displays[i].display;
+ break;
+ }
+ }
+ if (self == NULL) {
+ mp_raise_RuntimeError(translate("Too many displays"));
+ }
+ self->base.type = &displayio_display_type;
+ common_hal_displayio_display_construct(self,
+ 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);
+
+ return self;
+}
+
+//| .. method:: show(group)
+//|
+//| Switches to displaying the given group of layers.
+//|
+STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in) {
+ displayio_display_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ mp_obj_t native_layer = mp_instance_cast_to_native_base(group_in, &displayio_group_type);
+ if (native_layer == MP_OBJ_NULL) {
+ mp_raise_ValueError(translate("Must be a Group subclass."));
+ }
+ displayio_group_t* group = MP_OBJ_TO_PTR(native_layer);
+ common_hal_displayio_display_show(self, group);
+ return mp_const_none;
+}
+MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_show_obj, displayio_display_obj_show);
+
+//| .. method:: refresh_soon()
+//|
+//| Queues up a display refresh that happens in the background.
+//|
+STATIC mp_obj_t displayio_display_obj_refresh_soon(mp_obj_t self_in) {
+ displayio_display_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ common_hal_displayio_display_refresh_soon(self);
+ return mp_const_none;
+}
+MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_refresh_soon_obj, displayio_display_obj_refresh_soon);
+
+//| .. method:: wait_for_frame()
+//|
+//| Waits until the next frame has been transmitted to the display unless the wait count is
+//| behind the rendered frames. In that case, this will return immediately with the wait count.
+//|
+STATIC mp_obj_t displayio_display_obj_wait_for_frame(mp_obj_t self_in) {
+ displayio_display_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_display_wait_for_frame(self));
+}
+MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_wait_for_frame_obj, displayio_display_obj_wait_for_frame);
+
+
+STATIC const mp_rom_map_elem_t displayio_display_locals_dict_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&displayio_display_show_obj) },
+ { MP_ROM_QSTR(MP_QSTR_refresh_soon), MP_ROM_PTR(&displayio_display_refresh_soon_obj) },
+ { MP_ROM_QSTR(MP_QSTR_wait_for_frame), MP_ROM_PTR(&displayio_display_wait_for_frame_obj) },
+};
+STATIC MP_DEFINE_CONST_DICT(displayio_display_locals_dict, displayio_display_locals_dict_table);
+
+const mp_obj_type_t displayio_display_type = {
+ { &mp_type_type },
+ .name = MP_QSTR_Display,
+ .make_new = displayio_display_make_new,
+ .locals_dict = (mp_obj_dict_t*)&displayio_display_locals_dict,
+};
diff --git a/shared-bindings/displayio/Display.h b/shared-bindings/displayio/Display.h
new file mode 100644
index 000000000..4cec66058
--- /dev/null
+++ b/shared-bindings/displayio/Display.h
@@ -0,0 +1,59 @@
+/*
+ * This file is part of the Micro Python project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017, 2018 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_DISPLAY_H
+#define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_DISPLAY_H
+
+#include "common-hal/microcontroller/Pin.h"
+
+#include "shared-module/displayio/Display.h"
+#include "shared-module/displayio/Group.h"
+
+extern const mp_obj_type_t displayio_display_type;
+
+#define DELAY 0x80
+
+void common_hal_displayio_display_construct(displayio_display_obj_t* self,
+ mp_obj_t bus, uint16_t width, uint16_t height,
+ int16_t colstart, int16_t rowstart, uint16_t color_depth,
+ uint8_t set_column_command, uint8_t set_row_command, uint8_t write_ram_command,
+ uint8_t* init_sequence, uint16_t init_sequence_len);
+
+int32_t common_hal_displayio_display_wait_for_frame(displayio_display_obj_t* self);
+
+void common_hal_displayio_display_show(displayio_display_obj_t* self, displayio_group_t* root_group);
+
+void common_hal_displayio_display_refresh_soon(displayio_display_obj_t* self);
+
+void displayio_display_start_region_update(displayio_display_obj_t* self, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
+void displayio_display_finish_region_update(displayio_display_obj_t* self);
+bool displayio_display_frame_queued(displayio_display_obj_t* self);
+
+bool displayio_display_refresh_queued(displayio_display_obj_t* self);
+void displayio_display_finish_refresh(displayio_display_obj_t* self);
+bool displayio_display_send_pixels(displayio_display_obj_t* self, uint32_t* pixels, uint32_t length);
+
+#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_DISPLAY_H
diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c
index 80aa814df..dceb4fe69 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,54 @@
//|
//| .. 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.
//|
+//| :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) {
- 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 | 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)];
+ 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;
+ assert_pin_free(command);
+ assert_pin_free(chip_select);
+ 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 ||
+ displays[i].fourwire_bus.base.type == &mp_type_NoneType) {
+ self = &displays[i].fourwire_bus;
+ self->base.type = &displayio_fourwire_type;
+ break;
+ }
+ }
+ if (self == NULL) {
+ mp_raise_RuntimeError(translate("Too many display busses"));
+ }
+
+ common_hal_displayio_fourwire_construct(self,
+ MP_OBJ_TO_PTR(spi), command, chip_select, reset);
+ return self;
}
@@ -68,50 +109,8 @@ STATIC mp_obj_t displayio_fourwire_obj_send(size_t n_args, const mp_obj_t *pos_a
}
MP_DEFINE_CONST_FUN_OBJ_KW(displayio_fourwire_send_obj, 1, displayio_fourwire_obj_send);
-//| .. method:: show(group)
-//|
-//| Switches do displaying the given group of elements.
-//|
-STATIC mp_obj_t displayio_fourwire_obj_show(mp_obj_t self_in, mp_obj_t group_in) {
- displayio_fourwire_obj_t *self = MP_OBJ_TO_PTR(self_in);
- mp_obj_t native_layer = mp_instance_cast_to_native_base(group_in, &displayio_group_type);
- if (native_layer == MP_OBJ_NULL) {
- mp_raise_ValueError(translate("Must be a Group subclass."));
- }
- displayio_group_t* group = MP_OBJ_TO_PTR(native_layer);
- common_hal_displayio_fourwire_show(self, group);
- return mp_const_none;
-}
-MP_DEFINE_CONST_FUN_OBJ_2(displayio_fourwire_show_obj, displayio_fourwire_obj_show);
-
-//| .. method:: refresh_soon()
-//|
-//| Queues up a display refresh that happens in the background.
-//|
-STATIC mp_obj_t displayio_fourwire_obj_refresh_soon(mp_obj_t self_in) {
- displayio_fourwire_obj_t *self = MP_OBJ_TO_PTR(self_in);
- common_hal_displayio_fourwire_refresh_soon(self);
- return mp_const_none;
-}
-MP_DEFINE_CONST_FUN_OBJ_1(displayio_fourwire_refresh_soon_obj, displayio_fourwire_obj_refresh_soon);
-
-//| .. method:: wait_for_frame()
-//|
-//| Waits until the next frame has been transmitted to the display unless the wait count is
-//| behind the rendered frames. In that case, this will return immediately with the wait count.
-//|
-STATIC mp_obj_t displayio_fourwire_obj_wait_for_frame(mp_obj_t self_in) {
- displayio_fourwire_obj_t *self = MP_OBJ_TO_PTR(self_in);
- return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_fourwire_wait_for_frame(self));
-}
-MP_DEFINE_CONST_FUN_OBJ_1(displayio_fourwire_wait_for_frame_obj, displayio_fourwire_obj_wait_for_frame);
-
-
STATIC const mp_rom_map_elem_t displayio_fourwire_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&displayio_fourwire_send_obj) },
- { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&displayio_fourwire_show_obj) },
- { MP_ROM_QSTR(MP_QSTR_refresh_soon), MP_ROM_PTR(&displayio_fourwire_refresh_soon_obj) },
- { MP_ROM_QSTR(MP_QSTR_wait_for_frame), MP_ROM_PTR(&displayio_fourwire_wait_for_frame_obj) },
};
STATIC MP_DEFINE_CONST_DICT(displayio_fourwire_locals_dict, displayio_fourwire_locals_dict_table);
diff --git a/shared-bindings/displayio/FourWire.h b/shared-bindings/displayio/FourWire.h
index fc51f558d..b8b00372c 100644
--- a/shared-bindings/displayio/FourWire.h
+++ b/shared-bindings/displayio/FourWire.h
@@ -27,39 +27,24 @@
#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"
+#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);
+void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self);
-bool common_hal_displayio_fourwire_begin_transaction(displayio_fourwire_obj_t* self);
+bool common_hal_displayio_fourwire_begin_transaction(mp_obj_t self);
-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 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/OnDiskBitmap.c b/shared-bindings/displayio/OnDiskBitmap.c
index 46cb5913c..d6d3b9862 100644
--- a/shared-bindings/displayio/OnDiskBitmap.c
+++ b/shared-bindings/displayio/OnDiskBitmap.c
@@ -29,7 +29,9 @@
#include <stdint.h>
#include "py/runtime.h"
+#include "py/objproperty.h"
#include "supervisor/shared/translate.h"
+#include "shared-bindings/displayio/OnDiskBitmap.h"
//| .. currentmodule:: displayio
//|
@@ -92,7 +94,49 @@ STATIC mp_obj_t displayio_ondiskbitmap_make_new(const mp_obj_type_t *type, size_
return MP_OBJ_FROM_PTR(self);
}
+//| .. attribute:: width
+//|
+//| Width of the bitmap. (read only)
+//|
+STATIC mp_obj_t displayio_ondiskbitmap_obj_get_width(mp_obj_t self_in) {
+ displayio_ondiskbitmap_t *self = MP_OBJ_TO_PTR(self_in);
+
+ return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_ondiskbitmap_get_width(self));
+}
+
+MP_DEFINE_CONST_FUN_OBJ_1(displayio_ondiskbitmap_get_width_obj, displayio_ondiskbitmap_obj_get_width);
+
+const mp_obj_property_t displayio_ondiskbitmap_width_obj = {
+ .base.type = &mp_type_property,
+ .proxy = {(mp_obj_t)&displayio_ondiskbitmap_get_width_obj,
+ (mp_obj_t)&mp_const_none_obj,
+ (mp_obj_t)&mp_const_none_obj},
+
+};
+
+//| .. attribute:: height
+//|
+//| Height of the bitmap. (read only)
+//|
+STATIC mp_obj_t displayio_ondiskbitmap_obj_get_height(mp_obj_t self_in) {
+ displayio_ondiskbitmap_t *self = MP_OBJ_TO_PTR(self_in);
+
+ return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_ondiskbitmap_get_height(self));
+}
+
+MP_DEFINE_CONST_FUN_OBJ_1(displayio_ondiskbitmap_get_height_obj, displayio_ondiskbitmap_obj_get_height);
+
+const mp_obj_property_t displayio_ondiskbitmap_height_obj = {
+ .base.type = &mp_type_property,
+ .proxy = {(mp_obj_t)&displayio_ondiskbitmap_get_height_obj,
+ (mp_obj_t)&mp_const_none_obj,
+ (mp_obj_t)&mp_const_none_obj},
+
+};
+
STATIC const mp_rom_map_elem_t displayio_ondiskbitmap_locals_dict_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&displayio_ondiskbitmap_height_obj) },
+ { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&displayio_ondiskbitmap_width_obj) },
};
STATIC MP_DEFINE_CONST_DICT(displayio_ondiskbitmap_locals_dict, displayio_ondiskbitmap_locals_dict_table);
diff --git a/shared-bindings/displayio/OnDiskBitmap.h b/shared-bindings/displayio/OnDiskBitmap.h
index ab8b8dcd8..9a6c81f8f 100644
--- a/shared-bindings/displayio/OnDiskBitmap.h
+++ b/shared-bindings/displayio/OnDiskBitmap.h
@@ -37,4 +37,7 @@ void common_hal_displayio_ondiskbitmap_construct(displayio_ondiskbitmap_t *self,
uint32_t common_hal_displayio_ondiskbitmap_get_pixel(displayio_ondiskbitmap_t *bitmap,
int16_t x, int16_t y);
+uint16_t common_hal_displayio_ondiskbitmap_get_height(displayio_ondiskbitmap_t *self);
+
+uint16_t common_hal_displayio_ondiskbitmap_get_width(displayio_ondiskbitmap_t *self);
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO_ONDISKBITMAP_H
diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c
new file mode 100644
index 000000000..916c5f852
--- /dev/null
+++ b/shared-bindings/displayio/ParallelBus.c
@@ -0,0 +1,126 @@
+/*
+ * 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 <stdint.h>
+
+#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 "shared-module/displayio/__init__.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, write, read, reset)
+//|
+//| 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[] = {
+ { 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)];
+ 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;
+ 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 ||
+ displays[i].parallel_bus.base.type == &mp_type_NoneType) {
+ self = &displays[i].parallel_bus;
+ self->base.type = &displayio_parallelbus_type;
+ break;
+ }
+ }
+ if (self == NULL) {
+ mp_raise_RuntimeError(translate("Too many display busses"));
+ }
+
+ common_hal_displayio_parallelbus_construct(self, data0, command, chip_select, write, read, reset);
+ return self;
+}
+
+
+//| .. method:: send(command, data)
+//|
+//|
+STATIC mp_obj_t displayio_parallelbus_obj_send(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
+ mp_raise_NotImplementedError(translate("displayio is a work in progress"));
+
+ return mp_const_none;
+}
+MP_DEFINE_CONST_FUN_OBJ_KW(displayio_parallelbus_send_obj, 1, displayio_parallelbus_obj_send);
+
+STATIC const mp_rom_map_elem_t displayio_parallelbus_locals_dict_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&displayio_parallelbus_send_obj) },
+};
+STATIC MP_DEFINE_CONST_DICT(displayio_parallelbus_locals_dict, displayio_parallelbus_locals_dict_table);
+
+const mp_obj_type_t displayio_parallelbus_type = {
+ { &mp_type_type },
+ .name = MP_QSTR_ParallelBus,
+ .make_new = displayio_parallelbus_make_new,
+ .locals_dict = (mp_obj_dict_t*)&displayio_parallelbus_locals_dict,
+};
diff --git a/shared-bindings/displayio/ParallelBus.h b/shared-bindings/displayio/ParallelBus.h
new file mode 100644
index 000000000..c4cde5ff5
--- /dev/null
+++ b/shared-bindings/displayio/ParallelBus.h
@@ -0,0 +1,49 @@
+/*
+ * 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* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset);
+
+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);
+
+void common_hal_displayio_parallelbus_end_transaction(mp_obj_t self);
+
+#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELBUS_H
diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c
index d485d8095..6ed1218b2 100644
--- a/shared-bindings/displayio/__init__.c
+++ b/shared-bindings/displayio/__init__.c
@@ -32,10 +32,12 @@
#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"
#include "shared-bindings/displayio/Palette.h"
+#include "shared-bindings/displayio/ParallelBus.h"
#include "shared-bindings/displayio/Shape.h"
#include "shared-bindings/displayio/Sprite.h"
@@ -44,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.
//|
@@ -61,20 +60,36 @@
//|
//| Bitmap
//| ColorConverter
+//| Display
//| FourWire
//| Group
//| OnDiskBitmap
//| Palette
+//| ParallelBus
//| Shape
//| Sprite
//|
//| All libraries change hardware state but are never deinit
//|
+
+//| .. method:: release_displays()
+//|
+//| 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();
+ 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 +97,9 @@ 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) },
};
STATIC MP_DEFINE_CONST_DICT(displayio_module_globals, displayio_module_globals_table);
diff --git a/shared-bindings/displayio/__init__.h b/shared-bindings/displayio/__init__.h
index a6663bf57..427ddb47d 100644
--- a/shared-bindings/displayio/__init__.h
+++ b/shared-bindings/displayio/__init__.h
@@ -27,8 +27,6 @@
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H
#define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H
-#include "py/obj.h"
-
-// Nothing now.
+void common_hal_displayio_release_displays(void);
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H
diff --git a/shared-bindings/struct/__init__.c b/shared-bindings/struct/__init__.c
index 093597785..9240a15bb 100644
--- a/shared-bindings/struct/__init__.c
+++ b/shared-bindings/struct/__init__.c
@@ -51,7 +51,7 @@
//|
//| Supported size/byte order prefixes: *@*, *<*, *>*, *!*.
//|
-//| Supported format codes: *b*, *B*, *h*, *H*, *i*, *I*, *l*, *L*, *q*, *Q*,
+//| Supported format codes: *b*, *B*, *x*, *h*, *H*, *i*, *I*, *l*, *L*, *q*, *Q*,
//| *s*, *P*, *f*, *d* (the latter 2 depending on the floating-point support).
//|
@@ -74,7 +74,6 @@ MP_DEFINE_CONST_FUN_OBJ_1(struct_calcsize_obj, struct_calcsize);
//|
STATIC mp_obj_t struct_pack(size_t n_args, const mp_obj_t *args) {
- // TODO: "The arguments must match the values required by the format exactly."
mp_int_t size = MP_OBJ_SMALL_INT_VALUE(struct_calcsize(args[0]));
vstr_t vstr;
vstr_init_len(&vstr, size);
@@ -115,49 +114,67 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_pack_into_obj, 3, MP_OBJ_FUN_ARGS_MAX
//| .. function:: unpack(fmt, data)
//|
//| Unpack from the data according to the format string fmt. The return value
-//| is a tuple of the unpacked values.
+//| is a tuple of the unpacked values. The buffer size must match the size
+//| required by the format.
//|
-//| .. function:: unpack_from(fmt, data, offset)
+STATIC mp_obj_t struct_unpack(size_t n_args, const mp_obj_t *args) {
+ mp_buffer_info_t bufinfo;
+ mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ);
+ byte *p = bufinfo.buf;
+ byte *end_p = &p[bufinfo.len];
+
+ // true means check the size must be exactly right.
+ return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[0] , p, end_p, true));
+}
+MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_obj, 2, 3, struct_unpack);
+
+//| .. function:: unpack_from(fmt, data, offset=0)
//|
//| Unpack from the data starting at offset according to the format string fmt.
//| offset may be negative to count from the end of buffer. The return value is
-//| a tuple of the unpacked values.
+//| a tuple of the unpacked values. The buffer size must be at least as big
+//| as the size required by the form.
//|
-STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *args) {
- // unpack requires that the buffer be exactly the right size.
- // unpack_from requires that the buffer be "big enough".
- // Since we implement unpack and unpack_from using the same function
- // we relax the "exact" requirement, and only implement "big enough".
+STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
+ enum { ARG_format, ARG_buffer, ARG_offset };
+ static const mp_arg_t allowed_args[] = {
+ { MP_QSTR_format, MP_ARG_REQUIRED | MP_ARG_OBJ },
+ { MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ },
+ { MP_QSTR_offset, MP_ARG_INT, {.u_int = 0} },
+ };
+
+ mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
+ mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
+
mp_buffer_info_t bufinfo;
- mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ);
+ mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_READ);
byte *p = bufinfo.buf;
byte *end_p = &p[bufinfo.len];
- if (n_args > 2) {
- mp_int_t offset = mp_obj_get_int(args[2]);
- // offset arg provided
+ mp_int_t offset = args[ARG_offset].u_int;
+ if (offset < 0) {
+ // negative offsets are relative to the end of the buffer
+ offset = bufinfo.len + offset;
if (offset < 0) {
- // negative offsets are relative to the end of the buffer
- offset = bufinfo.len + offset;
- if (offset < 0) {
- mp_raise_RuntimeError(translate("buffer too small"));
- }
+ mp_raise_RuntimeError(translate("buffer too small"));
}
- p += offset;
}
+ p += offset;
- return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[0] , p, end_p));
+ // false means the size doesn't have to be exact. struct.unpack_from() only requires
+ // that be buffer be big enough.
+ return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[ARG_format].u_obj, p, end_p, false));
}
-MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_from_obj, 2, 3, struct_unpack_from);
+MP_DEFINE_CONST_FUN_OBJ_KW(struct_unpack_from_obj, 0, struct_unpack_from);
STATIC const mp_rom_map_elem_t mp_module_struct_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_struct) },
{ MP_ROM_QSTR(MP_QSTR_calcsize), MP_ROM_PTR(&struct_calcsize_obj) },
{ MP_ROM_QSTR(MP_QSTR_pack), MP_ROM_PTR(&struct_pack_obj) },
{ MP_ROM_QSTR(MP_QSTR_pack_into), MP_ROM_PTR(&struct_pack_into_obj) },
- { MP_ROM_QSTR(MP_QSTR_unpack), MP_ROM_PTR(&struct_unpack_from_obj) },
+ { MP_ROM_QSTR(MP_QSTR_unpack), MP_ROM_PTR(&struct_unpack_obj) },
{ MP_ROM_QSTR(MP_QSTR_unpack_from), MP_ROM_PTR(&struct_unpack_from_obj) },
};
diff --git a/shared-bindings/struct/__init__.h b/shared-bindings/struct/__init__.h
index c4e867aaa..a7e72b11c 100644
--- a/shared-bindings/struct/__init__.h
+++ b/shared-bindings/struct/__init__.h
@@ -29,6 +29,6 @@
void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args);
mp_uint_t shared_modules_struct_calcsize(mp_obj_t fmt_in);
-mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p);
+mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p, bool exact_size);
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_RANDOM___INIT___H
diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c
new file mode 100644
index 000000000..f75f0392f
--- /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 <stdint.h>
+
+#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 - 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 + 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);
+}
+
+void displayio_display_finish_region_update(displayio_display_obj_t* self) {
+ self->end_transaction(self->bus);
+}
+
+bool displayio_display_frame_queued(displayio_display_obj_t* self) {
+ // Refresh at ~30 fps.
+ return (ticks_ms - self->last_refresh) > 32;
+}
+
+bool displayio_display_refresh_queued(displayio_display_obj_t* self) {
+ return self->refresh || (self->current_group != NULL && displayio_group_needs_refresh(self->current_group));
+}
+
+void displayio_display_finish_refresh(displayio_display_obj_t* self) {
+ if (self->current_group != NULL) {
+ displayio_group_finish_refresh(self->current_group);
+ }
+ self->refresh = false;
+ self->last_refresh = ticks_ms;
+}
+
+bool displayio_display_send_pixels(displayio_display_obj_t* self, uint32_t* pixels, uint32_t length) {
+ self->send(self->bus, false, (uint8_t*) pixels, length * 4);
+ return true;
+}
diff --git a/shared-module/displayio/Display.h b/shared-module/displayio/Display.h
new file mode 100644
index 000000000..1f1355d31
--- /dev/null
+++ b/shared-module/displayio/Display.h
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_SHARED_MODULE_DISPLAYIO_DISPLAY_H
+#define MICROPY_INCLUDED_SHARED_MODULE_DISPLAYIO_DISPLAY_H
+
+#include "shared-module/displayio/Group.h"
+
+typedef bool (*display_bus_begin_transaction)(mp_obj_t bus);
+typedef void (*display_bus_send)(mp_obj_t bus, bool command, uint8_t *data, uint32_t data_length);
+typedef void (*display_bus_end_transaction)(mp_obj_t bus);
+
+typedef struct {
+ mp_obj_base_t base;
+ mp_obj_t bus;
+ uint16_t width;
+ uint16_t height;
+ uint16_t color_depth;
+ uint8_t set_column_command;
+ uint8_t set_row_command;
+ uint8_t write_ram_command;
+ displayio_group_t *current_group;
+ bool refresh;
+ uint64_t last_refresh;
+ int16_t colstart;
+ int16_t rowstart;
+ display_bus_begin_transaction begin_transaction;
+ display_bus_send send;
+ display_bus_end_transaction end_transaction;
+} displayio_display_obj_t;
+
+#endif // MICROPY_INCLUDED_SHARED_MODULE_DISPLAYIO_DISPLAY_H
diff --git a/shared-module/displayio/FourWire.c b/shared-module/displayio/FourWire.c
new file mode 100644
index 000000000..9da5c0701
--- /dev/null
+++ b/shared-module/displayio/FourWire.c
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "shared-bindings/displayio/FourWire.h"
+
+#include <stdint.h>
+
+#include "shared-bindings/busio/SPI.h"
+#include "shared-bindings/digitalio/DigitalInOut.h"
+
+#include "tick.h"
+
+void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self,
+ busio_spi_obj_t* spi, const mcu_pin_obj_t* command,
+ const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset) {
+
+ self->bus = spi;
+ common_hal_busio_spi_never_reset(self->bus);
+
+ common_hal_digitalio_digitalinout_construct(&self->command, command);
+ common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL);
+ common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select);
+ common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL);
+
+ 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);
+}
+
+void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self) {
+ if (self->bus == &self->inline_bus) {
+ common_hal_busio_spi_deinit(self->bus);
+ }
+
+ reset_pin_number(self->command.pin->number);
+ reset_pin_number(self->chip_select.pin->number);
+ reset_pin_number(self->reset.pin->number);
+}
+
+bool common_hal_displayio_fourwire_begin_transaction(mp_obj_t obj) {
+ displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj);
+ if (!common_hal_busio_spi_try_lock(self->bus)) {
+ return false;
+ }
+ // TODO(tannewt): Stop hardcoding SPI frequency, polarity and phase.
+ common_hal_busio_spi_configure(self->bus, 12000000, 0, 0, 8);
+ common_hal_digitalio_digitalinout_set_value(&self->chip_select, false);
+ return true;
+}
+
+void common_hal_displayio_fourwire_send(mp_obj_t obj, bool command, uint8_t *data, uint32_t data_length) {
+ displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj);
+ common_hal_digitalio_digitalinout_set_value(&self->command, !command);
+ common_hal_busio_spi_write(self->bus, data, data_length);
+}
+
+void common_hal_displayio_fourwire_end_transaction(mp_obj_t obj) {
+ displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj);
+ common_hal_digitalio_digitalinout_set_value(&self->chip_select, true);
+ common_hal_busio_spi_unlock(self->bus);
+}
diff --git a/ports/atmel-samd/common-hal/displayio/FourWire.h b/shared-module/displayio/FourWire.h
index b99717670..234bcf794 100644
--- a/ports/atmel-samd/common-hal/displayio/FourWire.h
+++ b/shared-module/displayio/FourWire.h
@@ -33,21 +33,11 @@
typedef struct {
mp_obj_base_t base;
- busio_spi_obj_t bus;
+ 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;
- 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/shared-module/displayio/Group.c b/shared-module/displayio/Group.c
index b9923128a..255349d7c 100644
--- a/shared-module/displayio/Group.c
+++ b/shared-module/displayio/Group.c
@@ -67,11 +67,14 @@ void displayio_group_construct(displayio_group_t* self, mp_obj_t* child_array, u
self->children = child_array;
self->max_size = max_size;
self->needs_refresh = false;
+ self->scale = 1;
}
bool displayio_group_get_pixel(displayio_group_t *self, int16_t x, int16_t y, uint16_t* pixel) {
x -= self->x;
y -= self->y;
+ x /= self->scale;
+ y /= self->scale;
for (int32_t i = self->size - 1; i >= 0 ; i--) {
mp_obj_t layer = self->children[i];
if (MP_OBJ_IS_TYPE(layer, &displayio_sprite_type)) {
diff --git a/shared-module/displayio/Group.h b/shared-module/displayio/Group.h
index 272f3114c..60f573ff6 100644
--- a/shared-module/displayio/Group.h
+++ b/shared-module/displayio/Group.h
@@ -36,6 +36,7 @@ typedef struct {
mp_obj_base_t base;
int16_t x;
int16_t y;
+ uint16_t scale;
uint16_t size;
uint16_t max_size;
mp_obj_t* children;
diff --git a/shared-module/displayio/OnDiskBitmap.c b/shared-module/displayio/OnDiskBitmap.c
index 6e4a4c6f0..aa2ca3e10 100644
--- a/shared-module/displayio/OnDiskBitmap.c
+++ b/shared-module/displayio/OnDiskBitmap.c
@@ -91,3 +91,11 @@ uint32_t common_hal_displayio_ondiskbitmap_get_pixel(displayio_ondiskbitmap_t *s
}
return 0;
}
+
+uint16_t common_hal_displayio_ondiskbitmap_get_height(displayio_ondiskbitmap_t *self) {
+ return self->height;
+}
+
+uint16_t common_hal_displayio_ondiskbitmap_get_width(displayio_ondiskbitmap_t *self) {
+ return self->width;
+}
diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c
index f1a00db9f..59a5cf398 100644
--- a/shared-module/displayio/__init__.c
+++ b/shared-module/displayio/__init__.c
@@ -1,91 +1,188 @@
-#include "shared-bindings/displayio/FourWire.h"
-extern displayio_fourwire_obj_t board_display_obj;
+#include <string.h>
+#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/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"
+#include "supervisor/usb.h"
-void finish_region_update(displayio_fourwire_obj_t* display) {
- // TODO delegate between different display types
- displayio_fourwire_finish_region_update(display);
-}
+primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT];
-void finish_refresh(displayio_fourwire_obj_t* display) {
- // TODO delegate between different display types
- displayio_fourwire_finish_refresh(display);
-}
+void displayio_refresh_displays(void) {
+ for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
+ if (displays[i].display.base.type == NULL || displays[i].display.base.type == &mp_type_NoneType) {
+ continue;
+ }
+ displayio_display_obj_t* display = &displays[i].display;
-bool frame_queued(displayio_fourwire_obj_t* display) {
- // TODO delegate between different display types
- return displayio_fourwire_frame_queued(display);
-}
+ if (!displayio_display_frame_queued(display)) {
+ return;
+ }
+ if (displayio_display_refresh_queued(display)) {
+ // 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;
-bool refresh_queued(displayio_fourwire_obj_t* display) {
- // TODO delegate between different display types
- return displayio_fourwire_refresh_queued(display);
-}
+ if (display->current_group != NULL) {
+ displayio_group_get_pixel(display->current_group, x, y, pixel);
+ }
-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);
+ 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;
+ }
+ // TODO(tannewt): Make refresh displays faster so we don't starve other
+ // background tasks.
+ usb_background();
+ 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);
+ }
}
-void displayio_refresh_display(void) {
- displayio_fourwire_obj_t* display = &board_display_obj;
+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
+};
- if (!frame_queued(display)) {
- return;
- }
- if (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];
- 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]);
- // }
+displayio_bitmap_t blinka_bitmap = {
+ .base = {.type = &displayio_bitmap_type },
+ .width = 16,
+ .height = 16,
+ .data = blinka_bitmap_data,
+ .stride = 2,
+ .bits_per_value = 4,
+ .x_shift = 3,
+ .x_mask = 0x7,
+ .bitmask = 0xf
+};
+uint32_t blinka_transparency[1] = {0x80000000};
- PORT->Group[1].OUTTGL.reg = 1 << 22;
+// TODO(tannewt): Fix these colors
+uint32_t blinka_colors[8] = {0x91780000, 0x879FFC98, 0xffff0000, 0x0000f501,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000};
- index += 1;
- // The buffer is full, send it.
- if (index >= buffer_size) {
- if (!send_pixels(display, buffer, buffer_size / 2)) {
- finish_region_update(display);
- return;
- }
- index = 0;
+displayio_palette_t blinka_palette = {
+ .base = {.type = &displayio_palette_type },
+ .opaque = blinka_transparency,
+ .colors = blinka_colors,
+ .color_count = 16,
+ .needs_refresh = false
+};
+
+displayio_sprite_t blinka_sprite = {
+ .base = {.type = &displayio_sprite_type },
+ .bitmap = &blinka_bitmap,
+ .pixel_shader = &blinka_palette,
+ .x = 0,
+ .y = 0,
+ .width = 16,
+ .height = 16,
+ .needs_refresh = false
+};
+
+mp_obj_t splash_children[1] = {
+ &blinka_sprite,
+};
+
+displayio_group_t splash = {
+ .base = {.type = &displayio_group_type },
+ .x = 0,
+ .y = 0,
+ .scale = 2,
+ .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;
+ 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.
+ 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 && !send_pixels(display, buffer, index * 2)) {
- finish_region_update(display);
- return;
+ }
+
+ for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
+ if (displays[i].display.base.type == NULL) {
+ continue;
}
- finish_region_update(display);
+ displayio_display_obj_t* display = &displays[i].display;
+ common_hal_displayio_display_show(display, &splash);
+ }
+}
+
+void common_hal_displayio_release_displays(void) {
+ for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
+ mp_const_obj_t bus_type = displays[i].fourwire_bus.base.type;
+ if (bus_type == NULL) {
+ continue;
+ } else if (bus_type == &displayio_fourwire_type) {
+ common_hal_displayio_fourwire_deinit(&displays[i].fourwire_bus);
+ } else if (bus_type == &displayio_parallelbus_type) {
+ common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus);
+ }
+ displays[i].fourwire_bus.base.type = &mp_type_NoneType;
+ }
+ for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
+ displays[i].display.base.type = &mp_type_NoneType;
}
- finish_refresh(display);
}
diff --git a/shared-module/displayio/__init__.h b/shared-module/displayio/__init__.h
index 556af430d..fdabd4ec4 100644
--- a/shared-module/displayio/__init__.h
+++ b/shared-module/displayio/__init__.h
@@ -27,6 +27,21 @@
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H
#define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H
-void displayio_refresh_display(void);
+#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;
+ };
+ displayio_display_obj_t display;
+} primary_display_t;
+
+extern primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT];
+
+void displayio_refresh_displays(void);
+void reset_displays(void);
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H
diff --git a/shared-module/struct/__init__.c b/shared-module/struct/__init__.c
index 78c04f07b..245dbbda9 100644
--- a/shared-module/struct/__init__.c
+++ b/shared-module/struct/__init__.c
@@ -71,45 +71,6 @@ mp_uint_t get_fmt_num(const char **p) {
return val;
}
-void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args) {
- const char *fmt = mp_obj_str_get_str(fmt_in);
- char fmt_type = get_fmt_type(&fmt);
-
- size_t i;
- for (i = 0; i < n_args;) {
- mp_uint_t sz = 1;
- if (*fmt == '\0') {
- // more arguments given than used by format string; CPython raises struct.error here
- mp_raise_RuntimeError(translate("too many arguments provided with the given format"));
- }
- struct_validate_format(*fmt);
-
- if (unichar_isdigit(*fmt)) {
- sz = get_fmt_num(&fmt);
- }
- if (p + sz > end_p) {
- mp_raise_RuntimeError(translate("buffer too small"));
- }
-
- if (*fmt == 's') {
- mp_buffer_info_t bufinfo;
- mp_get_buffer_raise(args[i++], &bufinfo, MP_BUFFER_READ);
- mp_uint_t to_copy = sz;
- if (bufinfo.len < to_copy) {
- to_copy = bufinfo.len;
- }
- memcpy(p, bufinfo.buf, to_copy);
- memset(p + to_copy, 0, sz - to_copy);
- p += sz;
- } else {
- while (sz--) {
- mp_binary_set_val(fmt_type, *fmt, args[i++], &p);
- }
- }
- fmt++;
- }
-}
-
mp_uint_t calcsize_items(const char *fmt) {
mp_uint_t cnt = 0;
while (*fmt) {
@@ -120,7 +81,10 @@ mp_uint_t calcsize_items(const char *fmt) {
num = 1;
}
}
- cnt += num;
+ // Pad bytes are skipped and don't get included in the item count.
+ if (*fmt != 'x') {
+ cnt += num;
+ }
fmt++;
}
return cnt;
@@ -155,14 +119,71 @@ mp_uint_t shared_modules_struct_calcsize(mp_obj_t fmt_in) {
return size;
}
+void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args) {
+ const char *fmt = mp_obj_str_get_str(fmt_in);
+ char fmt_type = get_fmt_type(&fmt);
+ const mp_uint_t total_sz = shared_modules_struct_calcsize(fmt_in);
+
+ if (p + total_sz > end_p) {
+ mp_raise_RuntimeError(translate("buffer too small"));
+ }
+
+ size_t i;
+ for (i = 0; i < n_args;) {
+ mp_uint_t sz = 1;
+ if (*fmt == '\0') {
+ // more arguments given than used by format string; CPython raises struct.error here
+ mp_raise_RuntimeError(translate("too many arguments provided with the given format"));
+ }
+ struct_validate_format(*fmt);
+
+ if (unichar_isdigit(*fmt)) {
+ sz = get_fmt_num(&fmt);
+ }
+
+ if (*fmt == 's') {
+ mp_buffer_info_t bufinfo;
+ mp_get_buffer_raise(args[i++], &bufinfo, MP_BUFFER_READ);
+ mp_uint_t to_copy = sz;
+ if (bufinfo.len < to_copy) {
+ to_copy = bufinfo.len;
+ }
+ memcpy(p, bufinfo.buf, to_copy);
+ memset(p + to_copy, 0, sz - to_copy);
+ p += sz;
+ } else {
+ while (sz--) {
+ mp_binary_set_val(fmt_type, *fmt, args[i], &p);
+ // Pad bytes don't have a corresponding argument.
+ if (*fmt != 'x') {
+ i++;
+ }
+ }
+ }
+ fmt++;
+ }
+}
-mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p) {
+mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p, bool exact_size) {
const char *fmt = mp_obj_str_get_str(fmt_in);
char fmt_type = get_fmt_type(&fmt);
- mp_uint_t num_items = calcsize_items(fmt);
+ const mp_uint_t num_items = calcsize_items(fmt);
+ const mp_uint_t total_sz = shared_modules_struct_calcsize(fmt_in);
mp_obj_tuple_t *res = MP_OBJ_TO_PTR(mp_obj_new_tuple(num_items, NULL));
+ // If exact_size, make sure the buffer is exactly the right size.
+ // Otherwise just make sure it's big enough.
+ if (exact_size) {
+ if (p + total_sz != end_p) {
+ mp_raise_RuntimeError(translate("buffer size must match format"));
+ }
+ } else {
+ if (p + total_sz > end_p) {
+ mp_raise_RuntimeError(translate("buffer too small"));
+ }
+ }
+
for (uint i = 0; i < num_items;) {
mp_uint_t sz = 1;
@@ -171,9 +192,6 @@ mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byt
if (unichar_isdigit(*fmt)) {
sz = get_fmt_num(&fmt);
}
- if (p + sz > end_p) {
- mp_raise_RuntimeError(translate("buffer too small"));
- }
mp_obj_t item;
if (*fmt == 's') {
item = mp_obj_new_bytes(p, sz);
@@ -182,7 +200,10 @@ mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byt
} else {
while (sz--) {
item = mp_binary_get_val(fmt_type, *fmt, &p);
- res->items[i++] = item;
+ // Pad bytes are not stored.
+ if (*fmt != 'x') {
+ res->items[i++] = item;
+ }
}
}
fmt++;
diff --git a/ports/atmel-samd/board_busses.c b/supervisor/shared/board_busses.c
index 424c9cc08..8a1c7bf86 100644
--- a/ports/atmel-samd/board_busses.c
+++ b/supervisor/shared/board_busses.c
@@ -31,9 +31,12 @@
#include "shared-bindings/microcontroller/Pin.h"
#include "supervisor/shared/translate.h"
#include "mpconfigboard.h"
-#include "samd/pins.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))
@@ -41,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);
@@ -55,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;
}
@@ -63,11 +66,14 @@ STATIC 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;
-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 +87,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;
}
@@ -91,7 +97,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 +114,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 +127,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/ports/atmel-samd/board_busses.h b/supervisor/shared/board_busses.h
index 08dd1aae1..0ccb3ba6a 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);
-extern mp_obj_fun_builtin_fixed_t board_i2c_obj;
+#include "py/obj.h"
-void board_spi(void);
-extern mp_obj_fun_builtin_fixed_t board_spi_obj;
+mp_obj_t board_i2c(void);
+MP_DECLARE_CONST_FUN_OBJ_0(board_i2c_obj);
-void board_uart(void);
-extern mp_obj_fun_builtin_fixed_t board_uart_obj;
+mp_obj_t board_spi(void);
+MP_DECLARE_CONST_FUN_OBJ_0(board_spi_obj);
+
+mp_obj_t board_uart(void);
+MP_DECLARE_CONST_FUN_OBJ_0(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 191af7b25..0bbfd9141 100644
--- a/supervisor/supervisor.mk
+++ b/supervisor/supervisor.mk
@@ -2,6 +2,7 @@ SRC_SUPERVISOR = \
main.c \
supervisor/port.c \
supervisor/shared/autoreload.c \
+ supervisor/shared/board_busses.c \
supervisor/shared/filesystem.c \
supervisor/shared/flash.c \
supervisor/shared/micropython.c \