Merge pull request #1 from adafruit/master

test pull
This commit is contained in:
Pascal Deneaux 2019-01-23 13:23:33 +01:00 committed by GitHub
commit f7277b5b9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
156 changed files with 6437 additions and 2634 deletions

View File

@ -78,12 +78,12 @@ Not all of these functions and types are turned on in all CircuitPython ports, f
.. classmethod:: from_bytes(bytes, byteorder)
In CircuitPython, `byteorder` parameter must be positional (this is
In CircuitPython, ``byteorder`` parameter must be positional (this is
compatible with CPython).
.. method:: to_bytes(size, byteorder)
In CircuitPython, `byteorder` parameter must be positional (this is
In CircuitPython, ``byteorder`` parameter must be positional (this is
compatible with CPython).
.. function:: isinstance()

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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));

View File

@ -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);

View File

@ -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;

View File

@ -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]);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);
}

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-10 21:32-0500\n"
"POT-Creation-Date: 2019-01-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 ""
@ -1964,7 +1963,7 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'"
msgstr ""
#: py/runtime.c:1123 py/runtime.c:1197
#: py/runtime.c:1123 py/runtime.c:1197 shared-bindings/_pixelbuf/__init__.c:106
msgid "no such attribute"
msgstr ""
@ -2043,6 +2042,54 @@ msgstr ""
msgid "byte code not implemented"
msgstr ""
#: 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:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:392
msgid "Only slices with step=1 (aka None) are supported"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:394
msgid "Range out of bounds"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
#: 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:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
#: shared-bindings/_pixelbuf/__init__.c:112
msgid "readonly attribute"
msgstr ""
#: shared-bindings/_stage/Layer.c:71
msgid "graphic must be 2048 bytes long"
msgstr ""
@ -2067,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 ""
@ -2105,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 ""
@ -2201,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 ""
@ -2222,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 ""
@ -2273,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 ""
@ -2289,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 ""
@ -2339,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 ""
@ -2389,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 ""
@ -2493,6 +2583,11 @@ msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c:69
#, c-format
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
msgid "Couldn't allocate first buffer"
msgstr ""
@ -2577,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 ""
@ -2599,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 ""
@ -2607,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."
@ -2624,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 "
@ -2685,16 +2819,14 @@ 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"
#~ msgid "Invalid UUID parameter"
#~ msgstr "Parameter UUID tidak valid"
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n"
#~ msgid ""
#~ "enough power for the whole circuit and press reset (after ejecting "
#~ "CIRCUITPY).\n"
@ -2702,7 +2834,13 @@ msgstr ""
#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut "
#~ "CIRCUITPY).\n"
#~ msgid ""
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n"
#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n"
#~ msgid "Invalid UUID parameter"
#~ msgstr "Parameter UUID tidak valid"
#, fuzzy
#~ msgid "unpack requires a buffer of %d bytes"
#~ msgstr "Gagal untuk megalokasikan buffer RX dari %d byte"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-10 21:32-0500\n"
"POT-Creation-Date: 2019-01-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 ""
@ -1931,7 +1930,7 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'"
msgstr ""
#: py/runtime.c:1123 py/runtime.c:1197
#: py/runtime.c:1123 py/runtime.c:1197 shared-bindings/_pixelbuf/__init__.c:106
msgid "no such attribute"
msgstr ""
@ -2010,6 +2009,54 @@ msgstr ""
msgid "byte code not implemented"
msgstr ""
#: 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:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:392
msgid "Only slices with step=1 (aka None) are supported"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:394
msgid "Range out of bounds"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
#: 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:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
#: shared-bindings/_pixelbuf/__init__.c:112
msgid "readonly attribute"
msgstr ""
#: shared-bindings/_stage/Layer.c:71
msgid "graphic must be 2048 bytes long"
msgstr ""
@ -2034,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 ""
@ -2072,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 ""
@ -2167,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 ""
@ -2187,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:79
#: shared-bindings/bleio/UUID.c:103
msgid "UUID value is not str, int or byte buffer"
msgstr ""
#: 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 ""
@ -2237,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 ""
@ -2253,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 ""
@ -2303,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 ""
@ -2353,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 ""
@ -2457,6 +2545,11 @@ msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c:69
#, c-format
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
msgid "Couldn't allocate first buffer"
msgstr ""
@ -2541,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 ""
@ -2563,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 ""
@ -2571,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."
@ -2588,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 ""

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-10 21:31-0500\n"
"POT-Creation-Date: 2019-01-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 ""
@ -1931,7 +1930,7 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'"
msgstr ""
#: py/runtime.c:1123 py/runtime.c:1197
#: py/runtime.c:1123 py/runtime.c:1197 shared-bindings/_pixelbuf/__init__.c:106
msgid "no such attribute"
msgstr ""
@ -2010,6 +2009,54 @@ msgstr ""
msgid "byte code not implemented"
msgstr ""
#: 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:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:392
msgid "Only slices with step=1 (aka None) are supported"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:394
msgid "Range out of bounds"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
#: 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:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
#: shared-bindings/_pixelbuf/__init__.c:112
msgid "readonly attribute"
msgstr ""
#: shared-bindings/_stage/Layer.c:71
msgid "graphic must be 2048 bytes long"
msgstr ""
@ -2034,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 ""
@ -2072,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 ""
@ -2167,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 ""
@ -2187,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:79
#: shared-bindings/bleio/UUID.c:103
msgid "UUID value is not str, int or byte buffer"
msgstr ""
#: 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 ""
@ -2237,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 ""
@ -2253,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 ""
@ -2303,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 ""
@ -2353,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 ""
@ -2457,6 +2545,11 @@ msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c:69
#, c-format
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
msgid "Couldn't allocate first buffer"
msgstr ""
@ -2541,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 ""
@ -2563,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 ""
@ -2571,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."
@ -2588,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 ""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-10 21:32-0500\n"
"POT-Creation-Date: 2019-01-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 ""
@ -1949,7 +1948,7 @@ msgstr "argumento tem tipo errado"
msgid "argument should be a '%q' not a '%q'"
msgstr ""
#: py/runtime.c:1123 py/runtime.c:1197
#: py/runtime.c:1123 py/runtime.c:1197 shared-bindings/_pixelbuf/__init__.c:106
msgid "no such attribute"
msgstr ""
@ -2028,6 +2027,55 @@ msgstr ""
msgid "byte code not implemented"
msgstr ""
#: 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:104
#, c-format
msgid "Can not use dotstar with %s"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:116
msgid "rawbuf is not the same size as buf"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:121
#, c-format
msgid "buf is too small. need %d bytes"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:127
msgid "write_args must be a list, tuple, or None"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:392
msgid "Only slices with step=1 (aka None) are supported"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:394
msgid "Range out of bounds"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c:403
msgid "tuple/list required on RHS"
msgstr ""
#: 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:442
msgid "Pixel beyond bounds of buffer"
msgstr ""
#: shared-bindings/_pixelbuf/__init__.c:112
#, fuzzy
msgid "readonly attribute"
msgstr "atributo ilegível"
#: shared-bindings/_stage/Layer.c:71
msgid "graphic must be 2048 bytes long"
msgstr ""
@ -2052,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 ""
@ -2090,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 ""
@ -2191,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 ""
@ -2212,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 ""
@ -2263,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"
@ -2279,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 ""
@ -2329,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 ""
@ -2379,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"
@ -2484,6 +2577,11 @@ msgid ""
msgstr ""
"Objeto foi desinicializado e não pode ser mais usaado. Crie um novo objeto."
#: shared-module/_pixelbuf/PixelBuf.c:69
#, c-format
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
msgid "Couldn't allocate first buffer"
msgstr "Não pôde alocar primeiro buffer"
@ -2568,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"
@ -2590,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."
@ -2598,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."
@ -2615,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"
@ -2670,23 +2807,24 @@ msgid ""
"exit safe mode.\n"
msgstr ""
#~ msgid "Can not add Characteristic."
#~ msgstr "Não é possível adicionar Característica."
#~ 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 "Cannot set PPCP parameters."
#~ msgstr "Não é possível definir parâmetros PPCP."
#~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "Pode codificar o UUID no pacote de anúncios."
#~ msgid "Invalid Service type"
#~ msgstr "Tipo de serviço inválido"
#, fuzzy
#~ msgid "unpack requires a buffer of %d bytes"
#~ msgstr "Falha ao alocar buffer RX de %d bytes"
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Não é possível aplicar parâmetros GAP."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
#~ msgid "Can not add Characteristic."
#~ msgstr "Não é possível adicionar Característica."
#~ msgid "Baud rate too high for this SPI peripheral"
#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI"
@ -2694,8 +2832,11 @@ msgstr ""
#~ msgid "Can not apply device name in the stack."
#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
#~ msgid "Invalid UUID parameter"
#~ msgstr "Parâmetro UUID inválido"
#~ msgid "Invalid Service type"
#~ msgstr "Tipo de serviço inválido"
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Não é possível aplicar parâmetros GAP."

