From abf15125fff9029404d82eb9066db77212dabed2 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sat, 1 Jul 2023 11:50:24 -0500 Subject: [PATCH 01/36] adding skip_self_index argument to bitmap.blit() --- shared-bindings/displayio/Bitmap.c | 24 ++++++++++++++++++++---- shared-bindings/displayio/Bitmap.h | 2 +- shared-module/displayio/Bitmap.c | 16 +++++++++++++--- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c index 5b939c5892..9ff8050eab 100644 --- a/shared-bindings/displayio/Bitmap.c +++ b/shared-bindings/displayio/Bitmap.c @@ -196,7 +196,8 @@ STATIC mp_obj_t bitmap_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t val //| y1: int, //| x2: int, //| y2: int, -//| skip_index: int +//| skip_index: int, +//| skip_self_index: int //| ) -> None: //| """Inserts the source_bitmap region defined by rectangular boundaries //| (x1,y1) and (x2,y2) into the bitmap at the specified (x,y) location. @@ -211,10 +212,12 @@ STATIC mp_obj_t bitmap_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t val //| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be copied from the source bitmap //| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be copied from the source bitmap //| :param int skip_index: bitmap palette index in the source that will not be copied, -//| set to None to copy all pixels""" +//| set to None to copy all pixels +//| :param int skip_self_index: bitmap palette index in the self bitmap that will not get overwritten +//| by the pixels from the source""" //| ... STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum {ARG_x, ARG_y, ARG_source, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_skip_index}; + enum {ARG_x, ARG_y, ARG_source, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_skip_index, ARG_skip_self_index}; static const mp_arg_t allowed_args[] = { {MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT, {.u_obj = MP_OBJ_NULL} }, {MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT, {.u_obj = MP_OBJ_NULL} }, @@ -224,6 +227,7 @@ STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_arg {MP_QSTR_x2, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, // None convert to source->width {MP_QSTR_y2, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, // None convert to source->height {MP_QSTR_skip_index, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + {MP_QSTR_skip_self_index, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -283,7 +287,19 @@ STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_arg skip_index_none = false; } - common_hal_displayio_bitmap_blit(self, x, y, source, x1, y1, x2, y2, skip_index, skip_index_none); + uint32_t skip_self_index; + bool skip_self_index_none; // flag whether skip_self_value was None + + if (args[ARG_skip_self_index].u_obj == mp_const_none) { + skip_self_index = 0; + skip_self_index_none = true; + } else { + skip_self_index = mp_obj_get_int(args[ARG_skip_self_index].u_obj); + skip_self_index_none = false; + } + + common_hal_displayio_bitmap_blit(self, x, y, source, x1, y1, x2, y2, skip_index, skip_index_none, skip_self_index, + skip_self_index_none); return mp_const_none; } diff --git a/shared-bindings/displayio/Bitmap.h b/shared-bindings/displayio/Bitmap.h index b35f4eadbc..8f52cb8f62 100644 --- a/shared-bindings/displayio/Bitmap.h +++ b/shared-bindings/displayio/Bitmap.h @@ -44,7 +44,7 @@ uint32_t common_hal_displayio_bitmap_get_bits_per_value(displayio_bitmap_t *self void common_hal_displayio_bitmap_set_pixel(displayio_bitmap_t *bitmap, int16_t x, int16_t y, uint32_t value); void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16_t y, displayio_bitmap_t *source, int16_t x1, int16_t y1, int16_t x2, int16_t y2, - uint32_t skip_index, bool skip_index_none); + uint32_t skip_index, bool skip_index_none, uint32_t skip_self_index, bool skip_self_index_none); uint32_t common_hal_displayio_bitmap_get_pixel(displayio_bitmap_t *bitmap, int16_t x, int16_t y); void common_hal_displayio_bitmap_fill(displayio_bitmap_t *bitmap, uint32_t value); int common_hal_displayio_bitmap_get_buffer(displayio_bitmap_t *self, mp_buffer_info_t *bufinfo, mp_uint_t flags); diff --git a/shared-module/displayio/Bitmap.c b/shared-module/displayio/Bitmap.c index c9212f6a85..f8b8170395 100644 --- a/shared-module/displayio/Bitmap.c +++ b/shared-module/displayio/Bitmap.c @@ -175,7 +175,8 @@ void displayio_bitmap_write_pixel(displayio_bitmap_t *self, int16_t x, int16_t y } void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16_t y, displayio_bitmap_t *source, - int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t skip_index, bool skip_index_none) { + int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t skip_index, bool skip_index_none, uint32_t skip_self_index, + bool skip_self_index_none) { if (self->read_only) { mp_raise_RuntimeError(translate("Read-only")); } @@ -222,8 +223,17 @@ void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16 if ((yd_index >= 0) && (yd_index < self->height)) { uint32_t value = common_hal_displayio_bitmap_get_pixel(source, xs_index, ys_index); - if ((skip_index_none) || (value != skip_index)) { // write if skip_value_none is True - displayio_bitmap_write_pixel(self, xd_index, yd_index, value); + if (skip_self_index_none) { // if skip_self_index is none, then only check source skip + if ((skip_index_none) || (value != skip_index)) { // write if skip_value_none is True + displayio_bitmap_write_pixel(self, xd_index, yd_index, value); + } + } else { // check dest_value index against skip_self_index and skip if they match + uint32_t dest_value = common_hal_displayio_bitmap_get_pixel(self, xd_index, yd_index); + if (dest_value != skip_self_index) { + if ((skip_index_none) || (value != skip_index)) { // write if skip_value_none is True + displayio_bitmap_write_pixel(self, xd_index, yd_index, value); + } + } } } } From 96d3e662b3c77804ddcd2193085aed0ec4cb9465 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 2 Jul 2023 14:35:40 -0500 Subject: [PATCH 02/36] refactor bitmap.blit into bitmaptools --- shared-bindings/bitmaptools/__init__.c | 127 +++++++++++++++++++++++++ shared-bindings/bitmaptools/__init__.h | 4 + shared-bindings/displayio/Bitmap.c | 120 ----------------------- shared-bindings/displayio/Bitmap.h | 3 - shared-module/bitmaptools/__init__.c | 67 +++++++++++++ shared-module/displayio/Bitmap.c | 67 ------------- 6 files changed, 198 insertions(+), 190 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index d0aea33ef9..6d0680626d 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -949,6 +949,132 @@ STATIC mp_obj_t bitmaptools_obj_draw_circle(size_t n_args, const mp_obj_t *pos_a MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_circle_obj, 0, bitmaptools_obj_draw_circle); +//| def blit( +//| dest_bitmap: Bitmap, +//| source_bitmap: Bitmap, +//| x: int, +//| y: int, +//| *, +//| x1: int, +//| y1: int, +//| x2: int, +//| y2: int, +//| skip_index: int, +//| skip_dest_index: int +//| ) -> None: +//| """Inserts the source_bitmap region defined by rectangular boundaries +//| (x1,y1) and (x2,y2) into the bitmap at the specified (x,y) location. +//| +//| :param bitmap dest_bitmap: Destination bitmap that the area will be copied into. +//| :param bitmap source_bitmap: Source bitmap that contains the graphical region to be copied +//| :param int x: Horizontal pixel location in bitmap where source_bitmap upper-left +//| corner will be placed +//| :param int y: Vertical pixel location in bitmap where source_bitmap upper-left +//| corner will be placed +//| :param int x1: Minimum x-value for rectangular bounding box to be copied from the source bitmap +//| :param int y1: Minimum y-value for rectangular bounding box to be copied from the source bitmap +//| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be copied from the source bitmap +//| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be copied from the source bitmap +//| :param int skip_index: bitmap palette index in the source that will not be copied, +//| set to None to copy all pixels +//| :param int skip_dest_index: bitmap palette index in the destination bitmap that will not get overwritten +//| by the pixels from the source""" +//| ... +//| +STATIC mp_obj_t bitmaptools_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum {ARG_destination, ARG_source, ARG_x, ARG_y, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_skip_index, ARG_skip_dest_index}; + static const mp_arg_t allowed_args[] = { + {MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, + {MP_QSTR_source_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, + {MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT, {.u_obj = MP_OBJ_NULL} }, + {MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT, {.u_obj = MP_OBJ_NULL} }, + {MP_QSTR_x1, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, + {MP_QSTR_y1, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, + {MP_QSTR_x2, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, // None convert to source->width + {MP_QSTR_y2, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, // None convert to source->height + {MP_QSTR_skip_index, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, + {MP_QSTR_skip_dest_index, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + // mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + // displayio_bitmap_t *self = MP_OBJ_TO_PTR(pos_args[0]); + displayio_bitmap_t *destination = mp_arg_validate_type(args[ARG_destination].u_obj, &displayio_bitmap_type, MP_QSTR_dest_bitmap); + // check_for_deinit(destination); + + // Check x,y are within self (target) bitmap boundary + int16_t x = mp_arg_validate_int_range(args[ARG_x].u_int, 0, MAX(0, destination->width - 1), MP_QSTR_x); + int16_t y = mp_arg_validate_int_range(args[ARG_y].u_int, 0, MAX(0, destination->height - 1), MP_QSTR_y); + + + displayio_bitmap_t *source = mp_arg_validate_type(args[ARG_source].u_obj, &displayio_bitmap_type, MP_QSTR_source_bitmap); + + + // ensure that the target bitmap (self) has at least as many `bits_per_value` as the source + if (destination->bits_per_value < source->bits_per_value) { + mp_raise_ValueError(translate("source palette too large")); + } + + // Check x1,y1,x2,y2 are within source bitmap boundary + int16_t x1 = mp_arg_validate_int_range(args[ARG_x1].u_int, 0, MAX(0, source->width - 1), MP_QSTR_x1); + int16_t y1 = mp_arg_validate_int_range(args[ARG_y1].u_int, 0, MAX(0, source->height - 1), MP_QSTR_y1); + int16_t x2, y2; + // if x2 or y2 is None, then set as the maximum size of the source bitmap + if (args[ARG_x2].u_obj == mp_const_none) { + x2 = source->width; + } else { + x2 = mp_arg_validate_int_range(mp_obj_get_int(args[ARG_x2].u_obj), 0, source->width, MP_QSTR_x2); + } + // int16_t y2; + if (args[ARG_y2].u_obj == mp_const_none) { + y2 = source->height; + } else { + y2 = mp_arg_validate_int_range(mp_obj_get_int(args[ARG_y2].u_obj), 0, source->height, MP_QSTR_y2); + } + + // Ensure x1 < x2 and y1 < y2 + if (x1 > x2) { + int16_t temp = x2; + x2 = x1; + x1 = temp; + } + if (y1 > y2) { + int16_t temp = y2; + y2 = y1; + y1 = temp; + } + + uint32_t skip_index; + bool skip_index_none; // flag whether skip_value was None + + if (args[ARG_skip_index].u_obj == mp_const_none) { + skip_index = 0; + skip_index_none = true; + } else { + skip_index = mp_obj_get_int(args[ARG_skip_index].u_obj); + skip_index_none = false; + } + + uint32_t skip_dest_index; + bool skip_dest_index_none; // flag whether skip_self_value was None + + if (args[ARG_skip_dest_index].u_obj == mp_const_none) { + skip_dest_index = 0; + skip_dest_index_none = true; + } else { + skip_dest_index = mp_obj_get_int(args[ARG_skip_dest_index].u_obj); + skip_dest_index_none = false; + } + + common_hal_bitmaptools_blit(destination, source, x, y, x1, y1, x2, y2, skip_index, skip_index_none, skip_dest_index, + skip_dest_index_none); + + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_blit_obj, 1, bitmaptools_obj_blit); + + STATIC const mp_rom_map_elem_t bitmaptools_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bitmaptools) }, { MP_ROM_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&bitmaptools_readinto_obj) }, @@ -960,6 +1086,7 @@ STATIC const mp_rom_map_elem_t bitmaptools_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_line), MP_ROM_PTR(&bitmaptools_draw_line_obj) }, { MP_ROM_QSTR(MP_QSTR_draw_polygon), MP_ROM_PTR(&bitmaptools_draw_polygon_obj) }, { MP_ROM_QSTR(MP_QSTR_draw_circle), MP_ROM_PTR(&bitmaptools_draw_circle_obj) }, + { MP_ROM_QSTR(MP_QSTR_blit), MP_ROM_PTR(&bitmaptools_blit_obj) }, { MP_ROM_QSTR(MP_QSTR_dither), MP_ROM_PTR(&bitmaptools_dither_obj) }, { MP_ROM_QSTR(MP_QSTR_DitherAlgorithm), MP_ROM_PTR(&bitmaptools_dither_algorithm_type) }, }; diff --git a/shared-bindings/bitmaptools/__init__.h b/shared-bindings/bitmaptools/__init__.h index 21fb1b50ab..456d2fcdfb 100644 --- a/shared-bindings/bitmaptools/__init__.h +++ b/shared-bindings/bitmaptools/__init__.h @@ -69,6 +69,10 @@ void common_hal_bitmaptools_draw_circle(displayio_bitmap_t *destination, int16_t radius, uint32_t value); +void common_hal_bitmaptools_blit(displayio_bitmap_t *destination, displayio_bitmap_t *source, int16_t x, int16_t y, + int16_t x1, int16_t y1, int16_t x2, int16_t y2, + uint32_t skip_index, bool skip_index_none, uint32_t skip_self_index, bool skip_self_index_none); + void common_hal_bitmaptools_draw_polygon(displayio_bitmap_t *destination, void *xs, void *ys, size_t points_len, int point_size, uint32_t value, bool close); void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, mp_obj_t *file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes, bool reverse_rows); void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int element_size, int x1, int y1, int x2, int y2, bool skip_specified, uint32_t skip_index); diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c index 9ff8050eab..c678a76703 100644 --- a/shared-bindings/displayio/Bitmap.c +++ b/shared-bindings/displayio/Bitmap.c @@ -186,125 +186,6 @@ STATIC mp_obj_t bitmap_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t val return mp_const_none; } -//| def blit( -//| self, -//| x: int, -//| y: int, -//| source_bitmap: Bitmap, -//| *, -//| x1: int, -//| y1: int, -//| x2: int, -//| y2: int, -//| skip_index: int, -//| skip_self_index: int -//| ) -> None: -//| """Inserts the source_bitmap region defined by rectangular boundaries -//| (x1,y1) and (x2,y2) into the bitmap at the specified (x,y) location. -//| -//| :param int x: Horizontal pixel location in bitmap where source_bitmap upper-left -//| corner will be placed -//| :param int y: Vertical pixel location in bitmap where source_bitmap upper-left -//| corner will be placed -//| :param bitmap source_bitmap: Source bitmap that contains the graphical region to be copied -//| :param int x1: Minimum x-value for rectangular bounding box to be copied from the source bitmap -//| :param int y1: Minimum y-value for rectangular bounding box to be copied from the source bitmap -//| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be copied from the source bitmap -//| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be copied from the source bitmap -//| :param int skip_index: bitmap palette index in the source that will not be copied, -//| set to None to copy all pixels -//| :param int skip_self_index: bitmap palette index in the self bitmap that will not get overwritten -//| by the pixels from the source""" -//| ... -STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum {ARG_x, ARG_y, ARG_source, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_skip_index, ARG_skip_self_index}; - static const mp_arg_t allowed_args[] = { - {MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT, {.u_obj = MP_OBJ_NULL} }, - {MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT, {.u_obj = MP_OBJ_NULL} }, - {MP_QSTR_source_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, - {MP_QSTR_x1, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, - {MP_QSTR_y1, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, - {MP_QSTR_x2, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, // None convert to source->width - {MP_QSTR_y2, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, // None convert to source->height - {MP_QSTR_skip_index, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, - {MP_QSTR_skip_self_index, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, - }; - mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; - mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - - displayio_bitmap_t *self = MP_OBJ_TO_PTR(pos_args[0]); - check_for_deinit(self); - - // Check x,y are within self (target) bitmap boundary - int16_t x = mp_arg_validate_int_range(args[ARG_x].u_int, 0, MAX(0, self->width - 1), MP_QSTR_x); - int16_t y = mp_arg_validate_int_range(args[ARG_y].u_int, 0, MAX(0, self->height - 1), MP_QSTR_y); - - displayio_bitmap_t *source = mp_arg_validate_type(args[ARG_source].u_obj, &displayio_bitmap_type, MP_QSTR_source_bitmap); - - - // ensure that the target bitmap (self) has at least as many `bits_per_value` as the source - if (self->bits_per_value < source->bits_per_value) { - mp_raise_ValueError(translate("source palette too large")); - } - - // Check x1,y1,x2,y2 are within source bitmap boundary - int16_t x1 = mp_arg_validate_int_range(args[ARG_x1].u_int, 0, MAX(0, source->width - 1), MP_QSTR_x1); - int16_t y1 = mp_arg_validate_int_range(args[ARG_y1].u_int, 0, MAX(0, source->height - 1), MP_QSTR_y1); - int16_t x2, y2; - // if x2 or y2 is None, then set as the maximum size of the source bitmap - if (args[ARG_x2].u_obj == mp_const_none) { - x2 = source->width; - } else { - x2 = mp_arg_validate_int_range(mp_obj_get_int(args[ARG_x2].u_obj), 0, source->width, MP_QSTR_x2); - } - // int16_t y2; - if (args[ARG_y2].u_obj == mp_const_none) { - y2 = source->height; - } else { - y2 = mp_arg_validate_int_range(mp_obj_get_int(args[ARG_y2].u_obj), 0, source->height, MP_QSTR_y2); - } - - // Ensure x1 < x2 and y1 < y2 - if (x1 > x2) { - int16_t temp = x2; - x2 = x1; - x1 = temp; - } - if (y1 > y2) { - int16_t temp = y2; - y2 = y1; - y1 = temp; - } - - uint32_t skip_index; - bool skip_index_none; // flag whether skip_value was None - - if (args[ARG_skip_index].u_obj == mp_const_none) { - skip_index = 0; - skip_index_none = true; - } else { - skip_index = mp_obj_get_int(args[ARG_skip_index].u_obj); - skip_index_none = false; - } - - uint32_t skip_self_index; - bool skip_self_index_none; // flag whether skip_self_value was None - - if (args[ARG_skip_self_index].u_obj == mp_const_none) { - skip_self_index = 0; - skip_self_index_none = true; - } else { - skip_self_index = mp_obj_get_int(args[ARG_skip_self_index].u_obj); - skip_self_index_none = false; - } - - common_hal_displayio_bitmap_blit(self, x, y, source, x1, y1, x2, y2, skip_index, skip_index_none, skip_self_index, - skip_self_index_none); - - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_KW(displayio_bitmap_blit_obj, 1, displayio_bitmap_obj_blit); - //| def fill(self, value: int) -> None: //| """Fills the bitmap with the supplied palette index value.""" //| ... @@ -379,7 +260,6 @@ MP_DEFINE_CONST_FUN_OBJ_1(displayio_bitmap_deinit_obj, displayio_bitmap_obj_dein STATIC const mp_rom_map_elem_t displayio_bitmap_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&displayio_bitmap_height_obj) }, { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&displayio_bitmap_width_obj) }, - { MP_ROM_QSTR(MP_QSTR_blit), MP_ROM_PTR(&displayio_bitmap_blit_obj) }, { MP_ROM_QSTR(MP_QSTR_fill), MP_ROM_PTR(&displayio_bitmap_fill_obj) }, { MP_ROM_QSTR(MP_QSTR_dirty), MP_ROM_PTR(&displayio_bitmap_dirty_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&displayio_bitmap_deinit_obj) }, diff --git a/shared-bindings/displayio/Bitmap.h b/shared-bindings/displayio/Bitmap.h index 8f52cb8f62..8f30b3a330 100644 --- a/shared-bindings/displayio/Bitmap.h +++ b/shared-bindings/displayio/Bitmap.h @@ -42,9 +42,6 @@ uint16_t common_hal_displayio_bitmap_get_height(displayio_bitmap_t *self); uint16_t common_hal_displayio_bitmap_get_width(displayio_bitmap_t *self); uint32_t common_hal_displayio_bitmap_get_bits_per_value(displayio_bitmap_t *self); void common_hal_displayio_bitmap_set_pixel(displayio_bitmap_t *bitmap, int16_t x, int16_t y, uint32_t value); -void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16_t y, displayio_bitmap_t *source, - int16_t x1, int16_t y1, int16_t x2, int16_t y2, - uint32_t skip_index, bool skip_index_none, uint32_t skip_self_index, bool skip_self_index_none); uint32_t common_hal_displayio_bitmap_get_pixel(displayio_bitmap_t *bitmap, int16_t x, int16_t y); void common_hal_displayio_bitmap_fill(displayio_bitmap_t *bitmap, uint32_t value); int common_hal_displayio_bitmap_get_buffer(displayio_bitmap_t *self, mp_buffer_info_t *bufinfo, mp_uint_t flags); diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 0ded6d6abb..2b3b73030a 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -982,3 +982,70 @@ void common_hal_bitmaptools_draw_circle(displayio_bitmap_t *destination, draw_circle(destination, x, y, radius, value); } + +void common_hal_bitmaptools_blit(displayio_bitmap_t *destination, displayio_bitmap_t *source, int16_t x, int16_t y, + int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t skip_index, bool skip_index_none, uint32_t skip_dest_index, + bool skip_dest_index_none) { + if (destination->read_only) { + mp_raise_RuntimeError(translate("Read-only")); + } + // Copy region of "source" bitmap into "destination" bitmap at location x,y in the "destination" + // If skip_value is encountered in the source bitmap, it will not be copied. + // If skip_value is `None`, then all pixels are copied. + // This function assumes input checks were performed for pixel index entries. + + // Update the dirty area + int16_t dirty_x_max = (x + (x2 - x1)); + if (dirty_x_max > destination->width) { + dirty_x_max = destination->width; + } + int16_t dirty_y_max = y + (y2 - y1); + if (dirty_y_max > destination->height) { + dirty_y_max = destination->height; + } + + displayio_area_t a = { x, y, dirty_x_max, dirty_y_max, NULL}; + displayio_bitmap_set_dirty_area(destination, &a); + + bool x_reverse = false; + bool y_reverse = false; + + // Add reverse direction option to protect blitting of destination bitmap back into destination bitmap + if (x > x1) { + x_reverse = true; + } + if (y > y1) { + y_reverse = true; + } + + // simplest version - use internal functions for get/set pixels + for (int16_t i = 0; i < (x2 - x1); i++) { + + const int xs_index = x_reverse ? ((x2) - i - 1) : x1 + i; // x-index into the source bitmap + const int xd_index = x_reverse ? ((x + (x2 - x1)) - i - 1) : x + i; // x-index into the destination bitmap + + if ((xd_index >= 0) && (xd_index < destination->width)) { + for (int16_t j = 0; j < (y2 - y1); j++) { + + const int ys_index = y_reverse ? ((y2) - j - 1) : y1 + j; // y-index into the source bitmap + const int yd_index = y_reverse ? ((y + (y2 - y1)) - j - 1) : y + j; // y-index into the destination bitmap + + if ((yd_index >= 0) && (yd_index < destination->height)) { + uint32_t value = common_hal_displayio_bitmap_get_pixel(source, xs_index, ys_index); + if (skip_dest_index_none) { // if skip_dest_index is none, then only check source skip + if ((skip_index_none) || (value != skip_index)) { // write if skip_value_none is True + displayio_bitmap_write_pixel(destination, xd_index, yd_index, value); + } + } else { // check dest_value index against skip_dest_index and skip if they match + uint32_t dest_value = common_hal_displayio_bitmap_get_pixel(destination, xd_index, yd_index); + if (dest_value != skip_dest_index) { + if ((skip_index_none) || (value != skip_index)) { // write if skip_value_none is True + displayio_bitmap_write_pixel(destination, xd_index, yd_index, value); + } + } + } + } + } + } + } +} diff --git a/shared-module/displayio/Bitmap.c b/shared-module/displayio/Bitmap.c index f8b8170395..794e2dac19 100644 --- a/shared-module/displayio/Bitmap.c +++ b/shared-module/displayio/Bitmap.c @@ -174,73 +174,6 @@ void displayio_bitmap_write_pixel(displayio_bitmap_t *self, int16_t x, int16_t y } } -void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16_t y, displayio_bitmap_t *source, - int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t skip_index, bool skip_index_none, uint32_t skip_self_index, - bool skip_self_index_none) { - if (self->read_only) { - mp_raise_RuntimeError(translate("Read-only")); - } - // Copy region of "source" bitmap into "self" bitmap at location x,y in the "self" - // If skip_value is encountered in the source bitmap, it will not be copied. - // If skip_value is `None`, then all pixels are copied. - // This function assumes input checks were performed for pixel index entries. - - // Update the dirty area - int16_t dirty_x_max = (x + (x2 - x1)); - if (dirty_x_max > self->width) { - dirty_x_max = self->width; - } - int16_t dirty_y_max = y + (y2 - y1); - if (dirty_y_max > self->height) { - dirty_y_max = self->height; - } - - displayio_area_t a = { x, y, dirty_x_max, dirty_y_max, NULL}; - displayio_bitmap_set_dirty_area(self, &a); - - bool x_reverse = false; - bool y_reverse = false; - - // Add reverse direction option to protect blitting of self bitmap back into self bitmap - if (x > x1) { - x_reverse = true; - } - if (y > y1) { - y_reverse = true; - } - - // simplest version - use internal functions for get/set pixels - for (int16_t i = 0; i < (x2 - x1); i++) { - - const int xs_index = x_reverse ? ((x2) - i - 1) : x1 + i; // x-index into the source bitmap - const int xd_index = x_reverse ? ((x + (x2 - x1)) - i - 1) : x + i; // x-index into the destination bitmap - - if ((xd_index >= 0) && (xd_index < self->width)) { - for (int16_t j = 0; j < (y2 - y1); j++) { - - const int ys_index = y_reverse ? ((y2) - j - 1) : y1 + j; // y-index into the source bitmap - const int yd_index = y_reverse ? ((y + (y2 - y1)) - j - 1) : y + j; // y-index into the destination bitmap - - if ((yd_index >= 0) && (yd_index < self->height)) { - uint32_t value = common_hal_displayio_bitmap_get_pixel(source, xs_index, ys_index); - if (skip_self_index_none) { // if skip_self_index is none, then only check source skip - if ((skip_index_none) || (value != skip_index)) { // write if skip_value_none is True - displayio_bitmap_write_pixel(self, xd_index, yd_index, value); - } - } else { // check dest_value index against skip_self_index and skip if they match - uint32_t dest_value = common_hal_displayio_bitmap_get_pixel(self, xd_index, yd_index); - if (dest_value != skip_self_index) { - if ((skip_index_none) || (value != skip_index)) { // write if skip_value_none is True - displayio_bitmap_write_pixel(self, xd_index, yd_index, value); - } - } - } - } - } - } - } -} - void common_hal_displayio_bitmap_set_pixel(displayio_bitmap_t *self, int16_t x, int16_t y, uint32_t value) { if (self->read_only) { mp_raise_RuntimeError(translate("Read-only")); From a2ff9527dc2b5baa40eb7272315979b83d733343 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 2 Jul 2023 14:40:56 -0500 Subject: [PATCH 03/36] format --- shared-module/bitmaptools/__init__.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 2b3b73030a..aa13ba4acb 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -984,8 +984,9 @@ void common_hal_bitmaptools_draw_circle(displayio_bitmap_t *destination, } void common_hal_bitmaptools_blit(displayio_bitmap_t *destination, displayio_bitmap_t *source, int16_t x, int16_t y, - int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t skip_index, bool skip_index_none, uint32_t skip_dest_index, - bool skip_dest_index_none) { + int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t skip_index, bool skip_index_none, uint32_t skip_dest_index, + bool skip_dest_index_none) { + if (destination->read_only) { mp_raise_RuntimeError(translate("Read-only")); } From 16d92ddd3453ca4a478c2172aa7e9755201aad50 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 2 Jul 2023 14:57:44 -0500 Subject: [PATCH 04/36] docs fix --- shared-bindings/bitmaptools/__init__.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 6d0680626d..3a95ff5500 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -950,8 +950,8 @@ STATIC mp_obj_t bitmaptools_obj_draw_circle(size_t n_args, const mp_obj_t *pos_a MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_circle_obj, 0, bitmaptools_obj_draw_circle); //| def blit( -//| dest_bitmap: Bitmap, -//| source_bitmap: Bitmap, +//| dest_bitmap: displayio.Bitmap, +//| source_bitmap: displayio.Bitmap, //| x: int, //| y: int, //| *, From 72857994f2e3c8562926b2bc05464671401e9283 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Wed, 5 Jul 2023 17:27:41 -0500 Subject: [PATCH 05/36] change skip_index to skip_source_index --- shared-bindings/bitmaptools/__init__.c | 24 ++++++++++++------------ shared-bindings/bitmaptools/__init__.h | 2 +- shared-module/bitmaptools/__init__.c | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 3a95ff5500..5139a55645 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -959,7 +959,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_circle_obj, 0, bitmaptools_obj_draw_ //| y1: int, //| x2: int, //| y2: int, -//| skip_index: int, +//| skip_source_index: int, //| skip_dest_index: int //| ) -> None: //| """Inserts the source_bitmap region defined by rectangular boundaries @@ -975,14 +975,14 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_circle_obj, 0, bitmaptools_obj_draw_ //| :param int y1: Minimum y-value for rectangular bounding box to be copied from the source bitmap //| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be copied from the source bitmap //| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be copied from the source bitmap -//| :param int skip_index: bitmap palette index in the source that will not be copied, +//| :param int skip_source_index: bitmap palette index in the source that will not be copied, //| set to None to copy all pixels //| :param int skip_dest_index: bitmap palette index in the destination bitmap that will not get overwritten //| by the pixels from the source""" //| ... //| STATIC mp_obj_t bitmaptools_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum {ARG_destination, ARG_source, ARG_x, ARG_y, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_skip_index, ARG_skip_dest_index}; + enum {ARG_destination, ARG_source, ARG_x, ARG_y, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_skip_source_index, ARG_skip_dest_index}; static const mp_arg_t allowed_args[] = { {MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, {MP_QSTR_source_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, @@ -992,7 +992,7 @@ STATIC mp_obj_t bitmaptools_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp {MP_QSTR_y1, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, {MP_QSTR_x2, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, // None convert to source->width {MP_QSTR_y2, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, // None convert to source->height - {MP_QSTR_skip_index, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, + {MP_QSTR_skip_source_index, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, {MP_QSTR_skip_dest_index, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -1045,15 +1045,15 @@ STATIC mp_obj_t bitmaptools_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp y1 = temp; } - uint32_t skip_index; - bool skip_index_none; // flag whether skip_value was None + uint32_t skip_source_index; + bool skip_source_index_none; // flag whether skip_value was None - if (args[ARG_skip_index].u_obj == mp_const_none) { - skip_index = 0; - skip_index_none = true; + if (args[ARG_skip_source_index].u_obj == mp_const_none) { + skip_source_index = 0; + skip_source_index_none = true; } else { - skip_index = mp_obj_get_int(args[ARG_skip_index].u_obj); - skip_index_none = false; + skip_source_index = mp_obj_get_int(args[ARG_skip_source_index].u_obj); + skip_source_index_none = false; } uint32_t skip_dest_index; @@ -1067,7 +1067,7 @@ STATIC mp_obj_t bitmaptools_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp skip_dest_index_none = false; } - common_hal_bitmaptools_blit(destination, source, x, y, x1, y1, x2, y2, skip_index, skip_index_none, skip_dest_index, + common_hal_bitmaptools_blit(destination, source, x, y, x1, y1, x2, y2, skip_source_index, skip_source_index_none, skip_dest_index, skip_dest_index_none); return mp_const_none; diff --git a/shared-bindings/bitmaptools/__init__.h b/shared-bindings/bitmaptools/__init__.h index 456d2fcdfb..be0811cb80 100644 --- a/shared-bindings/bitmaptools/__init__.h +++ b/shared-bindings/bitmaptools/__init__.h @@ -71,7 +71,7 @@ void common_hal_bitmaptools_draw_circle(displayio_bitmap_t *destination, void common_hal_bitmaptools_blit(displayio_bitmap_t *destination, displayio_bitmap_t *source, int16_t x, int16_t y, int16_t x1, int16_t y1, int16_t x2, int16_t y2, - uint32_t skip_index, bool skip_index_none, uint32_t skip_self_index, bool skip_self_index_none); + uint32_t skip_source_index, bool skip_source_index_none, uint32_t skip_dest_index, bool skip_dest_index_none); void common_hal_bitmaptools_draw_polygon(displayio_bitmap_t *destination, void *xs, void *ys, size_t points_len, int point_size, uint32_t value, bool close); void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, mp_obj_t *file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes, bool reverse_rows); diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index aa13ba4acb..e6c0a9439d 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -984,7 +984,7 @@ void common_hal_bitmaptools_draw_circle(displayio_bitmap_t *destination, } void common_hal_bitmaptools_blit(displayio_bitmap_t *destination, displayio_bitmap_t *source, int16_t x, int16_t y, - int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t skip_index, bool skip_index_none, uint32_t skip_dest_index, + int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t skip_source_index, bool skip_source_index_none, uint32_t skip_dest_index, bool skip_dest_index_none) { if (destination->read_only) { @@ -1034,13 +1034,13 @@ void common_hal_bitmaptools_blit(displayio_bitmap_t *destination, displayio_bitm if ((yd_index >= 0) && (yd_index < destination->height)) { uint32_t value = common_hal_displayio_bitmap_get_pixel(source, xs_index, ys_index); if (skip_dest_index_none) { // if skip_dest_index is none, then only check source skip - if ((skip_index_none) || (value != skip_index)) { // write if skip_value_none is True + if ((skip_source_index_none) || (value != skip_source_index)) { // write if skip_value_none is True displayio_bitmap_write_pixel(destination, xd_index, yd_index, value); } } else { // check dest_value index against skip_dest_index and skip if they match uint32_t dest_value = common_hal_displayio_bitmap_get_pixel(destination, xd_index, yd_index); if (dest_value != skip_dest_index) { - if ((skip_index_none) || (value != skip_index)) { // write if skip_value_none is True + if ((skip_source_index_none) || (value != skip_source_index)) { // write if skip_value_none is True displayio_bitmap_write_pixel(destination, xd_index, yd_index, value); } } From 5fcd90d8fbac07b45ce0fe7410d2d4c8352f5e0b Mon Sep 17 00:00:00 2001 From: Marco van der Kolk Date: Thu, 6 Jul 2023 23:31:15 +0200 Subject: [PATCH 06/36] Extended to support multiple data pins Signed-off-by: Marco van der Kolk --- shared-bindings/keypad/ShiftRegisterKeys.c | 53 ++++++++++- shared-bindings/keypad/ShiftRegisterKeys.h | 2 +- shared-module/keypad/ShiftRegisterKeys.c | 105 ++++++++++++++++----- shared-module/keypad/ShiftRegisterKeys.h | 6 +- 4 files changed, 134 insertions(+), 32 deletions(-) diff --git a/shared-bindings/keypad/ShiftRegisterKeys.c b/shared-bindings/keypad/ShiftRegisterKeys.c index 1fcf517ac3..73e3264ac4 100644 --- a/shared-bindings/keypad/ShiftRegisterKeys.c +++ b/shared-bindings/keypad/ShiftRegisterKeys.c @@ -62,6 +62,7 @@ //| :param microcontroller.Pin clock: The shift register clock pin. //| The shift register should clock on a low-to-high transition. //| :param microcontroller.Pin data: the incoming shift register data pin +//| :param Sequence[microcontroller.Pin] data: a list of incoming shift register data pins //| :param microcontroller.Pin latch: //| Pin used to latch parallel data going into the shift register. //| :param bool value_to_latch: Pin state to latch data being read. @@ -70,6 +71,7 @@ //| The default is ``True``, which is how the 74HC165 operates. The CD4021 latch is the opposite. //| Once the data is latched, it will be shifted out by toggling the clock pin. //| :param int key_count: number of data lines to clock in +//| :param Sequence[int] key_count: a list of key_counts equal sized to data pins //| :param bool value_when_pressed: ``True`` if the pin reads high when the key is pressed. //| ``False`` if the pin reads low (is grounded) when the key is pressed. //| :param float interval: Scan keys no more often than ``interval`` to allow for debouncing. @@ -91,7 +93,7 @@ STATIC mp_obj_t keypad_shiftregisterkeys_make_new(const mp_obj_type_t *type, siz { MP_QSTR_data, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_latch, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_value_to_latch, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = true} }, - { MP_QSTR_key_count, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_key_count, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_value_when_pressed, MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_BOOL }, { MP_QSTR_interval, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, { MP_QSTR_max_events, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 64} }, @@ -99,21 +101,64 @@ STATIC mp_obj_t keypad_shiftregisterkeys_make_new(const mp_obj_type_t *type, siz 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); + size_t num_data_pins; + + if (mp_obj_is_type(args[ARG_data].u_obj, &mcu_pin_type)) { + num_data_pins = 1; + } else { + num_data_pins = (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(args[ARG_data].u_obj)); + } + + const mcu_pin_obj_t *data_pins_array[num_data_pins]; + + if (mp_obj_is_type(args[ARG_data].u_obj, &mcu_pin_type)) { + const mcu_pin_obj_t *datapin = validate_obj_is_free_pin(args[ARG_data].u_obj, MP_QSTR_data); + data_pins_array[0] = datapin; + } else { + for (size_t pin = 0; pin < num_data_pins; pin++) { + const mcu_pin_obj_t *datapin = + validate_obj_is_free_pin(mp_obj_subscr(args[ARG_data].u_obj, MP_OBJ_NEW_SMALL_INT(pin), MP_OBJ_SENTINEL), MP_QSTR_data); + data_pins_array[pin] = datapin; + } + } + + size_t num_key_counts; + + if (mp_obj_is_int(args[ARG_key_count].u_obj)) { + num_key_counts = 1; + } else { + num_key_counts = (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(args[ARG_key_count].u_obj)); + } + + mp_arg_validate_length(num_key_counts, num_data_pins, MP_QSTR_key_count); + + size_t key_count_array[num_key_counts]; + + if (mp_obj_is_int(args[ARG_key_count].u_obj)) { + const size_t key_count = (size_t)mp_arg_validate_int_min(args[ARG_key_count].u_int, 1, MP_QSTR_key_count); + key_count_array[0] = key_count; + } else { + for (size_t kc = 0; kc < num_key_counts; kc++) { + mp_int_t mpint = mp_obj_get_int(mp_obj_subscr(args[ARG_key_count].u_obj, MP_OBJ_NEW_SMALL_INT(kc), MP_OBJ_SENTINEL)); + const size_t key_count = (size_t)mp_arg_validate_int_min(mpint, 1, MP_QSTR_key_count); + key_count_array[kc] = key_count; + } + } + const mcu_pin_obj_t *clock = validate_obj_is_free_pin(args[ARG_clock].u_obj, MP_QSTR_clock); - const mcu_pin_obj_t *data = validate_obj_is_free_pin(args[ARG_data].u_obj, MP_QSTR_data); const mcu_pin_obj_t *latch = validate_obj_is_free_pin(args[ARG_latch].u_obj, MP_QSTR_latch); const bool value_to_latch = args[ARG_value_to_latch].u_bool; - const size_t key_count = (size_t)mp_arg_validate_int_min(args[ARG_key_count].u_int, 1, MP_QSTR_key_count); const bool value_when_pressed = args[ARG_value_when_pressed].u_bool; const mp_float_t interval = mp_arg_validate_obj_float_non_negative(args[ARG_interval].u_obj, 0.020f, MP_QSTR_interval); const size_t max_events = (size_t)mp_arg_validate_int_min(args[ARG_max_events].u_int, 1, MP_QSTR_max_events); common_hal_keypad_shiftregisterkeys_construct( - self, clock, data, latch, value_to_latch, key_count, value_when_pressed, interval, max_events); + self, clock, num_data_pins, data_pins_array, latch, value_to_latch, num_key_counts, key_count_array, value_when_pressed, interval, max_events); return MP_OBJ_FROM_PTR(self); + #else mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_ShiftRegisterKeys); #endif diff --git a/shared-bindings/keypad/ShiftRegisterKeys.h b/shared-bindings/keypad/ShiftRegisterKeys.h index bc91c78ab0..e3d1bc20be 100644 --- a/shared-bindings/keypad/ShiftRegisterKeys.h +++ b/shared-bindings/keypad/ShiftRegisterKeys.h @@ -32,7 +32,7 @@ extern const mp_obj_type_t keypad_shiftregisterkeys_type; -void common_hal_keypad_shiftregisterkeys_construct(keypad_shiftregisterkeys_obj_t *self, const mcu_pin_obj_t *clock_pin, const mcu_pin_obj_t *data_pin, const mcu_pin_obj_t *latch_pin, bool value_to_latch, size_t key_count, bool value_when_pressed, mp_float_t interval, size_t max_events); +void common_hal_keypad_shiftregisterkeys_construct(keypad_shiftregisterkeys_obj_t *self, const mcu_pin_obj_t *clock_pin, mp_uint_t num_data_pins, const mcu_pin_obj_t *data_pins[], const mcu_pin_obj_t *latch_pin, bool value_to_latch, size_t num_key_count, size_t key_counts[], bool value_when_pressed, mp_float_t interval, size_t max_events); void common_hal_keypad_shiftregisterkeys_deinit(keypad_shiftregisterkeys_obj_t *self); diff --git a/shared-module/keypad/ShiftRegisterKeys.c b/shared-module/keypad/ShiftRegisterKeys.c index b2b10c65a2..ee42c2c4b3 100644 --- a/shared-module/keypad/ShiftRegisterKeys.c +++ b/shared-module/keypad/ShiftRegisterKeys.c @@ -44,7 +44,7 @@ static keypad_scanner_funcs_t shiftregisterkeys_funcs = { .get_key_count = shiftregisterkeys_get_key_count, }; -void common_hal_keypad_shiftregisterkeys_construct(keypad_shiftregisterkeys_obj_t *self, const mcu_pin_obj_t *clock_pin, const mcu_pin_obj_t *data_pin, const mcu_pin_obj_t *latch_pin, bool value_to_latch, size_t key_count, bool value_when_pressed, mp_float_t interval, size_t max_events) { +void common_hal_keypad_shiftregisterkeys_construct(keypad_shiftregisterkeys_obj_t *self, const mcu_pin_obj_t *clock_pin, mp_uint_t num_data_pins, const mcu_pin_obj_t *data_pins[], const mcu_pin_obj_t *latch_pin, bool value_to_latch, mp_uint_t num_key_counts, size_t key_counts[], bool value_when_pressed, mp_float_t interval, size_t max_events) { digitalio_digitalinout_obj_t *clock = m_new_obj(digitalio_digitalinout_obj_t); clock->base.type = &digitalio_digitalinout_type; @@ -52,22 +52,46 @@ void common_hal_keypad_shiftregisterkeys_construct(keypad_shiftregisterkeys_obj_ common_hal_digitalio_digitalinout_switch_to_output(clock, false, DRIVE_MODE_PUSH_PULL); self->clock = clock; - digitalio_digitalinout_obj_t *data = m_new_obj(digitalio_digitalinout_obj_t); - data->base.type = &digitalio_digitalinout_type; - common_hal_digitalio_digitalinout_construct(data, data_pin); - common_hal_digitalio_digitalinout_switch_to_input(data, PULL_NONE); - self->data = data; - digitalio_digitalinout_obj_t *latch = m_new_obj(digitalio_digitalinout_obj_t); latch->base.type = &digitalio_digitalinout_type; common_hal_digitalio_digitalinout_construct(latch, latch_pin); common_hal_digitalio_digitalinout_switch_to_output(latch, true, DRIVE_MODE_PUSH_PULL); self->latch = latch; - self->value_to_latch = value_to_latch; + mp_obj_t dios[num_data_pins]; + + for (size_t i = 0; i < num_data_pins; i++) { + digitalio_digitalinout_obj_t *dio = m_new_obj(digitalio_digitalinout_obj_t); + dio->base.type = &digitalio_digitalinout_type; + common_hal_digitalio_digitalinout_construct(dio, data_pins[i]); + common_hal_digitalio_digitalinout_switch_to_input(dio, PULL_NONE); + dios[i] = dio; + } + + // Allocate a tuple object with the data pins + self->data = mp_obj_new_tuple(num_data_pins, dios); + + self->key_counts = (mp_uint_t *)gc_alloc(sizeof(mp_uint_t) * num_key_counts, false, false); + self->num_key_counts = num_key_counts; + + // copy to a gc_alloc() and on the fly record pin with largest Shift register + mp_uint_t max = 0; + + for (mp_uint_t i = 0; i < self->num_key_counts; i++) { + mp_uint_t cnt = key_counts[i]; + + if (cnt > max) { + max = cnt; + } + + self->key_counts[i] = cnt; + } + + self->max_key_count = max; + + self->value_to_latch = value_to_latch; self->value_when_pressed = value_when_pressed; - self->key_count = key_count; self->funcs = &shiftregisterkeys_funcs; keypad_construct_common((keypad_scanner_obj_t *)self, interval, max_events); @@ -85,18 +109,33 @@ void common_hal_keypad_shiftregisterkeys_deinit(keypad_shiftregisterkeys_obj_t * common_hal_digitalio_digitalinout_deinit(self->clock); self->clock = MP_ROM_NONE; +/* common_hal_digitalio_digitalinout_deinit(self->data); self->data = MP_ROM_NONE; +*/ common_hal_digitalio_digitalinout_deinit(self->latch); self->latch = MP_ROM_NONE; + for (size_t key = 0; key < self->datas->len; key++) { + common_hal_digitalio_digitalinout_deinit(self->datas->items[key]); + } + self->data = MP_ROM_NONE; + common_hal_keypad_deinit_core(self); } size_t shiftregisterkeys_get_key_count(void *self_in) { keypad_shiftregisterkeys_obj_t *self = self_in; - return self->key_count; + + size_t total = 0; + + for (mp_uint_t i = 0; i < self->num_key_counts; i++) + { + total += self->key_counts[i]; + } + + return total; } static void shiftregisterkeys_scan_now(void *self_in, mp_obj_t timestamp) { @@ -105,28 +144,44 @@ static void shiftregisterkeys_scan_now(void *self_in, mp_obj_t timestamp) { // Latch (freeze) the current state of the input pins. common_hal_digitalio_digitalinout_set_value(self->latch, self->value_to_latch); - const size_t key_count = shiftregisterkeys_get_key_count(self); - - for (mp_uint_t key_number = 0; key_number < key_count; key_number++) { - // Zero-th data appears on on the data pin immediately, without shifting. + // Scan for max_key_count bit + for (mp_uint_t scan_number = 0; scan_number < self->max_key_count; scan_number++) { common_hal_digitalio_digitalinout_set_value(self->clock, false); - // Remember the previous up/down state. - const bool previous = self->currently_pressed[key_number]; - self->previously_pressed[key_number] = previous; + // Zero-th data appears on on the data pin immediately, without shifting. - // Get the current state. - const bool current = - common_hal_digitalio_digitalinout_get_value(self->data) == self->value_when_pressed; - self->currently_pressed[key_number] = current; + // Loop through all the data pins that share the latch + mp_uint_t index = 0; + + for (mp_uint_t i = 0; i < self->datas->len; i++) { + + // When this data pin has less shiftable bits, ignore it + if (scan_number >= self->key_counts[i]) { + continue; + } + + mp_uint_t key_number = scan_number + index; + + // Remember the previous up/down state. + const bool previous = self->currently_pressed[key_number]; + self->previously_pressed[key_number] = previous; + + // Get the current state. + const bool current = + common_hal_digitalio_digitalinout_get_value(self->datas->items[i]) == self->value_when_pressed; + self->currently_pressed[key_number] = current; + + // Record any transitions. + if (previous != current) { + keypad_eventqueue_record(self->events, key_number, current, timestamp); + } + + index += self->key_counts[i]; + } // Trigger a shift to get the next bit. common_hal_digitalio_digitalinout_set_value(self->clock, true); - // Record any transitions. - if (previous != current) { - keypad_eventqueue_record(self->events, key_number, current, timestamp); - } } // Start reading the input pins again. diff --git a/shared-module/keypad/ShiftRegisterKeys.h b/shared-module/keypad/ShiftRegisterKeys.h index 84c66ef627..9ce9692cda 100644 --- a/shared-module/keypad/ShiftRegisterKeys.h +++ b/shared-module/keypad/ShiftRegisterKeys.h @@ -37,9 +37,11 @@ typedef struct { KEYPAD_SCANNER_COMMON_FIELDS; digitalio_digitalinout_obj_t *clock; - digitalio_digitalinout_obj_t *data; digitalio_digitalinout_obj_t *latch; - size_t key_count; + mp_obj_tuple_t *data; + mp_uint_t *key_counts; + mp_uint_t num_key_counts; + mp_uint_t max_key_count; bool value_when_pressed; bool value_to_latch; } keypad_shiftregisterkeys_obj_t; From 4ba4c2a9428e714b53d6eeb2d6e528e572b65878 Mon Sep 17 00:00:00 2001 From: Marco van der Kolk Date: Fri, 7 Jul 2023 00:28:07 +0200 Subject: [PATCH 07/36] Renamed 'datas' to 'data_pins' to keep codespell happy Signed-off-by: Marco van der Kolk --- shared-module/keypad/ShiftRegisterKeys.c | 17 ++++++----------- shared-module/keypad/ShiftRegisterKeys.h | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/shared-module/keypad/ShiftRegisterKeys.c b/shared-module/keypad/ShiftRegisterKeys.c index ee42c2c4b3..ae5fa35636 100644 --- a/shared-module/keypad/ShiftRegisterKeys.c +++ b/shared-module/keypad/ShiftRegisterKeys.c @@ -70,7 +70,7 @@ void common_hal_keypad_shiftregisterkeys_construct(keypad_shiftregisterkeys_obj_ } // Allocate a tuple object with the data pins - self->data = mp_obj_new_tuple(num_data_pins, dios); + self->data_pins = mp_obj_new_tuple(num_data_pins, dios); self->key_counts = (mp_uint_t *)gc_alloc(sizeof(mp_uint_t) * num_key_counts, false, false); self->num_key_counts = num_key_counts; @@ -109,18 +109,13 @@ void common_hal_keypad_shiftregisterkeys_deinit(keypad_shiftregisterkeys_obj_t * common_hal_digitalio_digitalinout_deinit(self->clock); self->clock = MP_ROM_NONE; -/* - common_hal_digitalio_digitalinout_deinit(self->data); - self->data = MP_ROM_NONE; -*/ - common_hal_digitalio_digitalinout_deinit(self->latch); self->latch = MP_ROM_NONE; - for (size_t key = 0; key < self->datas->len; key++) { - common_hal_digitalio_digitalinout_deinit(self->datas->items[key]); + for (size_t key = 0; key < self->data_pins->len; key++) { + common_hal_digitalio_digitalinout_deinit(self->data_pins->items[key]); } - self->data = MP_ROM_NONE; + self->data_pins = MP_ROM_NONE; common_hal_keypad_deinit_core(self); } @@ -153,7 +148,7 @@ static void shiftregisterkeys_scan_now(void *self_in, mp_obj_t timestamp) { // Loop through all the data pins that share the latch mp_uint_t index = 0; - for (mp_uint_t i = 0; i < self->datas->len; i++) { + for (mp_uint_t i = 0; i < self->data_pins->len; i++) { // When this data pin has less shiftable bits, ignore it if (scan_number >= self->key_counts[i]) { @@ -168,7 +163,7 @@ static void shiftregisterkeys_scan_now(void *self_in, mp_obj_t timestamp) { // Get the current state. const bool current = - common_hal_digitalio_digitalinout_get_value(self->datas->items[i]) == self->value_when_pressed; + common_hal_digitalio_digitalinout_get_value(self->data_pins->items[i]) == self->value_when_pressed; self->currently_pressed[key_number] = current; // Record any transitions. diff --git a/shared-module/keypad/ShiftRegisterKeys.h b/shared-module/keypad/ShiftRegisterKeys.h index 9ce9692cda..0c2ccfb63b 100644 --- a/shared-module/keypad/ShiftRegisterKeys.h +++ b/shared-module/keypad/ShiftRegisterKeys.h @@ -38,7 +38,7 @@ typedef struct { KEYPAD_SCANNER_COMMON_FIELDS; digitalio_digitalinout_obj_t *clock; digitalio_digitalinout_obj_t *latch; - mp_obj_tuple_t *data; + mp_obj_tuple_t *data_pins; mp_uint_t *key_counts; mp_uint_t num_key_counts; mp_uint_t max_key_count; From 6dab35e0766fd2f0b9e2aceea9940dd7cfc82057 Mon Sep 17 00:00:00 2001 From: Marco van der Kolk Date: Sat, 8 Jul 2023 15:21:58 +0200 Subject: [PATCH 08/36] Assign key_count to MP_ROM_NONE on deinit (for gc) Signed-off-by: Marco van der Kolk --- shared-module/keypad/ShiftRegisterKeys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-module/keypad/ShiftRegisterKeys.c b/shared-module/keypad/ShiftRegisterKeys.c index ae5fa35636..44a7e3323a 100644 --- a/shared-module/keypad/ShiftRegisterKeys.c +++ b/shared-module/keypad/ShiftRegisterKeys.c @@ -116,6 +116,7 @@ void common_hal_keypad_shiftregisterkeys_deinit(keypad_shiftregisterkeys_obj_t * common_hal_digitalio_digitalinout_deinit(self->data_pins->items[key]); } self->data_pins = MP_ROM_NONE; + self->key_counts = MP_ROM_NONE; common_hal_keypad_deinit_core(self); } @@ -125,8 +126,7 @@ size_t shiftregisterkeys_get_key_count(void *self_in) { size_t total = 0; - for (mp_uint_t i = 0; i < self->num_key_counts; i++) - { + for (mp_uint_t i = 0; i < self->num_key_counts; i++) { total += self->key_counts[i]; } From 21d08646e153763b5567ffa56a0c8a153fe37a7a Mon Sep 17 00:00:00 2001 From: Marco van der Kolk Date: Mon, 10 Jul 2023 12:04:26 +0200 Subject: [PATCH 09/36] updated documentation --- shared-bindings/keypad/ShiftRegisterKeys.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/shared-bindings/keypad/ShiftRegisterKeys.c b/shared-bindings/keypad/ShiftRegisterKeys.c index 73e3264ac4..8765e04c1e 100644 --- a/shared-bindings/keypad/ShiftRegisterKeys.c +++ b/shared-bindings/keypad/ShiftRegisterKeys.c @@ -41,10 +41,10 @@ //| self, //| *, //| clock: microcontroller.Pin, -//| data: microcontroller.Pin, +//| data: Union[microcontroller.Pin, List[microcontroller.Pin]], //| latch: microcontroller.Pin, //| value_to_latch: bool = True, -//| key_count: int, +//| key_count: Union[int, List[int]] //| value_when_pressed: bool, //| interval: float = 0.020, //| max_events: int = 64 @@ -56,13 +56,14 @@ //| //| Key number 0 is the first (or more properly, the zero-th) bit read. In the //| 74HC165, this bit is labeled ``Q7``. Key number 1 will be the value of ``Q6``, etc. +//| When specifying multiple data pins, the key numbers are sequential. +//| So with two data Pins in parallel and key_count[0] = 32, the keys of data[1] will start with 32. //| //| An `EventQueue` is created when this object is created and is available in the `events` attribute. //| //| :param microcontroller.Pin clock: The shift register clock pin. //| The shift register should clock on a low-to-high transition. -//| :param microcontroller.Pin data: the incoming shift register data pin -//| :param Sequence[microcontroller.Pin] data: a list of incoming shift register data pins +//| :param Union[microcontroller.Pin, List[microcontroller.Pin]] data: the incoming shift register data pin(s) //| :param microcontroller.Pin latch: //| Pin used to latch parallel data going into the shift register. //| :param bool value_to_latch: Pin state to latch data being read. @@ -70,8 +71,7 @@ //| ``False`` if the data is latched when ``latch`` goes low. //| The default is ``True``, which is how the 74HC165 operates. The CD4021 latch is the opposite. //| Once the data is latched, it will be shifted out by toggling the clock pin. -//| :param int key_count: number of data lines to clock in -//| :param Sequence[int] key_count: a list of key_counts equal sized to data pins +//| :param Union[int, List[int]] key_count: number of data lines to clock in (per data pin) //| :param bool value_when_pressed: ``True`` if the pin reads high when the key is pressed. //| ``False`` if the pin reads low (is grounded) when the key is pressed. //| :param float interval: Scan keys no more often than ``interval`` to allow for debouncing. @@ -84,7 +84,7 @@ //| ... STATIC mp_obj_t keypad_shiftregisterkeys_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { - #if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS +#if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS keypad_shiftregisterkeys_obj_t *self = m_new_obj(keypad_shiftregisterkeys_obj_t); self->base.type = &keypad_shiftregisterkeys_type; enum { ARG_clock, ARG_data, ARG_latch, ARG_value_to_latch, ARG_key_count, ARG_value_when_pressed, ARG_interval, ARG_max_events }; @@ -159,9 +159,9 @@ STATIC mp_obj_t keypad_shiftregisterkeys_make_new(const mp_obj_type_t *type, siz return MP_OBJ_FROM_PTR(self); - #else +#else mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_ShiftRegisterKeys); - #endif +#endif } #if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS @@ -225,7 +225,7 @@ const mp_obj_type_t keypad_shiftregisterkeys_type = { { &mp_type_type }, .name = MP_QSTR_ShiftRegisterKeys, .make_new = keypad_shiftregisterkeys_make_new, - #if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS +#if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS .locals_dict = (mp_obj_t)&keypad_shiftregisterkeys_locals_dict, - #endif +#endif }; From 2860593425e356664af3910f3c7e5c0c312fcf49 Mon Sep 17 00:00:00 2001 From: kolkmvd Date: Mon, 10 Jul 2023 12:28:36 +0200 Subject: [PATCH 10/36] fixed missing comma --- shared-bindings/keypad/ShiftRegisterKeys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/keypad/ShiftRegisterKeys.c b/shared-bindings/keypad/ShiftRegisterKeys.c index 8765e04c1e..b96c7b0a50 100644 --- a/shared-bindings/keypad/ShiftRegisterKeys.c +++ b/shared-bindings/keypad/ShiftRegisterKeys.c @@ -44,7 +44,7 @@ //| data: Union[microcontroller.Pin, List[microcontroller.Pin]], //| latch: microcontroller.Pin, //| value_to_latch: bool = True, -//| key_count: Union[int, List[int]] +//| key_count: Union[int, List[int]], //| value_when_pressed: bool, //| interval: float = 0.020, //| max_events: int = 64 From f8edecf473198bcdb3bd5e2665a196e2540c2525 Mon Sep 17 00:00:00 2001 From: Marco van der Kolk Date: Mon, 10 Jul 2023 22:16:22 +0200 Subject: [PATCH 11/36] corrected formatting --- shared-bindings/keypad/ShiftRegisterKeys.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shared-bindings/keypad/ShiftRegisterKeys.c b/shared-bindings/keypad/ShiftRegisterKeys.c index b96c7b0a50..3d1a8d6842 100644 --- a/shared-bindings/keypad/ShiftRegisterKeys.c +++ b/shared-bindings/keypad/ShiftRegisterKeys.c @@ -84,7 +84,7 @@ //| ... STATIC mp_obj_t keypad_shiftregisterkeys_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { -#if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS + #if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS keypad_shiftregisterkeys_obj_t *self = m_new_obj(keypad_shiftregisterkeys_obj_t); self->base.type = &keypad_shiftregisterkeys_type; enum { ARG_clock, ARG_data, ARG_latch, ARG_value_to_latch, ARG_key_count, ARG_value_when_pressed, ARG_interval, ARG_max_events }; @@ -159,9 +159,9 @@ STATIC mp_obj_t keypad_shiftregisterkeys_make_new(const mp_obj_type_t *type, siz return MP_OBJ_FROM_PTR(self); -#else + #else mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_ShiftRegisterKeys); -#endif + #endif } #if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS @@ -225,7 +225,7 @@ const mp_obj_type_t keypad_shiftregisterkeys_type = { { &mp_type_type }, .name = MP_QSTR_ShiftRegisterKeys, .make_new = keypad_shiftregisterkeys_make_new, -#if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS + #if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS .locals_dict = (mp_obj_t)&keypad_shiftregisterkeys_locals_dict, -#endif + #endif }; From 0c606c534cdb08f4412ba196e0e0a12f77bebcc9 Mon Sep 17 00:00:00 2001 From: Marco van der Kolk Date: Tue, 11 Jul 2023 11:18:29 +0200 Subject: [PATCH 12/36] Documentation: Sequences are supported, not just Lists Signed-off-by: Marco van der Kolk --- shared-bindings/keypad/ShiftRegisterKeys.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shared-bindings/keypad/ShiftRegisterKeys.c b/shared-bindings/keypad/ShiftRegisterKeys.c index 3d1a8d6842..0e8789e0cf 100644 --- a/shared-bindings/keypad/ShiftRegisterKeys.c +++ b/shared-bindings/keypad/ShiftRegisterKeys.c @@ -41,10 +41,10 @@ //| self, //| *, //| clock: microcontroller.Pin, -//| data: Union[microcontroller.Pin, List[microcontroller.Pin]], +//| data: Union[microcontroller.Pin, Sequence[microcontroller.Pin]], //| latch: microcontroller.Pin, //| value_to_latch: bool = True, -//| key_count: Union[int, List[int]], +//| key_count: Union[int, Sequence[int]], //| value_when_pressed: bool, //| interval: float = 0.020, //| max_events: int = 64 @@ -63,7 +63,7 @@ //| //| :param microcontroller.Pin clock: The shift register clock pin. //| The shift register should clock on a low-to-high transition. -//| :param Union[microcontroller.Pin, List[microcontroller.Pin]] data: the incoming shift register data pin(s) +//| :param Union[microcontroller.Pin, Sequence[microcontroller.Pin]] data: the incoming shift register data pin(s) //| :param microcontroller.Pin latch: //| Pin used to latch parallel data going into the shift register. //| :param bool value_to_latch: Pin state to latch data being read. @@ -71,7 +71,7 @@ //| ``False`` if the data is latched when ``latch`` goes low. //| The default is ``True``, which is how the 74HC165 operates. The CD4021 latch is the opposite. //| Once the data is latched, it will be shifted out by toggling the clock pin. -//| :param Union[int, List[int]] key_count: number of data lines to clock in (per data pin) +//| :param Union[int, Sequence[int]] key_count: number of data lines to clock in (per data pin) //| :param bool value_when_pressed: ``True`` if the pin reads high when the key is pressed. //| ``False`` if the pin reads low (is grounded) when the key is pressed. //| :param float interval: Scan keys no more often than ``interval`` to allow for debouncing. @@ -200,7 +200,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(keypad_shiftregisterkeys___exit___obj //| ... //| key_count: int -//| """The number of keys that are being scanned. (read-only) +//| """The total number of keys that are being scanned. (read-only) //| """ //| events: EventQueue From bdf9336b8076d08b2202cdfa4dfef30d3f5618e2 Mon Sep 17 00:00:00 2001 From: Marco van der Kolk Date: Tue, 11 Jul 2023 12:09:51 +0200 Subject: [PATCH 13/36] Improved help text Signed-off-by: Marco van der Kolk --- shared-bindings/keypad/ShiftRegisterKeys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/keypad/ShiftRegisterKeys.c b/shared-bindings/keypad/ShiftRegisterKeys.c index 0e8789e0cf..e85e9af837 100644 --- a/shared-bindings/keypad/ShiftRegisterKeys.c +++ b/shared-bindings/keypad/ShiftRegisterKeys.c @@ -53,11 +53,11 @@ //| Create a `Keys` object that will scan keys attached to a parallel-in serial-out shift register //| like the 74HC165 or CD4021. //| Note that you may chain shift registers to load in as many values as you need. +//| Furthermore, you can put multiple shift registers in parallel and share clock and latch. //| //| Key number 0 is the first (or more properly, the zero-th) bit read. In the //| 74HC165, this bit is labeled ``Q7``. Key number 1 will be the value of ``Q6``, etc. -//| When specifying multiple data pins, the key numbers are sequential. -//| So with two data Pins in parallel and key_count[0] = 32, the keys of data[1] will start with 32. +//| With multiple data pins, key numbers of the next pin are sequentially to the current pin. //| //| An `EventQueue` is created when this object is created and is available in the `events` attribute. //| From 5e97ff80f2426e978e2de451ccd224e2e723816a Mon Sep 17 00:00:00 2001 From: madcitygeek Date: Tue, 11 Jul 2023 14:56:10 -0500 Subject: [PATCH 14/36] Added a varient of the luatos board with on-board ch343 --- .../boards/luatos_core_esp32c3_ch343/board.c | 29 ++++++++++++ .../luatos_core_esp32c3_ch343/mpconfigboard.h | 44 +++++++++++++++++++ .../mpconfigboard.mk | 8 ++++ .../boards/luatos_core_esp32c3_ch343/pins.c | 36 +++++++++++++++ .../luatos_core_esp32c3_ch343/sdkconfig | 5 +++ 5 files changed, 122 insertions(+) create mode 100644 ports/espressif/boards/luatos_core_esp32c3_ch343/board.c create mode 100644 ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.h create mode 100644 ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk create mode 100644 ports/espressif/boards/luatos_core_esp32c3_ch343/pins.c create mode 100644 ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/board.c b/ports/espressif/boards/luatos_core_esp32c3_ch343/board.c new file mode 100644 index 0000000000..164430c88c --- /dev/null +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 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 "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.h b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.h new file mode 100644 index 0000000000..000056e5ee --- /dev/null +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.h @@ -0,0 +1,44 @@ +/* + * 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. + */ + +// Board setup + +#define MICROPY_HW_BOARD_NAME "Luatos Core-ESP32C3" +#define MICROPY_HW_MCU_NAME "ESP32-C3" + +// Status LED +#define MICROPY_HW_LED_STATUS (&pin_GPIO12) + +#define CIRCUITPY_BOARD_UART (1) +#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} + +// Default bus pins +#define DEFAULT_UART_BUS_RX (&pin_GPIO20) +#define DEFAULT_UART_BUS_TX (&pin_GPIO21) + +// Serial over UART +#define CIRCUITPY_CONSOLE_UART_RX DEFAULT_UART_BUS_RX +#define CIRCUITPY_CONSOLE_UART_TX DEFAULT_UART_BUS_TX diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk new file mode 100644 index 0000000000..e0df58f756 --- /dev/null +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk @@ -0,0 +1,8 @@ +CIRCUITPY_CREATOR_ID = 0xDEADBEEF +CIRCUITPY_CREATION_ID = 0x00C30001 + +IDF_TARGET = esp32c3 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=4MB diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/pins.c b/ports/espressif/boards/luatos_core_esp32c3_ch343/pins.c new file mode 100644 index 0000000000..f45205b5c3 --- /dev/null +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/pins.c @@ -0,0 +1,36 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // Luatos Core ESP32-C3 + // Documentation (Chinese only): + // https://wiki.luatos.com/chips/esp32c3/index.html + // Pinout: + // https://wiki.luatos.com/_images/20221023.png + // C3 Data Sheet + // https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + // IO11 used internally on this board version despite being broken out to a pin + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig b/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig new file mode 100644 index 0000000000..ccc70917b5 --- /dev/null +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig @@ -0,0 +1,5 @@ +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="luatos-core-esp32c3" +# end of LWIP From a7bbb05e25b035cc37530ef8a9a40456ff2b2e5f Mon Sep 17 00:00:00 2001 From: madcitygeek Date: Wed, 12 Jul 2023 22:59:43 -0500 Subject: [PATCH 15/36] Update mpconfigboard.mk Use unique CIRCUITPY_CREATION_ID --- .../espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk index e0df58f756..6a19c783f1 100644 --- a/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk @@ -1,5 +1,5 @@ CIRCUITPY_CREATOR_ID = 0xDEADBEEF -CIRCUITPY_CREATION_ID = 0x00C30001 +CIRCUITPY_CREATION_ID = 0x00C30002 IDF_TARGET = esp32c3 From 9642e387839c7fad564edc9909f22e8fcf2bec2e Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Tue, 13 Jun 2023 19:00:08 +1000 Subject: [PATCH 16/36] Added second I2C B\bus IO and stuff for FeatherS3 --- .../unexpectedmaker_feathers3/mpconfigboard.h | 5 +-- .../boards/unexpectedmaker_feathers3/pins.c | 32 +++++++++++++++---- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.h index 67054b8664..1d51cb77d9 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.h +++ b/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.h @@ -34,8 +34,9 @@ #define MICROPY_HW_LED_STATUS (&pin_GPIO13) -#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) -#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) +#define CIRCUITPY_BOARD_I2C (2) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO9, .sda = &pin_GPIO8}, \ + {.scl = &pin_GPIO15, .sda = &pin_GPIO16}} #define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/pins.c b/ports/espressif/boards/unexpectedmaker_feathers3/pins.c index 9a2fde5a0c..4480e01438 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/pins.c +++ b/ports/espressif/boards/unexpectedmaker_feathers3/pins.c @@ -1,5 +1,7 @@ #include "shared-bindings/board/__init__.h" +CIRCUITPY_BOARD_BUS_SINGLETON(stemma_i2c, i2c, 1) + STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS @@ -89,11 +91,16 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED + // Blue LED + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, + + // STEMMA QT Vertical Connector I2C IO + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_SCL2), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_SDA2), MP_ROM_PTR(&pin_GPIO16) }, // Battery voltage sense pin - // I really don't know what name to use here. Adafruit use BATTERY & VOLTAGE_MONITOR - // I prefer VBAT or VBAT_SENSE { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_VBAT), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_VBAT_SENSE), MP_ROM_PTR(&pin_GPIO2) }, @@ -103,18 +110,29 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_VBUS), MP_ROM_PTR(&pin_GPIO34) }, { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO34) }, + // Neopixel pins { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO39) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO40) }, - { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor - { MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor + // Ambient Light Sensor + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, - { MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO39) }, // Second LDO Enable control - { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, // Second LDO Enable control + // Second LDO Enable control + { MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + // I2C { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_STEMMA_VERTICAL_I2C), MP_ROM_PTR(&board_stemma_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_STEMMA2_I2C), MP_ROM_PTR(&board_stemma_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C2), MP_ROM_PTR(&board_stemma_i2c_obj) }, + + // SPI { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + + // UART { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 1629faf8b3c662d86a9f572b8388263cf9711800 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 13 Jul 2023 14:47:05 -0700 Subject: [PATCH 17/36] Make usb_host.Port a singleton This allows you to initialize usb_host.Port once successfully and then returns the same object as long as you pass the same arguments in. It does allow you to fix incorrect pins but not switching from one valid set to another. (It needs a reset for that.) This also moves hcd cache operations to RAM so that they don't access the cache when doing maintenance. --- lib/tinyusb | 2 +- ports/mimxrt10xx/boards/imxrt1060_evk/board.c | 6 +++ .../mimxrt10xx/boards/imxrt1060_evkb/board.c | 8 ++- ports/mimxrt10xx/boards/teensy41/board.c | 6 +++ ports/mimxrt10xx/common-hal/usb_host/Port.c | 35 +++++++++---- ports/mimxrt10xx/common-hal/usb_host/Port.h | 7 +-- ports/mimxrt10xx/linking/common.ld | 5 +- ports/mimxrt10xx/supervisor/usb.c | 7 ++- .../adafruit_feather_rp2040_usb_host/board.c | 3 +- ports/raspberrypi/common-hal/usb_host/Port.c | 33 +++++++----- ports/raspberrypi/common-hal/usb_host/Port.h | 7 +-- shared-bindings/usb_host/Port.c | 51 +++++-------------- shared-bindings/usb_host/Port.h | 8 +-- supervisor/shared/usb/tusb_config.h | 3 +- 14 files changed, 97 insertions(+), 84 deletions(-) diff --git a/lib/tinyusb b/lib/tinyusb index f1e006d09b..6c7c9f2ef5 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit f1e006d09bd32088ab421d0b519eb89c531eda4e +Subproject commit 6c7c9f2ef5a80d5a6879e9c3558162188c6cf889 diff --git a/ports/mimxrt10xx/boards/imxrt1060_evk/board.c b/ports/mimxrt10xx/boards/imxrt1060_evk/board.c index 4a2e6e0913..12278acabb 100644 --- a/ports/mimxrt10xx/boards/imxrt1060_evk/board.c +++ b/ports/mimxrt10xx/boards/imxrt1060_evk/board.c @@ -28,6 +28,8 @@ #include "supervisor/board.h" #include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/usb_host/Port.h" + // These pins should never ever be reset; doing so could interfere with basic operation. // Used in common-hal/microcontroller/Pin.c const mcu_pin_obj_t *mimxrt10xx_reset_forbidden_pins[] = { @@ -55,4 +57,8 @@ const mcu_pin_obj_t *mimxrt10xx_reset_forbidden_pins[] = { NULL, // Must end in NULL. }; +void board_init(void) { + common_hal_usb_host_port_construct(&pin_USB_OTG2_DP, &pin_USB_OTG2_DN); +} + // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/mimxrt10xx/boards/imxrt1060_evkb/board.c b/ports/mimxrt10xx/boards/imxrt1060_evkb/board.c index 4a2e6e0913..26dd28cbb4 100644 --- a/ports/mimxrt10xx/boards/imxrt1060_evkb/board.c +++ b/ports/mimxrt10xx/boards/imxrt1060_evkb/board.c @@ -28,6 +28,8 @@ #include "supervisor/board.h" #include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/usb_host/Port.h" + // These pins should never ever be reset; doing so could interfere with basic operation. // Used in common-hal/microcontroller/Pin.c const mcu_pin_obj_t *mimxrt10xx_reset_forbidden_pins[] = { @@ -52,7 +54,11 @@ const mcu_pin_obj_t *mimxrt10xx_reset_forbidden_pins[] = { // USB Pins &pin_GPIO_AD_B0_01, // ID Pin &pin_GPIO_AD_B0_03, // OC/Fault Pin - NULL, // Must end in NULL. + NULL, // Must end in NULL. }; +void board_init(void) { + common_hal_usb_host_port_construct(&pin_USB_OTG2_DP, &pin_USB_OTG2_DN); +} + // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/mimxrt10xx/boards/teensy41/board.c b/ports/mimxrt10xx/boards/teensy41/board.c index 8ece1546d7..3418cff43f 100644 --- a/ports/mimxrt10xx/boards/teensy41/board.c +++ b/ports/mimxrt10xx/boards/teensy41/board.c @@ -28,6 +28,8 @@ #include "supervisor/board.h" #include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/usb_host/Port.h" + // These pins should never ever be reset; doing so could interfere with basic operation. // Used in common-hal/microcontroller/Pin.c const mcu_pin_obj_t *mimxrt10xx_reset_forbidden_pins[] = { @@ -54,4 +56,8 @@ const mcu_pin_obj_t *mimxrt10xx_reset_forbidden_pins[] = { NULL, // Must end in NULL. }; +void board_init(void) { + common_hal_usb_host_port_construct(&pin_USB_OTG2_DP, &pin_USB_OTG2_DN); +} + // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/mimxrt10xx/common-hal/usb_host/Port.c b/ports/mimxrt10xx/common-hal/usb_host/Port.c index 126160c69c..444c410729 100644 --- a/ports/mimxrt10xx/common-hal/usb_host/Port.c +++ b/ports/mimxrt10xx/common-hal/usb_host/Port.c @@ -29,9 +29,13 @@ #include "py/runtime.h" -bool usb_host_init; +#include "tusb.h" -void common_hal_usb_host_port_construct(usb_host_port_obj_t *self, const mcu_pin_obj_t *dp, const mcu_pin_obj_t *dm) { +#include "imx_usb.h" + +usb_host_port_obj_t usb_host_instance; + +usb_host_port_obj_t *common_hal_usb_host_port_construct(const mcu_pin_obj_t *dp, const mcu_pin_obj_t *dm) { const mcu_pin_obj_t *supported_dp; const mcu_pin_obj_t *supported_dm; if (CIRCUITPY_USB_HOST_INSTANCE == 0) { @@ -41,18 +45,27 @@ void common_hal_usb_host_port_construct(usb_host_port_obj_t *self, const mcu_pin supported_dp = &pin_USB_OTG2_DP; supported_dm = &pin_USB_OTG2_DN; } + // Return the singleton if given the same pins. + usb_host_port_obj_t *self = &usb_host_instance; + if (self->dp != NULL) { + if (self->dp != dp || self->dm != dm) { + mp_raise_msg_varg(&mp_type_RuntimeError, translate("%q in use"), MP_QSTR_usb_host); + } + return self; + } if (dp != supported_dp || dm != supported_dm) { raise_ValueError_invalid_pins(); } - self->init = true; - usb_host_init = true; -} -void common_hal_usb_host_port_deinit(usb_host_port_obj_t *self) { - self->init = false; - usb_host_init = false; -} + assert_pin_free(dp); + assert_pin_free(dm); -bool common_hal_usb_host_port_deinited(usb_host_port_obj_t *self) { - return !self->init; + init_usb_instance(CIRCUITPY_USB_HOST_INSTANCE); + tuh_init(TUH_OPT_RHPORT); + + self->base.type = &usb_host_port_type; + self->dp = dp; + self->dm = dm; + + return self; } diff --git a/ports/mimxrt10xx/common-hal/usb_host/Port.h b/ports/mimxrt10xx/common-hal/usb_host/Port.h index dad1adf3a2..59f7735439 100644 --- a/ports/mimxrt10xx/common-hal/usb_host/Port.h +++ b/ports/mimxrt10xx/common-hal/usb_host/Port.h @@ -31,11 +31,8 @@ typedef struct { mp_obj_base_t base; - bool init; + const mcu_pin_obj_t *dp; + const mcu_pin_obj_t *dm; } usb_host_port_obj_t; -// Cheater state so that the usb module knows if it should return the TinyUSB -// state. -extern bool usb_host_init; - #endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_USB_HOST_PORT_H diff --git a/ports/mimxrt10xx/linking/common.ld b/ports/mimxrt10xx/linking/common.ld index 71e2c457c3..6e674a49f2 100644 --- a/ports/mimxrt10xx/linking/common.ld +++ b/ports/mimxrt10xx/linking/common.ld @@ -71,7 +71,7 @@ SECTIONS . = ALIGN(4); *(EXCLUDE_FILE( *fsl_flexspi.o - *dcd_ci_hs.o + *cd_ci_hs.o *ehci.o *tusb_fifo.o *usbd.o @@ -88,6 +88,9 @@ SECTIONS /* Keep USB processing functions out of RAM because we don't know which will be used. We try to only keep USB interrupt related functions. */ *dcd_ci_hs.o(.text.process_*_request .text.dcd_edpt* .text.dcd_init .text.dcd_set_address) + /* Move hcd_dcache* routines to RAM so that we don't cross execution from + the cache during cache maintenance. Weird things happen when we do. */ + *hcd_ci_hs.o(.text.hcd_i*) *usbd.o(.text.process_*_request .text.process_[gs]et* .text.tud_* .text.usbd_* .text.configuration_reset .text.invoke_*) *ehci.o(.text.hcd_edpt* .text.hcd_setup* .text.ehci_init* .text.hcd_port* .text.hcd_device* .text.qtd_init* .text.list_remove*) diff --git a/ports/mimxrt10xx/supervisor/usb.c b/ports/mimxrt10xx/supervisor/usb.c index 64a2639c16..ab0bd15b51 100644 --- a/ports/mimxrt10xx/supervisor/usb.c +++ b/ports/mimxrt10xx/supervisor/usb.c @@ -31,7 +31,9 @@ #include "supervisor/linker.h" #include "supervisor/usb.h" -STATIC void init_usb_instance(mp_int_t instance) { +#include "imx_usb.h" + +void init_usb_instance(mp_int_t instance) { if (instance < 0) { return; } @@ -72,9 +74,6 @@ STATIC void init_usb_instance(mp_int_t instance) { void init_usb_hardware(void) { init_usb_instance(CIRCUITPY_USB_DEVICE_INSTANCE); - // We can't dynamically start the USB Host port at the moment, so do it - // up front. - init_usb_instance(CIRCUITPY_USB_HOST_INSTANCE); } // Provide the prototypes for the interrupt handlers. The iMX RT SDK doesn't. diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040_usb_host/board.c b/ports/raspberrypi/boards/adafruit_feather_rp2040_usb_host/board.c index 724fde1d27..1d054a03ac 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040_usb_host/board.c +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040_usb_host/board.c @@ -31,7 +31,6 @@ // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. -usb_host_port_obj_t _host_port; digitalio_digitalinout_obj_t _host_power; void board_init(void) { @@ -39,5 +38,5 @@ void board_init(void) { common_hal_digitalio_digitalinout_never_reset(&_host_power); common_hal_digitalio_digitalinout_switch_to_output(&_host_power, true, DRIVE_MODE_PUSH_PULL); - common_hal_usb_host_port_construct(&_host_port, &pin_GPIO16, &pin_GPIO17); + common_hal_usb_host_port_construct(&pin_GPIO16, &pin_GPIO17); } diff --git a/ports/raspberrypi/common-hal/usb_host/Port.c b/ports/raspberrypi/common-hal/usb_host/Port.c index 9ad28c73ea..93d19acd69 100644 --- a/ports/raspberrypi/common-hal/usb_host/Port.c +++ b/ports/raspberrypi/common-hal/usb_host/Port.c @@ -45,7 +45,7 @@ #include "supervisor/serial.h" -bool usb_host_init; +usb_host_port_obj_t usb_host_instance; STATIC PIO pio_instances[2] = {pio0, pio1}; volatile bool _core1_ready = false; @@ -102,10 +102,23 @@ STATIC bool _has_program_room(uint8_t pio_index, uint8_t program_size) { return pio_can_add_program(pio, &program_struct); } -void common_hal_usb_host_port_construct(usb_host_port_obj_t *self, const mcu_pin_obj_t *dp, const mcu_pin_obj_t *dm) { +usb_host_port_obj_t *common_hal_usb_host_port_construct(const mcu_pin_obj_t *dp, const mcu_pin_obj_t *dm) { if (dp->number + 1 != dm->number) { raise_ValueError_invalid_pins(); } + usb_host_port_obj_t *self = &usb_host_instance; + + // Return the singleton if given the same pins. + if (self->dp != NULL) { + if (self->dp != dp || self->dm != dm) { + mp_raise_msg_varg(&mp_type_RuntimeError, translate("%q in use"), MP_QSTR_usb_host); + } + return self; + } + + assert_pin_free(dp); + assert_pin_free(dm); + pio_usb_configuration_t pio_cfg = PIO_USB_DEFAULT_CONFIG; pio_cfg.skip_alarm_pool = true; pio_cfg.pin_dp = dp->number; @@ -122,6 +135,10 @@ void common_hal_usb_host_port_construct(usb_host_port_obj_t *self, const mcu_pin mp_raise_RuntimeError(translate("All dma channels in use")); } + self->base.type = &usb_host_port_type; + self->dp = dp; + self->dm = dm; + PIO tx_pio = pio_instances[pio_cfg.pio_tx_num]; pio_cfg.sm_tx = pio_claim_unused_sm(tx_pio, false); PIO rx_pio = pio_instances[pio_cfg.pio_rx_num]; @@ -151,15 +168,5 @@ void common_hal_usb_host_port_construct(usb_host_port_obj_t *self, const mcu_pin tuh_configure(TUH_OPT_RHPORT, TUH_CFGID_RPI_PIO_USB_CONFIGURATION, &pio_cfg); tuh_init(TUH_OPT_RHPORT); - self->init = true; - usb_host_init = true; -} - -void common_hal_usb_host_port_deinit(usb_host_port_obj_t *self) { - self->init = false; - usb_host_init = false; -} - -bool common_hal_usb_host_port_deinited(usb_host_port_obj_t *self) { - return !self->init; + return self; } diff --git a/ports/raspberrypi/common-hal/usb_host/Port.h b/ports/raspberrypi/common-hal/usb_host/Port.h index c9294debb2..69a7f8deaf 100644 --- a/ports/raspberrypi/common-hal/usb_host/Port.h +++ b/ports/raspberrypi/common-hal/usb_host/Port.h @@ -30,9 +30,6 @@ typedef struct { mp_obj_base_t base; - bool init; + const mcu_pin_obj_t *dp; + const mcu_pin_obj_t *dm; } usb_host_port_obj_t; - -// Cheater state so that the usb module knows if it should return the TinyUSB -// state. -extern bool usb_host_init; diff --git a/shared-bindings/usb_host/Port.c b/shared-bindings/usb_host/Port.c index 53b1fec54f..9be6da9df3 100644 --- a/shared-bindings/usb_host/Port.c +++ b/shared-bindings/usb_host/Port.c @@ -35,59 +35,36 @@ //| //| def __init__(self, dp: microcontroller.Pin, dm: microcontroller.Pin) -> None: //| """Create a USB host port on the given pins. Access attached devices -//| through the `usb` module. Keep this object referenced while -//| interacting with devices, otherwise they will be disconnected. +//| through the `usb` module. +//| +//| The resulting object lives longer than the CircuitPython VM so that +//| USB devices such as keyboards can continue to be used. Subsequent +//| calls to this constructor will return the same object and *not* +//| reinitialize the USB host port. It will raise an exception when +//| given different arguments from the first successful call. //| //| :param ~microcontroller.Pin dp: The data plus pin //| :param ~microcontroller.Pin dm: The data minus pin //| """ //| ... +//| STATIC mp_obj_t usb_host_port_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { // check number of arguments mp_arg_check_num(n_args, n_kw, 2, 2, false); - const mcu_pin_obj_t *dp = validate_obj_is_free_pin(args[0], MP_QSTR_dp); - const mcu_pin_obj_t *dm = validate_obj_is_free_pin(args[1], MP_QSTR_dm); + const mcu_pin_obj_t *dp = validate_obj_is_pin(args[0], MP_QSTR_dp); + const mcu_pin_obj_t *dm = validate_obj_is_pin(args[1], MP_QSTR_dm); - usb_host_port_obj_t *self = m_new_obj(usb_host_port_obj_t); - self->base.type = &usb_host_port_type; - common_hal_usb_host_port_construct(self, dp, dm); + // Pin in use checks happen in the implementation so they can be ignored + // when returning the singleton. + + usb_host_port_obj_t *self = common_hal_usb_host_port_construct(dp, dm); return (mp_obj_t)self; } -//| def deinit(self) -> None: -//| """Turn off the USB host port and release the pins for other use.""" -//| ... -STATIC mp_obj_t usb_host_port_obj_deinit(mp_obj_t self_in) { - usb_host_port_obj_t *self = MP_OBJ_TO_PTR(self_in); - common_hal_usb_host_port_deinit(self); - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_1(usb_host_port_deinit_obj, usb_host_port_obj_deinit); - -//| def __enter__(self) -> Port: -//| """No-op used by Context Managers.""" -//| ... -// Provided by context manager helper. - -//| def __exit__(self) -> None: -//| """Automatically deinitializes the hardware when exiting a context. See -//| :ref:`lifetime-and-contextmanagers` for more info.""" -//| ... -//| -STATIC mp_obj_t usb_host_port_obj___exit__(size_t n_args, const mp_obj_t *args) { - (void)n_args; - common_hal_usb_host_port_deinit(MP_OBJ_TO_PTR(args[0])); - return mp_const_none; -} -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(usb_host_port_obj___exit___obj, 4, 4, usb_host_port_obj___exit__); - STATIC const mp_rom_map_elem_t usb_host_port_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&usb_host_port_deinit_obj) }, - { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) }, - { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&usb_host_port_obj___exit___obj) }, }; STATIC MP_DEFINE_CONST_DICT(usb_host_port_locals_dict, usb_host_port_locals_dict_table); diff --git a/shared-bindings/usb_host/Port.h b/shared-bindings/usb_host/Port.h index 68645d1146..ba8d298517 100644 --- a/shared-bindings/usb_host/Port.h +++ b/shared-bindings/usb_host/Port.h @@ -35,8 +35,10 @@ extern const mp_obj_type_t usb_host_port_type; -void common_hal_usb_host_port_construct(usb_host_port_obj_t *self, const mcu_pin_obj_t *dp, const mcu_pin_obj_t *dm); -void common_hal_usb_host_port_deinit(usb_host_port_obj_t *self); -bool common_hal_usb_host_port_deinited(usb_host_port_obj_t *self); +// This is unique to common_hal constructs because it returns a globally stored +// object instead of taking on in that may be on the heap. This allows the +// method to check the internals of the global object against the given arguments +// to determine whether to return the singleton or raise an exception. +usb_host_port_obj_t *common_hal_usb_host_port_construct(const mcu_pin_obj_t *dp, const mcu_pin_obj_t *dm); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_USB_HOST_PORT_H diff --git a/supervisor/shared/usb/tusb_config.h b/supervisor/shared/usb/tusb_config.h index 19f5c0a0ce..d097005aac 100644 --- a/supervisor/shared/usb/tusb_config.h +++ b/supervisor/shared/usb/tusb_config.h @@ -152,7 +152,8 @@ extern "C" { #endif #define CFG_TUH_HID 2 -#define CFG_TUH_HUB 1 +// 2 hubs so we can support "7 port" hubs which have two internal hubs. +#define CFG_TUH_HUB 2 #define CFG_TUH_CDC 0 #define CFG_TUH_MSC 0 #define CFG_TUH_VENDOR 0 From 3f3ec1c8350c1cf6eca3031b9b551034abf6e1ba Mon Sep 17 00:00:00 2001 From: Qyriad Date: Tue, 18 Jul 2023 16:47:37 -0600 Subject: [PATCH 18/36] samx5x: support external clock sources Adds two board config define's, which can be added in a board's mpconfigboard.h: BOARD_XOSC_FREQ_HZ, and BOARD_XOSC_IS_CRYSTAL, which are passed to clock_init(). External clock sources are currently only implemented for SAM_D5X_E5X series chips, so defining BOARD_XOSC_FREQ_HZ for a SAMD21 board will emit an error. Signed-off-by: Qyriad --- ports/atmel-samd/mpconfigport.h | 24 ++++++++++++++++++++++++ ports/atmel-samd/peripherals | 2 +- ports/atmel-samd/supervisor/port.c | 4 ++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 73686e1445..6fb969e47b 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -173,6 +173,30 @@ #define BOARD_HAS_CRYSTAL (0) #endif +#ifndef BOARD_XOSC_FREQ_HZ +// 0 Indicates XOSC is not used. + #define BOARD_XOSC_FREQ_HZ (0) +#else +// For now, only allow external clock sources that divide cleanly into +// the system clock frequency of 120 MHz. + #if (120000000 % BOARD_XOSC_FREQ_HZ) != 0 + #error "BOARD_XOSC_FREQ_HZ must be an integer factor of 120 MHz" + #endif +#endif + +#if BOARD_XOSC_FREQ_HZ != 0 +// External clock sources are currently not implemented for SAMD21 chips. + #ifdef SAMD21 + #error "BOARD_XOSC_FREQ_HZ is non-zero but external clock sources are not yet supported for SAMD21 chips" + #endif + #ifndef BOARD_XOSC_IS_CRYSTAL + #error "BOARD_XOSC_IS_CRYSTAL must be defined to 0 or 1 if BOARD_XOSC_FREQ_HZ is not 0" + #endif +#else +// It doesn't matter what the value is in this case. + #define BOARD_XOSC_IS_CRYSTAL (0) +#endif + // if CALIBRATE_CRYSTALLESS is requested, make room for storing // calibration data generated from external USB. #ifndef CIRCUITPY_INTERNAL_CONFIG_SIZE diff --git a/ports/atmel-samd/peripherals b/ports/atmel-samd/peripherals index baca4c0843..82e514b6e0 160000 --- a/ports/atmel-samd/peripherals +++ b/ports/atmel-samd/peripherals @@ -1 +1 @@ -Subproject commit baca4c084334aa8625f525a4032d66a397199ea6 +Subproject commit 82e514b6e0d1a2b09dc73be9973663b6b837a817 diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 8cba5c61e0..8ae2d3740e 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -353,10 +353,10 @@ safe_mode_t port_init(void) { if (strcmp((char *)CIRCUITPY_INTERNAL_CONFIG_START_ADDR, "CIRCUITPYTHON1") == 0) { fine = ((uint16_t *)CIRCUITPY_INTERNAL_CONFIG_START_ADDR)[8]; } - clock_init(BOARD_HAS_CRYSTAL, fine); + clock_init(BOARD_HAS_CRYSTAL, BOARD_XOSC_FREQ_HZ, BOARD_XOSC_IS_CRYSTAL, fine); #else // Use a default fine value - clock_init(BOARD_HAS_CRYSTAL, DEFAULT_DFLL48M_FINE_CALIBRATION); + clock_init(BOARD_HAS_CRYSTAL, BOARD_XOSC_FREQ_HZ, BOARD_XOSC_IS_CRYSTAL, DEFAULT_DFLL48M_FINE_CALIBRATION); #endif rtc_init(); From e81ed62cfd8e024929c70d6aeed6c2994de52cd4 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 19 Jul 2023 11:46:04 -0700 Subject: [PATCH 19/36] Add missing header file --- ports/mimxrt10xx/imx_usb.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ports/mimxrt10xx/imx_usb.h diff --git a/ports/mimxrt10xx/imx_usb.h b/ports/mimxrt10xx/imx_usb.h new file mode 100644 index 0000000000..7ae7df8461 --- /dev/null +++ b/ports/mimxrt10xx/imx_usb.h @@ -0,0 +1,31 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 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. + */ + +#pragma once + +// Provided by supervisor/usb.c that has a shared, non-port-specific header. So, +// just define it here. +void init_usb_instance(mp_int_t instance); From b10294e939bd97614f8a81c89701f1aed4995236 Mon Sep 17 00:00:00 2001 From: Luc Date: Tue, 18 Jul 2023 20:48:23 +0000 Subject: [PATCH 20/36] Translated using Weblate (German) Currently translated at 100.0% (997 of 997 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/de/ --- locale/de_DE.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/de_DE.po b/locale/de_DE.po index 41d873e7ff..e706cb81c5 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-07-10 14:50+0000\n" +"PO-Revision-Date: 2023-07-19 21:06+0000\n" "Last-Translator: Luc \n" "Language: de_DE\n" "MIME-Version: 1.0\n" @@ -487,7 +487,7 @@ msgstr "Alle Kanäle werden verwendet" #: ports/raspberrypi/common-hal/usb_host/Port.c msgid "All dma channels in use" -msgstr "" +msgstr "All DMA-Kanäle in Verwendung" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" From b2c329735807aaca1a100663ebee9ca03f0276e1 Mon Sep 17 00:00:00 2001 From: Andi Chandler Date: Mon, 17 Jul 2023 20:14:52 +0000 Subject: [PATCH 21/36] Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (997 of 997 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/en_GB/ --- locale/en_GB.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/en_GB.po b/locale/en_GB.po index c4d1039de7..02d8748cf8 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-05-23 22:55+0000\n" +"PO-Revision-Date: 2023-07-19 21:06+0000\n" "Last-Translator: Andi Chandler \n" "Language-Team: none\n" "Language: en_GB\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.18-dev\n" +"X-Generator: Weblate 5.0-dev\n" #: main.c msgid "" @@ -486,7 +486,7 @@ msgstr "All channels in use" #: ports/raspberrypi/common-hal/usb_host/Port.c msgid "All dma channels in use" -msgstr "" +msgstr "All DMA channels in use" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" @@ -1378,7 +1378,7 @@ msgstr "Mismatched swap flag" #: ports/mimxrt10xx/common-hal/busio/SPI.c msgid "Missing MISO or MOSI Pin" -msgstr "Missing MISO or MOSI pin" +msgstr "Missing MISO or MOSI Pin" #: ports/stm/common-hal/busio/SPI.c msgid "Missing MISO or MOSI pin" @@ -1493,7 +1493,7 @@ msgstr "No IP" #: ports/espressif/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c msgid "No MISO Pin" -msgstr "No MISO pin" +msgstr "No MISO Pin" #: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c msgid "No MISO pin" @@ -1502,7 +1502,7 @@ msgstr "No MISO pin" #: ports/espressif/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c msgid "No MOSI Pin" -msgstr "No MOSI pin" +msgstr "No MOSI Pin" #: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c msgid "No MOSI pin" From 346f08f8b9aa7a71e41096339018197f3d649eee Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 13:16:00 -0500 Subject: [PATCH 22/36] synthio: Add Synthesizer.note_state This enables the specific use case of checking whether a note's release phase has ended, but is also potentially useful to implement a sort of "voice stealing" algorithm in Python code, which can take account of the note's envelope state as well as other factors specific to the program. --- shared-bindings/synthio/Synthesizer.c | 23 +++++++++++++++++++- shared-bindings/synthio/Synthesizer.h | 1 + shared-bindings/synthio/__init__.c | 17 +++++++++++++++ shared-bindings/synthio/__init__.h | 6 +++++ shared-module/synthio/Synthesizer.c | 11 ++++++++++ shared-module/synthio/__init__.h | 6 +---- tests/circuitpython/synthio_note_info.py | 17 +++++++++++++++ tests/circuitpython/synthio_note_info.py.exp | 23 ++++++++++++++++++++ 8 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 tests/circuitpython/synthio_note_info.py create mode 100644 tests/circuitpython/synthio_note_info.py.exp diff --git a/shared-bindings/synthio/Synthesizer.c b/shared-bindings/synthio/Synthesizer.c index 8e186573cd..148e773b6b 100644 --- a/shared-bindings/synthio/Synthesizer.c +++ b/shared-bindings/synthio/Synthesizer.c @@ -31,6 +31,7 @@ #include "py/binary.h" #include "py/objproperty.h" #include "py/runtime.h" +#include "py/enum.h" #include "shared-bindings/util.h" #include "shared-bindings/synthio/Biquad.h" #include "shared-bindings/synthio/Synthesizer.h" @@ -256,7 +257,9 @@ MP_PROPERTY_GETTER(synthio_synthesizer_sample_rate_obj, (mp_obj_t)&synthio_synthesizer_get_sample_rate_obj); //| pressed: NoteSequence -//| """A sequence of the currently pressed notes (read-only property)""" +//| """A sequence of the currently pressed notes (read-only property). +//| +//| This does not include notes in the release phase of the envelope.""" //| STATIC mp_obj_t synthio_synthesizer_obj_get_pressed(mp_obj_t self_in) { synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in); @@ -268,6 +271,23 @@ MP_DEFINE_CONST_FUN_OBJ_1(synthio_synthesizer_get_pressed_obj, synthio_synthesiz MP_PROPERTY_GETTER(synthio_synthesizer_pressed_obj, (mp_obj_t)&synthio_synthesizer_get_pressed_obj); +//| def note_info(note: Note) -> Tuple[Optional[EnvelopeState], float]: +//| """Get info about a note's current envelope state +//| +//| If the note is currently playing (including in the release phase), the returned value gives the current envelope state and the current envelope value. +//| +//| If the note is not playing on this synthesizer, returns the tuple ``(None, 0.0)``.""" +STATIC mp_obj_t synthio_synthesizer_obj_note_info(mp_obj_t self_in, mp_obj_t note) { + synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in); + check_for_deinit(self); + mp_float_t vol = MICROPY_FLOAT_CONST(0.0); + envelope_state_e state = common_hal_synthio_synthesizer_note_info(self, note, &vol); + return MP_OBJ_NEW_TUPLE( + cp_enum_find(&synthio_note_state_type, state), + mp_obj_new_float(vol)); +} +MP_DEFINE_CONST_FUN_OBJ_2(synthio_synthesizer_note_info_obj, synthio_synthesizer_obj_note_info); + //| blocks: List[BlockInput] //| """A list of blocks to advance whether or not they are associated with a playing note. //| @@ -417,6 +437,7 @@ STATIC const mp_rom_map_elem_t synthio_synthesizer_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_sample_rate), MP_ROM_PTR(&synthio_synthesizer_sample_rate_obj) }, { MP_ROM_QSTR(MP_QSTR_max_polyphony), MP_ROM_INT(CIRCUITPY_SYNTHIO_MAX_CHANNELS) }, { MP_ROM_QSTR(MP_QSTR_pressed), MP_ROM_PTR(&synthio_synthesizer_pressed_obj) }, + { MP_ROM_QSTR(MP_QSTR_note_info), MP_ROM_PTR(&synthio_synthesizer_note_info_obj) }, { MP_ROM_QSTR(MP_QSTR_blocks), MP_ROM_PTR(&synthio_synthesizer_blocks_obj) }, }; STATIC MP_DEFINE_CONST_DICT(synthio_synthesizer_locals_dict, synthio_synthesizer_locals_dict_table); diff --git a/shared-bindings/synthio/Synthesizer.h b/shared-bindings/synthio/Synthesizer.h index 16543ce2c3..8ae0af3bf3 100644 --- a/shared-bindings/synthio/Synthesizer.h +++ b/shared-bindings/synthio/Synthesizer.h @@ -45,3 +45,4 @@ void common_hal_synthio_synthesizer_retrigger(synthio_synthesizer_obj_t *self, m void common_hal_synthio_synthesizer_release_all(synthio_synthesizer_obj_t *self); mp_obj_t common_hal_synthio_synthesizer_get_pressed_notes(synthio_synthesizer_obj_t *self); mp_obj_t common_hal_synthio_synthesizer_get_blocks(synthio_synthesizer_obj_t *self); +envelope_state_e common_hal_synthio_synthesizer_note_info(synthio_synthesizer_obj_t *self, mp_obj_t note, mp_float_t *vol_out); diff --git a/shared-bindings/synthio/__init__.c b/shared-bindings/synthio/__init__.c index b295430b09..8eba79d2a0 100644 --- a/shared-bindings/synthio/__init__.c +++ b/shared-bindings/synthio/__init__.c @@ -45,6 +45,22 @@ #include "shared-module/synthio/LFO.h" +MAKE_ENUM_VALUE(synthio_note_state_type, note_state, ATTACK, SYNTHIO_ENVELOPE_STATE_ATTACK); +MAKE_ENUM_VALUE(synthio_note_state_type, note_state, DECAY, SYNTHIO_ENVELOPE_STATE_DECAY); +MAKE_ENUM_VALUE(synthio_note_state_type, note_state, SUSTAIN, SYNTHIO_ENVELOPE_STATE_SUSTAIN); +MAKE_ENUM_VALUE(synthio_note_state_type, note_state, RELEASE, SYNTHIO_ENVELOPE_STATE_RELEASE); + +MAKE_ENUM_MAP(synthio_note_state) { + MAKE_ENUM_MAP_ENTRY(note_state, ATTACK), + MAKE_ENUM_MAP_ENTRY(note_state, DECAY), + MAKE_ENUM_MAP_ENTRY(note_state, SUSTAIN), + MAKE_ENUM_MAP_ENTRY(note_state, RELEASE), +}; + +STATIC MP_DEFINE_CONST_DICT(synthio_note_state_locals_dict, synthio_note_state_locals_table); +MAKE_PRINTER(synthio, synthio_note_state); +MAKE_ENUM_TYPE(synthio, NoteState, synthio_note_state); + #define default_attack_time (MICROPY_FLOAT_CONST(0.1)) #define default_decay_time (MICROPY_FLOAT_CONST(0.05)) #define default_release_time (MICROPY_FLOAT_CONST(0.2)) @@ -316,6 +332,7 @@ STATIC const mp_rom_map_elem_t synthio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_MathOperation), MP_ROM_PTR(&synthio_math_operation_type) }, { MP_ROM_QSTR(MP_QSTR_MidiTrack), MP_ROM_PTR(&synthio_miditrack_type) }, { MP_ROM_QSTR(MP_QSTR_Note), MP_ROM_PTR(&synthio_note_type) }, + { MP_ROM_QSTR(MP_QSTR_NoteState), MP_ROM_PTR(&synthio_note_state_type) }, { MP_ROM_QSTR(MP_QSTR_LFO), MP_ROM_PTR(&synthio_lfo_type) }, { MP_ROM_QSTR(MP_QSTR_Synthesizer), MP_ROM_PTR(&synthio_synthesizer_type) }, { MP_ROM_QSTR(MP_QSTR_from_file), MP_ROM_PTR(&synthio_from_file_obj) }, diff --git a/shared-bindings/synthio/__init__.h b/shared-bindings/synthio/__init__.h index 2315d92e58..4a44277e85 100644 --- a/shared-bindings/synthio/__init__.h +++ b/shared-bindings/synthio/__init__.h @@ -29,10 +29,16 @@ #include "py/objnamedtuple.h" #include "py/enum.h" +typedef enum { + SYNTHIO_ENVELOPE_STATE_ATTACK, SYNTHIO_ENVELOPE_STATE_DECAY, + SYNTHIO_ENVELOPE_STATE_SUSTAIN, SYNTHIO_ENVELOPE_STATE_RELEASE +} envelope_state_e; + typedef enum synthio_bend_mode_e { SYNTHIO_BEND_MODE_STATIC, SYNTHIO_BEND_MODE_VIBRATO, SYNTHIO_BEND_MODE_SWEEP, SYNTHIO_BEND_MODE_SWEEP_IN } synthio_bend_mode_t; +extern const mp_obj_type_t synthio_note_state_type; extern const cp_enum_obj_t bend_mode_VIBRATO_obj; extern const mp_obj_type_t synthio_bend_mode_type; typedef struct synthio_synth synthio_synth_t; diff --git a/shared-module/synthio/Synthesizer.c b/shared-module/synthio/Synthesizer.c index 7dc888dfd0..672ac5b9e6 100644 --- a/shared-module/synthio/Synthesizer.c +++ b/shared-module/synthio/Synthesizer.c @@ -185,6 +185,17 @@ mp_obj_t common_hal_synthio_synthesizer_get_pressed_notes(synthio_synthesizer_ob return MP_OBJ_FROM_PTR(result); } +envelope_state_e common_hal_synthio_synthesizer_note_info(synthio_synthesizer_obj_t *self, mp_obj_t note, mp_float_t *vol_out) { + for (int chan = 0; chan < CIRCUITPY_SYNTHIO_MAX_CHANNELS; chan++) { + if (self->synth.span.note_obj[chan] == note) { + *vol_out = self->synth.envelope_state[chan].level / 32767.; + return self->synth.envelope_state[chan].state; + } + } + return (envelope_state_e) - 1; +} + + mp_obj_t common_hal_synthio_synthesizer_get_blocks(synthio_synthesizer_obj_t *self) { return self->blocks; } diff --git a/shared-module/synthio/__init__.h b/shared-module/synthio/__init__.h index 9e4db96d50..178e4fb866 100644 --- a/shared-module/synthio/__init__.h +++ b/shared-module/synthio/__init__.h @@ -35,6 +35,7 @@ #define SYNTHIO_FREQUENCY_SHIFT (16) #include "shared-module/audiocore/__init__.h" +#include "shared-bindings/synthio/__init__.h" typedef struct { uint16_t dur; @@ -49,11 +50,6 @@ typedef struct { uint16_t attack_level, sustain_level; } synthio_envelope_definition_t; -typedef enum { - SYNTHIO_ENVELOPE_STATE_ATTACK, SYNTHIO_ENVELOPE_STATE_DECAY, - SYNTHIO_ENVELOPE_STATE_SUSTAIN, SYNTHIO_ENVELOPE_STATE_RELEASE -} envelope_state_e; - typedef struct { int16_t level; uint16_t substep; diff --git a/tests/circuitpython/synthio_note_info.py b/tests/circuitpython/synthio_note_info.py new file mode 100644 index 0000000000..4d4e7a59ae --- /dev/null +++ b/tests/circuitpython/synthio_note_info.py @@ -0,0 +1,17 @@ +from synthio import Synthesizer, Note, Envelope +from audiocore import get_buffer + +s = Synthesizer() +n = Note(440, envelope=Envelope()) +print("{} {:.2f}".format(*s.note_info(n))) +s.press(n) +print("press") +for _ in range(9): + print("{} {:.2f}".format(*s.note_info(n))) + get_buffer(s) + +s.release(n) +print("release") +for _ in range(11): + print("{} {:.2f}".format(*s.note_info(n))) + get_buffer(s) diff --git a/tests/circuitpython/synthio_note_info.py.exp b/tests/circuitpython/synthio_note_info.py.exp new file mode 100644 index 0000000000..a69fb3c8c0 --- /dev/null +++ b/tests/circuitpython/synthio_note_info.py.exp @@ -0,0 +1,23 @@ +None 0.00 +press +synthio.NoteState.ATTACK 0.23 +synthio.NoteState.ATTACK 0.46 +synthio.NoteState.ATTACK 0.70 +synthio.NoteState.ATTACK 0.93 +synthio.NoteState.DECAY 1.00 +synthio.NoteState.DECAY 0.91 +synthio.NoteState.DECAY 0.81 +synthio.NoteState.SUSTAIN 0.80 +synthio.NoteState.SUSTAIN 0.80 +release +synthio.NoteState.RELEASE 0.80 +synthio.NoteState.RELEASE 0.71 +synthio.NoteState.RELEASE 0.61 +synthio.NoteState.RELEASE 0.52 +synthio.NoteState.RELEASE 0.43 +synthio.NoteState.RELEASE 0.34 +synthio.NoteState.RELEASE 0.24 +synthio.NoteState.RELEASE 0.15 +synthio.NoteState.RELEASE 0.06 +synthio.NoteState.RELEASE 0.00 +None 0.00 From 5f082561b32ea010b9bd2a2f797d577d037cae46 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 20 Jul 2023 11:16:31 -0700 Subject: [PATCH 23/36] Unify some error strings --- locale/circuitpython.pot | 70 +++++-------------- ports/broadcom/common-hal/busio/UART.c | 4 +- ports/espressif/common-hal/busio/SPI.c | 8 +-- ports/espressif/common-hal/busio/UART.c | 4 +- ports/mimxrt10xx/common-hal/busio/SPI.c | 13 ++-- ports/mimxrt10xx/common-hal/busio/UART.c | 4 +- ports/nrf/common-hal/busio/UART.c | 4 +- ports/raspberrypi/common-hal/busio/UART.c | 4 +- ports/silabs/common-hal/busio/I2C.c | 2 +- ports/silabs/common-hal/busio/SPI.c | 2 +- ports/silabs/common-hal/busio/UART.c | 2 +- ports/stm/common-hal/busio/I2C.c | 2 +- ports/stm/common-hal/busio/SPI.c | 15 ++-- ports/stm/common-hal/busio/UART.c | 4 +- ports/stm/common-hal/canio/CAN.c | 2 +- ports/stm/common-hal/sdioio/SDCard.c | 2 +- shared-bindings/displayio/FourWire.c | 2 +- shared-bindings/displayio/I2CDisplay.c | 2 +- shared-bindings/paralleldisplay/ParallelBus.c | 2 +- shared-module/bitbangio/SPI.c | 11 +-- 20 files changed, 65 insertions(+), 94 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 368836a4db..9ebb85d13f 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -126,8 +126,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -182,6 +184,7 @@ msgid "%q must be 1 when %q is True" msgstr "" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "" @@ -779,10 +782,6 @@ msgstr "" msgid "Cannot subclass slice" msgstr "" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -1090,13 +1089,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "" @@ -1355,14 +1351,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1436,6 +1424,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "" @@ -1469,36 +1465,6 @@ msgstr "" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "" @@ -2405,6 +2371,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3628,11 +3595,6 @@ msgstr "" msgid "no module named '%q'" msgstr "" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" diff --git a/ports/broadcom/common-hal/busio/UART.c b/ports/broadcom/common-hal/busio/UART.c index 5be098cf03..0eb72b1456 100644 --- a/ports/broadcom/common-hal/busio/UART.c +++ b/ports/broadcom/common-hal/busio/UART.c @@ -352,7 +352,7 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { // Write characters. size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, size_t len, int *errcode) { if (self->tx_pin == NULL) { - mp_raise_ValueError(translate("No TX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_tx); } COMPLETE_MEMORY_READS; @@ -400,7 +400,7 @@ STATIC void enable_interrupt(busio_uart_obj_t *self) { // Read characters. size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t len, int *errcode) { if (self->rx_pin == NULL) { - mp_raise_ValueError(translate("No RX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_rx); } if (len == 0) { diff --git a/ports/espressif/common-hal/busio/SPI.c b/ports/espressif/common-hal/busio/SPI.c index 5218fdbf9d..0b6b395c51 100644 --- a/ports/espressif/common-hal/busio/SPI.c +++ b/ports/espressif/common-hal/busio/SPI.c @@ -186,7 +186,7 @@ void common_hal_busio_spi_unlock(busio_spi_obj_t *self) { bool common_hal_busio_spi_write(busio_spi_obj_t *self, const uint8_t *data, size_t len) { if (self->MOSI == NULL) { - mp_raise_ValueError(translate("No MOSI Pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_mosi); } return common_hal_busio_spi_transfer(self, data, NULL, len); } @@ -194,7 +194,7 @@ bool common_hal_busio_spi_write(busio_spi_obj_t *self, bool common_hal_busio_spi_read(busio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_value) { if (self->MISO == NULL) { - mp_raise_ValueError(translate("No MISO Pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_miso); } if (self->MOSI == NULL) { return common_hal_busio_spi_transfer(self, NULL, data, len); @@ -210,10 +210,10 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, return true; } if (self->MOSI == NULL && data_out != NULL) { - mp_raise_ValueError(translate("No MOSI Pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_mosi); } if (self->MISO == NULL && data_in != NULL) { - mp_raise_ValueError(translate("No MISO Pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_miso); } spi_transaction_t transactions[MAX_SPI_TRANSACTIONS]; diff --git a/ports/espressif/common-hal/busio/UART.c b/ports/espressif/common-hal/busio/UART.c index c13bdedac0..37e0092726 100644 --- a/ports/espressif/common-hal/busio/UART.c +++ b/ports/espressif/common-hal/busio/UART.c @@ -304,7 +304,7 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { // Read characters. size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t len, int *errcode) { if (self->rx_pin == NULL) { - mp_raise_ValueError(translate("No RX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_rx); } if (len == 0) { // Nothing to read. @@ -357,7 +357,7 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t // Write characters. size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, size_t len, int *errcode) { if (self->tx_pin == NULL) { - mp_raise_ValueError(translate("No TX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_tx); } size_t left_to_write = len; diff --git a/ports/mimxrt10xx/common-hal/busio/SPI.c b/ports/mimxrt10xx/common-hal/busio/SPI.c index 1ab9394244..e32b635611 100644 --- a/ports/mimxrt10xx/common-hal/busio/SPI.c +++ b/ports/mimxrt10xx/common-hal/busio/SPI.c @@ -182,7 +182,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self, self->spi = mcu_spi_banks[self->clock->bank_idx - 1]; } else { if (spi_taken) { - mp_raise_ValueError(translate("Hardware busy, try alternative pins")); + mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } else { raise_ValueError_invalid_pins(); } @@ -331,7 +331,7 @@ bool common_hal_busio_spi_write(busio_spi_obj_t *self, return true; } if (self->mosi == NULL) { - mp_raise_ValueError(translate("No MOSI Pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_mosi); } lpspi_transfer_t xfer = { 0 }; @@ -349,7 +349,7 @@ bool common_hal_busio_spi_read(busio_spi_obj_t *self, return true; } if (self->miso == NULL) { - mp_raise_ValueError(translate("No MISO Pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_miso); } LPSPI_SetDummyData(self->spi, write_value); @@ -367,8 +367,11 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou if (len == 0) { return true; } - if (self->miso == NULL || self->mosi == NULL) { - mp_raise_ValueError(translate("Missing MISO or MOSI Pin")); + if (self->MOSI == NULL && data_out != NULL) { + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_mosi); + } + if (self->MISO == NULL && data_in != NULL) { + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_miso); } LPSPI_SetDummyData(self->spi, 0xFF); diff --git a/ports/mimxrt10xx/common-hal/busio/UART.c b/ports/mimxrt10xx/common-hal/busio/UART.c index e4d5fda6ae..d069836295 100644 --- a/ports/mimxrt10xx/common-hal/busio/UART.c +++ b/ports/mimxrt10xx/common-hal/busio/UART.c @@ -401,7 +401,7 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { // Read characters. size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t len, int *errcode) { if (self->rx == NULL) { - mp_raise_ValueError(translate("No RX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_rx); } if (len == 0) { @@ -458,7 +458,7 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t // Write characters. size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, size_t len, int *errcode) { if (self->tx == NULL) { - mp_raise_ValueError(translate("No TX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_tx); } if (self->rs485_dir && len) { GPIO_PinWrite(self->rs485_dir->gpio, self->rs485_dir->number, !self->rs485_invert); diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c index 626956946f..1c63e73092 100644 --- a/ports/nrf/common-hal/busio/UART.c +++ b/ports/nrf/common-hal/busio/UART.c @@ -297,7 +297,7 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { // Read characters. size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t len, int *errcode) { if (nrf_uarte_rx_pin_get(self->uarte->p_reg) == NRF_UARTE_PSEL_DISCONNECTED) { - mp_raise_ValueError(translate("No RX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_rx); } uint64_t start_ticks = supervisor_ticks_ms64(); @@ -347,7 +347,7 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t // Write characters. size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, size_t len, int *errcode) { if (nrf_uarte_tx_pin_get(self->uarte->p_reg) == NRF_UARTE_PSEL_DISCONNECTED) { - mp_raise_ValueError(translate("No TX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_tx); } if (len == 0) { diff --git a/ports/raspberrypi/common-hal/busio/UART.c b/ports/raspberrypi/common-hal/busio/UART.c index 156a5e11ce..28cfc8b052 100644 --- a/ports/raspberrypi/common-hal/busio/UART.c +++ b/ports/raspberrypi/common-hal/busio/UART.c @@ -211,7 +211,7 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { // Write characters. size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, size_t len, int *errcode) { if (self->tx_pin == NO_PIN) { - mp_raise_ValueError(translate("No TX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_tx); } if (self->rs485_dir_pin != NO_PIN) { @@ -239,7 +239,7 @@ size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, // Read characters. size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t len, int *errcode) { if (self->rx_pin == NO_PIN) { - mp_raise_ValueError(translate("No RX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_rx); } if (len == 0) { diff --git a/ports/silabs/common-hal/busio/I2C.c b/ports/silabs/common-hal/busio/I2C.c index 6d858be85e..62ac14f4e9 100644 --- a/ports/silabs/common-hal/busio/I2C.c +++ b/ports/silabs/common-hal/busio/I2C.c @@ -72,7 +72,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, common_hal_mcu_pin_claim(sda); in_used = true; } else { - mp_raise_ValueError(translate("Hardware busy, try alternative pins")); + mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } } else { raise_ValueError_invalid_pins(); diff --git a/ports/silabs/common-hal/busio/SPI.c b/ports/silabs/common-hal/busio/SPI.c index a6f3109a32..89c8012477 100644 --- a/ports/silabs/common-hal/busio/SPI.c +++ b/ports/silabs/common-hal/busio/SPI.c @@ -95,7 +95,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self, mp_raise_ValueError(translate("SPI init error")); } } else { - mp_raise_ValueError(translate("Hardware busy, try alternative pins")); + mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } } else { raise_ValueError_invalid_pins(); diff --git a/ports/silabs/common-hal/busio/UART.c b/ports/silabs/common-hal/busio/UART.c index 8b1883d906..75c46f4725 100644 --- a/ports/silabs/common-hal/busio/UART.c +++ b/ports/silabs/common-hal/busio/UART.c @@ -131,7 +131,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, context = self; } else { - mp_raise_ValueError(translate("Hardware busy, try alternative pins")); + mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } } else { diff --git a/ports/stm/common-hal/busio/I2C.c b/ports/stm/common-hal/busio/I2C.c index 259d678f2b..42c32b2b52 100644 --- a/ports/stm/common-hal/busio/I2C.c +++ b/ports/stm/common-hal/busio/I2C.c @@ -117,7 +117,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, I2Cx = mcu_i2c_banks[self->sda->periph_index - 1]; } else { if (i2c_taken) { - mp_raise_ValueError(translate("Hardware busy, try alternative pins")); + mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } else { raise_ValueError_invalid_pins(); } diff --git a/ports/stm/common-hal/busio/SPI.c b/ports/stm/common-hal/busio/SPI.c index 89ec4b7cdc..2fea1149eb 100644 --- a/ports/stm/common-hal/busio/SPI.c +++ b/ports/stm/common-hal/busio/SPI.c @@ -160,7 +160,7 @@ STATIC int check_pins(busio_spi_obj_t *self, } if (spi_taken) { - mp_raise_ValueError(translate("Hardware busy, try alternative pins")); + mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } else { raise_ValueError_invalid_pin(); } @@ -347,7 +347,7 @@ void common_hal_busio_spi_unlock(busio_spi_obj_t *self) { bool common_hal_busio_spi_write(busio_spi_obj_t *self, const uint8_t *data, size_t len) { if (self->mosi == NULL) { - mp_raise_ValueError(translate("No MOSI pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_mosi); } HAL_StatusTypeDef result = HAL_SPI_Transmit(&self->handle, (uint8_t *)data, (uint16_t)len, HAL_MAX_DELAY); return result == HAL_OK; @@ -356,9 +356,9 @@ bool common_hal_busio_spi_write(busio_spi_obj_t *self, bool common_hal_busio_spi_read(busio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_value) { if (self->miso == NULL && !self->half_duplex) { - mp_raise_ValueError(translate("No MISO pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_miso); } else if (self->half_duplex && self->mosi == NULL) { - mp_raise_ValueError(translate("No MOSI pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_mosi); } HAL_StatusTypeDef result = HAL_OK; if ((!self->half_duplex && self->mosi == NULL) || (self->half_duplex && self->mosi != NULL && self->miso == NULL)) { @@ -372,8 +372,11 @@ bool common_hal_busio_spi_read(busio_spi_obj_t *self, bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_out, uint8_t *data_in, size_t len) { - if (self->miso == NULL || self->mosi == NULL) { - mp_raise_ValueError(translate("Missing MISO or MOSI pin")); + if (self->mosi == NULL && data_out != NULL) { + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_mosi); + } + if (self->miso == NULL && data_in != NULL) { + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_miso); } HAL_StatusTypeDef result = HAL_SPI_TransmitReceive(&self->handle, (uint8_t *)data_out, data_in, (uint16_t)len,HAL_MAX_DELAY); diff --git a/ports/stm/common-hal/busio/UART.c b/ports/stm/common-hal/busio/UART.c index cdace31639..abf37ab881 100644 --- a/ports/stm/common-hal/busio/UART.c +++ b/ports/stm/common-hal/busio/UART.c @@ -293,7 +293,7 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t len, int *errcode) { if (self->rx == NULL) { - mp_raise_ValueError(translate("No RX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_rx); } uint64_t start_ticks = supervisor_ticks_ms64(); @@ -327,7 +327,7 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t // Write characters. size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, size_t len, int *errcode) { if (self->tx == NULL) { - mp_raise_ValueError(translate("No TX pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_tx); } // Disable UART IRQ to avoid resource hazards in Rx IRQ handler diff --git a/ports/stm/common-hal/canio/CAN.c b/ports/stm/common-hal/canio/CAN.c index 992745b80a..ca857d5643 100644 --- a/ports/stm/common-hal/canio/CAN.c +++ b/ports/stm/common-hal/canio/CAN.c @@ -69,7 +69,7 @@ void common_hal_canio_can_construct(canio_can_obj_t *self, const mcu_pin_obj_t * } if (reserved_can[periph_index]) { - mp_raise_ValueError(translate("Hardware busy, try alternative pins")); + mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } const uint32_t can_frequency = 42000000; diff --git a/ports/stm/common-hal/sdioio/SDCard.c b/ports/stm/common-hal/sdioio/SDCard.c index 8eeae2781d..6f3eb682df 100644 --- a/ports/stm/common-hal/sdioio/SDCard.c +++ b/ports/stm/common-hal/sdioio/SDCard.c @@ -113,7 +113,7 @@ STATIC int check_pins(sdioio_sdcard_obj_t *self, } if (sdio_taken) { - mp_raise_ValueError(translate("Hardware busy, try alternative pins")); + mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } else { raise_ValueError_invalid_pin(); } diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c index 1f099f5061..29cdf09299 100644 --- a/shared-bindings/displayio/FourWire.c +++ b/shared-bindings/displayio/FourWire.c @@ -114,7 +114,7 @@ STATIC mp_obj_t displayio_fourwire_obj_reset(mp_obj_t self_in) { displayio_fourwire_obj_t *self = self_in; if (!common_hal_displayio_fourwire_reset(self)) { - mp_raise_RuntimeError(translate("no reset pin available")); + mp_raise_RuntimeError_varg(translate("No %q pin"), MP_QSTR_reset); } return mp_const_none; } diff --git a/shared-bindings/displayio/I2CDisplay.c b/shared-bindings/displayio/I2CDisplay.c index f2647b0b16..ca5968421c 100644 --- a/shared-bindings/displayio/I2CDisplay.c +++ b/shared-bindings/displayio/I2CDisplay.c @@ -91,7 +91,7 @@ STATIC mp_obj_t displayio_i2cdisplay_obj_reset(mp_obj_t self_in) { displayio_i2cdisplay_obj_t *self = self_in; if (!common_hal_displayio_i2cdisplay_reset(self)) { - mp_raise_RuntimeError(translate("no reset pin available")); + mp_raise_RuntimeError_varg(translate("No %q pin"), MP_QSTR_reset); } return mp_const_none; } diff --git a/shared-bindings/paralleldisplay/ParallelBus.c b/shared-bindings/paralleldisplay/ParallelBus.c index ad9a1efdce..f8ab6470e4 100644 --- a/shared-bindings/paralleldisplay/ParallelBus.c +++ b/shared-bindings/paralleldisplay/ParallelBus.c @@ -122,7 +122,7 @@ STATIC mp_obj_t paralleldisplay_parallelbus_obj_reset(mp_obj_t self_in) { paralleldisplay_parallelbus_obj_t *self = self_in; if (!common_hal_paralleldisplay_parallelbus_reset(self)) { - mp_raise_RuntimeError(translate("no reset pin available")); + mp_raise_RuntimeError_varg(translate("No %q pin"), MP_QSTR_reset); } return mp_const_none; } diff --git a/shared-module/bitbangio/SPI.c b/shared-module/bitbangio/SPI.c index d740a214e7..c82cecff62 100644 --- a/shared-module/bitbangio/SPI.c +++ b/shared-module/bitbangio/SPI.c @@ -123,7 +123,7 @@ void shared_module_bitbangio_spi_unlock(bitbangio_spi_obj_t *self) { // Writes out the given data. bool shared_module_bitbangio_spi_write(bitbangio_spi_obj_t *self, const uint8_t *data, size_t len) { if (len > 0 && !self->has_mosi) { - mp_raise_ValueError(translate("No MOSI pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_mosi); } uint32_t delay_half = self->delay_half; @@ -178,7 +178,7 @@ bool shared_module_bitbangio_spi_write(bitbangio_spi_obj_t *self, const uint8_t // Reads in len bytes while outputting zeroes. bool shared_module_bitbangio_spi_read(bitbangio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_data) { if (len > 0 && !self->has_miso) { - mp_raise_ValueError(translate("No MISO pin")); + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_miso); } uint32_t delay_half = self->delay_half; @@ -245,8 +245,11 @@ bool shared_module_bitbangio_spi_read(bitbangio_spi_obj_t *self, uint8_t *data, // transfer bool shared_module_bitbangio_spi_transfer(bitbangio_spi_obj_t *self, const uint8_t *dout, uint8_t *din, size_t len) { - if (len > 0 && (!self->has_mosi || !self->has_miso)) { - mp_raise_ValueError(translate("Cannot transfer without MOSI and MISO pins")); + if (!self->has_mosi && dout != NULL) { + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_mosi); + } + if (!self->has_miso && din != NULL) { + mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_miso); } uint32_t delay_half = self->delay_half; From d7fa7380b877aaac628f65acc760fa76624355ca Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 20 Jul 2023 11:18:00 -0700 Subject: [PATCH 24/36] Move some find_qstr wrappers to tcm next to it --- py/qstr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/py/qstr.c b/py/qstr.c index 96e2a79192..09ef9ea7ed 100644 --- a/py/qstr.c +++ b/py/qstr.c @@ -289,18 +289,18 @@ mp_uint_t PLACE_IN_ITCM(qstr_hash)(qstr q) { return attr.hash; } -size_t qstr_len(qstr q) { +size_t PLACE_IN_ITCM(qstr_len)(qstr q) { qstr_attr_t attr; find_qstr(q, &attr); return attr.len; } -const char *qstr_str(qstr q) { +const char *PLACE_IN_ITCM(qstr_str)(qstr q) { qstr_attr_t attr; return find_qstr(q, &attr); } -const byte *qstr_data(qstr q, size_t *len) { +const byte *PLACE_IN_ITCM(qstr_data)(qstr q, size_t *len) { qstr_attr_t attr; const char *qd = find_qstr(q, &attr); *len = attr.len; From a56e97db1df6d5c050c8506414ba9c7c0423fc53 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 20 Jul 2023 11:19:57 -0700 Subject: [PATCH 25/36] Align MP heap allocations to cache lines --- ports/mimxrt10xx/mpconfigport.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/mimxrt10xx/mpconfigport.h b/ports/mimxrt10xx/mpconfigport.h index 16cc63bc2d..7cc17494bf 100644 --- a/ports/mimxrt10xx/mpconfigport.h +++ b/ports/mimxrt10xx/mpconfigport.h @@ -37,7 +37,6 @@ extern uint8_t _ld_filesystem_start; extern uint8_t _ld_filesystem_end; extern uint8_t _ld_default_stack_size; -// 20kiB stack #define CIRCUITPY_DEFAULT_STACK_SIZE ((uint32_t)&_ld_default_stack_size) #define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0) #define MICROPY_PY_FUNCTION_ATTRS (0) @@ -47,6 +46,10 @@ extern uint8_t _ld_default_stack_size; #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR ((uint32_t)&_ld_filesystem_start) #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE ((uint32_t)(&_ld_filesystem_end - &_ld_filesystem_start)) +// Allocate 32 bytes at a time instead of the default 16 so that allocated buffers +// are aligned to cache lines. +#define MICROPY_BYTES_PER_GC_BLOCK (32) + #include "py/circuitpy_mpconfig.h" #define MICROPY_PORT_ROOT_POINTERS \ From 29a4364ba77e11348a7958296ea55ebfc7b69826 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 14:05:56 -0500 Subject: [PATCH 26/36] fix method signature --- shared-bindings/synthio/Synthesizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/synthio/Synthesizer.c b/shared-bindings/synthio/Synthesizer.c index 148e773b6b..25d26fc661 100644 --- a/shared-bindings/synthio/Synthesizer.c +++ b/shared-bindings/synthio/Synthesizer.c @@ -271,7 +271,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(synthio_synthesizer_get_pressed_obj, synthio_synthesiz MP_PROPERTY_GETTER(synthio_synthesizer_pressed_obj, (mp_obj_t)&synthio_synthesizer_get_pressed_obj); -//| def note_info(note: Note) -> Tuple[Optional[EnvelopeState], float]: +//| def note_info(self, note: Note) -> Tuple[Optional[EnvelopeState], float]: //| """Get info about a note's current envelope state //| //| If the note is currently playing (including in the release phase), the returned value gives the current envelope state and the current envelope value. From f71831dea93b9e84a8d476025851cea46a71d29f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 14:10:44 -0500 Subject: [PATCH 27/36] skip all the byecode hex data, it's adequately checked ... by the disassembly just below This was tripped up because in exactly the right conditions some qstr could be of the form 'xx 63' and make the expression `\.\+63` match something other than what was intended. This test was re-worked upstream for mpy version 6 so it'll be a conflict to resolve when we get to that. :-/ --- tests/cmdline/cmd_showbc.py.exp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/cmdline/cmd_showbc.py.exp b/tests/cmdline/cmd_showbc.py.exp index 22712b79ee..c3dbfd74f8 100644 --- a/tests/cmdline/cmd_showbc.py.exp +++ b/tests/cmdline/cmd_showbc.py.exp @@ -1,7 +1,6 @@ File cmdline/cmd_showbc.py, code block '' (descriptor: \.\+, bytecode @\.\+ bytes) Raw bytecode (code_info_size=\\d\+, bytecode_size=\\d\+): ######## -\.\+63 arg names: (N_STATE 3) (N_EXC_STACK 0) From 70cf0610cc397b0dd71ff64d259a246822f0cf56 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 14:18:03 -0500 Subject: [PATCH 28/36] disable synthio on this board, it's very full --- ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk index c3e21a4c36..fcbbbd5bf9 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk @@ -12,6 +12,7 @@ LONGINT_IMPL = MPZ # No I2S on SAMD51G CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_SYNTHIO = 0 CIRCUITPY_BITBANG_APA102 = 1 From 60b233f160e0ee30f1abf412c0798bce50e7425c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 16:25:23 -0500 Subject: [PATCH 29/36] document EnvelopeState --- shared-bindings/synthio/__init__.c | 14 ++++++-- tests/circuitpython/synthio_note_info.py.exp | 38 ++++++++++---------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/shared-bindings/synthio/__init__.c b/shared-bindings/synthio/__init__.c index 8eba79d2a0..52d30cd2c4 100644 --- a/shared-bindings/synthio/__init__.c +++ b/shared-bindings/synthio/__init__.c @@ -45,6 +45,16 @@ #include "shared-module/synthio/LFO.h" +//| class EnvelopeState: +//| ATTACK: EnvelopeState +//| """The note is in its attack phase""" +//| DECAY: EnvelopeState +//| """The note is in its decay phase""" +//| SUSTAIN: EnvelopeState +//| """The note is in its sustain phase""" +//| RELEASE: EnvelopeState +//| """The note is in its release phase""" +//| MAKE_ENUM_VALUE(synthio_note_state_type, note_state, ATTACK, SYNTHIO_ENVELOPE_STATE_ATTACK); MAKE_ENUM_VALUE(synthio_note_state_type, note_state, DECAY, SYNTHIO_ENVELOPE_STATE_DECAY); MAKE_ENUM_VALUE(synthio_note_state_type, note_state, SUSTAIN, SYNTHIO_ENVELOPE_STATE_SUSTAIN); @@ -59,7 +69,7 @@ MAKE_ENUM_MAP(synthio_note_state) { STATIC MP_DEFINE_CONST_DICT(synthio_note_state_locals_dict, synthio_note_state_locals_table); MAKE_PRINTER(synthio, synthio_note_state); -MAKE_ENUM_TYPE(synthio, NoteState, synthio_note_state); +MAKE_ENUM_TYPE(synthio, EnvelopeState, synthio_note_state); #define default_attack_time (MICROPY_FLOAT_CONST(0.1)) #define default_decay_time (MICROPY_FLOAT_CONST(0.05)) @@ -332,7 +342,7 @@ STATIC const mp_rom_map_elem_t synthio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_MathOperation), MP_ROM_PTR(&synthio_math_operation_type) }, { MP_ROM_QSTR(MP_QSTR_MidiTrack), MP_ROM_PTR(&synthio_miditrack_type) }, { MP_ROM_QSTR(MP_QSTR_Note), MP_ROM_PTR(&synthio_note_type) }, - { MP_ROM_QSTR(MP_QSTR_NoteState), MP_ROM_PTR(&synthio_note_state_type) }, + { MP_ROM_QSTR(MP_QSTR_EnvelopeState), MP_ROM_PTR(&synthio_note_state_type) }, { MP_ROM_QSTR(MP_QSTR_LFO), MP_ROM_PTR(&synthio_lfo_type) }, { MP_ROM_QSTR(MP_QSTR_Synthesizer), MP_ROM_PTR(&synthio_synthesizer_type) }, { MP_ROM_QSTR(MP_QSTR_from_file), MP_ROM_PTR(&synthio_from_file_obj) }, diff --git a/tests/circuitpython/synthio_note_info.py.exp b/tests/circuitpython/synthio_note_info.py.exp index a69fb3c8c0..cd75174a11 100644 --- a/tests/circuitpython/synthio_note_info.py.exp +++ b/tests/circuitpython/synthio_note_info.py.exp @@ -1,23 +1,23 @@ None 0.00 press -synthio.NoteState.ATTACK 0.23 -synthio.NoteState.ATTACK 0.46 -synthio.NoteState.ATTACK 0.70 -synthio.NoteState.ATTACK 0.93 -synthio.NoteState.DECAY 1.00 -synthio.NoteState.DECAY 0.91 -synthio.NoteState.DECAY 0.81 -synthio.NoteState.SUSTAIN 0.80 -synthio.NoteState.SUSTAIN 0.80 +synthio.EnvelopeState.ATTACK 0.23 +synthio.EnvelopeState.ATTACK 0.46 +synthio.EnvelopeState.ATTACK 0.70 +synthio.EnvelopeState.ATTACK 0.93 +synthio.EnvelopeState.DECAY 1.00 +synthio.EnvelopeState.DECAY 0.91 +synthio.EnvelopeState.DECAY 0.81 +synthio.EnvelopeState.SUSTAIN 0.80 +synthio.EnvelopeState.SUSTAIN 0.80 release -synthio.NoteState.RELEASE 0.80 -synthio.NoteState.RELEASE 0.71 -synthio.NoteState.RELEASE 0.61 -synthio.NoteState.RELEASE 0.52 -synthio.NoteState.RELEASE 0.43 -synthio.NoteState.RELEASE 0.34 -synthio.NoteState.RELEASE 0.24 -synthio.NoteState.RELEASE 0.15 -synthio.NoteState.RELEASE 0.06 -synthio.NoteState.RELEASE 0.00 +synthio.EnvelopeState.RELEASE 0.80 +synthio.EnvelopeState.RELEASE 0.71 +synthio.EnvelopeState.RELEASE 0.61 +synthio.EnvelopeState.RELEASE 0.52 +synthio.EnvelopeState.RELEASE 0.43 +synthio.EnvelopeState.RELEASE 0.34 +synthio.EnvelopeState.RELEASE 0.24 +synthio.EnvelopeState.RELEASE 0.15 +synthio.EnvelopeState.RELEASE 0.06 +synthio.EnvelopeState.RELEASE 0.00 None 0.00 From 525dad71c3e26c076e24f587cf9c5c11e0302422 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 20 Jul 2023 16:00:43 -0700 Subject: [PATCH 30/36] Add RuntimeError_varg and fix imx capitalization --- ports/mimxrt10xx/common-hal/busio/SPI.c | 4 ++-- py/runtime.c | 7 +++++++ py/runtime.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ports/mimxrt10xx/common-hal/busio/SPI.c b/ports/mimxrt10xx/common-hal/busio/SPI.c index e32b635611..11dea30a48 100644 --- a/ports/mimxrt10xx/common-hal/busio/SPI.c +++ b/ports/mimxrt10xx/common-hal/busio/SPI.c @@ -367,10 +367,10 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou if (len == 0) { return true; } - if (self->MOSI == NULL && data_out != NULL) { + if (self->mosi == NULL && data_out != NULL) { mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_mosi); } - if (self->MISO == NULL && data_in != NULL) { + if (self->miso == NULL && data_in != NULL) { mp_raise_ValueError_varg(translate("No %q pin"), MP_QSTR_miso); } diff --git a/py/runtime.c b/py/runtime.c index ebe1590484..9bc5f9a584 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -1655,6 +1655,13 @@ NORETURN MP_COLD void mp_raise_RuntimeError(const compressed_string_t *msg) { mp_raise_msg(&mp_type_RuntimeError, msg); } +NORETURN MP_COLD void mp_raise_RuntimeError_varg(const compressed_string_t *fmt, ...) { + va_list argptr; + va_start(argptr,fmt); + mp_raise_msg_vlist(&mp_type_RuntimeError, fmt, argptr); + va_end(argptr); +} + NORETURN MP_COLD void mp_raise_ImportError(const compressed_string_t *msg) { mp_raise_msg(&mp_type_ImportError, msg); } diff --git a/py/runtime.h b/py/runtime.h index 196874bff9..d870bbc634 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -219,6 +219,7 @@ NORETURN void mp_raise_TypeError(const compressed_string_t *msg); NORETURN void mp_raise_TypeError_varg(const compressed_string_t *fmt, ...); NORETURN void mp_raise_AttributeError(const compressed_string_t *msg); NORETURN void mp_raise_RuntimeError(const compressed_string_t *msg); +NORETURN void mp_raise_RuntimeError_varg(const compressed_string_t *fmt, ...); NORETURN void mp_raise_ImportError(const compressed_string_t *msg); NORETURN void mp_raise_IndexError(const compressed_string_t *msg); NORETURN void mp_raise_IndexError_varg(const compressed_string_t *msg, ...); From c0de8a9cd946f8545d010ea60f69179401cf661c Mon Sep 17 00:00:00 2001 From: hexthat Date: Wed, 19 Jul 2023 23:24:25 +0000 Subject: [PATCH 31/36] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (997 of 997 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 4f56b14dfd..8ff874492e 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-07-16 04:32+0000\n" +"PO-Revision-Date: 2023-07-21 00:10+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -1641,7 +1641,7 @@ msgstr "Bù zhīchí jīshù" #: supervisor/shared/bluetooth/bluetooth.c msgid "Off" -msgstr "guānbì" +msgstr "Guānbì" #: supervisor/shared/bluetooth/bluetooth.c msgid "Ok" @@ -3286,7 +3286,7 @@ msgstr "bù zhèngquè de tiánchōng" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/transform.c msgid "index is out of bounds" -msgstr "suǒyǐn chāochū fànwéi" +msgstr "suǒyǐn yuèjiè" #: shared-bindings/_pixelmap/PixelMap.c msgid "index must be tuple or int" From a5fc766b2f78d4bb960ba6a77dbd5ec9cfd23e02 Mon Sep 17 00:00:00 2001 From: Tod Kurt Date: Fri, 21 Jul 2023 10:06:17 -0700 Subject: [PATCH 32/36] ESP32 synthio channels to 12 --- ports/espressif/mpconfigport.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 1b9808ad64..63cea3d0a8 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -38,6 +38,7 @@ CIRCUITPY_NVM ?= 1 CIRCUITPY_PS2IO ?= 1 CIRCUITPY_RGBMATRIX ?= 1 CIRCUITPY_ROTARYIO ?= 1 +CIRCUITPY_SYNTHIO_MAX_CHANNELS ?= 12 CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1 CIRCUITPY_WATCHDOG ?= 1 CIRCUITPY_WIFI ?= 1 From e58496feb281450235ca54c25d31b3de6e5ed723 Mon Sep 17 00:00:00 2001 From: Gaweng Tan Date: Sat, 22 Jul 2023 13:26:34 +0200 Subject: [PATCH 33/36] added Mapping to bits_per_value getter --- shared-bindings/displayio/Bitmap.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c index c678a76703..17a4b4c87f 100644 --- a/shared-bindings/displayio/Bitmap.c +++ b/shared-bindings/displayio/Bitmap.c @@ -116,6 +116,21 @@ MP_DEFINE_CONST_FUN_OBJ_1(displayio_bitmap_get_height_obj, displayio_bitmap_obj_ MP_PROPERTY_GETTER(displayio_bitmap_height_obj, (mp_obj_t)&displayio_bitmap_get_height_obj); +//| bits_per_value: int +//| """Bits per Pixel of the bitmap. (read only)""" +STATIC mp_obj_t displayio_bitmap_obj_get_bits_per_value(mp_obj_t self_in) { + displayio_bitmap_t *self = MP_OBJ_TO_PTR(self_in); + + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_bitmap_get_bits_per_value(self)); +} + +MP_DEFINE_CONST_FUN_OBJ_1(displayio_bitmap_get_bits_per_value_obj, displayio_bitmap_obj_get_bits_per_value); + +MP_PROPERTY_GETTER(displayio_bitmap_bits_per_value_obj, + (mp_obj_t)&displayio_bitmap_get_bits_per_value_obj); + + //| def __getitem__(self, index: Union[Tuple[int, int], int]) -> int: //| """Returns the value at the given index. The index can either be an x,y tuple or an int equal //| to ``y * width + x``. @@ -260,6 +275,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(displayio_bitmap_deinit_obj, displayio_bitmap_obj_dein STATIC const mp_rom_map_elem_t displayio_bitmap_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&displayio_bitmap_height_obj) }, { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&displayio_bitmap_width_obj) }, + { MP_ROM_QSTR(MP_QSTR_bits_per_value), MP_ROM_PTR(&displayio_bitmap_bits_per_value_obj) }, { MP_ROM_QSTR(MP_QSTR_fill), MP_ROM_PTR(&displayio_bitmap_fill_obj) }, { MP_ROM_QSTR(MP_QSTR_dirty), MP_ROM_PTR(&displayio_bitmap_dirty_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&displayio_bitmap_deinit_obj) }, From 8140d0cb03cdb3b49ff5c22631a5478a52e72c9b Mon Sep 17 00:00:00 2001 From: Gaweng Tan Date: Sat, 22 Jul 2023 14:34:06 +0200 Subject: [PATCH 34/36] Mapping python None to NULL in cadata var --- shared-bindings/ssl/SSLContext.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shared-bindings/ssl/SSLContext.c b/shared-bindings/ssl/SSLContext.c index ac5f7ad42d..ef227542fe 100644 --- a/shared-bindings/ssl/SSLContext.c +++ b/shared-bindings/ssl/SSLContext.c @@ -108,7 +108,10 @@ STATIC mp_obj_t ssl_sslcontext_load_verify_locations(size_t n_args, const mp_obj mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - const char *cadata = mp_obj_str_get_str(args[ARG_cadata].u_obj); + const char *cadata = NULL; + if (args[ARG_cadata].u_obj != mp_const_none) { + cadata = mp_obj_str_get_str(args[ARG_cadata].u_obj); + } common_hal_ssl_sslcontext_load_verify_locations(self, cadata); return mp_const_none; From 4bc12d9fb0887a7db264afea4e14f1978bfc76e4 Mon Sep 17 00:00:00 2001 From: Unexpected Maker Date: Sun, 23 Jul 2023 13:39:53 +1000 Subject: [PATCH 35/36] Update pins.c Changed naming of the second I2C board reference to match how others name things. --- ports/espressif/boards/unexpectedmaker_feathers3/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/pins.c b/ports/espressif/boards/unexpectedmaker_feathers3/pins.c index 4480e01438..5cdfc69ed2 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/pins.c +++ b/ports/espressif/boards/unexpectedmaker_feathers3/pins.c @@ -126,7 +126,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_STEMMA_VERTICAL_I2C), MP_ROM_PTR(&board_stemma_i2c_obj) }, - { MP_ROM_QSTR(MP_QSTR_STEMMA2_I2C), MP_ROM_PTR(&board_stemma_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C2), MP_ROM_PTR(&board_stemma_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_I2C2), MP_ROM_PTR(&board_stemma_i2c_obj) }, // SPI From 3ee9aaff970c97d3a8abe493722ddee1d9949d61 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 24 Jul 2023 18:42:48 +0200 Subject: [PATCH 36/36] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 88 +++++++++++++-------------------- locale/cs.po | 97 ++++++++++++++++-------------------- locale/de_DE.po | 103 +++++++++++++++++++-------------------- locale/el.po | 73 ++++++++------------------- locale/en_GB.po | 103 +++++++++++++++++++-------------------- locale/es.po | 103 +++++++++++++++++++-------------------- locale/fil.po | 76 +++++++++-------------------- locale/fr.po | 103 +++++++++++++++++++-------------------- locale/hi.po | 70 ++++++-------------------- locale/it_IT.po | 76 +++++++++-------------------- locale/ja.po | 91 ++++++++++++++-------------------- locale/ko.po | 70 ++++++-------------------- locale/nl.po | 91 ++++++++++++++-------------------- locale/pl.po | 88 +++++++++++++-------------------- locale/pt_BR.po | 103 +++++++++++++++++++-------------------- locale/ru.po | 103 +++++++++++++++++++-------------------- locale/sv.po | 103 +++++++++++++++++++-------------------- locale/tr.po | 100 +++++++++++++++++-------------------- locale/zh_Latn_pinyin.po | 103 +++++++++++++++++++-------------------- 19 files changed, 718 insertions(+), 1026 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 6208de5540..65084356f1 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -129,8 +129,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -185,6 +187,7 @@ msgid "%q must be 1 when %q is True" msgstr "" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q harus <= %d" @@ -786,10 +789,6 @@ msgstr "Tidak dapat menentukan RTS atau CTS dalam mode RS485" msgid "Cannot subclass slice" msgstr "Tidak dapat membuat subkelas dari irisan" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -1100,13 +1099,10 @@ msgstr "Grup sudah digunakan" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Perangkat keras sibuk, coba pin alternatif" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Perangkat keras sedang digunakan, coba pin alternatif" @@ -1367,14 +1363,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Tidak menemukan Pin MISO atau MOSI" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1448,6 +1436,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Tidak pin %q" @@ -1481,36 +1477,6 @@ msgstr "" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Tidak ada Pin MISO" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Tidak ada Pin MOSI" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Tidak pin RX" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Tidak ada pin TX" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Tidak ada clocks yang tersedia" @@ -2433,6 +2399,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3656,11 +3623,6 @@ msgstr "" msgid "no module named '%q'" msgstr "tidak ada modul yang bernama '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" @@ -4387,6 +4349,24 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "Zi harus berbentuk (n_section, 2)" +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Perangkat keras sibuk, coba pin alternatif" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Tidak menemukan Pin MISO atau MOSI" + +#~ msgid "No MISO Pin" +#~ msgstr "Tidak ada Pin MISO" + +#~ msgid "No MOSI Pin" +#~ msgstr "Tidak ada Pin MOSI" + +#~ msgid "No RX pin" +#~ msgstr "Tidak pin RX" + +#~ msgid "No TX pin" +#~ msgstr "Tidak ada pin TX" + #~ msgid "Brightness must be 0-1.0" #~ msgstr "Kecerahan harus di antara 0-1.0" diff --git a/locale/cs.po b/locale/cs.po index 751d6394b0..501cfed1c4 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -130,8 +130,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -186,6 +188,7 @@ msgid "%q must be 1 when %q is True" msgstr "%q musí být 1, pokud %q je True" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q musí být <= %d" @@ -786,10 +789,6 @@ msgstr "Nelze určit RTS nebo CTS v režimu RS485" msgid "Cannot subclass slice" msgstr "Nelze použít řez podtřídy" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Nelze měnit frekvenci časovače, který je již používán" @@ -1100,13 +1099,10 @@ msgstr "Skupina již byla použita" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Hardware je zaneprázdněn, zkuste alternativní piny" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Hardware je používán, zkuste alternativní piny" @@ -1367,14 +1363,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Chybí pin MISO nebo MOSI" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "Chybějící MISO nebo MOSI pin" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1448,6 +1436,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Žádný %q pin" @@ -1481,36 +1477,6 @@ msgstr "Žádné I2C zařízení na adrese: 0x%x" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Žádný pin MISO" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "Žádný MISO pin" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Žádný pin MOSI" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "Žádný MOSI pin" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Žádný RX pin" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Žádný TX pin" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Žádné dostupné hodiny" @@ -2420,6 +2386,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3643,11 +3610,6 @@ msgstr "" msgid "no module named '%q'" msgstr "" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" @@ -4373,6 +4335,33 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Hardware je zaneprázdněn, zkuste alternativní piny" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Chybí pin MISO nebo MOSI" + +#~ msgid "Missing MISO or MOSI pin" +#~ msgstr "Chybějící MISO nebo MOSI pin" + +#~ msgid "No MISO Pin" +#~ msgstr "Žádný pin MISO" + +#~ msgid "No MISO pin" +#~ msgstr "Žádný MISO pin" + +#~ msgid "No MOSI Pin" +#~ msgstr "Žádný pin MOSI" + +#~ msgid "No MOSI pin" +#~ msgstr "Žádný MOSI pin" + +#~ msgid "No RX pin" +#~ msgstr "Žádný RX pin" + +#~ msgid "No TX pin" +#~ msgstr "Žádný TX pin" + #~ msgid "Brightness must be 0-1.0" #~ msgstr "Jas musí být 0-1,0" diff --git a/locale/de_DE.po b/locale/de_DE.po index e706cb81c5..16c48fa6b6 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -138,8 +138,10 @@ msgstr "%q in %q muss von Typ %q sein, nicht %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -194,6 +196,7 @@ msgid "%q must be 1 when %q is True" msgstr "%q muss 1 sein, wenn %q wahr ist" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q muss <= %d sein" @@ -798,10 +801,6 @@ msgstr "RTS oder CTS können im RS485-Modus nicht angegeben werden" msgid "Cannot subclass slice" msgstr "Slice kann keine sub-klasse sein" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "Kann nicht ohne MISO und MOSI Pins transferieren" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -1119,13 +1118,10 @@ msgstr "Gruppe schon benutzt" msgid "Half duplex SPI is not implemented" msgstr "Hald-Duplex SPI is tnicht implementiert" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Hardware beschäftigt, versuche alternative Pins" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Hardware in Benutzung, probiere alternative Pins" @@ -1392,14 +1388,6 @@ msgstr "Nicht übereinstimmende Datengröße" msgid "Mismatched swap flag" msgstr "Nicht übereinstimmendes Swap-Flag" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Fehlender MISO- oder MOSI-Pin" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "MISO oder MOSI Pin fehlt" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1473,6 +1461,14 @@ msgid "Nimble out of memory" msgstr "Kein Speicher mehr für Nible vorhanden" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Kein %q-Pin" @@ -1506,36 +1502,6 @@ msgstr "Kein I2C-Gerät an Adresse: 0x%x" msgid "No IP" msgstr "Keine IP" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Kein MISO-Pin" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "Miso Pin fehlt" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Kein MOSI-Pin" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "MOSI Pin fehlt" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Kein RX-Pin" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Kein TX-Pin" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Keine Taktgeber verfügbar" @@ -2477,6 +2443,7 @@ msgstr "Beide Knöpfe wurden beim Starten gedrückt." #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "Knopf A wurde beim Starten gedrückt." @@ -3722,11 +3689,6 @@ msgstr "kein Standard-Seed" msgid "no module named '%q'" msgstr "Kein Modul mit dem Namen '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "kein Reset Pin verfügbar" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "keine Antwort von der SD-Karte" @@ -4460,6 +4422,39 @@ msgstr "zi muss eine Gleitkommazahl sein" msgid "zi must be of shape (n_section, 2)" msgstr "zi muss die Form (n_section, 2) haben" +#~ msgid "Cannot transfer without MOSI and MISO pins" +#~ msgstr "Kann nicht ohne MISO und MOSI Pins transferieren" + +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Hardware beschäftigt, versuche alternative Pins" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Fehlender MISO- oder MOSI-Pin" + +#~ msgid "Missing MISO or MOSI pin" +#~ msgstr "MISO oder MOSI Pin fehlt" + +#~ msgid "No MISO Pin" +#~ msgstr "Kein MISO-Pin" + +#~ msgid "No MISO pin" +#~ msgstr "Miso Pin fehlt" + +#~ msgid "No MOSI Pin" +#~ msgstr "Kein MOSI-Pin" + +#~ msgid "No MOSI pin" +#~ msgstr "MOSI Pin fehlt" + +#~ msgid "No RX pin" +#~ msgstr "Kein RX-Pin" + +#~ msgid "No TX pin" +#~ msgstr "Kein TX-Pin" + +#~ msgid "no reset pin available" +#~ msgstr "kein Reset Pin verfügbar" + #~ msgid "Sleep Memory not available" #~ msgstr "Sleep-Speicher nicht verfügbar" diff --git a/locale/el.po b/locale/el.po index 5e002f27df..d8b55956e8 100644 --- a/locale/el.po +++ b/locale/el.po @@ -141,8 +141,10 @@ msgstr "%q στο %q πρέπει να είναι τύπου %q, όχι %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -197,6 +199,7 @@ msgid "%q must be 1 when %q is True" msgstr "%q πρέπει να είναι 1 όταν %q είναι True" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q πρέπει να είναι <= %d" @@ -802,10 +805,6 @@ msgstr "Δεν μπορεί να οριστεί RTS ή CTS σε RS485 mode" msgid "Cannot subclass slice" msgstr "Δεν γίνεται υποκατηγορία ενός slice" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "Δεν μπορεί να γίνει μεταφορά χωρίς MOSI και MISO pins" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -1117,13 +1116,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "" @@ -1382,14 +1378,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1463,6 +1451,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "" @@ -1496,36 +1492,6 @@ msgstr "" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "" @@ -2434,6 +2400,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3657,11 +3624,6 @@ msgstr "" msgid "no module named '%q'" msgstr "" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" @@ -4387,6 +4349,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Cannot transfer without MOSI and MISO pins" +#~ msgstr "Δεν μπορεί να γίνει μεταφορά χωρίς MOSI και MISO pins" + #~ msgid "Brightness must be 0-1.0" #~ msgstr "Η φωτινότητα πρέπει να είναι μεταξύ 0-1.0" diff --git a/locale/en_GB.po b/locale/en_GB.po index 02d8748cf8..0984565599 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -139,8 +139,10 @@ msgstr "%q in %q must be of type %q, not %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -195,6 +197,7 @@ msgid "%q must be 1 when %q is True" msgstr "%q must be 1 when %q is True" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q must be <= %d" @@ -794,10 +797,6 @@ msgstr "Cannot specify RTS or CTS in RS485 mode" msgid "Cannot subclass slice" msgstr "Cannot subclass slice" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "Cannot transfer without MOSI and MISO pins" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Cannot vary frequency on a timer that is already in use" @@ -1108,13 +1107,10 @@ msgstr "Group already used" msgid "Half duplex SPI is not implemented" msgstr "Half duplex SPI is not implemented" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Hardware busy, try alternative pins" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Hardware in use, try alternative pins" @@ -1376,14 +1372,6 @@ msgstr "Mismatched data size" msgid "Mismatched swap flag" msgstr "Mismatched swap flag" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Missing MISO or MOSI Pin" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "Missing MISO or MOSI pin" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1457,6 +1445,14 @@ msgid "Nimble out of memory" msgstr "Nimble out of memory" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "No %q pin" @@ -1490,36 +1486,6 @@ msgstr "No I2C device at address: 0x%x" msgid "No IP" msgstr "No IP" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "No MISO Pin" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "No MISO pin" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "No MOSI Pin" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "No MOSI pin" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "No RX pin" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "No TX pin" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "No available clocks" @@ -2443,6 +2409,7 @@ msgstr "You pressed both buttons at start up." #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "You pressed button A at start up." @@ -3671,11 +3638,6 @@ msgstr "no default seed" msgid "no module named '%q'" msgstr "no module named '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "no reset pin available" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "no response from SD card" @@ -4401,6 +4363,39 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "Cannot transfer without MOSI and MISO pins" +#~ msgstr "Cannot transfer without MOSI and MISO pins" + +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Hardware busy, try alternative pins" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Missing MISO or MOSI Pin" + +#~ msgid "Missing MISO or MOSI pin" +#~ msgstr "Missing MISO or MOSI pin" + +#~ msgid "No MISO Pin" +#~ msgstr "No MISO Pin" + +#~ msgid "No MISO pin" +#~ msgstr "No MISO pin" + +#~ msgid "No MOSI Pin" +#~ msgstr "No MOSI Pin" + +#~ msgid "No MOSI pin" +#~ msgstr "No MOSI pin" + +#~ msgid "No RX pin" +#~ msgstr "No RX pin" + +#~ msgid "No TX pin" +#~ msgstr "No TX pin" + +#~ msgid "no reset pin available" +#~ msgstr "no reset pin available" + #~ msgid "Sleep Memory not available" #~ msgstr "Sleep Memory not available" diff --git a/locale/es.po b/locale/es.po index ba8b07d0dd..931c391e50 100644 --- a/locale/es.po +++ b/locale/es.po @@ -141,8 +141,10 @@ msgstr "%q en %q debe ser del tipo %q, no %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -197,6 +199,7 @@ msgid "%q must be 1 when %q is True" msgstr "%q debe ser 1 cuando %q es True" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q debe ser <= %d" @@ -805,10 +808,6 @@ msgstr "No se puede especificar RTS o CTS en modo RS485" msgid "Cannot subclass slice" msgstr "No se puede manejar la partición en una subclase" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "No puede ser transferido si los pines MOSI y MISO" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "No puede variar la frecuencia en un temporizador que ya está en uso" @@ -1125,13 +1124,10 @@ msgstr "Grupo ya está siendo utilizado" msgid "Half duplex SPI is not implemented" msgstr "SPI Half Duplex no está implementado" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Hardware ocupado, pruebe pines alternativos" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Hardware en uso, pruebe pines alternativos" @@ -1400,14 +1396,6 @@ msgstr "Inconsistencia en el tamaño de los datos" msgid "Mismatched swap flag" msgstr "Inconsistencia en el flag de recambio" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Falta el pin MISO o MOSI" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "Falta el pin MISO o MOSI" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1485,6 +1473,14 @@ msgid "Nimble out of memory" msgstr "Nimble sin memoria" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Sin pin %q" @@ -1518,36 +1514,6 @@ msgstr "No hay dispositivo en la dirección: 0x%x" msgid "No IP" msgstr "No IP" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Sin pin MISO" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "No pin MISO" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Sin pin MOSI" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "No pin MOSI" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Sin pin RX" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Sin pin TX" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Relojes no disponibles" @@ -2486,6 +2452,7 @@ msgstr "Usted presionó ambos botones al iniciar." #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "Usted presionó el botón A al iniciar." @@ -3722,11 +3689,6 @@ msgstr "sin semilla por omisión" msgid "no module named '%q'" msgstr "ningún módulo se llama '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "no hay pin de reinicio disponible" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "no hay respuesta de la tarjeta SD" @@ -4456,6 +4418,39 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "Cannot transfer without MOSI and MISO pins" +#~ msgstr "No puede ser transferido si los pines MOSI y MISO" + +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Hardware ocupado, pruebe pines alternativos" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Falta el pin MISO o MOSI" + +#~ msgid "Missing MISO or MOSI pin" +#~ msgstr "Falta el pin MISO o MOSI" + +#~ msgid "No MISO Pin" +#~ msgstr "Sin pin MISO" + +#~ msgid "No MISO pin" +#~ msgstr "No pin MISO" + +#~ msgid "No MOSI Pin" +#~ msgstr "Sin pin MOSI" + +#~ msgid "No MOSI pin" +#~ msgstr "No pin MOSI" + +#~ msgid "No RX pin" +#~ msgstr "Sin pin RX" + +#~ msgid "No TX pin" +#~ msgstr "Sin pin TX" + +#~ msgid "no reset pin available" +#~ msgstr "no hay pin de reinicio disponible" + #~ msgid "Sleep Memory not available" #~ msgstr "Memoria de sueño no disponible" diff --git a/locale/fil.po b/locale/fil.po index ac2ddf6698..bc3f3bc1e6 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -127,8 +127,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -183,6 +185,7 @@ msgid "%q must be 1 when %q is True" msgstr "" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "" @@ -786,10 +789,6 @@ msgstr "" msgid "Cannot subclass slice" msgstr "Hindi magawa ang sublcass slice" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -1100,13 +1099,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "" @@ -1367,14 +1363,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1448,6 +1436,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Walang %q pin" @@ -1481,36 +1477,6 @@ msgstr "" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Walang RX pin" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Walang TX pin" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "" @@ -2423,6 +2389,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3662,11 +3629,6 @@ msgstr "" msgid "no module named '%q'" msgstr "walang module na '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" @@ -4394,6 +4356,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "No RX pin" +#~ msgstr "Walang RX pin" + +#~ msgid "No TX pin" +#~ msgstr "Walang TX pin" + #, fuzzy #~ msgid "x value out of bounds" #~ msgstr "wala sa sakop ang address" diff --git a/locale/fr.po b/locale/fr.po index 27495cda1b..a466a12359 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -141,8 +141,10 @@ msgstr "%q dans %q doit être de type %q, pas %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -197,6 +199,7 @@ msgid "%q must be 1 when %q is True" msgstr "%q doit être 1 quand %q est True" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q doit être <= %d" @@ -807,10 +810,6 @@ msgstr "Impossible de spécifier RTS ou CTS en mode RS485" msgid "Cannot subclass slice" msgstr "On ne peut faire de sous-classes de tranches" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "Impossible de transférer sans une broche MOSI ou MISO" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Impossible de faire varier la fréquence sur un minuteur déjà utilisée" @@ -1133,13 +1132,10 @@ msgstr "Groupe déjà utilisé" msgid "Half duplex SPI is not implemented" msgstr "Le half duplex du SPI n'est pas implémenté" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Matériel occupé, essayez d'autres broches" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Matériel utilisé, essayez d'autres broches" @@ -1411,14 +1407,6 @@ msgstr "La taille des données ne correspond pas" msgid "Mismatched swap flag" msgstr "Le drapeau d'échange ne correspond pas" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Broche MISO ou MOSI manquante" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "La broche MISO ou MOSI est manquante" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1495,6 +1483,14 @@ msgid "Nimble out of memory" msgstr "Nimble n'a plus de mémoire" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Pas de broche %q" @@ -1528,36 +1524,6 @@ msgstr "Aucun périphérique I2S à l'adresse : 0x%x" msgid "No IP" msgstr "Aucune IP" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Pas de broche MISO" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "Aucune broche MISO" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Pas de broche MOSI" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "Aucune broche MOSI" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Pas de broche RX" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Pas de broche TX" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Pas d'horloge disponible" @@ -2498,6 +2464,7 @@ msgstr "Vous avez appuyé les deux boutons au démarrage." #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "Vous avez appuyé le bouton A au démarrage." @@ -3743,11 +3710,6 @@ msgstr "aucun seed par défaut" msgid "no module named '%q'" msgstr "pas de module '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "pas de broche de réinitialisation disponible" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "pas de réponse de la carte SD" @@ -4479,6 +4441,39 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "Cannot transfer without MOSI and MISO pins" +#~ msgstr "Impossible de transférer sans une broche MOSI ou MISO" + +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Matériel occupé, essayez d'autres broches" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Broche MISO ou MOSI manquante" + +#~ msgid "Missing MISO or MOSI pin" +#~ msgstr "La broche MISO ou MOSI est manquante" + +#~ msgid "No MISO Pin" +#~ msgstr "Pas de broche MISO" + +#~ msgid "No MISO pin" +#~ msgstr "Aucune broche MISO" + +#~ msgid "No MOSI Pin" +#~ msgstr "Pas de broche MOSI" + +#~ msgid "No MOSI pin" +#~ msgstr "Aucune broche MOSI" + +#~ msgid "No RX pin" +#~ msgstr "Pas de broche RX" + +#~ msgid "No TX pin" +#~ msgstr "Pas de broche TX" + +#~ msgid "no reset pin available" +#~ msgstr "pas de broche de réinitialisation disponible" + #~ msgid "Sleep Memory not available" #~ msgstr "La mémoire de sommeil n'est pas disponible" diff --git a/locale/hi.po b/locale/hi.po index bdbcd835dd..f684a9d9b8 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -126,8 +126,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -182,6 +184,7 @@ msgid "%q must be 1 when %q is True" msgstr "" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "" @@ -779,10 +782,6 @@ msgstr "" msgid "Cannot subclass slice" msgstr "" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -1090,13 +1089,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "" @@ -1355,14 +1351,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1436,6 +1424,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "" @@ -1469,36 +1465,6 @@ msgstr "" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "" @@ -2405,6 +2371,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3628,11 +3595,6 @@ msgstr "" msgid "no module named '%q'" msgstr "" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index f5519b25cc..ba9b3dc227 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -130,8 +130,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -186,6 +188,7 @@ msgid "%q must be 1 when %q is True" msgstr "" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "" @@ -789,10 +792,6 @@ msgstr "" msgid "Cannot subclass slice" msgstr "Impossibile subclasare slice" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -1102,13 +1101,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "" @@ -1370,14 +1366,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1451,6 +1439,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Nessun pin %q" @@ -1484,36 +1480,6 @@ msgstr "" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Nessun pin RX" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Nessun pin TX" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Nessun orologio a disposizione" @@ -2430,6 +2396,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3668,11 +3635,6 @@ msgstr "" msgid "no module named '%q'" msgstr "nessun modulo chiamato '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" @@ -4404,6 +4366,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "No RX pin" +#~ msgstr "Nessun pin RX" + +#~ msgid "No TX pin" +#~ msgstr "Nessun pin TX" + #~ msgid "Brightness must be 0-1.0" #~ msgstr "La luminosità deve essere tra 0-1.0" diff --git a/locale/ja.po b/locale/ja.po index 65b6274cd4..0d7498178c 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -133,8 +133,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -189,6 +191,7 @@ msgid "%q must be 1 when %q is True" msgstr "" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "" @@ -790,10 +793,6 @@ msgstr "RS485モードにRTSまたはCTSを指定できません" msgid "Cannot subclass slice" msgstr "sliceをサブクラス化することはできません" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "使用中のタイマー上では周波数を変えられません" @@ -1101,13 +1100,10 @@ msgstr "グループはすでに使われています" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "ハードウェアビジー。代替のピンを試してください" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "ハードウェア使用中。代わりのピンを試してください" @@ -1368,14 +1364,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "MISOまたはMOSIピンがありません" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1449,6 +1437,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "%qピンがありません" @@ -1482,36 +1478,6 @@ msgstr "" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "MISOピンなし" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "MOSIピンがありません" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "RXピンがありません" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "TXピンがありません" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "利用できるクロックがありません" @@ -2422,6 +2388,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3650,11 +3617,6 @@ msgstr "" msgid "no module named '%q'" msgstr "'%q' という名前のモジュールはありません" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "利用可能なリセットピンがありません" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "SDカードからの応答がありません" @@ -4382,6 +4344,27 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "ハードウェアビジー。代替のピンを試してください" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "MISOまたはMOSIピンがありません" + +#~ msgid "No MISO Pin" +#~ msgstr "MISOピンなし" + +#~ msgid "No MOSI Pin" +#~ msgstr "MOSIピンがありません" + +#~ msgid "No RX pin" +#~ msgstr "RXピンがありません" + +#~ msgid "No TX pin" +#~ msgstr "TXピンがありません" + +#~ msgid "no reset pin available" +#~ msgstr "利用可能なリセットピンがありません" + #~ msgid "Brightness must be 0-1.0" #~ msgstr "brightnessは0から1.0まででなければなりません" diff --git a/locale/ko.po b/locale/ko.po index cb0dad97e2..2fc43e592c 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -127,8 +127,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -183,6 +185,7 @@ msgid "%q must be 1 when %q is True" msgstr "" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "" @@ -782,10 +785,6 @@ msgstr "" msgid "Cannot subclass slice" msgstr "" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "" @@ -1093,13 +1092,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "" @@ -1358,14 +1354,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1439,6 +1427,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "" @@ -1472,36 +1468,6 @@ msgstr "" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "" @@ -2409,6 +2375,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3632,11 +3599,6 @@ msgstr "" msgid "no module named '%q'" msgstr "" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index cb2338ad92..719efe6914 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -126,8 +126,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -182,6 +184,7 @@ msgid "%q must be 1 when %q is True" msgstr "" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "" @@ -782,10 +785,6 @@ msgstr "Kan RTS of CTS niet specificeren in RS485 modus" msgid "Cannot subclass slice" msgstr "Kan slice niet subclasseren" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Kan de frequentie van een timer die al in gebruik is niet variëren" @@ -1096,13 +1095,10 @@ msgstr "Groep al gebruikt" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Hardware bezig, probeer alternatieve pinnen" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Hardware in gebruik, probeer alternatieve pinnen" @@ -1363,14 +1359,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Ontbrekende MISO of MOSI Pin" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1444,6 +1432,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Geen %q pin" @@ -1477,36 +1473,6 @@ msgstr "" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Geen MISO pin" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Geen MOSI pin" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Geen RX pin" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Geen TX pin" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Geen klokken beschikbaar" @@ -2432,6 +2398,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3662,11 +3629,6 @@ msgstr "" msgid "no module named '%q'" msgstr "geen module met naam '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "geen reset pin beschikbaar" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "geen antwoord van SD kaart" @@ -4392,6 +4354,27 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Hardware bezig, probeer alternatieve pinnen" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Ontbrekende MISO of MOSI Pin" + +#~ msgid "No MISO Pin" +#~ msgstr "Geen MISO pin" + +#~ msgid "No MOSI Pin" +#~ msgstr "Geen MOSI pin" + +#~ msgid "No RX pin" +#~ msgstr "Geen RX pin" + +#~ msgid "No TX pin" +#~ msgstr "Geen TX pin" + +#~ msgid "no reset pin available" +#~ msgstr "geen reset pin beschikbaar" + #~ msgid "input and output shapes are not compatible" #~ msgstr "in- en uitvoervormen zijn niet compatibel" diff --git a/locale/pl.po b/locale/pl.po index a6af1932ee..35cc808126 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -128,8 +128,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -184,6 +186,7 @@ msgid "%q must be 1 when %q is True" msgstr "" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "" @@ -783,10 +786,6 @@ msgstr "Nie można określić RTS ani CTS w trybie RS485" msgid "Cannot subclass slice" msgstr "Nie można dziedziczyć ze slice" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Nie można zmieniać częstotliwości timera, który jest już używany" @@ -1096,13 +1095,10 @@ msgstr "Grupa już używana" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Sprzęt zajęty, wypróbuj alternatywne piny" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Sprzęt w użyciu, wypróbuj alternatywne piny" @@ -1363,14 +1359,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Brak pinu MISO lub MOSI" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1444,6 +1432,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Brak nóżki %q" @@ -1477,36 +1473,6 @@ msgstr "" msgid "No IP" msgstr "" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Brak pinu MISO" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Brak pinu MOSI" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Brak nóżki RX" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Brak nóżki TX" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Brak wolnych zegarów" @@ -2413,6 +2379,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3637,11 +3604,6 @@ msgstr "" msgid "no module named '%q'" msgstr "brak modułu o nazwie '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" @@ -4368,6 +4330,24 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Sprzęt zajęty, wypróbuj alternatywne piny" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Brak pinu MISO lub MOSI" + +#~ msgid "No MISO Pin" +#~ msgstr "Brak pinu MISO" + +#~ msgid "No MOSI Pin" +#~ msgstr "Brak pinu MOSI" + +#~ msgid "No RX pin" +#~ msgstr "Brak nóżki RX" + +#~ msgid "No TX pin" +#~ msgstr "Brak nóżki TX" + #~ msgid "Brightness must be 0-1.0" #~ msgstr "Jasność musi wynosić 0-1,0" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 5b6cca5fb3..d44d309ad6 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -139,8 +139,10 @@ msgstr "%q em %q deve ser do tipo %q e não %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -195,6 +197,7 @@ msgid "%q must be 1 when %q is True" msgstr "%q deve ser 1 quando %q for verdadeiro" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q deve ser <= %d" @@ -806,10 +809,6 @@ msgstr "Não é possível definir o RTS ou CTS no modo RS485" msgid "Cannot subclass slice" msgstr "Não é possível subclassificar a fatia" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "Não é possível transferir sem os pinos MOSI e MISO" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Não é possível variar a frequência em um timer que já esteja em uso" @@ -1122,13 +1121,10 @@ msgstr "O grupo já está em uso" msgid "Half duplex SPI is not implemented" msgstr "O SPI half duplex ainda não está implementado" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "O hardware está ocupado, tente os pinos alternativos" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "O hardware está em uso, tente os pinos alternativos" @@ -1397,14 +1393,6 @@ msgstr "O tamanho dos dados é incompatível" msgid "Mismatched swap flag" msgstr "Sinalizador de troca incompatível" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "O pino MISO ou MOSI está ausente" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "Falta o pino MISO ou o MOSI" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1478,6 +1466,14 @@ msgid "Nimble out of memory" msgstr "Ágil fora da memória" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Sem pin %q" @@ -1511,36 +1507,6 @@ msgstr "Não há nenhum dispositivo I2C no endereço: 0x%x" msgid "No IP" msgstr "Sem IP" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Nenhum pino MISO" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "Nenhum pino MISO" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Nenhum pino MOSI" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "Nenhum pino MOSI" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Nenhum pino RX" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Nenhum pino TX" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Nenhum clock disponível" @@ -2482,6 +2448,7 @@ msgstr "Você pressionou os dois botões durante a inicialização." #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "Você pressionou o botão A na inicialização." @@ -3722,11 +3689,6 @@ msgstr "nenhuma semente padrão" msgid "no module named '%q'" msgstr "nenhum módulo chamado '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "nenhum pino de redefinição está disponível" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "não houve resposta do cartão SD" @@ -4457,6 +4419,39 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "Cannot transfer without MOSI and MISO pins" +#~ msgstr "Não é possível transferir sem os pinos MOSI e MISO" + +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "O hardware está ocupado, tente os pinos alternativos" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "O pino MISO ou MOSI está ausente" + +#~ msgid "Missing MISO or MOSI pin" +#~ msgstr "Falta o pino MISO ou o MOSI" + +#~ msgid "No MISO Pin" +#~ msgstr "Nenhum pino MISO" + +#~ msgid "No MISO pin" +#~ msgstr "Nenhum pino MISO" + +#~ msgid "No MOSI Pin" +#~ msgstr "Nenhum pino MOSI" + +#~ msgid "No MOSI pin" +#~ msgstr "Nenhum pino MOSI" + +#~ msgid "No RX pin" +#~ msgstr "Nenhum pino RX" + +#~ msgid "No TX pin" +#~ msgstr "Nenhum pino TX" + +#~ msgid "no reset pin available" +#~ msgstr "nenhum pino de redefinição está disponível" + #~ msgid "Sleep Memory not available" #~ msgstr "Sleep memory não está disponível" diff --git a/locale/ru.po b/locale/ru.po index d4bbd20cac..8dd6627ad5 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -133,8 +133,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -189,6 +191,7 @@ msgid "%q must be 1 when %q is True" msgstr "%q должно быть 1 когда %q is True" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q должно быть <= %d" @@ -799,10 +802,6 @@ msgstr "Невозможно указать RTS или CTS в режиме RS485 msgid "Cannot subclass slice" msgstr "Срез субкласса невозможен" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "Невозможно передать данные без пинов MOSI и MISO" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Невозможно изменить частоту на таймере, который уже используется" @@ -1127,13 +1126,10 @@ msgstr "Группа уже используется" msgid "Half duplex SPI is not implemented" msgstr "Полудуплексный SPI не реализован" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Оборудование занято, попробуйте использовать другие пины" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Оборудование используется, попробуйте использовать другие пины" @@ -1402,14 +1398,6 @@ msgstr "Размер данных различается" msgid "Mismatched swap flag" msgstr "Несоответствие флага swap" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Отсутствует пин MISO или MOSI" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "Отсутствует пин MISO или MOSI" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1484,6 +1472,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Нет пина %q" @@ -1517,36 +1513,6 @@ msgstr "Не найдено устройство I2C по адресу: %x" msgid "No IP" msgstr "Нет IP" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Нет пина MISO" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "Нет пина MISO" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Нет пина MOSI" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "Нет пина MOSI" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Нет пина RX" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Нет пина TX" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "" @@ -2468,6 +2434,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3691,11 +3658,6 @@ msgstr "" msgid "no module named '%q'" msgstr "" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "нет доступного контакта сброса" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" @@ -4421,6 +4383,39 @@ msgstr "zi должно быть типа float" msgid "zi must be of shape (n_section, 2)" msgstr "zi должен иметь форму (n_section, 2)" +#~ msgid "Cannot transfer without MOSI and MISO pins" +#~ msgstr "Невозможно передать данные без пинов MOSI и MISO" + +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Оборудование занято, попробуйте использовать другие пины" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Отсутствует пин MISO или MOSI" + +#~ msgid "Missing MISO or MOSI pin" +#~ msgstr "Отсутствует пин MISO или MOSI" + +#~ msgid "No MISO Pin" +#~ msgstr "Нет пина MISO" + +#~ msgid "No MISO pin" +#~ msgstr "Нет пина MISO" + +#~ msgid "No MOSI Pin" +#~ msgstr "Нет пина MOSI" + +#~ msgid "No MOSI pin" +#~ msgstr "Нет пина MOSI" + +#~ msgid "No RX pin" +#~ msgstr "Нет пина RX" + +#~ msgid "No TX pin" +#~ msgstr "Нет пина TX" + +#~ msgid "no reset pin available" +#~ msgstr "нет доступного контакта сброса" + #~ msgid "Brightness must be 0-1.0" #~ msgstr "Яркость должна быть в диапазоне от 0 до 1.0" diff --git a/locale/sv.po b/locale/sv.po index d5ab3cb7f2..28e2ee490e 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -138,8 +138,10 @@ msgstr "%q i %q måste vara av typen %q, inte %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -194,6 +196,7 @@ msgid "%q must be 1 when %q is True" msgstr "%q måste vara 1 när %q är sann" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q måste vara <= %d" @@ -797,10 +800,6 @@ msgstr "Det går inte att specificera RTS eller CTS i RS485-läget" msgid "Cannot subclass slice" msgstr "Det går inte att subklassa slice" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "Det går inte att överföra utan MOSI- och MISO-pinnar" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Det går inte att ändra frekvensen på en timer som redan används" @@ -1113,13 +1112,10 @@ msgstr "Grupp används redan" msgid "Half duplex SPI is not implemented" msgstr "Halvduplex SPI är inte implementerat" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Hårdvaran är upptagen, prova alternativa pinnar" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Hårdvaran används redan, prova alternativa pinnar" @@ -1383,14 +1379,6 @@ msgstr "Datastorlek matchar inte" msgid "Mismatched swap flag" msgstr "Felaktig swapflagga" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "MISO- eller MOSI-pinne saknas" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "Saknad MISO- eller MOSI-pinne" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1464,6 +1452,14 @@ msgid "Nimble out of memory" msgstr "Nimble har inget minne kvar" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Ingen %q-pinne" @@ -1497,36 +1493,6 @@ msgstr "Ingen I2C-enhet på adress: 0x%x" msgid "No IP" msgstr "Ingen IP" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Ingen MISO-pinne" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "Ingen MISO-pinne" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Ingen MOSI-pinne" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "Ingen MOSI-pinne" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Ingen RX-pinne" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Ingen TX-pinne" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Inga tillgängliga klockor" @@ -2455,6 +2421,7 @@ msgstr "Du tryckte ner båda knapparna vid start." #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "Du tryckte ner knapp A vid start." @@ -3688,11 +3655,6 @@ msgstr "inget standard seed" msgid "no module named '%q'" msgstr "ingen modul med namnet '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "ingen reset-pinne tillgänglig" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "inget svar från SD-kort" @@ -4419,6 +4381,39 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "Cannot transfer without MOSI and MISO pins" +#~ msgstr "Det går inte att överföra utan MOSI- och MISO-pinnar" + +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Hårdvaran är upptagen, prova alternativa pinnar" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "MISO- eller MOSI-pinne saknas" + +#~ msgid "Missing MISO or MOSI pin" +#~ msgstr "Saknad MISO- eller MOSI-pinne" + +#~ msgid "No MISO Pin" +#~ msgstr "Ingen MISO-pinne" + +#~ msgid "No MISO pin" +#~ msgstr "Ingen MISO-pinne" + +#~ msgid "No MOSI Pin" +#~ msgstr "Ingen MOSI-pinne" + +#~ msgid "No MOSI pin" +#~ msgstr "Ingen MOSI-pinne" + +#~ msgid "No RX pin" +#~ msgstr "Ingen RX-pinne" + +#~ msgid "No TX pin" +#~ msgstr "Ingen TX-pinne" + +#~ msgid "no reset pin available" +#~ msgstr "ingen reset-pinne tillgänglig" + #~ msgid "Sleep Memory not available" #~ msgstr "Sömnminne inte tillgängligt" diff --git a/locale/tr.po b/locale/tr.po index 6fe4fabeab..71ba460288 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -134,8 +134,10 @@ msgstr "" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -190,6 +192,7 @@ msgid "%q must be 1 when %q is True" msgstr "%q 1 olmalı, %q True olduğu zaman" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q <= %d olmalıdır" @@ -791,10 +794,6 @@ msgstr "RS485 modunda RTS veya CTS belirtilemez" msgid "Cannot subclass slice" msgstr "" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "MOSI ve MISO pinleri olmadan transfer edilemiyor" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Kullanımda olan bir zamanlayıcının frekansı değiştirilemez" @@ -1106,13 +1105,10 @@ msgstr "Grup zaten kullanılıyor" msgid "Half duplex SPI is not implemented" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Donanım meşgul, alternatif pinleri deneyin" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Donanım kullanımda, alternatif pinleri deneyin" @@ -1374,14 +1370,6 @@ msgstr "" msgid "Mismatched swap flag" msgstr "" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Eksik MISO veya MOSI pini" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "Eksik MISO veya MOSI pini" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1455,6 +1443,14 @@ msgid "Nimble out of memory" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "%q pini yok" @@ -1488,36 +1484,6 @@ msgstr "" msgid "No IP" msgstr "IP yok" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "MISO pini yok" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "MISO pini yok" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "MOSI pini yok" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "MOSI pini yok" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "RX pini yok" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "TX pini yok" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Kullanılabilir saat yok" @@ -2427,6 +2393,7 @@ msgstr "" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "" @@ -3650,11 +3617,6 @@ msgstr "" msgid "no module named '%q'" msgstr "" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "" @@ -4380,6 +4342,36 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Cannot transfer without MOSI and MISO pins" +#~ msgstr "MOSI ve MISO pinleri olmadan transfer edilemiyor" + +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Donanım meşgul, alternatif pinleri deneyin" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Eksik MISO veya MOSI pini" + +#~ msgid "Missing MISO or MOSI pin" +#~ msgstr "Eksik MISO veya MOSI pini" + +#~ msgid "No MISO Pin" +#~ msgstr "MISO pini yok" + +#~ msgid "No MISO pin" +#~ msgstr "MISO pini yok" + +#~ msgid "No MOSI Pin" +#~ msgstr "MOSI pini yok" + +#~ msgid "No MOSI pin" +#~ msgstr "MOSI pini yok" + +#~ msgid "No RX pin" +#~ msgstr "RX pini yok" + +#~ msgid "No TX pin" +#~ msgstr "TX pini yok" + #~ msgid "Brightness must be 0-1.0" #~ msgstr "Parlaklık 0-1.0 aralığında olmalı" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 8ff874492e..9bcb0640c2 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -141,8 +141,10 @@ msgstr "%q zhōng de %q bì xū shì %q lèi xíng, ér bù shì %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c +#: ports/mimxrt10xx/common-hal/usb_host/Port.c #: ports/raspberrypi/common-hal/picodvi/Framebuffer.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: ports/raspberrypi/common-hal/usb_host/Port.c #: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -197,6 +199,7 @@ msgid "%q must be 1 when %q is True" msgstr "sāng %q wèi True shí, %q bìxū wèi 1" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "%q bìxū <= %d" @@ -800,10 +803,6 @@ msgstr "wúfǎ zài RS485 móshì xià zhǐdìng RTS huò CTS" msgid "Cannot subclass slice" msgstr "bùnéng zǐlèihuà qiēpiàn" -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins" -msgstr "méiyǒu MOSI hé MISO yǐnjiǎo, wúfǎ chuánshū" - #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" msgstr "Wúfǎ zài shǐyòng zhōng de jìshí qì shàng gēnggǎi pínlǜ" @@ -1117,13 +1116,10 @@ msgstr "Jítuán yǐjīng shǐyòngguò" msgid "Half duplex SPI is not implemented" msgstr "wèi shí xiàn bàn shuāng gōng SPI" -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "Yìngjiàn máng, qǐng chángshì qítā zhēnjiǎo" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c +#: ports/stm/common-hal/canio/CAN.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware in use, try alternative pins" msgstr "Shǐyòng de yìngjiàn, qǐng chángshì qítā yǐn jiǎo" @@ -1389,14 +1385,6 @@ msgstr "shùjù dàxiǎo bù pǐpèi" msgid "Mismatched swap flag" msgstr "jiāohuàn biāozhì bù pǐpèi" -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "Quēshǎo MISO huò MOSI yǐn jiǎo" - -#: ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI pin" -msgstr "quēshǎo MISO huò MOSI yǐn jiǎo" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing first_in_pin. Instruction %d reads pin(s)" @@ -1471,6 +1459,14 @@ msgid "Nimble out of memory" msgstr "líng huó de bǎi tuō jì yì" #: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c shared-bindings/displayio/FourWire.c +#: shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c shared-module/bitbangio/SPI.c msgid "No %q pin" msgstr "Wèi zhǎodào %q yǐn jiǎo" @@ -1504,36 +1500,6 @@ msgstr "dì zhǐ: 0x%x shí méi yǒu I2C qì jiàn" msgid "No IP" msgstr "wú IP" -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "Méiyǒu MISO yǐn jiǎo" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MISO pin" -msgstr "wú MISO pin" - -#: ports/espressif/common-hal/busio/SPI.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "Méiyǒu MOSI yǐn jiǎo" - -#: ports/stm/common-hal/busio/SPI.c shared-module/bitbangio/SPI.c -msgid "No MOSI pin" -msgstr "wú MOSI pin" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "Wèi zhǎodào RX yǐn jiǎo" - -#: ports/espressif/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "Wèi zhǎodào TX yǐn jiǎo" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" msgstr "Méiyǒu kěyòng de shízhōng" @@ -2460,6 +2426,7 @@ msgstr "nín zài qǐ dòng shí àn xià le liǎng gè àn niǔ." #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h +#: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." msgstr "nín zài qǐ dòng shí àn xià le àn niǔ A." @@ -3692,11 +3659,6 @@ msgstr "wú mò rèn zhǒng zi" msgid "no module named '%q'" msgstr "méiyǒu mókuài '%q'" -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/paralleldisplay/ParallelBus.c -msgid "no reset pin available" -msgstr "Méiyǒu kěyòng de fùwèi yǐn jiǎo" - #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" msgstr "SD kǎ wú huíyīng" @@ -4425,6 +4387,39 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "Cannot transfer without MOSI and MISO pins" +#~ msgstr "méiyǒu MOSI hé MISO yǐnjiǎo, wúfǎ chuánshū" + +#~ msgid "Hardware busy, try alternative pins" +#~ msgstr "Yìngjiàn máng, qǐng chángshì qítā zhēnjiǎo" + +#~ msgid "Missing MISO or MOSI Pin" +#~ msgstr "Quēshǎo MISO huò MOSI yǐn jiǎo" + +#~ msgid "Missing MISO or MOSI pin" +#~ msgstr "quēshǎo MISO huò MOSI yǐn jiǎo" + +#~ msgid "No MISO Pin" +#~ msgstr "Méiyǒu MISO yǐn jiǎo" + +#~ msgid "No MISO pin" +#~ msgstr "wú MISO pin" + +#~ msgid "No MOSI Pin" +#~ msgstr "Méiyǒu MOSI yǐn jiǎo" + +#~ msgid "No MOSI pin" +#~ msgstr "wú MOSI pin" + +#~ msgid "No RX pin" +#~ msgstr "Wèi zhǎodào RX yǐn jiǎo" + +#~ msgid "No TX pin" +#~ msgstr "Wèi zhǎodào TX yǐn jiǎo" + +#~ msgid "no reset pin available" +#~ msgstr "Méiyǒu kěyòng de fùwèi yǐn jiǎo" + #~ msgid "Sleep Memory not available" #~ msgstr "shuì mián jì yì bù kě yòng"