10
main.c
View File

@ -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();

View File

@ -191,6 +191,10 @@ LDFLAGS += -mthumb -mcpu=cortex-m4
BOOTLOADER_SIZE := 0x4000
endif
ifdef EXCLUDE_PIXELBUF
CFLAGS += -DEXCLUDE_PIXELBUF
endif
SRC_ASF := \
gcc/gcc/startup_$(CHIP_FAMILY).c \
gcc/system_$(CHIP_FAMILY).c \
@ -238,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 \
@ -306,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 \
@ -379,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 \
@ -420,6 +425,11 @@ ifneq ($(CHIP_VARIANT),SAMR21G18A)
audioio/WaveFile.c
endif
ifndef EXCLUDE_PIXELBUF
SRC_SHARED_MODULE += _pixelbuf/__init__.c \
_pixelbuf/PixelBuf.c
endif
# The smallest SAMD51 packages don't have I2S. Everything else does.
ifneq ($(CHIP_VARIANT),SAMD51G18A)
ifneq ($(CHIP_VARIANT),SAMD51G19A)

View File

@ -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

View File

@ -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) },

View File

@ -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) },

View File

@ -9,3 +9,5 @@ LONGINT_IMPL = NONE
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21
EXCLUDE_PIXELBUF = 1

View File

@ -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) },

View File

@ -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);

View File

@ -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) },

View File

@ -46,3 +46,5 @@
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1
#define CIRCUITPY_DISPLAYIO (0)

View File

@ -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) },

View File

@ -49,3 +49,5 @@
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1
#define CIRCUITPY_DISPLAYIO (0)

View File

@ -9,6 +9,8 @@ EXTERNAL_FLASH_DEVICE_COUNT = 2
EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C"
# Turn off longints for Crickit build to make room for additional frozen libs.
LONGINT_IMPL = NONE
# Disable pixelbuf to save room
EXCLUDE_PIXELBUF = 1
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

View File

@ -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) },

View File

@ -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

View File

@ -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

View File

@ -9,3 +9,5 @@ LONGINT_IMPL = NONE
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21
EXCLUDE_PIXELBUF = 1

View File

@ -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) },

View File

@ -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) },

View File

@ -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) },

View File

@ -32,3 +32,5 @@
#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_UART_BUS_TX (&pin_PA10)
#define CIRCUITPY_DISPLAYIO (0)

View File

@ -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) },

View File

@ -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) },

View File

@ -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) },

View File

@ -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) },

View File

@ -43,3 +43,4 @@
#define IGNORE_PIN_PA25 1
#define CIRCUITPY_I2CSLAVE
#define CIRCUITPY_DISPLAYIO (1)

View File

@ -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) },

View File

@ -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) },

View File

@ -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

View File

@ -46,3 +46,5 @@
#define IGNORE_PIN_PA25 1
#define CIRCUITPY_I2CSLAVE
#define CIRCUITPY_DISPLAYIO (1)
#define CIRCUITPY_DISPLAY_LIMIT (3)

View File

@ -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) },

View File

@ -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);
}

View File

@ -9,6 +9,9 @@ EXTERNAL_FLASH_DEVICE_COUNT = 2
EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C"
LONGINT_IMPL = MPZ
# Disable pixelbuf to save room
EXCLUDE_PIXELBUF = 1
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

View File

@ -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);

View File

@ -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) },

View File

@ -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

View File

@ -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) },

View File

@ -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) },

View File

@ -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) },

View File

@ -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

View File

@ -16,3 +16,5 @@ CFLAGS_INLINE_LIMIT = 45
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IRRemote
EXCLUDE_PIXELBUF = 1

View File

@ -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) },

View File

@ -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);
}

View File

@ -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)

View File

@ -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);

View File

@ -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) },

View File

@ -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

View File

@ -9,3 +9,5 @@ LONGINT_IMPL = NONE
CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21
EXCLUDE_PIXELBUF = 1

View File

@ -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) },

View File

@ -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) },

View File

@ -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) },

View File

@ -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;
@ -65,12 +76,6 @@ void reset_sercoms(void) {
if (sercom_instances[i] == MICROPY_HW_APA102_SERCOM) {
continue;
}
#endif
#ifdef CIRCUITPY_DISPLAYIO
// TODO(tannewt): Make this dynamic.
if (sercom_instances[i] == board_display_obj.bus.spi_desc.dev.prvt) {
continue;
}
#endif
// SWRST is same for all modes of SERCOMs.
sercom_instances[i]->SPI.CTRLA.bit.SWRST = 1;
@ -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);

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -241,6 +241,9 @@ extern const struct _mp_obj_module_t usb_midi_module;
extern const struct _mp_obj_module_t network_module;
extern const struct _mp_obj_module_t socket_module;
extern const struct _mp_obj_module_t wiznet_module;
#ifndef EXCLUDE_PIXELBUF
extern const struct _mp_obj_module_t pixelbuf_module;
#endif
// Internal flash size dependent settings.
#if BOARD_FLASH_SIZE > 192000
@ -280,10 +283,14 @@ extern const struct _mp_obj_module_t wiznet_module;
#define I2CSLAVE_MODULE
#endif
#ifdef CIRCUITPY_DISPLAYIO
#if !defined(CIRCUITPY_DISPLAYIO) || CIRCUITPY_DISPLAYIO
#define CIRCUITPY_DISPLAYIO (1)
#define CIRCUITPY_DISPLAY_LIMIT (3)
#define DISPLAYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_displayio), (mp_obj_t)&displayio_module },
#else
#define DISPLAYIO_MODULE
#define CIRCUITPY_DISPLAYIO (0)
#define CIRCUITPY_DISPLAY_LIMIT (0)
#define DISPLAYIO_MODULE
#endif
#if MICROPY_PY_NETWORK
@ -308,6 +315,11 @@ extern const struct _mp_obj_module_t wiznet_module;
#define JSON_MODULE
#endif
#ifndef EXCLUDE_PIXELBUF
#define PIXELBUF_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__pixelbuf),(mp_obj_t)&pixelbuf_module }
#else
#define PIXELBUF_MODULE
#endif
#ifndef EXTRA_BUILTIN_MODULES
#define EXTRA_BUILTIN_MODULES \
@ -321,7 +333,8 @@ extern const struct _mp_obj_module_t wiznet_module;
WIZNET_MODULE \
JSON_MODULE \
{ MP_OBJ_NEW_QSTR(MP_QSTR_rotaryio), (mp_obj_t)&rotaryio_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_gamepad),(mp_obj_t)&gamepad_module }
{ MP_OBJ_NEW_QSTR(MP_QSTR_gamepad),(mp_obj_t)&gamepad_module }, \
PIXELBUF_MODULE
#endif
#define EXPRESS_BOARD
@ -336,6 +349,7 @@ extern const struct _mp_obj_module_t wiznet_module;
#define MICROPY_PY_BUILTINS_COMPLEX (0)
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (0)
#define CIRCUITPY_DISPLAY_LIMIT (0)
#endif
// Disabled for now.

View File

@ -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

View File

@ -148,6 +148,11 @@ SRC_SHARED_MODULE = \
os/__init__.c \
random/__init__.c \
struct/__init__.c
ifndef EXCLUDE_PIXELBUF
SRC_SHARED_MODULE += _pixelbuf/__init__.c \
_pixelbuf/PixelBuf.c
endif
SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) \
$(addprefix shared-module/, $(SRC_SHARED_MODULE))
@ -216,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

View File

@ -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,24 @@ SRC_SHARED_MODULE = \
bitbangio/OneWire.c \
bitbangio/SPI.c \
busio/OneWire.c \
displayio/__init__.c \
displayio/Bitmap.c \
displayio/ColorConverter.c \
displayio/Display.c \
displayio/FourWire.c \
displayio/Group.c \
displayio/OnDiskBitmap.c \
displayio/Palette.c \
displayio/Shape.c \
displayio/Sprite.c \
storage/__init__.c
ifndef EXCLUDE_PIXELBUF
SRC_SHARED_MODULE += _pixelbuf/__init__.c \
_pixelbuf/PixelBuf.c
endif
# uheap/__init__.c \
ustack/__init__.c

View File

@ -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();
}

View File

@ -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);

View File

@ -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);

View File

@ -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) },

View File

@ -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) },

View File

@ -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) },

View File

@ -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) },

View File

@ -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) },

View File

@ -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) },

View File

@ -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) },

View File

@ -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

View File

@ -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) {

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}

View File

@ -0,0 +1,45 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H
#define MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H
#include "common-hal/digitalio/DigitalInOut.h"
typedef struct {
mp_obj_base_t base;
uint8_t* bus;
digitalio_digitalinout_obj_t command;
digitalio_digitalinout_obj_t chip_select;
digitalio_digitalinout_obj_t reset;
digitalio_digitalinout_obj_t write;
digitalio_digitalinout_obj_t read;
uint8_t data0_pin;
NRF_GPIO_Type* write_group;
uint32_t write_mask;
} displayio_parallelbus_obj_t;
#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H

Some files were not shown because too many files have changed in this diff Show More