diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index feb6a7f633..ceb691a15b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: - name: Install deps run: | sudo apt-get install -y eatmydata - sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 + sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli - name: Versions run: | @@ -73,12 +73,19 @@ jobs: with: name: stubs path: circuitpython-stubs* - - name: Docs + - name: Test Documentation Build (HTML) run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html - uses: actions/upload-artifact@v2 with: name: docs path: _build/html + - name: Test Documentation Build (LaTeX/PDF) + run: | + make latexpdf + - uses: actions/upload-artifact@v2 + with: + name: docs + path: _build/latex - name: Translations run: make check-translate - name: New boards check @@ -253,6 +260,7 @@ jobs: - "pca10100" - "pewpew10" - "pewpew_m4" + - "picoplanet" - "pirkey_m0" - "pitaya_go" - "pyb_nano_v2" diff --git a/.gitignore b/.gitignore index 475a1183ff..03cd38f35d 100644 --- a/.gitignore +++ b/.gitignore @@ -57,7 +57,7 @@ _build ###################### genrst/ /autoapi/ -/shared-bindings/**/*.rst +/shared-bindings/*/**/*.rst # ctags and similar ################### @@ -80,3 +80,8 @@ TAGS *.mo .vscode + +# Python Virtual Environments +#################### +.venv +.env diff --git a/.gitmodules b/.gitmodules index f09a1e4c68..f922aae1db 100644 --- a/.gitmodules +++ b/.gitmodules @@ -147,3 +147,6 @@ [submodule "ports/esp32s2/esp-idf"] path = ports/esp32s2/esp-idf url = https://github.com/tannewt/esp-idf.git +[submodule "frozen/Adafruit_CircuitPython_RFM9x"] + path = frozen/Adafruit_CircuitPython_RFM9x + url = https://github.com/adafruit/Adafruit_CircuitPython_RFM9x.git diff --git a/.readthedocs.yml b/.readthedocs.yml index 4030bc3178..3f66351ce7 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,6 +8,13 @@ version: 2 +submodules: + include: + - extmod/ulab + +formats: + - pdf + python: version: 3 install: diff --git a/Makefile b/Makefile index 1a3cca95d6..d016b770fc 100644 --- a/Makefile +++ b/Makefile @@ -245,6 +245,10 @@ stubs: @$(PYTHON) tools/extract_pyi.py ports/atmel-samd/bindings $(STUBDIR) @$(PYTHON) setup.py -q sdist +.PHONY: check-stubs +check-stubs: stubs + MYPYPATH=$(STUBDIR) mypy --strict $(STUBDIR) + update-frozen-libraries: @echo "Updating all frozen libraries to latest tagged version." cd frozen; for library in *; do cd $$library; ../../tools/git-checkout-latest-tag.sh; cd ..; done diff --git a/conf.py b/conf.py index 37e611dbb8..4a8b72584e 100644 --- a/conf.py +++ b/conf.py @@ -17,14 +17,17 @@ # # SPDX-License-Identifier: MIT -import json import logging import os +import re import subprocess import sys import urllib.parse import recommonmark +from sphinx.transforms import SphinxTransform +from docutils import nodes +from sphinx import addnodes # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -84,6 +87,7 @@ autoapi_dirs = [os.path.join('circuitpython-stubs', x) for x in os.listdir('circ autoapi_add_toctree_entry = False autoapi_options = ['members', 'undoc-members', 'private-members', 'show-inheritance', 'special-members', 'show-module-summary'] autoapi_template_dir = 'docs/autoapi/templates' +autoapi_python_class_content = "both" autoapi_python_use_implicit_namespaces = True autoapi_root = "shared-bindings" @@ -106,7 +110,25 @@ copyright = '2014-2020, MicroPython & CircuitPython contributors (https://github # # We don't follow "The short X.Y version" vs "The full version, including alpha/beta/rc tags" # breakdown, so use the same version identifier for both to avoid confusion. -version = release = '0.0.0' + +final_version = "" +git_describe = subprocess.run( + ["git", "describe", "--dirty", "--tags"], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + encoding="utf-8" +) +if git_describe.returncode == 0: + git_version = re.search( + r"^\d(?:\.\d){0,2}(?:\-(?:alpha|beta|rc)\.\d+){0,1}", + str(git_describe.stdout) + ) + if git_version: + final_version = git_version[0] +else: + print("Failed to retrieve git version:", git_describe.stdout) + +version = release = final_version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -423,7 +445,38 @@ def generate_redirects(app): with open(redirected_filename, 'w') as f: f.write(TEMPLATE % urllib.parse.quote(to_path, '#/')) + +class CoreModuleTransform(SphinxTransform): + default_priority = 870 + + def _convert_first_paragraph_into_title(self): + title = self.document.next_node(nodes.title) + paragraph = self.document.next_node(nodes.paragraph) + if not title or not paragraph: + return + if isinstance(paragraph[0], nodes.paragraph): + paragraph = paragraph[0] + if all(isinstance(child, nodes.Text) for child in paragraph.children): + for child in paragraph.children: + title.append(nodes.Text(" \u2013 ")) + title.append(child) + paragraph.parent.remove(paragraph) + + def _enable_linking_to_nonclass_targets(self): + for desc in self.document.traverse(addnodes.desc): + for xref in desc.traverse(addnodes.pending_xref): + if xref.attributes.get("reftype") == "class": + xref.attributes.pop("refspecific", None) + + def apply(self, **kwargs): + docname = self.env.docname + if docname.startswith(autoapi_root) and docname.endswith("/index"): + self._convert_first_paragraph_into_title() + self._enable_linking_to_nonclass_targets() + + def setup(app): app.add_css_file("customstyle.css") app.add_config_value('redirects_file', 'redirects', 'env') app.connect('builder-inited', generate_redirects) + app.add_transform(CoreModuleTransform) diff --git a/docs/autoapi/templates/python/module.rst b/docs/autoapi/templates/python/module.rst index 7ede6bdfdf..63a1aaa76d 100644 --- a/docs/autoapi/templates/python/module.rst +++ b/docs/autoapi/templates/python/module.rst @@ -18,8 +18,7 @@ {% set visible_subpackages = obj.subpackages|selectattr("display")|list %} {% if visible_subpackages %} .. toctree:: - :titlesonly: - :maxdepth: 3 + :maxdepth: 2 {% for subpackage in visible_subpackages %} {{ subpackage.short_name }}/index.rst diff --git a/docs/requirements.txt b/docs/requirements.txt index d98e2b30c3..f234638ea1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -sphinx<3 +sphinx<4 recommonmark==0.6.0 sphinxcontrib-svg2pdfconverter==0.1.0 astroid diff --git a/docs/rstjinja.py b/docs/rstjinja.py index 3a08b25997..7ab92a9793 100644 --- a/docs/rstjinja.py +++ b/docs/rstjinja.py @@ -6,18 +6,28 @@ def rstjinja(app, docname, source): Render our pages as a jinja template for fancy templating goodness. """ # Make sure we're outputting HTML - if app.builder.format != 'html': + if app.builder.format not in ("html", "latex"): return # we only want our one jinja template to run through this func if "shared-bindings/support_matrix" not in docname: return - src = source[0] + src = rendered = source[0] print(docname) - rendered = app.builder.templates.render_string( - src, app.config.html_context - ) + + if app.builder.format == "html": + rendered = app.builder.templates.render_string( + src, app.config.html_context + ) + else: + from sphinx.util.template import BaseRenderer + renderer = BaseRenderer() + rendered = renderer.render_string( + src, + app.config.html_context + ) + source[0] = rendered def setup(app): diff --git a/extmod/moductypes.c b/extmod/moductypes.c index a384f1e2c2..dc8ac4c721 100644 --- a/extmod/moductypes.c +++ b/extmod/moductypes.c @@ -520,7 +520,7 @@ STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t base_in, mp_obj_t index_in, mp_ob uint val_type = GET_TYPE(arr_sz, VAL_TYPE_BITS); arr_sz &= VALUE_MASK(VAL_TYPE_BITS); if (index >= arr_sz) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_IndexError, translate("struct: index out of range"))); + mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_struct); } if (t->len == 2) { diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index 0642f4a9ce..89786bfa36 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -42,7 +42,7 @@ const byte fresult_to_errno_table[20] = { STATIC void file_obj_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { (void)kind; - mp_printf(print, "", mp_obj_get_type_str(self_in), MP_OBJ_TO_PTR(self_in)); + mp_printf(print, "", mp_obj_get_type_qstr(self_in), MP_OBJ_TO_PTR(self_in)); } STATIC mp_uint_t file_obj_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *errcode) { diff --git a/extmod/vfs_posix_file.c b/extmod/vfs_posix_file.c index eefc1d905a..3f887785e7 100644 --- a/extmod/vfs_posix_file.c +++ b/extmod/vfs_posix_file.c @@ -34,7 +34,7 @@ STATIC void check_fd_is_open(const mp_obj_vfs_posix_file_t *o) { STATIC void vfs_posix_file_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { (void)kind; mp_obj_vfs_posix_file_t *self = MP_OBJ_TO_PTR(self_in); - mp_printf(print, "", mp_obj_get_type_str(self_in), self->fd); + mp_printf(print, "", mp_obj_get_type_qstr(self_in), self->fd); } mp_obj_t mp_vfs_posix_file_open(const mp_obj_type_t *type, mp_obj_t file_in, mp_obj_t mode_in) { diff --git a/frozen/Adafruit_CircuitPython_RFM9x b/frozen/Adafruit_CircuitPython_RFM9x new file mode 160000 index 0000000000..cfffc23378 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_RFM9x @@ -0,0 +1 @@ +Subproject commit cfffc233784961929d722ea4e9acfe5786790609 diff --git a/lib/libm/ef_rem_pio2.c b/lib/libm/ef_rem_pio2.c index bbb73097d6..1a95475032 100644 --- a/lib/libm/ef_rem_pio2.c +++ b/lib/libm/ef_rem_pio2.c @@ -35,9 +35,9 @@ * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi */ #ifdef __STDC__ -static const __int32_t two_over_pi[] = { +static const __uint8_t two_over_pi[] = { #else -static __int32_t two_over_pi[] = { +static __uint8_t two_over_pi[] = { #endif 0xA2, 0xF9, 0x83, 0x6E, 0x4E, 0x44, 0x15, 0x29, 0xFC, 0x27, 0x57, 0xD1, 0xF5, 0x34, 0xDD, 0xC0, 0xDB, 0x62, @@ -145,6 +145,7 @@ pio2_3t = 6.1232342629e-17; /* 0x248d3132 */ return -1; } } +#if CIRCUITPY_FULL_BUILD if(ix<=0x43490f80) { /* |x| ~<= 2^7*(pi/2), medium size */ t = fabsf(x); n = (__int32_t) (t*invpio2+half); @@ -180,6 +181,11 @@ pio2_3t = 6.1232342629e-17; /* 0x248d3132 */ if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;} else return n; } +#else + // Suppress "defined but not used" diagnostics + (void) j; (void) fn; (void) r; (void) t; (void) w; (void) pio2_3t; + (void) pio2_3; (void) invpio2; (void)half; (void)npio2_hw; +#endif /* * all other (large) arguments */ diff --git a/lib/libm/fdlibm.h b/lib/libm/fdlibm.h index 67bc622ea5..91698a6f9c 100644 --- a/lib/libm/fdlibm.h +++ b/lib/libm/fdlibm.h @@ -188,7 +188,7 @@ extern float __ieee754_scalbf __P((float,float)); extern float __kernel_sinf __P((float,float,int)); extern float __kernel_cosf __P((float,float)); extern float __kernel_tanf __P((float,float,int)); -extern int __kernel_rem_pio2f __P((float*,float*,int,int,int,const __int32_t*)); +extern int __kernel_rem_pio2f __P((float*,float*,int,int,int,const __uint8_t*)); /* A union which permits us to convert between a float and a 32 bit int. */ diff --git a/lib/libm/kf_rem_pio2.c b/lib/libm/kf_rem_pio2.c index 62aa242bc7..b27e47ea89 100644 --- a/lib/libm/kf_rem_pio2.c +++ b/lib/libm/kf_rem_pio2.c @@ -62,10 +62,10 @@ two8 = 2.5600000000e+02, /* 0x43800000 */ twon8 = 3.9062500000e-03; /* 0x3b800000 */ #ifdef __STDC__ - int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const __int32_t *ipio2) + int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const __uint8_t *ipio2) #else int __kernel_rem_pio2f(x,y,e0,nx,prec,ipio2) - float x[], y[]; int e0,nx,prec; __int32_t ipio2[]; + float x[], y[]; int e0,nx,prec; __uint8_t ipio2[]; #endif { __int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih; diff --git a/lib/mp-readline/readline.c b/lib/mp-readline/readline.c index 432413d501..464916ca4e 100644 --- a/lib/mp-readline/readline.c +++ b/lib/mp-readline/readline.c @@ -58,6 +58,16 @@ STATIC char *str_dup_maybe(const char *str) { return s2; } +STATIC size_t count_cont_bytes(char *start, char *end) { + int count = 0; + for (char *pos = start; pos < end; pos++) { + if(UTF8_IS_CONT(*pos)) { + count++; + } + } + return count; +} + // By default assume terminal which implements VT100 commands... #ifndef MICROPY_HAL_HAS_VT100 #define MICROPY_HAL_HAS_VT100 (1) @@ -92,6 +102,7 @@ typedef struct _readline_t { int escape_seq; int hist_cur; size_t cursor_pos; + uint8_t utf8_cont_chars; char escape_seq_buf[1]; const char *prompt; } readline_t; @@ -99,7 +110,8 @@ typedef struct _readline_t { STATIC readline_t rl; int readline_process_char(int c) { - size_t last_line_len = rl.line->len; + size_t last_line_len = utf8_charlen((byte *)rl.line->buf, rl.line->len); + int cont_chars = 0; int redraw_step_back = 0; bool redraw_from_cursor = false; int redraw_step_forward = 0; @@ -178,6 +190,12 @@ int readline_process_char(int c) { int nspace = 1; #endif + // Check if we have moved into a UTF-8 continuation byte + while (UTF8_IS_CONT(rl.line->buf[rl.cursor_pos-nspace])) { + nspace++; + cont_chars++; + } + // do the backspace vstr_cut_out_bytes(rl.line, rl.cursor_pos - nspace, nspace); // set redraw parameters @@ -206,12 +224,27 @@ int readline_process_char(int c) { redraw_step_forward = compl_len; } #endif - } else if (32 <= c ) { + } else if (32 <= c) { // printable character - vstr_ins_char(rl.line, rl.cursor_pos, c); - // set redraw parameters - redraw_from_cursor = true; - redraw_step_forward = 1; + char lcp = rl.line->buf[rl.cursor_pos]; + uint8_t cont_need = 0; + if (!UTF8_IS_CONT(c)) { + // ASCII or Lead code point + rl.utf8_cont_chars = 0; + lcp = c; + }else { + rl.utf8_cont_chars += 1; + } + if (lcp >= 0xc0 && lcp < 0xf8) { + cont_need = (0xe5 >> ((lcp >> 3) & 0x6)) & 3; // From unicode.c L195 + } + vstr_ins_char(rl.line, rl.cursor_pos+rl.utf8_cont_chars, c); + // set redraw parameters if we have the entire character + if (rl.utf8_cont_chars == cont_need) { + redraw_from_cursor = true; + redraw_step_forward = rl.utf8_cont_chars+1; + cont_chars = rl.utf8_cont_chars; + } } } else if (rl.escape_seq == ESEQ_ESC) { switch (c) { @@ -237,6 +270,8 @@ up_arrow_key: #endif // up arrow if (rl.hist_cur + 1 < (int)READLINE_HIST_SIZE && MP_STATE_PORT(readline_hist)[rl.hist_cur + 1] != NULL) { + // Check for continuation characters + cont_chars = count_cont_bytes(rl.line->buf+rl.orig_line_len, rl.line->buf+rl.cursor_pos); // increase hist num rl.hist_cur += 1; // set line to history @@ -253,6 +288,8 @@ down_arrow_key: #endif // down arrow if (rl.hist_cur >= 0) { + // Check for continuation characters + cont_chars = count_cont_bytes(rl.line->buf+rl.orig_line_len, rl.line->buf+rl.cursor_pos); // decrease hist num rl.hist_cur -= 1; // set line to history @@ -272,6 +309,11 @@ right_arrow_key: // right arrow if (rl.cursor_pos < rl.line->len) { redraw_step_forward = 1; + // Check if we have moved into a UTF-8 continuation byte + while (UTF8_IS_CONT(rl.line->buf[rl.cursor_pos+redraw_step_forward]) && + rl.cursor_pos+redraw_step_forward < rl.line->len) { + redraw_step_forward++; + } } } else if (c == 'D') { #if MICROPY_REPL_EMACS_KEYS @@ -280,6 +322,11 @@ left_arrow_key: // left arrow if (rl.cursor_pos > rl.orig_line_len) { redraw_step_back = 1; + // Check if we have moved into a UTF-8 continuation byte + while (UTF8_IS_CONT(rl.line->buf[rl.cursor_pos-redraw_step_back])) { + redraw_step_back++; + cont_chars++; + } } } else if (c == 'H') { // home @@ -331,18 +378,20 @@ delete_key: // redraw command prompt, efficiently if (redraw_step_back > 0) { - mp_hal_move_cursor_back(redraw_step_back); + mp_hal_move_cursor_back(redraw_step_back-cont_chars); rl.cursor_pos -= redraw_step_back; } if (redraw_from_cursor) { - if (rl.line->len < last_line_len) { + if (utf8_charlen((byte *)rl.line->buf, rl.line->len) < last_line_len) { // erase old chars mp_hal_erase_line_from_cursor(last_line_len - rl.cursor_pos); } + // Check for continuation characters + cont_chars = count_cont_bytes(rl.line->buf+rl.cursor_pos+redraw_step_forward, rl.line->buf+rl.line->len); // draw new chars mp_hal_stdout_tx_strn(rl.line->buf + rl.cursor_pos, rl.line->len - rl.cursor_pos); // move cursor forward if needed (already moved forward by length of line, so move it back) - mp_hal_move_cursor_back(rl.line->len - (rl.cursor_pos + redraw_step_forward)); + mp_hal_move_cursor_back(rl.line->len - (rl.cursor_pos + redraw_step_forward) - cont_chars); rl.cursor_pos += redraw_step_forward; } else if (redraw_step_forward > 0) { // draw over old chars to move cursor forwards diff --git a/locale/ID.po b/locale/ID.po index 05999b9c8c..b553c67495 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" "PO-Revision-Date: 2020-07-06 18:10+0000\n" "Last-Translator: oon arfiandwi \n" "Language-Team: LANGUAGE \n" @@ -72,13 +72,17 @@ msgstr "" msgid "%q in use" msgstr "%q sedang digunakan" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "%q indeks di luar batas" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "indeks %q harus bilangan bulat, bukan %s" +msgid "%q indices must be integers, not %q" +msgstr "" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -116,6 +120,42 @@ msgstr "%q() mengambil posisi argumen %d tapi %d yang diberikan" msgid "'%q' argument required" msgstr "'%q' argumen dibutuhkan" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -166,48 +206,6 @@ msgstr "'%s' integer %d tidak dalam kisaran %d..%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "'%s' integer 0x%x tidak cukup didalam mask 0x%x" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "Objek '%s' tidak dapat menetapkan atribut '%q'" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "Objek '%s' tidak mendukung '%q'" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "Objek '%s' tidak mendukung penetapan item" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "Objek '%s' tidak mendukung penghapusan item" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "Objek '%s' tidak memiliki atribut '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "Objek '%s' bukan iterator" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "Objek '%s' tidak dapat dipanggil" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "'%s' objek tidak dapat diulang" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "Objek '%s' tidak dapat disubkripsikan" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "'=' perataan tidak diizinkan dalam penentu format string" @@ -457,6 +455,10 @@ msgstr "Panjang buffer %d terlalu besar. Itu harus kurang dari %d" msgid "Buffer length must be a multiple of 512" msgstr "Panjang buffer harus kelipatan 512" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "Penyangga harus memiliki panjang setidaknya 1" @@ -658,6 +660,10 @@ msgstr "Tidak dapat menginisialisasi ulang timer" msgid "Could not restart PWM" msgstr "Tidak dapat memulai ulang PWM" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "Tidak dapat memulai PWM" @@ -841,6 +847,11 @@ msgstr "Gagal menulis flash internal." msgid "File exists" msgstr "File sudah ada" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -866,7 +877,7 @@ msgid "Group full" msgstr "Grup penuh" #: 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "Perangkat keras sibuk, coba pin alternatif" @@ -933,6 +944,11 @@ msgstr "" msgid "Invalid %q pin" msgstr "%q pada tidak valid" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "Nilai Unit ADC tidak valid" @@ -945,24 +961,12 @@ msgstr "File BMP tidak valid" msgid "Invalid DAC pin supplied" msgstr "Pin DAC yang diberikan tidak valid" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "Pilihan pin I2C tidak valid" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frekuensi PWM tidak valid" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "Pilihan pin SPI tidak valid" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "Pilihan pin UART tidak valid" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argumen tidak valid" @@ -1259,6 +1263,10 @@ msgstr "Tidak dapat menyambungkan ke AP" msgid "Not playing" msgstr "" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1344,10 +1352,6 @@ msgstr "Tambahkan module apapun pada filesystem\n" msgid "Polygon needs at least 3 points" msgstr "" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1423,13 +1427,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Berjalan di mode aman(safe mode)! Auto-reload tidak aktif.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" +msgid "Running in safe mode! " msgstr "" -"Berjalan di mode aman(safe mode)! tidak menjalankan kode yang tersimpan.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -1440,6 +1439,16 @@ msgstr "" msgid "SDA or SCL needs a pull up" msgstr "SDA atau SCL membutuhkan pull up" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "" @@ -1796,8 +1805,7 @@ msgid "__init__() should return None" msgstr "" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" +msgid "__init__() should return None, not '%q'" msgstr "" #: py/objobject.c @@ -1952,7 +1960,7 @@ msgstr "byte > 8 bit tidak didukung" msgid "bytes value out of range" msgstr "" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "kalibrasi keluar dari jangkauan" @@ -1984,47 +1992,17 @@ msgstr "" msgid "can't assign to expression" msgstr "tidak dapat menetapkan ke ekspresi" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "" - #: py/obj.c -msgid "can't convert to complex" -msgstr "" - -#: py/obj.c -msgid "can't convert to float" -msgstr "" - -#: py/obj.c -msgid "can't convert to int" +msgid "can't convert to %q" msgstr "" #: py/objstr.c @@ -2432,7 +2410,7 @@ msgstr "fungsi kehilangan argumen keyword '%q' yang dibutuhkan" msgid "function missing required positional argument #%d" msgstr "fungsi kehilangan argumen posisi #%d yang dibutuhkan" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "fungsi mengambil posisi argumen %d tapi %d yang diberikan" @@ -2481,10 +2459,7 @@ msgstr "lapisan (padding) tidak benar" msgid "index is out of bounds" msgstr "" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "index keluar dari jangkauan" @@ -2840,8 +2815,7 @@ msgid "number of points must be at least 2" msgstr "" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" +msgid "object '%q' is not a tuple or list" msgstr "" #: py/obj.c @@ -2877,8 +2851,7 @@ msgid "object not iterable" msgstr "" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" +msgid "object of type '%q' has no len()" msgstr "" #: py/obj.c @@ -2972,20 +2945,9 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "Muncul dari PulseIn yang kosong" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" msgstr "" #: py/objint_mpz.c @@ -3142,12 +3104,7 @@ msgid "stream operation not supported" msgstr "" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" +msgid "string indices must be integers, not %q" msgstr "" #: py/stream.c @@ -3158,10 +3115,6 @@ msgstr "" msgid "struct: cannot index" msgstr "struct: tidak bisa melakukan index" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "struct: index keluar dari jangkauan" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "struct: tidak ada fields" @@ -3232,7 +3185,7 @@ msgstr "" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "" @@ -3240,10 +3193,6 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3299,8 +3248,7 @@ msgid "unknown conversion specifier %c" msgstr "" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" +msgid "unknown format code '%c' for object of type '%q'" msgstr "" #: py/compile.c @@ -3340,7 +3288,7 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "" #: py/runtime.c -msgid "unsupported type for %q: '%s'" +msgid "unsupported type for %q: '%q'" msgstr "" #: py/runtime.c @@ -3348,7 +3296,7 @@ msgid "unsupported type for operator" msgstr "" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" msgstr "" #: py/objint.c @@ -3428,6 +3376,58 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "indeks %q harus bilangan bulat, bukan %s" + +#~ msgid "'%s' object cannot assign attribute '%q'" +#~ msgstr "Objek '%s' tidak dapat menetapkan atribut '%q'" + +#~ msgid "'%s' object does not support '%q'" +#~ msgstr "Objek '%s' tidak mendukung '%q'" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "Objek '%s' tidak mendukung penetapan item" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "Objek '%s' tidak mendukung penghapusan item" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "Objek '%s' tidak memiliki atribut '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "Objek '%s' bukan iterator" + +#~ msgid "'%s' object is not callable" +#~ msgstr "Objek '%s' tidak dapat dipanggil" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "'%s' objek tidak dapat diulang" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "Objek '%s' tidak dapat disubkripsikan" + +#~ msgid "Invalid I2C pin selection" +#~ msgstr "Pilihan pin I2C tidak valid" + +#~ msgid "Invalid SPI pin selection" +#~ msgstr "Pilihan pin SPI tidak valid" + +#~ msgid "Invalid UART pin selection" +#~ msgstr "Pilihan pin UART tidak valid" + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Berjalan di mode aman(safe mode)! Auto-reload tidak aktif.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "" +#~ "Berjalan di mode aman(safe mode)! tidak menjalankan kode yang tersimpan.\n" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "Muncul dari PulseIn yang kosong" + +#~ msgid "struct: index out of range" +#~ msgstr "struct: index keluar dari jangkauan" + #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' atau 'async with' di luar fungsi async" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 5ed32d6382..ffb2e91ef6 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -66,12 +66,16 @@ msgstr "" msgid "%q in use" msgstr "" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "" #: py/obj.c -msgid "%q indices must be integers, not %s" +msgid "%q indices must be integers, not %q" msgstr "" #: shared-bindings/vectorio/Polygon.c @@ -110,6 +114,42 @@ msgstr "" msgid "'%q' argument required" msgstr "" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -160,48 +200,6 @@ msgstr "" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "" @@ -449,6 +447,10 @@ msgstr "" msgid "Buffer length must be a multiple of 512" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "" @@ -639,6 +641,10 @@ msgstr "" msgid "Could not restart PWM" msgstr "" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -821,6 +827,11 @@ msgstr "" msgid "File exists" msgstr "" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -845,7 +856,7 @@ msgid "Group full" 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "" @@ -910,6 +921,11 @@ msgstr "" msgid "Invalid %q pin" msgstr "" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "" @@ -922,24 +938,12 @@ msgstr "" msgid "Invalid DAC pin supplied" msgstr "" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1235,6 +1239,10 @@ msgstr "" msgid "Not playing" msgstr "" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1320,10 +1328,6 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1396,11 +1400,7 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" +msgid "Running in safe mode! " msgstr "" #: shared-module/sdcardio/SDCard.c @@ -1412,6 +1412,16 @@ msgstr "" msgid "SDA or SCL needs a pull up" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "" @@ -1761,8 +1771,7 @@ msgid "__init__() should return None" msgstr "" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" +msgid "__init__() should return None, not '%q'" msgstr "" #: py/objobject.c @@ -1916,7 +1925,7 @@ msgstr "" msgid "bytes value out of range" msgstr "" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "" @@ -1948,47 +1957,17 @@ msgstr "" msgid "can't assign to expression" msgstr "" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "" - #: py/obj.c -msgid "can't convert to complex" -msgstr "" - -#: py/obj.c -msgid "can't convert to float" -msgstr "" - -#: py/obj.c -msgid "can't convert to int" +msgid "can't convert to %q" msgstr "" #: py/objstr.c @@ -2396,7 +2375,7 @@ msgstr "" msgid "function missing required positional argument #%d" msgstr "" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -2445,10 +2424,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "" @@ -2804,8 +2780,7 @@ msgid "number of points must be at least 2" msgstr "" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" +msgid "object '%q' is not a tuple or list" msgstr "" #: py/obj.c @@ -2841,8 +2816,7 @@ msgid "object not iterable" msgstr "" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" +msgid "object of type '%q' has no len()" msgstr "" #: py/obj.c @@ -2935,20 +2909,9 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" msgstr "" #: py/objint_mpz.c @@ -3105,12 +3068,7 @@ msgid "stream operation not supported" msgstr "" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" +msgid "string indices must be integers, not %q" msgstr "" #: py/stream.c @@ -3121,10 +3079,6 @@ msgstr "" msgid "struct: cannot index" msgstr "" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "" @@ -3194,7 +3148,7 @@ msgstr "" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "" @@ -3202,10 +3156,6 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3261,8 +3211,7 @@ msgid "unknown conversion specifier %c" msgstr "" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" +msgid "unknown format code '%c' for object of type '%q'" msgstr "" #: py/compile.c @@ -3302,7 +3251,7 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "" #: py/runtime.c -msgid "unsupported type for %q: '%s'" +msgid "unsupported type for %q: '%q'" msgstr "" #: py/runtime.c @@ -3310,7 +3259,7 @@ msgid "unsupported type for operator" msgstr "" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" msgstr "" #: py/objint.c diff --git a/locale/cs.po b/locale/cs.po index a971375fba..c1a8ded4e9 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" "PO-Revision-Date: 2020-05-24 03:22+0000\n" "Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" @@ -44,11 +44,11 @@ msgstr "" #: py/obj.c msgid " File \"%q\"" -msgstr "  Soubor \"% q\"" +msgstr "  Soubor \"%q\"" #: py/obj.c msgid " File \"%q\", line %d" -msgstr "  Soubor \"% q\", řádek% d" +msgstr "  Soubor \"%q\", řádek %d" #: main.c msgid " output:\n" @@ -57,7 +57,7 @@ msgstr " výstup:\n" #: py/objstr.c #, c-format msgid "%%c requires int or char" -msgstr "%% c vyžaduje int nebo char" +msgstr "%%c vyžaduje int nebo char" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -72,17 +72,21 @@ msgstr "" msgid "%q in use" msgstr "%q se nyní používá" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "%q index je mimo rozsah" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "Indexy% q musí být celá čísla, nikoli% s" +msgid "%q indices must be integers, not %q" +msgstr "" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" -msgstr "Seznam% q musí být seznam" +msgstr "Seznam %q musí být seznam" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" @@ -94,11 +98,11 @@ msgstr "" #: shared-bindings/memorymonitor/AllocationAlarm.c #: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c msgid "%q must be >= 1" -msgstr "% q musí být > = 1" +msgstr " %q musí být > = 1" #: shared-module/vectorio/Polygon.c msgid "%q must be a tuple of length 2" -msgstr "% q musí být n-tice délky 2" +msgstr " %q musí být n-tice délky 2" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q pin invalid" @@ -106,7 +110,7 @@ msgstr "" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" -msgstr "% q by měl být int" +msgstr " %q by měl být int" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" @@ -116,6 +120,42 @@ msgstr "" msgid "'%q' argument required" msgstr "" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -166,48 +206,6 @@ msgstr "" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "" @@ -455,6 +453,10 @@ msgstr "" msgid "Buffer length must be a multiple of 512" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "" @@ -645,6 +647,10 @@ msgstr "" msgid "Could not restart PWM" msgstr "" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -827,6 +833,11 @@ msgstr "" msgid "File exists" msgstr "" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -851,7 +862,7 @@ msgid "Group full" 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "" @@ -916,6 +927,11 @@ msgstr "" msgid "Invalid %q pin" msgstr "" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "" @@ -928,24 +944,12 @@ msgstr "" msgid "Invalid DAC pin supplied" msgstr "" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1241,6 +1245,10 @@ msgstr "" msgid "Not playing" msgstr "" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1326,10 +1334,6 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1402,11 +1406,7 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" +msgid "Running in safe mode! " msgstr "" #: shared-module/sdcardio/SDCard.c @@ -1418,6 +1418,16 @@ msgstr "" msgid "SDA or SCL needs a pull up" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "" @@ -1767,8 +1777,7 @@ msgid "__init__() should return None" msgstr "" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" +msgid "__init__() should return None, not '%q'" msgstr "" #: py/objobject.c @@ -1922,7 +1931,7 @@ msgstr "" msgid "bytes value out of range" msgstr "" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "" @@ -1954,47 +1963,17 @@ msgstr "" msgid "can't assign to expression" msgstr "" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "" - #: py/obj.c -msgid "can't convert to complex" -msgstr "" - -#: py/obj.c -msgid "can't convert to float" -msgstr "" - -#: py/obj.c -msgid "can't convert to int" +msgid "can't convert to %q" msgstr "" #: py/objstr.c @@ -2402,7 +2381,7 @@ msgstr "" msgid "function missing required positional argument #%d" msgstr "" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -2451,10 +2430,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "" @@ -2810,8 +2786,7 @@ msgid "number of points must be at least 2" msgstr "" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" +msgid "object '%q' is not a tuple or list" msgstr "" #: py/obj.c @@ -2847,8 +2822,7 @@ msgid "object not iterable" msgstr "" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" +msgid "object of type '%q' has no len()" msgstr "" #: py/obj.c @@ -2941,20 +2915,9 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" msgstr "" #: py/objint_mpz.c @@ -3111,12 +3074,7 @@ msgid "stream operation not supported" msgstr "" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" +msgid "string indices must be integers, not %q" msgstr "" #: py/stream.c @@ -3127,10 +3085,6 @@ msgstr "" msgid "struct: cannot index" msgstr "" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "" @@ -3200,7 +3154,7 @@ msgstr "" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "" @@ -3208,10 +3162,6 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3267,8 +3217,7 @@ msgid "unknown conversion specifier %c" msgstr "" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" +msgid "unknown format code '%c' for object of type '%q'" msgstr "" #: py/compile.c @@ -3308,7 +3257,7 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "" #: py/runtime.c -msgid "unsupported type for %q: '%s'" +msgid "unsupported type for %q: '%q'" msgstr "" #: py/runtime.c @@ -3316,7 +3265,7 @@ msgid "unsupported type for operator" msgstr "" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" msgstr "" #: py/objint.c @@ -3395,3 +3344,6 @@ msgstr "" #: extmod/ulab/code/filter/filter.c msgid "zi must be of shape (n_section, 2)" msgstr "" + +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "Indexy %q musí být celá čísla, nikoli %s" diff --git a/locale/de_DE.po b/locale/de_DE.po index 30f970aeae..10c07f667c 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" "PO-Revision-Date: 2020-06-16 18:24+0000\n" "Last-Translator: Andreas Buchen \n" "Language: de_DE\n" @@ -71,13 +71,17 @@ msgstr "" msgid "%q in use" msgstr "%q in Benutzung" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "Der Index %q befindet sich außerhalb des Bereiches" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "%q Indizes müssen Integer sein, nicht %s" +msgid "%q indices must be integers, not %q" +msgstr "" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -115,6 +119,42 @@ msgstr "%q() nimmt %d Argumente ohne Keyword an, aber es wurden %d angegeben" msgid "'%q' argument required" msgstr "'%q' Argument erforderlich" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -165,48 +205,6 @@ msgstr "'%s' integer %d ist nicht im Bereich %d..%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "'%s' Integer 0x%x passt nicht in Maske 0x%x" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "Das Objekt '%s' kann das Attribut '%q' nicht zuweisen" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "Das Objekt '%s' unterstützt '%q' nicht" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "'%s' Objekt unterstützt keine Zuweisung von Elementen" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "'%s' Objekt unterstützt das Löschen von Elementen nicht" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "'%s' Objekt hat kein Attribut '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "'%s' Objekt ist kein Iterator" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "'%s' object ist nicht aufrufbar" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "'%s' Objekt nicht iterierbar" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "'%s' Objekt hat keine '__getitem__'-Methode (not subscriptable)" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "'='-Ausrichtung ist im String-Formatbezeichner nicht zulässig" @@ -458,6 +456,10 @@ msgstr "Die Pufferlänge %d ist zu groß. Sie muss kleiner als %d sein" msgid "Buffer length must be a multiple of 512" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "Der Puffer muss eine Mindestenslänge von 1 haben" @@ -655,6 +657,10 @@ msgstr "Timer konnte nicht neu gestartet werden" msgid "Could not restart PWM" msgstr "PWM konnte nicht neu gestartet werden" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "PWM konnte nicht gestartet werden" @@ -838,6 +844,11 @@ msgstr "Interner Flash konnte nicht geschrieben werden." msgid "File exists" msgstr "Datei existiert" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -866,7 +877,7 @@ msgid "Group full" msgstr "Gruppe voll" #: 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "Hardware beschäftigt, versuchen Sie alternative Pins" @@ -933,6 +944,11 @@ msgstr "" msgid "Invalid %q pin" msgstr "Ungültiger %q pin" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "Ungültiger ADC-Einheitenwert" @@ -945,24 +961,12 @@ msgstr "Ungültige BMP-Datei" msgid "Invalid DAC pin supplied" msgstr "Ungültiger DAC-Pin angegeben" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "Ungültige I2C-Pinauswahl" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Ungültige PWM Frequenz" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "Ungültige SPI-Pin-Auswahl" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "Ungültige UART-Pinauswahl" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Ungültiges Argument" @@ -1260,6 +1264,10 @@ msgstr "Nicht verbunden" msgid "Not playing" msgstr "Spielt nicht ab" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1354,10 +1362,6 @@ msgstr "und alle Module im Dateisystem \n" msgid "Polygon needs at least 3 points" msgstr "Polygone brauchen mindestens 3 Punkte" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "Pop aus einem leeren Ps2-Puffer" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Der Präfixbuffer muss sich auf dem Heap befinden" @@ -1432,12 +1436,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Zeileneintrag muss ein digitalio.DigitalInOut sein" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Sicherheitsmodus aktiv! Automatisches Neuladen ist deaktiviert.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n" +msgid "Running in safe mode! " +msgstr "" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -1448,6 +1448,16 @@ msgstr "" msgid "SDA or SCL needs a pull up" msgstr "SDA oder SCL brauchen pull up" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "SPI-Init-Fehler" @@ -1824,9 +1834,8 @@ msgid "__init__() should return None" msgstr "__init__() sollte None zurückgeben" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" -msgstr "__init__() sollte None zurückgeben, nicht '%s'" +msgid "__init__() should return None, not '%q'" +msgstr "" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -1979,7 +1988,7 @@ msgstr "bytes mit mehr als 8 bits werden nicht unterstützt" msgid "bytes value out of range" msgstr "Byte-Wert außerhalb des Bereichs" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "Kalibrierung ist außerhalb der Reichweite" @@ -2013,48 +2022,18 @@ msgstr "" msgid "can't assign to expression" msgstr "kann keinem Ausdruck zuweisen" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "kann %s nicht nach complex konvertieren" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "kann %s nicht nach float konvertieren" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" -msgstr "kann %s nicht nach int konvertieren" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "Kann '%q' Objekt nicht implizit nach %q konvertieren" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "kann NaN nicht nach int konvertieren" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "kann Adresse nicht in int konvertieren" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "kann inf nicht nach int konvertieren" - #: py/obj.c -msgid "can't convert to complex" -msgstr "kann nicht nach complex konvertieren" - -#: py/obj.c -msgid "can't convert to float" -msgstr "kann nicht nach float konvertieren" - -#: py/obj.c -msgid "can't convert to int" -msgstr "kann nicht nach int konvertieren" +msgid "can't convert to %q" +msgstr "" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2472,7 +2451,7 @@ msgstr "Funktion vermisst benötigtes Keyword-Argumente '%q'" msgid "function missing required positional argument #%d" msgstr "Funktion vermisst benötigtes Argumente ohne Keyword #%d" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -2522,10 +2501,7 @@ msgstr "padding ist inkorrekt" msgid "index is out of bounds" msgstr "Index ist außerhalb der Grenzen" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "index außerhalb der Reichweite" @@ -2888,9 +2864,8 @@ msgid "number of points must be at least 2" msgstr "Die Anzahl der Punkte muss mindestens 2 betragen" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" -msgstr "Objekt '%s' ist weder tupel noch list" +msgid "object '%q' is not a tuple or list" +msgstr "" #: py/obj.c msgid "object does not support item assignment" @@ -2925,9 +2900,8 @@ msgid "object not iterable" msgstr "Objekt nicht iterierbar" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "Objekt vom Typ '%s' hat keine len()" +msgid "object of type '%q' has no len()" +msgstr "" #: py/obj.c msgid "object with buffer protocol required" @@ -3022,21 +2996,10 @@ msgstr "Polygon kann nur in einem übergeordneten Element registriert werden" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "pop von einem leeren PulseIn" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "pop von einer leeren Menge (set)" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "pop von einer leeren Liste" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" -msgstr "popitem(): dictionary ist leer" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3194,13 +3157,8 @@ msgid "stream operation not supported" msgstr "stream operation ist nicht unterstützt" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "String index außerhalb des Bereiches" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" -msgstr "String indizes müssen Integer sein, nicht %s" +msgid "string indices must be integers, not %q" +msgstr "" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3211,10 +3169,6 @@ msgstr "" msgid "struct: cannot index" msgstr "struct: kann nicht indexieren" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "struct: index außerhalb gültigen Bereichs" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "struct: keine Felder" @@ -3284,7 +3238,7 @@ msgstr "zu viele Werte zum Auspacken (erwartet %d)" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "Tupelindex außerhalb des Bereichs" @@ -3292,10 +3246,6 @@ msgstr "Tupelindex außerhalb des Bereichs" msgid "tuple/list has wrong length" msgstr "tupel/list hat falsche Länge" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "Tupel / Liste auf RHS erforderlich" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3355,9 +3305,8 @@ msgid "unknown conversion specifier %c" msgstr "unbekannter Konvertierungs specifier %c" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" -msgstr "unbekannter Formatcode '%c' für Objekt vom Typ '%s'" +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" #: py/compile.c msgid "unknown type" @@ -3396,16 +3345,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "nicht unterstütztes Formatzeichen '%c' (0x%x) bei Index %d" #: py/runtime.c -msgid "unsupported type for %q: '%s'" -msgstr "nicht unterstützter Type für %q: '%s'" +msgid "unsupported type for %q: '%q'" +msgstr "" #: py/runtime.c msgid "unsupported type for operator" msgstr "nicht unterstützter Typ für Operator" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" -msgstr "nicht unterstützte Typen für %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" #: py/objint.c #, c-format @@ -3484,15 +3433,132 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "tuple/list required on RHS" +#~ msgstr "Tupel / Liste auf RHS erforderlich" + +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "%q Indizes müssen Integer sein, nicht %s" + +#~ msgid "'%s' object cannot assign attribute '%q'" +#~ msgstr "Das Objekt '%s' kann das Attribut '%q' nicht zuweisen" + +#~ msgid "'%s' object does not support '%q'" +#~ msgstr "Das Objekt '%s' unterstützt '%q' nicht" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "'%s' Objekt unterstützt keine Zuweisung von Elementen" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "'%s' Objekt unterstützt das Löschen von Elementen nicht" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "'%s' Objekt hat kein Attribut '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "'%s' Objekt ist kein Iterator" + +#~ msgid "'%s' object is not callable" +#~ msgstr "'%s' object ist nicht aufrufbar" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "'%s' Objekt nicht iterierbar" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "'%s' Objekt hat keine '__getitem__'-Methode (not subscriptable)" + +#~ msgid "Invalid I2C pin selection" +#~ msgstr "Ungültige I2C-Pinauswahl" + +#~ msgid "Invalid SPI pin selection" +#~ msgstr "Ungültige SPI-Pin-Auswahl" + +#~ msgid "Invalid UART pin selection" +#~ msgstr "Ungültige UART-Pinauswahl" + +#~ msgid "Pop from an empty Ps2 buffer" +#~ msgstr "Pop aus einem leeren Ps2-Puffer" + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Sicherheitsmodus aktiv! Automatisches Neuladen ist deaktiviert.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n" + +#~ msgid "__init__() should return None, not '%s'" +#~ msgstr "__init__() sollte None zurückgeben, nicht '%s'" + +#~ msgid "can't convert %s to complex" +#~ msgstr "kann %s nicht nach complex konvertieren" + +#~ msgid "can't convert %s to float" +#~ msgstr "kann %s nicht nach float konvertieren" + +#~ msgid "can't convert %s to int" +#~ msgstr "kann %s nicht nach int konvertieren" + +#~ msgid "can't convert NaN to int" +#~ msgstr "kann NaN nicht nach int konvertieren" + +#~ msgid "can't convert address to int" +#~ msgstr "kann Adresse nicht in int konvertieren" + +#~ msgid "can't convert inf to int" +#~ msgstr "kann inf nicht nach int konvertieren" + +#~ msgid "can't convert to complex" +#~ msgstr "kann nicht nach complex konvertieren" + +#~ msgid "can't convert to float" +#~ msgstr "kann nicht nach float konvertieren" + +#~ msgid "can't convert to int" +#~ msgstr "kann nicht nach int konvertieren" + +#~ msgid "object '%s' is not a tuple or list" +#~ msgstr "Objekt '%s' ist weder tupel noch list" + +#~ msgid "object of type '%s' has no len()" +#~ msgstr "Objekt vom Typ '%s' hat keine len()" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "pop von einem leeren PulseIn" + +#~ msgid "pop from an empty set" +#~ msgstr "pop von einer leeren Menge (set)" + +#~ msgid "pop from empty list" +#~ msgstr "pop von einer leeren Liste" + +#~ msgid "popitem(): dictionary is empty" +#~ msgstr "popitem(): dictionary ist leer" + +#~ msgid "string index out of range" +#~ msgstr "String index außerhalb des Bereiches" + +#~ msgid "string indices must be integers, not %s" +#~ msgstr "String indizes müssen Integer sein, nicht %s" + +#~ msgid "struct: index out of range" +#~ msgstr "struct: index außerhalb gültigen Bereichs" + +#~ msgid "unknown format code '%c' for object of type '%s'" +#~ msgstr "unbekannter Formatcode '%c' für Objekt vom Typ '%s'" + +#~ msgid "unsupported type for %q: '%s'" +#~ msgstr "nicht unterstützter Type für %q: '%s'" + +#~ msgid "unsupported types for %q: '%s', '%s'" +#~ msgstr "nicht unterstützte Typen für %q: '%s', '%s'" + #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' oder 'async with' außerhalb der asynchronen Funktion" -#~ msgid "PulseIn not supported on this chip" -#~ msgstr "PulseIn wird auf diesem Chip nicht unterstützt" - #~ msgid "PulseOut not supported on this chip" #~ msgstr "PulseOut wird auf diesem Chip nicht unterstützt" +#~ msgid "PulseIn not supported on this chip" +#~ msgstr "PulseIn wird auf diesem Chip nicht unterstützt" + #~ msgid "AP required" #~ msgstr "AP erforderlich" diff --git a/locale/es.po b/locale/es.po index 1ac9cd0098..5012b749be 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" -"PO-Revision-Date: 2020-07-22 20:48+0000\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" +"PO-Revision-Date: 2020-08-17 21:11+0000\n" "Last-Translator: Alvaro Figueroa \n" "Language-Team: \n" "Language: es\n" @@ -75,13 +75,17 @@ msgstr "%q fallo: %d" msgid "%q in use" msgstr "%q está siendo utilizado" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "%q indice fuera de rango" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "%q indices deben ser enteros, no %s" +msgid "%q indices must be integers, not %q" +msgstr "índices %q deben ser enteros, no %q" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -89,7 +93,7 @@ msgstr "%q lista debe ser una lista" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" -msgstr "" +msgstr "%q debe ser >= 0" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c @@ -119,6 +123,42 @@ msgstr "%q() toma %d argumentos posicionales pero %d fueron dados" msgid "'%q' argument required" msgstr "argumento '%q' requerido" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "el objeto '%q' no puede asignar el atributo '%q'" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "objeto '%q' no tiene capacidad '%q'" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "objeto '%q' no tiene capacidad de asignado de artículo" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "objeto '%q' no tiene capacidad de borrado de artículo" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "objeto '%q' no tiene atributo '%q'" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "objeto '%q' no es un iterador" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "objeto '%q' no es llamable" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "objeto '%q' no es iterable" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "objeto '%q' no es subscribible" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -169,48 +209,6 @@ msgstr "'%s' entero %d no esta dentro del rango %d..%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "'%s' entero 0x%x no cabe en la máscara 0x%x" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "El objeto '%s' no puede asignar al atributo '%q'" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "El objeto '%s' no admite '%q'" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "el objeto '%s' no soporta la asignación de elementos" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "objeto '%s' no soporta la eliminación de elementos" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "objeto '%s' no tiene atributo '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "objeto '%s' no es un iterator" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "objeto '%s' no puede ser llamado" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "objeto '%s' no es iterable" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "el objeto '%s' no es suscriptable" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "'=' alineación no permitida en el especificador string format" @@ -229,7 +227,7 @@ msgstr "'await' fuera de la función" #: py/compile.c msgid "'await', 'async for' or 'async with' outside async function" -msgstr "" +msgstr "'await', 'async for' o 'async with' fuera de la función async" #: py/compile.c msgid "'break' outside loop" @@ -241,7 +239,7 @@ msgstr "'continue' fuera de un bucle" #: py/objgenerator.c msgid "'coroutine' object is not an iterator" -msgstr "" +msgstr "el objeto 'coroutine' no es un iterador" #: py/compile.c msgid "'data' requires at least 2 arguments" @@ -338,7 +336,7 @@ msgstr "Ya se encuentra publicando." #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c msgid "Already running" -msgstr "" +msgstr "Ya está en ejecución" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" @@ -378,7 +376,7 @@ msgstr "Como máximo %d %q se puede especificar (no %d)" #: shared-module/memorymonitor/AllocationAlarm.c #, c-format msgid "Attempt to allocate %d blocks" -msgstr "" +msgstr "Tratando de localizar %d bloques" #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when MicroPython VM not running." @@ -464,6 +462,10 @@ msgstr "La longitud del buffer %d es muy grande. Debe ser menor a %d" msgid "Buffer length must be a multiple of 512" msgstr "El tamaño del búfer debe ser múltiplo de 512" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "Búfer deber ser un múltiplo de 512 bytes" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "Buffer debe ser de longitud 1 como minimo" @@ -660,6 +662,10 @@ msgstr "No se pudo reiniciar el temporizador" msgid "Could not restart PWM" msgstr "No se pudo reiniciar el PWM" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "No se puede definir la dirección" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "No se pudo iniciar el PWM" @@ -842,6 +848,11 @@ msgstr "Error al escribir al flash interno." msgid "File exists" msgstr "El archivo ya existe" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "Framebuffer requiere %d bytes" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "Frecuencia capturada por encima de la capacidad. Captura en pausa." @@ -867,7 +878,7 @@ msgid "Group full" msgstr "Group lleno" #: 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "Hardware ocupado, pruebe pines alternativos" @@ -885,7 +896,7 @@ msgstr "Error de inicio de I2C" #: shared-bindings/audiobusio/I2SOut.c msgid "I2SOut not available" -msgstr "" +msgstr "I2SOut no disponible" #: shared-bindings/aesio/aes.c #, c-format @@ -934,6 +945,11 @@ msgstr "%q inválido" msgid "Invalid %q pin" msgstr "Pin %q inválido" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "selección inválida de pin %q" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "Valor de unidad de ADC no válido" @@ -946,24 +962,12 @@ msgstr "Archivo BMP inválido" msgid "Invalid DAC pin supplied" msgstr "Pin suministrado inválido para DAC" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "Selección de pin I2C no válida" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frecuencia PWM inválida" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "Selección de pin SPI no válida" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "Selección de pin UART no válida" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argumento inválido" @@ -1259,6 +1263,10 @@ msgstr "No conectado" msgid "Not playing" msgstr "No reproduciendo" +#: main.c +msgid "Not running saved code.\n" +msgstr "No ejecutando el código almacenado.\n" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1354,10 +1362,6 @@ msgstr "Además de cualquier módulo en el sistema de archivos\n" msgid "Polygon needs at least 3 points" msgstr "El polígono necesita al menos 3 puntos" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "Pop de un buffer Ps2 vacio" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "El búfer de prefijo debe estar en el montículo" @@ -1431,12 +1435,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "La entrada de la fila debe ser digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Ejecutando en modo seguro! La auto-recarga esta deshabilitada.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n" +msgid "Running in safe mode! " +msgstr "¡Corriendo en modo seguro! " #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -1447,6 +1447,16 @@ msgstr "Sin capacidad para formato CSD para tarjeta SD" msgid "SDA or SCL needs a pull up" msgstr "SDA o SCL necesitan una pull up" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "Error SDIO GetCardInfo %d" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "Error de iniciado de SDIO %d" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "Error de inicio de SPI" @@ -1591,6 +1601,8 @@ msgstr "" msgid "" "Timer was reserved for internal use - declare PWM pins earlier in the program" msgstr "" +"El temporizador es utilizado para uso interno - declare los pines para PWM " +"más temprano en el programa" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." @@ -1819,9 +1831,8 @@ msgid "__init__() should return None" msgstr "__init__() deberia devolver None" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" -msgstr "__init__() deberia devolver None, no '%s'" +msgid "__init__() should return None, not '%q'" +msgstr "__init__() debe retornar None, no '%q'" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -1866,7 +1877,7 @@ msgstr "el argumento tiene un tipo erroneo" #: extmod/ulab/code/linalg/linalg.c msgid "argument must be ndarray" -msgstr "" +msgstr "argumento debe ser ndarray" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c @@ -1974,7 +1985,7 @@ msgstr "bytes > 8 bits no soportados" msgid "bytes value out of range" msgstr "valor de bytes fuera de rango" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "calibration esta fuera de rango" @@ -2006,48 +2017,18 @@ msgstr "no se puede agregar un método a una clase ya subclasificada" msgid "can't assign to expression" msgstr "no se puede asignar a la expresión" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "no se puede convertir %s a complejo" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "no se puede convertir %s a float" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" -msgstr "no se puede convertir %s a int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "no puede convertir %q a %q" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "no se puede convertir el objeto '%q' a %q implícitamente" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "no se puede convertir Nan a int" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "no se puede convertir address a int" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "no se puede convertir inf en int" - #: py/obj.c -msgid "can't convert to complex" -msgstr "no se puede convertir a complejo" - -#: py/obj.c -msgid "can't convert to float" -msgstr "no se puede convertir a float" - -#: py/obj.c -msgid "can't convert to int" -msgstr "no se puede convertir a int" +msgid "can't convert to %q" +msgstr "no puede convertir a %q" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2461,7 +2442,7 @@ msgstr "la función requiere del argumento por palabra clave '%q'" msgid "function missing required positional argument #%d" msgstr "la función requiere del argumento posicional #%d" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "la función toma %d argumentos posicionales pero le fueron dados %d" @@ -2510,10 +2491,7 @@ msgstr "relleno (padding) incorrecto" msgid "index is out of bounds" msgstr "el índice está fuera de límites" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "index fuera de rango" @@ -2875,9 +2853,8 @@ msgid "number of points must be at least 2" msgstr "el número de puntos debe ser al menos 2" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" -msgstr "el objeto '%s' no es una tupla o lista" +msgid "object '%q' is not a tuple or list" +msgstr "objeto '%q' no es tupla o lista" #: py/obj.c msgid "object does not support item assignment" @@ -2912,9 +2889,8 @@ msgid "object not iterable" msgstr "objeto no iterable" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "el objeto de tipo '%s' no tiene len()" +msgid "object of type '%q' has no len()" +msgstr "objeto de tipo '%q' no tiene len()" #: py/obj.c msgid "object with buffer protocol required" @@ -3006,21 +2982,10 @@ msgstr "el polígono solo se puede registrar en uno de los padres" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "pop de un PulseIn vacío" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "pop desde un set vacío" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "pop desde una lista vacía" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" -msgstr "popitem(): diccionario vacío" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "pop desde %q vacía" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3178,13 +3143,8 @@ msgid "stream operation not supported" msgstr "operación stream no soportada" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "string index fuera de rango" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" -msgstr "índices de string deben ser enteros, no %s" +msgid "string indices must be integers, not %q" +msgstr "índices de cadena deben ser enteros, no %q" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3194,10 +3154,6 @@ msgstr "string no soportado; usa bytes o bytearray" msgid "struct: cannot index" msgstr "struct: no se puede indexar" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "struct: index fuera de rango" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "struct: sin campos" @@ -3266,9 +3222,9 @@ msgstr "demasiados valores para descomprimir (%d esperado)" #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" -msgstr "" +msgstr "trapz está definido para arreglos 1D de igual tamaño" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "tuple index fuera de rango" @@ -3276,10 +3232,6 @@ msgstr "tuple index fuera de rango" msgid "tuple/list has wrong length" msgstr "tupla/lista tiene una longitud incorrecta" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "tuple/lista se require en RHS" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3335,9 +3287,8 @@ msgid "unknown conversion specifier %c" msgstr "especificador de conversión %c desconocido" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" -msgstr "codigo format desconocido '%c' para el typo de objeto '%s'" +msgid "unknown format code '%c' for object of type '%q'" +msgstr "formato de código desconocicdo '%c' para objeto de tipo '%q'" #: py/compile.c msgid "unknown type" @@ -3376,16 +3327,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "carácter no soportado '%c' (0x%x) en índice %d" #: py/runtime.c -msgid "unsupported type for %q: '%s'" -msgstr "tipo no soportado para %q: '%s'" +msgid "unsupported type for %q: '%q'" +msgstr "tipo no soportado para %q: '%q'" #: py/runtime.c msgid "unsupported type for operator" msgstr "tipo de operador no soportado" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" -msgstr "tipos no soportados para %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" +msgstr "tipos no soportados para %q: '%q', '%q'" #: py/objint.c #, c-format @@ -3398,7 +3349,7 @@ msgstr "value_count debe ser > 0" #: extmod/ulab/code/linalg/linalg.c msgid "vectors must have same lengths" -msgstr "" +msgstr "los vectores deben tener el mismo tamaño" #: shared-bindings/watchdog/WatchDogTimer.c msgid "watchdog timeout must be greater than 0" @@ -3464,18 +3415,136 @@ 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 "tuple/list required on RHS" +#~ msgstr "tuple/lista se require en RHS" + +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "%q indices deben ser enteros, no %s" + +#~ msgid "'%s' object cannot assign attribute '%q'" +#~ msgstr "El objeto '%s' no puede asignar al atributo '%q'" + +#~ msgid "'%s' object does not support '%q'" +#~ msgstr "El objeto '%s' no admite '%q'" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "el objeto '%s' no soporta la asignación de elementos" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "objeto '%s' no soporta la eliminación de elementos" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "objeto '%s' no tiene atributo '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "objeto '%s' no es un iterator" + +#~ msgid "'%s' object is not callable" +#~ msgstr "objeto '%s' no puede ser llamado" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "objeto '%s' no es iterable" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "el objeto '%s' no es suscriptable" + +#~ msgid "Invalid I2C pin selection" +#~ msgstr "Selección de pin I2C no válida" + +#~ msgid "Invalid SPI pin selection" +#~ msgstr "Selección de pin SPI no válida" + +#~ msgid "Invalid UART pin selection" +#~ msgstr "Selección de pin UART no válida" + +#~ msgid "Pop from an empty Ps2 buffer" +#~ msgstr "Pop de un buffer Ps2 vacio" + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Ejecutando en modo seguro! La auto-recarga esta deshabilitada.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "" +#~ "Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n" + +#~ msgid "__init__() should return None, not '%s'" +#~ msgstr "__init__() deberia devolver None, no '%s'" + +#~ msgid "can't convert %s to complex" +#~ msgstr "no se puede convertir %s a complejo" + +#~ msgid "can't convert %s to float" +#~ msgstr "no se puede convertir %s a float" + +#~ msgid "can't convert %s to int" +#~ msgstr "no se puede convertir %s a int" + +#~ msgid "can't convert NaN to int" +#~ msgstr "no se puede convertir Nan a int" + +#~ msgid "can't convert address to int" +#~ msgstr "no se puede convertir address a int" + +#~ msgid "can't convert inf to int" +#~ msgstr "no se puede convertir inf en int" + +#~ msgid "can't convert to complex" +#~ msgstr "no se puede convertir a complejo" + +#~ msgid "can't convert to float" +#~ msgstr "no se puede convertir a float" + +#~ msgid "can't convert to int" +#~ msgstr "no se puede convertir a int" + +#~ msgid "object '%s' is not a tuple or list" +#~ msgstr "el objeto '%s' no es una tupla o lista" + +#~ msgid "object of type '%s' has no len()" +#~ msgstr "el objeto de tipo '%s' no tiene len()" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "pop de un PulseIn vacío" + +#~ msgid "pop from an empty set" +#~ msgstr "pop desde un set vacío" + +#~ msgid "pop from empty list" +#~ msgstr "pop desde una lista vacía" + +#~ msgid "popitem(): dictionary is empty" +#~ msgstr "popitem(): diccionario vacío" + +#~ msgid "string index out of range" +#~ msgstr "string index fuera de rango" + +#~ msgid "string indices must be integers, not %s" +#~ msgstr "índices de string deben ser enteros, no %s" + +#~ msgid "struct: index out of range" +#~ msgstr "struct: index fuera de rango" + +#~ msgid "unknown format code '%c' for object of type '%s'" +#~ msgstr "codigo format desconocido '%c' para el typo de objeto '%s'" + +#~ msgid "unsupported type for %q: '%s'" +#~ msgstr "tipo no soportado para %q: '%s'" + +#~ msgid "unsupported types for %q: '%s', '%s'" +#~ msgstr "tipos no soportados para %q: '%s', '%s'" + #~ msgid "'%q' object is not bytes-like" #~ msgstr "el objeto '%q' no es similar a bytes" #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' o 'async with' fuera de la función async" -#~ msgid "PulseIn not supported on this chip" -#~ msgstr "PulseIn no es compatible con este chip" - #~ msgid "PulseOut not supported on this chip" #~ msgstr "PulseOut no es compatible con este chip" +#~ msgid "PulseIn not supported on this chip" +#~ msgstr "PulseIn no es compatible con este chip" + #~ msgid "AP required" #~ msgstr "AP requerido" @@ -3719,8 +3788,8 @@ msgstr "zi debe ser una forma (n_section,2)" #~ "Only monochrome, indexed 8bpp, and 16bpp or greater BMPs supported: %d " #~ "bpp given" #~ msgstr "" -#~ "Solo se admiten BMP monocromos, indexados de 8bpp y 16bpp o superiores:% " -#~ "d bppdado" +#~ "Solo se admiten BMP monocromos, indexados de 8bpp y 16bpp o superiores:%d " +#~ "bppdado" #, fuzzy #~ msgid "Only slices with step=1 (aka None) are supported" diff --git a/locale/fil.po b/locale/fil.po index 91d7334e9f..37a21dc6a7 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -64,13 +64,17 @@ msgstr "" msgid "%q in use" msgstr "%q ay ginagamit" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "%q indeks wala sa sakop" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "%q indeks ay dapat integers, hindi %s" +msgid "%q indices must be integers, not %q" +msgstr "" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -111,6 +115,42 @@ msgstr "" msgid "'%q' argument required" msgstr "'%q' argument kailangan" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -161,48 +201,6 @@ msgstr "'%s' integer %d ay wala sa sakop ng %d..%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "'%s' integer 0x%x ay wala sa mask na sakop ng 0x%x" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "'%s' object hindi sumusuporta ng item assignment" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "'%s' object ay hindi sumusuporta sa pagtanggal ng item" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "'%s' object ay walang attribute '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "'%s' object ay hindi iterator" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "'%s' object hindi matatawag" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "'%s' object ay hindi ma i-iterable" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "'%s' object ay hindi maaaring i-subscript" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "'=' Gindi pinapayagan ang alignment sa pag specify ng string format" @@ -453,6 +451,10 @@ msgstr "" msgid "Buffer length must be a multiple of 512" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "Buffer dapat ay hindi baba sa 1 na haba" @@ -646,6 +648,10 @@ msgstr "" msgid "Could not restart PWM" msgstr "" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -833,6 +839,11 @@ msgstr "" msgid "File exists" msgstr "Mayroong file" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -857,7 +868,7 @@ msgid "Group full" msgstr "Puno ang group" #: 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "" @@ -924,6 +935,11 @@ msgstr "" msgid "Invalid %q pin" msgstr "Mali ang %q pin" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "" @@ -936,24 +952,12 @@ msgstr "Mali ang BMP file" msgid "Invalid DAC pin supplied" msgstr "" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Mali ang PWM frequency" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Maling argumento" @@ -1250,6 +1254,10 @@ msgstr "Hindi maka connect sa AP" msgid "Not playing" msgstr "Hindi playing" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1338,10 +1346,6 @@ msgstr "Kasama ang kung ano pang modules na sa filesystem\n" msgid "Polygon needs at least 3 points" msgstr "" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1417,12 +1421,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Tumatakbo sa safe mode! Awtomatikong pag re-reload ay OFF.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n" +msgid "Running in safe mode! " +msgstr "" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -1433,6 +1433,16 @@ msgstr "" msgid "SDA or SCL needs a pull up" msgstr "Kailangan ng pull up resistors ang SDA o SCL" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "" @@ -1792,9 +1802,8 @@ msgid "__init__() should return None" msgstr "__init __ () dapat magbalik na None" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" -msgstr "__init__() dapat magbalink na None, hindi '%s'" +msgid "__init__() should return None, not '%q'" +msgstr "" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -1948,7 +1957,7 @@ msgstr "hindi sinusuportahan ang bytes > 8 bits" msgid "bytes value out of range" msgstr "bytes value wala sa sakop" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "kalibrasion ay wala sa sakop" @@ -1981,48 +1990,18 @@ msgstr "" msgid "can't assign to expression" msgstr "hindi ma i-assign sa expression" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "hindi ma-convert %s sa complex" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "hindi ma-convert %s sa int" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" -msgstr "hindi ma-convert %s sa int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "hindi maaaring i-convert ang '%q' na bagay sa %q nang walang pahiwatig" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "hindi ma i-convert NaN sa int" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "hindi ma i-convert ang address sa INT" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "hindi ma i-convert inf sa int" - #: py/obj.c -msgid "can't convert to complex" -msgstr "hindi ma-convert sa complex" - -#: py/obj.c -msgid "can't convert to float" -msgstr "hindi ma-convert sa float" - -#: py/obj.c -msgid "can't convert to int" -msgstr "hindi ma-convert sa int" +msgid "can't convert to %q" +msgstr "" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2055,7 +2034,7 @@ msgstr "hindi puede ang maraming *x" #: py/emitnative.c msgid "can't implicitly convert '%q' to 'bool'" -msgstr "hindi maaaring ma-convert ang '% qt' sa 'bool'" +msgstr "hindi maaaring ma-convert ang ' %q' sa 'bool'" #: py/emitnative.c msgid "can't load from '%q'" @@ -2439,7 +2418,7 @@ msgstr "function nangangailangan ng keyword argument '%q'" msgid "function missing required positional argument #%d" msgstr "function nangangailangan ng positional argument #%d" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -2489,10 +2468,7 @@ msgstr "mali ang padding" msgid "index is out of bounds" msgstr "" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "index wala sa sakop" @@ -2852,9 +2828,8 @@ msgid "number of points must be at least 2" msgstr "" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" -msgstr "object '%s' ay hindi tuple o list" +msgid "object '%q' is not a tuple or list" +msgstr "" #: py/obj.c msgid "object does not support item assignment" @@ -2889,9 +2864,8 @@ msgid "object not iterable" msgstr "object hindi ma i-iterable" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "object na type '%s' walang len()" +msgid "object of type '%q' has no len()" +msgstr "" #: py/obj.c msgid "object with buffer protocol required" @@ -2985,21 +2959,10 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "pop mula sa walang laman na PulseIn" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "pop sa walang laman na set" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "pop galing sa walang laman na list" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" -msgstr "popitem(): dictionary ay walang laman" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3158,13 +3121,8 @@ msgid "stream operation not supported" msgstr "stream operation hindi sinusuportahan" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "indeks ng string wala sa sakop" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" -msgstr "ang indeks ng string ay dapat na integer, hindi %s" +msgid "string indices must be integers, not %q" +msgstr "" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3174,10 +3132,6 @@ msgstr "string hindi supportado; gumamit ng bytes o kaya bytearray" msgid "struct: cannot index" msgstr "struct: hindi ma-index" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "struct: index hindi maabot" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "struct: walang fields" @@ -3248,7 +3202,7 @@ msgstr "masyadong maraming values para i-unpact (umaasa ng %d)" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "indeks ng tuple wala sa sakop" @@ -3256,10 +3210,6 @@ msgstr "indeks ng tuple wala sa sakop" msgid "tuple/list has wrong length" msgstr "mali ang haba ng tuple/list" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3315,9 +3265,8 @@ msgid "unknown conversion specifier %c" msgstr "hindi alam ang conversion specifier na %c" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" -msgstr "hindi alam ang format code '%c' para sa object na ang type ay '%s'" +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" #: py/compile.c msgid "unknown type" @@ -3356,16 +3305,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "hindi sinusuportahan ang format character na '%c' (0x%x) sa index %d" #: py/runtime.c -msgid "unsupported type for %q: '%s'" -msgstr "hindi sinusuportahang type para sa %q: '%s'" +msgid "unsupported type for %q: '%q'" +msgstr "" #: py/runtime.c msgid "unsupported type for operator" msgstr "hindi sinusuportahang type para sa operator" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" -msgstr "hindi sinusuportahang type para sa %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" #: py/objint.c #, c-format @@ -3446,6 +3395,102 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "%q indeks ay dapat integers, hindi %s" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "'%s' object hindi sumusuporta ng item assignment" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "'%s' object ay hindi sumusuporta sa pagtanggal ng item" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "'%s' object ay walang attribute '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "'%s' object ay hindi iterator" + +#~ msgid "'%s' object is not callable" +#~ msgstr "'%s' object hindi matatawag" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "'%s' object ay hindi ma i-iterable" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "'%s' object ay hindi maaaring i-subscript" + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Tumatakbo sa safe mode! Awtomatikong pag re-reload ay OFF.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n" + +#~ msgid "__init__() should return None, not '%s'" +#~ msgstr "__init__() dapat magbalink na None, hindi '%s'" + +#~ msgid "can't convert %s to complex" +#~ msgstr "hindi ma-convert %s sa complex" + +#~ msgid "can't convert %s to float" +#~ msgstr "hindi ma-convert %s sa int" + +#~ msgid "can't convert %s to int" +#~ msgstr "hindi ma-convert %s sa int" + +#~ msgid "can't convert NaN to int" +#~ msgstr "hindi ma i-convert NaN sa int" + +#~ msgid "can't convert address to int" +#~ msgstr "hindi ma i-convert ang address sa INT" + +#~ msgid "can't convert inf to int" +#~ msgstr "hindi ma i-convert inf sa int" + +#~ msgid "can't convert to complex" +#~ msgstr "hindi ma-convert sa complex" + +#~ msgid "can't convert to float" +#~ msgstr "hindi ma-convert sa float" + +#~ msgid "can't convert to int" +#~ msgstr "hindi ma-convert sa int" + +#~ msgid "object '%s' is not a tuple or list" +#~ msgstr "object '%s' ay hindi tuple o list" + +#~ msgid "object of type '%s' has no len()" +#~ msgstr "object na type '%s' walang len()" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "pop mula sa walang laman na PulseIn" + +#~ msgid "pop from an empty set" +#~ msgstr "pop sa walang laman na set" + +#~ msgid "pop from empty list" +#~ msgstr "pop galing sa walang laman na list" + +#~ msgid "popitem(): dictionary is empty" +#~ msgstr "popitem(): dictionary ay walang laman" + +#~ msgid "string index out of range" +#~ msgstr "indeks ng string wala sa sakop" + +#~ msgid "string indices must be integers, not %s" +#~ msgstr "ang indeks ng string ay dapat na integer, hindi %s" + +#~ msgid "struct: index out of range" +#~ msgstr "struct: index hindi maabot" + +#~ msgid "unknown format code '%c' for object of type '%s'" +#~ msgstr "hindi alam ang format code '%c' para sa object na ang type ay '%s'" + +#~ msgid "unsupported type for %q: '%s'" +#~ msgstr "hindi sinusuportahang type para sa %q: '%s'" + +#~ msgid "unsupported types for %q: '%s', '%s'" +#~ msgstr "hindi sinusuportahang type para sa %q: '%s', '%s'" + #~ msgid "AP required" #~ msgstr "AP kailangan" diff --git a/locale/fr.po b/locale/fr.po index 40e6bbfcee..419cef785e 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,15 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" -"PO-Revision-Date: 2020-06-05 17:29+0000\n" -"Last-Translator: aberwag \n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" +"PO-Revision-Date: 2020-07-27 21:27+0000\n" +"Last-Translator: Nathan \n" "Language: fr\n" "MIME-Version: 1.0\n" "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.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: main.c msgid "" @@ -70,19 +70,23 @@ msgstr "" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" -msgstr "" +msgstr "Échec de %q : %d" #: shared-bindings/microcontroller/Pin.c msgid "%q in use" msgstr "%q utilisé" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "index %q hors gamme" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "les indices %q doivent être des entiers, pas %s" +msgid "%q indices must be integers, not %q" +msgstr "" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -90,7 +94,7 @@ msgstr "La liste %q doit être une liste" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" -msgstr "" +msgstr "%q doit être >= 0" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c @@ -106,7 +110,7 @@ msgstr "%q doit être un tuple de longueur 2" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q pin invalid" -msgstr "" +msgstr "PIN %q invalide" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" @@ -120,6 +124,42 @@ msgstr "%q() prend %d arguments positionnels mais %d ont été donnés" msgid "'%q' argument required" msgstr "'%q' argument requis" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -170,48 +210,6 @@ msgstr "'%s' l'entier %d n'est pas dans la gamme %d..%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "'%s' l'entier 0x%x ne correspond pas au masque 0x%x" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "L'objet '%s' ne peut pas attribuer '%q'" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "L'objet '%s' ne prend pas en charge '%q'" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "l'objet '%s' ne supporte pas l'assignation d'éléments" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "l'objet '%s' ne supporte pas la suppression d'éléments" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "l'objet '%s' n'a pas d'attribut '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "l'objet '%s' n'est pas un itérateur" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "l'objet '%s' n'est pas appelable" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "l'objet '%s' n'est pas itérable" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "l'objet '%s' n'est pas sous-scriptable" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "'=' alignement non autorisé dans la spéc. de format de chaîne" @@ -242,7 +240,7 @@ msgstr "'continue' en dehors d'une boucle" #: py/objgenerator.c msgid "'coroutine' object is not an iterator" -msgstr "" +msgstr "L'objet « coroutine » n'est pas un itérateur" #: py/compile.c msgid "'data' requires at least 2 arguments" @@ -337,7 +335,7 @@ msgstr "S'annonce déjà." #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c msgid "Already running" -msgstr "" +msgstr "Déjà en cours d'exécution" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" @@ -378,7 +376,7 @@ msgstr "Au plus %d %q peut être spécifié (pas %d)" #: shared-module/memorymonitor/AllocationAlarm.c #, c-format msgid "Attempt to allocate %d blocks" -msgstr "" +msgstr "Tentative d'allocation de %d blocs" #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when MicroPython VM not running." @@ -462,6 +460,10 @@ msgstr "La longueur du tampon %d est trop grande. Il doit être inférieur à %d #: ports/atmel-samd/common-hal/sdioio/SDCard.c #: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c msgid "Buffer length must be a multiple of 512" +msgstr "La longueur de la mémoire tampon doit être un multiple de 512" + +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" msgstr "" #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c @@ -633,11 +635,11 @@ msgstr "Code brut corrompu" #: ports/cxd56/common-hal/gnss/GNSS.c msgid "Could not initialize GNSS" -msgstr "" +msgstr "Impossible d'initialiser GNSS" #: ports/cxd56/common-hal/sdioio/SDCard.c msgid "Could not initialize SDCard" -msgstr "" +msgstr "Impossible d'initialiser la carte SD" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c msgid "Could not initialize UART" @@ -663,6 +665,10 @@ msgstr "Impossible de réinitialiser le minuteur" msgid "Could not restart PWM" msgstr "Impossible de redémarrer PWM" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "Impossible de démarrer PWM" @@ -846,6 +852,11 @@ msgstr "Échec de l'écriture du flash interne." msgid "File exists" msgstr "Le fichier existe" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "La fréquence capturée est au delà des capacités. Capture en pause." @@ -871,7 +882,7 @@ msgid "Group full" msgstr "Groupe plein" #: 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "Matériel occupé, essayez d'autres broches" @@ -931,13 +942,18 @@ msgstr "Erreur interne #%d" #: shared-bindings/sdioio/SDCard.c msgid "Invalid %q" -msgstr "" +msgstr "%q invalide" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Invalid %q pin" msgstr "Broche invalide pour '%q'" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "Valeur d'unité ADC non valide" @@ -950,24 +966,12 @@ msgstr "Fichier BMP invalide" msgid "Invalid DAC pin supplied" msgstr "Broche DAC non valide fournie" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "Sélection de broches I2C non valide" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Fréquence de PWM invalide" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "Sélection de broches SPI non valide" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "Sélection de broches UART non valide" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argument invalide" @@ -1147,7 +1151,7 @@ msgstr "Doit fournir une broche MISO ou MOSI" #: ports/stm/common-hal/busio/SPI.c msgid "Must provide SCK pin" -msgstr "" +msgstr "Vous devez fournir un code PIN SCK" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -1263,6 +1267,10 @@ msgstr "Non connecté" msgid "Not playing" msgstr "Ne joue pas" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1361,10 +1369,6 @@ msgstr "Ainsi que tout autre module présent sur le système de fichiers\n" msgid "Polygon needs at least 3 points" msgstr "Polygone a besoin d’au moins 3 points" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "Pop à partir d'un tampon Ps2 vide" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Le tampon de préfixe doit être sur le tas" @@ -1437,22 +1441,28 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "L'entrée de ligne 'Row' doit être un digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Mode sans-échec ! Auto-chargement désactivé.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "Mode sans-échec ! Le code sauvegardé n'est pas éxecuté.\n" +msgid "Running in safe mode! " +msgstr "" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" -msgstr "" +msgstr "Le format de carte SD CSD n'est pas pris en charge" #: ports/atmel-samd/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "SDA or SCL needs a pull up" msgstr "SDA ou SCL a besoin d'une résistance de tirage ('pull up')" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "Erreur d'initialisation SPI" @@ -1520,7 +1530,7 @@ msgstr "Fournissez au moins une broche UART" #: shared-bindings/gnss/GNSS.c msgid "System entry must be gnss.SatelliteSystem" -msgstr "" +msgstr "L'entrée du système doit être gnss.SatelliteSystem" #: ports/stm/common-hal/microcontroller/Processor.c msgid "Temperature read timed out" @@ -1828,9 +1838,8 @@ msgid "__init__() should return None" msgstr "__init__() doit retourner None" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" -msgstr "__init__() doit retourner None, pas '%s'" +msgid "__init__() should return None, not '%q'" +msgstr "" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -1983,7 +1992,7 @@ msgstr "octets > 8 bits non supporté" msgid "bytes value out of range" msgstr "valeur des octets hors bornes" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "étalonnage hors bornes" @@ -2016,48 +2025,18 @@ msgstr "" msgid "can't assign to expression" msgstr "ne peut pas assigner à une expression" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "ne peut convertir %s en nombre complexe" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "ne peut convertir %s en nombre à virgule flottante 'float'" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" -msgstr "ne peut convertir %s en entier 'int'" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "impossible de convertir l'objet '%q' en '%q' implicitement" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "on ne peut convertir NaN en entier 'int'" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "ne peut convertir l'adresse en entier 'int'" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "on ne peut convertir l'infini 'inf' en entier 'int'" - #: py/obj.c -msgid "can't convert to complex" -msgstr "ne peut convertir en nombre complexe" - -#: py/obj.c -msgid "can't convert to float" -msgstr "ne peut convertir en nombre à virgule flottante 'float'" - -#: py/obj.c -msgid "can't convert to int" -msgstr "ne peut convertir en entier 'int'" +msgid "can't convert to %q" +msgstr "" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2113,7 +2092,7 @@ msgstr "" #: shared-module/sdcardio/SDCard.c msgid "can't set 512 block size" -msgstr "" +msgstr "impossible de définir une taille de bloc de 512" #: py/objnamedtuple.c msgid "can't set attribute" @@ -2250,7 +2229,7 @@ msgstr "n'a pas pu inverser la matrice Vandermonde" #: shared-module/sdcardio/SDCard.c msgid "couldn't determine SD card version" -msgstr "" +msgstr "impossible de déterminer la version de la carte SD" #: extmod/ulab/code/approx/approx.c msgid "data must be iterable" @@ -2480,7 +2459,7 @@ msgstr "il manque l'argument nommé obligatoire '%q'" msgid "function missing required positional argument #%d" msgstr "il manque l'argument positionnel obligatoire #%d" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "la fonction prend %d argument(s) positionnels mais %d ont été donné(s)" @@ -2529,10 +2508,7 @@ msgstr "espacement incorrect" msgid "index is out of bounds" msgstr "l'index est hors limites" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "index hors gamme" @@ -2821,7 +2797,7 @@ msgstr "compte de décalage négatif" #: shared-module/sdcardio/SDCard.c msgid "no SD card" -msgstr "" +msgstr "pas de carte SD" #: py/vm.c msgid "no active exception to reraise" @@ -2846,7 +2822,7 @@ msgstr "pas de broche de réinitialisation disponible" #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" -msgstr "" +msgstr "pas de réponse de la carte SD" #: py/runtime.c msgid "no such attribute" @@ -2895,9 +2871,8 @@ msgid "number of points must be at least 2" msgstr "le nombre de points doit être d'au moins 2" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" -msgstr "l'objet '%s' n'est pas un tuple ou une liste" +msgid "object '%q' is not a tuple or list" +msgstr "" #: py/obj.c msgid "object does not support item assignment" @@ -2932,9 +2907,8 @@ msgid "object not iterable" msgstr "objet non itérable" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "l'objet de type '%s' n'a pas de len()" +msgid "object of type '%q' has no len()" +msgstr "" #: py/obj.c msgid "object with buffer protocol required" @@ -3029,21 +3003,10 @@ msgstr "le polygone ne peut être enregistré que dans un parent" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "'pop' d'une entrée PulseIn vide" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "'pop' d'un ensemble set vide" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "'pop' d'une liste vide" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" -msgstr "popitem() : dictionnaire vide" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3201,13 +3164,8 @@ msgid "stream operation not supported" msgstr "opération de flux non supportée" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "index de chaîne hors gamme" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" -msgstr "les indices de chaîne de caractères doivent être des entiers, pas %s" +msgid "string indices must be integers, not %q" +msgstr "" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3218,10 +3176,6 @@ msgstr "" msgid "struct: cannot index" msgstr "struct : indexage impossible" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "struct : index hors limites" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "struct : aucun champs" @@ -3291,7 +3245,7 @@ msgstr "trop de valeur à dégrouper (%d attendues)" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "index du tuple hors gamme" @@ -3299,10 +3253,6 @@ msgstr "index du tuple hors gamme" msgid "tuple/list has wrong length" msgstr "tuple/liste a une mauvaise longueur" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "tuple ou liste requis en partie droite" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3358,9 +3308,8 @@ msgid "unknown conversion specifier %c" msgstr "spécification %c de conversion inconnue" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" -msgstr "code de format '%c' inconnu pour un objet de type '%s'" +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" #: py/compile.c msgid "unknown type" @@ -3399,16 +3348,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "caractère de format '%c' (0x%x) non supporté à l'index %d" #: py/runtime.c -msgid "unsupported type for %q: '%s'" -msgstr "type non supporté pour %q : '%s'" +msgid "unsupported type for %q: '%q'" +msgstr "" #: py/runtime.c msgid "unsupported type for operator" msgstr "type non supporté pour l'opérateur" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" -msgstr "type non supporté pour %q : '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" #: py/objint.c #, c-format @@ -3487,15 +3436,133 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "tuple/list required on RHS" +#~ msgstr "tuple ou liste requis en partie droite" + +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "les indices %q doivent être des entiers, pas %s" + +#~ msgid "'%s' object cannot assign attribute '%q'" +#~ msgstr "L'objet '%s' ne peut pas attribuer '%q'" + +#~ msgid "'%s' object does not support '%q'" +#~ msgstr "L'objet '%s' ne prend pas en charge '%q'" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "l'objet '%s' ne supporte pas l'assignation d'éléments" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "l'objet '%s' ne supporte pas la suppression d'éléments" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "l'objet '%s' n'a pas d'attribut '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "l'objet '%s' n'est pas un itérateur" + +#~ msgid "'%s' object is not callable" +#~ msgstr "l'objet '%s' n'est pas appelable" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "l'objet '%s' n'est pas itérable" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "l'objet '%s' n'est pas sous-scriptable" + +#~ msgid "Invalid I2C pin selection" +#~ msgstr "Sélection de broches I2C non valide" + +#~ msgid "Invalid SPI pin selection" +#~ msgstr "Sélection de broches SPI non valide" + +#~ msgid "Invalid UART pin selection" +#~ msgstr "Sélection de broches UART non valide" + +#~ msgid "Pop from an empty Ps2 buffer" +#~ msgstr "Pop à partir d'un tampon Ps2 vide" + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Mode sans-échec ! Auto-chargement désactivé.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "Mode sans-échec ! Le code sauvegardé n'est pas éxecuté.\n" + +#~ msgid "__init__() should return None, not '%s'" +#~ msgstr "__init__() doit retourner None, pas '%s'" + +#~ msgid "can't convert %s to complex" +#~ msgstr "ne peut convertir %s en nombre complexe" + +#~ msgid "can't convert %s to float" +#~ msgstr "ne peut convertir %s en nombre à virgule flottante 'float'" + +#~ msgid "can't convert %s to int" +#~ msgstr "ne peut convertir %s en entier 'int'" + +#~ msgid "can't convert NaN to int" +#~ msgstr "on ne peut convertir NaN en entier 'int'" + +#~ msgid "can't convert address to int" +#~ msgstr "ne peut convertir l'adresse en entier 'int'" + +#~ msgid "can't convert inf to int" +#~ msgstr "on ne peut convertir l'infini 'inf' en entier 'int'" + +#~ msgid "can't convert to complex" +#~ msgstr "ne peut convertir en nombre complexe" + +#~ msgid "can't convert to float" +#~ msgstr "ne peut convertir en nombre à virgule flottante 'float'" + +#~ msgid "can't convert to int" +#~ msgstr "ne peut convertir en entier 'int'" + +#~ msgid "object '%s' is not a tuple or list" +#~ msgstr "l'objet '%s' n'est pas un tuple ou une liste" + +#~ msgid "object of type '%s' has no len()" +#~ msgstr "l'objet de type '%s' n'a pas de len()" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "'pop' d'une entrée PulseIn vide" + +#~ msgid "pop from an empty set" +#~ msgstr "'pop' d'un ensemble set vide" + +#~ msgid "pop from empty list" +#~ msgstr "'pop' d'une liste vide" + +#~ msgid "popitem(): dictionary is empty" +#~ msgstr "popitem() : dictionnaire vide" + +#~ msgid "string index out of range" +#~ msgstr "index de chaîne hors gamme" + +#~ msgid "string indices must be integers, not %s" +#~ msgstr "" +#~ "les indices de chaîne de caractères doivent être des entiers, pas %s" + +#~ msgid "struct: index out of range" +#~ msgstr "struct : index hors limites" + +#~ msgid "unknown format code '%c' for object of type '%s'" +#~ msgstr "code de format '%c' inconnu pour un objet de type '%s'" + +#~ msgid "unsupported type for %q: '%s'" +#~ msgstr "type non supporté pour %q : '%s'" + +#~ msgid "unsupported types for %q: '%s', '%s'" +#~ msgstr "type non supporté pour %q : '%s', '%s'" + #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' ou 'async with' sans fonction asynchrone extérieure" -#~ msgid "PulseIn not supported on this chip" -#~ msgstr "PulseIn non pris en charge sur cette puce" - #~ msgid "PulseOut not supported on this chip" #~ msgstr "PulseOut non pris en charge sur cette puce" +#~ msgid "PulseIn not supported on this chip" +#~ msgstr "PulseIn non pris en charge sur cette puce" + #~ msgid "AP required" #~ msgstr "'AP' requis" diff --git a/locale/hi.po b/locale/hi.po index 003f9a9ec6..9d0dd74e90 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -65,12 +65,16 @@ msgstr "" msgid "%q in use" msgstr "" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "" #: py/obj.c -msgid "%q indices must be integers, not %s" +msgid "%q indices must be integers, not %q" msgstr "" #: shared-bindings/vectorio/Polygon.c @@ -109,6 +113,42 @@ msgstr "" msgid "'%q' argument required" msgstr "" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -159,48 +199,6 @@ msgstr "" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "" @@ -448,6 +446,10 @@ msgstr "" msgid "Buffer length must be a multiple of 512" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "" @@ -638,6 +640,10 @@ msgstr "" msgid "Could not restart PWM" msgstr "" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -820,6 +826,11 @@ msgstr "" msgid "File exists" msgstr "" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -844,7 +855,7 @@ msgid "Group full" 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "" @@ -909,6 +920,11 @@ msgstr "" msgid "Invalid %q pin" msgstr "" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "" @@ -921,24 +937,12 @@ msgstr "" msgid "Invalid DAC pin supplied" msgstr "" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1234,6 +1238,10 @@ msgstr "" msgid "Not playing" msgstr "" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1319,10 +1327,6 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1395,11 +1399,7 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" +msgid "Running in safe mode! " msgstr "" #: shared-module/sdcardio/SDCard.c @@ -1411,6 +1411,16 @@ msgstr "" msgid "SDA or SCL needs a pull up" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "" @@ -1760,8 +1770,7 @@ msgid "__init__() should return None" msgstr "" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" +msgid "__init__() should return None, not '%q'" msgstr "" #: py/objobject.c @@ -1915,7 +1924,7 @@ msgstr "" msgid "bytes value out of range" msgstr "" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "" @@ -1947,47 +1956,17 @@ msgstr "" msgid "can't assign to expression" msgstr "" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "" - #: py/obj.c -msgid "can't convert to complex" -msgstr "" - -#: py/obj.c -msgid "can't convert to float" -msgstr "" - -#: py/obj.c -msgid "can't convert to int" +msgid "can't convert to %q" msgstr "" #: py/objstr.c @@ -2395,7 +2374,7 @@ msgstr "" msgid "function missing required positional argument #%d" msgstr "" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -2444,10 +2423,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "" @@ -2803,8 +2779,7 @@ msgid "number of points must be at least 2" msgstr "" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" +msgid "object '%q' is not a tuple or list" msgstr "" #: py/obj.c @@ -2840,8 +2815,7 @@ msgid "object not iterable" msgstr "" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" +msgid "object of type '%q' has no len()" msgstr "" #: py/obj.c @@ -2934,20 +2908,9 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" msgstr "" #: py/objint_mpz.c @@ -3104,12 +3067,7 @@ msgid "stream operation not supported" msgstr "" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" +msgid "string indices must be integers, not %q" msgstr "" #: py/stream.c @@ -3120,10 +3078,6 @@ msgstr "" msgid "struct: cannot index" msgstr "" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "" @@ -3193,7 +3147,7 @@ msgstr "" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "" @@ -3201,10 +3155,6 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3260,8 +3210,7 @@ msgid "unknown conversion specifier %c" msgstr "" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" +msgid "unknown format code '%c' for object of type '%q'" msgstr "" #: py/compile.c @@ -3301,7 +3250,7 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "" #: py/runtime.c -msgid "unsupported type for %q: '%s'" +msgid "unsupported type for %q: '%q'" msgstr "" #: py/runtime.c @@ -3309,7 +3258,7 @@ msgid "unsupported type for operator" msgstr "" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" msgstr "" #: py/objint.c diff --git a/locale/it_IT.po b/locale/it_IT.po index c0f826e8f1..e128b7ef91 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -64,13 +64,17 @@ msgstr "" msgid "%q in use" msgstr "%q in uso" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "indice %q fuori intervallo" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "gli indici %q devono essere interi, non %s" +msgid "%q indices must be integers, not %q" +msgstr "" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -110,6 +114,42 @@ msgstr "%q() prende %d argomenti posizionali ma ne sono stati forniti %d" msgid "'%q' argument required" msgstr "'%q' argomento richiesto" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -160,48 +200,6 @@ msgstr "intero '%s' non è nell'intervallo %d..%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "intero '%s' non è nell'intervallo %d..%d" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "oggeto '%s' non supporta assengnamento di item" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "oggeto '%s' non supporta eliminamento di item" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "l'oggetto '%s' non ha l'attributo '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "l'oggetto '%s' non è un iteratore" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "oggeto '%s' non è chiamabile" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "l'oggetto '%s' non è iterabile" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "oggeto '%s' non è " - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "aligniamento '=' non è permesso per il specificatore formato string" @@ -453,6 +451,10 @@ msgstr "" msgid "Buffer length must be a multiple of 512" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "Il buffer deve essere lungo almeno 1" @@ -647,6 +649,10 @@ msgstr "" msgid "Could not restart PWM" msgstr "" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -833,6 +839,11 @@ msgstr "" msgid "File exists" msgstr "File esistente" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -857,7 +868,7 @@ msgid "Group full" msgstr "Gruppo pieno" #: 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "" @@ -924,6 +935,11 @@ msgstr "" msgid "Invalid %q pin" msgstr "Pin %q non valido" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "" @@ -936,24 +952,12 @@ msgstr "File BMP non valido" msgid "Invalid DAC pin supplied" msgstr "" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frequenza PWM non valida" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argomento non valido" @@ -1254,6 +1258,10 @@ msgstr "Impossible connettersi all'AP" msgid "Not playing" msgstr "In pausa" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1348,10 +1356,6 @@ msgstr "Imposssibile rimontare il filesystem" msgid "Polygon needs at least 3 points" msgstr "" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1426,12 +1430,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Modalità sicura in esecuzione! Auto-reload disattivato.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n" +msgid "Running in safe mode! " +msgstr "" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -1442,6 +1442,16 @@ msgstr "" msgid "SDA or SCL needs a pull up" msgstr "SDA o SCL necessitano un pull-up" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "" @@ -1795,9 +1805,8 @@ msgid "__init__() should return None" msgstr "__init__() deve ritornare None" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" -msgstr "__init__() deve ritornare None, non '%s'" +msgid "__init__() should return None, not '%q'" +msgstr "" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -1953,7 +1962,7 @@ msgstr "byte > 8 bit non supportati" msgid "bytes value out of range" msgstr "valore byte fuori intervallo" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "la calibrazione è fuori intervallo" @@ -1986,48 +1995,18 @@ msgstr "" msgid "can't assign to expression" msgstr "impossibile assegnare all'espressione" -#: py/obj.c -#, fuzzy, c-format -msgid "can't convert %s to complex" -msgstr "non è possibile convertire a complex" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "non è possibile convertire %s a float" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" -msgstr "non è possibile convertire %s a int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "impossibile convertire l'oggetto '%q' implicitamente in %q" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "impossibile convertire NaN in int" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "impossible convertire indirizzo in int" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "impossibile convertire inf in int" - #: py/obj.c -msgid "can't convert to complex" -msgstr "non è possibile convertire a complex" - -#: py/obj.c -msgid "can't convert to float" -msgstr "non è possibile convertire a float" - -#: py/obj.c -msgid "can't convert to int" -msgstr "non è possibile convertire a int" +msgid "can't convert to %q" +msgstr "" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2440,7 +2419,7 @@ msgstr "argomento nominato '%q' mancante alla funzione" msgid "function missing required positional argument #%d" msgstr "mancante il #%d argomento posizonale obbligatorio della funzione" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -2490,10 +2469,7 @@ msgstr "padding incorretto" msgid "index is out of bounds" msgstr "" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "indice fuori intervallo" @@ -2857,9 +2833,8 @@ msgid "number of points must be at least 2" msgstr "" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" -msgstr "oggetto '%s' non è una tupla o una lista" +msgid "object '%q' is not a tuple or list" +msgstr "" #: py/obj.c msgid "object does not support item assignment" @@ -2894,9 +2869,8 @@ msgid "object not iterable" msgstr "oggetto non iterabile" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "l'oggetto di tipo '%s' non implementa len()" +msgid "object of type '%q' has no len()" +msgstr "" #: py/obj.c msgid "object with buffer protocol required" @@ -2992,21 +2966,10 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "pop sun un PulseIn vuoto" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "pop da un set vuoto" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "pop da una lista vuota" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" -msgstr "popitem(): il dizionario è vuoto" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3165,13 +3128,8 @@ msgid "stream operation not supported" msgstr "operazione di stream non supportata" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "indice della stringa fuori intervallo" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" -msgstr "indici della stringa devono essere interi, non %s" +msgid "string indices must be integers, not %q" +msgstr "" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3181,10 +3139,6 @@ msgstr "" msgid "struct: cannot index" msgstr "struct: impossibile indicizzare" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "struct: indice fuori intervallo" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "struct: nessun campo" @@ -3255,7 +3209,7 @@ msgstr "troppi valori da scompattare (%d attesi)" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "indice della tupla fuori intervallo" @@ -3263,10 +3217,6 @@ msgstr "indice della tupla fuori intervallo" msgid "tuple/list has wrong length" msgstr "tupla/lista ha la lunghezza sbagliata" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3322,9 +3272,8 @@ msgid "unknown conversion specifier %c" msgstr "specificatore di conversione %s sconosciuto" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" -msgstr "codice di formattaione '%c' sconosciuto per oggetto di tipo '%s'" +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" #: py/compile.c msgid "unknown type" @@ -3363,16 +3312,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "carattere di formattazione '%c' (0x%x) non supportato all indice %d" #: py/runtime.c -msgid "unsupported type for %q: '%s'" -msgstr "tipo non supportato per %q: '%s'" +msgid "unsupported type for %q: '%q'" +msgstr "" #: py/runtime.c msgid "unsupported type for operator" msgstr "tipo non supportato per l'operando" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" -msgstr "tipi non supportati per %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" #: py/objint.c #, c-format @@ -3453,6 +3402,103 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "gli indici %q devono essere interi, non %s" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "oggeto '%s' non supporta assengnamento di item" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "oggeto '%s' non supporta eliminamento di item" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "l'oggetto '%s' non ha l'attributo '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "l'oggetto '%s' non è un iteratore" + +#~ msgid "'%s' object is not callable" +#~ msgstr "oggeto '%s' non è chiamabile" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "l'oggetto '%s' non è iterabile" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "oggeto '%s' non è " + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Modalità sicura in esecuzione! Auto-reload disattivato.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n" + +#~ msgid "__init__() should return None, not '%s'" +#~ msgstr "__init__() deve ritornare None, non '%s'" + +#, fuzzy +#~ msgid "can't convert %s to complex" +#~ msgstr "non è possibile convertire a complex" + +#~ msgid "can't convert %s to float" +#~ msgstr "non è possibile convertire %s a float" + +#~ msgid "can't convert %s to int" +#~ msgstr "non è possibile convertire %s a int" + +#~ msgid "can't convert NaN to int" +#~ msgstr "impossibile convertire NaN in int" + +#~ msgid "can't convert address to int" +#~ msgstr "impossible convertire indirizzo in int" + +#~ msgid "can't convert inf to int" +#~ msgstr "impossibile convertire inf in int" + +#~ msgid "can't convert to complex" +#~ msgstr "non è possibile convertire a complex" + +#~ msgid "can't convert to float" +#~ msgstr "non è possibile convertire a float" + +#~ msgid "can't convert to int" +#~ msgstr "non è possibile convertire a int" + +#~ msgid "object '%s' is not a tuple or list" +#~ msgstr "oggetto '%s' non è una tupla o una lista" + +#~ msgid "object of type '%s' has no len()" +#~ msgstr "l'oggetto di tipo '%s' non implementa len()" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "pop sun un PulseIn vuoto" + +#~ msgid "pop from an empty set" +#~ msgstr "pop da un set vuoto" + +#~ msgid "pop from empty list" +#~ msgstr "pop da una lista vuota" + +#~ msgid "popitem(): dictionary is empty" +#~ msgstr "popitem(): il dizionario è vuoto" + +#~ msgid "string index out of range" +#~ msgstr "indice della stringa fuori intervallo" + +#~ msgid "string indices must be integers, not %s" +#~ msgstr "indici della stringa devono essere interi, non %s" + +#~ msgid "struct: index out of range" +#~ msgstr "struct: indice fuori intervallo" + +#~ msgid "unknown format code '%c' for object of type '%s'" +#~ msgstr "codice di formattaione '%c' sconosciuto per oggetto di tipo '%s'" + +#~ msgid "unsupported type for %q: '%s'" +#~ msgstr "tipo non supportato per %q: '%s'" + +#~ msgid "unsupported types for %q: '%s', '%s'" +#~ msgstr "tipi non supportati per %q: '%s', '%s'" + #~ msgid "AP required" #~ msgstr "AP richiesto" diff --git a/locale/ja.po b/locale/ja.po new file mode 100644 index 0000000000..8385cce1b9 --- /dev/null +++ b/locale/ja.po @@ -0,0 +1,3384 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" +"PO-Revision-Date: 2020-08-16 13:25+0000\n" +"Last-Translator: Taku Fukada \n" +"Language-Team: none\n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 4.2-dev\n" + +#: main.c +msgid "" +"\n" +"Code done running. Waiting for reload.\n" +msgstr "" +"\n" +"コードの実行が完了しました。リロードを待っています。\n" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" +"\n" +"CIRCUITPYドライブの内容を添えて問題を以下で報告してください:\n" +"https://github.com/adafruit/circuitpython/issues\n" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" +"\n" +"終了するには、次の操作なしにリセットしてください: " + +#: py/obj.c +msgid " File \"%q\"" +msgstr " ファイル \"%q\"" + +#: py/obj.c +msgid " File \"%q\", line %d" +msgstr " ファイル \"%q\", 行 %d" + +#: main.c +msgid " output:\n" +msgstr " 出力:\n" + +#: py/objstr.c +#, c-format +msgid "%%c requires int or char" +msgstr "%%c にはintまたはcharが必要" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" +msgstr "" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +msgid "%q failure: %d" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q in use" +msgstr "%qは使用中" + +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c +msgid "%q index out of range" +msgstr "%q インデックスは範囲外" + +#: py/obj.c +msgid "%q indices must be integers, not %q" +msgstr "%qインデクスは、%qでなく整数が必要です" + +#: shared-bindings/vectorio/Polygon.c +msgid "%q list must be a list" +msgstr "%q のリストはリスト型でなければなりません" + +#: shared-bindings/memorymonitor/AllocationAlarm.c +msgid "%q must be >= 0" +msgstr "%qは0以上でなければなりません" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/Shape.c +#: shared-bindings/memorymonitor/AllocationAlarm.c +#: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c +msgid "%q must be >= 1" +msgstr "%qは1以上でなければなりません" + +#: shared-module/vectorio/Polygon.c +msgid "%q must be a tuple of length 2" +msgstr "%qは長さ2のタプルでなければなりません" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +msgid "%q pin invalid" +msgstr "%q ピンは無効" + +#: shared-bindings/fontio/BuiltinFont.c +msgid "%q should be an int" +msgstr "%qはint型が必要" + +#: py/bc.c py/objnamedtuple.c +#, fuzzy +msgid "%q() takes %d positional arguments but %d were given" +msgstr "%q()は%d個の位置引数を受け取りますが、%d個しか与えられていません" + +#: py/argcheck.c +msgid "'%q' argument required" +msgstr "引数'%q'が必要" + +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "オブジェクト'%q'に属性'%q'を割り当てられません" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "オブジェクト'%q'は'%q'をサポートしていません" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "オブジェクト'%q'は要素の代入をサポートしていません" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "オブジェクト'%q'は要素の削除をサポートしていません" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "オブジェクト'%q'に属性'%q'はありません" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "オブジェクト'%q'はイテレータではありません" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "オブジェクト'%q'は呼び出し可能ではありません" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "オブジェクト'%q'はイテレート可能ではありません" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "オブジェクト'%q'は要素の取得ができません" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects a label" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects a register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects a special register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects an FPU register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects an address of the form [a, b]" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects an integer" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects at most r%d" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects {r0, r1, ...}" +msgstr "" + +#: py/emitinlinextensa.c +#, c-format +msgid "'%s' integer %d is not within range %d..%d" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' integer 0x%x does not fit in mask 0x%x" +msgstr "" + +#: py/objstr.c +msgid "'=' alignment not allowed in string format specifier" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "'S' and 'O' are not supported format types" +msgstr "" + +#: py/compile.c +msgid "'align' requires 1 argument" +msgstr "" + +#: py/compile.c +msgid "'await' outside function" +msgstr "関数外でのawait" + +#: py/compile.c +msgid "'await', 'async for' or 'async with' outside async function" +msgstr "async関数外でのawait, async for, async with" + +#: py/compile.c +msgid "'break' outside loop" +msgstr "ループ外での 'break'" + +#: py/compile.c +msgid "'continue' outside loop" +msgstr "ループ外での 'continue'" + +#: py/objgenerator.c +msgid "'coroutine' object is not an iterator" +msgstr "'coroutine' オブジェクトはイテレータではありません" + +#: py/compile.c +msgid "'data' requires at least 2 arguments" +msgstr "" + +#: py/compile.c +msgid "'data' requires integer arguments" +msgstr "" + +#: py/compile.c +msgid "'label' requires 1 argument" +msgstr "" + +#: py/compile.c +msgid "'return' outside function" +msgstr "関数外での 'return'" + +#: py/compile.c +msgid "'yield' outside function" +msgstr "関数外での 'yield'" + +#: py/compile.c +msgid "*x must be assignment target" +msgstr "" + +#: py/obj.c +msgid ", in %q\n" +msgstr "" + +#: py/objcomplex.c +msgid "0.0 to a complex power" +msgstr "" + +#: py/modbuiltins.c +msgid "3-arg pow() not supported" +msgstr "引数3つのpow()はサポートされていません" + +#: ports/atmel-samd/common-hal/countio/Counter.c +#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +msgid "A hardware interrupt channel is already in use" +msgstr "ハードウェア割り込みチャネルは使用中" + +#: shared-bindings/_bleio/Address.c +#, c-format +msgid "Address must be %d bytes long" +msgstr "アドレスの長さは %d バイトでなければなりません" + +#: shared-bindings/_bleio/Address.c +msgid "Address type out of range" +msgstr "" + +#: ports/nrf/common-hal/busio/I2C.c +msgid "All I2C peripherals are in use" +msgstr "全てのI2C周辺機器が使用中" + +#: ports/nrf/common-hal/busio/SPI.c +msgid "All SPI peripherals are in use" +msgstr "全てのSPI周辺機器が使用中" + +#: ports/nrf/common-hal/busio/UART.c +msgid "All UART peripherals are in use" +msgstr "全てのUART周辺機器が使用中" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "All event channels in use" +msgstr "全てのイベントチャネルが使用中" + +#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "All sync event channels in use" +msgstr "全ての同期イベントチャネルが使用中" + +#: shared-bindings/pulseio/PWMOut.c +msgid "All timers for this pin are in use" +msgstr "このピン用の全てのタイマが使用中" + +#: ports/atmel-samd/common-hal/_pew/PewPew.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/cxd56/common-hal/pulseio/PulseOut.c +#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c +#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c +msgid "All timers in use" +msgstr "全てのタイマーが使用中" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Already advertising." +msgstr "すでにアドバータイズ中" + +#: shared-module/memorymonitor/AllocationAlarm.c +#: shared-module/memorymonitor/AllocationSize.c +msgid "Already running" +msgstr "すでに実行中" + +#: ports/cxd56/common-hal/analogio/AnalogIn.c +msgid "AnalogIn not supported on given pin" +msgstr "指定のピンはAnalogInに対応していません" + +#: ports/cxd56/common-hal/analogio/AnalogOut.c +#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +msgid "AnalogOut functionality not supported" +msgstr "AnalogOut機能はサポートされていません" + +#: shared-bindings/analogio/AnalogOut.c +msgid "AnalogOut is only 16 bits. Value must be less than 65536." +msgstr "AnalogOutは16ビットです。値は65536以下にしてください" + +#: ports/atmel-samd/common-hal/analogio/AnalogOut.c +msgid "AnalogOut not supported on given pin" +msgstr "指定のピンはAnalogOutをサポートしていません" + +#: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/cxd56/common-hal/pulseio/PulseOut.c +msgid "Another send is already active" +msgstr "他のsendがすでにアクティブ" + +#: shared-bindings/pulseio/PulseOut.c +msgid "Array must contain halfwords (type 'H')" +msgstr "array のタイプは16ビット ('H') でなければなりません" + +#: shared-bindings/nvm/ByteArray.c +msgid "Array values should be single bytes." +msgstr "Arrayの各値は1バイトでなければなりません" + +#: shared-bindings/microcontroller/Pin.c +msgid "At most %d %q may be specified (not %d)" +msgstr "最大で %d 個の %q が指定できます(%d個でなく)" + +#: shared-module/memorymonitor/AllocationAlarm.c +#, c-format +msgid "Attempt to allocate %d blocks" +msgstr "%d 個のブロックの確保を試みました" + +#: supervisor/shared/safe_mode.c +msgid "Attempted heap allocation when MicroPython VM not running." +msgstr "MicroPython VMの非実行時にヒープの確保を試みました" + +#: main.c +msgid "Auto-reload is off.\n" +msgstr "オートリロードはオフです。\n" + +#: main.c +msgid "" +"Auto-reload is on. Simply save files over USB to run them or enter REPL to " +"disable.\n" +msgstr "" +"オートリロードがオンです。ファイルをUSB経由で保存するだけで実行できます。REPL" +"に入ると無効化します。\n" + +#: shared-module/displayio/Display.c +#: shared-module/framebufferio/FramebufferDisplay.c +msgid "Below minimum frame rate" +msgstr "最低のフレームレート未満" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Bit clock and word select must share a clock unit" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Bit depth must be multiple of 8." +msgstr "ビット深度は8の倍数でなければなりません" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Both RX and TX required for flow control" +msgstr "フロー制御のためにRXとTXの両方が必要" + +#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +msgid "Both pins must support hardware interrupts" +msgstr "両方のピンにハードウェア割り込み対応が必要" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "Brightness must be 0-1.0" +msgstr "Brightnessは0から1.0まででなければなりません" + +#: shared-bindings/supervisor/__init__.c +msgid "Brightness must be between 0 and 255" +msgstr "Brightnessは0から255の間でなければなりません" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Brightness not adjustable" +msgstr "Brightnessは調整可能ではありません" + +#: shared-bindings/_bleio/UUID.c +#, c-format +msgid "Buffer + offset too small %d %d %d" +msgstr "" + +#: shared-module/usb_hid/Device.c +#, c-format +msgid "Buffer incorrect size. Should be %d bytes." +msgstr "バッファサイズが正しくありません。%dバイトでなければなりません" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Buffer is not a bytearray." +msgstr "バッファが bytearray ではありません" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Buffer is too small" +msgstr "バッファが小さすぎます" + +#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#, c-format +msgid "Buffer length %d too big. It must be less than %d" +msgstr "バッファ長%dは大きすぎます。%d以下でなければなりません" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +#: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c +msgid "Buffer length must be a multiple of 512" +msgstr "バッファ長は512の倍数でなければなりません" + +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + +#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c +msgid "Buffer must be at least length 1" +msgstr "バッファ長は少なくとも1以上でなければなりません" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Buffer too large and unable to allocate" +msgstr "バッファが大きすぎて確保できません" + +#: shared-bindings/_bleio/PacketBuffer.c +#, c-format +msgid "Buffer too short by %d bytes" +msgstr "" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c +#: ports/nrf/common-hal/displayio/ParallelBus.c +#, c-format +msgid "Bus pin %d is already in use" +msgstr "Busピン%dはすでに使用中" + +#: shared-bindings/_bleio/UUID.c +msgid "Byte buffer must be 16 bytes." +msgstr "バッファは16バイトにしてください" + +#: shared-bindings/nvm/ByteArray.c +msgid "Bytes must be between 0 and 255." +msgstr "バイト値は0から255の間でなければなりません" + +#: shared-bindings/aesio/aes.c +msgid "CBC blocks must be multiples of 16 bytes" +msgstr "CBCブロックは16バイトの整数倍でなければなりません" + +#: py/objtype.c +msgid "Call super().__init__() before accessing native object." +msgstr "" +"ネイティブオブジェクトにアクセスする前にsuper().__init__()を呼び出してくださ" +"い" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +msgid "Can't set CCCD on local Characteristic" +msgstr "ローカルのCharacteristicにはCCCDを設定できません" + +#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Cannot delete values" +msgstr "値を削除できません" + +#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c +#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c +#: ports/nrf/common-hal/digitalio/DigitalInOut.c +msgid "Cannot get pull while in output mode" +msgstr "出力モード時はpullを取得できません" + +#: ports/nrf/common-hal/microcontroller/Processor.c +msgid "Cannot get temperature" +msgstr "温度を取得できません" + +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Cannot output both channels on the same pin" +msgstr "同じピン上の両チャネルに出力できません" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot read without MISO pin." +msgstr "MISOピンなしで読み込みはできません" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Cannot record to a file" +msgstr "ファイルへ記録できません" + +#: shared-module/storage/__init__.c +msgid "Cannot remount '/' when USB is active." +msgstr "USBがアクティブな時に '/' を再マウントできません" + +#: ports/atmel-samd/common-hal/microcontroller/__init__.c +#: ports/cxd56/common-hal/microcontroller/__init__.c +#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c +msgid "Cannot reset into bootloader because no bootloader is present." +msgstr "ブートローダが存在しないためブートローダへとリセットできません" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Cannot set value when direction is input." +msgstr "方向がINPUTのときは値を設定できません" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Cannot specify RTS or CTS in RS485 mode" +msgstr "RS485モードにRTSまたはCTSを指定できません" + +#: py/objslice.c +msgid "Cannot subclass slice" +msgstr "sliceをサブクラス化することはできません" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot transfer without MOSI and MISO pins." +msgstr "MOSIピンとMISOピンなしに転送できません" + +#: extmod/moductypes.c +msgid "Cannot unambiguously get sizeof scalar" +msgstr "スカラのサイズを曖昧さなしに取得できません" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Cannot vary frequency on a timer that is already in use" +msgstr "使用中のタイマー上で周波数を変えられません" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot write without MOSI pin." +msgstr "MOSIピンなしに書き込みできません" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "CircuitPythonのコアコードが激しくクラッシュしました。おっと!\n" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" +"起動中にリセットボタンを押したためCircuitPythonはセーフモードにいます。もう一" +"度押すとセーフモードを終了します。\n" + +#: shared-module/bitbangio/SPI.c +msgid "Clock pin init failed." +msgstr "クロックピンの初期化に失敗" + +#: shared-module/bitbangio/I2C.c +msgid "Clock stretch too long" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Clock unit in use" +msgstr "クロックユニットは使用中" + +#: shared-bindings/_pew/PewPew.c +msgid "Column entry must be digitalio.DigitalInOut" +msgstr "Columnの要素は digitalio.DigitalInOut でなければなりません" + +#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/displayio/ParallelBus.c +msgid "Command must be an int between 0 and 255" +msgstr "commandは0から255の間の整数でなければなりません" + +#: shared-bindings/_bleio/Connection.c +msgid "" +"Connection has been disconnected and can no longer be used. Create a new " +"connection." +msgstr "接続は切断済みのためもう使えません。新たな接続を作成してください" + +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "破損した .mpy ファイル" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "破損した raw code" + +#: ports/cxd56/common-hal/gnss/GNSS.c +msgid "Could not initialize GNSS" +msgstr "GNSSを初期化できません" + +#: ports/cxd56/common-hal/sdioio/SDCard.c +msgid "Could not initialize SDCard" +msgstr "SDカードを初期化できません" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c +msgid "Could not initialize UART" +msgstr "UARTを初期化できません" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not initialize channel" +msgstr "チャネルを初期化できません" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not initialize timer" +msgstr "タイマーを初期化できません" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not re-init channel" +msgstr "チャネルを再初期化できません" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not re-init timer" +msgstr "タイマーを再初期化できません" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not restart PWM" +msgstr "PWMを再スタートできません" + +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not start PWM" +msgstr "PWMをスタートできません" + +#: ports/stm/common-hal/busio/UART.c +msgid "Could not start interrupt, RX busy" +msgstr "割り込みをスタートできません。RXビジー" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate decoder" +msgstr "デコーダを確保できません" + +#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate first buffer" +msgstr "1つ目のバッファを確保できません" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate input buffer" +msgstr "入力バッファを確保できません" + +#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate second buffer" +msgstr "2つ目のバッファを確保できません" + +#: supervisor/shared/safe_mode.c +msgid "Crash into the HardFault_Handler." +msgstr "クラッシュしてHardFault_Handlerに入りました" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "DAC Channel Init Error" +msgstr "DACチャネル初期化エラー" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "DAC Device Init Error" +msgstr "DACデバイス初期化エラー" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "DAC already in use" +msgstr "DACはすでに使用中" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c +#: ports/nrf/common-hal/displayio/ParallelBus.c +msgid "Data 0 pin must be byte aligned" +msgstr "Data 0 ピンは、バイト整列されていなければなりません" + +#: shared-module/audiocore/WaveFile.c +msgid "Data chunk must follow fmt chunk" +msgstr "fmtチャンクの後にdataチャンクが続かなければなりません" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Data too large for advertisement packet" +msgstr "データが、アドバタイズメントパケットには大きすぎます" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Destination capacity is smaller than destination_length." +msgstr "" + +#: ports/nrf/common-hal/audiobusio/I2SOut.c +msgid "Device in use" +msgstr "デバイス使用中" + +#: ports/cxd56/common-hal/digitalio/DigitalInOut.c +msgid "DigitalInOut not supported on given pin" +msgstr "指定されたピンはDigitalInOutをサポートしていません" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Display must have a 16 bit colorspace." +msgstr "ディスプレイには16ビット色空間が必要" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/displayio/EPaperDisplay.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Display rotation must be in 90 degree increments" +msgstr "ディスプレイの回転は90度の倍数でなければなりません" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Drive mode not used when direction is input." +msgstr "方向がINPUTのときドライブモードは使われません" + +#: shared-bindings/aesio/aes.c +msgid "ECB only operates on 16 bytes at a time" +msgstr "ECBは一度に16バイトの演算のみを行います" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +msgid "EXTINT channel already in use" +msgstr "EXTINTチャネルはすでに使用されています" + +#: extmod/modure.c +msgid "Error in regex" +msgstr "正規表現にエラーがあります" + +#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c +#: shared-bindings/microcontroller/Pin.c +#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c +#: shared-bindings/terminalio/Terminal.c +msgid "Expected a %q" +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c +msgid "Expected a Characteristic" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c +msgid "Expected a Service" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c +#: shared-bindings/_bleio/Service.c +msgid "Expected a UUID" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Expected an Address" +msgstr "" + +#: shared-module/_pixelbuf/PixelBuf.c +#, c-format +msgid "Expected tuple of length %d, got %d" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Extended advertisements with scan response not supported." +msgstr "" + +#: extmod/ulab/code/fft/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "FFTは ndarray に対してのみ定義されています" + +#: shared-bindings/ps2io/Ps2.c +msgid "Failed sending command." +msgstr "コマンドの送信に失敗" + +#: ports/nrf/sd_mutex.c +#, c-format +msgid "Failed to acquire mutex, err 0x%04x" +msgstr "ミューテックスの取得に失敗。エラー 0x%04x" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +msgid "Failed to allocate RX buffer" +msgstr "RXバッファの確保に失敗" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c +#, c-format +msgid "Failed to allocate RX buffer of %d bytes" +msgstr "%d バイトのRXバッファの確保に失敗" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Failed to connect: internal error" +msgstr "接続失敗: 内部エラー" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Failed to connect: timeout" +msgstr "接続失敗: タイムアウト" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Failed to parse MP3 file" +msgstr "MP3ファイルのパーズに失敗" + +#: ports/nrf/sd_mutex.c +#, c-format +msgid "Failed to release mutex, err 0x%04x" +msgstr "ミューテックスの開放に失敗。エラー 0x%04x" + +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "内部フラッシュの書き込みに失敗" + +#: py/moduerrno.c +msgid "File exists" +msgstr "ファイルが存在します" + +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +msgid "Frequency captured is above capability. Capture Paused." +msgstr "" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Frequency must match existing PWMOut using this timer" +msgstr "このタイマーを使う既存のPWMOutと周波数を一致させてください" + +#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c +#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c +msgid "Function requires lock" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/displayio/EPaperDisplay.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Group already used" +msgstr "グループはすでに使われています" + +#: shared-module/displayio/Group.c +msgid "Group full" +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/sdioio/SDCard.c +msgid "Hardware busy, try alternative pins" +msgstr "ハードウェアビジー。代替のピンを試してください" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Hardware in use, try alternative pins" +msgstr "ハードウェア使用中。代替のピンを試してください" + +#: extmod/vfs_posix_file.c py/objstringio.c +msgid "I/O operation on closed file" +msgstr "閉じられたファイルに対するI/O操作" + +#: ports/stm/common-hal/busio/I2C.c +msgid "I2C Init Error" +msgstr "I2C初期化エラー" + +#: shared-bindings/audiobusio/I2SOut.c +msgid "I2SOut not available" +msgstr "I2SOutが利用できません" + +#: shared-bindings/aesio/aes.c +#, c-format +msgid "IV must be %d bytes long" +msgstr "IV の長さは %d バイトでなければなりません" + +#: py/persistentcode.c +msgid "" +"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" +"mpy-update for more info." +msgstr "" +"非互換の.mpyファイルです。全ての.mpyファイルをアップデートしてください。詳細" +"は http://adafru.it/mpy-update を参照" + +#: shared-bindings/_pew/PewPew.c +msgid "Incorrect buffer size" +msgstr "バッファサイズが正しくありません" + +#: py/moduerrno.c +msgid "Input/output error" +msgstr "入力/出力エラー" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Insufficient authentication" +msgstr "認証が不十分" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Insufficient encryption" +msgstr "暗号化が不十分" + +#: ports/stm/common-hal/busio/UART.c +msgid "Internal define error" +msgstr "内部定義エラー" + +#: shared-module/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Internal error #%d" +msgstr "内部エラー #%d" + +#: shared-bindings/sdioio/SDCard.c +msgid "Invalid %q" +msgstr "不正な %q" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Invalid %q pin" +msgstr "不正な%qピン" + +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + +#: ports/stm/common-hal/analogio/AnalogIn.c +msgid "Invalid ADC Unit value" +msgstr "不正なADCユニット値" + +#: shared-module/displayio/OnDiskBitmap.c +msgid "Invalid BMP file" +msgstr "不正なBMPファイル" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "Invalid DAC pin supplied" +msgstr "無効なDACピンが与えられました" + +#: ports/atmel-samd/common-hal/pulseio/PWMOut.c +#: ports/cxd56/common-hal/pulseio/PWMOut.c +#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c +msgid "Invalid PWM frequency" +msgstr "無効なPWM周波数" + +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c +msgid "Invalid argument" +msgstr "不正な引数" + +#: shared-module/displayio/Bitmap.c +msgid "Invalid bits per value" +msgstr "値ごとのビット数が不正" + +#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Invalid buffer size" +msgstr "不正なバッファサイズ" + +#: shared-bindings/_pixelbuf/PixelBuf.c +msgid "Invalid byteorder string" +msgstr "不正なバイトオーダー文字列" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +msgid "Invalid capture period. Valid range: 1 - 500" +msgstr "不正なキャプチャ周期。有効な周期は1 - 500" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid channel count" +msgstr "不正なチャンネル数" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Invalid direction." +msgstr "不正な方向" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid file" +msgstr "不正なファイル" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid format chunk size" +msgstr "フォーマットチャンクのサイズが不正" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Invalid frequency supplied" +msgstr "不正な周波数が与えられました" + +#: supervisor/shared/safe_mode.c +msgid "Invalid memory access." +msgstr "不正なメモリアクセス" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +msgid "Invalid number of bits" +msgstr "不正なビット数" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/displayio/FourWire.c +msgid "Invalid phase" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c +msgid "Invalid pin" +msgstr "不正なピン" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Invalid pin for left channel" +msgstr "左チャネルのピンが不正" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Invalid pin for right channel" +msgstr "右チャネルのピンが不正" + +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/SPI.c +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c +#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c +#: ports/mimxrt10xx/common-hal/busio/I2C.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c +msgid "Invalid pins" +msgstr "ピンが不正" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Invalid pins for PWMOut" +msgstr "PWMOutのピンが不正" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/displayio/FourWire.c +msgid "Invalid polarity" +msgstr "不正な極性" + +#: shared-bindings/_bleio/Characteristic.c +msgid "Invalid properties" +msgstr "不正なプロパティ" + +#: shared-bindings/microcontroller/__init__.c +msgid "Invalid run mode." +msgstr "不正な Run Mode" + +#: shared-module/_bleio/Attribute.c +msgid "Invalid security_mode" +msgstr "不正な security_mode" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid voice" +msgstr "不正なボイス" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid voice count" +msgstr "不正なボイス数" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid wave file" +msgstr "不正なWaveファイル" + +#: ports/stm/common-hal/busio/UART.c +msgid "Invalid word/bit length" +msgstr "不正なワード/ビット長" + +#: shared-bindings/aesio/aes.c +msgid "Key must be 16, 24, or 32 bytes long" +msgstr "Keyの長さは、16, 24, 32バイトのいずれかでなければなりません" + +#: py/compile.c +msgid "LHS of keyword arg must be an id" +msgstr "キーワード引数の左辺には識別子が必要" + +#: shared-module/displayio/Group.c +msgid "Layer already in a group." +msgstr "レイヤーはすでにグループに含まれています" + +#: shared-module/displayio/Group.c +msgid "Layer must be a Group or TileGrid subclass." +msgstr "レイヤーはGroupかTileGridのサブクラスでなければなりません" + +#: py/objslice.c +msgid "Length must be an int" +msgstr "長さには整数が必要" + +#: py/objslice.c +msgid "Length must be non-negative" +msgstr "Lengthは非負数でなければなりません" + +#: shared-module/bitbangio/SPI.c +msgid "MISO pin init failed." +msgstr "MISOピンの初期化に失敗" + +#: shared-module/bitbangio/SPI.c +msgid "MOSI pin init failed." +msgstr "MOSIピンの初期化に失敗" + +#: shared-module/displayio/Shape.c +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "MicroPython NLR jump failed. Likely memory corruption." +msgstr "MicroPythonのNLRジャンプに失敗。メモリ破壊の可能性あり" + +#: supervisor/shared/safe_mode.c +msgid "MicroPython fatal error." +msgstr "MicroPythonの致命的エラー" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Microphone startup delay must be in range 0.0 to 1.0" +msgstr "マイクのスタートアップディレイは 0.0 から 1.0 の間でなければなりません" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "Missing MISO or MOSI Pin" +msgstr "MISOまたはMOSIピンがありません" + +#: shared-bindings/displayio/Group.c +msgid "Must be a %q subclass." +msgstr "%q のサブクラスでなければなりません" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "Must provide MISO or MOSI pin" +msgstr "MISOピンまたはMOSIピンが必要" + +#: ports/stm/common-hal/busio/SPI.c +msgid "Must provide SCK pin" +msgstr "SCKピンが必要" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Must use a multiple of 6 rgb pins, not %d" +msgstr "%d個でなく6の倍数個のrgbピンを使ってください" + +#: py/parse.c +msgid "Name too long" +msgstr "名前が長すぎます" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +msgid "No CCCD for this Characteristic" +msgstr "" + +#: ports/atmel-samd/common-hal/analogio/AnalogOut.c +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "No DAC on chip" +msgstr "チップにDACがありません" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "No DMA channel found" +msgstr "DMAチャネルが見つかりません" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "No MISO Pin" +msgstr "MISOピンがありません" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "No MOSI Pin" +msgstr "MOSIピンがありません" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/stm/common-hal/busio/UART.c +msgid "No RX pin" +msgstr "RXピンがありません" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/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 "利用できるクロックがありません" + +#: shared-bindings/_bleio/PacketBuffer.c +msgid "No connection: length cannot be determined" +msgstr "接続なし: 長さが決定できません" + +#: shared-bindings/board/__init__.c +msgid "No default %q bus" +msgstr "デフォルトの %q バスがありません" + +#: ports/atmel-samd/common-hal/touchio/TouchIn.c +msgid "No free GCLKs" +msgstr "使われていないGCLKがありません" + +#: shared-bindings/os/__init__.c +msgid "No hardware random available" +msgstr "ハードウェア乱数が利用できません" + +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +msgid "No hardware support on clk pin" +msgstr "clkピン上にハードウェアサポートがありません" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +msgid "No hardware support on pin" +msgstr "ピン上のハードウェアサポートがありません" + +#: shared-bindings/aesio/aes.c +msgid "No key was specified" +msgstr "キーが指定されていません" + +#: shared-bindings/time/__init__.c +msgid "No long integer support" +msgstr "long integerサポートがありません" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "No more timers available on this pin." +msgstr "このピンに利用可能なタイマーがもうありません" + +#: shared-module/touchio/TouchIn.c +msgid "No pulldown on pin; 1Mohm recommended" +msgstr "ピンにプルダウンがありません。1Mオーム推奨" + +#: py/moduerrno.c +msgid "No space left on device" +msgstr "デバイスに空き容量が残っていません" + +#: py/moduerrno.c +msgid "No such file/directory" +msgstr "指定されたファイル/ディレクトリはありません" + +#: shared-module/rgbmatrix/RGBMatrix.c +msgid "No timer available" +msgstr "利用できるタイマーなし" + +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "Not connected" +msgstr "接続されていません" + +#: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c +#: shared-bindings/audiopwmio/PWMAudioOut.c +msgid "Not playing" +msgstr "再生中していません" + +#: main.c +msgid "Not running saved code.\n" +msgstr "保存されたコードは実行していません。\n" + +#: shared-bindings/util.c +msgid "" +"Object has been deinitialized and can no longer be used. Create a new object." +msgstr "" +"オブジェクトは解体済みでもう使われていません。新たなオブジェクトを作成してく" +"ださい" + +#: ports/nrf/common-hal/busio/UART.c +msgid "Odd parity is not supported" +msgstr "奇数パリティはサポートされていません" + +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Only 8 or 16 bit mono with " +msgstr "8または16ビットの" + +#: shared-module/displayio/OnDiskBitmap.c +#, c-format +msgid "" +"Only Windows format, uncompressed BMP supported: given header size is %d" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +#, c-format +msgid "" +"Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " +"%d bpp given" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Oversample must be multiple of 8." +msgstr "オーバーサンプルは8の倍数でなければなりません" + +#: shared-bindings/pulseio/PWMOut.c +msgid "" +"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" +msgstr "" +"PWMの duty_cycle 値は 0 から 65535 の間でなければなりません(16ビット解像度)" + +#: shared-bindings/pulseio/PWMOut.c +msgid "" +"PWM frequency not writable when variable_frequency is False on construction." +msgstr "PWM周波数は、生成時のvariable_frequencyがFalseのとき書き換え不可" + +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c +#: ports/stm/common-hal/displayio/ParallelBus.c +msgid "ParallelBus not yet supported" +msgstr "ParallelBusはまだサポートされていません" + +#: py/moduerrno.c +msgid "Permission denied" +msgstr "パーミッション拒否" + +#: ports/atmel-samd/common-hal/analogio/AnalogIn.c +#: ports/cxd56/common-hal/analogio/AnalogIn.c +#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c +#: ports/nrf/common-hal/analogio/AnalogIn.c +#: ports/stm/common-hal/analogio/AnalogIn.c +msgid "Pin does not have ADC capabilities" +msgstr "ピンにADCの能力がありません" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Pin is input only" +msgstr "ピンは入力専用" + +#: ports/atmel-samd/common-hal/countio/Counter.c +msgid "Pin must support hardware interrupts" +msgstr "ピンはハードウェア割り込みをサポートしていなければなりません" + +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin number already reserved by EXTI" +msgstr "ピン番号はすでにEXTIによって予約されています" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "" +"Pinout uses %d bytes per element, which consumes more than the ideal %d " +"bytes. If this cannot be avoided, pass allow_inefficient=True to the " +"constructor" +msgstr "" + +#: py/builtinhelp.c +msgid "Plus any modules on the filesystem\n" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "Polygon needs at least 3 points" +msgstr "ポリゴンには少なくとも3つの点が必要" + +#: shared-bindings/_bleio/Adapter.c +msgid "Prefix buffer must be on the heap" +msgstr "Prefixバッファはヒープ上になければなりません" + +#: main.c +#, fuzzy +msgid "Press any key to enter the REPL. Use CTRL-D to reload." +msgstr "何らかのキーを押すとREPLに入ります。CTRL-Dでリロードします" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Pull not used when direction is output." +msgstr "方向がoutputのときpullは使われません" + +#: ports/stm/common-hal/os/__init__.c +msgid "RNG DeInit Error" +msgstr "乱数生成器の解体エラー" + +#: ports/stm/common-hal/os/__init__.c +msgid "RNG Init Error" +msgstr "乱数生成器の初期化エラー" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "RS485 inversion specified when not in RS485 mode" +msgstr "" + +#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/rtc/RTC.c +msgid "RTC calibration is not supported on this board" +msgstr "このボードはRTCのキャリブレーションに非対応" + +#: shared-bindings/time/__init__.c +msgid "RTC is not supported on this board" +msgstr "このボードではRTCがサポートされていません" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c +#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "RTS/CTS/RS485 Not yet supported on this device" +msgstr "RTS/CTS/RS485はこのデバイスでは未サポート" + +#: ports/stm/common-hal/os/__init__.c +msgid "Random number generation error" +msgstr "乱数生成エラー" + +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Read-only" +msgstr "読み込み専用" + +#: extmod/vfs_fat.c py/moduerrno.c +msgid "Read-only filesystem" +msgstr "読み込み専用のファイルシステム" + +#: shared-module/displayio/Bitmap.c +msgid "Read-only object" +msgstr "読み込み専用のオブジェクト" + +#: shared-bindings/displayio/EPaperDisplay.c +msgid "Refresh too soon" +msgstr "リフレッシュが早すぎます" + +#: shared-bindings/aesio/aes.c +msgid "Requested AES mode is unsupported" +msgstr "要求のAESモードは非サポート" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Right channel unsupported" +msgstr "右チャネルは非サポート" + +#: shared-bindings/_pew/PewPew.c +msgid "Row entry must be digitalio.DigitalInOut" +msgstr "Rowの各要素は digitalio.DigitalInOut でなければなりません" + +#: main.c +msgid "Running in safe mode! " +msgstr "セーフモードで実行中! " + +#: shared-module/sdcardio/SDCard.c +msgid "SD card CSD format not supported" +msgstr "SDカードのCSDフォーマットは非サポート" + +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +msgid "SDA or SCL needs a pull up" +msgstr "SDAとSCLにプルアップが必要" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + +#: ports/stm/common-hal/busio/SPI.c +msgid "SPI Init Error" +msgstr "SPI初期化エラー" + +#: ports/stm/common-hal/busio/SPI.c +msgid "SPI Re-initialization error" +msgstr "SPI再初期化エラー" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Sample rate must be positive" +msgstr "サンプルレートは正数でなければなりません" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#, c-format +msgid "Sample rate too high. It must be less than %d" +msgstr "サンプルレートは%d以下でなければなりません" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Scan already in progess. Stop with stop_scan." +msgstr "スキャンはすでに進行中。stop_scanで停止してください" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Selected CTS pin not valid" +msgstr "選択されたCTSピンが不正です" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Selected RTS pin not valid" +msgstr "選択されたRTSピンが正しくありません" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Serializer in use" +msgstr "シリアライザは使用中" + +#: shared-bindings/nvm/ByteArray.c +msgid "Slice and value different lengths." +msgstr "スライスと値の長さが一致しません" + +#: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/TileGrid.c +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Slices not supported" +msgstr "スライスはサポートされていません" + +#: shared-bindings/aesio/aes.c +msgid "Source and destination buffers must be the same length" +msgstr "" + +#: extmod/modure.c +msgid "Splitting with sub-captures" +msgstr "" + +#: shared-bindings/supervisor/__init__.c +msgid "Stack size must be at least 256" +msgstr "スタックサイズは少なくとも256以上が必要" + +#: shared-bindings/multiterminal/__init__.c +msgid "Stream missing readinto() or write() method." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Supply at least one UART pin" +msgstr "少なくとも1つのUARTピンが必要" + +#: shared-bindings/gnss/GNSS.c +msgid "System entry must be gnss.SatelliteSystem" +msgstr "" + +#: ports/stm/common-hal/microcontroller/Processor.c +msgid "Temperature read timed out" +msgstr "温度読み取りがタイムアウトしました" + +#: supervisor/shared/safe_mode.c +msgid "" +"The CircuitPython heap was corrupted because the stack was too small.\n" +"Please increase the stack size if you know how, or if not:" +msgstr "" +"スタックが小さすぎたことによりCircuitPythonのヒープが破損しました。\n" +"スタックサイズを上げるか、その方法が分からなければ:" + +#: supervisor/shared/safe_mode.c +msgid "" +"The `microcontroller` module was used to boot into safe mode. Press reset to " +"exit safe mode.\n" +msgstr "" +"`microcontroller` モジュールが使われてセーフモードで起動しました。セーフモー" +"ドを抜けるにはリセットを押します。\n" + +#: supervisor/shared/safe_mode.c +#, fuzzy +msgid "" +"The microcontroller's power dipped. Make sure your power supply provides\n" +"enough power for the whole circuit and press reset (after ejecting " +"CIRCUITPY).\n" +msgstr "" +"マイクロコントローラの電力が降下しました。電源が回路全体が求める十分な電力を" +"供給できることを確認してリセットを押してください(CIRCUITPYを取り出した" +"後)。\n" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's bits_per_sample does not match the mixer's" +msgstr "サンプルのbits_per_sampleがミキサーのそれと一致しません" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's channel count does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's sample rate does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's signedness does not match the mixer's" +msgstr "サンプルの符号有無がミキサーと一致しません" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile height must exactly divide bitmap height" +msgstr "タイルの高さはビットマップの高さを割り切れる値でなければなりません" + +#: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c +msgid "Tile index out of bounds" +msgstr "タイルのインデクスが範囲外" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile value out of bounds" +msgstr "タイルの値が範囲外" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile width must exactly divide bitmap width" +msgstr "タイルの幅はビットマップの幅を割り切れる値でなければなりません" + +#: ports/nrf/common-hal/_bleio/Adapter.c +#, c-format +msgid "Timeout is too long: Maximum timeout length is %d seconds" +msgstr "タイムアウトが長すぎ。最大のタイムアウト長は%d秒" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "" +"Timer was reserved for internal use - declare PWM pins earlier in the program" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Too many channels in sample." +msgstr "サンプルのチャンネル数が多すぎます" + +#: shared-module/displayio/__init__.c +msgid "Too many display busses" +msgstr "" + +#: shared-module/displayio/__init__.c +msgid "Too many displays" +msgstr "" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Total data to write is larger than outgoing_packet_length" +msgstr "" + +#: py/obj.c +msgid "Traceback (most recent call last):\n" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "Tuple or struct_time argument required" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Buffer allocation error" +msgstr "UARTバッファの確保エラー" + +#: ports/stm/common-hal/busio/UART.c +#, fuzzy +msgid "UART De-init error" +msgstr "UARTの解体エラー" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Init Error" +msgstr "UARTの初期化エラー" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Re-init error" +msgstr "UARTの再初期化エラー" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART write error" +msgstr "UART書き込みエラー" + +#: shared-module/usb_hid/Device.c +msgid "USB Busy" +msgstr "USBビジー" + +#: shared-module/usb_hid/Device.c +msgid "USB Error" +msgstr "USBエラー" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID integer value must be 0-0xffff" +msgstr "UUIDの整数値は0から0xffffの間でなければなりません" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "" +"UUID文字列が 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' の形式になっていません" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID value is not str, int or byte buffer" +msgstr "UUIDの値がstr, int, bufferのいずれでもありません" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Unable to allocate buffers for signed conversion" +msgstr "" + +#: shared-module/displayio/I2CDisplay.c +#, c-format +msgid "Unable to find I2C Display at %x" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Unable to find free GCLK" +msgstr "" + +#: py/parse.c +msgid "Unable to init parser" +msgstr "パーザを初期化できません" + +#: shared-module/displayio/OnDiskBitmap.c +msgid "Unable to read color palette data" +msgstr "カラーパレットのデータを読み込めません" + +#: shared-bindings/nvm/ByteArray.c +msgid "Unable to write to nvm." +msgstr "nvm に書き込みできません" + +#: ports/nrf/common-hal/_bleio/UUID.c +msgid "Unexpected nrfx uuid type" +msgstr "想定されていないnrfx UUID型" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown gatt error: 0x%04x" +msgstr "不明なGATTエラー: 0x%04x" + +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "理由不明" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown security error: 0x%04x" +msgstr "不明なセキュリティエラー: 0x%04x" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown soft device error: %04x" +msgstr "不明なソフトデバイスエラー: %04x" + +#: shared-bindings/_pixelbuf/PixelBuf.c +#, c-format +msgid "Unmatched number of items on RHS (expected %d, got %d)." +msgstr "右辺の要素数が一致しません (expected %d, got %d)" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "" +"Unspecified issue. Can be that the pairing prompt on the other device was " +"declined or ignored." +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/I2C.c +msgid "Unsupported baudrate" +msgstr "" + +#: shared-module/displayio/display_core.c +msgid "Unsupported display bus type" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Unsupported format" +msgstr "" + +#: py/moduerrno.c +msgid "Unsupported operation" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Unsupported pull value." +msgstr "サポートされていないpull値" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +msgid "Value length != required fixed length" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +msgid "Value length > max_length" +msgstr "" + +#: py/emitnative.c +msgid "Viper functions don't currently support more than 4 arguments" +msgstr "" + +#: ports/stm/common-hal/microcontroller/Processor.c +msgid "Voltage read timed out" +msgstr "" + +#: main.c +msgid "WARNING: Your code filename has two extensions\n" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer is not currently running" +msgstr "WatchDogTimerは現在動作していません" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +msgstr "WatchDogTimer.modeはいったんWatchDogMode.RESETに設定すると変更不可" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer.timeout must be greater than 0" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Watchdog timer expired." +msgstr "" + +#: py/builtinhelp.c +#, c-format +msgid "" +"Welcome to Adafruit CircuitPython %s!\n" +"\n" +"Please visit learn.adafruit.com/category/circuitpython for project guides.\n" +"\n" +"To list built-in modules please do `help(\"modules\")`.\n" +msgstr "" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Writes not supported on Characteristic" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "You are in safe mode: something unanticipated happened.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "You requested starting safe mode by " +msgstr "" + +#: py/objtype.c +msgid "__init__() should return None" +msgstr "" + +#: py/objtype.c +msgid "__init__() should return None, not '%q'" +msgstr "" + +#: py/objobject.c +msgid "__new__ arg must be a user-type" +msgstr "" + +#: extmod/modubinascii.c extmod/moduhashlib.c py/objarray.c +msgid "a bytes-like object is required" +msgstr "" + +#: lib/embed/abort_.c +msgid "abort() called" +msgstr "" + +#: extmod/machine_mem.c +#, c-format +msgid "address %08x is not aligned to %d bytes" +msgstr "" + +#: shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "address out of bounds" +msgstr "" + +#: shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "addresses is empty" +msgstr "" + +#: extmod/ulab/code/vector/vectorise.c +msgid "arctan2 is implemented for scalars and ndarrays only" +msgstr "" + +#: py/modbuiltins.c +msgid "arg is an empty sequence" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + +#: py/runtime.c +msgid "argument has wrong type" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "argument must be ndarray" +msgstr "" + +#: py/argcheck.c shared-bindings/_stage/__init__.c +#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +msgid "argument num/types mismatch" +msgstr "" + +#: py/runtime.c +msgid "argument should be a '%q' not a '%q'" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + +#: py/objarray.c shared-bindings/nvm/ByteArray.c +msgid "array/bytes required on right side" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "attempt to get argmin/argmax of an empty sequence" +msgstr "" + +#: py/objstr.c +msgid "attributes not supported yet" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "axisは -1, 0, 1, None のいずれかでなければなりません" + +#: extmod/ulab/code/numerical/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "axisは -1, 0, 1 のいずれかでなければなりません" + +#: extmod/ulab/code/numerical/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "axisは None, 0, 1 のいずれかが必要です" + +#: py/builtinevex.c +msgid "bad compile mode" +msgstr "" + +#: py/objstr.c +msgid "bad conversion specifier" +msgstr "" + +#: py/objstr.c +msgid "bad format string" +msgstr "" + +#: py/binary.c +msgid "bad typecode" +msgstr "typecodeが不正" + +#: py/emitnative.c +msgid "binary op %q not implemented" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "bits must be 7, 8 or 9" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "bits_per_sample must be 8 or 16" +msgstr "" + +#: py/emitinlinethumb.c +msgid "branch not in range" +msgstr "" + +#: shared-bindings/audiocore/RawSample.c +msgid "buffer must be a bytes-like object" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "buffer size must match format" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +msgid "buffer slices must be of equal length" +msgstr "" + +#: py/modstruct.c shared-bindings/struct/__init__.c +#: shared-module/struct/__init__.c +msgid "buffer too small" +msgstr "" + +#: shared-bindings/_pew/PewPew.c +msgid "buttons must be digitalio.DigitalInOut" +msgstr "" + +#: py/vm.c +msgid "byte code not implemented" +msgstr "" + +#: shared-bindings/_pixelbuf/PixelBuf.c +msgid "byteorder is not a string" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +msgid "bytes > 8 bits not supported" +msgstr "" + +#: py/objstr.c +msgid "bytes value out of range" +msgstr "" + +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c +msgid "calibration is out of range" +msgstr "" + +#: ports/atmel-samd/bindings/samd/Clock.c +msgid "calibration is read only" +msgstr "" + +#: ports/atmel-samd/common-hal/rtc/RTC.c +msgid "calibration value out of range +/-127" +msgstr "" + +#: py/emitinlinethumb.c +msgid "can only have up to 4 parameters to Thumb assembly" +msgstr "" + +#: py/emitinlinextensa.c +msgid "can only have up to 4 parameters to Xtensa assembly" +msgstr "" + +#: py/persistentcode.c +msgid "can only save bytecode" +msgstr "" + +#: py/objtype.c +msgid "can't add special method to already-subclassed class" +msgstr "" + +#: py/compile.c +msgid "can't assign to expression" +msgstr "" + +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "" + +#: py/objstr.c +msgid "can't convert '%q' object to %q implicitly" +msgstr "" + +#: py/obj.c +msgid "can't convert to %q" +msgstr "" + +#: py/objstr.c +msgid "can't convert to str implicitly" +msgstr "" + +#: py/compile.c +msgid "can't declare nonlocal in outer code" +msgstr "" + +#: py/compile.c +msgid "can't delete expression" +msgstr "" + +#: py/emitnative.c +msgid "can't do binary op between '%q' and '%q'" +msgstr "" + +#: py/objcomplex.c +msgid "can't do truncated division of a complex number" +msgstr "" + +#: py/compile.c +msgid "can't have multiple **x" +msgstr "" + +#: py/compile.c +msgid "can't have multiple *x" +msgstr "" + +#: py/emitnative.c +msgid "can't implicitly convert '%q' to 'bool'" +msgstr "" + +#: py/emitnative.c +msgid "can't load from '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't load with '%q' index" +msgstr "" + +#: py/objgenerator.c +msgid "can't pend throw to just-started generator" +msgstr "" + +#: py/objgenerator.c +msgid "can't send non-None value to a just-started generator" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "can't set 512 block size" +msgstr "" + +#: py/objnamedtuple.c +msgid "can't set attribute" +msgstr "" + +#: py/emitnative.c +msgid "can't store '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't store to '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't store with '%q' index" +msgstr "" + +#: py/objstr.c +msgid "" +"can't switch from automatic field numbering to manual field specification" +msgstr "" + +#: py/objstr.c +msgid "" +"can't switch from manual field specification to automatic field numbering" +msgstr "" + +#: py/objtype.c +msgid "cannot create '%q' instances" +msgstr "" + +#: py/objtype.c +msgid "cannot create instance" +msgstr "インスタンスを作れません" + +#: py/runtime.c +msgid "cannot import name %q" +msgstr "" + +#: py/builtinimport.c +msgid "cannot perform relative import" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + +#: py/emitnative.c +msgid "casting" +msgstr "" + +#: shared-bindings/_stage/Text.c +msgid "chars buffer too small" +msgstr "" + +#: py/modbuiltins.c +msgid "chr() arg not in range(0x110000)" +msgstr "" + +#: py/modbuiltins.c +msgid "chr() arg not in range(256)" +msgstr "" + +#: shared-module/vectorio/Circle.c +msgid "circle can only be registered in one parent" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be a buffer, tuple, list, or int" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be a bytearray or array of type 'b' or 'B'" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color must be between 0x000000 and 0xffffff" +msgstr "" + +#: shared-bindings/displayio/ColorConverter.c +msgid "color should be an int" +msgstr "" + +#: py/objcomplex.c +msgid "complex division by zero" +msgstr "" + +#: py/objfloat.c py/parsenum.c +msgid "complex values not supported" +msgstr "" + +#: extmod/moduzlib.c +msgid "compression header" +msgstr "" + +#: py/parse.c +msgid "constant must be an integer" +msgstr "" + +#: py/emitnative.c +msgid "conversion to object" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "couldn't determine SD card version" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "data must be iterable" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "data must be of equal length" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + +#: py/parsenum.c +msgid "decimal numbers not supported" +msgstr "" + +#: py/compile.c +msgid "default 'except' must be last" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "" +"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "destination buffer must be an array of type 'H' for bit_depth = 16" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "destination_length must be an int >= 0" +msgstr "" + +#: py/objdict.c +msgid "dict update sequence has wrong length" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + +#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c +#: shared-bindings/math/__init__.c +msgid "division by zero" +msgstr "ゼロ除算 (division by zero)" + +#: py/objdeque.c +msgid "empty" +msgstr "" + +#: extmod/moduheapq.c extmod/modutimeq.c +msgid "empty heap" +msgstr "" + +#: py/objstr.c +msgid "empty separator" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "empty sequence" +msgstr "" + +#: py/objstr.c +msgid "end of format while looking for conversion specifier" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "end_x should be an int" +msgstr "end_xは整数でなければなりません" + +#: ports/nrf/common-hal/busio/UART.c +#, c-format +msgid "error = 0x%08lX" +msgstr "error = 0x1%08lX" + +#: py/runtime.c +msgid "exceptions must derive from BaseException" +msgstr "例外はBaseExceptionから派生していなければなりません" + +#: py/objstr.c +msgid "expected ':' after format specifier" +msgstr "書式化指定子の後に':'が必要" + +#: py/obj.c +msgid "expected tuple/list" +msgstr "タプルまたはリストが必要" + +#: py/modthread.c +msgid "expecting a dict for keyword args" +msgstr "" + +#: py/compile.c +msgid "expecting an assembler instruction" +msgstr "アセンブラ命令が必要" + +#: py/compile.c +msgid "expecting just a value for set" +msgstr "setには値のみが必要" + +#: py/compile.c +msgid "expecting key:value for dict" +msgstr "dictには key:value が必要" + +#: py/argcheck.c +msgid "extra keyword arguments given" +msgstr "余分なキーワード引数があります" + +#: py/argcheck.c +msgid "extra positional arguments given" +msgstr "余分な位置引数が与えられました" + +#: py/parse.c +msgid "f-string expression part cannot include a '#'" +msgstr "" + +#: py/parse.c +msgid "f-string expression part cannot include a backslash" +msgstr "" + +#: py/parse.c +msgid "f-string: empty expression not allowed" +msgstr "" + +#: py/parse.c +msgid "f-string: expecting '}'" +msgstr "f-string: '}'が必要" + +#: py/parse.c +msgid "f-string: single '}' is not allowed" +msgstr "f-string: 1つだけの '}' は許されません" + +#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c +#: shared-bindings/displayio/OnDiskBitmap.c +msgid "file must be a file opened in byte mode" +msgstr "fileにはバイトモードで開かれたファイルが必要" + +#: shared-bindings/storage/__init__.c +msgid "filesystem must provide mount method" +msgstr "" + +#: extmod/ulab/code/vector/vectorise.c +msgid "first argument must be a callable" +msgstr "1つ目の引数は呼び出し可能でなければなりません" + +#: extmod/ulab/code/approx/approx.c +msgid "first argument must be a function" +msgstr "1つ目の引数は関数でなければなりません" + +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "1つ目の引数はイテレート可能でなければなりません" + +#: extmod/ulab/code/vector/vectorise.c +msgid "first argument must be an ndarray" +msgstr "1つ目の引数にはndarrayが必要" + +#: py/objtype.c +msgid "first argument to super() must be type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "flip argument must be an ndarray" +msgstr "flipの引数はndarrayでなければなりません" + +#: py/objint.c +msgid "float too big" +msgstr "floatの値が大きすぎます" + +#: shared-bindings/_stage/Text.c +msgid "font must be 2048 bytes long" +msgstr "" + +#: py/objstr.c +msgid "format requires a dict" +msgstr "" + +#: py/objdeque.c +msgid "full" +msgstr "" + +#: py/argcheck.c +msgid "function does not take keyword arguments" +msgstr "" + +#: py/argcheck.c +#, c-format +msgid "function expected at most %d arguments, got %d" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "function got multiple values for argument '%q'" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "function has the same sign at the ends of interval" +msgstr "" + +#: extmod/ulab/code/compare/compare.c +msgid "function is implemented for scalars and ndarrays only" +msgstr "" + +#: py/argcheck.c +#, c-format +msgid "function missing %d required positional arguments" +msgstr "" + +#: py/bc.c +#, fuzzy +msgid "function missing keyword-only argument" +msgstr "キーワード専用引数が足りません" + +#: py/bc.c +msgid "function missing required keyword argument '%q'" +msgstr "必須のキーワード引数'%q'が与えられていません" + +#: py/bc.c +#, c-format +msgid "function missing required positional argument #%d" +msgstr "" + +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c +#, c-format +msgid "function takes %d positional arguments but %d were given" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "function takes exactly 9 arguments" +msgstr "この関数はちょうど9個の引数をとります" + +#: py/objgenerator.c +msgid "generator already executing" +msgstr "" + +#: py/objgenerator.c +msgid "generator ignored GeneratorExit" +msgstr "" + +#: shared-bindings/_stage/Layer.c +msgid "graphic must be 2048 bytes long" +msgstr "" + +#: extmod/moduheapq.c +msgid "heap must be a list" +msgstr "" + +#: py/compile.c +msgid "identifier redefined as global" +msgstr "" + +#: py/compile.c +msgid "identifier redefined as nonlocal" +msgstr "" + +#: py/objstr.c +msgid "incomplete format" +msgstr "" + +#: py/objstr.c +msgid "incomplete format key" +msgstr "" + +#: extmod/modubinascii.c +msgid "incorrect padding" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + +#: py/obj.c +msgid "index out of range" +msgstr "インデクスが範囲外" + +#: py/obj.c +msgid "indices must be integers" +msgstr "インデクスは整数でなければなりません" + +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" +"インデクスは、整数、スライス、boolのリストのいずれかでなければなりません" + +#: extmod/ulab/code/approx/approx.c +msgid "initial values must be iterable" +msgstr "" + +#: py/compile.c +msgid "inline assembler must be a function" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft/fft.c +msgid "input array length must be power of 2" +msgstr "入力 array の長さは2の累乗でなければなりません" + +#: extmod/ulab/code/poly/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "input matrix is asymmetric" +msgstr "入力行列が非対称" + +#: extmod/ulab/code/linalg/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly/poly.c +msgid "input vectors must be of equal length" +msgstr "" + +#: py/parsenum.c +msgid "int() arg 2 must be >= 2 and <= 36" +msgstr "int() の2番目の引数は 2 以上 36 以下でなければなりません" + +#: py/objstr.c +msgid "integer required" +msgstr "整数が必要" + +#: extmod/ulab/code/approx/approx.c +msgid "interp is defined for 1D arrays of equal length" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +#, c-format +msgid "interval must be in range %s-%s" +msgstr "" + +#: lib/netutils/netutils.c +msgid "invalid arguments" +msgstr "不正な引数" + +#: extmod/modussl_axtls.c +msgid "invalid cert" +msgstr "不正な証明書" + +#: extmod/uos_dupterm.c +msgid "invalid dupterm index" +msgstr "不正なduptermインデクス" + +#: extmod/modframebuf.c +msgid "invalid format" +msgstr "" + +#: py/objstr.c +msgid "invalid format specifier" +msgstr "" + +#: extmod/modussl_axtls.c +msgid "invalid key" +msgstr "不正な鍵" + +#: py/compile.c +msgid "invalid micropython decorator" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "invalid step" +msgstr "不正なステップ" + +#: py/compile.c py/parse.c +msgid "invalid syntax" +msgstr "不正な構文" + +#: py/parsenum.c +msgid "invalid syntax for integer" +msgstr "整数の構文が不正" + +#: py/parsenum.c +#, c-format +msgid "invalid syntax for integer with base %d" +msgstr "" + +#: py/parsenum.c +msgid "invalid syntax for number" +msgstr "数字として不正な構文" + +#: py/objtype.c +msgid "issubclass() arg 1 must be a class" +msgstr "issubclass()の1つ目の引数はクラスです" + +#: py/objtype.c +msgid "issubclass() arg 2 must be a class or a tuple of classes" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "イテレート可能なオブジェクトが同じ長さではありません" + +#: extmod/ulab/code/linalg/linalg.c +msgid "iterations did not converge" +msgstr "" + +#: py/objstr.c +msgid "join expects a list of str/bytes objects consistent with self object" +msgstr "" + +#: py/argcheck.c +msgid "keyword argument(s) not yet implemented - use normal args instead" +msgstr "" + +#: py/bc.c +msgid "keywords must be strings" +msgstr "キーワードは文字列でなければなりません" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +msgid "label '%q' not defined" +msgstr "" + +#: py/compile.c +msgid "label redefined" +msgstr "ラベルの再定義" + +#: py/stream.c +msgid "length argument not allowed for this type" +msgstr "" + +#: shared-bindings/audiomixer/MixerVoice.c +msgid "level must be between 0 and 1" +msgstr "levelは0から1の間でなければなりません" + +#: py/objarray.c +msgid "lhs and rhs should be compatible" +msgstr "左辺と右辺が互換でなければなりません" + +#: py/emitnative.c +msgid "local '%q' has type '%q' but source is '%q'" +msgstr "" + +#: py/emitnative.c +msgid "local '%q' used before type known" +msgstr "" + +#: py/vm.c +msgid "local variable referenced before assignment" +msgstr "" + +#: py/objint.c +msgid "long int not supported in this build" +msgstr "このビルドはlong intをサポートしていません" + +#: py/parse.c +msgid "malformed f-string" +msgstr "不正な形式のf-string" + +#: shared-bindings/_stage/Layer.c +msgid "map buffer too small" +msgstr "" + +#: py/modmath.c shared-bindings/math/__init__.c +msgid "math domain error" +msgstr "定義域エラー" + +#: extmod/ulab/code/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "行列の次元が一致しません" + +#: extmod/ulab/code/linalg/linalg.c +msgid "matrix is not positive definite" +msgstr "正定値行列ではありません" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +#, c-format +msgid "max_length must be 0-%d when fixed_length is %s" +msgstr "" + +#: py/runtime.c +msgid "maximum recursion depth exceeded" +msgstr "最大の再帰深度を超えました" + +#: py/runtime.c +#, c-format +msgid "memory allocation failed, allocating %u bytes" +msgstr "" + +#: py/runtime.c +msgid "memory allocation failed, heap is locked" +msgstr "メモリ確保に失敗。ヒープがロックされています" + +#: py/builtinimport.c +msgid "module not found" +msgstr "モジュールが見つかりません" + +#: extmod/ulab/code/poly/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + +#: py/compile.c +msgid "multiple *x in assignment" +msgstr "" + +#: py/objtype.c +msgid "multiple bases have instance lay-out conflict" +msgstr "" + +#: py/objtype.c +msgid "multiple inheritance not supported" +msgstr "複数継承は非サポート" + +#: py/emitnative.c +msgid "must raise an object" +msgstr "" + +#: py/modbuiltins.c +msgid "must use keyword argument for key function" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "n must be between 0, and 9" +msgstr "nは0から9までです" + +#: py/runtime.c +msgid "name '%q' is not defined" +msgstr "名前'%q'は定義されていません" + +#: py/runtime.c +msgid "name not defined" +msgstr "名前が定義されていません" + +#: py/compile.c +msgid "name reused for argument" +msgstr "名前が引数で再利用されています" + +#: py/emitnative.c +msgid "native yield" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "need more than %d values to unpack" +msgstr "" + +#: py/objint_longlong.c py/objint_mpz.c py/runtime.c +msgid "negative power with no float support" +msgstr "" + +#: py/objint_mpz.c py/runtime.c +msgid "negative shift count" +msgstr "シフトカウントが負数" + +#: shared-module/sdcardio/SDCard.c +msgid "no SD card" +msgstr "SDカードがありません" + +#: py/vm.c +msgid "no active exception to reraise" +msgstr "" + +#: shared-bindings/socket/__init__.c shared-module/network/__init__.c +msgid "no available NIC" +msgstr "利用可能なNICがありません" + +#: py/compile.c +msgid "no binding for nonlocal found" +msgstr "" + +#: py/builtinimport.c +msgid "no module named '%q'" +msgstr "'%q' という名前のモジュールはありません" + +#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/displayio/ParallelBus.c +msgid "no reset pin available" +msgstr "利用可能なリセットピンがありません" + +#: shared-module/sdcardio/SDCard.c +msgid "no response from SD card" +msgstr "SDカードからの応答がありません" + +#: py/runtime.c +msgid "no such attribute" +msgstr "そのような属性はありません" + +#: ports/nrf/common-hal/_bleio/Connection.c +msgid "non-UUID found in service_uuids_whitelist" +msgstr "" + +#: py/compile.c +msgid "non-default argument follows default argument" +msgstr "" + +#: extmod/modubinascii.c +msgid "non-hex digit found" +msgstr "16進数以外の桁があります" + +#: py/compile.c +msgid "non-keyword arg after */**" +msgstr "*/** の後に非キーワード引数は置けません" + +#: py/compile.c +msgid "non-keyword arg after keyword arg" +msgstr "キーワード引数の後に非キーワード引数は置けません" + +#: shared-bindings/_bleio/UUID.c +msgid "not a 128-bit UUID" +msgstr "128ビットのUUIDではありません" + +#: py/objstr.c +msgid "not all arguments converted during string formatting" +msgstr "" + +#: py/objstr.c +msgid "not enough arguments for format string" +msgstr "" + +#: extmod/ulab/code/poly/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "引数の数は2個または3個でなければなりません" + +#: extmod/ulab/code/ulab_create.c +msgid "number of points must be at least 2" +msgstr "" + +#: py/obj.c +msgid "object '%q' is not a tuple or list" +msgstr "オブジェクト'%q'がタプルやリストでありません" + +#: py/obj.c +msgid "object does not support item assignment" +msgstr "オブジェクトは要素の代入をサポートしていません" + +#: py/obj.c +msgid "object does not support item deletion" +msgstr "オブジェクトは要素の削除をサポートしていません" + +#: py/obj.c +msgid "object has no len" +msgstr "オブジェクトがlenを持っていません" + +#: py/obj.c +msgid "object is not subscriptable" +msgstr "オブジェクトは要素の取得をサポートしていません" + +#: py/runtime.c +msgid "object not an iterator" +msgstr "オブジェクトはイテレータではありません" + +#: py/objtype.c py/runtime.c +msgid "object not callable" +msgstr "オブジェクトは呼び出し可能でありません" + +#: py/sequence.c shared-bindings/displayio/Group.c +msgid "object not in sequence" +msgstr "" + +#: py/runtime.c +msgid "object not iterable" +msgstr "オブジェクトはイテレートできません" + +#: py/obj.c +msgid "object of type '%q' has no len()" +msgstr "" + +#: py/obj.c +msgid "object with buffer protocol required" +msgstr "" + +#: extmod/modubinascii.c +msgid "odd-length string" +msgstr "奇数長の文字列" + +#: py/objstr.c py/objstrunicode.c +msgid "offset out of bounds" +msgstr "" + +#: ports/nrf/common-hal/audiobusio/PDMIn.c +msgid "only bit_depth=16 is supported" +msgstr "" + +#: ports/nrf/common-hal/audiobusio/PDMIn.c +msgid "only sample_rate=16000 is supported" +msgstr "" + +#: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c +#: shared-bindings/nvm/ByteArray.c +msgid "only slices with step=1 (aka None) are supported" +msgstr "" + +#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c +#: extmod/ulab/code/vector/vectorise.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "この演算はndarray上で実装されていません" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "この演算は与えられた型をサポートしていません" + +#: py/modbuiltins.c +msgid "ord expects a character" +msgstr "ord()は1文字を受け取ります" + +#: py/modbuiltins.c +#, c-format +msgid "ord() expected a character, but string of length %d found" +msgstr "ord()は1文字を要求しますが、長さ %d の文字列が与えられました" + +#: py/objint_mpz.c +msgid "overflow converting long int to machine word" +msgstr "long int をマシンの word に変換する際にオーバーフローしました" + +#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c +msgid "palette must be 32 bytes long" +msgstr "パレットの長さは32バイトでなければなりません" + +#: shared-bindings/displayio/Palette.c +msgid "palette_index should be an int" +msgstr "palette_indexは整数です" + +#: py/compile.c +msgid "parameter annotation must be an identifier" +msgstr "引数アノテーションは識別子でなければなりません" + +#: py/emitinlinextensa.c +msgid "parameters must be registers in sequence a2 to a5" +msgstr "" + +#: py/emitinlinethumb.c +msgid "parameters must be registers in sequence r0 to r3" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "pixel coordinates out of bounds" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "pixel value requires too many bits" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c +msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "polygon can only be registered in one parent" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" + +#: py/objint_mpz.c +msgid "pow() 3rd argument cannot be 0" +msgstr "pow()の3つ目の引数は0にできません" + +#: py/objint_mpz.c +msgid "pow() with 3 arguments requires integers" +msgstr "pow()の3番目の引数には整数が必要" + +#: extmod/modutimeq.c +msgid "queue overflow" +msgstr "キューがオーバーフローしました" + +#: py/parse.c +msgid "raw f-strings are not implemented" +msgstr "" + +#: extmod/ulab/code/fft/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "実数部と虚数部は同じ長さでなければなりません" + +#: py/builtinimport.c +msgid "relative import" +msgstr "相対インポート" + +#: py/obj.c +#, c-format +msgid "requested length %d but object has length %d" +msgstr "長さ%dが必要。オブジェクトの長さは%d" + +#: py/compile.c +msgid "return annotation must be an identifier" +msgstr "戻り値のアノテーションは識別子でなければなりません" + +#: py/emitnative.c +msgid "return expected '%q' but got '%q'" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "rgb_pins[%d] duplicates another pin assignment" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "rgb_pins[%d] is not on the same port as clock" +msgstr "rgb_pins[%d]はクロックと同じポートではありません" + +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "右辺は ndarray またはスカラ値でなければなりません" + +#: py/objstr.c +msgid "rsplit(None,n)" +msgstr "rsplit(None,n)" + +#: shared-bindings/audiocore/RawSample.c +msgid "" +"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " +"'B'" +msgstr "" +"sample_source バッファは、bytearray または 'h', 'H', 'b', 'B'型のarrayでなけ" +"ればなりません" + +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "sampling rate out of range" +msgstr "サンプリングレートが範囲外" + +#: py/modmicropython.c +msgid "schedule stack full" +msgstr "スケジュールスタックが一杯" + +#: lib/utils/pyexec.c py/builtinimport.c +msgid "script compilation not supported" +msgstr "スクリプトのコンパイルは非サポート" + +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "shapeは 2値のタプルでなければなりません" + +#: py/objstr.c +msgid "sign not allowed in string format specifier" +msgstr "文字列フォーマット指定子で符号は使えません" + +#: py/objstr.c +msgid "sign not allowed with integer format specifier 'c'" +msgstr "整数フォーマット指定子'c'で符号は使えません" + +#: py/objstr.c +msgid "single '}' encountered in format string" +msgstr "文字列フォーマット中に孤立した '}' があります" + +#: extmod/ulab/code/linalg/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "sleep length must be non-negative" +msgstr "sleepの長さは非負数でなければなりません" + +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "スライスのステップは0にできません" + +#: py/objslice.c py/sequence.c +msgid "slice step cannot be zero" +msgstr "" + +#: py/objint.c py/sequence.c +msgid "small int overflow" +msgstr "small int オーバーフロー" + +#: main.c +msgid "soft reboot\n" +msgstr "ソフトリブート\n" + +#: extmod/ulab/code/numerical/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "sos array must be of shape (n_section, 6)" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "sos[:, 3] should be all ones" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "sosfilt requires iterable arguments" +msgstr "" + +#: py/objstr.c +msgid "start/end indices" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "start_x should be an int" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "step must be non-zero" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "stop must be 1 or 2" +msgstr "stopは1または2でなければなりません" + +#: shared-bindings/random/__init__.c +msgid "stop not reachable from start" +msgstr "" + +#: py/stream.c +msgid "stream operation not supported" +msgstr "ストリーム操作はサポートされていません" + +#: py/objstrunicode.c +msgid "string indices must be integers, not %q" +msgstr "" + +#: py/stream.c +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: cannot index" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: no fields" +msgstr "" + +#: py/objarray.c py/objstr.c +msgid "substring not found" +msgstr "部分文字列が見つかりません" + +#: py/compile.c +msgid "super() can't find self" +msgstr "" + +#: extmod/modujson.c +msgid "syntax error in JSON" +msgstr "JSONに構文エラーがあります" + +#: extmod/moductypes.c +msgid "syntax error in uctypes descriptor" +msgstr "uctypedディスクリプタの構文エラー" + +#: shared-bindings/touchio/TouchIn.c +msgid "threshold must be in the range 0-65536" +msgstr "threshouldは0から65536までです" + +#: shared-bindings/time/__init__.c +msgid "time.struct_time() takes a 9-sequence" +msgstr "time.struct_time()は9要素のシーケンスを受け取ります" + +#: ports/nrf/common-hal/watchdog/WatchDogTimer.c +msgid "timeout duration exceeded the maximum supported value" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "timeout must be 0.0-100.0 seconds" +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "timeout must be >= 0.0" +msgstr "timeoutは0.0以上が必要" + +#: shared-module/sdcardio/SDCard.c +msgid "timeout waiting for v1 card" +msgstr "v1カードの待機がタイムアウト" + +#: shared-module/sdcardio/SDCard.c +msgid "timeout waiting for v2 card" +msgstr "v2カードの待機がタイムアウトしました" + +#: shared-bindings/time/__init__.c +msgid "timestamp out of range for platform time_t" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "too many arguments provided with the given format" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "インデクスが多すぎます" + +#: py/runtime.c +#, c-format +msgid "too many values to unpack (expected %d)" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays of equal length" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "tuple index out of range" +msgstr "" + +#: py/obj.c +msgid "tuple/list has wrong length" +msgstr "タプル/リストの長さが正しくありません" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: shared-bindings/busio/UART.c +msgid "tx and rx cannot both be None" +msgstr "txとrxの両方をNoneにすることはできません" + +#: py/objtype.c +msgid "type '%q' is not an acceptable base type" +msgstr "型'%q'はベース型として使えません" + +#: py/objtype.c +msgid "type is not an acceptable base type" +msgstr "この型はベース型にできません" + +#: py/runtime.c +msgid "type object '%q' has no attribute '%q'" +msgstr "" + +#: py/objtype.c +msgid "type takes 1 or 3 arguments" +msgstr "typeは1つまたは3つの引数をとります" + +#: py/objint_longlong.c +msgid "ulonglong too large" +msgstr "" + +#: py/emitnative.c +msgid "unary op %q not implemented" +msgstr "単項演算子 %q は未実装" + +#: py/parse.c +msgid "unexpected indent" +msgstr "" + +#: py/bc.c +msgid "unexpected keyword argument" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "unexpected keyword argument '%q'" +msgstr "キーワード引数'%q'は使えません" + +#: py/lexer.c +msgid "unicode name escapes" +msgstr "" + +#: py/parse.c +msgid "unindent does not match any outer indentation level" +msgstr "インデントの解除が、外側のどのインデントにも一致していません" + +#: py/objstr.c +#, c-format +msgid "unknown conversion specifier %c" +msgstr "" + +#: py/objstr.c +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" + +#: py/compile.c +msgid "unknown type" +msgstr "不明な型" + +#: py/emitnative.c +msgid "unknown type '%q'" +msgstr "不明な型 '%q'" + +#: py/objstr.c +msgid "unmatched '{' in format" +msgstr "書式中にマッチしない '{' があります" + +#: py/objtype.c py/runtime.c +msgid "unreadable attribute" +msgstr "読み込み不可能な属性" + +#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c +#: shared-module/vectorio/Polygon.c +msgid "unsupported %q type" +msgstr "サポートされない型 %q" + +#: py/emitinlinethumb.c +#, c-format +msgid "unsupported Thumb instruction '%s' with %d arguments" +msgstr "" + +#: py/emitinlinextensa.c +#, c-format +msgid "unsupported Xtensa instruction '%s' with %d arguments" +msgstr "" + +#: py/objstr.c +#, c-format +msgid "unsupported format character '%c' (0x%x) at index %d" +msgstr "" + +#: py/runtime.c +msgid "unsupported type for %q: '%q'" +msgstr "%qがサポートしていない型: '%q'" + +#: py/runtime.c +msgid "unsupported type for operator" +msgstr "演算子がサポートしていない型" + +#: py/runtime.c +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" + +#: py/objint.c +#, c-format +msgid "value must fit in %d byte(s)" +msgstr "値は %d バイトに収まらなければなりません" + +#: shared-bindings/displayio/Bitmap.c +msgid "value_count must be > 0" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "watchdog timeout must be greater than 0" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "window must be <= interval" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "wrong argument type" +msgstr "引数の型が正しくありません" + +#: extmod/ulab/code/ndarray.c +msgid "wrong index type" +msgstr "インデクスの型が不正です" + +#: extmod/ulab/code/vector/vectorise.c +msgid "wrong input type" +msgstr "" + +#: extmod/ulab/code/ulab_create.c py/objstr.c +msgid "wrong number of arguments" +msgstr "" + +#: py/runtime.c +msgid "wrong number of values to unpack" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type" +msgstr "" + +#: extmod/ulab/code/vector/vectorise.c +msgid "wrong output type" +msgstr "" + +#: shared-module/displayio/Shape.c +msgid "x value out of bounds" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "y should be an int" +msgstr "yは整数でなければなりません" + +#: shared-module/displayio/Shape.c +msgid "y value out of bounds" +msgstr "" + +#: py/objrange.c +msgid "zero step" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "zi must be an ndarray" +msgstr "ziはndarrayでなければなりません" + +#: extmod/ulab/code/filter/filter.c +msgid "zi must be of float type" +msgstr "ziはfloat値が必要です" + +#: extmod/ulab/code/filter/filter.c +msgid "zi must be of shape (n_section, 2)" +msgstr "" + +#~ msgid "Invalid I2C pin selection" +#~ msgstr "I2Cピンの選択が不正です" + +#~ msgid "Invalid SPI pin selection" +#~ msgstr "SPIピンの選択が不正です" + +#~ msgid "Invalid UART pin selection" +#~ msgstr "UARTピンの選択が不正です" diff --git a/locale/ko.po b/locale/ko.po index 0d5e53ba0e..e86372bcb1 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" "PO-Revision-Date: 2019-05-06 14:22-0700\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" @@ -66,13 +66,17 @@ msgstr "" msgid "%q in use" msgstr "%q 사용 중입니다" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "%q 인덱스 범위를 벗어났습니다" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "%q 인덱스는 %s 가 아닌 정수 여야합니다" +msgid "%q indices must be integers, not %q" +msgstr "" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -110,6 +114,42 @@ msgstr "" msgid "'%q' argument required" msgstr "" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -160,48 +200,6 @@ msgstr "" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "'%s' 을 지정할 수 없습니다" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "'%s' 은 삭제할 수 없습니다" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "'%s' 은 수정할 수 없습니다" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "'%s' 을 검색 할 수 없습니다" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "'%s' 은 변경할 수 없습니다" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "" @@ -451,6 +449,10 @@ msgstr "" msgid "Buffer length must be a multiple of 512" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "잘못된 크기의 버퍼. >1 여야합니다" @@ -641,6 +643,10 @@ msgstr "" msgid "Could not restart PWM" msgstr "" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -823,6 +829,11 @@ msgstr "" msgid "File exists" msgstr "" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -847,7 +858,7 @@ msgid "Group full" 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "" @@ -912,6 +923,11 @@ msgstr "" msgid "Invalid %q pin" msgstr "" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "" @@ -924,24 +940,12 @@ msgstr "" msgid "Invalid DAC pin supplied" msgstr "" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1237,6 +1241,10 @@ msgstr "" msgid "Not playing" msgstr "" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1322,10 +1330,6 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1398,11 +1402,7 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" +msgid "Running in safe mode! " msgstr "" #: shared-module/sdcardio/SDCard.c @@ -1414,6 +1414,16 @@ msgstr "" msgid "SDA or SCL needs a pull up" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "" @@ -1764,8 +1774,7 @@ msgid "__init__() should return None" msgstr "" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" +msgid "__init__() should return None, not '%q'" msgstr "" #: py/objobject.c @@ -1919,7 +1928,7 @@ msgstr "" msgid "bytes value out of range" msgstr "" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "" @@ -1951,47 +1960,17 @@ msgstr "" msgid "can't assign to expression" msgstr "" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "" - #: py/obj.c -msgid "can't convert to complex" -msgstr "" - -#: py/obj.c -msgid "can't convert to float" -msgstr "" - -#: py/obj.c -msgid "can't convert to int" +msgid "can't convert to %q" msgstr "" #: py/objstr.c @@ -2399,7 +2378,7 @@ msgstr "" msgid "function missing required positional argument #%d" msgstr "" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -2448,10 +2427,7 @@ msgstr "" msgid "index is out of bounds" msgstr "" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "" @@ -2807,8 +2783,7 @@ msgid "number of points must be at least 2" msgstr "" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" +msgid "object '%q' is not a tuple or list" msgstr "" #: py/obj.c @@ -2844,8 +2819,7 @@ msgid "object not iterable" msgstr "" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" +msgid "object of type '%q' has no len()" msgstr "" #: py/obj.c @@ -2938,20 +2912,9 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" msgstr "" #: py/objint_mpz.c @@ -3108,12 +3071,7 @@ msgid "stream operation not supported" msgstr "" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" +msgid "string indices must be integers, not %q" msgstr "" #: py/stream.c @@ -3124,10 +3082,6 @@ msgstr "" msgid "struct: cannot index" msgstr "" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "" @@ -3197,7 +3151,7 @@ msgstr "" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "" @@ -3205,10 +3159,6 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3264,8 +3214,7 @@ msgid "unknown conversion specifier %c" msgstr "" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" +msgid "unknown format code '%c' for object of type '%q'" msgstr "" #: py/compile.c @@ -3305,7 +3254,7 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "" #: py/runtime.c -msgid "unsupported type for %q: '%s'" +msgid "unsupported type for %q: '%q'" msgstr "" #: py/runtime.c @@ -3313,7 +3262,7 @@ msgid "unsupported type for operator" msgstr "" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" msgstr "" #: py/objint.c @@ -3393,6 +3342,24 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "%q 인덱스는 %s 가 아닌 정수 여야합니다" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "'%s' 을 지정할 수 없습니다" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "'%s' 은 삭제할 수 없습니다" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "'%s' 은 수정할 수 없습니다" + +#~ msgid "'%s' object is not callable" +#~ msgstr "'%s' 을 검색 할 수 없습니다" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "'%s' 은 변경할 수 없습니다" + #~ msgid "Can't add services in Central mode" #~ msgstr "센트랄(중앙) 모드에서는 서비스를 추가 할 수 없습니다" diff --git a/locale/nl.po b/locale/nl.po index 33cb3702de..b26592f1e0 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" -"PO-Revision-Date: 2020-08-02 20:41+0000\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" +"PO-Revision-Date: 2020-08-10 19:59+0000\n" "Last-Translator: _fonzlate \n" "Language-Team: none\n" "Language: nl\n" @@ -72,13 +72,17 @@ msgstr "%q fout: %d" msgid "%q in use" msgstr "%q in gebruik" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "%q index buiten bereik" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "%q indexen moeten integers zijn, niet %s" +msgid "%q indices must be integers, not %q" +msgstr "%q indices moeten integers zijn, geen %q" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -116,6 +120,42 @@ msgstr "%q() verwacht %d positionele argumenten maar kreeg %d" msgid "'%q' argument required" msgstr "'%q' argument vereist" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "'%q' object kan attribuut ' %q' niet toewijzen" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "'%q' object ondersteunt geen '%q'" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "'%q' object ondersteunt toewijzing van items niet" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "'%q' object ondersteunt verwijderen van items niet" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "'%q' object heeft geen attribuut '%q'" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "'%q' object is geen iterator" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "'%q' object is niet aanroepbaar" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "'%q' object is niet itereerbaar" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "kan niet abonneren op '%q' object" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -166,48 +206,6 @@ msgstr "'%s' integer %d is niet in bereik %d..%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "'%s' integer 0x%x past niet in mask 0x%x" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "'%s' object kan niet aan attribuut '%q' toewijzen" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "'%s' object ondersteunt '%q' niet" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "'%s' object ondersteunt item toewijzing niet" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "'%s' object ondersteunt item verwijdering niet" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "'%s' object heeft geen attribuut '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "'%s' object is geen iterator" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "'%s' object is niet aanroepbaar" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "'%s' object is niet itereerbaar" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "'%s' object is niet onderschrijfbaar" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "'=' uitlijning niet toegestaan in string format specifier" @@ -457,6 +455,12 @@ msgstr "Buffer lengte %d te groot. Het moet kleiner zijn dan %d" msgid "Buffer length must be a multiple of 512" msgstr "Buffer lengte moet een veelvoud van 512 zijn" +#: ports/stm/common-hal/sdioio/SDCard.c +#, fuzzy +#| msgid "Buffer length must be a multiple of 512" +msgid "Buffer must be a multiple of 512 bytes" +msgstr "Buffer lengte moet een veelvoud van 512 zijn" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "Buffer moet op zijn minst lengte 1 zijn" @@ -653,6 +657,12 @@ msgstr "Kan timer niet her-initialiseren" msgid "Could not restart PWM" msgstr "Kan PWM niet herstarten" +#: shared-bindings/_bleio/Adapter.c +#, fuzzy +#| msgid "Could not start PWM" +msgid "Could not set address" +msgstr "Kan PWM niet starten" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "Kan PWM niet starten" @@ -835,6 +845,11 @@ msgstr "Schrijven naar interne flash mislukt." msgid "File exists" msgstr "Bestand bestaat" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -861,7 +876,7 @@ msgid "Group full" msgstr "Groep is vol" #: 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "Hardware bezig, probeer alternatieve pinnen" @@ -928,6 +943,13 @@ msgstr "Ongeldige %q" msgid "Invalid %q pin" msgstr "Ongeldige %q pin" +#: 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/sdioio/SDCard.c +#, fuzzy +#| msgid "Invalid I2C pin selection" +msgid "Invalid %q pin selection" +msgstr "Ongeldige I2C pin selectie" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "Ongeldige ADC Unit waarde" @@ -940,24 +962,12 @@ msgstr "Ongeldig BMP bestand" msgid "Invalid DAC pin supplied" msgstr "Ongeldige DAC pin opgegeven" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "Ongeldige I2C pin selectie" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Ongeldige PWM frequentie" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "Ongeldige SPI pin selectie" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "Ongeldige UART pin selectie" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Ongeldig argument" @@ -1253,6 +1263,10 @@ msgstr "Niet verbonden" msgid "Not playing" msgstr "Wordt niet afgespeeld" +#: main.c +msgid "Not running saved code.\n" +msgstr "Opgeslagen code wordt niet uitgevoerd.\n" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1350,10 +1364,6 @@ msgstr "En iedere module in het bestandssysteem\n" msgid "Polygon needs at least 3 points" msgstr "Polygon heeft op zijn minst 3 punten nodig" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "Pop van een lege Ps2 buffer" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Prefix buffer moet op de heap zijn" @@ -1428,12 +1438,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Rij invoeging moet digitalio.DigitalInOut zijn" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Draaiende in veilige modus! Auto-herlaad is uit.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "Draaiende in veilige modus! Opgeslagen code wordt niet uitgevoerd.\n" +msgid "Running in safe mode! " +msgstr "Veilige modus wordt uitgevoerd! " #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -1444,6 +1450,17 @@ msgstr "SD kaart CSD formaat niet ondersteund" msgid "SDA or SCL needs a pull up" msgstr "SDA of SCL hebben een pullup nodig" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, fuzzy, c-format +#| msgid "SPI Init Error" +msgid "SDIO Init Error %d" +msgstr "SPI Init Fout" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "SPI Init Fout" @@ -1814,9 +1831,8 @@ msgid "__init__() should return None" msgstr "__init __ () zou None moeten retourneren" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" -msgstr "__init __ () zou None moeten retouneren, niet '%s'" +msgid "__init__() should return None, not '%q'" +msgstr "__init__() moet None teruggeven, niet '%q'" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -1969,7 +1985,7 @@ msgstr "butes > 8 niet ondersteund" msgid "bytes value out of range" msgstr "bytes waarde buiten bereik" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "calibration is buiten bereik" @@ -2002,48 +2018,18 @@ msgstr "" msgid "can't assign to expression" msgstr "kan niet toewijzen aan expressie" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "kan %s niet converteren naar een complex" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "kan %s niet omzetten naar een float" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" -msgstr "kan %s niet omzetten naar een int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "kan %q niet naar %q converteren" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "kan '%q' object niet omzetten naar %q impliciet" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "kan NaN niet omzetten naar int" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "kan adres niet omzetten naar int" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "kan inf niet omzetten naar int" - #: py/obj.c -msgid "can't convert to complex" -msgstr "kan niet omzetten naar complex" - -#: py/obj.c -msgid "can't convert to float" -msgstr "kan niet omzetten naar float" - -#: py/obj.c -msgid "can't convert to int" -msgstr "kan niet omzetten naar int" +msgid "can't convert to %q" +msgstr "kan niet naar %q converteren" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2453,7 +2439,7 @@ msgstr "functie mist vereist sleutelwoord argument \"%q" msgid "function missing required positional argument #%d" msgstr "functie mist vereist positie-argument #%d" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "" @@ -2503,10 +2489,7 @@ msgstr "vulling (padding) is onjuist" msgid "index is out of bounds" msgstr "index is buiten bereik" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "index is buiten bereik" @@ -2865,9 +2848,8 @@ msgid "number of points must be at least 2" msgstr "aantal punten moet minimaal 2 zijn" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" -msgstr "object '%s' is geen tuple of lijst" +msgid "object '%q' is not a tuple or list" +msgstr "object '%q' is geen tuple of lijst" #: py/obj.c msgid "object does not support item assignment" @@ -2902,9 +2884,8 @@ msgid "object not iterable" msgstr "object niet itereerbaar" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "object van type '%s' heeft geen len()" +msgid "object of type '%q' has no len()" +msgstr "object van type '%q' heeft geen len()" #: py/obj.c msgid "object with buffer protocol required" @@ -2997,21 +2978,10 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "pop van een lege PulseIn" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "pop van een lege set" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "pop van een lege lijst" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" -msgstr "popitem(): dictionary is leeg" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "pop van een lege %q" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3169,13 +3139,8 @@ msgid "stream operation not supported" msgstr "stream operatie niet ondersteund" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "string index buiten bereik" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" -msgstr "string indices moeten integer zijn, niet %s" +msgid "string indices must be integers, not %q" +msgstr "string indices moeten integers zijn, geen %q" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3185,10 +3150,6 @@ msgstr "string niet ondersteund; gebruik bytes of bytearray" msgid "struct: cannot index" msgstr "struct: kan niet indexeren" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "struct: index buiten bereik" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "struct: geen velden" @@ -3258,7 +3219,7 @@ msgstr "te veel waarden om uit te pakken (%d verwacht)" msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz is gedefinieerd voor eendimensionale arrays van gelijke lengte" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "tuple index buiten bereik" @@ -3266,10 +3227,6 @@ msgstr "tuple index buiten bereik" msgid "tuple/list has wrong length" msgstr "tuple of lijst heeft onjuiste lengte" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "tuple of lijst vereist op RHS" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3325,9 +3282,8 @@ msgid "unknown conversion specifier %c" msgstr "onbekende conversiespecificatie %c" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" -msgstr "onbekende formaatcode '%c' voor object van type '%s'" +msgid "unknown format code '%c' for object of type '%q'" +msgstr "onbekende formaatcode '%c' voor object van type '%q'" #: py/compile.c msgid "unknown type" @@ -3366,16 +3322,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "niet ondersteund formaatkarakter '%c' (0x%x) op index %d" #: py/runtime.c -msgid "unsupported type for %q: '%s'" -msgstr "niet ondersteund type voor %q: '%s'" +msgid "unsupported type for %q: '%q'" +msgstr "niet ondersteund type voor %q: '%q'" #: py/runtime.c msgid "unsupported type for operator" msgstr "niet ondersteund type voor operator" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" -msgstr "niet ondersteunde types voor %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" +msgstr "niet ondersteunde types voor %q: '%q', '%q'" #: py/objint.c #, c-format @@ -3454,6 +3410,121 @@ 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 "tuple/list required on RHS" +#~ msgstr "tuple of lijst vereist op RHS" + +#~ msgid "Invalid SPI pin selection" +#~ msgstr "Ongeldige SPI pin selectie" + +#~ msgid "Invalid UART pin selection" +#~ msgstr "Ongeldige UART pin selectie" + +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "%q indexen moeten integers zijn, niet %s" + +#~ msgid "'%s' object cannot assign attribute '%q'" +#~ msgstr "'%s' object kan niet aan attribuut '%q' toewijzen" + +#~ msgid "'%s' object does not support '%q'" +#~ msgstr "'%s' object ondersteunt '%q' niet" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "'%s' object ondersteunt item toewijzing niet" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "'%s' object ondersteunt item verwijdering niet" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "'%s' object heeft geen attribuut '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "'%s' object is geen iterator" + +#~ msgid "'%s' object is not callable" +#~ msgstr "'%s' object is niet aanroepbaar" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "'%s' object is niet itereerbaar" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "'%s' object is niet onderschrijfbaar" + +#~ msgid "Pop from an empty Ps2 buffer" +#~ msgstr "Pop van een lege Ps2 buffer" + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Draaiende in veilige modus! Auto-herlaad is uit.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "" +#~ "Draaiende in veilige modus! Opgeslagen code wordt niet uitgevoerd.\n" + +#~ msgid "__init__() should return None, not '%s'" +#~ msgstr "__init __ () zou None moeten retouneren, niet '%s'" + +#~ msgid "can't convert %s to complex" +#~ msgstr "kan %s niet converteren naar een complex" + +#~ msgid "can't convert %s to float" +#~ msgstr "kan %s niet omzetten naar een float" + +#~ msgid "can't convert %s to int" +#~ msgstr "kan %s niet omzetten naar een int" + +#~ msgid "can't convert NaN to int" +#~ msgstr "kan NaN niet omzetten naar int" + +#~ msgid "can't convert address to int" +#~ msgstr "kan adres niet omzetten naar int" + +#~ msgid "can't convert inf to int" +#~ msgstr "kan inf niet omzetten naar int" + +#~ msgid "can't convert to complex" +#~ msgstr "kan niet omzetten naar complex" + +#~ msgid "can't convert to float" +#~ msgstr "kan niet omzetten naar float" + +#~ msgid "can't convert to int" +#~ msgstr "kan niet omzetten naar int" + +#~ msgid "object '%s' is not a tuple or list" +#~ msgstr "object '%s' is geen tuple of lijst" + +#~ msgid "object of type '%s' has no len()" +#~ msgstr "object van type '%s' heeft geen len()" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "pop van een lege PulseIn" + +#~ msgid "pop from an empty set" +#~ msgstr "pop van een lege set" + +#~ msgid "pop from empty list" +#~ msgstr "pop van een lege lijst" + +#~ msgid "popitem(): dictionary is empty" +#~ msgstr "popitem(): dictionary is leeg" + +#~ msgid "string index out of range" +#~ msgstr "string index buiten bereik" + +#~ msgid "string indices must be integers, not %s" +#~ msgstr "string indices moeten integer zijn, niet %s" + +#~ msgid "struct: index out of range" +#~ msgstr "struct: index buiten bereik" + +#~ msgid "unknown format code '%c' for object of type '%s'" +#~ msgstr "onbekende formaatcode '%c' voor object van type '%s'" + +#~ msgid "unsupported type for %q: '%s'" +#~ msgstr "niet ondersteund type voor %q: '%s'" + +#~ msgid "unsupported types for %q: '%s', '%s'" +#~ msgstr "niet ondersteunde types voor %q: '%s', '%s'" + #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' of 'async with' buiten async functie" @@ -3486,3 +3557,6 @@ msgstr "zi moet vorm (n_section, 2) hebben" #~ msgid "must specify all of sck/mosi/miso" #~ msgstr "sck/mosi/miso moeten alle gespecificeerd worden" + +#~ msgid "'%q' object is not bytes-like" +#~ msgstr "'%q' object is niet bytes-achtig" diff --git a/locale/pl.po b/locale/pl.po index 09571db1eb..8250f840d2 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" "PO-Revision-Date: 2019-03-19 18:37-0700\n" "Last-Translator: Radomir Dopieralski \n" "Language-Team: pl\n" @@ -66,13 +66,17 @@ msgstr "" msgid "%q in use" msgstr "%q w użyciu" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "%q poza zakresem" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "%q indeks musi być liczbą całkowitą, a nie %s" +msgid "%q indices must be integers, not %q" +msgstr "" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -110,6 +114,42 @@ msgstr "%q() bierze %d argumentów pozycyjnych, lecz podano %d" msgid "'%q' argument required" msgstr "'%q' wymaga argumentu" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -160,48 +200,6 @@ msgstr "'%s' liczba %d poza zakresem %d..%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "'%s' liczba 0x%x nie pasuje do maski 0x%x" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "'%s' obiekt nie wspiera przypisania do elementów" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "'%s' obiekt nie wspiera usuwania elementów" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "'%s' obiekt nie ma atrybutu '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "'%s' obiekt nie jest iteratorem" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "'%s' nie można wywoływać obiektu" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "'%s' nie można iterować po obiekcie" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "'%s' nie można indeksować obiektu" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "wyrównanie '=' niedozwolone w specyfikacji formatu" @@ -451,6 +449,10 @@ msgstr "" msgid "Buffer length must be a multiple of 512" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "Bufor musi mieć długość 1 lub więcej" @@ -641,6 +643,10 @@ msgstr "" msgid "Could not restart PWM" msgstr "" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "" @@ -823,6 +829,11 @@ msgstr "" msgid "File exists" msgstr "Plik istnieje" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "Uzyskana częstotliwość jest niemożliwa. Spauzowano." @@ -847,7 +858,7 @@ msgid "Group full" msgstr "Grupa pełna" #: 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "" @@ -914,6 +925,11 @@ msgstr "" msgid "Invalid %q pin" msgstr "Zła nóżka %q" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "" @@ -926,24 +942,12 @@ msgstr "Zły BMP" msgid "Invalid DAC pin supplied" msgstr "" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Zła częstotliwość PWM" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Zły argument" @@ -1239,6 +1243,10 @@ msgstr "Nie podłączono" msgid "Not playing" msgstr "Nic nie jest odtwarzane" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1324,10 +1332,6 @@ msgstr "Oraz moduły w systemie plików\n" msgid "Polygon needs at least 3 points" msgstr "" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1400,12 +1404,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Rzędy muszą być digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Uruchomiony tryb bezpieczeństwa! Samo-przeładowanie wyłączone.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "Uruchomiony tryb bezpieczeństwa! Zapisany kod nie jest uruchamiany.\n" +msgid "Running in safe mode! " +msgstr "" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -1416,6 +1416,16 @@ msgstr "" msgid "SDA or SCL needs a pull up" msgstr "SDA lub SCL wymagają podciągnięcia" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "" @@ -1768,9 +1778,8 @@ msgid "__init__() should return None" msgstr "__init__() powinien zwracać None" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" -msgstr "__init__() powinien zwracać None, nie '%s'" +msgid "__init__() should return None, not '%q'" +msgstr "" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -1923,7 +1932,7 @@ msgstr "bajty większe od 8 bitów są niewspierane" msgid "bytes value out of range" msgstr "wartość bytes poza zakresem" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "kalibracja poza zakresem" @@ -1955,48 +1964,18 @@ msgstr "nie można dodać specjalnej metody do podklasy" msgid "can't assign to expression" msgstr "przypisanie do wyrażenia" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "nie można skonwertować %s do complex" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "nie można skonwertować %s do float" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" -msgstr "nie można skonwertować %s do int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "nie można automatycznie skonwertować '%q' do '%q'" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "nie można skonwertować NaN do int" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "nie można skonwertować adresu do int" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "nie można skonwertować inf do int" - #: py/obj.c -msgid "can't convert to complex" -msgstr "nie można skonwertować do complex" - -#: py/obj.c -msgid "can't convert to float" -msgstr "nie można skonwertować do float" - -#: py/obj.c -msgid "can't convert to int" -msgstr "nie można skonwertować do int" +msgid "can't convert to %q" +msgstr "" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2404,7 +2383,7 @@ msgstr "brak wymaganego argumentu nazwanego '%q' funkcji" msgid "function missing required positional argument #%d" msgstr "brak wymaganego argumentu pozycyjnego #%d funkcji" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "funkcja wymaga %d argumentów pozycyjnych, ale jest %d" @@ -2453,10 +2432,7 @@ msgstr "złe wypełnienie" msgid "index is out of bounds" msgstr "" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "indeks poza zakresem" @@ -2812,9 +2788,8 @@ msgid "number of points must be at least 2" msgstr "" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" -msgstr "obiekt '%s' nie jest krotką ani listą" +msgid "object '%q' is not a tuple or list" +msgstr "" #: py/obj.c msgid "object does not support item assignment" @@ -2849,9 +2824,8 @@ msgid "object not iterable" msgstr "obiekt nie jest iterowalny" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "obiekt typu '%s' nie ma len()" +msgid "object of type '%q' has no len()" +msgstr "" #: py/obj.c msgid "object with buffer protocol required" @@ -2944,21 +2918,10 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "pop z pustego PulseIn" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "pop z pustego zbioru" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "pop z pustej listy" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" -msgstr "popitem(): słownik jest pusty" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3115,13 +3078,8 @@ msgid "stream operation not supported" msgstr "operacja na strumieniu nieobsługiwana" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "indeks łańcucha poza zakresem" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" -msgstr "indeksy łańcucha muszą być całkowite, nie %s" +msgid "string indices must be integers, not %q" +msgstr "" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3131,10 +3089,6 @@ msgstr "łańcuchy nieobsługiwane; użyj bytes lub bytearray" msgid "struct: cannot index" msgstr "struct: nie można indeksować" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "struct: indeks poza zakresem" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "struct: brak pól" @@ -3204,7 +3158,7 @@ msgstr "zbyt wiele wartości do rozpakowania (oczekiwano %d)" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "indeks krotki poza zakresem" @@ -3212,10 +3166,6 @@ msgstr "indeks krotki poza zakresem" msgid "tuple/list has wrong length" msgstr "krotka/lista ma złą długość" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "wymagana krotka/lista po prawej stronie" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3271,9 +3221,8 @@ msgid "unknown conversion specifier %c" msgstr "zła specyfikacja konwersji %c" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" -msgstr "zły kod formatowania '%c' dla obiektu typu '%s'" +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" #: py/compile.c msgid "unknown type" @@ -3312,16 +3261,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "zły znak formatowania '%c' (0x%x) na pozycji %d" #: py/runtime.c -msgid "unsupported type for %q: '%s'" -msgstr "zły typ dla %q: '%s'" +msgid "unsupported type for %q: '%q'" +msgstr "" #: py/runtime.c msgid "unsupported type for operator" msgstr "zły typ dla operatora" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" -msgstr "złe typy dla %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" #: py/objint.c #, c-format @@ -3400,6 +3349,106 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "tuple/list required on RHS" +#~ msgstr "wymagana krotka/lista po prawej stronie" + +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "%q indeks musi być liczbą całkowitą, a nie %s" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "'%s' obiekt nie wspiera przypisania do elementów" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "'%s' obiekt nie wspiera usuwania elementów" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "'%s' obiekt nie ma atrybutu '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "'%s' obiekt nie jest iteratorem" + +#~ msgid "'%s' object is not callable" +#~ msgstr "'%s' nie można wywoływać obiektu" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "'%s' nie można iterować po obiekcie" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "'%s' nie można indeksować obiektu" + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Uruchomiony tryb bezpieczeństwa! Samo-przeładowanie wyłączone.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "" +#~ "Uruchomiony tryb bezpieczeństwa! Zapisany kod nie jest uruchamiany.\n" + +#~ msgid "__init__() should return None, not '%s'" +#~ msgstr "__init__() powinien zwracać None, nie '%s'" + +#~ msgid "can't convert %s to complex" +#~ msgstr "nie można skonwertować %s do complex" + +#~ msgid "can't convert %s to float" +#~ msgstr "nie można skonwertować %s do float" + +#~ msgid "can't convert %s to int" +#~ msgstr "nie można skonwertować %s do int" + +#~ msgid "can't convert NaN to int" +#~ msgstr "nie można skonwertować NaN do int" + +#~ msgid "can't convert address to int" +#~ msgstr "nie można skonwertować adresu do int" + +#~ msgid "can't convert inf to int" +#~ msgstr "nie można skonwertować inf do int" + +#~ msgid "can't convert to complex" +#~ msgstr "nie można skonwertować do complex" + +#~ msgid "can't convert to float" +#~ msgstr "nie można skonwertować do float" + +#~ msgid "can't convert to int" +#~ msgstr "nie można skonwertować do int" + +#~ msgid "object '%s' is not a tuple or list" +#~ msgstr "obiekt '%s' nie jest krotką ani listą" + +#~ msgid "object of type '%s' has no len()" +#~ msgstr "obiekt typu '%s' nie ma len()" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "pop z pustego PulseIn" + +#~ msgid "pop from an empty set" +#~ msgstr "pop z pustego zbioru" + +#~ msgid "pop from empty list" +#~ msgstr "pop z pustej listy" + +#~ msgid "popitem(): dictionary is empty" +#~ msgstr "popitem(): słownik jest pusty" + +#~ msgid "string index out of range" +#~ msgstr "indeks łańcucha poza zakresem" + +#~ msgid "string indices must be integers, not %s" +#~ msgstr "indeksy łańcucha muszą być całkowite, nie %s" + +#~ msgid "struct: index out of range" +#~ msgstr "struct: indeks poza zakresem" + +#~ msgid "unknown format code '%c' for object of type '%s'" +#~ msgstr "zły kod formatowania '%c' dla obiektu typu '%s'" + +#~ msgid "unsupported type for %q: '%s'" +#~ msgstr "zły typ dla %q: '%s'" + +#~ msgid "unsupported types for %q: '%s', '%s'" +#~ msgstr "złe typy dla %q: '%s', '%s'" + #~ msgid "Address is not %d bytes long or is in wrong format" #~ msgstr "Adres nie ma długości %d bajtów lub zły format" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 1bf2a13f6e..459b198df3 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" -"PO-Revision-Date: 2020-07-31 14:41+0000\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" +"PO-Revision-Date: 2020-08-16 02:25+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -72,13 +72,17 @@ msgstr "%q falha: %d" msgid "%q in use" msgstr "%q em uso" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "O índice %q está fora do intervalo" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "Os índices %q devem ser inteiros, e não %s" +msgid "%q indices must be integers, not %q" +msgstr "Os indicadores %q devem ser inteiros, não %q" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -116,6 +120,42 @@ msgstr "%q() recebe %d argumentos posicionais, porém %d foram informados" msgid "'%q' argument required" msgstr "'%q' argumento(s) requerido(s)" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "O objeto '%q' não pode definir o atributo '%q'" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "O objeto '%q' não suporta '%q'" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "O objeto '%q' não suporta a atribuição do item" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "O objeto '%q' não suporta a exclusão dos itens" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "O objeto '%q' não possui qualquer atributo '%q'" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "O objeto '%q' não é um iterador" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "O objeto '%s' não é invocável" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "O objeto '%q' não é iterável" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "O objeto '%q' não é subscritível" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -166,48 +206,6 @@ msgstr "O número inteiro '%s' %d não está dentro do intervalo %d..%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "O número inteiro '%s' 0x%x não cabe na máscara 0x%x" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "O objeto '%s' não pode definir o atributo '%q'" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "O objeto '%s' não é compatível com '%q'" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "O objeto '%s' não compatível com a atribuição dos itens" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "O objeto '%s' não é compatível com exclusão do item" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "O objeto '%s' não possui o atributo '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "O objeto '%s' não é um iterador" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "O objeto '%s' não é invocável" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "O objeto '%s' não é iterável" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "O objeto '%s' não é subroteirizável" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "" @@ -465,6 +463,10 @@ msgstr "O tamanho do buffer %d é muito grande. Deve ser menor que %d" msgid "Buffer length must be a multiple of 512" msgstr "O comprimento do Buffer deve ser um múltiplo de 512" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "O buffer deve ser um múltiplo de 512 bytes" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "O comprimento do buffer deve ter pelo menos 1" @@ -662,6 +664,10 @@ msgstr "Não foi possível reiniciar o temporizador" msgid "Could not restart PWM" msgstr "Não foi possível reiniciar o PWM" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "Não foi possível definir o endereço" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "Não foi possível iniciar o PWM" @@ -844,6 +850,11 @@ msgstr "Falha ao gravar o flash interno." msgid "File exists" msgstr "Arquivo já existe" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "O Framebuffer requer %d bytes" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -870,7 +881,7 @@ msgid "Group full" msgstr "Grupo cheio" #: 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "O hardware está ocupado, tente os pinos alternativos" @@ -937,6 +948,11 @@ msgstr "%q Inválido" msgid "Invalid %q pin" msgstr "Pino do %q inválido" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "Seleção inválida dos pinos %q" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "Valor inválido da unidade ADC" @@ -949,24 +965,12 @@ msgstr "Arquivo BMP inválido" msgid "Invalid DAC pin supplied" msgstr "O pino DAC informado é inválido" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "A seleção dos pinos I2C é inválido" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frequência PWM inválida" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "A seleção do pino SPI é inválido" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "A seleção dos pinos UART é inválido" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argumento inválido" @@ -1262,6 +1266,10 @@ msgstr "Não Conectado" msgid "Not playing" msgstr "Não está jogando" +#: main.c +msgid "Not running saved code.\n" +msgstr "O código salvo não está em execução.\n" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1359,10 +1367,6 @@ msgstr "Além de quaisquer módulos no sistema de arquivos\n" msgid "Polygon needs at least 3 points" msgstr "O Polígono precisa de pelo menos 3 pontos" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "Buffer Ps2 vazio" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1438,12 +1442,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "A entrada da linha deve ser digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Rodando em modo seguro! Atualização automática está desligada.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "Rodando em modo seguro! Não está executando o código salvo.\n" +msgid "Running in safe mode! " +msgstr "Executando no modo de segurança! " #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -1454,6 +1454,16 @@ msgstr "O formato CSD do Cartão SD não é compatível" msgid "SDA or SCL needs a pull up" msgstr "SDA ou SCL precisa de um pull up" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "Erro SDIO GetCardInfo %d" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "Erro SDIO Init %d" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "Houve um erro na inicialização SPI" @@ -1829,9 +1839,8 @@ msgid "__init__() should return None" msgstr "O __init__() deve retornar Nenhum" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" -msgstr "O __init__() deve retornar Nenhum, não '%s'" +msgid "__init__() should return None, not '%q'" +msgstr "O __init__() deve retornar Nenhum, não '%q'" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -1876,7 +1885,7 @@ msgstr "argumento tem tipo errado" #: extmod/ulab/code/linalg/linalg.c msgid "argument must be ndarray" -msgstr "o argumento deve ser um ndarray" +msgstr "o argumento deve ser ndarray" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c @@ -1984,7 +1993,7 @@ msgstr "bytes > 8 bits não suportado" msgid "bytes value out of range" msgstr "o valor dos bytes estão fora do alcance" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "Calibração está fora do intervalo" @@ -2016,48 +2025,18 @@ msgstr "não é possível adicionar o método especial à classe já subclassifi msgid "can't assign to expression" msgstr "a expressão não pode ser atribuída" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "Não é possível converter %s para complex" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "Não é possível converter %s para float" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" -msgstr "Não é possível converter %s para int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "não é possível converter %q para %q" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "não é possível converter implicitamente o objeto '%q' para %q" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "Não é possível converter NaN para int" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "não é possível converter o endereço para int" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "não é possível converter inf para int" - #: py/obj.c -msgid "can't convert to complex" -msgstr "não é possível converter para complex" - -#: py/obj.c -msgid "can't convert to float" -msgstr "não é possível converter para float" - -#: py/obj.c -msgid "can't convert to int" -msgstr "não é possível converter para int" +msgid "can't convert to %q" +msgstr "não é possível converter para %q" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2474,7 +2453,7 @@ msgstr "falta apenas a palavra chave do argumento '%q' da função" msgid "function missing required positional argument #%d" msgstr "falta o argumento #%d da posição necessária da função" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "função leva %d argumentos posicionais, mas apenas %d foram passadas" @@ -2523,10 +2502,7 @@ msgstr "preenchimento incorreto" msgid "index is out of bounds" msgstr "o índice está fora dos limites" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "Índice fora do intervalo" @@ -2887,9 +2863,8 @@ msgid "number of points must be at least 2" msgstr "a quantidade dos pontos deve ser pelo menos 2" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" -msgstr "o objeto '%s' não é uma tupla ou uma lista" +msgid "object '%q' is not a tuple or list" +msgstr "o objeto '%q' não é uma tupla ou uma lista" #: py/obj.c msgid "object does not support item assignment" @@ -2924,9 +2899,8 @@ msgid "object not iterable" msgstr "objeto não iterável" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "O objeto do tipo '%s' não possui len()" +msgid "object of type '%q' has no len()" +msgstr "o objeto do tipo '%q' não tem len()" #: py/obj.c msgid "object with buffer protocol required" @@ -3023,21 +2997,10 @@ msgstr "o polígono só pode ser registrado em um pai" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "pop a partir de um PulseIn vazio" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "pop a partir de um conjunto vazio" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "pop a partir da lista vazia" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" -msgstr "popitem(): o dicionário está vazio" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "pop a partir do %q vazio" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3074,7 +3037,7 @@ msgstr "a anotação do retorno deve ser um identificador" #: py/emitnative.c msgid "return expected '%q' but got '%q'" -msgstr "o retorno esperado era '%q', porém obteve '% q'" +msgstr "o retorno esperado era '%q', porém obteve '%q'" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -3195,13 +3158,8 @@ msgid "stream operation not supported" msgstr "a operação do fluxo não é compatível" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "o índice da string está fora do intervalo" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" -msgstr "o índices das string devem ser números inteiros, não %s" +msgid "string indices must be integers, not %q" +msgstr "a sequência dos índices devem ser inteiros, não %q" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3211,10 +3169,6 @@ msgstr "a string não é compatível; use bytes ou bytearray" msgid "struct: cannot index" msgstr "struct: não pode indexar" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "struct: índice fora do intervalo" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "struct: sem campos" @@ -3284,7 +3238,7 @@ msgstr "valores demais para descompactar (esperado %d)" msgid "trapz is defined for 1D arrays of equal length" msgstr "o trapz está definido para 1D arrays de igual tamanho" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "o índice da tupla está fora do intervalo" @@ -3292,10 +3246,6 @@ msgstr "o índice da tupla está fora do intervalo" msgid "tuple/list has wrong length" msgstr "a tupla/lista está com tamanho incorreto" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "a tupla/lista necessária no RHS" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3351,9 +3301,8 @@ msgid "unknown conversion specifier %c" msgstr "especificador de conversão desconhecido %c" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" -msgstr "código de formato desconhecido '%c' para o objeto do tipo '%s'" +msgid "unknown format code '%c' for object of type '%q'" +msgstr "o formato do código '%c' é desconhecido para o objeto do tipo '%q'" #: py/compile.c msgid "unknown type" @@ -3392,16 +3341,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "o caractere do formato não é compatível '%c' (0x%x) no índice %d" #: py/runtime.c -msgid "unsupported type for %q: '%s'" -msgstr "tipo não compatível para %q: '%s'" +msgid "unsupported type for %q: '%q'" +msgstr "tipo sem suporte para %q: '%q'" #: py/runtime.c msgid "unsupported type for operator" msgstr "tipo não compatível para o operador" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" -msgstr "tipos não compatíveis para %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" +msgstr "tipo sem suporte para %q: '%q', '%q'" #: py/objint.c #, c-format @@ -3480,18 +3429,135 @@ 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 "tuple/list required on RHS" +#~ msgstr "a tupla/lista necessária no RHS" + +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "Os índices %q devem ser inteiros, e não %s" + +#~ msgid "'%s' object cannot assign attribute '%q'" +#~ msgstr "O objeto '%s' não pode definir o atributo '%q'" + +#~ msgid "'%s' object does not support '%q'" +#~ msgstr "O objeto '%s' não é compatível com '%q'" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "O objeto '%s' não compatível com a atribuição dos itens" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "O objeto '%s' não é compatível com exclusão do item" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "O objeto '%s' não possui o atributo '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "O objeto '%s' não é um iterador" + +#~ msgid "'%s' object is not callable" +#~ msgstr "O objeto '%s' não é invocável" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "O objeto '%s' não é iterável" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "O objeto '%s' não é subroteirizável" + +#~ msgid "Invalid I2C pin selection" +#~ msgstr "A seleção dos pinos I2C é inválido" + +#~ msgid "Invalid SPI pin selection" +#~ msgstr "A seleção do pino SPI é inválido" + +#~ msgid "Invalid UART pin selection" +#~ msgstr "A seleção dos pinos UART é inválido" + +#~ msgid "Pop from an empty Ps2 buffer" +#~ msgstr "Buffer Ps2 vazio" + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Rodando em modo seguro! Atualização automática está desligada.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "Rodando em modo seguro! Não está executando o código salvo.\n" + +#~ msgid "__init__() should return None, not '%s'" +#~ msgstr "O __init__() deve retornar Nenhum, não '%s'" + +#~ msgid "can't convert %s to complex" +#~ msgstr "Não é possível converter %s para complex" + +#~ msgid "can't convert %s to float" +#~ msgstr "Não é possível converter %s para float" + +#~ msgid "can't convert %s to int" +#~ msgstr "Não é possível converter %s para int" + +#~ msgid "can't convert NaN to int" +#~ msgstr "Não é possível converter NaN para int" + +#~ msgid "can't convert address to int" +#~ msgstr "não é possível converter o endereço para int" + +#~ msgid "can't convert inf to int" +#~ msgstr "não é possível converter inf para int" + +#~ msgid "can't convert to complex" +#~ msgstr "não é possível converter para complex" + +#~ msgid "can't convert to float" +#~ msgstr "não é possível converter para float" + +#~ msgid "can't convert to int" +#~ msgstr "não é possível converter para int" + +#~ msgid "object '%s' is not a tuple or list" +#~ msgstr "o objeto '%s' não é uma tupla ou uma lista" + +#~ msgid "object of type '%s' has no len()" +#~ msgstr "O objeto do tipo '%s' não possui len()" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "pop a partir de um PulseIn vazio" + +#~ msgid "pop from an empty set" +#~ msgstr "pop a partir de um conjunto vazio" + +#~ msgid "pop from empty list" +#~ msgstr "pop a partir da lista vazia" + +#~ msgid "popitem(): dictionary is empty" +#~ msgstr "popitem(): o dicionário está vazio" + +#~ msgid "string index out of range" +#~ msgstr "o índice da string está fora do intervalo" + +#~ msgid "string indices must be integers, not %s" +#~ msgstr "o índices das string devem ser números inteiros, não %s" + +#~ msgid "struct: index out of range" +#~ msgstr "struct: índice fora do intervalo" + +#~ msgid "unknown format code '%c' for object of type '%s'" +#~ msgstr "código de formato desconhecido '%c' para o objeto do tipo '%s'" + +#~ msgid "unsupported type for %q: '%s'" +#~ msgstr "tipo não compatível para %q: '%s'" + +#~ msgid "unsupported types for %q: '%s', '%s'" +#~ msgstr "tipos não compatíveis para %q: '%s', '%s'" + #~ msgid "'%q' object is not bytes-like" #~ msgstr "objetos '%q' não são bytes-like" #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'assíncrono para' ou 'assíncrono com' função assíncrona externa" -#~ msgid "PulseIn not supported on this chip" -#~ msgstr "O PulseIn não é compatível neste CI" - #~ msgid "PulseOut not supported on this chip" #~ msgstr "O PulseOut não é compatível neste CI" +#~ msgid "PulseIn not supported on this chip" +#~ msgstr "O PulseIn não é compatível neste CI" + #~ msgid "AP required" #~ msgstr "AP requerido" diff --git a/locale/sv.po b/locale/sv.po index b2e7ff317a..d747de177a 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" -"PO-Revision-Date: 2020-07-13 17:39+0000\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" +"PO-Revision-Date: 2020-07-25 20:58+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -72,13 +72,17 @@ msgstr "%q-fel: %d" msgid "%q in use" msgstr "%q används redan" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "Index %q ligger utanför intervallet" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "Indexet %q måste vara ett heltal, inte %s" +msgid "%q indices must be integers, not %q" +msgstr "" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -86,7 +90,7 @@ msgstr "%q-listan måste vara en lista" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" -msgstr "" +msgstr "%q måste vara >= 0" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c @@ -116,6 +120,42 @@ msgstr "%q() kräver %d positionsargument men %d gavs" msgid "'%q' argument required" msgstr "'%q' argument krävs" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -166,48 +206,6 @@ msgstr "'%s' heltal %d ligger inte inom intervallet %d..%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "'%s' heltal 0x%x ryms inte i mask 0x%x" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "Objektet '%s' kan inte tilldela attributet '%q'" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "Objektet '%s' har inte stöd för '%q'" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "Objektet '%s' stöder inte tilldelningen" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "Objektet '%s' stöder inte borttagning av objekt" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "Objektet '%s' har inget attribut '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "Objektet '%s' är inte en iterator" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "Objektet '%s' kan inte anropas" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "Objektet '%s' är inte itererable" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "Objektet '%s' är inte indexbar" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "'='-justering tillåts inte i strängformatspecifikation" @@ -238,7 +236,7 @@ msgstr "'continue' utanför loop" #: py/objgenerator.c msgid "'coroutine' object is not an iterator" -msgstr "" +msgstr "objektet 'coroutine\" är inte en iterator" #: py/compile.c msgid "'data' requires at least 2 arguments" @@ -333,7 +331,7 @@ msgstr "Annonserar redan." #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c msgid "Already running" -msgstr "" +msgstr "Kör redan" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" @@ -373,7 +371,7 @@ msgstr "Högst %d %q kan anges (inte %d)" #: shared-module/memorymonitor/AllocationAlarm.c #, c-format msgid "Attempt to allocate %d blocks" -msgstr "" +msgstr "Försök att tilldela %d block" #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when MicroPython VM not running." @@ -457,6 +455,10 @@ msgstr "Buffertlängd %d för stor. Den måste vara mindre än %d" msgid "Buffer length must be a multiple of 512" msgstr "Buffertlängd måste vara en multipel av 512" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "Bufferten måste ha minst längd 1" @@ -653,6 +655,10 @@ msgstr "Det gick inte att återinitiera timern" msgid "Could not restart PWM" msgstr "Det gick inte att starta om PWM" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "Det gick inte att starta PWM" @@ -835,6 +841,11 @@ msgstr "Det gick inte att skriva till intern flash." msgid "File exists" msgstr "Filen finns redan" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "Infångningsfrekvens är för hög. Infångning pausad." @@ -859,7 +870,7 @@ msgid "Group full" msgstr "Gruppen är full" #: 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/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "Hårdvaran är upptagen, prova alternativa pinnar" @@ -926,6 +937,11 @@ msgstr "Ogiltig %q" msgid "Invalid %q pin" msgstr "Ogiltig %q-pinne" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "Ogiltigt ADC-enhetsvärde" @@ -938,24 +954,12 @@ msgstr "Ogiltig BMP-fil" msgid "Invalid DAC pin supplied" msgstr "Ogiltig DAC-pinne angiven" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "Ogiltigt val av I2C-pinne" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Ogiltig PWM-frekvens" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "Ogiltigt val av SPI-pinne" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "Ogiltigt val av UART-pinne" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Ogiltigt argument" @@ -1252,6 +1256,10 @@ msgstr "Inte ansluten" msgid "Not playing" msgstr "Ingen uppspelning" +#: main.c +msgid "Not running saved code.\n" +msgstr "" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1347,10 +1355,6 @@ msgstr "Plus eventuella moduler i filsystemet\n" msgid "Polygon needs at least 3 points" msgstr "Polygonen behöver minst 3 punkter" -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "Pop från en tom Ps2-buffert" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Prefixbufferten måste finnas på heap" @@ -1424,12 +1428,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Radvärdet måste vara digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Kör i säkert läge! Autoladdning är avstängd.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "Kör i säkert läge! Sparad kod körs inte.\n" +msgid "Running in safe mode! " +msgstr "" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -1440,6 +1440,16 @@ msgstr "SD-kort CSD-format stöds inte" msgid "SDA or SCL needs a pull up" msgstr "SDA eller SCL behöver en pullup" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "SPI Init-fel" @@ -1581,6 +1591,8 @@ msgstr "Åtgärden tog för lång tid: Max väntetid är %d sekunder" msgid "" "Timer was reserved for internal use - declare PWM pins earlier in the program" msgstr "" +"Timern är reserverad för internt bruk - deklarera PWM-pinne tidigare i " +"programmet" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." @@ -1805,9 +1817,8 @@ msgid "__init__() should return None" msgstr "__init __ () ska returnera None" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" -msgstr "__init __ () ska returnera None, inte '%s'" +msgid "__init__() should return None, not '%q'" +msgstr "" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -1960,7 +1971,7 @@ msgstr "bytes> 8 bitar stöds inte" msgid "bytes value out of range" msgstr "bytevärde utanför intervallet" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "kalibrering är utanför intervallet" @@ -1992,48 +2003,18 @@ msgstr "kan inte lägga till särskild metod för redan subklassad klass" msgid "can't assign to expression" msgstr "kan inte tilldela uttryck" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "kan inte konvertera %s till komplex" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "kan inte konvertera %s till float" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" -msgstr "kan inte konvertera %s till int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "kan inte konvertera '%q' objekt implicit till %q" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "kan inte konvertera NaN till int" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "kan inte konvertera address till int" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "kan inte konvertera inf till int" - #: py/obj.c -msgid "can't convert to complex" -msgstr "kan inte konvertera till komplex" - -#: py/obj.c -msgid "can't convert to float" -msgstr "kan inte konvertera till float" - -#: py/obj.c -msgid "can't convert to int" -msgstr "kan inte konvertera till int" +msgid "can't convert to %q" +msgstr "" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2117,7 +2098,7 @@ msgstr "" #: py/objtype.c msgid "cannot create '%q' instances" -msgstr "kan inte skapa instanser av '% q'" +msgstr "kan inte skapa instanser av '%q'" #: py/objtype.c msgid "cannot create instance" @@ -2445,7 +2426,7 @@ msgstr "funktionen saknar det obligatoriska nyckelordsargumentet '%q'" msgid "function missing required positional argument #%d" msgstr "funktionen saknar det obligatoriska positionsargumentet #%d" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "funktionen kräver %d positionsargument men %d angavs" @@ -2494,10 +2475,7 @@ msgstr "felaktig utfyllnad" msgid "index is out of bounds" msgstr "index är utanför gränserna" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "index utanför intervallet" @@ -2856,9 +2834,8 @@ msgid "number of points must be at least 2" msgstr "antal punkter måste vara minst 2" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" -msgstr "objektet '%s' är inte en tupel eller lista" +msgid "object '%q' is not a tuple or list" +msgstr "" #: py/obj.c msgid "object does not support item assignment" @@ -2893,9 +2870,8 @@ msgid "object not iterable" msgstr "objektet är inte iterable" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "objekt av typen '%s' har ingen len()" +msgid "object of type '%q' has no len()" +msgstr "" #: py/obj.c msgid "object with buffer protocol required" @@ -2988,21 +2964,10 @@ msgstr "polygon kan endast registreras i en förälder" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "pop från en tom PulseIn" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "pop från en tom uppsättning" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "pop från tom lista" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" -msgstr "popitem(): ordlistan är tom" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3160,13 +3125,8 @@ msgid "stream operation not supported" msgstr "stream-åtgärd stöds inte" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "strängindex utanför intervallet" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" -msgstr "strängindex måste vara heltal, inte %s" +msgid "string indices must be integers, not %q" +msgstr "" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3176,10 +3136,6 @@ msgstr "sträng stöds inte; använd bytes eller bytearray" msgid "struct: cannot index" msgstr "struct: kan inte indexera" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "struct: index utanför intervallet" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "struct: inga fält" @@ -3249,7 +3205,7 @@ msgstr "för många värden att packa upp (förväntat %d)" msgid "trapz is defined for 1D arrays of equal length" msgstr "" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "tupelindex utanför intervallet" @@ -3257,10 +3213,6 @@ msgstr "tupelindex utanför intervallet" msgid "tuple/list has wrong length" msgstr "tupel/lista har fel längd" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "tupel/lista krävs för RHS" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3316,9 +3268,8 @@ msgid "unknown conversion specifier %c" msgstr "okänd konverteringsspecificerare %c" #: py/objstr.c -#, c-format -msgid "unknown format code '%c' for object of type '%s'" -msgstr "okänt format '%c' för objekt av typ '%s'" +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" #: py/compile.c msgid "unknown type" @@ -3357,16 +3308,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "Formattecknet '%c' (0x%x) stöds inte vid index %d" #: py/runtime.c -msgid "unsupported type for %q: '%s'" -msgstr "typ som inte stöds för %q: '%s'" +msgid "unsupported type for %q: '%q'" +msgstr "" #: py/runtime.c msgid "unsupported type for operator" msgstr "typ stöds inte för operatören" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" -msgstr "typ som inte stöds för %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" #: py/objint.c #, c-format @@ -3445,13 +3396,133 @@ 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 "tuple/list required on RHS" +#~ msgstr "tupel/lista krävs för RHS" + +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "Indexet %q måste vara ett heltal, inte %s" + +#~ msgid "'%s' object cannot assign attribute '%q'" +#~ msgstr "Objektet '%s' kan inte tilldela attributet '%q'" + +#~ msgid "'%s' object does not support '%q'" +#~ msgstr "Objektet '%s' har inte stöd för '%q'" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "Objektet '%s' stöder inte tilldelningen" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "Objektet '%s' stöder inte borttagning av objekt" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "Objektet '%s' har inget attribut '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "Objektet '%s' är inte en iterator" + +#~ msgid "'%s' object is not callable" +#~ msgstr "Objektet '%s' kan inte anropas" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "Objektet '%s' är inte itererable" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "Objektet '%s' är inte indexbar" + +#~ msgid "Invalid I2C pin selection" +#~ msgstr "Ogiltigt val av I2C-pinne" + +#~ msgid "Invalid SPI pin selection" +#~ msgstr "Ogiltigt val av SPI-pinne" + +#~ msgid "Invalid UART pin selection" +#~ msgstr "Ogiltigt val av UART-pinne" + +#~ msgid "Pop from an empty Ps2 buffer" +#~ msgstr "Pop från en tom Ps2-buffert" + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Kör i säkert läge! Autoladdning är avstängd.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "Kör i säkert läge! Sparad kod körs inte.\n" + +#~ msgid "__init__() should return None, not '%s'" +#~ msgstr "__init __ () ska returnera None, inte '%s'" + +#~ msgid "can't convert %s to complex" +#~ msgstr "kan inte konvertera %s till komplex" + +#~ msgid "can't convert %s to float" +#~ msgstr "kan inte konvertera %s till float" + +#~ msgid "can't convert %s to int" +#~ msgstr "kan inte konvertera %s till int" + +#~ msgid "can't convert NaN to int" +#~ msgstr "kan inte konvertera NaN till int" + +#~ msgid "can't convert address to int" +#~ msgstr "kan inte konvertera address till int" + +#~ msgid "can't convert inf to int" +#~ msgstr "kan inte konvertera inf till int" + +#~ msgid "can't convert to complex" +#~ msgstr "kan inte konvertera till komplex" + +#~ msgid "can't convert to float" +#~ msgstr "kan inte konvertera till float" + +#~ msgid "can't convert to int" +#~ msgstr "kan inte konvertera till int" + +#~ msgid "object '%s' is not a tuple or list" +#~ msgstr "objektet '%s' är inte en tupel eller lista" + +#~ msgid "object of type '%s' has no len()" +#~ msgstr "objekt av typen '%s' har ingen len()" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "pop från en tom PulseIn" + +#~ msgid "pop from an empty set" +#~ msgstr "pop från en tom uppsättning" + +#~ msgid "pop from empty list" +#~ msgstr "pop från tom lista" + +#~ msgid "popitem(): dictionary is empty" +#~ msgstr "popitem(): ordlistan är tom" + +#~ msgid "string index out of range" +#~ msgstr "strängindex utanför intervallet" + +#~ msgid "string indices must be integers, not %s" +#~ msgstr "strängindex måste vara heltal, inte %s" + +#~ msgid "struct: index out of range" +#~ msgstr "struct: index utanför intervallet" + +#~ msgid "unknown format code '%c' for object of type '%s'" +#~ msgstr "okänt format '%c' för objekt av typ '%s'" + +#~ msgid "unsupported type for %q: '%s'" +#~ msgstr "typ som inte stöds för %q: '%s'" + +#~ msgid "unsupported types for %q: '%s', '%s'" +#~ msgstr "typ som inte stöds för %q: '%s', '%s'" + +#~ msgid "'%q' object is not bytes-like" +#~ msgstr "%q-objektet är inte byte-lik" + #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' eller 'async with' utanför async-funktion" -#~ msgid "PulseIn not supported on this chip" +#~ msgid "PulseOut not supported on this chip" #~ msgstr "PulseIn stöds inte av detta chip" -#~ msgid "PulseOut not supported on this chip" +#~ msgid "PulseIn not supported on this chip" #~ msgstr "PulseIn stöds inte av detta chip" #~ msgid "I2C operation not supported" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 7558fbb674..3e5d21d458 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-08-14 09:36-0400\n" "PO-Revision-Date: 2019-04-13 10:10-0700\n" "Last-Translator: hexthat\n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -63,30 +63,35 @@ msgstr "%%c xūyào zhěngshù huò char" #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" +"%d dìzhǐ yǐn jiǎo hé %d rgb yǐn jiǎo jiāng gāodù biǎoshì wèi %d, ér bùshì %d" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" -msgstr "" +msgstr "%q Shībài: %d" #: shared-bindings/microcontroller/Pin.c msgid "%q in use" msgstr "%q zhèngzài shǐyòng" -#: py/obj.c +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c msgid "%q index out of range" msgstr "%q suǒyǐn chāochū fànwéi" #: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "%q suǒyǐn bìxū shì zhěngshù, ér bùshì %s" +msgid "%q indices must be integers, not %q" +msgstr "%q suǒyǐn bìxū shì zhěngshù, ér bùshì %q" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" -msgstr "" +msgstr "%q lièbiǎo bìxū shì lièbiǎo" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" -msgstr "" +msgstr "%q Bìxū > = 0" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c @@ -98,11 +103,11 @@ msgstr "%q bìxū dàyú huò děngyú 1" #: shared-module/vectorio/Polygon.c msgid "%q must be a tuple of length 2" -msgstr "" +msgstr "%q bìxū shì chángdù wèi 2 de yuán zǔ" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q pin invalid" -msgstr "" +msgstr "%q yǐn jiǎo wúxiào" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" @@ -116,6 +121,42 @@ msgstr "%q() cǎiyòng %d wèizhì cānshù, dàn gěi chū %d" msgid "'%q' argument required" msgstr "xūyào '%q' cānshù" +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "'%q' duì xiàng wú fǎ fēn pèi shǔ xìng '%q'" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "'%q' duì xiàng bù zhī chí '%q'" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "'%q' duì xiàng bù zhī chí xiàng mù fēn pèi" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "'%q' duì xiàng bù zhī chí xiàng mù shān chú" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "%q' duì xiàng méi yǒu shǔ xìng %q'" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "%q' duì xiàng bù shì yí gè liú lǎn qì" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "%q' duì xiàng bù kě diào yòng" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "%q' duì xiàng bù kě yí dòng" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "%q' duì xiàng bù kě xià biāo" + #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" @@ -166,48 +207,6 @@ msgstr "'%s' zhěngshù %d bùzài fànwéi nèi %d.%d" msgid "'%s' integer 0x%x does not fit in mask 0x%x" msgstr "'%s' zhěngshù 0x%x bù shìyòng yú yǎn mǎ 0x%x" -#: py/runtime.c -msgid "'%s' object cannot assign attribute '%q'" -msgstr "" - -#: py/proto.c -msgid "'%s' object does not support '%q'" -msgstr "'%s' duì xiàng bù zhīchí '%q'" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item assignment" -msgstr "'%s' duìxiàng bù zhīchí xiàngmù fēnpèi" - -#: py/obj.c -#, c-format -msgid "'%s' object does not support item deletion" -msgstr "'%s' duìxiàng bù zhīchí shānchú xiàngmù" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "'%s' duìxiàng méiyǒu shǔxìng '%q'" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not an iterator" -msgstr "'%s' duìxiàng bùshì yīgè diédài qì" - -#: py/objtype.c py/runtime.c -#, c-format -msgid "'%s' object is not callable" -msgstr "'%s' duìxiàng wúfǎ diàoyòng" - -#: py/runtime.c -#, c-format -msgid "'%s' object is not iterable" -msgstr "'%s' duìxiàng bùnéng diédài" - -#: py/obj.c -#, c-format -msgid "'%s' object is not subscriptable" -msgstr "'%s' duìxiàng bùnéng fēnshù" - #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" msgstr "zìfú chuàn géshì shuōmíng fú zhōng bù yǔnxǔ '=' duìqí" @@ -226,7 +225,7 @@ msgstr "'await' wàibù gōngnéng" #: py/compile.c msgid "'await', 'async for' or 'async with' outside async function" -msgstr "" +msgstr "'await', 'async for' huò 'async with' wài bù yì bù hán shù" #: py/compile.c msgid "'break' outside loop" @@ -238,7 +237,7 @@ msgstr "'continue' wàibù xúnhuán" #: py/objgenerator.c msgid "'coroutine' object is not an iterator" -msgstr "" +msgstr "'coroutine' duì xiàng bù shì yí gè liú lǎn qì" #: py/compile.c msgid "'data' requires at least 2 arguments" @@ -333,7 +332,7 @@ msgstr "Mùqián zhèngzài guǎngbò" #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c msgid "Already running" -msgstr "" +msgstr "yǐ zài yùn xíng" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" @@ -368,12 +367,12 @@ msgstr "Shùzǔ zhí yīnggāi shì dāngè zì jié." #: shared-bindings/microcontroller/Pin.c msgid "At most %d %q may be specified (not %d)" -msgstr "" +msgstr "zuì duō kě yǐ zhǐ dìng %d %q (bù shì %d)" #: shared-module/memorymonitor/AllocationAlarm.c #, c-format msgid "Attempt to allocate %d blocks" -msgstr "" +msgstr "cháng shì fēn pèi %d kuài" #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when MicroPython VM not running." @@ -406,7 +405,7 @@ msgstr "Bǐtè shēndù bìxū shì 8 bèi yǐshàng." #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Both RX and TX required for flow control" -msgstr "" +msgstr "liú liàng kòng zhì suǒ xū de RX hé TX" #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" @@ -455,7 +454,11 @@ msgstr "Huǎnchōng qū chángdù%d tài dà. Tā bìxū xiǎoyú%d" #: ports/atmel-samd/common-hal/sdioio/SDCard.c #: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c msgid "Buffer length must be a multiple of 512" -msgstr "" +msgstr "Huǎn chōng qū cháng dù bì xū wéi 512 de bèi shù" + +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "Huǎn chōng qū bì xū shì 512 zì jié de bèi shù" #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" @@ -463,12 +466,12 @@ msgstr "Huǎnchōng qū bìxū zhìshǎo chángdù 1" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Buffer too large and unable to allocate" -msgstr "huǎn chōng qū tài dà , wú fǎ fēn pèi" +msgstr "Huǎn chōng qū tài dà , wú fǎ fēn pèi" #: shared-bindings/_bleio/PacketBuffer.c #, c-format msgid "Buffer too short by %d bytes" -msgstr "" +msgstr "Huǎn chōng qū tài duǎn , àn %d zì jié" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c @@ -486,7 +489,7 @@ msgstr "Zì jié bìxū jiè yú 0 dào 255 zhī jiān." #: shared-bindings/aesio/aes.c msgid "CBC blocks must be multiples of 16 bytes" -msgstr "" +msgstr "CBC kuài bì xū shì 16 zì jié de bèi shù" #: py/objtype.c msgid "Call super().__init__() before accessing native object." @@ -544,7 +547,7 @@ msgstr "Dāng fāngxiàng xiàng nèi shí, bùnéng shèzhì gāi zhí." #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" -msgstr "" +msgstr "wú fǎ zài RS485 mó shì xià zhǐ dìng RTS huò CTS" #: py/objslice.c msgid "Cannot subclass slice" @@ -619,11 +622,11 @@ msgstr "Sǔnhuài de yuánshǐ dàimǎ" #: ports/cxd56/common-hal/gnss/GNSS.c msgid "Could not initialize GNSS" -msgstr "" +msgstr "wú fǎ chū shǐ huà GNSS" #: ports/cxd56/common-hal/sdioio/SDCard.c msgid "Could not initialize SDCard" -msgstr "" +msgstr "wú fǎ chū shǐ huà SDCard" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c msgid "Could not initialize UART" @@ -649,6 +652,10 @@ msgstr "Wúfǎ chóngxīn qǐdòng jìshí qì" msgid "Could not restart PWM" msgstr "Wúfǎ chóngqǐ PWM" +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "wú fǎ shè zhì dì zhǐ" + #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Could not start PWM" msgstr "Wúfǎ qǐdòng PWM" @@ -733,7 +740,7 @@ msgstr "Fāngxiàng shūrù shí qūdòng móshì méiyǒu shǐyòng." #: shared-bindings/aesio/aes.c msgid "ECB only operates on 16 bytes at a time" -msgstr "" +msgstr "ECB yí cì zhǐ shǐ yòng 16 gè zì jié" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/atmel-samd/common-hal/ps2io/Ps2.c @@ -782,7 +789,7 @@ msgstr "Bù zhīchí dài yǒu sǎomiáo xiǎngyìng de kuòzhǎn guǎngbò." #: extmod/ulab/code/fft/fft.c msgid "FFT is defined for ndarrays only" -msgstr "" +msgstr "FFT jǐn wéi ndarrays dìng yì" #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." @@ -831,6 +838,11 @@ msgstr "Wúfǎ xiě rù nèibù shǎncún." msgid "File exists" msgstr "Wénjiàn cúnzài" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "zhēn huǎn chōng qū xū yào %d zì jié" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "Pínlǜ bǔhuò gāo yú nénglì. Bǔhuò zàntíng." @@ -855,7 +867,7 @@ msgid "Group full" msgstr "Fēnzǔ yǐ mǎn" #: 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/busio/SPI.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" @@ -873,12 +885,12 @@ msgstr "I2C chūshǐhuà cuòwù" #: shared-bindings/audiobusio/I2SOut.c msgid "I2SOut not available" -msgstr "" +msgstr "I2SOut bù kě yòng" #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" -msgstr "" +msgstr "IV bì xū wéi %d zì jié cháng" #: py/persistentcode.c msgid "" @@ -911,17 +923,22 @@ msgstr "Nèibù dìngyì cuòwù" #: shared-module/rgbmatrix/RGBMatrix.c #, c-format msgid "Internal error #%d" -msgstr "" +msgstr "nèi bù cuò wù #%d" #: shared-bindings/sdioio/SDCard.c msgid "Invalid %q" -msgstr "" +msgstr "wú xiào %q" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Invalid %q pin" msgstr "Wúxiào de %q yǐn jiǎo" +#: 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/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "wú xiào %q yǐn jiǎo xuǎn zé" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "Wúxiào de ADC dānwèi zhí" @@ -934,24 +951,12 @@ msgstr "Wúxiào de BMP wénjiàn" msgid "Invalid DAC pin supplied" msgstr "Tí gōng liǎo wúxiào de DAC yǐn jiǎo" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "Wúxiào de I2C yǐn jiǎo xuǎnzé" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Wúxiào de PWM pínlǜ" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "Wúxiào de SPI yǐn jiǎo xuǎnzé" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "Wúxiào de UART yǐn jiǎo xuǎnzé" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Wúxiào de cānshù" @@ -1033,7 +1038,7 @@ msgstr "Wúxiào de yǐn jiǎo" #: ports/stm/common-hal/pulseio/PWMOut.c msgid "Invalid pins for PWMOut" -msgstr "" +msgstr "PWMOut de yǐn jiǎo wú xiào" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c @@ -1070,7 +1075,7 @@ msgstr "Wúxiào de zì/wèi chángdù" #: shared-bindings/aesio/aes.c msgid "Key must be 16, 24, or 32 bytes long" -msgstr "" +msgstr "mì yào bì xū wéi 16, 24 huò 32 zì jié cháng" #: py/compile.c msgid "LHS of keyword arg must be an id" @@ -1131,16 +1136,16 @@ msgstr "Bìxū tígōng MISO huò MOSI yǐn jiǎo" #: ports/stm/common-hal/busio/SPI.c msgid "Must provide SCK pin" -msgstr "" +msgstr "bì xū tí gòng SCK yǐn jiǎo" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" -msgstr "" +msgstr "bì xū shǐ yòng 6 RGB yǐn jiǎo de bèi shù, ér bù shì %d" #: py/parse.c msgid "Name too long" -msgstr "" +msgstr "Míngchēng tài zhǎng" #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "No CCCD for this Characteristic" @@ -1182,7 +1187,7 @@ msgstr "Méiyǒu kěyòng de shízhōng" #: shared-bindings/_bleio/PacketBuffer.c msgid "No connection: length cannot be determined" -msgstr "" +msgstr "Wú liánjiē: Wúfǎ quèdìng chángdù" #: shared-bindings/board/__init__.c msgid "No default %q bus" @@ -1207,11 +1212,11 @@ msgstr "Méiyǒu zài yǐn jiǎo shàng de yìngjiàn zhīchí" #: shared-bindings/aesio/aes.c msgid "No key was specified" -msgstr "" +msgstr "Wèi zhǐdìng mì yào" #: shared-bindings/time/__init__.c msgid "No long integer support" -msgstr "" +msgstr "Méiyǒu zhǎng zhěngshù zhīchí" #: ports/stm/common-hal/pulseio/PWMOut.c msgid "No more timers available on this pin." @@ -1231,7 +1236,7 @@ msgstr "Méiyǒu cǐ lèi wénjiàn/mùlù" #: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" -msgstr "" +msgstr "Méiyǒu jìshí qì" #: supervisor/shared/safe_mode.c msgid "Nordic Soft Device failure assertion." @@ -1247,6 +1252,10 @@ msgstr "Wèi liánjiē" msgid "Not playing" msgstr "Wèi bòfàng" +#: main.c +msgid "Not running saved code.\n" +msgstr "Méiyǒu yùnxíng yǐ bǎocún de dàimǎ.\n" + #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." @@ -1312,15 +1321,15 @@ msgstr "Pin méiyǒu ADC nénglì" #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" -msgstr "" +msgstr "Yǐn jiǎo jǐn shūrù" #: ports/atmel-samd/common-hal/countio/Counter.c msgid "Pin must support hardware interrupts" -msgstr "" +msgstr "Yǐn jiǎo bìxū zhīchí yìngjiàn zhōngduàn" #: ports/stm/common-hal/pulseio/PulseIn.c msgid "Pin number already reserved by EXTI" -msgstr "" +msgstr "Zhēn hào yǐ bèi EXTI bǎoliú" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -1329,6 +1338,9 @@ msgid "" "bytes. If this cannot be avoided, pass allow_inefficient=True to the " "constructor" msgstr "" +"Chājiǎo měi gè yuánsù shǐyòng%d gè zì jié, zhè bǐ lǐxiǎng de%d xiāohào gèng " +"duōzì jié. Rúguǒ wúfǎ bìmiǎn, qǐng jiāng allow_inefficient = True chuándì " +"gěigòuzào hánshù" #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" @@ -1336,11 +1348,7 @@ msgstr "Zài wénjiàn xìtǒng shàng tiānjiā rènhé mókuài\n" #: shared-module/vectorio/Polygon.c msgid "Polygon needs at least 3 points" -msgstr "" - -#: shared-bindings/ps2io/Ps2.c -msgid "Pop from an empty Ps2 buffer" -msgstr "Cóng kōng de Ps2 huǎnchōng qū dànchū" +msgstr "Duōbiānxíng zhìshǎo xūyào 3 diǎn" #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" @@ -1364,7 +1372,7 @@ msgstr "RNG chūshǐhuà cuòwù" #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" -msgstr "" +msgstr "Wèi chǔyú RS485 móshì shí zhǐdìngle RS485 fǎn zhuǎn" #: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c #: ports/nrf/common-hal/rtc/RTC.c @@ -1378,7 +1386,7 @@ msgstr "Cǐ bǎn bù zhīchí RTC" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "RTS/CTS/RS485 Not yet supported on this device" -msgstr "" +msgstr "RTS/CTS/RS485 gāi shèbèi shàng bù zhīchí" #: ports/stm/common-hal/os/__init__.c msgid "Random number generation error" @@ -1403,7 +1411,7 @@ msgstr "Shuāxīn tài kuàile" #: shared-bindings/aesio/aes.c msgid "Requested AES mode is unsupported" -msgstr "" +msgstr "Qǐngqiú de AES móshì bù shòu zhīchí" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" @@ -1414,22 +1422,28 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Xíng xiàng bìxū shì digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! Auto-reload is off.\n" -msgstr "Zài ānquán móshì xià yùnxíng! Zìdòng chóngxīn jiāzài yǐ guānbì.\n" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "Zài ānquán móshì xià yùnxíng! Bù yùnxíng yǐ bǎocún de dàimǎ.\n" +msgid "Running in safe mode! " +msgstr "Zài ānquán móshì xià yùnxíng!" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" -msgstr "" +msgstr "Bù zhīchí SD kǎ CSD géshì" #: ports/atmel-samd/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "SDA or SCL needs a pull up" msgstr "SDA huò SCL xūyào lādòng" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "SDIO GetCardInfo Cuòwù %d" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "SDIO Init Cuòwù %d" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "SPI chūshǐhuà cuòwù" @@ -1453,11 +1467,11 @@ msgstr "Zhèngzài jìn háng sǎomiáo. Shǐyòng stop_scan tíngzhǐ." #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Selected CTS pin not valid" -msgstr "" +msgstr "Suǒ xuǎn de CTS yǐn jiǎo wúxiào" #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Selected RTS pin not valid" -msgstr "" +msgstr "Suǒ xuǎn de RTS yǐn jiǎo wúxiào" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -1477,7 +1491,7 @@ msgstr "Qiēpiàn bù shòu zhīchí" #: shared-bindings/aesio/aes.c msgid "Source and destination buffers must be the same length" -msgstr "" +msgstr "Yuán huǎnchōng qū hé mùbiāo huǎnchōng qū de chángdù bìxū xiāngtóng" #: extmod/modure.c msgid "Splitting with sub-captures" @@ -1497,11 +1511,11 @@ msgstr "Dìngyì zhìshǎo yīgè UART yǐn jiǎo" #: shared-bindings/gnss/GNSS.c msgid "System entry must be gnss.SatelliteSystem" -msgstr "" +msgstr "Xìtǒng tiáomù bìxū shì gnss.SatelliteSystem" #: ports/stm/common-hal/microcontroller/Processor.c msgid "Temperature read timed out" -msgstr "" +msgstr "Wēndù dòu qǔ chāoshí" #: supervisor/shared/safe_mode.c msgid "" @@ -1564,12 +1578,14 @@ msgstr "Píng pū kuāndù bìxū huàfēn wèi tú kuāndù" #: ports/nrf/common-hal/_bleio/Adapter.c #, c-format msgid "Timeout is too long: Maximum timeout length is %d seconds" -msgstr "" +msgstr "Chāoshí shíjiān tài zhǎng: Zuìdà chāoshí shíjiān wèi%d miǎo" #: ports/stm/common-hal/pulseio/PWMOut.c msgid "" "Timer was reserved for internal use - declare PWM pins earlier in the program" msgstr "" +"Dìngshí qì bǎoliú gōng nèibù shǐyòng-zài chéngxù de qiánmiàn shēngmíng PWM " +"yǐn jiǎo" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." @@ -1585,7 +1601,7 @@ msgstr "Xiǎnshì tài duō" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Total data to write is larger than outgoing_packet_length" -msgstr "" +msgstr "Yào xiě rù de zǒng shùjù dàyú outgoing_packet_length" #: py/obj.c msgid "Traceback (most recent call last):\n" @@ -1735,7 +1751,7 @@ msgstr "Viper hánshù mùqián bù zhīchí chāoguò 4 gè cānshù" #: ports/stm/common-hal/microcontroller/Processor.c msgid "Voltage read timed out" -msgstr "" +msgstr "Diànyā dòu qǔ chāoshí" #: main.c msgid "WARNING: Your code filename has two extensions\n" @@ -1743,23 +1759,24 @@ msgstr "Jǐnggào: Nǐ de dàimǎ wénjiàn míng yǒu liǎng gè kuòzhǎn mín #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" -msgstr "" +msgstr "Yīdàn jiāng móshì shèzhì wèi RESET, jiù wúfǎ chūshǐhuà WatchDog Timer" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer is not currently running" -msgstr "" +msgstr "WatchDogTimer dāngqián wèi yùnxíng" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" msgstr "" +"Yīdàn shèzhì wèi WatchDogMode.RESET, zé bùnéng gēnggǎi WatchDogTimer.Mode." #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.timeout must be greater than 0" -msgstr "" +msgstr "WatchDogTimer.Timeout bìxū dàyú 0" #: supervisor/shared/safe_mode.c msgid "Watchdog timer expired." -msgstr "" +msgstr "Kān mén gǒu dìngshí qì yǐ guòqí." #: py/builtinhelp.c #, c-format @@ -1793,9 +1810,8 @@ msgid "__init__() should return None" msgstr "__init__() fǎnhuí not" #: py/objtype.c -#, c-format -msgid "__init__() should return None, not '%s'" -msgstr "__Init__() yīnggāi fǎnhuí not, ér bùshì '%s'" +msgid "__init__() should return None, not '%q'" +msgstr "__Init __() yīnggāi fǎnhuí None, ér bùshì '%q'" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -1824,7 +1840,7 @@ msgstr "dìzhǐ wèi kōng" #: extmod/ulab/code/vector/vectorise.c msgid "arctan2 is implemented for scalars and ndarrays only" -msgstr "" +msgstr "arctan2 jǐn zhēnduì biāoliàng hé ndarray shíxiàn" #: py/modbuiltins.c msgid "arg is an empty sequence" @@ -1832,7 +1848,7 @@ msgstr "cānshù shì yīgè kōng de xùliè" #: extmod/ulab/code/numerical/numerical.c msgid "argsort argument must be an ndarray" -msgstr "" +msgstr "argsort cānshù bìxū shì ndarray" #: py/runtime.c msgid "argument has wrong type" @@ -1840,7 +1856,7 @@ msgstr "cānshù lèixíng cuòwù" #: extmod/ulab/code/linalg/linalg.c msgid "argument must be ndarray" -msgstr "" +msgstr "Cānshù bìxū shì ndarray" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c @@ -1853,7 +1869,7 @@ msgstr "cānshù yīnggāi shì '%q', 'bùshì '%q'" #: extmod/ulab/code/linalg/linalg.c msgid "arguments must be ndarrays" -msgstr "" +msgstr "cānshù bìxū shì ndarrays" #: py/objarray.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" @@ -1861,7 +1877,7 @@ msgstr "yòu cè xūyào shùzǔ/zì jié" #: extmod/ulab/code/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" -msgstr "" +msgstr "chángshì huòqǔ kōng xùliè de argmin/ argmax" #: py/objstr.c msgid "attributes not supported yet" @@ -1869,15 +1885,15 @@ msgstr "shǔxìng shàngwèi zhīchí" #: extmod/ulab/code/numerical/numerical.c msgid "axis must be -1, 0, None, or 1" -msgstr "" +msgstr "zhóu bìxū wèi-1,0, wú huò 1" #: extmod/ulab/code/numerical/numerical.c msgid "axis must be -1, 0, or 1" -msgstr "" +msgstr "zhóu bìxū wèi-1,0 huò 1" #: extmod/ulab/code/numerical/numerical.c msgid "axis must be None, 0, or 1" -msgstr "" +msgstr "zhóu bìxū wèi None,0 huò 1" #: py/builtinevex.c msgid "bad compile mode" @@ -1948,7 +1964,7 @@ msgstr "zì jié > 8 wèi" msgid "bytes value out of range" msgstr "zì jié zhí chāochū fànwéi" -#: ports/atmel-samd/bindings/samd/Clock.c +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c msgid "calibration is out of range" msgstr "jiàozhǔn fànwéi chāochū fànwéi" @@ -1980,48 +1996,18 @@ msgstr "wúfǎ tiānjiā tèshū fāngfǎ dào zi fēnlèi lèi" msgid "can't assign to expression" msgstr "bùnéng fēnpèi dào biǎodá shì" -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "wúfǎ zhuǎnhuàn%s dào fùzá" - -#: py/obj.c -#, c-format -msgid "can't convert %s to float" -msgstr "wúfǎ zhuǎnhuàn %s dào fú diǎn xíng biànliàng" - -#: py/obj.c -#, c-format -msgid "can't convert %s to int" -msgstr "wúfǎ zhuǎnhuàn%s dào int" +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "Wúfǎ jiāng %q zhuǎnhuàn wèi %q" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" msgstr "wúfǎ jiāng '%q' duìxiàng zhuǎnhuàn wèi %q yǐn hán" -#: py/objint.c -msgid "can't convert NaN to int" -msgstr "wúfǎ jiāng dǎoháng zhuǎnhuàn wèi int" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "can't convert address to int" -msgstr "wúfǎ jiāng dìzhǐ zhuǎnhuàn wèi int" - -#: py/objint.c -msgid "can't convert inf to int" -msgstr "bùnéng jiāng inf zhuǎnhuàn wèi int" - #: py/obj.c -msgid "can't convert to complex" -msgstr "bùnéng zhuǎnhuàn wèi fùzá" - -#: py/obj.c -msgid "can't convert to float" -msgstr "bùnéng zhuǎnhuàn wèi fú diǎn" - -#: py/obj.c -msgid "can't convert to int" -msgstr "bùnéng zhuǎnhuàn wèi int" +msgid "can't convert to %q" +msgstr "wúfǎ zhuǎnhuàn wèi %q" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2073,7 +2059,7 @@ msgstr "wúfǎ xiàng gānggāng qǐdòng de shēngchéng qì fāsòng fēi zhí #: shared-module/sdcardio/SDCard.c msgid "can't set 512 block size" -msgstr "" +msgstr "wúfǎ shèzhì 512 kuài dàxiǎo" #: py/objnamedtuple.c msgid "can't set attribute" @@ -2119,7 +2105,7 @@ msgstr "wúfǎ zhíxíng xiāngguān dǎorù" #: extmod/ulab/code/ndarray.c msgid "cannot reshape array (incompatible input/output shape)" -msgstr "" +msgstr "wúfǎ zhěngxíng shùzǔ (bù jiānróng de shūrù/shūchū xíngzhuàng)" #: py/emitnative.c msgid "casting" @@ -2139,7 +2125,7 @@ msgstr "chr() cān shǔ bùzài fànwéi (256)" #: shared-module/vectorio/Circle.c msgid "circle can only be registered in one parent" -msgstr "" +msgstr "quānzi zhǐ néng zài yī wèi jiāzhǎng zhōng zhùcè" #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" @@ -2186,39 +2172,39 @@ msgstr "zhuǎnhuàn wèi duìxiàng" #: extmod/ulab/code/filter/filter.c msgid "convolve arguments must be linear arrays" -msgstr "" +msgstr "juàn jī cānshù bìxū shì xiànxìng shùzǔ" #: extmod/ulab/code/filter/filter.c msgid "convolve arguments must be ndarrays" -msgstr "" +msgstr "juàn jī cānshù bìxū shì ndarrays" #: extmod/ulab/code/filter/filter.c msgid "convolve arguments must not be empty" -msgstr "" +msgstr "juàn jī cān shǔ bùnéng wéi kōng" #: extmod/ulab/code/ndarray.c msgid "could not broadast input array from shape" -msgstr "" +msgstr "wúfǎ guǎngbò xíngzhuàng de shūrù shùzǔ" #: extmod/ulab/code/poly/poly.c msgid "could not invert Vandermonde matrix" -msgstr "" +msgstr "wúfǎ fǎn zhuǎn fàndéméng dé jǔzhèn" #: shared-module/sdcardio/SDCard.c msgid "couldn't determine SD card version" -msgstr "" +msgstr "wúfǎ quèdìng SD kǎ bǎnběn" #: extmod/ulab/code/approx/approx.c msgid "data must be iterable" -msgstr "" +msgstr "shùjù bìxū shì kě diédài de" #: extmod/ulab/code/approx/approx.c msgid "data must be of equal length" -msgstr "" +msgstr "shùjù chángdù bìxū xiāngděng" #: extmod/ulab/code/numerical/numerical.c msgid "ddof must be smaller than length of data set" -msgstr "" +msgstr "ddof bìxū xiǎoyú shùjù jí de chángdù" #: py/parsenum.c msgid "decimal numbers not supported" @@ -2248,7 +2234,7 @@ msgstr "yǔfǎ gēngxīn xùliè de chángdù cuòwù" #: extmod/ulab/code/numerical/numerical.c msgid "diff argument must be an ndarray" -msgstr "" +msgstr "bùtóng de cānshù bìxū shì ndarray" #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c @@ -2322,23 +2308,23 @@ msgstr "gěi chūle éwài de wèizhì cānshù" #: py/parse.c msgid "f-string expression part cannot include a '#'" -msgstr "" +msgstr "f-string biǎodá shì bùfèn bùnéng bāohán '#'" #: py/parse.c msgid "f-string expression part cannot include a backslash" -msgstr "" +msgstr "f-string biǎodá shì bùfèn bùnéng bāohán fǎn xié gāng" #: py/parse.c msgid "f-string: empty expression not allowed" -msgstr "" +msgstr "f-string: bù yǔnxǔ shǐyòng kōng biǎodá shì" #: py/parse.c msgid "f-string: expecting '}'" -msgstr "" +msgstr "f-string: qídài '}'" #: py/parse.c msgid "f-string: single '}' is not allowed" -msgstr "" +msgstr "f-string: bù yǔnxǔ shǐyòng dāngè '}'" #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/displayio/OnDiskBitmap.c @@ -2351,19 +2337,19 @@ msgstr "wénjiàn xìtǒng bìxū tígōng guà zài fāngfǎ" #: extmod/ulab/code/vector/vectorise.c msgid "first argument must be a callable" -msgstr "" +msgstr "dì yī gè cānshù bìxū shì kě tiáo yòng de" #: extmod/ulab/code/approx/approx.c msgid "first argument must be a function" -msgstr "" +msgstr "dì yīgè cānshù bìxū shì yī gè hánshù" #: extmod/ulab/code/ndarray.c msgid "first argument must be an iterable" -msgstr "" +msgstr "dì yī gè cānshù bìxū shì kě diédài de" #: extmod/ulab/code/vector/vectorise.c msgid "first argument must be an ndarray" -msgstr "" +msgstr "dì yī gè cānshù bìxū shì ndarray" #: py/objtype.c msgid "first argument to super() must be type" @@ -2371,11 +2357,11 @@ msgstr "chāojí () de dì yī gè cānshù bìxū shì lèixíng" #: extmod/ulab/code/ndarray.c msgid "flattening order must be either 'C', or 'F'" -msgstr "" +msgstr "īnhé shùnxù bìxū wèi 'C' huò 'F'" #: extmod/ulab/code/numerical/numerical.c msgid "flip argument must be an ndarray" -msgstr "" +msgstr "fānzhuǎn shēn shù bìxū shì ndarray" #: py/objint.c msgid "float too big" @@ -2408,11 +2394,11 @@ msgstr "hánshù huòdé cānshù '%q' de duōchóng zhí" #: extmod/ulab/code/approx/approx.c msgid "function has the same sign at the ends of interval" -msgstr "" +msgstr "hánshù zài jiàngé mòwěi jùyǒu xiāngtóng de fúhào" #: extmod/ulab/code/compare/compare.c msgid "function is implemented for scalars and ndarrays only" -msgstr "" +msgstr "gāi hánshù jǐn zhēnduì biāoliàng hé ndarray shíxiàn" #: py/argcheck.c #, c-format @@ -2432,7 +2418,7 @@ msgstr "hánshù quēshǎo suǒ xū guānjiàn zì cānshù '%q'" msgid "function missing required positional argument #%d" msgstr "hánshù quēshǎo suǒ xū de wèizhì cānshù #%d" -#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" msgstr "hánshù xūyào %d gè wèizhì cānshù, dàn %d bèi gěi chū" @@ -2479,12 +2465,9 @@ msgstr "bù zhèngquè de tiánchōng" #: extmod/ulab/code/ndarray.c msgid "index is out of bounds" -msgstr "" +msgstr "suǒyǐn chāochū fànwéi" -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c +#: py/obj.c msgid "index out of range" msgstr "suǒyǐn chāochū fànwéi" @@ -2494,11 +2477,11 @@ msgstr "suǒyǐn bìxū shì zhěngshù" #: extmod/ulab/code/ndarray.c msgid "indices must be integers, slices, or Boolean lists" -msgstr "" +msgstr "suǒyǐn bìxū shì zhěngshù, qiēpiàn huò bù'ěr zhí lièbiǎo" #: extmod/ulab/code/approx/approx.c msgid "initial values must be iterable" -msgstr "" +msgstr "chūshǐ zhí bìxū shì kě diédài de" #: py/compile.c msgid "inline assembler must be a function" @@ -2506,35 +2489,35 @@ msgstr "nèi lián jíhé bìxū shì yīgè hánshù" #: extmod/ulab/code/ulab_create.c msgid "input argument must be an integer or a 2-tuple" -msgstr "" +msgstr "shūrù cānshù bìxū shì zhěngshù huò 2 yuán zǔ" #: extmod/ulab/code/fft/fft.c msgid "input array length must be power of 2" -msgstr "" +msgstr "shūrù shùzǔ de chángdù bìxū shì 2 de mì" #: extmod/ulab/code/poly/poly.c msgid "input data must be an iterable" -msgstr "" +msgstr "shūrù shùjù bìxū shì kě diédài de" #: extmod/ulab/code/linalg/linalg.c msgid "input matrix is asymmetric" -msgstr "" +msgstr "shūrù jǔzhèn bù duìchèn" #: extmod/ulab/code/linalg/linalg.c msgid "input matrix is singular" -msgstr "" +msgstr "shūrù jǔzhèn shì qíyì de" #: extmod/ulab/code/linalg/linalg.c msgid "input must be square matrix" -msgstr "" +msgstr "shūrù bìxū wèi fāng jǔzhèn" #: extmod/ulab/code/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" -msgstr "" +msgstr "shūrù bìxū shì yuán zǔ, lièbiǎo, fànwéi huò ndarray" #: extmod/ulab/code/poly/poly.c msgid "input vectors must be of equal length" -msgstr "" +msgstr "shūrù xiàngliàng de chángdù bìxū xiāngděng" #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" @@ -2546,7 +2529,7 @@ msgstr "xūyào zhěngshù" #: extmod/ulab/code/approx/approx.c msgid "interp is defined for 1D arrays of equal length" -msgstr "" +msgstr "interp shì wèi děng zhǎng de 1D shùzǔ dìngyì de" #: shared-bindings/_bleio/Adapter.c #, c-format @@ -2612,11 +2595,11 @@ msgstr "issubclass() cānshù 2 bìxū shì lèi de lèi huò yuán zǔ" #: extmod/ulab/code/ndarray.c msgid "iterables are not of the same length" -msgstr "" +msgstr "kě diédài xiàng de chángdù bùtóng" #: extmod/ulab/code/linalg/linalg.c msgid "iterations did not converge" -msgstr "" +msgstr "diédài méiyǒu shōuliǎn" #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" @@ -2669,7 +2652,7 @@ msgstr "cǐ bǎnběn bù zhīchí zhǎng zhěngshù" #: py/parse.c msgid "malformed f-string" -msgstr "" +msgstr "jīxíng de f-string" #: shared-bindings/_stage/Layer.c msgid "map buffer too small" @@ -2681,11 +2664,11 @@ msgstr "shùxué yù cuòwù" #: extmod/ulab/code/linalg/linalg.c msgid "matrix dimensions do not match" -msgstr "" +msgstr "jǔzhèn chǐcùn bù pǐpèi" #: extmod/ulab/code/linalg/linalg.c msgid "matrix is not positive definite" -msgstr "" +msgstr "jǔzhèn bùshì zhèngdìng de" #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c @@ -2712,7 +2695,7 @@ msgstr "zhǎo bù dào mókuài" #: extmod/ulab/code/poly/poly.c msgid "more degrees of freedom than data points" -msgstr "" +msgstr "bǐ shùjù diǎn gèng duō de zìyóu dù" #: py/compile.c msgid "multiple *x in assignment" @@ -2736,7 +2719,7 @@ msgstr "bìxū shǐyòng guānjiàn cí cānshù" #: extmod/ulab/code/numerical/numerical.c msgid "n must be between 0, and 9" -msgstr "" +msgstr "n bìxū jiè yú 0 dào 9 zhī jiān" #: py/runtime.c msgid "name '%q' is not defined" @@ -2770,7 +2753,7 @@ msgstr "fù zhuǎnyí jìshù" #: shared-module/sdcardio/SDCard.c msgid "no SD card" -msgstr "" +msgstr "méiyǒu SD kǎ" #: py/vm.c msgid "no active exception to reraise" @@ -2795,7 +2778,7 @@ 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 "" +msgstr "SD kǎ wú huíyīng" #: py/runtime.c msgid "no such attribute" @@ -2835,16 +2818,15 @@ msgstr "géshì zìfú chuàn cān shǔ bùzú" #: extmod/ulab/code/poly/poly.c msgid "number of arguments must be 2, or 3" -msgstr "" +msgstr "cānshù shùliàng bìxū wèi 2 huò 3" #: extmod/ulab/code/ulab_create.c msgid "number of points must be at least 2" -msgstr "" +msgstr "diǎnshù bìxū zhìshǎo wèi 2" #: py/obj.c -#, c-format -msgid "object '%s' is not a tuple or list" -msgstr "duìxiàng '%s' bùshì yuán zǔ huò lièbiǎo" +msgid "object '%q' is not a tuple or list" +msgstr "duìxiàng '%q' bùshì yuán zǔ huò lièbiǎo" #: py/obj.c msgid "object does not support item assignment" @@ -2879,9 +2861,8 @@ msgid "object not iterable" msgstr "duìxiàng bùnéng diédài" #: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "lèixíng '%s' de duìxiàng méiyǒu chángdù" +msgid "object of type '%q' has no len()" +msgstr "lèixíng '%q' de duìxiàng méiyǒu len()" #: py/obj.c msgid "object with buffer protocol required" @@ -2911,15 +2892,15 @@ msgstr "jǐn zhīchí bù zhǎng = 1(jí wú) de qiēpiàn" #: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c #: extmod/ulab/code/vector/vectorise.c msgid "operands could not be broadcast together" -msgstr "" +msgstr "cāozuò shǔ bùnéng yīqǐ guǎngbò" #: extmod/ulab/code/numerical/numerical.c msgid "operation is not implemented on ndarrays" -msgstr "" +msgstr "cāozuò wèi zài ndarrays shàng shíxiàn" #: extmod/ulab/code/ndarray.c msgid "operation is not supported for given type" -msgstr "" +msgstr "gěi dìng lèixíng bù zhīchí gāi cāozuò" #: py/modbuiltins.c msgid "ord expects a character" @@ -2968,26 +2949,15 @@ msgstr "pixel_shader bìxū shì displayio.Palette huò displayio.ColorConverter #: shared-module/vectorio/Polygon.c msgid "polygon can only be registered in one parent" -msgstr "" +msgstr "duōbiānxíng zhī néng zài yīgè fù jí zhōng zhùcè" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "cóng kōng de PulseIn dànchū dànchū" - -#: py/objset.c -msgid "pop from an empty set" -msgstr "cóng kōng jí dànchū" - -#: py/objlist.c -msgid "pop from empty list" -msgstr "cóng kōng lièbiǎo zhòng dànchū" - -#: py/objdict.c -msgid "popitem(): dictionary is empty" -msgstr "dànchū xiàngmù (): Zìdiǎn wèi kōng" +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "cóng kōng %q dànchū" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3003,11 +2973,11 @@ msgstr "duìliè yìchū" #: py/parse.c msgid "raw f-strings are not implemented" -msgstr "" +msgstr "wèi zhíxíng yuánshǐ f-strings" #: extmod/ulab/code/fft/fft.c msgid "real and imaginary parts must be of equal length" -msgstr "" +msgstr "shí bù hé xū bù bìxū děng zhǎng" #: py/builtinimport.c msgid "relative import" @@ -3029,16 +2999,16 @@ msgstr "fǎnhuí yùqí de '%q' dàn huòdéle '%q'" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" -msgstr "" +msgstr "rgb_pins[%d] fùzhì lìng yīgè yǐn jiǎo fēnpèi" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" -msgstr "" +msgstr "rgb_pins[%d] yǔ shízhōng bùzài tóng yīgè duānkǒu shàng" #: extmod/ulab/code/ndarray.c msgid "right hand side must be an ndarray, or a scalar" -msgstr "" +msgstr "yòubiān bìxū shì ndarray huò biāoliàng" #: py/objstr.c msgid "rsplit(None,n)" @@ -3066,7 +3036,7 @@ msgstr "bù zhīchí jiǎoběn biānyì" #: extmod/ulab/code/ndarray.c msgid "shape must be a 2-tuple" -msgstr "" +msgstr "xíngzhuàng bìxū shì 2 yuán zǔ" #: py/objstr.c msgid "sign not allowed in string format specifier" @@ -3082,7 +3052,7 @@ msgstr "zài géshì zìfú chuàn zhōng yù dào de dāngè '}'" #: extmod/ulab/code/linalg/linalg.c msgid "size is defined for ndarrays only" -msgstr "" +msgstr "dàxiǎo jǐn wèi ndarrays dìngyì" #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" @@ -3090,7 +3060,7 @@ msgstr "shuìmián chángdù bìxū shìfēi fùshù" #: extmod/ulab/code/ndarray.c msgid "slice step can't be zero" -msgstr "" +msgstr "qiēpiàn bù cháng bùnéng wéi líng" #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" @@ -3106,19 +3076,19 @@ msgstr "ruǎn chóngqǐ\n" #: extmod/ulab/code/numerical/numerical.c msgid "sort argument must be an ndarray" -msgstr "" +msgstr "páixù cānshù bìxū shì ndarray" #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" -msgstr "" +msgstr "sos shùzǔ de xíngzhuàng bìxū wèi (n_section, 6)" #: extmod/ulab/code/filter/filter.c msgid "sos[:, 3] should be all ones" -msgstr "" +msgstr "sos [:, 3] yīnggāi quán shì" #: extmod/ulab/code/filter/filter.c msgid "sosfilt requires iterable arguments" -msgstr "" +msgstr "sosfilt xūyào diédài cānshù" #: py/objstr.c msgid "start/end indices" @@ -3145,13 +3115,8 @@ msgid "stream operation not supported" msgstr "bù zhīchí liú cāozuò" #: py/objstrunicode.c -msgid "string index out of range" -msgstr "zìfú chuàn suǒyǐn chāochū fànwéi" - -#: py/objstrunicode.c -#, c-format -msgid "string indices must be integers, not %s" -msgstr "zìfú chuàn zhǐshù bìxū shì zhěngshù, ér bùshì %s" +msgid "string indices must be integers, not %q" +msgstr "zìfú chuàn suǒyǐn bìxū shì zhěngshù, ér bùshì %q" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3161,10 +3126,6 @@ msgstr "zìfú chuàn bù zhīchí; shǐyòng zì jié huò zì jié zǔ" msgid "struct: cannot index" msgstr "jiégòu: bùnéng suǒyǐn" -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "jiégòu: suǒyǐn chāochū fànwéi" - #: extmod/moductypes.c msgid "struct: no fields" msgstr "jiégòu: méiyǒu zìduàn" @@ -3195,7 +3156,7 @@ msgstr "time.struct_time() xūyào 9 xùliè" #: ports/nrf/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" -msgstr "" +msgstr "chāoshí shíjiān chāoguò zuìdà zhīchí zhí" #: shared-bindings/busio/UART.c msgid "timeout must be 0.0-100.0 seconds" @@ -3207,11 +3168,11 @@ msgstr "chāoshí bìxū shì >= 0.0" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v1 card" -msgstr "" +msgstr "děngdài v1 kǎ chāoshí" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v2 card" -msgstr "" +msgstr "děngdài v2 kǎ chāoshí" #: shared-bindings/time/__init__.c msgid "timestamp out of range for platform time_t" @@ -3223,7 +3184,7 @@ msgstr "tígōng jǐ dìng géshì de cānshù tài duō" #: extmod/ulab/code/ndarray.c msgid "too many indices" -msgstr "" +msgstr "suǒyǐn tài duō" #: py/runtime.c #, c-format @@ -3232,9 +3193,9 @@ msgstr "dǎkāi tài duō zhí (yùqí %d)" #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" -msgstr "" +msgstr "Trapz shì wèi děng zhǎng de 1D shùzǔ dìngyì de" -#: extmod/ulab/code/linalg/linalg.c py/objstr.c +#: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" msgstr "yuán zǔ suǒyǐn chāochū fànwéi" @@ -3242,10 +3203,6 @@ msgstr "yuán zǔ suǒyǐn chāochū fànwéi" msgid "tuple/list has wrong length" msgstr "yuán zǔ/lièbiǎo chángdù cuòwù" -#: shared-bindings/_pixelbuf/PixelBuf.c -msgid "tuple/list required on RHS" -msgstr "RHS yāoqiú de yuán zǔ/lièbiǎo" - #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c msgid "tx and rx cannot both be None" @@ -3301,9 +3258,8 @@ msgid "unknown conversion specifier %c" msgstr "wèizhī de zhuǎnhuàn biāozhù %c" #: py/objstr.c -#, fuzzy, c-format -msgid "unknown format code '%c' for object of type '%s'" -msgstr "lèixíng '%s' duìxiàng wèizhī de géshì dàimǎ '%c'" +msgid "unknown format code '%c' for object of type '%q'" +msgstr "lèixíng '%q' de duìxiàng de wèizhī géshì dàimǎ '%c'" #: py/compile.c msgid "unknown type" @@ -3342,16 +3298,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d" msgstr "bù zhīchí de géshì zìfú '%c' (0x%x) suǒyǐn %d" #: py/runtime.c -msgid "unsupported type for %q: '%s'" -msgstr "bù zhīchí de lèixíng %q: '%s'" +msgid "unsupported type for %q: '%q'" +msgstr "%q de bù shòu zhīchí de lèixíng: '%q'" #: py/runtime.c msgid "unsupported type for operator" msgstr "bù zhīchí de cāozuò zhě lèixíng" #: py/runtime.c -msgid "unsupported types for %q: '%s', '%s'" -msgstr "bù zhīchí de lèixíng wèi %q: '%s', '%s'" +msgid "unsupported types for %q: '%q', '%q'" +msgstr "%q bù zhīchí de lèixíng: '%q', '%q'" #: py/objint.c #, c-format @@ -3364,11 +3320,11 @@ msgstr "zhí jìshù bìxū wèi > 0" #: extmod/ulab/code/linalg/linalg.c msgid "vectors must have same lengths" -msgstr "" +msgstr "xiàngliàng bìxū jùyǒu xiāngtóng de chángdù" #: shared-bindings/watchdog/WatchDogTimer.c msgid "watchdog timeout must be greater than 0" -msgstr "" +msgstr "kān mén gǒu chāoshí bìxū dàyú 0" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" @@ -3376,15 +3332,15 @@ msgstr "Chuāngkǒu bìxū shì <= jiàngé" #: extmod/ulab/code/linalg/linalg.c msgid "wrong argument type" -msgstr "" +msgstr "cuòwù de cānshù lèixíng" #: extmod/ulab/code/ndarray.c msgid "wrong index type" -msgstr "" +msgstr "cuòwù de suǒyǐn lèixíng" #: extmod/ulab/code/vector/vectorise.c msgid "wrong input type" -msgstr "" +msgstr "shūrù lèixíng cuòwù" #: extmod/ulab/code/ulab_create.c py/objstr.c msgid "wrong number of arguments" @@ -3396,11 +3352,11 @@ msgstr "wúfǎ jiě bāo de zhí shù" #: extmod/ulab/code/ndarray.c msgid "wrong operand type" -msgstr "" +msgstr "cuòwù de cāozuò shù lèixíng" #: extmod/ulab/code/vector/vectorise.c msgid "wrong output type" -msgstr "" +msgstr "cuòwù de shūchū lèixíng" #: shared-module/displayio/Shape.c msgid "x value out of bounds" @@ -3420,15 +3376,130 @@ msgstr "líng bù" #: extmod/ulab/code/filter/filter.c msgid "zi must be an ndarray" -msgstr "" +msgstr "zi bìxū shì ndarray" #: extmod/ulab/code/filter/filter.c msgid "zi must be of float type" -msgstr "" +msgstr "zi bìxū wèi fú diǎn xíng" #: extmod/ulab/code/filter/filter.c msgid "zi must be of shape (n_section, 2)" -msgstr "" +msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" + +#~ msgid "tuple/list required on RHS" +#~ msgstr "RHS yāoqiú de yuán zǔ/lièbiǎo" + +#~ msgid "%q indices must be integers, not %s" +#~ msgstr "%q suǒyǐn bìxū shì zhěngshù, ér bùshì %s" + +#~ msgid "'%s' object does not support '%q'" +#~ msgstr "'%s' duì xiàng bù zhīchí '%q'" + +#~ msgid "'%s' object does not support item assignment" +#~ msgstr "'%s' duìxiàng bù zhīchí xiàngmù fēnpèi" + +#~ msgid "'%s' object does not support item deletion" +#~ msgstr "'%s' duìxiàng bù zhīchí shānchú xiàngmù" + +#~ msgid "'%s' object has no attribute '%q'" +#~ msgstr "'%s' duìxiàng méiyǒu shǔxìng '%q'" + +#~ msgid "'%s' object is not an iterator" +#~ msgstr "'%s' duìxiàng bùshì yīgè diédài qì" + +#~ msgid "'%s' object is not callable" +#~ msgstr "'%s' duìxiàng wúfǎ diàoyòng" + +#~ msgid "'%s' object is not iterable" +#~ msgstr "'%s' duìxiàng bùnéng diédài" + +#~ msgid "'%s' object is not subscriptable" +#~ msgstr "'%s' duìxiàng bùnéng fēnshù" + +#~ msgid "Invalid I2C pin selection" +#~ msgstr "Wúxiào de I2C yǐn jiǎo xuǎnzé" + +#~ msgid "Invalid SPI pin selection" +#~ msgstr "Wúxiào de SPI yǐn jiǎo xuǎnzé" + +#~ msgid "Invalid UART pin selection" +#~ msgstr "Wúxiào de UART yǐn jiǎo xuǎnzé" + +#~ msgid "Pop from an empty Ps2 buffer" +#~ msgstr "Cóng kōng de Ps2 huǎnchōng qū dànchū" + +#~ msgid "Running in safe mode! Auto-reload is off.\n" +#~ msgstr "Zài ānquán móshì xià yùnxíng! Zìdòng chóngxīn jiāzài yǐ guānbì.\n" + +#~ msgid "Running in safe mode! Not running saved code.\n" +#~ msgstr "Zài ānquán móshì xià yùnxíng! Bù yùnxíng yǐ bǎocún de dàimǎ.\n" + +#~ msgid "__init__() should return None, not '%s'" +#~ msgstr "__Init__() yīnggāi fǎnhuí not, ér bùshì '%s'" + +#~ msgid "can't convert %s to complex" +#~ msgstr "wúfǎ zhuǎnhuàn%s dào fùzá" + +#~ msgid "can't convert %s to float" +#~ msgstr "wúfǎ zhuǎnhuàn %s dào fú diǎn xíng biànliàng" + +#~ msgid "can't convert %s to int" +#~ msgstr "wúfǎ zhuǎnhuàn%s dào int" + +#~ msgid "can't convert NaN to int" +#~ msgstr "wúfǎ jiāng dǎoháng zhuǎnhuàn wèi int" + +#~ msgid "can't convert address to int" +#~ msgstr "wúfǎ jiāng dìzhǐ zhuǎnhuàn wèi int" + +#~ msgid "can't convert inf to int" +#~ msgstr "bùnéng jiāng inf zhuǎnhuàn wèi int" + +#~ msgid "can't convert to complex" +#~ msgstr "bùnéng zhuǎnhuàn wèi fùzá" + +#~ msgid "can't convert to float" +#~ msgstr "bùnéng zhuǎnhuàn wèi fú diǎn" + +#~ msgid "can't convert to int" +#~ msgstr "bùnéng zhuǎnhuàn wèi int" + +#~ msgid "object '%s' is not a tuple or list" +#~ msgstr "duìxiàng '%s' bùshì yuán zǔ huò lièbiǎo" + +#~ msgid "object of type '%s' has no len()" +#~ msgstr "lèixíng '%s' de duìxiàng méiyǒu chángdù" + +#~ msgid "pop from an empty PulseIn" +#~ msgstr "cóng kōng de PulseIn dànchū dànchū" + +#~ msgid "pop from an empty set" +#~ msgstr "cóng kōng jí dànchū" + +#~ msgid "pop from empty list" +#~ msgstr "cóng kōng lièbiǎo zhòng dànchū" + +#~ msgid "popitem(): dictionary is empty" +#~ msgstr "dànchū xiàngmù (): Zìdiǎn wèi kōng" + +#~ msgid "string index out of range" +#~ msgstr "zìfú chuàn suǒyǐn chāochū fànwéi" + +#~ msgid "string indices must be integers, not %s" +#~ msgstr "zìfú chuàn zhǐshù bìxū shì zhěngshù, ér bùshì %s" + +#~ msgid "struct: index out of range" +#~ msgstr "jiégòu: suǒyǐn chāochū fànwéi" + +#, fuzzy +#~ msgid "unknown format code '%c' for object of type '%s'" +#~ msgstr "lèixíng '%s' duìxiàng wèizhī de géshì dàimǎ '%c'" + +#~ msgid "unsupported type for %q: '%s'" +#~ msgstr "bù zhīchí de lèixíng %q: '%s'" + +#~ msgid "unsupported types for %q: '%s', '%s'" +#~ msgstr "bù zhīchí de lèixíng wèi %q: '%s', '%s'" #~ msgid "Address is not %d bytes long or is in wrong format" #~ msgstr "Dìzhǐ bùshì %d zì jié zhǎng, huòzhě géshì cuòwù" diff --git a/main.c b/main.c index 8c5c9ac37d..fb73b09b1f 100755 --- a/main.c +++ b/main.c @@ -181,7 +181,7 @@ void stop_mp(void) { // Look for the first file that exists in the list of filenames, using mp_import_stat(). // Return its index. If no file found, return -1. -const char* first_existing_file_in_list(const char ** filenames) { +const char* first_existing_file_in_list(const char * const * filenames) { for (int i = 0; filenames[i] != (char*)""; i++) { mp_import_stat_t stat = mp_import_stat(filenames[i]); if (stat == MP_IMPORT_STAT_FILE) { @@ -191,7 +191,7 @@ const char* first_existing_file_in_list(const char ** filenames) { return NULL; } -bool maybe_run_list(const char ** filenames, pyexec_result_t* exec_result) { +bool maybe_run_list(const char * const * filenames, pyexec_result_t* exec_result) { const char* filename = first_existing_file_in_list(filenames); if (filename == NULL) { return false; @@ -234,7 +234,8 @@ bool run_code_py(safe_mode_t safe_mode) { if (autoreload_is_enabled()) { serial_write_compressed(translate("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n")); } else if (safe_mode != NO_SAFE_MODE) { - serial_write_compressed(translate("Running in safe mode! Auto-reload is off.\n")); + serial_write_compressed(translate("Running in safe mode! ")); + serial_write_compressed(translate("Auto-reload is off.\n")); } else if (!autoreload_is_enabled()) { serial_write_compressed(translate("Auto-reload is off.\n")); } @@ -250,25 +251,30 @@ bool run_code_py(safe_mode_t safe_mode) { bool found_main = false; if (safe_mode != NO_SAFE_MODE) { - serial_write_compressed(translate("Running in safe mode! Not running saved code.\n")); + serial_write_compressed(translate("Running in safe mode! ")); + serial_write_compressed(translate("Not running saved code.\n")); } else { new_status_color(MAIN_RUNNING); - static const char *supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt"); - static const char *double_extension_filenames[] = STRING_LIST("code.txt.py", "code.py.txt", "code.txt.txt","code.py.py", + static const char * const supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt"); + #if CIRCUITPY_FULL_BUILD + static const char * const double_extension_filenames[] = STRING_LIST("code.txt.py", "code.py.txt", "code.txt.txt","code.py.py", "main.txt.py", "main.py.txt", "main.txt.txt","main.py.py"); + #endif stack_resize(); filesystem_flush(); supervisor_allocation* heap = allocate_remaining_memory(); start_mp(heap); found_main = maybe_run_list(supported_filenames, &result); + #if CIRCUITPY_FULL_BUILD if (!found_main){ found_main = maybe_run_list(double_extension_filenames, &result); if (found_main) { serial_write_compressed(translate("WARNING: Your code filename has two extensions\n")); } } + #endif cleanup_after_vm(heap); if (result.return_code & PYEXEC_FORCED_EXIT) { @@ -276,7 +282,7 @@ bool run_code_py(safe_mode_t safe_mode) { } } - // Wait for connection or character. + // Display a different completion message if the user has no USB attached (cannot save files) if (!serial_connected_at_start) { serial_write_compressed(translate("\nCode done running. Waiting for reload.\n")); } @@ -337,7 +343,7 @@ void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { // If not in safe mode, run boot before initing USB and capture output in a // file. if (filesystem_present() && safe_mode == NO_SAFE_MODE && MP_STATE_VM(vfs_mount_table) != NULL) { - static const char *boot_py_filenames[] = STRING_LIST("settings.txt", "settings.py", "boot.py", "boot.txt"); + static const char * const boot_py_filenames[] = STRING_LIST("settings.txt", "settings.py", "boot.py", "boot.txt"); new_status_color(BOOT_RUNNING); diff --git a/mpy-cross/Makefile.static-raspbian b/mpy-cross/Makefile.static-raspbian index f895f998b5..8fe78b0aff 100644 --- a/mpy-cross/Makefile.static-raspbian +++ b/mpy-cross/Makefile.static-raspbian @@ -6,7 +6,6 @@ PROG=mpy-cross.static-raspbian BUILD=build-static-raspbian STATIC_BUILD=1 +$(shell if ! [ -d pitools ]; then echo 1>&2 "Fetching pi build tools. This may take awhile."; git clone -q https://github.com/raspberrypi/tools.git --depth=1 pitools; fi) CROSS_COMPILE = pitools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- include mpy-cross.mk - -$(shell [ -d pitools ] || git clone --progress --verbose https://github.com/raspberrypi/tools.git --depth=1 pitools) diff --git a/mpy-cross/mpy-cross.mk b/mpy-cross/mpy-cross.mk index c813dae9eb..b4c8e34a2e 100644 --- a/mpy-cross/mpy-cross.mk +++ b/mpy-cross/mpy-cross.mk @@ -82,4 +82,6 @@ endif OBJ = $(PY_O) OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) +$(BUILD)/supervisor/shared/translate.o: $(HEADER_BUILD)/qstrdefs.generated.h + include $(TOP)/py/mkrules.mk diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 25ab2c4aa7..65542354e6 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -361,7 +361,7 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o)) SRC_QSTR += $(HEADER_BUILD)/sdiodata.h -$(HEADER_BUILD)/sdiodata.h: $(TOP)/tools/mksdiodata.py | $(HEADER_BUILD) +$(HEADER_BUILD)/sdiodata.h: tools/mksdiodata.py | $(HEADER_BUILD) $(Q)$(PYTHON3) $< > $@ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) diff --git a/ports/atmel-samd/boards/bdmicro_vina_m0/mpconfigboard.mk b/ports/atmel-samd/boards/bdmicro_vina_m0/mpconfigboard.mk index a36966b87c..b7ad47ff2c 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/bdmicro_vina_m0/mpconfigboard.mk @@ -15,5 +15,5 @@ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 -CFLAGS_INLINE_LIMIT = 60 +CFLAGS_INLINE_LIMIT = 50 SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk index 619b7d6944..5656d4cb86 100755 --- a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk @@ -16,3 +16,20 @@ CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 + +SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk index 863b97d315..3a43093a98 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk @@ -13,9 +13,11 @@ EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" # Turn off features and optimizations for Crickit build to make room for additional frozen libs. LONGINT_IMPL = NONE CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_PIXELBUF = 0 +CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 # So not all of displayio, sorry! CIRCUITPY_VECTORIO = 0 @@ -29,3 +31,18 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 15 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk index cec87f2bf9..dc02e1f60d 100644 --- a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk @@ -13,8 +13,24 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk index de79638bd3..512bc533ce 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk @@ -10,4 +10,22 @@ INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 + +# A number of modules are removed for RFM9x to make room for frozen libraries. +# Many I/O functions are not available. +CIRCUITPY_ANALOGIO = 0 +CIRCUITPY_PULSEIO = 0 +CIRCUITPY_NEOPIXEL_WRITE = 1 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_SAMD = 0 +CIRCUITPY_USB_MIDI = 0 +CIRCUITPY_USB_HID = 0 +CIRCUITPY_TOUCHIO = 0 +CFLAGS_INLINE_LIMIT = 35 +# Make more room. SUPEROPT_GC = 0 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM9x diff --git a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk index 8bd4b818df..6f7f2d8b67 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk @@ -13,9 +13,25 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 # supersized, not ultra-supersized CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk index e9d94638af..754594f346 100755 --- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk @@ -15,6 +15,25 @@ LONGINT_IMPL = MPZ CIRCUITPY_AUDIOBUSIO = 0 # No DAC on SAMR21G CIRCUITPY_AUDIOIO = 0 +CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_I2CPERIPHERAL = 0 -# Too much flash for Korean translations -CIRCUITPY_VECTORIO = 0 +SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk index 15c5ad817c..1931ceb9a8 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk @@ -9,11 +9,12 @@ CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" -LONGINT_IMPL = MPZ +LONGINT_IMPL = NONE # To keep the build small CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 @@ -29,3 +30,18 @@ SUPEROPT_GC = 0 FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk index 09420ed3da..0c0d6053e4 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk @@ -13,7 +13,10 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANG_APA102 = 1 +CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 +CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_RTC = 0 @@ -22,3 +25,18 @@ CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk index e3948565d1..7dd9650003 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk @@ -12,8 +12,24 @@ EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/picoplanet/board.c b/ports/atmel-samd/boards/picoplanet/board.c new file mode 100644 index 0000000000..d7e856d611 --- /dev/null +++ b/ports/atmel-samd/boards/picoplanet/board.c @@ -0,0 +1,37 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * 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 "boards/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/picoplanet/mpconfigboard.h b/ports/atmel-samd/boards/picoplanet/mpconfigboard.h new file mode 100644 index 0000000000..61430e06c2 --- /dev/null +++ b/ports/atmel-samd/boards/picoplanet/mpconfigboard.h @@ -0,0 +1,42 @@ +#define MICROPY_HW_BOARD_NAME "PicoPlanet" +#define MICROPY_HW_MCU_NAME "samd21e18" + +#define MICROPY_PORT_A (PORT_PA00 | PORT_PA01) +#define MICROPY_PORT_B (0) +#define MICROPY_PORT_C (0) + +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 +#define IGNORE_PIN_PA10 1 +#define IGNORE_PIN_PA11 1 +#define IGNORE_PIN_PA12 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA15 1 +#define IGNORE_PIN_PA18 1 +#define IGNORE_PIN_PA19 1 +#define IGNORE_PIN_PA20 1 +#define IGNORE_PIN_PA21 1 +#define IGNORE_PIN_PA22 1 +#define IGNORE_PIN_PA23 1 +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 +#define IGNORE_PIN_PA27 1 +#define IGNORE_PIN_PA28 1 +#define IGNORE_PIN_PA31 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_PA09) +#define DEFAULT_I2C_BUS_SDA (&pin_PA08) + +#define DEFAULT_SPI_BUS_MISO (&pin_PA30) +#define DEFAULT_SPI_BUS_SCK (&pin_PA17) +#define DEFAULT_SPI_BUS_MOSI (&pin_PA16) + +//#define CP_RGB_STATUS_R (&pin_PA06) +//#define CP_RGB_STATUS_G (&pin_PA05) +//#define CP_RGB_STATUS_B (&pin_PA07) +//#define CP_RGB_STATUS_INVERTED_PWM +//#define CP_RGB_STATUS_LED + +#define MICROPY_HW_LED_STATUS (&pin_PA06) diff --git a/ports/atmel-samd/boards/picoplanet/mpconfigboard.mk b/ports/atmel-samd/boards/picoplanet/mpconfigboard.mk new file mode 100644 index 0000000000..da97b90cc2 --- /dev/null +++ b/ports/atmel-samd/boards/picoplanet/mpconfigboard.mk @@ -0,0 +1,24 @@ +USB_VID = 0x239A +USB_PID = 0x80C2 +USB_PRODUCT = "PicoPlanet" +USB_MANUFACTURER = "bleeptrack" + +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE +CIRCUITPY_FULL_BUILD = 0 + +SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/picoplanet/pins.c b/ports/atmel-samd/boards/picoplanet/pins.c new file mode 100644 index 0000000000..4c9b11e3d5 --- /dev/null +++ b/ports/atmel-samd/boards/picoplanet/pins.c @@ -0,0 +1,32 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) }, + + { MP_ROM_QSTR(MP_QSTR_D5),MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_D6),MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_D7),MP_ROM_PTR(&pin_PA07) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) }, + + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) }, + + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, + + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA30) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA30) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) } +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/serpente/mpconfigboard.mk b/ports/atmel-samd/boards/serpente/mpconfigboard.mk index a5adb17a1e..6e953adf72 100644 --- a/ports/atmel-samd/boards/serpente/mpconfigboard.mk +++ b/ports/atmel-samd/boards/serpente/mpconfigboard.mk @@ -14,3 +14,20 @@ LONGINT_IMPL = NONE CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_GAMEPAD = 0 + +SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk index eae50d70bf..e0262b6b22 100644 --- a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk +++ b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk @@ -17,4 +17,20 @@ CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 + SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk index c17600fc75..5170f8a233 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk @@ -12,8 +12,25 @@ EXTERNAL_FLASH_DEVICES = "W25Q32FV" LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 +CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk index 6f3febfe56..68031e4a18 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk @@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANG_APA102 = 1 +CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANGIO = 0 CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 @@ -22,3 +23,18 @@ CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk index 9e0621810c..402db7ebc0 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk @@ -11,6 +11,7 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q32BV LONGINT_IMPL = MPZ +CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANGIO = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_RTC = 0 @@ -18,3 +19,18 @@ CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/common-hal/pulseio/PulseIn.c b/ports/atmel-samd/common-hal/pulseio/PulseIn.c index ae58b089de..d3d9936725 100644 --- a/ports/atmel-samd/common-hal/pulseio/PulseIn.c +++ b/ports/atmel-samd/common-hal/pulseio/PulseIn.c @@ -298,7 +298,7 @@ void common_hal_pulseio_pulsein_clear(pulseio_pulsein_obj_t* self) { uint16_t common_hal_pulseio_pulsein_popleft(pulseio_pulsein_obj_t* self) { if (self->len == 0) { - mp_raise_IndexError(translate("pop from an empty PulseIn")); + mp_raise_IndexError_varg(translate("pop from empty %q"), MP_QSTR_PulseIn); } common_hal_mcu_disable_interrupts(); uint16_t value = self->buffer[self->start]; @@ -330,7 +330,7 @@ uint16_t common_hal_pulseio_pulsein_get_item(pulseio_pulsein_obj_t* self, } if (index < 0 || index >= self->len) { common_hal_mcu_enable_interrupts(); - mp_raise_IndexError(translate("index out of range")); + mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_PulseIn); } uint16_t value = self->buffer[(self->start + index) % self->maxlen]; common_hal_mcu_enable_interrupts(); diff --git a/ports/atmel-samd/common-hal/rtc/RTC.c b/ports/atmel-samd/common-hal/rtc/RTC.c index 203187b4ff..3473165db2 100644 --- a/ports/atmel-samd/common-hal/rtc/RTC.c +++ b/ports/atmel-samd/common-hal/rtc/RTC.c @@ -68,7 +68,11 @@ int common_hal_rtc_get_calibration(void) { void common_hal_rtc_set_calibration(int calibration) { if (calibration > 127 || calibration < -127) { +#if CIRCUITPY_FULL_BUILD mp_raise_ValueError(translate("calibration value out of range +/-127")); +#else + mp_raise_ValueError(translate("calibration is out of range")); +#endif } hri_rtcmode0_write_FREQCORR_SIGN_bit(RTC, calibration < 0 ? 0 : 1); diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index e4cf9ca833..3fecf867e0 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -39,11 +39,24 @@ endif CIRCUITPY_SDCARDIO ?= 0 +# Not enough RAM for framebuffers +CIRCUITPY_FRAMEBUFFERIO ?= 0 + # SAMD21 needs separate endpoint pairs for MSC BULK IN and BULK OUT, otherwise it's erratic. USB_MSC_EP_NUM_OUT = 1 CIRCUITPY_ULAB = 0 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CIRCUITPY_TERMINALIO = 0 +endif + +ifeq ($(TRANSLATION), ko) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CIRCUITPY_TERMINALIO = 0 +endif + endif # samd21 # Put samd51-only choices here. diff --git a/tools/mksdiodata.py b/ports/atmel-samd/tools/mksdiodata.py similarity index 100% rename from tools/mksdiodata.py rename to ports/atmel-samd/tools/mksdiodata.py diff --git a/ports/cxd56/common-hal/pulseio/PulseIn.c b/ports/cxd56/common-hal/pulseio/PulseIn.c index 221fa5b6eb..7c3e4a9d05 100644 --- a/ports/cxd56/common-hal/pulseio/PulseIn.c +++ b/ports/cxd56/common-hal/pulseio/PulseIn.c @@ -160,7 +160,7 @@ void common_hal_pulseio_pulsein_clear(pulseio_pulsein_obj_t *self) { uint16_t common_hal_pulseio_pulsein_popleft(pulseio_pulsein_obj_t *self) { if (self->len == 0) { - mp_raise_IndexError(translate("pop from an empty PulseIn")); + mp_raise_IndexError_varg(translate("pop from empty %q"), MP_QSTR_PulseIn); } common_hal_mcu_disable_interrupts(); uint16_t value = self->buffer[self->start]; @@ -190,7 +190,7 @@ uint16_t common_hal_pulseio_pulsein_get_item(pulseio_pulsein_obj_t *self, int16_ } if (index < 0 || index >= self->len) { common_hal_mcu_enable_interrupts(); - mp_raise_IndexError(translate("index out of range")); + mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_PulseIn); } uint16_t value = self->buffer[(self->start + index) % self->maxlen]; common_hal_mcu_enable_interrupts(); diff --git a/ports/esp32s2/Makefile b/ports/esp32s2/Makefile index 55db73604c..19b89a13a1 100644 --- a/ports/esp32s2/Makefile +++ b/ports/esp32s2/Makefile @@ -171,6 +171,7 @@ SRC_C += \ lib/utils/stdout_helpers.c \ lib/utils/sys_stdio_mphal.c \ peripherals/pins.c \ + peripherals/rmt.c \ supervisor/shared/memory.c ifneq ($(USB),FALSE) diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h b/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h index 78652e215b..a94f10ea49 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h +++ b/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -29,4 +29,6 @@ #define MICROPY_HW_BOARD_NAME "Saola 1 w/Wroom" #define MICROPY_HW_MCU_NAME "ESP32S2" +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + #define AUTORESET_DELAY_MS 500 diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk b/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk index 6e76272659..9c9ca61694 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk +++ b/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk @@ -10,8 +10,6 @@ LONGINT_IMPL = MPZ # so increase it to 32. CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 -CIRCUITPY_NEOPIXEL_WRITE = 0 - CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=4MB diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c b/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c index 1d4e2c4eba..0562d9331f 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c +++ b/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c @@ -42,5 +42,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h index 7d08ccf7f1..338186dc52 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h @@ -29,4 +29,6 @@ #define MICROPY_HW_BOARD_NAME "Saola 1 w/Wrover" #define MICROPY_HW_MCU_NAME "ESP32S2" +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + #define AUTORESET_DELAY_MS 500 diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk index 1437df7f4b..d5ff1c5ac8 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk @@ -10,8 +10,6 @@ LONGINT_IMPL = MPZ # so increase it to 32. CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 -CIRCUITPY_NEOPIXEL_WRITE = 0 - CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=4MB diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c b/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c index 1d4e2c4eba..0562d9331f 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c @@ -42,5 +42,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk b/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk index ea3484d2fa..294736d17c 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "FeatherS2" USB_MANUFACTURER = "UnexpectedMaker" USB_DEVICES = "CDC,MSC,HID" - INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = MPZ @@ -12,8 +11,6 @@ LONGINT_IMPL = MPZ # so increase it to 32. CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 -CIRCUITPY_NEOPIXEL_WRITE = 0 - CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=16MB diff --git a/ports/esp32s2/common-hal/microcontroller/Pin.c b/ports/esp32s2/common-hal/microcontroller/Pin.c index 5a059f0bbc..03a83cfe67 100644 --- a/ports/esp32s2/common-hal/microcontroller/Pin.c +++ b/ports/esp32s2/common-hal/microcontroller/Pin.c @@ -26,12 +26,18 @@ */ #include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/digitalio/DigitalInOut.h" +#include "supervisor/shared/rgb_led_status.h" #include "py/mphal.h" #include "esp-idf/components/driver/include/driver/gpio.h" #include "esp-idf/components/soc/include/hal/gpio_hal.h" +#ifdef MICROPY_HW_NEOPIXEL +bool neopixel_in_use; +#endif + STATIC uint32_t never_reset_pins[2]; STATIC uint32_t in_use[2]; @@ -50,6 +56,14 @@ void common_hal_never_reset_pin(const mcu_pin_obj_t* pin) { void reset_pin_number(gpio_num_t pin_number) { never_reset_pins[pin_number / 32] &= ~(1 << pin_number % 32); in_use[pin_number / 32] &= ~(1 << pin_number % 32); + + #ifdef MICROPY_HW_NEOPIXEL + if (pin_number == MICROPY_HW_NEOPIXEL->number) { + neopixel_in_use = false; + rgb_led_status_init(); + return; + } + #endif } void common_hal_reset_pin(const mcu_pin_obj_t* pin) { @@ -69,13 +83,32 @@ void reset_all_pins(void) { } in_use[0] = 0; in_use[1] = 0; + + #ifdef MICROPY_HW_NEOPIXEL + neopixel_in_use = false; + #endif } void claim_pin(const mcu_pin_obj_t* pin) { in_use[pin->number / 32] |= (1 << pin->number % 32); + #ifdef MICROPY_HW_NEOPIXEL + if (pin == MICROPY_HW_NEOPIXEL) { + neopixel_in_use = true; + } + #endif +} + +void common_hal_mcu_pin_claim(const mcu_pin_obj_t* pin) { + claim_pin(pin); } bool pin_number_is_free(gpio_num_t pin_number) { + #ifdef MICROPY_HW_NEOPIXEL + if (pin_number == MICROPY_HW_NEOPIXEL->number) { + return !neopixel_in_use; + } + #endif + uint8_t offset = pin_number / 32; uint8_t mask = 1 << pin_number % 32; return (never_reset_pins[offset] & mask) == 0 && (in_use[offset] & mask) == 0; diff --git a/ports/esp32s2/common-hal/microcontroller/Pin.h b/ports/esp32s2/common-hal/microcontroller/Pin.h index 19985bda6f..f6c0087031 100644 --- a/ports/esp32s2/common-hal/microcontroller/Pin.h +++ b/ports/esp32s2/common-hal/microcontroller/Pin.h @@ -34,6 +34,10 @@ extern bool apa102_mosi_in_use; extern bool apa102_sck_in_use; +#ifdef MICROPY_HW_NEOPIXEL +extern bool neopixel_in_use; +#endif + void reset_all_pins(void); // reset_pin_number takes the pin number instead of the pointer so that objects don't // need to store a full pointer. diff --git a/ports/esp32s2/common-hal/neopixel_write/__init__.c b/ports/esp32s2/common-hal/neopixel_write/__init__.c index a9b42fc96a..1fc976ec36 100644 --- a/ports/esp32s2/common-hal/neopixel_write/__init__.c +++ b/ports/esp32s2/common-hal/neopixel_write/__init__.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2018 hathach for Adafruit Industries + * Copyright (c) 2020 Lucian Copeland for Adafruit Industries * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,10 +24,102 @@ * THE SOFTWARE. */ +/* Uses code from Espressif RGB LED Strip demo and drivers + * Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "py/mphal.h" +#include "py/runtime.h" #include "shared-bindings/neopixel_write/__init__.h" +#include "driver/rmt.h" +#include "rmt.h" + +#define WS2812_T0H_NS (350) +#define WS2812_T0L_NS (1000) +#define WS2812_T1H_NS (1000) +#define WS2812_T1L_NS (350) +#define WS2812_RESET_US (280) + +static uint32_t ws2812_t0h_ticks = 0; +static uint32_t ws2812_t1h_ticks = 0; +static uint32_t ws2812_t0l_ticks = 0; +static uint32_t ws2812_t1l_ticks = 0; + +static void IRAM_ATTR ws2812_rmt_adapter(const void *src, rmt_item32_t *dest, size_t src_size, + size_t wanted_num, size_t *translated_size, size_t *item_num) +{ + if (src == NULL || dest == NULL) { + *translated_size = 0; + *item_num = 0; + return; + } + const rmt_item32_t bit0 = {{{ ws2812_t0h_ticks, 1, ws2812_t0l_ticks, 0 }}}; //Logical 0 + const rmt_item32_t bit1 = {{{ ws2812_t1h_ticks, 1, ws2812_t1l_ticks, 0 }}}; //Logical 1 + size_t size = 0; + size_t num = 0; + uint8_t *psrc = (uint8_t *)src; + rmt_item32_t *pdest = dest; + while (size < src_size && num < wanted_num) { + for (int i = 0; i < 8; i++) { + // MSB first + if (*psrc & (1 << (7 - i))) { + pdest->val = bit1.val; + } else { + pdest->val = bit0.val; + } + num++; + pdest++; + } + size++; + psrc++; + } + *translated_size = size; + *item_num = num; +} void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout, uint8_t *pixels, uint32_t numBytes) { - (void)digitalinout; - (void)numBytes; + // Reserve channel + uint8_t number = digitalinout->pin->number; + rmt_channel_t channel = esp32s2_peripherals_find_and_reserve_rmt(); + + // Configure Channel + rmt_config_t config = RMT_DEFAULT_CONFIG_TX(number, channel); + config.clk_div = 2; // set counter clock to 40MHz + rmt_config(&config); + rmt_driver_install(config.channel, 0, 0); + + // Convert NS timings to ticks + uint32_t counter_clk_hz = 0; + if (rmt_get_counter_clock(config.channel, &counter_clk_hz) != ESP_OK) { + mp_raise_RuntimeError(translate("Could not retrieve clock")); + } + float ratio = (float)counter_clk_hz / 1e9; + ws2812_t0h_ticks = (uint32_t)(ratio * WS2812_T0H_NS); + ws2812_t0l_ticks = (uint32_t)(ratio * WS2812_T0L_NS); + ws2812_t1h_ticks = (uint32_t)(ratio * WS2812_T1H_NS); + ws2812_t1l_ticks = (uint32_t)(ratio * WS2812_T1L_NS); + + // Initialize automatic timing translator + rmt_translator_init(config.channel, ws2812_rmt_adapter); + + // Write and wait to finish + if(rmt_write_sample(config.channel, pixels, (size_t)numBytes, true) != ESP_OK) { + mp_raise_RuntimeError(translate("Input/output error")); + } + rmt_wait_tx_done(config.channel, pdMS_TO_TICKS(100)); + + // Free channel again + esp32s2_peripherals_free_rmt(config.channel); } diff --git a/ports/esp32s2/common-hal/pulseio/PWMOut.c b/ports/esp32s2/common-hal/pulseio/PWMOut.c index c4f5e18dd4..0ac42852ae 100644 --- a/ports/esp32s2/common-hal/pulseio/PWMOut.c +++ b/ports/esp32s2/common-hal/pulseio/PWMOut.c @@ -3,8 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2019 Lucian Copeland for Adafruit Industries - * Uses code from Micropython, Copyright (c) 2013-2016 Damien P. George + * Copyright (c) 2020 Lucian Copeland 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 @@ -33,6 +32,7 @@ #define INDEX_EMPTY 0xFF +STATIC bool not_first_reset = false; STATIC uint32_t reserved_timer_freq[LEDC_TIMER_MAX]; STATIC uint8_t reserved_channels[LEDC_CHANNEL_MAX]; STATIC bool never_reset_tim[LEDC_TIMER_MAX]; @@ -40,17 +40,22 @@ STATIC bool never_reset_chan[LEDC_CHANNEL_MAX]; void pwmout_reset(void) { for (size_t i = 0; i < LEDC_CHANNEL_MAX; i++ ) { - ledc_stop(LEDC_LOW_SPEED_MODE, i, 0); + if (reserved_channels[i] != INDEX_EMPTY && not_first_reset) { + ledc_stop(LEDC_LOW_SPEED_MODE, i, 0); + } if (!never_reset_chan[i]) { reserved_channels[i] = INDEX_EMPTY; } } for (size_t i = 0; i < LEDC_TIMER_MAX; i++ ) { - ledc_timer_rst(LEDC_LOW_SPEED_MODE, i); + if (reserved_timer_freq[i]) { + ledc_timer_rst(LEDC_LOW_SPEED_MODE, i); + } if (!never_reset_tim[i]) { reserved_timer_freq[i] = 0; } } + not_first_reset = true; } pwmout_result_t common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self, @@ -158,7 +163,10 @@ void common_hal_pulseio_pwmout_deinit(pulseio_pwmout_obj_t* self) { if (common_hal_pulseio_pwmout_deinited(self)) { return; } - ledc_stop(LEDC_LOW_SPEED_MODE, self->chan_handle.channel, 0); + + if (reserved_channels[self->chan_handle.channel] != INDEX_EMPTY) { + ledc_stop(LEDC_LOW_SPEED_MODE, self->chan_handle.channel, 0); + } // Search if any other channel is using the timer bool taken = false; for (size_t i =0; i < LEDC_CHANNEL_MAX; i++) { @@ -168,7 +176,9 @@ void common_hal_pulseio_pwmout_deinit(pulseio_pwmout_obj_t* self) { } // Variable frequency means there's only one channel on the timer if (!taken || self->variable_frequency) { - ledc_timer_rst(LEDC_LOW_SPEED_MODE, self->tim_handle.timer_num); + if (reserved_timer_freq[self->tim_handle.timer_num] != 0) { + ledc_timer_rst(LEDC_LOW_SPEED_MODE, self->tim_handle.timer_num); + } reserved_timer_freq[self->tim_handle.timer_num] = 0; } reset_pin_number(self->pin_number); diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk index c2d21e0841..a7873aa468 100644 --- a/ports/esp32s2/mpconfigport.mk +++ b/ports/esp32s2/mpconfigport.mk @@ -12,26 +12,21 @@ USB_SERIAL_NUMBER_LENGTH = 12 # Longints can be implemented as mpz, as longlong, or not LONGINT_IMPL = MPZ -CIRCUITPY_FULL_BUILD = 0 +# These modules are implemented in ports//common-hal: CIRCUITPY_ANALOGIO = 0 +CIRCUITPY_NVM = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOIO = 0 -CIRCUITPY_BITBANGIO = 1 -CIRCUITPY_BOARD = 1 -CIRCUITPY_DIGITALIO = 1 -CIRCUITPY_BUSIO = 1 -CIRCUITPY_DISPLAYIO = 1 -CIRCUITPY_FREQUENCYIO = 0 -CIRCUITPY_I2CPERIPHERAL = 0 -CIRCUITPY_MICROCONTROLLER = 1 -CIRCUITPY_NVM = 0 -CIRCUITPY_PULSEIO = 1 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 -CIRCUITPY_TOUCHIO = 0 +CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_COUNTIO = 0 -# Enable USB HID support -CIRCUITPY_USB_HID = 1 -CIRCUITPY_USB_MIDI = 0 +# These modules are implemented in shared-module/ - they can be included in +# any port once their prerequisites in common-hal are complete. +CIRCUITPY_RANDOM = 0 # Requires OS +CIRCUITPY_USB_MIDI = 0 # Requires USB +CIRCUITPY_ULAB = 0 # No requirements, but takes extra flash CIRCUITPY_MODULE ?= none diff --git a/ports/esp32s2/peripherals/rmt.c b/ports/esp32s2/peripherals/rmt.c new file mode 100644 index 0000000000..f17957c1c4 --- /dev/null +++ b/ports/esp32s2/peripherals/rmt.c @@ -0,0 +1,46 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Lucian Copeland 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 "rmt.h" +#include "py/runtime.h" + +bool rmt_reserved_channels[RMT_CHANNEL_MAX]; + +rmt_channel_t esp32s2_peripherals_find_and_reserve_rmt(void) { + for (size_t i = 0; i < RMT_CHANNEL_MAX; i++) { + if (!rmt_reserved_channels[i]) { + rmt_reserved_channels[i] = true; + return i; + } + } + mp_raise_RuntimeError(translate("All timers in use")); + return false; +} + +void esp32s2_peripherals_free_rmt(rmt_channel_t chan) { + rmt_reserved_channels[chan] = false; + rmt_driver_uninstall(chan); +} diff --git a/ports/esp32s2/peripherals/rmt.h b/ports/esp32s2/peripherals/rmt.h new file mode 100644 index 0000000000..4741a5bc59 --- /dev/null +++ b/ports/esp32s2/peripherals/rmt.h @@ -0,0 +1,37 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Lucian Copeland for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_RMT_H +#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_RMT_H + +#include "py/mphal.h" +#include "driver/rmt.h" +#include + +rmt_channel_t esp32s2_peripherals_find_and_reserve_rmt(void); +void esp32s2_peripherals_free_rmt(rmt_channel_t chan); + +#endif diff --git a/ports/esp32s2/supervisor/internal_flash.c b/ports/esp32s2/supervisor/internal_flash.c index 26774efac8..4b216a095a 100644 --- a/ports/esp32s2/supervisor/internal_flash.c +++ b/ports/esp32s2/supervisor/internal_flash.c @@ -43,6 +43,11 @@ STATIC const esp_partition_t * _partition; +// TODO: Split the caching out of supervisor/shared/external_flash so we can use it. +#define SECTOR_SIZE 4096 +STATIC uint8_t _cache[SECTOR_SIZE]; +STATIC uint32_t _cache_lba = 0xffffffff; + void supervisor_flash_init(void) { _partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_FAT, @@ -61,11 +66,6 @@ void port_internal_flash_flush(void) { } -// TODO: Split the caching out of supervisor/shared/external_flash so we can use it. -#define SECTOR_SIZE 4096 -STATIC uint8_t _cache[SECTOR_SIZE]; -STATIC uint32_t _cache_lba; - mp_uint_t supervisor_flash_read_blocks(uint8_t *dest, uint32_t block, uint32_t num_blocks) { esp_partition_read(_partition, block * FILESYSTEM_BLOCK_SIZE, diff --git a/ports/mimxrt10xx/common-hal/pulseio/PulseIn.c b/ports/mimxrt10xx/common-hal/pulseio/PulseIn.c index ec02908612..cea11a4b9a 100644 --- a/ports/mimxrt10xx/common-hal/pulseio/PulseIn.c +++ b/ports/mimxrt10xx/common-hal/pulseio/PulseIn.c @@ -201,7 +201,7 @@ void common_hal_pulseio_pulsein_clear(pulseio_pulsein_obj_t* self) { uint16_t common_hal_pulseio_pulsein_popleft(pulseio_pulsein_obj_t* self) { // if (self->len == 0) { -// mp_raise_IndexError(translate("pop from an empty PulseIn")); +// mp_raise_IndexError_varg(translate("pop from empty %q"), MP_QSTR_PulseIn); // } // common_hal_mcu_disable_interrupts(); // uint16_t value = self->buffer[self->start]; @@ -237,7 +237,7 @@ uint16_t common_hal_pulseio_pulsein_get_item(pulseio_pulsein_obj_t* self, // } // if (index < 0 || index >= self->len) { // common_hal_mcu_enable_interrupts(); -// mp_raise_IndexError(translate("index out of range")); +// mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_PulseIn); // } // uint16_t value = self->buffer[(self->start + index) % self->maxlen]; // common_hal_mcu_enable_interrupts(); diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 13a148df3b..3fef68e88e 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -73,11 +73,11 @@ INC += -I$(BUILD) INC += -I$(BUILD)/genhdr INC += -I./../../lib/cmsis/inc INC += -I./boards/$(BOARD) -INC += -I./nrfx -INC += -I./nrfx/hal -INC += -I./nrfx/mdk -INC += -I./nrfx/drivers/include -INC += -I./nrfx/drivers/src +INC += -isystem ./nrfx +INC += -isystem ./nrfx/hal +INC += -isystem ./nrfx/mdk +INC += -isystem ./nrfx/drivers/include +INC += -isystem ./nrfx/drivers/src INC += -I./bluetooth INC += -I./peripherals INC += -I../../lib/mp-readline @@ -100,8 +100,6 @@ CFLAGS += $(OPTIMIZATION_FLAGS) CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) # Undo some warnings. -# nrfx uses undefined preprocessor variables quite casually, so we can't do warning checks for these. -CFLAGS += -Wno-undef # nrfx does casts that increase alignment requirements. CFLAGS += -Wno-cast-align @@ -240,6 +238,11 @@ endif OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o)) +# nrfx uses undefined preprocessor variables quite casually, so we can't do +# warning checks for these. Happily, we've confined the offenders to the NRFX +# source files themselves. +$(addprefix $(BUILD)/, $(SRC_NRFX:.c=.o)): CFLAGS += -Wno-undef + $(BUILD)/$(FATFS_DIR)/ff.o: COPT += -Os $(filter $(PY_BUILD)/../extmod/vfs_fat_%.o, $(PY_O)): COPT += -Os diff --git a/ports/nrf/boards/arduino_nano_33_ble/mpconfigboard.mk b/ports/nrf/boards/arduino_nano_33_ble/mpconfigboard.mk index d5e38c5b72..9b16834b50 100644 --- a/ports/nrf/boards/arduino_nano_33_ble/mpconfigboard.mk +++ b/ports/nrf/boards/arduino_nano_33_ble/mpconfigboard.mk @@ -6,10 +6,3 @@ USB_MANUFACTURER = "Arduino" MCU_CHIP = nrf52840 INTERNAL_FLASH_FILESYSTEM = 1 - -# Allocate two, not just one I2C peripheral, so that we have both -# on-board and off-board I2C available. -# When SPIM3 becomes available we'll be able to have two I2C and two SPI peripherals. -# We use a CFLAGS define here because there are include order issues -# if we try to include "mpconfigport.h" into nrfx_config.h . -CFLAGS += -DCIRCUITPY_NRF_NUM_I2C=2 diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk index 38c9933340..6b5c0424f9 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk @@ -8,9 +8,3 @@ MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" - -# Allocate two, not just one I2C peripheral for CPB, so that we have both -# on-board and off-board I2C available. -# We use a CFLAGS define here because there are include order issues -# if we try to include "mpconfigport.h" into nrfx_config.h . -CFLAGS += -DCIRCUITPY_NRF_NUM_I2C=2 diff --git a/ports/nrf/boards/common.template.ld b/ports/nrf/boards/common.template.ld index 5982b8ba0d..192215eeee 100644 --- a/ports/nrf/boards/common.template.ld +++ b/ports/nrf/boards/common.template.ld @@ -18,13 +18,16 @@ MEMORY FLASH_BOOTLOADER_SETTINGS (r) : ORIGIN = ${BOOTLOADER_SETTINGS_START_ADDR}, LENGTH = ${BOOTLOADER_SETTINGS_SIZE} - /* 0x2000000 - RAM:ORIGIN is reserved for Softdevice */ - /* SoftDevice 6.1.0 with 5 connections and various increases takes just under 64kiB. - /* To measure the minimum required amount of memory for given configuration, set this number - high enough to work and then check the mutation of the value done by sd_ble_enable. */ - SPIM3_RAM (rw) : ORIGIN = 0x20000000 + ${SOFTDEVICE_RAM_SIZE}, LENGTH = ${SPIM3_BUFFER_SIZE} - RAM (xrw) : ORIGIN = 0x20000000 + ${SOFTDEVICE_RAM_SIZE} + ${SPIM3_BUFFER_SIZE}, LENGTH = ${RAM_SIZE} - ${SOFTDEVICE_RAM_SIZE} -${SPIM3_BUFFER_SIZE} - + /* SoftDevice RAM must start at the beginning of RAM: 0x2000000 (RAM_START_ADDR). + On nRF52840, the first 64kB of RAM is composed of 8 8kB RAM blocks. Above those is + RAM block 8, which is 192kB. + If SPIM3_BUFFER_RAM_SIZE is 8kB, as opposed to zero, it must be in the first 64kB of RAM. + So the amount of RAM reserved for the SoftDevice must be no more than 56kB. + */ + RAM (xrw) : ORIGIN = ${RAM_START_ADDR}, LENGTH = ${RAM_SIZE} + SD_RAM (rw) : ORIGIN = ${SOFTDEVICE_RAM_START_ADDR}, LENGTH = ${SOFTDEVICE_RAM_SIZE} + SPIM3_RAM (rw) : ORIGIN = ${SPIM3_BUFFER_RAM_START_ADDR}, LENGTH = ${SPIM3_BUFFER_RAM_SIZE} + APP_RAM (xrw) : ORIGIN = ${APP_RAM_START_ADDR}, LENGTH = ${APP_RAM_SIZE} } /* produce a link error if there is not this amount of RAM available */ @@ -32,16 +35,16 @@ _minimum_heap_size = 0; /* top end of the stack */ -/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/ -_estack = ORIGIN(RAM) + LENGTH(RAM); +/*_stack_end = ORIGIN(APP_RAM) + LENGTH(APP_RAM);*/ +_estack = ORIGIN(APP_RAM) + LENGTH(APP_RAM); /* RAM extents for the garbage collector */ -_ram_end = ORIGIN(RAM) + LENGTH(RAM); +_ram_end = ORIGIN(APP_RAM) + LENGTH(APP_RAM); _heap_end = 0x20020000; /* tunable */ /* nrf52840 SPIM3 needs its own area to work around hardware problems. Nothing else may use this space. */ _spim3_ram = ORIGIN(SPIM3_RAM); -_spim3_ram_end = ORIGIN(SPIM3_RAM) + LENGTH(RAM); +_spim3_ram_end = ORIGIN(SPIM3_RAM) + LENGTH(SPIM3_RAM); /* define output sections */ SECTIONS @@ -87,7 +90,7 @@ SECTIONS . = ALIGN(4); _edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM + } >APP_RAM /* Zero-initialized data section */ .bss : @@ -100,7 +103,7 @@ SECTIONS . = ALIGN(4); _ebss = .; /* define a global symbol at bss end; used by startup code and GC */ - } >RAM + } >APP_RAM /* Uninitialized data section Data placed into this section will remain unchanged across reboots. */ @@ -113,7 +116,7 @@ SECTIONS . = ALIGN(4); _euninitialized = .; /* define a global symbol at uninitialized end; currently unused */ - } >RAM + } >APP_RAM /* this is to define the start of the heap, and make sure we have a minimum size */ .heap : @@ -123,7 +126,7 @@ SECTIONS PROVIDE ( _end = . ); _heap_start = .; /* define a global symbol at heap start */ . = . + _minimum_heap_size; - } >RAM + } >APP_RAM /* this just checks there is enough RAM for the stack */ .stack : @@ -131,7 +134,7 @@ SECTIONS . = ALIGN(4); . = . + ${CIRCUITPY_DEFAULT_STACK_SIZE}; . = ALIGN(4); - } >RAM + } >APP_RAM /* Remove exception unwinding information, since Circuit Python does not support this GCC feature. */ diff --git a/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk b/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk index e43639a897..d601243486 100644 --- a/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk +++ b/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk @@ -8,10 +8,3 @@ MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" - -# Allocate two, not just one I2C peripheral for Bluefi, so that we have both -# on-board and off-board I2C available. -# When SPIM3 becomes available we'll be able to have two I2C and two SPI peripherals. -# We use a CFLAGS define here because there are include order issues -# if we try to include "mpconfigport.h" into nrfx_config.h . -CFLAGS += -DCIRCUITPY_NRF_NUM_I2C=2 diff --git a/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.h b/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.h index 086718089a..4fb6049c5f 100644 --- a/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.h +++ b/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.h @@ -30,9 +30,10 @@ #define MICROPY_HW_BOARD_NAME "Makerdiary M60 Keyboard" #define MICROPY_HW_MCU_NAME "nRF52840" -#define CP_RGB_STATUS_R (&pin_P0_30) -#define CP_RGB_STATUS_G (&pin_P0_29) -#define CP_RGB_STATUS_B (&pin_P0_31) +// RGB LEDs use PWM peripheral, avoid using them to save energy +// #define CP_RGB_STATUS_R (&pin_P0_30) +// #define CP_RGB_STATUS_G (&pin_P0_29) +// #define CP_RGB_STATUS_B (&pin_P0_31) #define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(1, 10) #define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(1, 14) diff --git a/ports/nrf/boards/pca10100/mpconfigboard.h b/ports/nrf/boards/pca10100/mpconfigboard.h index c645b778be..4639a208b4 100644 --- a/ports/nrf/boards/pca10100/mpconfigboard.h +++ b/ports/nrf/boards/pca10100/mpconfigboard.h @@ -46,3 +46,5 @@ #define BLEIO_PERIPH_ROLE_COUNT 2 #define BLEIO_TOTAL_CONNECTION_COUNT 2 #define BLEIO_ATTR_TAB_SIZE (BLE_GATTS_ATTR_TAB_SIZE_DEFAULT * 2) + +#define SOFTDEVICE_RAM_SIZE (32*1024) diff --git a/ports/nrf/boards/pca10100/mpconfigboard.mk b/ports/nrf/boards/pca10100/mpconfigboard.mk index e15bf3a67c..a8cacbafc4 100644 --- a/ports/nrf/boards/pca10100/mpconfigboard.mk +++ b/ports/nrf/boards/pca10100/mpconfigboard.mk @@ -27,9 +27,5 @@ CIRCUITPY_ULAB = 0 SUPEROPT_GC = 0 -# These defines must be overridden before mpconfigboard.h is included, which is -# why they are passed on the command line. -CFLAGS += -DSPIM3_BUFFER_SIZE=0 -DSOFTDEVICE_RAM_SIZE='(32*1024)' - # Override optimization to keep binary small OPTIMIZATION_FLAGS = -Os diff --git a/ports/nrf/boards/simmel/mpconfigboard.h b/ports/nrf/boards/simmel/mpconfigboard.h index 28c4ee7d93..a89f540b04 100644 --- a/ports/nrf/boards/simmel/mpconfigboard.h +++ b/ports/nrf/boards/simmel/mpconfigboard.h @@ -45,6 +45,9 @@ #define BOOTLOADER_SIZE (0x4000) // 12 kiB #define CIRCUITPY_BLE_CONFIG_SIZE (12*1024) +#define DEFAULT_I2C_BUS_SCL (&pin_P0_08) +#define DEFAULT_I2C_BUS_SDA (&pin_P1_09) + // Reduce nRF SoftRadio memory usage #define BLEIO_VS_UUID_COUNT 10 #define BLEIO_HVN_TX_QUEUE_SIZE 2 @@ -52,3 +55,5 @@ #define BLEIO_PERIPH_ROLE_COUNT 2 #define BLEIO_TOTAL_CONNECTION_COUNT 2 #define BLEIO_ATTR_TAB_SIZE (BLE_GATTS_ATTR_TAB_SIZE_DEFAULT * 2) + +#define SOFTDEVICE_RAM_SIZE (32*1024) diff --git a/ports/nrf/boards/simmel/mpconfigboard.mk b/ports/nrf/boards/simmel/mpconfigboard.mk index 8dd284d578..e34739c0f3 100644 --- a/ports/nrf/boards/simmel/mpconfigboard.mk +++ b/ports/nrf/boards/simmel/mpconfigboard.mk @@ -29,9 +29,5 @@ CIRCUITPY_WATCHDOG = 1 # Enable micropython.native #CIRCUITPY_ENABLE_MPY_NATIVE = 1 -# These defines must be overridden before mpconfigboard.h is included, which is -# why they are passed on the command line. -CFLAGS += -DSPIM3_BUFFER_SIZE=0 -DSOFTDEVICE_RAM_SIZE='(32*1024)' -DNRFX_SPIM3_ENABLED=0 - # Override optimization to keep binary small OPTIMIZATION_FLAGS = -Os diff --git a/ports/nrf/boards/simmel/pins.c b/ports/nrf/boards/simmel/pins.c index 6c572cae21..e9710967b6 100644 --- a/ports/nrf/boards/simmel/pins.c +++ b/ports/nrf/boards/simmel/pins.c @@ -9,19 +9,15 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, - { MP_ROM_QSTR(MP_QSTR_I2S_LRCK), MP_ROM_PTR(&pin_P0_08) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SDIN), MP_ROM_PTR(&pin_P1_09) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_P0_12) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_06) }, - { MP_ROM_QSTR(MP_QSTR_CHG), MP_ROM_PTR(&pin_P0_04) }, - { MP_ROM_QSTR(MP_QSTR_PWM), MP_ROM_PTR(&pin_P0_02) }, - { MP_ROM_QSTR(MP_QSTR_PWM_N), MP_ROM_PTR(&pin_P0_19) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P1_09) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/nrf/common-hal/_bleio/Adapter.c b/ports/nrf/common-hal/_bleio/Adapter.c index 0b23bb7bfa..4df26f33a9 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.c +++ b/ports/nrf/common-hal/_bleio/Adapter.c @@ -61,7 +61,7 @@ #endif #ifndef BLEIO_HVN_TX_QUEUE_SIZE -#define BLEIO_HVN_TX_QUEUE_SIZE 9 +#define BLEIO_HVN_TX_QUEUE_SIZE 5 #endif #ifndef BLEIO_CENTRAL_ROLE_COUNT @@ -120,11 +120,11 @@ STATIC uint32_t ble_stack_enable(void) { // Start with no event handlers, etc. ble_drv_reset(); - // Set everything up to have one persistent code editing connection and one user managed - // connection. In the future we could move .data and .bss to the other side of the stack and + // In the future we might move .data and .bss to the other side of the stack and // dynamically adjust for different memory requirements of the SD based on boot.py - // configuration. - uint32_t app_ram_start = (uint32_t) &_ram_start; + // configuration. But we still need to keep the SPIM3 buffer (if needed) in the first 64kB of RAM. + + uint32_t sd_ram_end = SOFTDEVICE_RAM_START_ADDR + SOFTDEVICE_RAM_SIZE; ble_cfg_t ble_conf; ble_conf.conn_cfg.conn_cfg_tag = BLE_CONN_CFG_TAG_CUSTOM; @@ -135,7 +135,7 @@ STATIC uint32_t ble_stack_enable(void) { // Event length here can influence throughput so perhaps make multiple connection profiles // available. ble_conf.conn_cfg.params.gap_conn_cfg.event_length = BLE_GAP_EVENT_LENGTH_DEFAULT; - err_code = sd_ble_cfg_set(BLE_CONN_CFG_GAP, &ble_conf, app_ram_start); + err_code = sd_ble_cfg_set(BLE_CONN_CFG_GAP, &ble_conf, sd_ram_end); if (err_code != NRF_SUCCESS) { return err_code; } @@ -147,7 +147,7 @@ STATIC uint32_t ble_stack_enable(void) { ble_conf.gap_cfg.role_count_cfg.periph_role_count = BLEIO_PERIPH_ROLE_COUNT; // central_role_count costs 648 bytes for 1 to 2, then ~1250 for each further increment. ble_conf.gap_cfg.role_count_cfg.central_role_count = BLEIO_CENTRAL_ROLE_COUNT; - err_code = sd_ble_cfg_set(BLE_GAP_CFG_ROLE_COUNT, &ble_conf, app_ram_start); + err_code = sd_ble_cfg_set(BLE_GAP_CFG_ROLE_COUNT, &ble_conf, sd_ram_end); if (err_code != NRF_SUCCESS) { return err_code; } @@ -158,7 +158,7 @@ STATIC uint32_t ble_stack_enable(void) { // DevZone recommends not setting this directly, but instead changing gap_conn_cfg.event_length. // However, we are setting connection extension, so this seems to make sense. ble_conf.conn_cfg.params.gatts_conn_cfg.hvn_tx_queue_size = BLEIO_HVN_TX_QUEUE_SIZE; - err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATTS, &ble_conf, app_ram_start); + err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATTS, &ble_conf, sd_ram_end); if (err_code != NRF_SUCCESS) { return err_code; } @@ -167,7 +167,7 @@ STATIC uint32_t ble_stack_enable(void) { memset(&ble_conf, 0, sizeof(ble_conf)); ble_conf.conn_cfg.conn_cfg_tag = BLE_CONN_CFG_TAG_CUSTOM; ble_conf.conn_cfg.params.gatt_conn_cfg.att_mtu = BLE_GATTS_VAR_ATTR_LEN_MAX; - err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATT, &ble_conf, app_ram_start); + err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATT, &ble_conf, sd_ram_end); if (err_code != NRF_SUCCESS) { return err_code; } @@ -177,7 +177,7 @@ STATIC uint32_t ble_stack_enable(void) { memset(&ble_conf, 0, sizeof(ble_conf)); // Each increment to the BLE_GATTS_ATTR_TAB_SIZE_DEFAULT multiplier costs 1408 bytes. ble_conf.gatts_cfg.attr_tab_size.attr_tab_size = BLEIO_ATTR_TAB_SIZE; - err_code = sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &ble_conf, app_ram_start); + err_code = sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &ble_conf, sd_ram_end); if (err_code != NRF_SUCCESS) { return err_code; } @@ -187,13 +187,15 @@ STATIC uint32_t ble_stack_enable(void) { memset(&ble_conf, 0, sizeof(ble_conf)); // Each additional vs_uuid_count costs 16 bytes. ble_conf.common_cfg.vs_uuid_cfg.vs_uuid_count = BLEIO_VS_UUID_COUNT; // Defaults to 10. - err_code = sd_ble_cfg_set(BLE_COMMON_CFG_VS_UUID, &ble_conf, app_ram_start); + err_code = sd_ble_cfg_set(BLE_COMMON_CFG_VS_UUID, &ble_conf, sd_ram_end); if (err_code != NRF_SUCCESS) { return err_code; } - // This sets app_ram_start to the minimum value needed for the settings set above. - err_code = sd_ble_enable(&app_ram_start); + // This sets sd_ram_end to the minimum value needed for the settings set above. + // You can set a breakpoint just after this call and examine sd_ram_end to see + // how much RAM the SD needs with the configuration above. + err_code = sd_ble_enable(&sd_ram_end); if (err_code != NRF_SUCCESS) { return err_code; } @@ -386,6 +388,17 @@ bleio_address_obj_t *common_hal_bleio_adapter_get_address(bleio_adapter_obj_t *s return address; } +bool common_hal_bleio_adapter_set_address(bleio_adapter_obj_t *self, bleio_address_obj_t *address) { + ble_gap_addr_t local_address; + mp_buffer_info_t bufinfo; + if (!mp_get_buffer(address->bytes, &bufinfo, MP_BUFFER_READ)) { + return false; + } + local_address.addr_type = address->type; + memcpy(local_address.addr, bufinfo.buf, NUM_BLEIO_ADDRESS_BYTES); + return sd_ble_gap_addr_set(&local_address) == NRF_SUCCESS; +} + mp_obj_str_t* common_hal_bleio_adapter_get_name(bleio_adapter_obj_t *self) { uint16_t len = 0; sd_ble_gap_device_name_get(NULL, &len); @@ -472,8 +485,8 @@ mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t* err_code = sd_ble_gap_scan_start(&scan_params, sd_data); if (err_code != NRF_SUCCESS) { - self->scan_results = NULL; ble_drv_remove_event_handler(scan_on_ble_evt, self->scan_results); + self->scan_results = NULL; check_nrf_error(err_code); } diff --git a/ports/nrf/common-hal/busio/SPI.c b/ports/nrf/common-hal/busio/SPI.c index f27f0e267b..380ec27de4 100644 --- a/ports/nrf/common-hal/busio/SPI.c +++ b/ports/nrf/common-hal/busio/SPI.c @@ -34,6 +34,22 @@ #include "nrfx_spim.h" #include "nrf_gpio.h" +#ifndef NRFX_SPIM3_ENABLED +#define NRFX_SPIM3_ENABLED (0) +#endif + +#ifndef NRFX_SPIM2_ENABLED +#define NRFX_SPIM2_ENABLED (0) +#endif + +#ifndef NRFX_SPIM1_ENABLED +#define NRFX_SPIM1_ENABLED (0) +#endif + +#ifndef NRFX_SPIM0_ENABLED +#define NRFX_SPIM0_ENABLED (0) +#endif + // These are in order from highest available frequency to lowest (32MHz first, then 8MHz). STATIC spim_peripheral_t spim_peripherals[] = { #if NRFX_CHECK(NRFX_SPIM3_ENABLED) @@ -41,7 +57,7 @@ STATIC spim_peripheral_t spim_peripherals[] = { // Allocate SPIM3 first. { .spim = NRFX_SPIM_INSTANCE(3), .max_frequency = 32000000, - .max_xfer_size = MIN(SPIM3_BUFFER_SIZE, (1UL << SPIM3_EASYDMA_MAXCNT_SIZE) - 1) + .max_xfer_size = MIN(SPIM3_BUFFER_RAM_SIZE, (1UL << SPIM3_EASYDMA_MAXCNT_SIZE) - 1) }, #endif #if NRFX_CHECK(NRFX_SPIM2_ENABLED) @@ -71,8 +87,7 @@ STATIC bool never_reset[MP_ARRAY_SIZE(spim_peripherals)]; // Separate RAM area for SPIM3 transmit buffer to avoid SPIM3 hardware errata. // https://infocenter.nordicsemi.com/index.jsp?topic=%2Ferrata_nRF52840_Rev2%2FERR%2FnRF52840%2FRev2%2Flatest%2Fanomaly_840_198.html -extern uint32_t _spim3_ram; -STATIC uint8_t *spim3_transmit_buffer = (uint8_t *) &_spim3_ram; +STATIC uint8_t *spim3_transmit_buffer = (uint8_t *) SPIM3_BUFFER_RAM_START_ADDR; void spi_reset(void) { for (size_t i = 0 ; i < MP_ARRAY_SIZE(spim_peripherals); i++) { diff --git a/ports/nrf/common-hal/microcontroller/Pin.c b/ports/nrf/common-hal/microcontroller/Pin.c index 3132c76318..d294c1dd5d 100644 --- a/ports/nrf/common-hal/microcontroller/Pin.c +++ b/ports/nrf/common-hal/microcontroller/Pin.c @@ -93,6 +93,7 @@ void reset_pin_number(uint8_t pin_number) { // Clear claimed bit. claimed_pins[nrf_pin_port(pin_number)] &= ~(1 << nrf_relative_pin_number(pin_number)); + never_reset_pins[nrf_pin_port(pin_number)] &= ~(1 << nrf_relative_pin_number(pin_number)); #ifdef MICROPY_HW_NEOPIXEL if (pin_number == MICROPY_HW_NEOPIXEL->number) { diff --git a/ports/nrf/common-hal/pulseio/PulseIn.c b/ports/nrf/common-hal/pulseio/PulseIn.c index be2903e444..ca44a20b4a 100644 --- a/ports/nrf/common-hal/pulseio/PulseIn.c +++ b/ports/nrf/common-hal/pulseio/PulseIn.c @@ -271,7 +271,7 @@ uint16_t common_hal_pulseio_pulsein_get_item(pulseio_pulsein_obj_t* self, int16_ if ( !self->paused ) { nrfx_gpiote_in_event_enable(self->pin, true); } - mp_raise_IndexError(translate("index out of range")); + mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_PulseIn); } uint16_t value = self->buffer[(self->start + index) % self->maxlen]; @@ -284,7 +284,7 @@ uint16_t common_hal_pulseio_pulsein_get_item(pulseio_pulsein_obj_t* self, int16_ uint16_t common_hal_pulseio_pulsein_popleft(pulseio_pulsein_obj_t* self) { if (self->len == 0) { - mp_raise_IndexError(translate("pop from an empty PulseIn")); + mp_raise_IndexError_varg(translate("pop from empty %q"), MP_QSTR_PulseIn); } if ( !self->paused ) { diff --git a/ports/nrf/ld_defines.c b/ports/nrf/ld_defines.c index 8430daccb9..6e266e4f7a 100644 --- a/ports/nrf/ld_defines.c +++ b/ports/nrf/ld_defines.c @@ -10,6 +10,7 @@ // START_LD_DEFINES /*FLASH_SIZE=*/ FLASH_SIZE; +/*RAM_START_ADDR=*/ RAM_START_ADDR; /*RAM_SIZE=*/ RAM_SIZE; /*MBR_START_ADDR=*/ MBR_START_ADDR; @@ -41,5 +42,11 @@ /*BOOTLOADER_SETTINGS_START_ADDR=*/ BOOTLOADER_SETTINGS_START_ADDR; /*BOOTLOADER_SETTINGS_SIZE=*/ BOOTLOADER_SETTINGS_SIZE; +/*SOFTDEVICE_RAM_START_ADDR=*/ SOFTDEVICE_RAM_START_ADDR; /*SOFTDEVICE_RAM_SIZE=*/ SOFTDEVICE_RAM_SIZE; -/*SPIM3_BUFFER_SIZE=*/ SPIM3_BUFFER_SIZE; + +/*SPIM3_BUFFER_RAM_START_ADDR=*/ SPIM3_BUFFER_RAM_START_ADDR; +/*SPIM3_BUFFER_RAM_SIZE=*/ SPIM3_BUFFER_RAM_SIZE; + +/*APP_RAM_START_ADDR=*/ APP_RAM_START_ADDR; +/*APP_RAM_SIZE=*/ APP_RAM_SIZE; diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 4e49568ed8..36a9819dc8 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -34,32 +34,6 @@ #include "nrf_sdm.h" // for SD_FLASH_SIZE #include "peripherals/nrf/nvm.h" // for FLASH_PAGE_SIZE -// Max RAM used by SoftDevice. Can be changed when SoftDevice parameters are changed. -// See common.template.ld. -#ifndef SOFTDEVICE_RAM_SIZE -#define SOFTDEVICE_RAM_SIZE (64*1024) -#endif - -#ifdef NRF52840 -#define MICROPY_PY_SYS_PLATFORM "nRF52840" -#define FLASH_SIZE (0x100000) // 1MiB -#define RAM_SIZE (0x40000) // 256 KiB -// Special RAM area for SPIM3 transmit buffer, to work around hardware bug. -// See common.template.ld. -#define SPIM3_BUFFER_SIZE (8192) -#endif - -#ifdef NRF52833 -#define MICROPY_PY_SYS_PLATFORM "nRF52833" -#define FLASH_SIZE (0x80000) // 512 KiB -#define RAM_SIZE (0x20000) // 128 KiB -// Special RAM area for SPIM3 transmit buffer, to work around hardware bug. -// See common.template.ld. -#ifndef SPIM3_BUFFER_SIZE -#define SPIM3_BUFFER_SIZE (8192) -#endif -#endif - #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1) #define MICROPY_PY_FUNCTION_ATTRS (1) #define MICROPY_PY_IO (1) @@ -69,7 +43,26 @@ #define MICROPY_PY_UJSON (1) // 24kiB stack -#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000 +#define CIRCUITPY_DEFAULT_STACK_SIZE (24*1024) + +#ifdef NRF52840 +#define MICROPY_PY_SYS_PLATFORM "nRF52840" +#define FLASH_SIZE (1024*1024) // 1MiB +#define RAM_SIZE (256*1024) // 256 KiB +// Special RAM area for SPIM3 transmit buffer, to work around hardware bug. +// See common.template.ld. +#define SPIM3_BUFFER_RAM_SIZE (8*1024) // 8 KiB +#endif + +#ifdef NRF52833 +#define MICROPY_PY_SYS_PLATFORM "nRF52833" +#define FLASH_SIZE (512*1024) // 512 KiB +#define RAM_SIZE (128*1024) // 128 KiB +// SPIM3 buffer is not needed on nRF52833: the SPIM3 hw bug is not present. +#ifndef SPIM3_BUFFER_RAM_SIZE +#define SPIM3_BUFFER_RAM_SIZE (0) +#endif +#endif //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -79,7 +72,7 @@ // Definitions that might be overriden by mpconfigboard.h #ifndef CIRCUITPY_INTERNAL_NVM_SIZE -#define CIRCUITPY_INTERNAL_NVM_SIZE (8192) +#define CIRCUITPY_INTERNAL_NVM_SIZE (8*1024) #endif #ifndef BOARD_HAS_32KHZ_XTAL @@ -88,11 +81,11 @@ #endif #if INTERNAL_FLASH_FILESYSTEM - #ifndef CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE - #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (256*1024) - #endif +#ifndef CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE +#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (256*1024) +#endif #else - #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0) +#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0) #endif // Flash layout, starting at 0x00000000 @@ -116,7 +109,7 @@ // SD_FLASH_SIZE is from nrf_sdm.h #define ISR_START_ADDR (SD_FLASH_START_ADDR + SD_FLASH_SIZE) -#define ISR_SIZE (0x1000) // 4kiB +#define ISR_SIZE (4*1024) // 4kiB // Smallest unit of flash that can be erased. #define FLASH_ERASE_SIZE FLASH_PAGE_SIZE @@ -127,12 +120,12 @@ // Bootloader values from https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/src/linker/s140_v6.ld #define BOOTLOADER_START_ADDR (FLASH_SIZE - BOOTLOADER_SIZE - BOOTLOADER_SETTINGS_SIZE - BOOTLOADER_MBR_SIZE) -#define BOOTLOADER_MBR_SIZE (0x1000) // 4kib +#define BOOTLOADER_MBR_SIZE (4*1024) // 4kib #ifndef BOOTLOADER_SIZE -#define BOOTLOADER_SIZE (0xA000) // 40kiB +#define BOOTLOADER_SIZE (40*1024) // 40kiB #endif #define BOOTLOADER_SETTINGS_START_ADDR (FLASH_SIZE - BOOTLOADER_SETTINGS_SIZE) -#define BOOTLOADER_SETTINGS_SIZE (0x1000) // 4kiB +#define BOOTLOADER_SETTINGS_SIZE (4*1024) // 4kiB #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR (BOOTLOADER_START_ADDR - CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE) @@ -180,11 +173,46 @@ #error No space left in flash for firmware after specifying other regions! #endif +//////////////////////////////////////////////////////////////////////////////////////////////////// +// RAM space definitions -#define MICROPY_PORT_ROOT_POINTERS \ - CIRCUITPY_COMMON_ROOT_POINTERS \ - uint16_t* pixels_pattern_heap; \ - ble_drv_evt_handler_entry_t* ble_drv_evt_handler_entries; \ +// Max RAM used by SoftDevice. Can be changed when SoftDevice parameters are changed. +// On nRF52840, the first 64kB of RAM is composed of 8 8kB RAM blocks. Above those is +// RAM block 8, which is 192kB. +// If SPIM3_BUFFER_RAM_SIZE is 8kB, as opposed to zero, it must be in the first 64kB of RAM. +// So the amount of RAM reserved for the SoftDevice must be no more than 56kB. +// SoftDevice 6.1.0 with 5 connections and various increases can be made to use < 56kB. +// To measure the minimum required amount of memory for given configuration, set this number +// high enough to work and then check the mutation of the value done by sd_ble_enable(). +// See common.template.ld. +#ifndef SOFTDEVICE_RAM_SIZE +#define SOFTDEVICE_RAM_SIZE (56*1024) +#endif + + +#define RAM_START_ADDR (0x20000000) +#define SOFTDEVICE_RAM_START_ADDR (RAM_START_ADDR) +#define SPIM3_BUFFER_RAM_START_ADDR (SOFTDEVICE_RAM_START_ADDR + SOFTDEVICE_RAM_SIZE) +#define APP_RAM_START_ADDR (SPIM3_BUFFER_RAM_START_ADDR + SPIM3_BUFFER_RAM_SIZE) +#define APP_RAM_SIZE (RAM_START_ADDR + RAM_SIZE - APP_RAM_START_ADDR) + +#if SPIM3_BUFFER_RAM_SIZE > 0 && SOFTDEVICE_RAM_SIZE + SPIM3_BUFFER_RAM_SIZE > (64*1024) +#error SPIM3 buffer must be in the first 64kB of RAM. +#endif + +#if SOFTDEVICE_RAM_SIZE + SPIM3_BUFFER_RAM_SIZE + APP_RAM_SIZE > RAM_SIZE +#error RAM size regions overflow RAM +#endif + +#if SOFTDEVICE_RAM_SIZE + SPIM3_BUFFER_RAM_SIZE + APP_RAM_SIZE < RAM_SIZE +#error RAM size regions do not use all of RAM +#endif + + +#define MICROPY_PORT_ROOT_POINTERS \ + CIRCUITPY_COMMON_ROOT_POINTERS \ + uint16_t* pixels_pattern_heap; \ + ble_drv_evt_handler_entry_t* ble_drv_evt_handler_entries; \ #endif // NRF5_MPCONFIGPORT_H__ diff --git a/ports/nrf/nrfx_config.h b/ports/nrf/nrfx_config.h index b528a6032b..94812d5913 100644 --- a/ports/nrf/nrfx_config.h +++ b/ports/nrf/nrfx_config.h @@ -5,7 +5,7 @@ #define NRFX_POWER_ENABLED 1 #define NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY 7 -// NOTE: THIS WORKAROUND CAUSES BLE CODE TO CRASH. +// NOTE: THIS WORKAROUND CAUSES BLE CODE TO CRASH. DO NOT USE. // It doesn't work with the SoftDevice. // See https://devzone.nordicsemi.com/f/nordic-q-a/33982/sdk-15-software-crash-during-spi-session // Turn on nrfx supported workarounds for errata in Rev1 of nRF52840 diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index e681e6825f..87a4d7396f 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -65,6 +65,10 @@ #include "common-hal/audiopwmio/PWMAudioOut.h" #endif +#if defined(MICROPY_QSPI_CS) +extern void qspi_disable(void); +#endif + static void power_warning_handler(void) { reset_into_safe_mode(BROWNOUT); } @@ -295,6 +299,10 @@ void port_interrupt_after_ticks(uint32_t ticks) { } void port_sleep_until_interrupt(void) { +#if defined(MICROPY_QSPI_CS) + qspi_disable(); +#endif + // Clear the FPU interrupt because it can prevent us from sleeping. if (NVIC_GetPendingIRQ(FPU_IRQn)) { __set_FPSCR(__get_FPSCR() & ~(0x9f)); diff --git a/ports/nrf/supervisor/qspi_flash.c b/ports/nrf/supervisor/qspi_flash.c index 90260b0912..7ca27d56c4 100644 --- a/ports/nrf/supervisor/qspi_flash.c +++ b/ports/nrf/supervisor/qspi_flash.c @@ -38,7 +38,44 @@ #include "supervisor/shared/external_flash/common_commands.h" #include "supervisor/shared/external_flash/qspi_flash.h" +// When USB is disconnected, disable QSPI in sleep mode to save energy +void qspi_disable(void) +{ + // If VBUS is detected, no need to disable QSPI + if (NRF_QSPI->ENABLE && !(NRF_POWER->USBREGSTATUS & POWER_USBREGSTATUS_VBUSDETECT_Msk)) { + // Keep CS high when QSPI is diabled + nrf_gpio_cfg_output(MICROPY_QSPI_CS); + nrf_gpio_pin_write(MICROPY_QSPI_CS, 1); + + // Workaround to disable QSPI according to nRF52840 Revision 1 Errata V1.4 - 3.8 + NRF_QSPI->TASKS_DEACTIVATE = 1; + *(volatile uint32_t *)0x40029054 = 1; + NRF_QSPI->ENABLE = 0; + } +} + +void qspi_enable(void) +{ + if (NRF_QSPI->ENABLE) { + return; + } + + nrf_qspi_enable(NRF_QSPI); + + nrf_qspi_event_clear(NRF_QSPI, NRF_QSPI_EVENT_READY); + nrf_qspi_task_trigger(NRF_QSPI, NRF_QSPI_TASK_ACTIVATE); + + uint32_t remaining_attempts = 100; + do { + if (nrf_qspi_event_check(NRF_QSPI, NRF_QSPI_EVENT_READY)) { + break; + } + NRFX_DELAY_US(10); + } while (--remaining_attempts); +} + bool spi_flash_command(uint8_t command) { + qspi_enable(); nrf_qspi_cinstr_conf_t cinstr_cfg = { .opcode = command, .length = 1, @@ -51,6 +88,7 @@ bool spi_flash_command(uint8_t command) { } bool spi_flash_read_command(uint8_t command, uint8_t* response, uint32_t length) { + qspi_enable(); nrf_qspi_cinstr_conf_t cinstr_cfg = { .opcode = command, .length = length + 1, @@ -64,6 +102,7 @@ bool spi_flash_read_command(uint8_t command, uint8_t* response, uint32_t length) } bool spi_flash_write_command(uint8_t command, uint8_t* data, uint32_t length) { + qspi_enable(); nrf_qspi_cinstr_conf_t cinstr_cfg = { .opcode = command, .length = length + 1, @@ -76,6 +115,7 @@ bool spi_flash_write_command(uint8_t command, uint8_t* data, uint32_t length) { } bool spi_flash_sector_command(uint8_t command, uint32_t address) { + qspi_enable(); if (command != CMD_SECTOR_ERASE) { return false; } @@ -83,6 +123,7 @@ bool spi_flash_sector_command(uint8_t command, uint32_t address) { } bool spi_flash_write_data(uint32_t address, uint8_t* data, uint32_t length) { + qspi_enable(); // TODO: In theory, this also needs to handle unaligned data and // non-multiple-of-4 length. (in practice, I don't think the fat layer // generates such writes) @@ -90,6 +131,7 @@ bool spi_flash_write_data(uint32_t address, uint8_t* data, uint32_t length) { } bool spi_flash_read_data(uint32_t address, uint8_t* data, uint32_t length) { + qspi_enable(); int misaligned = ((intptr_t)data) & 3; // If the data is misaligned, we need to read 4 bytes // into an aligned buffer, and then copy 1, 2, or 3 bytes from the aligned @@ -159,7 +201,7 @@ void spi_flash_init(void) { .irq_priority = 7, }; -#if EXTERNAL_FLASH_QSPI_DUAL +#if defined(EXTERNAL_FLASH_QSPI_DUAL) qspi_cfg.pins.io1_pin = MICROPY_QSPI_DATA1; qspi_cfg.prot_if.readoc = NRF_QSPI_READOC_READ2O; qspi_cfg.prot_if.writeoc = NRF_QSPI_WRITEOC_PP2O; diff --git a/ports/stm/boards/feather_stm32f405_express/pins.c b/ports/stm/boards/feather_stm32f405_express/pins.c index ebc8fa337e..571076c339 100644 --- a/ports/stm/boards/feather_stm32f405_express/pins.c +++ b/ports/stm/boards/feather_stm32f405_express/pins.c @@ -1,5 +1,17 @@ +#include "py/objtuple.h" #include "shared-bindings/board/__init__.h" +STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { + {&mp_type_tuple}, + 4, + { + MP_ROM_PTR(&pin_PC08), + MP_ROM_PTR(&pin_PC09), + MP_ROM_PTR(&pin_PC10), + MP_ROM_PTR(&pin_PC11), + } +}; + STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -31,5 +43,9 @@ 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_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_SDIO_CLOCK), MP_ROM_PTR(&pin_PC12) }, + { MP_ROM_QSTR(MP_QSTR_SDIO_COMMAND), MP_ROM_PTR(&pin_PD02) }, + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA), MP_ROM_PTR(&sdio_data_tuple) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/stm/boards/meowbit_v121/mpconfigboard.mk b/ports/stm/boards/meowbit_v121/mpconfigboard.mk index 127cdb60e2..852836ef8f 100644 --- a/ports/stm/boards/meowbit_v121/mpconfigboard.mk +++ b/ports/stm/boards/meowbit_v121/mpconfigboard.mk @@ -14,6 +14,8 @@ MCU_SERIES = F4 MCU_VARIANT = STM32F401xE MCU_PACKAGE = LQFP64 +OPTIMIZATION_FLAGS = -Os + LD_COMMON = boards/common_default.ld LD_FILE = boards/STM32F401xe_boot.ld # LD_FILE = boards/STM32F401xe_fs.ld # use for internal flash diff --git a/ports/stm/common-hal/busio/I2C.c b/ports/stm/common-hal/busio/I2C.c index b05d28c852..de69da211a 100644 --- a/ports/stm/common-hal/busio/I2C.c +++ b/ports/stm/common-hal/busio/I2C.c @@ -112,7 +112,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, if (i2c_taken) { mp_raise_ValueError(translate("Hardware busy, try alternative pins")); } else { - mp_raise_ValueError(translate("Invalid I2C pin selection")); + mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_I2C); } } diff --git a/ports/stm/common-hal/busio/SPI.c b/ports/stm/common-hal/busio/SPI.c index 15c746b62a..0354d64ad3 100644 --- a/ports/stm/common-hal/busio/SPI.c +++ b/ports/stm/common-hal/busio/SPI.c @@ -169,7 +169,7 @@ STATIC int check_pins(busio_spi_obj_t *self, if (spi_taken) { mp_raise_ValueError(translate("Hardware busy, try alternative pins")); } else { - mp_raise_ValueError(translate("Invalid SPI pin selection")); + mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_SPI); } } diff --git a/ports/stm/common-hal/busio/UART.c b/ports/stm/common-hal/busio/UART.c index 08dae7e425..0cd9061819 100644 --- a/ports/stm/common-hal/busio/UART.c +++ b/ports/stm/common-hal/busio/UART.c @@ -58,7 +58,7 @@ STATIC USART_TypeDef * assign_uart_or_throw(busio_uart_obj_t* self, bool pin_eva if (uart_taken) { mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } else { - mp_raise_ValueError(translate("Invalid UART pin selection")); + mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_UART); } } } diff --git a/ports/stm/common-hal/pulseio/PulseIn.c b/ports/stm/common-hal/pulseio/PulseIn.c index 4052c240fe..015ee8536d 100644 --- a/ports/stm/common-hal/pulseio/PulseIn.c +++ b/ports/stm/common-hal/pulseio/PulseIn.c @@ -249,7 +249,7 @@ uint16_t common_hal_pulseio_pulsein_get_item(pulseio_pulsein_obj_t* self, int16_ } if (index < 0 || index >= self->len) { HAL_NVIC_EnableIRQ(self->irq); - mp_raise_IndexError(translate("index out of range")); + mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_PulseIn); } uint16_t value = self->buffer[(self->start + index) % self->maxlen]; HAL_NVIC_EnableIRQ(self->irq); @@ -258,7 +258,7 @@ uint16_t common_hal_pulseio_pulsein_get_item(pulseio_pulsein_obj_t* self, int16_ uint16_t common_hal_pulseio_pulsein_popleft(pulseio_pulsein_obj_t* self) { if (self->len == 0) { - mp_raise_IndexError(translate("pop from an empty PulseIn")); + mp_raise_IndexError_varg(translate("pop from empty %q"), MP_QSTR_PulseIn); } HAL_NVIC_DisableIRQ(self->irq); uint16_t value = self->buffer[self->start]; diff --git a/ports/stm/common-hal/sdioio/SDCard.c b/ports/stm/common-hal/sdioio/SDCard.c new file mode 100644 index 0000000000..5f6010f01a --- /dev/null +++ b/ports/stm/common-hal/sdioio/SDCard.c @@ -0,0 +1,327 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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 + +#include "shared-bindings/sdioio/SDCard.h" +#include "py/mperrno.h" +#include "py/runtime.h" + +#include "shared-bindings/microcontroller/__init__.h" +#include "shared-bindings/util.h" +#include "boards/board.h" +#include "supervisor/shared/translate.h" +#include "common-hal/microcontroller/Pin.h" +#include "shared-bindings/microcontroller/Pin.h" + +STATIC bool reserved_sdio[MP_ARRAY_SIZE(mcu_sdio_banks)]; +STATIC bool never_reset_sdio[MP_ARRAY_SIZE(mcu_sdio_banks)]; + +STATIC const mcu_periph_obj_t *find_pin_function(const mcu_periph_obj_t *table, size_t sz, const mcu_pin_obj_t *pin, int periph_index) { + for(size_t i = 0; iperiph_index && pin == table->pin ) { + return table; + } + } + return NULL; +} + +//match pins to SDIO objects +STATIC int check_pins(sdioio_sdcard_obj_t *self, + const mcu_pin_obj_t * clock, const mcu_pin_obj_t * command, + uint8_t num_data, mcu_pin_obj_t ** data) { + bool sdio_taken = false; + + const uint8_t sdio_clock_len = MP_ARRAY_SIZE(mcu_sdio_clock_list); + const uint8_t sdio_command_len = MP_ARRAY_SIZE(mcu_sdio_command_list); + const uint8_t sdio_data0_len = MP_ARRAY_SIZE(mcu_sdio_data0_list); + const uint8_t sdio_data1_len = MP_ARRAY_SIZE(mcu_sdio_data1_list); + const uint8_t sdio_data2_len = MP_ARRAY_SIZE(mcu_sdio_data2_list); + const uint8_t sdio_data3_len = MP_ARRAY_SIZE(mcu_sdio_data3_list); + + + // Loop over each possibility for clock. Check whether all other pins can + // be used on the same peripheral + for (uint i = 0; i < sdio_clock_len; i++) { + const mcu_periph_obj_t *mcu_sdio_clock = &mcu_sdio_clock_list[i]; + if (mcu_sdio_clock->pin != clock) { + continue; + } + + int periph_index = mcu_sdio_clock->periph_index; + + const mcu_periph_obj_t *mcu_sdio_command = NULL; + if (!(mcu_sdio_command = find_pin_function(mcu_sdio_command_list, sdio_command_len, command, periph_index))) { + continue; + } + + const mcu_periph_obj_t *mcu_sdio_data0 = NULL; + if(!(mcu_sdio_data0 = find_pin_function(mcu_sdio_data0_list, sdio_data0_len, data[0], periph_index))) { + continue; + } + + const mcu_periph_obj_t *mcu_sdio_data1 = NULL; + if(num_data > 1 && !(mcu_sdio_data1 = find_pin_function(mcu_sdio_data1_list, sdio_data1_len, data[1], periph_index))) { + continue; + } + + const mcu_periph_obj_t *mcu_sdio_data2 = NULL; + if(num_data > 2 && !(mcu_sdio_data2 = find_pin_function(mcu_sdio_data2_list, sdio_data2_len, data[2], periph_index))) { + continue; + } + + const mcu_periph_obj_t *mcu_sdio_data3 = NULL; + if(num_data > 3 && !(mcu_sdio_data3 = find_pin_function(mcu_sdio_data3_list, sdio_data3_len, data[3], periph_index))) { + continue; + } + + if (reserved_sdio[periph_index-1]) { + sdio_taken = true; + continue; + } + + self->clock = mcu_sdio_clock; + self->command = mcu_sdio_command; + self->data[0] = mcu_sdio_data0; + self->data[1] = mcu_sdio_data1; + self->data[2] = mcu_sdio_data2; + self->data[3] = mcu_sdio_data3; + + return periph_index; + } + + if (sdio_taken) { + mp_raise_ValueError(translate("Hardware busy, try alternative pins")); + } else { + mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_SDIO); + } +} + + +void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self, + const mcu_pin_obj_t * clock, const mcu_pin_obj_t * command, + uint8_t num_data, mcu_pin_obj_t ** data, uint32_t frequency) { + + int periph_index = check_pins(self, clock, command, num_data, data); + SDIO_TypeDef * SDIOx = mcu_sdio_banks[periph_index - 1]; + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + /* Configure data pins */ + for (int i=0; inumber); + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Alternate = self->data[i]->altfn_index; + HAL_GPIO_Init(pin_port(data[i]->port), &GPIO_InitStruct); + } + + /* Configure command pin */ + GPIO_InitStruct.Alternate = self->command->altfn_index; + GPIO_InitStruct.Pin = pin_mask(command->number); + HAL_GPIO_Init(pin_port(command->port), &GPIO_InitStruct); + + /* Configure clock */ + GPIO_InitStruct.Alternate = self->clock->altfn_index; + GPIO_InitStruct.Pin = pin_mask(clock->number); + HAL_GPIO_Init(pin_port(clock->port), &GPIO_InitStruct); + + __HAL_RCC_SDIO_CLK_ENABLE(); + + self->handle.Init.ClockDiv = SDIO_TRANSFER_CLK_DIV; + self->handle.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING; + self->handle.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE; + self->handle.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE; + self->handle.Init.BusWide = SDIO_BUS_WIDE_1B; + self->handle.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE; + self->handle.Instance = SDIOx; + + HAL_StatusTypeDef r = HAL_SD_Init(&self->handle); + if (r != HAL_OK) { + mp_raise_ValueError_varg(translate("SDIO Init Error %d"), (int)r); + } + + HAL_SD_CardInfoTypeDef info; + r = HAL_SD_GetCardInfo(&self->handle, &info); + if (r != HAL_OK) { + mp_raise_ValueError_varg(translate("SDIO GetCardInfo Error %d"), (int)r); + } + + self->num_data = 1; + if (num_data == 4) { + if ((r = HAL_SD_ConfigWideBusOperation(&self->handle, SDIO_BUS_WIDE_4B)) == HAL_SD_ERROR_NONE) { + self->handle.Init.BusWide = SDIO_BUS_WIDE_4B; + self->num_data = 4; + } else { + } + } + + self->capacity = info.BlockNbr * (info.BlockSize / 512); + self->frequency = 25000000; + + reserved_sdio[periph_index - 1] = true; + + common_hal_mcu_pin_claim(clock); + common_hal_mcu_pin_claim(command); + for (int i=0; icapacity; +} + +uint32_t common_hal_sdioio_sdcard_get_frequency(sdioio_sdcard_obj_t *self) { + return self->frequency; +} + +uint8_t common_hal_sdioio_sdcard_get_width(sdioio_sdcard_obj_t *self) { + return self->num_data; +} + +STATIC void check_whole_block(mp_buffer_info_t *bufinfo) { + if (bufinfo->len % 512) { + mp_raise_ValueError(translate("Buffer must be a multiple of 512 bytes")); + } +} + +STATIC void wait_write_complete(sdioio_sdcard_obj_t *self) { + if (self->state_programming) { + HAL_SD_CardStateTypedef st = HAL_SD_CARD_PROGRAMMING; + // This waits up to 60s for programming to complete. This seems like + // an extremely long time, but this is the timeout that micropython's + // implementation uses + for (int i=0; i < 60000 && st == HAL_SD_CARD_PROGRAMMING; i++) { + st = HAL_SD_GetCardState(&self->handle); + HAL_Delay(1); + }; + self->state_programming = false; + } +} + +STATIC void check_for_deinit(sdioio_sdcard_obj_t *self) { + if (common_hal_sdioio_sdcard_deinited(self)) { + raise_deinited_error(); + } +} + +int common_hal_sdioio_sdcard_writeblocks(sdioio_sdcard_obj_t *self, uint32_t start_block, mp_buffer_info_t *bufinfo) { + check_for_deinit(self); + check_whole_block(bufinfo); + wait_write_complete(self); + self->state_programming = true; + common_hal_mcu_disable_interrupts(); + HAL_StatusTypeDef r = HAL_SD_WriteBlocks(&self->handle, bufinfo->buf, start_block, bufinfo->len / 512, 1000); + common_hal_mcu_enable_interrupts(); + if (r != HAL_OK) { + return -EIO; + } + return 0; +} + +int common_hal_sdioio_sdcard_readblocks(sdioio_sdcard_obj_t *self, uint32_t start_block, mp_buffer_info_t *bufinfo) { + check_for_deinit(self); + check_whole_block(bufinfo); + wait_write_complete(self); + common_hal_mcu_disable_interrupts(); + HAL_StatusTypeDef r = HAL_SD_ReadBlocks(&self->handle, bufinfo->buf, start_block, bufinfo->len / 512, 1000); + common_hal_mcu_enable_interrupts(); + if (r != HAL_OK) { + return -EIO; + } + return 0; +} + +bool common_hal_sdioio_sdcard_configure(sdioio_sdcard_obj_t *self, uint32_t frequency, uint8_t bits) { + check_for_deinit(self); + return true; +} + +bool common_hal_sdioio_sdcard_deinited(sdioio_sdcard_obj_t *self) { + return self->command == NULL; +} + +STATIC void never_reset_mcu_periph(const mcu_periph_obj_t *periph) { + if (periph) { + never_reset_pin_number(periph->pin->port,periph->pin->number); + } +} + +STATIC void reset_mcu_periph(const mcu_periph_obj_t *periph) { + if (periph) { + reset_pin_number(periph->pin->port,periph->pin->number); + } +} + +void common_hal_sdioio_sdcard_deinit(sdioio_sdcard_obj_t *self) { + if (common_hal_sdioio_sdcard_deinited(self)) { + return; + } + + reserved_sdio[self->command->periph_index - 1] = false; + never_reset_sdio[self->command->periph_index - 1] = false; + + reset_mcu_periph(self->command); + self->command = NULL; + + reset_mcu_periph(self->clock); + self->command = NULL; + + for (size_t i=0; idata); i++) { + reset_mcu_periph(self->data[i]); + self->data[i] = NULL; + } +} + +void common_hal_sdioio_sdcard_never_reset(sdioio_sdcard_obj_t *self) { + if (common_hal_sdioio_sdcard_deinited(self)) { + return; + } + + if (never_reset_sdio[self->command->periph_index] - 1) { + return; + } + + never_reset_sdio[self->command->periph_index - 1] = true; + + never_reset_mcu_periph(self->command); + never_reset_mcu_periph(self->clock); + + for (size_t i=0; idata); i++) { + never_reset_mcu_periph(self->data[i]); + } +} + +void sdioio_reset() { + for (size_t i=0; i", mp_obj_get_type_str(self_in), self->fd); + mp_printf(print, "", mp_obj_get_type_qstr(self_in), self->fd); } STATIC mp_uint_t fdfile_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *errcode) { diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index a39e0c9ddf..b70ae64a80 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -145,7 +145,7 @@ ifeq ($(CIRCUITPY_DIGITALIO),1) SRC_PATTERNS += digitalio/% endif ifeq ($(CIRCUITPY_DISPLAYIO),1) -SRC_PATTERNS += displayio/% terminalio/% fontio/% +SRC_PATTERNS += displayio/% endif ifeq ($(CIRCUITPY_VECTORIO),1) SRC_PATTERNS += vectorio/% @@ -222,6 +222,9 @@ endif ifeq ($(CIRCUITPY_SDIOIO),1) SRC_PATTERNS += sdioio/% endif +ifeq ($(CIRCUITPY_SHARPDISPLAY),1) +SRC_PATTERNS += sharpdisplay/% +endif ifeq ($(CIRCUITPY_STAGE),1) SRC_PATTERNS += _stage/% endif @@ -234,6 +237,9 @@ endif ifeq ($(CIRCUITPY_SUPERVISOR),1) SRC_PATTERNS += supervisor/% endif +ifeq ($(CIRCUITPY_TERMINALIO),1) +SRC_PATTERNS += terminalio/% fontio/% +endif ifeq ($(CIRCUITPY_TIME),1) SRC_PATTERNS += time/% endif @@ -409,6 +415,8 @@ SRC_SHARED_MODULE_ALL = \ random/__init__.c \ rgbmatrix/RGBMatrix.c \ rgbmatrix/__init__.c \ + sharpdisplay/SharpMemoryFramebuffer.c \ + sharpdisplay/__init__.c \ socket/__init__.c \ storage/__init__.c \ struct/__init__.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 255ab99b93..12d667d8f8 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -347,16 +347,20 @@ extern const struct _mp_obj_module_t displayio_module; extern const struct _mp_obj_module_t fontio_module; extern const struct _mp_obj_module_t terminalio_module; #define DISPLAYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_displayio), (mp_obj_t)&displayio_module }, -#define FONTIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_fontio), (mp_obj_t)&fontio_module }, -#define TERMINALIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_terminalio), (mp_obj_t)&terminalio_module }, #ifndef CIRCUITPY_DISPLAY_LIMIT #define CIRCUITPY_DISPLAY_LIMIT (1) #endif #else #define DISPLAYIO_MODULE +#define CIRCUITPY_DISPLAY_LIMIT (0) +#endif + +#if CIRCUITPY_DISPLAYIO && CIRCUITPY_TERMINALIO +#define FONTIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_fontio), (mp_obj_t)&fontio_module }, +#define TERMINALIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_terminalio), (mp_obj_t)&terminalio_module }, +#else #define FONTIO_MODULE #define TERMINALIO_MODULE -#define CIRCUITPY_DISPLAY_LIMIT (0) #endif #if CIRCUITPY_FRAMEBUFFERIO @@ -499,13 +503,6 @@ extern const struct _mp_obj_module_t pixelbuf_module; #define PIXELBUF_MODULE #endif -#if CIRCUITPY_RGBMATRIX -extern const struct _mp_obj_module_t rgbmatrix_module; -#define RGBMATRIX_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rgbmatrix),(mp_obj_t)&rgbmatrix_module }, -#else -#define RGBMATRIX_MODULE -#endif - #if CIRCUITPY_PULSEIO extern const struct _mp_obj_module_t pulseio_module; #define PULSEIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_pulseio), (mp_obj_t)&pulseio_module }, @@ -520,6 +517,13 @@ extern const struct _mp_obj_module_t ps2io_module; #define PS2IO_MODULE #endif +#if CIRCUITPY_RGBMATRIX +extern const struct _mp_obj_module_t rgbmatrix_module; +#define RGBMATRIX_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rgbmatrix),(mp_obj_t)&rgbmatrix_module }, +#else +#define RGBMATRIX_MODULE +#endif + #if CIRCUITPY_RANDOM extern const struct _mp_obj_module_t random_module; #define RANDOM_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_random), (mp_obj_t)&random_module }, @@ -562,6 +566,13 @@ extern const struct _mp_obj_module_t sdioio_module; #define SDIOIO_MODULE #endif +#if CIRCUITPY_SHARPDISPLAY +extern const struct _mp_obj_module_t sharpdisplay_module; +#define SHARPDISPLAY_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_sharpdisplay),(mp_obj_t)&sharpdisplay_module }, +#else +#define SHARPDISPLAY_MODULE +#endif + #if CIRCUITPY_STAGE extern const struct _mp_obj_module_t stage_module; #define STAGE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__stage), (mp_obj_t)&stage_module }, @@ -737,6 +748,7 @@ extern const struct _mp_obj_module_t watchdog_module; SAMD_MODULE \ SDCARDIO_MODULE \ SDIOIO_MODULE \ + SHARPDISPLAY_MODULE \ STAGE_MODULE \ STORAGE_MODULE \ STRUCT_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 2cf8426e5f..bdc1e77d54 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -95,7 +95,11 @@ CFLAGS += -DCIRCUITPY_COUNTIO=$(CIRCUITPY_COUNTIO) CIRCUITPY_DISPLAYIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_DISPLAYIO=$(CIRCUITPY_DISPLAYIO) +ifeq ($(CIRCUITPY_DISPLAYIO),1) +CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD) +else CIRCUITPY_FRAMEBUFFERIO ?= 0 +endif CFLAGS += -DCIRCUITPY_FRAMEBUFFERIO=$(CIRCUITPY_FRAMEBUFFERIO) CIRCUITPY_VECTORIO ?= $(CIRCUITPY_DISPLAYIO) @@ -144,7 +148,6 @@ CFLAGS += -DCIRCUITPY_OS=$(CIRCUITPY_OS) CIRCUITPY_PIXELBUF ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_PIXELBUF=$(CIRCUITPY_PIXELBUF) -# Only for SAMD boards for the moment CIRCUITPY_RGBMATRIX ?= 0 CFLAGS += -DCIRCUITPY_RGBMATRIX=$(CIRCUITPY_RGBMATRIX) @@ -176,6 +179,9 @@ CFLAGS += -DCIRCUITPY_SDCARDIO=$(CIRCUITPY_SDCARDIO) CIRCUITPY_SDIOIO ?= 0 CFLAGS += -DCIRCUITPY_SDIOIO=$(CIRCUITPY_SDIOIO) +CIRCUITPY_SHARPDISPLAY ?= $(CIRCUITPY_FRAMEBUFFERIO) +CFLAGS += -DCIRCUITPY_SHARPDISPLAY=$(CIRCUITPY_SHARPDISPLAY) + # Currently always off. CIRCUITPY_STAGE ?= 0 CFLAGS += -DCIRCUITPY_STAGE=$(CIRCUITPY_STAGE) @@ -189,6 +195,9 @@ CFLAGS += -DCIRCUITPY_STRUCT=$(CIRCUITPY_STRUCT) CIRCUITPY_SUPERVISOR ?= 1 CFLAGS += -DCIRCUITPY_SUPERVISOR=$(CIRCUITPY_SUPERVISOR) +CIRCUITPY_TERMINALIO ?= $(CIRCUITPY_DISPLAYIO) +CFLAGS += -DCIRCUITPY_TERMINALIO=$(CIRCUITPY_TERMINALIO) + CIRCUITPY_TIME ?= 1 CFLAGS += -DCIRCUITPY_TIME=$(CIRCUITPY_TIME) diff --git a/py/makeqstrdata.py b/py/makeqstrdata.py index df2c687e5c..04c8938766 100644 --- a/py/makeqstrdata.py +++ b/py/makeqstrdata.py @@ -102,10 +102,6 @@ def translate(translation_file, i18ns): def compute_huffman_coding(translations, qstrs, compression_filename): all_strings = [x[1] for x in translations] - - # go through each qstr and print it out - for _, _, qstr in qstrs.values(): - all_strings.append(qstr) all_strings_concat = "".join(all_strings) counts = collections.Counter(all_strings_concat) cb = huffman.codebook(counts.items()) @@ -259,8 +255,6 @@ def compress(encoding_table, decompressed, encoded_length_bits, len_translation_ current_bit -= 1 if current_bit != 7: current_byte += 1 - if current_byte > len(decompressed): - print("Note: compression increased length", repr(decompressed), len(decompressed), current_byte, file=sys.stderr) return enc[:current_byte] def qstr_escape(qst): diff --git a/py/obj.c b/py/obj.c index 7644b5de8e..0cff2f1a4b 100644 --- a/py/obj.c +++ b/py/obj.c @@ -58,7 +58,7 @@ mp_obj_type_t *mp_obj_get_type(mp_const_obj_t o_in) { } const char *mp_obj_get_type_str(mp_const_obj_t o_in) { - return qstr_str(mp_obj_get_type(o_in)->name); + return qstr_str(mp_obj_get_type_qstr(o_in)); } void mp_obj_print_helper(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind) { @@ -260,10 +260,10 @@ mp_int_t mp_obj_get_int(mp_const_obj_t arg) { return mp_obj_int_get_checked(arg); } else { if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { - mp_raise_TypeError(translate("can't convert to int")); + mp_raise_TypeError_varg(translate("can't convert to %q"), MP_QSTR_int); } else { mp_raise_TypeError_varg( - translate("can't convert %s to int"), mp_obj_get_type_str(arg)); + translate("can't convert %q to %q"), mp_obj_get_type_qstr(arg), MP_QSTR_int); } } } @@ -323,10 +323,10 @@ mp_float_t mp_obj_get_float(mp_obj_t arg) { if (!mp_obj_get_float_maybe(arg, &val)) { if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { - mp_raise_TypeError(translate("can't convert to float")); + mp_raise_TypeError_varg(translate("can't convert to %q"), MP_QSTR_float); } else { mp_raise_TypeError_varg( - translate("can't convert %s to float"), mp_obj_get_type_str(arg)); + translate("can't convert %q to %q"), mp_obj_get_type_qstr(arg), MP_QSTR_float); } } @@ -356,10 +356,10 @@ void mp_obj_get_complex(mp_obj_t arg, mp_float_t *real, mp_float_t *imag) { mp_obj_complex_get(arg, real, imag); } else { if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { - mp_raise_TypeError(translate("can't convert to complex")); + mp_raise_TypeError_varg(translate("can't convert to %q"), MP_QSTR_complex); } else { mp_raise_TypeError_varg( - translate("can't convert %s to complex"), mp_obj_get_type_str(arg)); + translate("can't convert %q to %q"), mp_obj_get_type_qstr(arg), MP_QSTR_complex); } } } @@ -377,7 +377,7 @@ void mp_obj_get_array(mp_obj_t o, size_t *len, mp_obj_t **items) { mp_raise_TypeError(translate("expected tuple/list")); } else { mp_raise_TypeError_varg( - translate("object '%s' is not a tuple or list"), mp_obj_get_type_str(o)); + translate("object '%q' is not a tuple or list"), mp_obj_get_type_qstr(o)); } } } @@ -406,8 +406,8 @@ size_t mp_get_index(const mp_obj_type_t *type, size_t len, mp_obj_t index, bool mp_raise_TypeError(translate("indices must be integers")); } else { mp_raise_TypeError_varg( - translate("%q indices must be integers, not %s"), - type->name, mp_obj_get_type_str(index)); + translate("%q indices must be integers, not %q"), + type->name, mp_obj_get_type_qstr(index)); } } @@ -461,7 +461,7 @@ mp_obj_t mp_obj_len(mp_obj_t o_in) { mp_raise_TypeError(translate("object has no len")); } else { mp_raise_TypeError_varg( - translate("object of type '%s' has no len()"), mp_obj_get_type_str(o_in)); + translate("object of type '%q' has no len()"), mp_obj_get_type_qstr(o_in)); } } else { return len; @@ -504,21 +504,21 @@ mp_obj_t mp_obj_subscr(mp_obj_t base, mp_obj_t index, mp_obj_t value) { mp_raise_TypeError(translate("object does not support item deletion")); } else { mp_raise_TypeError_varg( - translate("'%s' object does not support item deletion"), mp_obj_get_type_str(base)); + translate("'%q' object does not support item deletion"), mp_obj_get_type_qstr(base)); } } else if (value == MP_OBJ_SENTINEL) { if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { mp_raise_TypeError(translate("object is not subscriptable")); } else { mp_raise_TypeError_varg( - translate("'%s' object is not subscriptable"), mp_obj_get_type_str(base)); + translate("'%q' object is not subscriptable"), mp_obj_get_type_qstr(base)); } } else { if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { mp_raise_TypeError(translate("object does not support item assignment")); } else { mp_raise_TypeError_varg( - translate("'%s' object does not support item assignment"), mp_obj_get_type_str(base)); + translate("'%q' object does not support item assignment"), mp_obj_get_type_qstr(base)); } } } diff --git a/py/obj.h b/py/obj.h index e603d4a496..e9d867f77b 100644 --- a/py/obj.h +++ b/py/obj.h @@ -680,6 +680,7 @@ mp_obj_t mp_obj_new_memoryview(byte typecode, size_t nitems, void *items); mp_obj_type_t *mp_obj_get_type(mp_const_obj_t o_in); const char *mp_obj_get_type_str(mp_const_obj_t o_in); +#define mp_obj_get_type_qstr(o_in) (mp_obj_get_type((o_in))->name) bool mp_obj_is_subclass_fast(mp_const_obj_t object, mp_const_obj_t classinfo); // arguments should be type objects mp_obj_t mp_instance_cast_to_native_base(mp_obj_t self_in, mp_const_obj_t native_type); diff --git a/py/objdict.c b/py/objdict.c index 39169fe1ad..63fd86f357 100644 --- a/py/objdict.c +++ b/py/objdict.c @@ -313,7 +313,7 @@ STATIC mp_obj_t dict_popitem(mp_obj_t self_in) { size_t cur = 0; mp_map_elem_t *next = dict_iter_next(self, &cur); if (next == NULL) { - mp_raise_msg(&mp_type_KeyError, translate("popitem(): dictionary is empty")); + mp_raise_msg_varg(&mp_type_KeyError, translate("pop from empty %q"), MP_QSTR_dict); } self->map.used--; mp_obj_t items[] = {next->key, next->value}; diff --git a/py/objint.c b/py/objint.c index 82f5aadd18..b12bb39952 100644 --- a/py/objint.c +++ b/py/objint.c @@ -141,9 +141,9 @@ STATIC mp_fp_as_int_class_t mp_classify_fp_as_int(mp_float_t val) { mp_obj_t mp_obj_new_int_from_float(mp_float_t val) { int cl = fpclassify(val); if (cl == FP_INFINITE) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_OverflowError, translate("can't convert inf to int"))); + mp_raise_OverflowError_varg(translate("can't convert %q to %q"), MP_QSTR_inf, MP_QSTR_int); } else if (cl == FP_NAN) { - mp_raise_ValueError(translate("can't convert NaN to int")); + mp_raise_ValueError_varg(translate("can't convert %q to %q"), MP_QSTR_NaN, MP_QSTR_int); } else { mp_fp_as_int_class_t icl = mp_classify_fp_as_int(val); if (icl == MP_FP_CLASS_FIT_SMALLINT) { diff --git a/py/objlist.c b/py/objlist.c index 9242020d45..51ec920be1 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -274,7 +274,7 @@ STATIC mp_obj_t list_pop(size_t n_args, const mp_obj_t *args) { mp_check_self(MP_OBJ_IS_TYPE(args[0], &mp_type_list)); mp_obj_list_t *self = mp_instance_cast_to_native_base(args[0], &mp_type_list); if (self->len == 0) { - mp_raise_IndexError(translate("pop from empty list")); + mp_raise_IndexError_varg(translate("pop from empty %q"), MP_QSTR_list); } size_t index = mp_get_index(self->base.type, self->len, n_args == 1 ? MP_OBJ_NEW_SMALL_INT(-1) : args[1], false); mp_obj_t ret = self->items[index]; diff --git a/py/objset.c b/py/objset.c index d986c6ddaf..b8f0f07ede 100644 --- a/py/objset.c +++ b/py/objset.c @@ -368,7 +368,7 @@ STATIC mp_obj_t set_pop(mp_obj_t self_in) { mp_obj_set_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_t obj = mp_set_remove_first(&self->set); if (obj == MP_OBJ_NULL) { - mp_raise_msg(&mp_type_KeyError, translate("pop from an empty set")); + mp_raise_msg_varg(&mp_type_KeyError, translate("pop from empty %q"), MP_QSTR_set); } return obj; } diff --git a/py/objstr.c b/py/objstr.c index 5e0c6fdfaa..edb562df27 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -1076,7 +1076,7 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar } field_name = str_to_int(field_name, field_name_top, &index); if ((uint)index >= n_args - 1) { - mp_raise_IndexError(translate("tuple index out of range")); + mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_tuple); } arg = args[index + 1]; *arg_i = -1; @@ -1104,7 +1104,7 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar } } if ((uint)*arg_i >= n_args - 1) { - mp_raise_IndexError(translate("tuple index out of range")); + mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_tuple); } arg = args[(*arg_i) + 1]; (*arg_i)++; @@ -1280,8 +1280,8 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar terse_str_format_value_error(); } else { mp_raise_ValueError_varg( - translate("unknown format code '%c' for object of type '%s'"), - type, mp_obj_get_type_str(arg)); + translate("unknown format code '%c' for object of type '%q'"), + type, mp_obj_get_type_qstr(arg)); } } } @@ -1352,8 +1352,8 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar terse_str_format_value_error(); } else { mp_raise_ValueError_varg( - translate("unknown format code '%c' for object of type '%s'"), - type, mp_obj_get_type_str(arg)); + translate("unknown format code '%c' for object of type '%q'"), + type, mp_obj_get_type_qstr(arg)); } } } else { @@ -1388,8 +1388,8 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar terse_str_format_value_error(); } else { mp_raise_ValueError_varg( - translate("unknown format code '%c' for object of type '%s'"), - type, mp_obj_get_type_str(arg)); + translate("unknown format code '%c' for object of type '%q'"), + type, mp_obj_get_type_qstr(arg)); } } } @@ -2133,7 +2133,7 @@ STATIC NORETURN void bad_implicit_conversion(mp_obj_t self_in) { if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { mp_raise_TypeError(translate("can't convert to str implicitly")); } else { - const qstr src_name = mp_obj_get_type(self_in)->name; + const qstr src_name = mp_obj_get_type_qstr(self_in); nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError, translate("can't convert '%q' object to %q implicitly"), src_name, src_name == MP_QSTR_str ? MP_QSTR_bytes : MP_QSTR_str)); diff --git a/py/objstrunicode.c b/py/objstrunicode.c index 351a67e913..50250abfa9 100644 --- a/py/objstrunicode.c +++ b/py/objstrunicode.c @@ -151,7 +151,7 @@ const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, s if (MP_OBJ_IS_SMALL_INT(index)) { i = MP_OBJ_SMALL_INT_VALUE(index); } else if (!mp_obj_get_int_maybe(index, &i)) { - mp_raise_TypeError_varg(translate("string indices must be integers, not %s"), mp_obj_get_type_str(index)); + mp_raise_TypeError_varg(translate("string indices must be integers, not %q"), mp_obj_get_type_qstr(index)); } const byte *s, *top = self_data + self_len; if (i < 0) @@ -162,7 +162,7 @@ const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, s if (is_slice) { return self_data; } - mp_raise_IndexError(translate("string index out of range")); + mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_str); } if (!UTF8_IS_CONT(*s)) { ++i; @@ -181,7 +181,7 @@ const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, s if (is_slice) { return top; } - mp_raise_IndexError(translate("string index out of range")); + mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_str); } // Then check completion if (i-- == 0) { diff --git a/py/objtype.c b/py/objtype.c index fd51ce36b8..ccd014c335 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -193,7 +193,7 @@ STATIC void mp_obj_class_lookup(struct class_lookup_data *lookup, const mp_obj_ printf("mp_obj_class_lookup: Returning: "); mp_obj_print(lookup->dest[0], PRINT_REPR); printf(" "); // Don't try to repr() lookup->dest[1], as we can be called recursively - printf("<%s @%p>\n", mp_obj_get_type_str(lookup->dest[1]), lookup->dest[1]); + printf("<%q @%p>\n", mp_obj_get_type_qstr(lookup->dest[1]), lookup->dest[1]); #endif return; } @@ -285,7 +285,7 @@ STATIC void instance_print(const mp_print_t *print, mp_obj_t self_in, mp_print_k } // TODO: CPython prints fully-qualified type name - mp_printf(print, "<%s object at %p>", mp_obj_get_type_str(self_in), self); + mp_printf(print, "<%q object at %p>", mp_obj_get_type_qstr(self_in), self); } mp_obj_t mp_obj_instance_make_new(const mp_obj_type_t *self, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { @@ -376,8 +376,8 @@ mp_obj_t mp_obj_instance_make_new(const mp_obj_type_t *self, size_t n_args, cons if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { mp_raise_TypeError(translate("__init__() should return None")); } else { - mp_raise_TypeError_varg(translate("__init__() should return None, not '%s'"), - mp_obj_get_type_str(init_ret)); + mp_raise_TypeError_varg(translate("__init__() should return None, not '%q'"), + mp_obj_get_type_qstr(init_ret)); } } @@ -891,8 +891,8 @@ mp_obj_t mp_obj_instance_call(mp_obj_t self_in, size_t n_args, size_t n_kw, cons if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { mp_raise_TypeError(translate("object not callable")); } else { - mp_raise_TypeError_varg(translate("'%s' object is not callable"), - mp_obj_get_type_str(self_in)); + mp_raise_TypeError_varg(translate("'%q' object is not callable"), + mp_obj_get_type_qstr(self_in)); } } mp_obj_instance_t *self = MP_OBJ_TO_PTR(self_in); diff --git a/py/proto.c b/py/proto.c index e5053130b8..e4da157f05 100644 --- a/py/proto.c +++ b/py/proto.c @@ -45,6 +45,6 @@ const void *mp_proto_get_or_throw(uint16_t name, mp_const_obj_t obj) { if (proto) { return proto; } - mp_raise_TypeError_varg(translate("'%s' object does not support '%q'"), - mp_obj_get_type_str(obj), name); + mp_raise_TypeError_varg(translate("'%q' object does not support '%q'"), + mp_obj_get_type_qstr(obj), name); } diff --git a/py/qstr.c b/py/qstr.c index 17d8517c93..c9ba298fb7 100755 --- a/py/qstr.c +++ b/py/qstr.c @@ -137,6 +137,7 @@ STATIC const byte *find_qstr(qstr q) { while (q < pool->total_prev_len) { pool = pool->prev; } + assert(q - pool->total_prev_len < pool->len); return pool->qstrs[q - pool->total_prev_len]; } diff --git a/py/runtime.c b/py/runtime.c index 91ead1fba9..f9ef7819d1 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -279,8 +279,8 @@ mp_obj_t mp_unary_op(mp_unary_op_t op, mp_obj_t arg) { mp_raise_TypeError(translate("unsupported type for operator")); } else { mp_raise_TypeError_varg( - translate("unsupported type for %q: '%s'"), - mp_unary_op_method_name[op], mp_obj_get_type_str(arg)); + translate("unsupported type for %q: '%q'"), + mp_unary_op_method_name[op], mp_obj_get_type_qstr(arg)); } } } @@ -586,8 +586,8 @@ unsupported_op: mp_raise_TypeError(translate("unsupported type for operator")); } else { mp_raise_TypeError_varg( - translate("unsupported types for %q: '%s', '%s'"), - mp_binary_op_method_name[op], mp_obj_get_type_str(lhs), mp_obj_get_type_str(rhs)); + translate("unsupported types for %q: '%q', '%q'"), + mp_binary_op_method_name[op], mp_obj_get_type_qstr(lhs), mp_obj_get_type_qstr(rhs)); } zero_division: @@ -627,7 +627,7 @@ mp_obj_t mp_call_function_n_kw(mp_obj_t fun_in, size_t n_args, size_t n_kw, cons if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { mp_raise_TypeError(translate("object not callable")); } else { - mp_raise_TypeError_varg(translate("'%s' object is not callable"), mp_obj_get_type_str(fun_in)); + mp_raise_TypeError_varg(translate("'%q' object is not callable"), mp_obj_get_type_qstr(fun_in)); } } @@ -1104,8 +1104,8 @@ void mp_load_method(mp_obj_t base, qstr attr, mp_obj_t *dest) { ((mp_obj_type_t*)MP_OBJ_TO_PTR(base))->name, attr)); } else { nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_AttributeError, - translate("'%s' object has no attribute '%q'"), - mp_obj_get_type_str(base), attr)); + translate("'%q' object has no attribute '%q'"), + mp_obj_get_type_qstr(base), attr)); } } } @@ -1172,8 +1172,8 @@ void mp_store_attr(mp_obj_t base, qstr attr, mp_obj_t value) { mp_raise_AttributeError(translate("no such attribute")); } else { nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_AttributeError, - translate("'%s' object cannot assign attribute '%q'"), - mp_obj_get_type_str(base), attr)); + translate("'%q' object cannot assign attribute '%q'"), + mp_obj_get_type_qstr(base), attr)); } } @@ -1213,7 +1213,7 @@ mp_obj_t mp_getiter(mp_obj_t o_in, mp_obj_iter_buf_t *iter_buf) { mp_raise_TypeError(translate("object not iterable")); } else { mp_raise_TypeError_varg( - translate("'%s' object is not iterable"), mp_obj_get_type_str(o_in)); + translate("'%q' object is not iterable"), mp_obj_get_type_qstr(o_in)); } } @@ -1234,8 +1234,8 @@ mp_obj_t mp_iternext_allow_raise(mp_obj_t o_in) { if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { mp_raise_TypeError(translate("object not an iterator")); } else { - mp_raise_TypeError_varg(translate("'%s' object is not an iterator"), - mp_obj_get_type_str(o_in)); + mp_raise_TypeError_varg(translate("'%q' object is not an iterator"), + mp_obj_get_type_qstr(o_in)); } } } @@ -1270,8 +1270,8 @@ mp_obj_t mp_iternext(mp_obj_t o_in) { if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { mp_raise_TypeError(translate("object not an iterator")); } else { - mp_raise_TypeError_varg(translate("'%s' object is not an iterator"), - mp_obj_get_type_str(o_in)); + mp_raise_TypeError_varg(translate("'%q' object is not an iterator"), + mp_obj_get_type_qstr(o_in)); } } } @@ -1522,12 +1522,16 @@ NORETURN void mp_raise_msg(const mp_obj_type_t *exc_type, const compressed_strin } } +NORETURN void mp_raise_msg_vlist(const mp_obj_type_t *exc_type, const compressed_string_t *fmt, va_list argptr) { + mp_obj_t exception = mp_obj_new_exception_msg_vlist(exc_type, fmt, argptr); + nlr_raise(exception); +} + NORETURN void mp_raise_msg_varg(const mp_obj_type_t *exc_type, const compressed_string_t *fmt, ...) { va_list argptr; va_start(argptr,fmt); - mp_obj_t exception = mp_obj_new_exception_msg_vlist(exc_type, fmt, argptr); + mp_raise_msg_vlist(exc_type, fmt, argptr); va_end(argptr); - nlr_raise(exception); } NORETURN void mp_raise_AttributeError(const compressed_string_t *msg) { @@ -1546,6 +1550,13 @@ NORETURN void mp_raise_IndexError(const compressed_string_t *msg) { mp_raise_msg(&mp_type_IndexError, msg); } +NORETURN void mp_raise_IndexError_varg(const compressed_string_t *fmt, ...) { + va_list argptr; + va_start(argptr,fmt); + mp_raise_msg_vlist(&mp_type_IndexError, fmt, argptr); + va_end(argptr); +} + NORETURN void mp_raise_ValueError(const compressed_string_t *msg) { mp_raise_msg(&mp_type_ValueError, msg); } @@ -1553,9 +1564,8 @@ NORETURN void mp_raise_ValueError(const compressed_string_t *msg) { NORETURN void mp_raise_ValueError_varg(const compressed_string_t *fmt, ...) { va_list argptr; va_start(argptr,fmt); - mp_obj_t exception = mp_obj_new_exception_msg_vlist(&mp_type_ValueError, fmt, argptr); + mp_raise_msg_vlist(&mp_type_ValueError, fmt, argptr); va_end(argptr); - nlr_raise(exception); } NORETURN void mp_raise_TypeError(const compressed_string_t *msg) { @@ -1565,9 +1575,8 @@ NORETURN void mp_raise_TypeError(const compressed_string_t *msg) { NORETURN void mp_raise_TypeError_varg(const compressed_string_t *fmt, ...) { va_list argptr; va_start(argptr,fmt); - mp_obj_t exception = mp_obj_new_exception_msg_vlist(&mp_type_TypeError, fmt, argptr); + mp_raise_msg_vlist(&mp_type_TypeError, fmt, argptr); va_end(argptr); - nlr_raise(exception); } NORETURN void mp_raise_OSError(int errno_) { @@ -1589,9 +1598,8 @@ NORETURN void mp_raise_OSError_errno_str(int errno_, mp_obj_t str) { NORETURN void mp_raise_OSError_msg_varg(const compressed_string_t *fmt, ...) { va_list argptr; va_start(argptr,fmt); - mp_obj_t exception = mp_obj_new_exception_msg_vlist(&mp_type_OSError, fmt, argptr); + mp_raise_msg_vlist(&mp_type_OSError, fmt, argptr); va_end(argptr); - nlr_raise(exception); } NORETURN void mp_raise_NotImplementedError(const compressed_string_t *msg) { @@ -1601,17 +1609,15 @@ NORETURN void mp_raise_NotImplementedError(const compressed_string_t *msg) { NORETURN void mp_raise_NotImplementedError_varg(const compressed_string_t *fmt, ...) { va_list argptr; va_start(argptr,fmt); - mp_obj_t exception = mp_obj_new_exception_msg_vlist(&mp_type_NotImplementedError, fmt, argptr); + mp_raise_msg_vlist(&mp_type_NotImplementedError, fmt, argptr); va_end(argptr); - nlr_raise(exception); } NORETURN void mp_raise_OverflowError_varg(const compressed_string_t *fmt, ...) { va_list argptr; va_start(argptr,fmt); - mp_obj_t exception = mp_obj_new_exception_msg_vlist(&mp_type_OverflowError, fmt, argptr); + mp_raise_msg_vlist(&mp_type_OverflowError, fmt, argptr); va_end(argptr); - nlr_raise(exception); } NORETURN void mp_raise_MpyError(const compressed_string_t *msg) { diff --git a/py/runtime.h b/py/runtime.h index d3a82333e7..dbc04b94ec 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -152,6 +152,7 @@ void mp_import_all(mp_obj_t module); NORETURN void mp_raise_msg(const mp_obj_type_t *exc_type, const compressed_string_t *msg); NORETURN void mp_raise_msg_varg(const mp_obj_type_t *exc_type, const compressed_string_t *fmt, ...); +NORETURN void mp_raise_msg_vlist(const mp_obj_type_t *exc_type, const compressed_string_t *fmt, va_list argptr); NORETURN void mp_raise_ValueError(const compressed_string_t *msg); NORETURN void mp_raise_ValueError_varg(const compressed_string_t *fmt, ...); NORETURN void mp_raise_TypeError(const compressed_string_t *msg); @@ -160,6 +161,7 @@ NORETURN void mp_raise_AttributeError(const compressed_string_t *msg); NORETURN void mp_raise_RuntimeError(const compressed_string_t *msg); 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, ...); NORETURN void mp_raise_OSError(int errno_); NORETURN void mp_raise_OSError_errno_str(int errno_, mp_obj_t str); NORETURN void mp_raise_OSError_msg(const compressed_string_t *msg); diff --git a/shared-bindings/_bleio/Adapter.c b/shared-bindings/_bleio/Adapter.c index f898d404a0..3ffe65be3d 100644 --- a/shared-bindings/_bleio/Adapter.c +++ b/shared-bindings/_bleio/Adapter.c @@ -96,7 +96,7 @@ const mp_obj_property_t bleio_adapter_enabled_obj = { }; //| address: Address -//| """MAC address of the BLE adapter. (read-only)""" +//| """MAC address of the BLE adapter.""" //| STATIC mp_obj_t bleio_adapter_get_address(mp_obj_t self) { return MP_OBJ_FROM_PTR(common_hal_bleio_adapter_get_address(self)); @@ -104,10 +104,18 @@ STATIC mp_obj_t bleio_adapter_get_address(mp_obj_t self) { } MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_get_address_obj, bleio_adapter_get_address); +STATIC mp_obj_t bleio_adapter_set_address(mp_obj_t self, mp_obj_t new_address) { + if (!common_hal_bleio_adapter_set_address(self, new_address)) { + mp_raise_bleio_BluetoothError(translate("Could not set address")); + } + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(bleio_adapter_set_address_obj, bleio_adapter_set_address); + const mp_obj_property_t bleio_adapter_address_obj = { .base.type = &mp_type_property, .proxy = { (mp_obj_t)&bleio_adapter_get_address_obj, - (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&bleio_adapter_set_address_obj, (mp_obj_t)&mp_const_none_obj }, }; @@ -145,8 +153,8 @@ const mp_obj_property_t bleio_adapter_name_obj = { //| .. note: If you set ``anonymous=True``, then a timeout must be specified. If no timeout is //| specified, then the maximum allowed timeout will be selected automatically. //| -//| :param buf data: advertising data packet bytes -//| :param buf scan_response: scan response data packet bytes. ``None`` if no scan response is needed. +//| :param ~_typing.ReadableBuffer data: advertising data packet bytes +//| :param ~_typing.ReadableBuffer scan_response: scan response data packet bytes. ``None`` if no scan response is needed. //| :param bool connectable: If `True` then other devices are allowed to connect to this peripheral. //| :param bool anonymous: If `True` then this device's MAC address is randomized before advertising. //| :param int timeout: If set, we will only advertise for this many seconds. @@ -219,7 +227,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_stop_advertising_obj, bleio_adapt //| """Starts a BLE scan and returns an iterator of results. Advertisements and scan responses are //| filtered and returned separately. //| -//| :param sequence prefixes: Sequence of byte string prefixes to filter advertising packets +//| :param ~_typing.ReadableBuffer prefixes: Sequence of byte string prefixes to filter advertising packets //| with. A packet without an advertising structure that matches one of the prefixes is //| ignored. Format is one byte for length (n) and n bytes of prefix and can be repeated. //| :param int buffer_size: the maximum number of advertising bytes to buffer. @@ -334,7 +342,7 @@ const mp_obj_property_t bleio_adapter_connected_obj = { (mp_obj_t)&mp_const_none_obj }, }; -//| connections: tuple +//| connections: Tuple[Connection] //| """Tuple of active connections including those initiated through //| :py:meth:`_bleio.Adapter.connect`. (read-only)""" //| diff --git a/shared-bindings/_bleio/Adapter.h b/shared-bindings/_bleio/Adapter.h index 39147b6ebc..3523733577 100644 --- a/shared-bindings/_bleio/Adapter.h +++ b/shared-bindings/_bleio/Adapter.h @@ -42,6 +42,7 @@ extern bool common_hal_bleio_adapter_get_enabled(bleio_adapter_obj_t *self); extern void common_hal_bleio_adapter_set_enabled(bleio_adapter_obj_t *self, bool enabled); extern bool common_hal_bleio_adapter_get_connected(bleio_adapter_obj_t *self); extern bleio_address_obj_t *common_hal_bleio_adapter_get_address(bleio_adapter_obj_t *self); +extern bool common_hal_bleio_adapter_set_address(bleio_adapter_obj_t *self, bleio_address_obj_t *address); extern mp_obj_str_t* common_hal_bleio_adapter_get_name(bleio_adapter_obj_t *self); extern void common_hal_bleio_adapter_set_name(bleio_adapter_obj_t *self, const char* name); diff --git a/shared-bindings/_bleio/Address.c b/shared-bindings/_bleio/Address.c index 94994fb702..1f168d31af 100644 --- a/shared-bindings/_bleio/Address.c +++ b/shared-bindings/_bleio/Address.c @@ -42,7 +42,7 @@ //| """Create a new Address object encapsulating the address value. //| The value itself can be one of: //| -//| :param buf address: The address value to encapsulate. A buffer object (bytearray, bytes) of 6 bytes. +//| :param ~_typing.ReadableBuffer address: The address value to encapsulate. A buffer object (bytearray, bytes) of 6 bytes. //| :param int address_type: one of the integer values: `PUBLIC`, `RANDOM_STATIC`, //| `RANDOM_PRIVATE_RESOLVABLE`, or `RANDOM_PRIVATE_NON_RESOLVABLE`.""" //| ... @@ -128,7 +128,7 @@ const mp_obj_property_t bleio_address_type_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| def __eq__(self, other: Address) -> bool: +//| def __eq__(self, other: object) -> bool: //| """Two Address objects are equal if their addresses and address types are equal.""" //| ... //| diff --git a/shared-bindings/_bleio/Characteristic.c b/shared-bindings/_bleio/Characteristic.c index 557a356b69..dbbacb7d57 100644 --- a/shared-bindings/_bleio/Characteristic.c +++ b/shared-bindings/_bleio/Characteristic.c @@ -63,7 +63,7 @@ //| is 512, or possibly 510 if ``fixed_length`` is False. The default, 20, is the maximum //| number of data bytes that fit in a single BLE 4.x ATT packet. //| :param bool fixed_length: True if the characteristic value is of fixed length. -//| :param buf initial_value: The initial value for this characteristic. If not given, will be +//| :param ~_typing.ReadableBuffer initial_value: The initial value for this characteristic. If not given, will be //| filled with zeros. //| //| :return: the new Characteristic.""" diff --git a/shared-bindings/_bleio/Connection.c b/shared-bindings/_bleio/Connection.c index ed480ec04d..5d1b63bdd6 100644 --- a/shared-bindings/_bleio/Connection.c +++ b/shared-bindings/_bleio/Connection.c @@ -111,12 +111,12 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_connection_pair_obj, 1, bleio_connection //| def discover_remote_services(self, service_uuids_whitelist: Optional[Iterable[UUID]] = None) -> Tuple[Service, ...]: //| """Do BLE discovery for all services or for the given service UUIDS, -//| to find their handles and characteristics, and return the discovered services. -//| `Connection.connected` must be True. +//| to find their handles and characteristics, and return the discovered services. +//| `Connection.connected` must be True. //| //| :param iterable service_uuids_whitelist: //| -//| an iterable of :py:class:~`UUID` objects for the services provided by the peripheral +//| an iterable of :py:class:`UUID` objects for the services provided by the peripheral //| that you want to use. //| //| The peripheral may provide more services, but services not listed are ignored @@ -126,7 +126,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_connection_pair_obj, 1, bleio_connection //| slow. //| //| If the service UUID is 128-bit, or its characteristic UUID's are 128-bit, you -//| you must have already created a :py:class:~`UUID` object for that UUID in order for the +//| you must have already created a :py:class:`UUID` object for that UUID in order for the //| service or characteristic to be discovered. Creating the UUID causes the UUID to be //| registered for use. (This restriction may be lifted in the future.) //| diff --git a/shared-bindings/_bleio/Descriptor.c b/shared-bindings/_bleio/Descriptor.c index e24751f759..97422f1630 100644 --- a/shared-bindings/_bleio/Descriptor.c +++ b/shared-bindings/_bleio/Descriptor.c @@ -46,7 +46,7 @@ //| as part of remote Characteristics in the remote Services that are discovered.""" //| //| @classmethod -//| def add_to_characteristic(characteristic: Characteristic, uuid: UUID, *, read_perm: int = Attribute.OPEN, write_perm: int = Attribute.OPEN, max_length = 20, fixed_length: bool = False, initial_value: ReadableBuffer = b'') -> Descriptor: +//| def add_to_characteristic(cls, characteristic: Characteristic, uuid: UUID, *, read_perm: int = Attribute.OPEN, write_perm: int = Attribute.OPEN, max_length: int = 20, fixed_length: bool = False, initial_value: ReadableBuffer = b'') -> Descriptor: //| """Create a new Descriptor object, and add it to this Service. //| //| :param Characteristic characteristic: The characteristic that will hold this descriptor @@ -61,7 +61,7 @@ //| is 512, or possibly 510 if ``fixed_length`` is False. The default, 20, is the maximum //| number of data bytes that fit in a single BLE 4.x ATT packet. //| :param bool fixed_length: True if the descriptor value is of fixed length. -//| :param buf initial_value: The initial value for this descriptor. +//| :param ~_typing.ReadableBuffer initial_value: The initial value for this descriptor. //| //| :return: the new Descriptor.""" //| ... diff --git a/shared-bindings/_bleio/UUID.c b/shared-bindings/_bleio/UUID.c index 6d92cf7931..18eda0b33b 100644 --- a/shared-bindings/_bleio/UUID.c +++ b/shared-bindings/_bleio/UUID.c @@ -48,7 +48,7 @@ //| temporary 16-bit UUID that can be used in place of the full 128-bit UUID. //| //| :param value: The uuid value to encapsulate -//| :type value: int or typing.ByteString""" +//| :type value: int, ~_typing.ReadableBuffer or str""" //| ... //| STATIC mp_obj_t bleio_uuid_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { @@ -248,7 +248,7 @@ STATIC mp_obj_t bleio_uuid_unary_op(mp_unary_op_t op, mp_obj_t self_in) { } } -//| def __eq__(self, other: UUID) -> bool: +//| def __eq__(self, other: object) -> bool: //| """Two UUID objects are equal if their values match and they are both 128-bit or both 16-bit.""" //| ... //| diff --git a/shared-bindings/_bleio/__init__.c b/shared-bindings/_bleio/__init__.c index 3002ecd18c..ee9c4bf4a6 100644 --- a/shared-bindings/_bleio/__init__.c +++ b/shared-bindings/_bleio/__init__.c @@ -41,7 +41,8 @@ #include "shared-bindings/_bleio/Service.h" #include "shared-bindings/_bleio/UUID.h" -//| """ +//| """Bluetooth Low Energy (BLE) communication +//| //| The `_bleio` module provides necessary low-level functionality for communicating //| using Bluetooth Low Energy (BLE). The '_' prefix indicates this module is meant //| for internal use by libraries but not by the end user. Its API may change incompatibly @@ -50,12 +51,12 @@ //| `adafruit_ble `_ //| CircuitPython library instead, which builds on `_bleio`, and //| provides higher-level convenience functionality, including predefined beacons, clients, -//| servers. +//| servers.""" //| -//| .. attribute:: adapter -//| -//| BLE Adapter used to manage device discovery and connections. -//| This object is the sole instance of `_bleio.Adapter`.""" + +//| adapter: Adapter +//| """BLE Adapter used to manage device discovery and connections. +//| This object is the sole instance of `_bleio.Adapter`.""" //| //| class BluetoothError(Exception): diff --git a/shared-bindings/_eve/__init__.c b/shared-bindings/_eve/__init__.c index 51d3d65aee..0f628b6fb0 100644 --- a/shared-bindings/_eve/__init__.c +++ b/shared-bindings/_eve/__init__.c @@ -41,6 +41,9 @@ //| buffers and appending basic graphics commands.""" //| +//| class _EVE: +//| + typedef struct _mp_obj__EVE_t { mp_obj_base_t base; common_hal__eve_t _eve; @@ -51,6 +54,9 @@ STATIC const mp_obj_type_t _EVE_type; #define EVEHAL(s) \ (&((mp_obj__EVE_t*)mp_instance_cast_to_native_base((s), &_EVE_type))->_eve) +//| def register(self, o: object) -> None: +//| ... +//| STATIC mp_obj_t _register(mp_obj_t self, mp_obj_t o) { common_hal__eve_t *eve = EVEHAL(self); mp_load_method(o, MP_QSTR_write, eve->dest); @@ -58,11 +64,11 @@ STATIC mp_obj_t _register(mp_obj_t self, mp_obj_t o) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(register_obj, _register); -//| def flush(self) -> None: -//| """Send any queued drawing commands directly to the hardware. +//| def flush(self) -> None: +//| """Send any queued drawing commands directly to the hardware. //| -//| :param int width: The width of the grid in tiles, or 1 for sprites.""" -//| ... +//| :param int width: The width of the grid in tiles, or 1 for sprites.""" +//| ... //| STATIC mp_obj_t _flush(mp_obj_t self) { common_hal__eve_flush(EVEHAL(self)); @@ -70,11 +76,11 @@ STATIC mp_obj_t _flush(mp_obj_t self) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(flush_obj, _flush); -//| def cc(self, b: ReadableBuffer) -> None: -//| """Append bytes to the command FIFO. +//| def cc(self, b: ReadableBuffer) -> None: +//| """Append bytes to the command FIFO. //| -//| :param bytes b: The bytes to add""" -//| ... +//| :param ~_typing.ReadableBuffer b: The bytes to add""" +//| ... //| STATIC mp_obj_t _cc(mp_obj_t self, mp_obj_t b) { mp_buffer_info_t buffer_info; @@ -86,14 +92,14 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(cc_obj, _cc); //{ -//| def AlphaFunc(self, func: int, ref: int) -> None: -//| """Set the alpha test function +//| def AlphaFunc(self, func: int, ref: int) -> None: +//| """Set the alpha test function //| -//| :param int func: specifies the test function, one of ``NEVER``, ``LESS``, ``LEQUAL``, ``GREATER``, ``GEQUAL``, ``EQUAL``, ``NOTEQUAL``, or ``ALWAYS``. Range 0-7. The initial value is ALWAYS(7) -//| :param int ref: specifies the reference value for the alpha test. Range 0-255. The initial value is 0 +//| :param int func: specifies the test function, one of ``NEVER``, ``LESS``, ``LEQUAL``, ``GREATER``, ``GEQUAL``, ``EQUAL``, ``NOTEQUAL``, or ``ALWAYS``. Range 0-7. The initial value is ALWAYS(7) +//| :param int ref: specifies the reference value for the alpha test. Range 0-255. The initial value is 0 //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _alphafunc(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -104,13 +110,13 @@ STATIC mp_obj_t _alphafunc(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(alphafunc_obj, _alphafunc); -//| def Begin(self, prim: int) -> None: -//| """Begin drawing a graphics primitive +//| def Begin(self, prim: int) -> None: +//| """Begin drawing a graphics primitive //| -//| :param int prim: graphics primitive. +//| :param int prim: graphics primitive. //| -//| Valid primitives are ``BITMAPS``, ``POINTS``, ``LINES``, ``LINE_STRIP``, ``EDGE_STRIP_R``, ``EDGE_STRIP_L``, ``EDGE_STRIP_A``, ``EDGE_STRIP_B`` and ``RECTS``.""" -//| ... +//| Valid primitives are ``BITMAPS``, ``POINTS``, ``LINES``, ``LINE_STRIP``, ``EDGE_STRIP_R``, ``EDGE_STRIP_L``, ``EDGE_STRIP_A``, ``EDGE_STRIP_B`` and ``RECTS``.""" +//| ... //| STATIC mp_obj_t _begin(mp_obj_t self, mp_obj_t a0) { @@ -120,11 +126,11 @@ STATIC mp_obj_t _begin(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(begin_obj, _begin); -//| def BitmapExtFormat(self, format: int) -> None: -//| """Set the bitmap format +//| def BitmapExtFormat(self, format: int) -> None: +//| """Set the bitmap format //| -//| :param int format: bitmap pixel format.""" -//| ... +//| :param int format: bitmap pixel format.""" +//| ... //| STATIC mp_obj_t _bitmapextformat(mp_obj_t self, mp_obj_t a0) { @@ -134,13 +140,13 @@ STATIC mp_obj_t _bitmapextformat(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(bitmapextformat_obj, _bitmapextformat); -//| def BitmapHandle(self, handle: int) -> None: -//| """Set the bitmap handle +//| def BitmapHandle(self, handle: int) -> None: +//| """Set the bitmap handle //| -//| :param int handle: bitmap handle. Range 0-31. The initial value is 0 +//| :param int handle: bitmap handle. Range 0-31. The initial value is 0 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _bitmaphandle(mp_obj_t self, mp_obj_t a0) { @@ -150,12 +156,12 @@ STATIC mp_obj_t _bitmaphandle(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(bitmaphandle_obj, _bitmaphandle); -//| def BitmapLayoutH(self, linestride: int, height: int) -> None: -//| """Set the source bitmap memory format and layout for the current handle. high bits for large bitmaps +//| def BitmapLayoutH(self, linestride: int, height: int) -> None: +//| """Set the source bitmap memory format and layout for the current handle. high bits for large bitmaps //| -//| :param int linestride: high part of bitmap line stride, in bytes. Range 0-7 -//| :param int height: high part of bitmap height, in lines. Range 0-3""" -//| ... +//| :param int linestride: high part of bitmap line stride, in bytes. Range 0-7 +//| :param int height: high part of bitmap height, in lines. Range 0-3""" +//| ... //| STATIC mp_obj_t _bitmaplayouth(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -166,13 +172,13 @@ STATIC mp_obj_t _bitmaplayouth(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(bitmaplayouth_obj, _bitmaplayouth); -//| def BitmapLayout(self, format: int, linestride: int, height: int) -> None: -//| """Set the source bitmap memory format and layout for the current handle +//| def BitmapLayout(self, format: int, linestride: int, height: int) -> None: +//| """Set the source bitmap memory format and layout for the current handle //| -//| :param int format: bitmap pixel format, or GLFORMAT to use BITMAP_EXT_FORMAT instead. Range 0-31 -//| :param int linestride: bitmap line stride, in bytes. Range 0-1023 -//| :param int height: bitmap height, in lines. Range 0-511""" -//| ... +//| :param int format: bitmap pixel format, or GLFORMAT to use BITMAP_EXT_FORMAT instead. Range 0-31 +//| :param int linestride: bitmap line stride, in bytes. Range 0-1023 +//| :param int height: bitmap height, in lines. Range 0-511""" +//| ... //| STATIC mp_obj_t _bitmaplayout(size_t n_args, const mp_obj_t *args) { @@ -184,12 +190,12 @@ STATIC mp_obj_t _bitmaplayout(size_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bitmaplayout_obj, 4, 4, _bitmaplayout); -//| def BitmapSizeH(self, width: int, height: int) -> None: -//| """Set the screen drawing of bitmaps for the current handle. high bits for large bitmaps +//| def BitmapSizeH(self, width: int, height: int) -> None: +//| """Set the screen drawing of bitmaps for the current handle. high bits for large bitmaps //| -//| :param int width: high part of drawn bitmap width, in pixels. Range 0-3 -//| :param int height: high part of drawn bitmap height, in pixels. Range 0-3""" -//| ... +//| :param int width: high part of drawn bitmap width, in pixels. Range 0-3 +//| :param int height: high part of drawn bitmap height, in pixels. Range 0-3""" +//| ... //| STATIC mp_obj_t _bitmapsizeh(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -200,15 +206,15 @@ STATIC mp_obj_t _bitmapsizeh(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(bitmapsizeh_obj, _bitmapsizeh); -//| def BitmapSize(self, filter: int, wrapx: int, wrapy: int, width: int, height: int) -> None: -//| """Set the screen drawing of bitmaps for the current handle +//| def BitmapSize(self, filter: int, wrapx: int, wrapy: int, width: int, height: int) -> None: +//| """Set the screen drawing of bitmaps for the current handle //| -//| :param int filter: bitmap filtering mode, one of ``NEAREST`` or ``BILINEAR``. Range 0-1 -//| :param int wrapx: bitmap :math:`x` wrap mode, one of ``REPEAT`` or ``BORDER``. Range 0-1 -//| :param int wrapy: bitmap :math:`y` wrap mode, one of ``REPEAT`` or ``BORDER``. Range 0-1 -//| :param int width: drawn bitmap width, in pixels. Range 0-511 -//| :param int height: drawn bitmap height, in pixels. Range 0-511""" -//| ... +//| :param int filter: bitmap filtering mode, one of ``NEAREST`` or ``BILINEAR``. Range 0-1 +//| :param int wrapx: bitmap :math:`x` wrap mode, one of ``REPEAT`` or ``BORDER``. Range 0-1 +//| :param int wrapy: bitmap :math:`y` wrap mode, one of ``REPEAT`` or ``BORDER``. Range 0-1 +//| :param int width: drawn bitmap width, in pixels. Range 0-511 +//| :param int height: drawn bitmap height, in pixels. Range 0-511""" +//| ... //| STATIC mp_obj_t _bitmapsize(size_t n_args, const mp_obj_t *args) { @@ -222,11 +228,11 @@ STATIC mp_obj_t _bitmapsize(size_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bitmapsize_obj, 6, 6, _bitmapsize); -//| def BitmapSource(self, addr: int) -> None: -//| """Set the source address for bitmap graphics +//| def BitmapSource(self, addr: int) -> None: +//| """Set the source address for bitmap graphics //| -//| :param int addr: Bitmap start address, pixel-aligned. May be in SRAM or flash. Range 0-16777215""" -//| ... +//| :param int addr: Bitmap start address, pixel-aligned. May be in SRAM or flash. Range 0-16777215""" +//| ... //| STATIC mp_obj_t _bitmapsource(mp_obj_t self, mp_obj_t a0) { @@ -236,14 +242,14 @@ STATIC mp_obj_t _bitmapsource(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(bitmapsource_obj, _bitmapsource); -//| def BitmapSwizzle(self, r: int, g: int, b: int, a: int) -> None: -//| """Set the source for the r,g,b and a channels of a bitmap +//| def BitmapSwizzle(self, r: int, g: int, b: int, a: int) -> None: +//| """Set the source for the r,g,b and a channels of a bitmap //| -//| :param int r: red component source channel. Range 0-7 -//| :param int g: green component source channel. Range 0-7 -//| :param int b: blue component source channel. Range 0-7 -//| :param int a: alpha component source channel. Range 0-7""" -//| ... +//| :param int r: red component source channel. Range 0-7 +//| :param int g: green component source channel. Range 0-7 +//| :param int b: blue component source channel. Range 0-7 +//| :param int a: alpha component source channel. Range 0-7""" +//| ... //| STATIC mp_obj_t _bitmapswizzle(size_t n_args, const mp_obj_t *args) { @@ -256,16 +262,16 @@ STATIC mp_obj_t _bitmapswizzle(size_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bitmapswizzle_obj, 5, 5, _bitmapswizzle); -//| def BitmapTransformA(self, p: int, v: int) -> None: -//| """Set the :math:`a` component of the bitmap transform matrix +//| def BitmapTransformA(self, p: int, v: int) -> None: +//| """Set the :math:`a` component of the bitmap transform matrix //| -//| :param int p: precision control: 0 is 8.8, 1 is 1.15. Range 0-1. The initial value is 0 -//| :param int v: The :math:`a` component of the bitmap transform matrix, in signed 8.8 or 1.15 bit fixed-point form. Range 0-131071. The initial value is 256 +//| :param int p: precision control: 0 is 8.8, 1 is 1.15. Range 0-1. The initial value is 0 +//| :param int v: The :math:`a` component of the bitmap transform matrix, in signed 8.8 or 1.15 bit fixed-point form. Range 0-131071. The initial value is 256 //| -//| The initial value is **p** = 0, **v** = 256. This represents the value 1.0. +//| The initial value is **p** = 0, **v** = 256. This represents the value 1.0. //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _bitmaptransforma(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -276,16 +282,16 @@ STATIC mp_obj_t _bitmaptransforma(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(bitmaptransforma_obj, _bitmaptransforma); -//| def BitmapTransformB(self, p: int, v: int) -> None: -//| """Set the :math:`b` component of the bitmap transform matrix +//| def BitmapTransformB(self, p: int, v: int) -> None: +//| """Set the :math:`b` component of the bitmap transform matrix //| -//| :param int p: precision control: 0 is 8.8, 1 is 1.15. Range 0-1. The initial value is 0 -//| :param int v: The :math:`b` component of the bitmap transform matrix, in signed 8.8 or 1.15 bit fixed-point form. Range 0-131071. The initial value is 0 +//| :param int p: precision control: 0 is 8.8, 1 is 1.15. Range 0-1. The initial value is 0 +//| :param int v: The :math:`b` component of the bitmap transform matrix, in signed 8.8 or 1.15 bit fixed-point form. Range 0-131071. The initial value is 0 //| -//| The initial value is **p** = 0, **v** = 0. This represents the value 0.0. +//| The initial value is **p** = 0, **v** = 0. This represents the value 0.0. //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _bitmaptransformb(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -296,13 +302,13 @@ STATIC mp_obj_t _bitmaptransformb(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(bitmaptransformb_obj, _bitmaptransformb); -//| def BitmapTransformC(self, v: int) -> None: -//| """Set the :math:`c` component of the bitmap transform matrix +//| def BitmapTransformC(self, v: int) -> None: +//| """Set the :math:`c` component of the bitmap transform matrix //| -//| :param int v: The :math:`c` component of the bitmap transform matrix, in signed 15.8 bit fixed-point form. Range 0-16777215. The initial value is 0 +//| :param int v: The :math:`c` component of the bitmap transform matrix, in signed 15.8 bit fixed-point form. Range 0-16777215. The initial value is 0 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _bitmaptransformc(mp_obj_t self, mp_obj_t a0) { @@ -312,16 +318,16 @@ STATIC mp_obj_t _bitmaptransformc(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(bitmaptransformc_obj, _bitmaptransformc); -//| def BitmapTransformD(self, p: int, v: int) -> None: -//| """Set the :math:`d` component of the bitmap transform matrix +//| def BitmapTransformD(self, p: int, v: int) -> None: +//| """Set the :math:`d` component of the bitmap transform matrix //| -//| :param int p: precision control: 0 is 8.8, 1 is 1.15. Range 0-1. The initial value is 0 -//| :param int v: The :math:`d` component of the bitmap transform matrix, in signed 8.8 or 1.15 bit fixed-point form. Range 0-131071. The initial value is 0 +//| :param int p: precision control: 0 is 8.8, 1 is 1.15. Range 0-1. The initial value is 0 +//| :param int v: The :math:`d` component of the bitmap transform matrix, in signed 8.8 or 1.15 bit fixed-point form. Range 0-131071. The initial value is 0 //| -//| The initial value is **p** = 0, **v** = 0. This represents the value 0.0. +//| The initial value is **p** = 0, **v** = 0. This represents the value 0.0. //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _bitmaptransformd(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -332,16 +338,16 @@ STATIC mp_obj_t _bitmaptransformd(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(bitmaptransformd_obj, _bitmaptransformd); -//| def BitmapTransformE(self, p: int, v: int) -> None: -//| """Set the :math:`e` component of the bitmap transform matrix +//| def BitmapTransformE(self, p: int, v: int) -> None: +//| """Set the :math:`e` component of the bitmap transform matrix //| -//| :param int p: precision control: 0 is 8.8, 1 is 1.15. Range 0-1. The initial value is 0 -//| :param int v: The :math:`e` component of the bitmap transform matrix, in signed 8.8 or 1.15 bit fixed-point form. Range 0-131071. The initial value is 256 +//| :param int p: precision control: 0 is 8.8, 1 is 1.15. Range 0-1. The initial value is 0 +//| :param int v: The :math:`e` component of the bitmap transform matrix, in signed 8.8 or 1.15 bit fixed-point form. Range 0-131071. The initial value is 256 //| -//| The initial value is **p** = 0, **v** = 256. This represents the value 1.0. +//| The initial value is **p** = 0, **v** = 256. This represents the value 1.0. //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _bitmaptransforme(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -352,13 +358,13 @@ STATIC mp_obj_t _bitmaptransforme(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(bitmaptransforme_obj, _bitmaptransforme); -//| def BitmapTransformF(self, v: int) -> None: -//| """Set the :math:`f` component of the bitmap transform matrix +//| def BitmapTransformF(self, v: int) -> None: +//| """Set the :math:`f` component of the bitmap transform matrix //| -//| :param int v: The :math:`f` component of the bitmap transform matrix, in signed 15.8 bit fixed-point form. Range 0-16777215. The initial value is 0 +//| :param int v: The :math:`f` component of the bitmap transform matrix, in signed 15.8 bit fixed-point form. Range 0-16777215. The initial value is 0 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _bitmaptransformf(mp_obj_t self, mp_obj_t a0) { @@ -368,14 +374,14 @@ STATIC mp_obj_t _bitmaptransformf(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(bitmaptransformf_obj, _bitmaptransformf); -//| def BlendFunc(self, src: int, dst: int) -> None: -//| """Set pixel arithmetic +//| def BlendFunc(self, src: int, dst: int) -> None: +//| """Set pixel arithmetic //| -//| :param int src: specifies how the source blending factor is computed. One of ``ZERO``, ``ONE``, ``SRC_ALPHA``, ``DST_ALPHA``, ``ONE_MINUS_SRC_ALPHA`` or ``ONE_MINUS_DST_ALPHA``. Range 0-7. The initial value is SRC_ALPHA(2) -//| :param int dst: specifies how the destination blending factor is computed, one of the same constants as **src**. Range 0-7. The initial value is ONE_MINUS_SRC_ALPHA(4) +//| :param int src: specifies how the source blending factor is computed. One of ``ZERO``, ``ONE``, ``SRC_ALPHA``, ``DST_ALPHA``, ``ONE_MINUS_SRC_ALPHA`` or ``ONE_MINUS_DST_ALPHA``. Range 0-7. The initial value is SRC_ALPHA(2) +//| :param int dst: specifies how the destination blending factor is computed, one of the same constants as **src**. Range 0-7. The initial value is ONE_MINUS_SRC_ALPHA(4) //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _blendfunc(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -386,11 +392,11 @@ STATIC mp_obj_t _blendfunc(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(blendfunc_obj, _blendfunc); -//| def Call(self, dest: int) -> None: -//| """Execute a sequence of commands at another location in the display list +//| def Call(self, dest: int) -> None: +//| """Execute a sequence of commands at another location in the display list //| -//| :param int dest: display list address. Range 0-65535""" -//| ... +//| :param int dest: display list address. Range 0-65535""" +//| ... //| STATIC mp_obj_t _call(mp_obj_t self, mp_obj_t a0) { @@ -400,13 +406,13 @@ STATIC mp_obj_t _call(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(call_obj, _call); -//| def Cell(self, cell: int) -> None: -//| """Set the bitmap cell number for the vertex2f command +//| def Cell(self, cell: int) -> None: +//| """Set the bitmap cell number for the vertex2f command //| -//| :param int cell: bitmap cell number. Range 0-127. The initial value is 0 +//| :param int cell: bitmap cell number. Range 0-127. The initial value is 0 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _cell(mp_obj_t self, mp_obj_t a0) { @@ -416,13 +422,13 @@ STATIC mp_obj_t _cell(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(cell_obj, _cell); -//| def ClearColorA(self, alpha: int) -> None: -//| """Set clear value for the alpha channel +//| def ClearColorA(self, alpha: int) -> None: +//| """Set clear value for the alpha channel //| -//| :param int alpha: alpha value used when the color buffer is cleared. Range 0-255. The initial value is 0 +//| :param int alpha: alpha value used when the color buffer is cleared. Range 0-255. The initial value is 0 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _clearcolora(mp_obj_t self, mp_obj_t a0) { @@ -432,15 +438,15 @@ STATIC mp_obj_t _clearcolora(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(clearcolora_obj, _clearcolora); -//| def ClearColorRGB(self, red: int, green: int, blue: int) -> None: -//| """Set clear values for red, green and blue channels +//| def ClearColorRGB(self, red: int, green: int, blue: int) -> None: +//| """Set clear values for red, green and blue channels //| -//| :param int red: red value used when the color buffer is cleared. Range 0-255. The initial value is 0 -//| :param int green: green value used when the color buffer is cleared. Range 0-255. The initial value is 0 -//| :param int blue: blue value used when the color buffer is cleared. Range 0-255. The initial value is 0 +//| :param int red: red value used when the color buffer is cleared. Range 0-255. The initial value is 0 +//| :param int green: green value used when the color buffer is cleared. Range 0-255. The initial value is 0 +//| :param int blue: blue value used when the color buffer is cleared. Range 0-255. The initial value is 0 //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _clearcolorrgb(size_t n_args, const mp_obj_t *args) { @@ -452,13 +458,13 @@ STATIC mp_obj_t _clearcolorrgb(size_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(clearcolorrgb_obj, 4, 4, _clearcolorrgb); -//| def Clear(self, c: int, s: int, t: int) -> None: -//| """Clear buffers to preset values +//| def Clear(self, c: int, s: int, t: int) -> None: +//| """Clear buffers to preset values //| -//| :param int c: clear color buffer. Range 0-1 -//| :param int s: clear stencil buffer. Range 0-1 -//| :param int t: clear tag buffer. Range 0-1""" -//| ... +//| :param int c: clear color buffer. Range 0-1 +//| :param int s: clear stencil buffer. Range 0-1 +//| :param int t: clear tag buffer. Range 0-1""" +//| ... //| STATIC mp_obj_t _clear(size_t n_args, const mp_obj_t *args) { @@ -470,13 +476,13 @@ STATIC mp_obj_t _clear(size_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(clear_obj, 1, 4, _clear); -//| def ClearStencil(self, s: int) -> None: -//| """Set clear value for the stencil buffer +//| def ClearStencil(self, s: int) -> None: +//| """Set clear value for the stencil buffer //| -//| :param int s: value used when the stencil buffer is cleared. Range 0-255. The initial value is 0 +//| :param int s: value used when the stencil buffer is cleared. Range 0-255. The initial value is 0 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _clearstencil(mp_obj_t self, mp_obj_t a0) { @@ -486,12 +492,12 @@ STATIC mp_obj_t _clearstencil(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(clearstencil_obj, _clearstencil); -//| def ClearTag(self, s: int) -> None: -//| """Set clear value for the tag buffer +//| def ClearTag(self, s: int) -> None: +//| """Set clear value for the tag buffer //| -//| :param int s: value used when the tag buffer is cleared. Range 0-255. The initial value is 0 +//| :param int s: value used when the tag buffer is cleared. Range 0-255. The initial value is 0 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" //| STATIC mp_obj_t _cleartag(mp_obj_t self, mp_obj_t a0) { @@ -501,13 +507,13 @@ STATIC mp_obj_t _cleartag(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(cleartag_obj, _cleartag); -//| def ColorA(self, alpha: int) -> None: -//| """Set the current color alpha +//| def ColorA(self, alpha: int) -> None: +//| """Set the current color alpha //| -//| :param int alpha: alpha for the current color. Range 0-255. The initial value is 255 +//| :param int alpha: alpha for the current color. Range 0-255. The initial value is 255 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _colora(mp_obj_t self, mp_obj_t a0) { @@ -517,16 +523,16 @@ STATIC mp_obj_t _colora(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(colora_obj, _colora); -//| def ColorMask(self, r: int, g: int, b: int, a: int) -> None: -//| """Enable and disable writing of frame buffer color components +//| def ColorMask(self, r: int, g: int, b: int, a: int) -> None: +//| """Enable and disable writing of frame buffer color components //| -//| :param int r: allow updates to the frame buffer red component. Range 0-1. The initial value is 1 -//| :param int g: allow updates to the frame buffer green component. Range 0-1. The initial value is 1 -//| :param int b: allow updates to the frame buffer blue component. Range 0-1. The initial value is 1 -//| :param int a: allow updates to the frame buffer alpha component. Range 0-1. The initial value is 1 +//| :param int r: allow updates to the frame buffer red component. Range 0-1. The initial value is 1 +//| :param int g: allow updates to the frame buffer green component. Range 0-1. The initial value is 1 +//| :param int b: allow updates to the frame buffer blue component. Range 0-1. The initial value is 1 +//| :param int a: allow updates to the frame buffer alpha component. Range 0-1. The initial value is 1 //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _colormask(size_t n_args, const mp_obj_t *args) { @@ -539,15 +545,15 @@ STATIC mp_obj_t _colormask(size_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(colormask_obj, 5, 5, _colormask); -//| def ColorRGB(self, red: int, green: int, blue: int) -> None: -//| """Set the drawing color +//| def ColorRGB(self, red: int, green: int, blue: int) -> None: +//| """Set the drawing color //| -//| :param int red: red value for the current color. Range 0-255. The initial value is 255 -//| :param int green: green for the current color. Range 0-255. The initial value is 255 -//| :param int blue: blue for the current color. Range 0-255. The initial value is 255 +//| :param int red: red value for the current color. Range 0-255. The initial value is 255 +//| :param int green: green for the current color. Range 0-255. The initial value is 255 +//| :param int blue: blue for the current color. Range 0-255. The initial value is 255 //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _colorrgb(size_t n_args, const mp_obj_t *args) { @@ -559,9 +565,9 @@ STATIC mp_obj_t _colorrgb(size_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(colorrgb_obj, 4, 4, _colorrgb); -//| def Display(self) -> None: -//| """End the display list""" -//| ... +//| def Display(self) -> None: +//| """End the display list""" +//| ... STATIC mp_obj_t _display(mp_obj_t self) { @@ -570,11 +576,11 @@ STATIC mp_obj_t _display(mp_obj_t self) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(display_obj, _display); -//| def End(self) -> None: -//| """End drawing a graphics primitive +//| def End(self) -> None: +//| """End drawing a graphics primitive //| -//| :meth:`Vertex2ii` and :meth:`Vertex2f` calls are ignored until the next :meth:`Begin`.""" -//| ... +//| :meth:`Vertex2ii` and :meth:`Vertex2f` calls are ignored until the next :meth:`Begin`.""" +//| ... //| STATIC mp_obj_t _end(mp_obj_t self) { @@ -584,11 +590,11 @@ STATIC mp_obj_t _end(mp_obj_t self) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(end_obj, _end); -//| def Jump(self, dest: int) -> None: -//| """Execute commands at another location in the display list +//| def Jump(self, dest: int) -> None: +//| """Execute commands at another location in the display list //| -//| :param int dest: display list address. Range 0-65535""" -//| ... +//| :param int dest: display list address. Range 0-65535""" +//| ... //| STATIC mp_obj_t _jump(mp_obj_t self, mp_obj_t a0) { @@ -598,13 +604,13 @@ STATIC mp_obj_t _jump(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(jump_obj, _jump); -//| def LineWidth(self, width: int) -> None: -//| """Set the width of rasterized lines +//| def LineWidth(self, width: int) -> None: +//| """Set the width of rasterized lines //| -//| :param int width: line width in :math:`1/16` pixel. Range 0-4095. The initial value is 16 +//| :param int width: line width in :math:`1/16` pixel. Range 0-4095. The initial value is 16 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _linewidth(mp_obj_t self, mp_obj_t a0) { @@ -614,11 +620,11 @@ STATIC mp_obj_t _linewidth(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(linewidth_obj, _linewidth); -//| def Macro(self, m: int) -> None: -//| """Execute a single command from a macro register +//| def Macro(self, m: int) -> None: +//| """Execute a single command from a macro register //| -//| :param int m: macro register to read. Range 0-1""" -//| ... +//| :param int m: macro register to read. Range 0-1""" +//| ... //| STATIC mp_obj_t _macro(mp_obj_t self, mp_obj_t a0) { @@ -628,9 +634,9 @@ STATIC mp_obj_t _macro(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(macro_obj, _macro); -//| def Nop(self) -> None: -//| """No operation""" -//| ... +//| def Nop(self) -> None: +//| """No operation""" +//| ... //| STATIC mp_obj_t _nop(mp_obj_t self) { @@ -640,13 +646,13 @@ STATIC mp_obj_t _nop(mp_obj_t self) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(nop_obj, _nop); -//| def PaletteSource(self, addr: int) -> None: -//| """Set the base address of the palette +//| def PaletteSource(self, addr: int) -> None: +//| """Set the base address of the palette //| -//| :param int addr: Address in graphics SRAM, 2-byte aligned. Range 0-4194303. The initial value is 0 +//| :param int addr: Address in graphics SRAM, 2-byte aligned. Range 0-4194303. The initial value is 0 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _palettesource(mp_obj_t self, mp_obj_t a0) { @@ -656,13 +662,13 @@ STATIC mp_obj_t _palettesource(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(palettesource_obj, _palettesource); -//| def PointSize(self, size: int) -> None: -//| """Set the radius of rasterized points +//| def PointSize(self, size: int) -> None: +//| """Set the radius of rasterized points //| -//| :param int size: point radius in :math:`1/16` pixel. Range 0-8191. The initial value is 16 +//| :param int size: point radius in :math:`1/16` pixel. Range 0-8191. The initial value is 16 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _pointsize(mp_obj_t self, mp_obj_t a0) { @@ -672,9 +678,9 @@ STATIC mp_obj_t _pointsize(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(pointsize_obj, _pointsize); -//| def RestoreContext(self) -> None: -//| """Restore the current graphics context from the context stack""" -//| ... +//| def RestoreContext(self) -> None: +//| """Restore the current graphics context from the context stack""" +//| ... //| STATIC mp_obj_t _restorecontext(mp_obj_t self) { @@ -684,9 +690,9 @@ STATIC mp_obj_t _restorecontext(mp_obj_t self) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(restorecontext_obj, _restorecontext); -//| def Return(self) -> None: -//| """Return from a previous call command""" -//| ... +//| def Return(self) -> None: +//| """Return from a previous call command""" +//| ... //| STATIC mp_obj_t _return(mp_obj_t self) { @@ -696,9 +702,9 @@ STATIC mp_obj_t _return(mp_obj_t self) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(return_obj, _return); -//| def SaveContext(self) -> None: -//| """Push the current graphics context on the context stack""" -//| ... +//| def SaveContext(self) -> None: +//| """Push the current graphics context on the context stack""" +//| ... //| STATIC mp_obj_t _savecontext(mp_obj_t self) { @@ -708,14 +714,14 @@ STATIC mp_obj_t _savecontext(mp_obj_t self) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(savecontext_obj, _savecontext); -//| def ScissorSize(self, width: int, height: int) -> None: -//| """Set the size of the scissor clip rectangle +//| def ScissorSize(self, width: int, height: int) -> None: +//| """Set the size of the scissor clip rectangle //| -//| :param int width: The width of the scissor clip rectangle, in pixels. Range 0-4095. The initial value is hsize -//| :param int height: The height of the scissor clip rectangle, in pixels. Range 0-4095. The initial value is 2048 +//| :param int width: The width of the scissor clip rectangle, in pixels. Range 0-4095. The initial value is hsize +//| :param int height: The height of the scissor clip rectangle, in pixels. Range 0-4095. The initial value is 2048 //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _scissorsize(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -726,14 +732,14 @@ STATIC mp_obj_t _scissorsize(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(scissorsize_obj, _scissorsize); -//| def ScissorXY(self, x: int, y: int) -> None: -//| """Set the top left corner of the scissor clip rectangle +//| def ScissorXY(self, x: int, y: int) -> None: +//| """Set the top left corner of the scissor clip rectangle //| -//| :param int x: The :math:`x` coordinate of the scissor clip rectangle, in pixels. Range 0-2047. The initial value is 0 -//| :param int y: The :math:`y` coordinate of the scissor clip rectangle, in pixels. Range 0-2047. The initial value is 0 +//| :param int x: The :math:`x` coordinate of the scissor clip rectangle, in pixels. Range 0-2047. The initial value is 0 +//| :param int y: The :math:`y` coordinate of the scissor clip rectangle, in pixels. Range 0-2047. The initial value is 0 //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _scissorxy(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -744,15 +750,15 @@ STATIC mp_obj_t _scissorxy(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(scissorxy_obj, _scissorxy); -//| def StencilFunc(self, func: int, ref: int, mask: int) -> None: -//| """Set function and reference value for stencil testing +//| def StencilFunc(self, func: int, ref: int, mask: int) -> None: +//| """Set function and reference value for stencil testing //| -//| :param int func: specifies the test function, one of ``NEVER``, ``LESS``, ``LEQUAL``, ``GREATER``, ``GEQUAL``, ``EQUAL``, ``NOTEQUAL``, or ``ALWAYS``. Range 0-7. The initial value is ALWAYS(7) -//| :param int ref: specifies the reference value for the stencil test. Range 0-255. The initial value is 0 -//| :param int mask: specifies a mask that is ANDed with the reference value and the stored stencil value. Range 0-255. The initial value is 255 +//| :param int func: specifies the test function, one of ``NEVER``, ``LESS``, ``LEQUAL``, ``GREATER``, ``GEQUAL``, ``EQUAL``, ``NOTEQUAL``, or ``ALWAYS``. Range 0-7. The initial value is ALWAYS(7) +//| :param int ref: specifies the reference value for the stencil test. Range 0-255. The initial value is 0 +//| :param int mask: specifies a mask that is ANDed with the reference value and the stored stencil value. Range 0-255. The initial value is 255 //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _stencilfunc(size_t n_args, const mp_obj_t *args) { @@ -764,13 +770,13 @@ STATIC mp_obj_t _stencilfunc(size_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(stencilfunc_obj, 4, 4, _stencilfunc); -//| def StencilMask(self, mask: int) -> None: -//| """Control the writing of individual bits in the stencil planes +//| def StencilMask(self, mask: int) -> None: +//| """Control the writing of individual bits in the stencil planes //| -//| :param int mask: the mask used to enable writing stencil bits. Range 0-255. The initial value is 255 +//| :param int mask: the mask used to enable writing stencil bits. Range 0-255. The initial value is 255 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _stencilmask(mp_obj_t self, mp_obj_t a0) { @@ -780,14 +786,14 @@ STATIC mp_obj_t _stencilmask(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(stencilmask_obj, _stencilmask); -//| def StencilOp(self, sfail: int, spass: int) -> None: -//| """Set stencil test actions +//| def StencilOp(self, sfail: int, spass: int) -> None: +//| """Set stencil test actions //| -//| :param int sfail: specifies the action to take when the stencil test fails, one of ``KEEP``, ``ZERO``, ``REPLACE``, ``INCR``, ``INCR_WRAP``, ``DECR``, ``DECR_WRAP``, and ``INVERT``. Range 0-7. The initial value is KEEP(1) -//| :param int spass: specifies the action to take when the stencil test passes, one of the same constants as **sfail**. Range 0-7. The initial value is KEEP(1) +//| :param int sfail: specifies the action to take when the stencil test fails, one of ``KEEP``, ``ZERO``, ``REPLACE``, ``INCR``, ``INCR_WRAP``, ``DECR``, ``DECR_WRAP``, and ``INVERT``. Range 0-7. The initial value is KEEP(1) +//| :param int spass: specifies the action to take when the stencil test passes, one of the same constants as **sfail**. Range 0-7. The initial value is KEEP(1) //| -//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| These values are part of the graphics context and are saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _stencilop(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { @@ -798,13 +804,13 @@ STATIC mp_obj_t _stencilop(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { } STATIC MP_DEFINE_CONST_FUN_OBJ_3(stencilop_obj, _stencilop); -//| def TagMask(self, mask: int) -> None: -//| """Control the writing of the tag buffer +//| def TagMask(self, mask: int) -> None: +//| """Control the writing of the tag buffer //| -//| :param int mask: allow updates to the tag buffer. Range 0-1. The initial value is 1 +//| :param int mask: allow updates to the tag buffer. Range 0-1. The initial value is 1 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _tagmask(mp_obj_t self, mp_obj_t a0) { @@ -814,13 +820,13 @@ STATIC mp_obj_t _tagmask(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(tagmask_obj, _tagmask); -//| def Tag(self, s: int) -> None: -//| """Set the current tag value +//| def Tag(self, s: int) -> None: +//| """Set the current tag value //| -//| :param int s: tag value. Range 0-255. The initial value is 255 +//| :param int s: tag value. Range 0-255. The initial value is 255 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _tag(mp_obj_t self, mp_obj_t a0) { @@ -830,13 +836,13 @@ STATIC mp_obj_t _tag(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(tag_obj, _tag); -//| def VertexTranslateX(self, x: int) -> None: -//| """Set the vertex transformation's x translation component +//| def VertexTranslateX(self, x: int) -> None: +//| """Set the vertex transformation's x translation component //| -//| :param int x: signed x-coordinate in :math:`1/16` pixel. Range 0-131071. The initial value is 0 +//| :param int x: signed x-coordinate in :math:`1/16` pixel. Range 0-131071. The initial value is 0 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _vertextranslatex(mp_obj_t self, mp_obj_t a0) { @@ -846,13 +852,13 @@ STATIC mp_obj_t _vertextranslatex(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(vertextranslatex_obj, _vertextranslatex); -//| def VertexTranslateY(self, y: int) -> None: -//| """Set the vertex transformation's y translation component +//| def VertexTranslateY(self, y: int) -> None: +//| """Set the vertex transformation's y translation component //| -//| :param int y: signed y-coordinate in :math:`1/16` pixel. Range 0-131071. The initial value is 0 +//| :param int y: signed y-coordinate in :math:`1/16` pixel. Range 0-131071. The initial value is 0 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| @@ -863,13 +869,13 @@ STATIC mp_obj_t _vertextranslatey(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(vertextranslatey_obj, _vertextranslatey); -//| def VertexFormat(self, frac: int) -> None: -//| """Set the precision of vertex2f coordinates +//| def VertexFormat(self, frac: int) -> None: +//| """Set the precision of vertex2f coordinates //| -//| :param int frac: Number of fractional bits in X,Y coordinates, 0-4. Range 0-7. The initial value is 4 +//| :param int frac: Number of fractional bits in X,Y coordinates, 0-4. Range 0-7. The initial value is 4 //| -//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" -//| ... +//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.""" +//| ... //| STATIC mp_obj_t _vertexformat(mp_obj_t self, mp_obj_t a0) { @@ -879,14 +885,14 @@ STATIC mp_obj_t _vertexformat(mp_obj_t self, mp_obj_t a0) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(vertexformat_obj, _vertexformat); -//| def Vertex2ii(self, x: int, y: int, handle: int, cell: int) -> None: -//| """:param int x: x-coordinate in pixels. Range 0-511 -//| :param int y: y-coordinate in pixels. Range 0-511 -//| :param int handle: bitmap handle. Range 0-31 -//| :param int cell: cell number. Range 0-127 +//| def Vertex2ii(self, x: int, y: int, handle: int, cell: int) -> None: +//| """:param int x: x-coordinate in pixels. Range 0-511 +//| :param int y: y-coordinate in pixels. Range 0-511 +//| :param int handle: bitmap handle. Range 0-31 +//| :param int cell: cell number. Range 0-127 //| -//| This method is an alternative to :meth:`Vertex2f`.""" -//| ... +//| This method is an alternative to :meth:`Vertex2f`.""" +//| ... //| STATIC mp_obj_t _vertex2ii(size_t n_args, const mp_obj_t *args) { @@ -954,12 +960,12 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(vertex2ii_obj, 3, 5, _vertex2ii); // Hand-written functions { -//| def Vertex2f(self, b: float) -> None: -//| """Draw a point. +//| def Vertex2f(self, b: float) -> None: +//| """Draw a point. //| -//| :param float x: pixel x-coordinate -//| :param float y: pixel y-coordinate""" -//| ... +//| :param float x: pixel x-coordinate +//| :param float y: pixel y-coordinate""" +//| ... //| STATIC mp_obj_t _vertex2f(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) { mp_float_t x = mp_obj_get_float(a0); @@ -973,14 +979,14 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_3(vertex2f_obj, _vertex2f); #define ADD_X(self, x) \ common_hal__eve_add(EVEHAL(self), sizeof(x), &(x)); -//| def cmd0(self, n: int) -> None: -//| """Append the command word n to the FIFO +//| def cmd0(self, n: int) -> None: +//| """Append the command word n to the FIFO //| -//| :param int n: The command code +//| :param int n: The command code //| -//| This method is used by the ``eve`` module to efficiently add -//| commands to the FIFO.""" -//| ... +//| This method is used by the ``eve`` module to efficiently add +//| commands to the FIFO.""" +//| ... //| STATIC mp_obj_t _cmd0(mp_obj_t self, mp_obj_t n) { @@ -990,18 +996,19 @@ STATIC mp_obj_t _cmd0(mp_obj_t self, mp_obj_t n) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(cmd0_obj, _cmd0); -//| def cmd(self, n: int, fmt: str, args: tuple) -> None: -//| """Append a command packet to the FIFO. +//| def cmd(self, n: int, fmt: str, args: Tuple[str, ...]) -> None: +//| """Append a command packet to the FIFO. //| -//| :param int n: The command code -//| :param str fmt: The command format `struct` layout -//| :param tuple args: The command's arguments +//| :param int n: The command code +//| :param str fmt: The command format `struct` layout +//| :param args: The command's arguments +//| :type args: tuple(str, ...) //| -//| Supported format codes: h, H, i, I. +//| Supported format codes: h, H, i, I. //| -//| This method is used by the ``eve`` module to efficiently add -//| commands to the FIFO.""" -//| ... +//| This method is used by the ``eve`` module to efficiently add +//| commands to the FIFO.""" +//| ... //| STATIC mp_obj_t _cmd(size_t n_args, const mp_obj_t *args) { mp_obj_t self = args[0]; diff --git a/shared-bindings/_pew/PewPew.c b/shared-bindings/_pew/PewPew.c index 0563181d9f..a8a43e1571 100644 --- a/shared-bindings/_pew/PewPew.c +++ b/shared-bindings/_pew/PewPew.c @@ -48,26 +48,8 @@ //| def __init__( //| self, //| buffer: ReadableBuffer, -//| rows: List[ -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| ], -//| cols: List[ -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| digitalio.DigitalInOut, -//| ], +//| rows: List[digitalio.DigitalInOut], +//| cols: List[digitalio.DigitalInOut], //| buttons: digitalio.DigitalInOut, //| ) -> None: //| """Initializes matrix scanning routines. diff --git a/shared-bindings/_pixelbuf/PixelBuf.c b/shared-bindings/_pixelbuf/PixelBuf.c index abfe190d80..88e8aa8010 100644 --- a/shared-bindings/_pixelbuf/PixelBuf.c +++ b/shared-bindings/_pixelbuf/PixelBuf.c @@ -40,6 +40,10 @@ #include "shared-module/_pixelbuf/PixelBuf.h" #include "shared-bindings/digitalio/DigitalInOut.h" +#ifdef CIRCUITPY_ULAB +#include "extmod/ulab/code/ndarray.h" +#endif + extern const int32_t colorwheel(float pos); static void parse_byteorder(mp_obj_t byteorder_obj, pixelbuf_byteorder_details_t* parsed); @@ -58,12 +62,12 @@ static void parse_byteorder(mp_obj_t byteorder_obj, pixelbuf_byteorder_details_t //| brightness (0.0-1.0) and will enable a Dotstar compatible 1st byte for each //| pixel. //| -//| :param ~int size: Number of pixels -//| :param ~str byteorder: Byte order string (such as "RGB", "RGBW" or "PBGR") -//| :param ~float brightness: Brightness (0 to 1.0, default 1.0) -//| :param ~bool auto_write: Whether to automatically write pixels (Default False) -//| :param bytes header: Sequence of bytes to always send before pixel values. -//| :param bytes trailer: Sequence of bytes to always send after pixel values.""" +//| :param int size: Number of pixels +//| :param str byteorder: Byte order string (such as "RGB", "RGBW" or "PBGR") +//| :param float brightness: Brightness (0 to 1.0, default 1.0) +//| :param bool auto_write: Whether to automatically write pixels (Default False) +//| :param ~_typing.ReadableBuffer header: Sequence of bytes to always send before pixel values. +//| :param ~_typing.ReadableBuffer trailer: Sequence of bytes to always send after pixel values.""" //| ... //| STATIC mp_obj_t pixelbuf_pixelbuf_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { @@ -257,7 +261,7 @@ STATIC mp_obj_t pixelbuf_pixelbuf_show(mp_obj_t self_in) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_pixelbuf_show_obj, pixelbuf_pixelbuf_show); -//| def fill(self, color: Union[int, Tuple[int, int, int]]) -> None: +//| def fill(self, color: Union[int, Tuple[int, int, int], Tuple[int, int, int, float]]) -> None: //| """Fills the given pixelbuf with the given color.""" //| ... //| @@ -270,18 +274,20 @@ STATIC mp_obj_t pixelbuf_pixelbuf_fill(mp_obj_t self_in, mp_obj_t value) { STATIC MP_DEFINE_CONST_FUN_OBJ_2(pixelbuf_pixelbuf_fill_obj, pixelbuf_pixelbuf_fill); //| @overload -//| def __getitem__(self, index: slice) -> Tuple[Tuple, ...]: ... -//| def __getitem__(self, index: int) -> Tuple: +//| def __getitem__(self, index: slice) -> Union[Tuple[Tuple[int, int, int], ...], Tuple[Tuple[int, int, int, float], ...]]: ... +//| @overload +//| def __getitem__(self, index: int) -> Union[Tuple[int, int, int], Tuple[int, int, int, float]]: //| """Returns the pixel value at the given index as a tuple of (Red, Green, Blue[, White]) values //| between 0 and 255. When in PWM (DotStar) mode, the 4th tuple value is a float of the pixel //| intensity from 0-1.0.""" //| ... //| //| @overload -//| def __setitem__(self, index: slice, value: Tuple[Union[int, Tuple, List], ...]) -> None: ... +//| def __setitem__(self, index: slice, value: Tuple[Union[int, Tuple[float, ...], List[float]], ...]) -> None: ... //| @overload -//| def __setitem__(self, index: slice, value: List[Union[int, Tuple, List]]) -> None: ... -//| def __setitem__(self, index: int, value: Union[int, Tuple, List]) -> None: +//| def __setitem__(self, index: slice, value: List[Union[int, Tuple[float, ...], List[float]]]) -> None: ... +//| @overload +//| def __setitem__(self, index: int, value: Union[int, Tuple[float, ...], List[float]]) -> None: //| """Sets the pixel value at the given index. Value can either be a tuple or integer. Tuples are //| The individual (Red, Green, Blue[, White]) values between 0 and 255. If given an integer, the //| red, green and blue values are packed into the lower three bytes (0xRRGGBB). @@ -303,6 +309,16 @@ STATIC mp_obj_t pixelbuf_pixelbuf_subscr(mp_obj_t self_in, mp_obj_t index_in, mp size_t length = common_hal__pixelbuf_pixelbuf_get_len(self_in); mp_seq_get_fast_slice_indexes(length, index_in, &slice); + static mp_obj_tuple_t flat_item_tuple = { + .base = {&mp_type_tuple}, + .len = 0, + .items = { + mp_const_none, + mp_const_none, + mp_const_none, + mp_const_none, + } + }; size_t slice_len; if (slice.step > 0) { @@ -324,27 +340,13 @@ STATIC mp_obj_t pixelbuf_pixelbuf_subscr(mp_obj_t self_in, mp_obj_t index_in, mp } else { // Set #if MICROPY_PY_ARRAY_SLICE_ASSIGN - if (!(MP_OBJ_IS_TYPE(value, &mp_type_list) || MP_OBJ_IS_TYPE(value, &mp_type_tuple))) { - mp_raise_ValueError(translate("tuple/list required on RHS")); - } + size_t num_items = mp_obj_get_int(mp_obj_len(value)); - mp_obj_t *src_objs; - size_t num_items; - if (MP_OBJ_IS_TYPE(value, &mp_type_list)) { - mp_obj_list_t *t = MP_OBJ_TO_PTR(value); - num_items = t->len; - src_objs = t->items; - } else { - mp_obj_tuple_t *l = MP_OBJ_TO_PTR(value); - num_items = l->len; - src_objs = l->items; + if (num_items != slice_len && num_items != (slice_len * common_hal__pixelbuf_pixelbuf_get_bpp(self_in))) { + mp_raise_ValueError_varg(translate("Unmatched number of items on RHS (expected %d, got %d)."), slice_len, num_items); } - if (num_items != slice_len) { - mp_raise_ValueError_varg(translate("Unmatched number of items on RHS (expected %d, got %d)."), - slice_len, num_items); - } - - common_hal__pixelbuf_pixelbuf_set_pixels(self_in, slice.start, slice.step, slice_len, src_objs); + common_hal__pixelbuf_pixelbuf_set_pixels(self_in, slice.start, slice.step, slice_len, value, + num_items != slice_len ? &flat_item_tuple : mp_const_none); return mp_const_none; #else return MP_OBJ_NULL; // op not supported diff --git a/shared-bindings/_pixelbuf/PixelBuf.h b/shared-bindings/_pixelbuf/PixelBuf.h index 0b09a57715..d410820591 100644 --- a/shared-bindings/_pixelbuf/PixelBuf.h +++ b/shared-bindings/_pixelbuf/PixelBuf.h @@ -47,6 +47,6 @@ void common_hal__pixelbuf_pixelbuf_fill(mp_obj_t self, mp_obj_t item); void common_hal__pixelbuf_pixelbuf_show(mp_obj_t self); mp_obj_t common_hal__pixelbuf_pixelbuf_get_pixel(mp_obj_t self, size_t index); void common_hal__pixelbuf_pixelbuf_set_pixel(mp_obj_t self, size_t index, mp_obj_t item); -void common_hal__pixelbuf_pixelbuf_set_pixels(mp_obj_t self_in, size_t start, mp_int_t step, size_t slice_len, mp_obj_t* values); +void common_hal__pixelbuf_pixelbuf_set_pixels(mp_obj_t self_in, size_t start, mp_int_t step, size_t slice_len, mp_obj_t* values, mp_obj_tuple_t *flatten_to); #endif // CP_SHARED_BINDINGS_PIXELBUF_PIXELBUF_H diff --git a/shared-bindings/_pixelbuf/__init__.c b/shared-bindings/_pixelbuf/__init__.c index c714cade41..c61acc939f 100644 --- a/shared-bindings/_pixelbuf/__init__.c +++ b/shared-bindings/_pixelbuf/__init__.c @@ -33,7 +33,7 @@ #include "shared-bindings/_pixelbuf/PixelBuf.h" -//| """A fast RGB(W) pixel buffer library for like NeoPixel and DotStar. +//| """A fast RGB(W) pixel buffer library for like NeoPixel and DotStar //| //| The `_pixelbuf` module provides the :py:class:`PixelBuf` class to accelerate //| RGB(W) strip/matrix manipulation, such as DotStar and Neopixel. diff --git a/shared-bindings/_stage/Layer.c b/shared-bindings/_stage/Layer.c index 269005ccff..612323a4e4 100644 --- a/shared-bindings/_stage/Layer.c +++ b/shared-bindings/_stage/Layer.c @@ -40,9 +40,9 @@ //| //| :param int width: The width of the grid in tiles, or 1 for sprites. //| :param int height: The height of the grid in tiles, or 1 for sprites. -//| :param bytearray graphic: The graphic data of the tiles. -//| :param bytearray palette: The color palette to be used. -//| :param bytearray grid: The contents of the grid map. +//| :param ~_typing.ReadableBuffer graphic: The graphic data of the tiles. +//| :param ~_typing.ReadableBuffer palette: The color palette to be used. +//| :param ~_typing.ReadableBuffer grid: The contents of the grid map. //| //| This class is intended for internal use in the ``stage`` library and //| it shouldn't be used on its own.""" diff --git a/shared-bindings/_stage/Text.c b/shared-bindings/_stage/Text.c index 464af1b98f..d1e50fa236 100644 --- a/shared-bindings/_stage/Text.c +++ b/shared-bindings/_stage/Text.c @@ -40,9 +40,9 @@ //| //| :param int width: The width of the grid in tiles, or 1 for sprites. //| :param int height: The height of the grid in tiles, or 1 for sprites. -//| :param bytearray font: The font data of the characters. -//| :param bytearray palette: The color palette to be used. -//| :param bytearray chars: The contents of the character grid. +//| :param ~_typing.ReadableBuffer font: The font data of the characters. +//| :param ~_typing.ReadableBuffer palette: The color palette to be used. +//| :param ~_typing.ReadableBuffer chars: The contents of the character grid. //| //| This class is intended for internal use in the ``stage`` library and //| it shouldn't be used on its own.""" diff --git a/shared-bindings/_stage/__init__.c b/shared-bindings/_stage/__init__.c index 6651b3e0ba..f173147e31 100644 --- a/shared-bindings/_stage/__init__.c +++ b/shared-bindings/_stage/__init__.c @@ -39,15 +39,16 @@ //| The `_stage` module contains native code to speed-up the ```stage`` Library //| `_.""" //| -//| def render(x0: int, y0: int, x1: int, y1: int, layers: list, buffer: WriteableBuffer, display: displayio.Display, scale: int, background: int) -> None: +//| def render(x0: int, y0: int, x1: int, y1: int, layers: List[Layer], buffer: WriteableBuffer, display: displayio.Display, scale: int, background: int) -> None: //| """Render and send to the display a fragment of the screen. //| //| :param int x0: Left edge of the fragment. //| :param int y0: Top edge of the fragment. //| :param int x1: Right edge of the fragment. //| :param int y1: Bottom edge of the fragment. -//| :param list layers: A list of the :py:class:`~_stage.Layer` objects. -//| :param bytearray buffer: A buffer to use for rendering. +//| :param layers: A list of the :py:class:`~_stage.Layer` objects. +//| :type layers: list[Layer] +//| :param ~_typing.WriteableBuffer buffer: A buffer to use for rendering. //| :param ~displayio.Display display: The display to use. //| :param int scale: How many times should the image be scaled up. //| :param int background: What color to display when nothing is there. diff --git a/shared-bindings/_typing/__init__.pyi b/shared-bindings/_typing/__init__.pyi new file mode 100644 index 0000000000..48e68a8d57 --- /dev/null +++ b/shared-bindings/_typing/__init__.pyi @@ -0,0 +1,54 @@ +"""Types for the C-level protocols""" + +from typing import Union + +import array +import audiocore +import audiomixer +import audiomp3 +import rgbmatrix +import ulab + +ReadableBuffer = Union[ + bytes, bytearray, memoryview, array.array, ulab.array, rgbmatrix.RGBMatrix +] +"""Classes that implement the readable buffer protocol + + - `bytes` + - `bytearray` + - `memoryview` + - `array.array` + - `ulab.array` + - `rgbmatrix.RGBMatrix` +""" + +WriteableBuffer = Union[ + bytearray, memoryview, array.array, ulab.array, rgbmatrix.RGBMatrix +] +"""Classes that implement the writeable buffer protocol + + - `bytearray` + - `memoryview` + - `array.array` + - `ulab.array` + - `rgbmatrix.RGBMatrix` +""" + +AudioSample = Union[ + audiocore.WaveFile, audiocore.RawSample, audiomixer.Mixer, audiomp3.MP3Decoder +] +"""Classes that implement the audiosample protocol + + - `audiocore.WaveFile` + - `audiocore.RawSample` + - `audiomixer.Mixer` + - `audiomp3.MP3Decoder` + + You can play these back with `audioio.AudioOut`, `audiobusio.I2SOut` or `audiopwmio.PWMAudioOut`. +""" + +FrameBuffer = Union[rgbmatrix.RGBMatrix] +"""Classes that implement the framebuffer protocol + + - `rgbmatrix.RGBMatrix` +""" diff --git a/shared-bindings/aesio/aes.c b/shared-bindings/aesio/aes.c index 7c10693fec..a121845e34 100644 --- a/shared-bindings/aesio/aes.c +++ b/shared-bindings/aesio/aes.c @@ -15,10 +15,10 @@ //| def __init__(self, key: ReadableBuffer, mode: int = 0, iv: Optional[ReadableBuffer] = None, segment_size: int = 8) -> None: //| """Create a new AES state with the given key. //| -//| :param bytearray key: A 16-, 24-, or 32-byte key +//| :param ~_typing.ReadableBuffer key: A 16-, 24-, or 32-byte key //| :param int mode: AES mode to use. One of: AES.MODE_ECB, AES.MODE_CBC, or //| AES.MODE_CTR -//| :param bytearray iv: Initialization vector to use for CBC or CTR mode +//| :param ~_typing.ReadableBuffer iv: Initialization vector to use for CBC or CTR mode //| //| Additional arguments are supported for legacy reasons. //| diff --git a/shared-bindings/audiobusio/I2SOut.c b/shared-bindings/audiobusio/I2SOut.c index 797d782d58..25b536c344 100644 --- a/shared-bindings/audiobusio/I2SOut.c +++ b/shared-bindings/audiobusio/I2SOut.c @@ -155,11 +155,11 @@ STATIC mp_obj_t audiobusio_i2sout_obj___exit__(size_t n_args, const mp_obj_t *ar STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiobusio_i2sout___exit___obj, 4, 4, audiobusio_i2sout_obj___exit__); -//| def play(self, sample: audiocore._AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| -//| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, or `audiomixer.Mixer`. +//| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, `audiomixer.Mixer` or `audiomp3.MP3Decoder`. //| //| The sample itself should consist of 8 bit or 16 bit samples.""" //| ... diff --git a/shared-bindings/audiocore/RawSample.c b/shared-bindings/audiocore/RawSample.c index fd8652c143..df31ee2e07 100644 --- a/shared-bindings/audiocore/RawSample.c +++ b/shared-bindings/audiocore/RawSample.c @@ -44,7 +44,7 @@ //| first sample will be for channel 1, the second sample will be for channel two, the third for //| channel 1 and so on. //| -//| :param ReadableBuffer buffer: A buffer with samples +//| :param ~_typing.ReadableBuffer buffer: A buffer with samples //| :param int channel_count: The number of channels in the buffer //| :param int sample_rate: The desired playback sample rate //| diff --git a/shared-bindings/audiocore/WaveFile.c b/shared-bindings/audiocore/WaveFile.c index 89c731c68b..3b4c9fd978 100644 --- a/shared-bindings/audiocore/WaveFile.c +++ b/shared-bindings/audiocore/WaveFile.c @@ -40,11 +40,11 @@ //| be 8 bit unsigned or 16 bit signed. If a buffer is provided, it will be used instead of allocating //| an internal buffer.""" //| -//| def __init__(self, file: typing.BinaryIO, buffer: ReadableBuffer) -> None: +//| def __init__(self, file: typing.BinaryIO, buffer: WriteableBuffer) -> None: //| """Load a .wav file for playback with `audioio.AudioOut` or `audiobusio.I2SOut`. //| //| :param typing.BinaryIO file: Already opened wave file -//| :param bytearray buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two 512 byte buffers are allocated internally. +//| :param ~_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two 512 byte buffers are allocated internally. //| //| //| Playing a wave file from flash:: diff --git a/shared-bindings/audiocore/__init__.c b/shared-bindings/audiocore/__init__.c index a27dcefa44..b400b94548 100644 --- a/shared-bindings/audiocore/__init__.c +++ b/shared-bindings/audiocore/__init__.c @@ -38,13 +38,6 @@ //| """Support for audio samples""" //| -//| _AudioSample = Union[audiocore.WaveFile, audiocore.RawSample, audiomixer.Mixer, audiomp3.MP3Decoder] -//| """An audio sample for playback with `audioio.AudioOut`, `audiobusio.I2SOut` or `audiopwmio.PWMAudioOut`. -//| -//| Supported sources are :py:class:`audiocore.WaveFile`, :py:class:`audiocore.RawSample`, -//| :py:class:`audiomixer.Mixer` and :py:class:`audiomp3.MP3Decoder`.""" -//| - STATIC const mp_rom_map_elem_t audiocore_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_audiocore) }, { MP_ROM_QSTR(MP_QSTR_RawSample), MP_ROM_PTR(&audioio_rawsample_type) }, diff --git a/shared-bindings/audioio/AudioOut.c b/shared-bindings/audioio/AudioOut.c index 25620a491f..0d479be097 100644 --- a/shared-bindings/audioio/AudioOut.c +++ b/shared-bindings/audioio/AudioOut.c @@ -146,11 +146,11 @@ STATIC mp_obj_t audioio_audioout_obj___exit__(size_t n_args, const mp_obj_t *arg STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audioio_audioout___exit___obj, 4, 4, audioio_audioout_obj___exit__); -//| def play(self, sample: audiocore._AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| -//| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, or `audiomixer.Mixer`. +//| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, `audiomixer.Mixer` or `audiomp3.MP3Decoder`. //| //| The sample itself should consist of 16 bit samples. Microcontrollers with a lower output //| resolution will use the highest order bits to output. For example, the SAMD21 has a 10 bit diff --git a/shared-bindings/audiomixer/Mixer.c b/shared-bindings/audiomixer/Mixer.c index 9a78c7fad6..293b19b055 100644 --- a/shared-bindings/audiomixer/Mixer.c +++ b/shared-bindings/audiomixer/Mixer.c @@ -211,11 +211,11 @@ const mp_obj_property_t audiomixer_mixer_voice_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| def play(self, sample: audiocore._AudioSample, *, voice: int = 0, loop: bool = False) -> None: +//| def play(self, sample: _typing.AudioSample, *, voice: int = 0, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| -//| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, or `audiomixer.Mixer`. +//| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, `audiomixer.Mixer` or `audiomp3.MP3Decoder`. //| //| The sample must match the Mixer's encoding settings given in the constructor.""" //| ... diff --git a/shared-bindings/audiomixer/MixerVoice.c b/shared-bindings/audiomixer/MixerVoice.c index 335949bb68..af00e10551 100644 --- a/shared-bindings/audiomixer/MixerVoice.c +++ b/shared-bindings/audiomixer/MixerVoice.c @@ -56,11 +56,11 @@ STATIC mp_obj_t audiomixer_mixervoice_make_new(const mp_obj_type_t *type, size_t return MP_OBJ_FROM_PTR(self); } -//| def play(self, sample: audiocore._AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when ``loop=False``, and continuously when ``loop=True``. //| Does not block. Use `playing` to block. //| -//| Sample must be an `audiocore.WaveFile`, `audiomixer.Mixer` or `audiocore.RawSample`. +//| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, `audiomixer.Mixer` or `audiomp3.MP3Decoder`. //| //| The sample must match the `audiomixer.Mixer`'s encoding settings given in the constructor.""" //| ... diff --git a/shared-bindings/audiomp3/MP3Decoder.c b/shared-bindings/audiomp3/MP3Decoder.c index 0e427951c0..85073bf89c 100644 --- a/shared-bindings/audiomp3/MP3Decoder.c +++ b/shared-bindings/audiomp3/MP3Decoder.c @@ -42,7 +42,7 @@ //| """Load a .mp3 file for playback with `audioio.AudioOut` or `audiobusio.I2SOut`. //| //| :param typing.BinaryIO file: Already opened mp3 file -//| :param bytearray buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two buffers are allocated internally. The specific buffer size required depends on the mp3 file. +//| :param ~_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two buffers are allocated internally. The specific buffer size required depends on the mp3 file. //| //| //| Playing a mp3 file from flash:: @@ -106,7 +106,7 @@ STATIC void check_for_deinit(audiomp3_mp3file_obj_t *self) { } } -//| def __enter__(self) -> MP3: +//| def __enter__(self) -> MP3Decoder: //| """No-op used by Context Managers.""" //| ... //| @@ -124,7 +124,7 @@ STATIC mp_obj_t audiomp3_mp3file_obj___exit__(size_t n_args, const mp_obj_t *arg } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiomp3_mp3file___exit___obj, 4, 4, audiomp3_mp3file_obj___exit__); -//| file: file +//| file: typing.BinaryIO //| """File to play back.""" //| STATIC mp_obj_t audiomp3_mp3file_obj_get_file(mp_obj_t self_in) { diff --git a/shared-bindings/audiopwmio/PWMAudioOut.c b/shared-bindings/audiopwmio/PWMAudioOut.c index 74545a4ebb..06571fae1e 100644 --- a/shared-bindings/audiopwmio/PWMAudioOut.c +++ b/shared-bindings/audiopwmio/PWMAudioOut.c @@ -148,11 +148,11 @@ STATIC mp_obj_t audiopwmio_pwmaudioout_obj___exit__(size_t n_args, const mp_obj_ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiopwmio_pwmaudioout___exit___obj, 4, 4, audiopwmio_pwmaudioout_obj___exit__); -//| def play(self, sample: audiocore._AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| -//| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, or `audiomixer.Mixer`. +//| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, `audiomixer.Mixer` or `audiomp3.MP3Decoder`. //| //| The sample itself should consist of 16 bit samples. Microcontrollers with a lower output //| resolution will use the highest order bits to output. For example, the SAMD21 has a 10 bit diff --git a/shared-bindings/bitbangio/I2C.c b/shared-bindings/bitbangio/I2C.c index 28ccb4746f..17005f63a8 100644 --- a/shared-bindings/bitbangio/I2C.c +++ b/shared-bindings/bitbangio/I2C.c @@ -120,7 +120,7 @@ static void check_lock(bitbangio_i2c_obj_t *self) { } } -//| def scan(self) -> list: +//| def scan(self) -> List[int]: //| """Scan all I2C addresses between 0x08 and 0x77 inclusive and return a list of //| those that respond. A device responds if it pulls the SDA line low after //| its address (including a read bit) is sent on the bus.""" @@ -175,7 +175,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_i2c_unlock_obj, bitbangio_i2c_obj_unlock); //| ``buf[start:end]`` will so it saves memory. //| //| :param int address: 7-bit device address -//| :param bytearray buffer: buffer to write into +//| :param ~_typing.WriteableBuffer buffer: buffer to write into //| :param int start: Index to start writing at //| :param int end: Index to write up to but not include""" //| ... @@ -230,7 +230,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_readfrom_into_obj, 3, bitbangio_i2c_rea //| to poll for the existence of a device. //| //| :param int address: 7-bit device address -//| :param bytearray buffer: buffer containing the bytes to write +//| :param ~_typing.ReadableBuffer buffer: buffer containing the bytes to write //| :param int start: Index to start writing from //| :param int end: Index to read up to but not include""" //| ... @@ -274,7 +274,7 @@ STATIC mp_obj_t bitbangio_i2c_writeto(size_t n_args, const mp_obj_t *pos_args, m STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_writeto_obj, 1, bitbangio_i2c_writeto); -//| def writeto_then_readfrom(self, address: int, out_buffer: WriteableBuffer, in_buffer: ReadableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None: +//| def writeto_then_readfrom(self, address: int, out_buffer: ReadableBuffer, in_buffer: ReadableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None: //| """Write the bytes from ``out_buffer`` to the device selected by ``address``, generate no stop //| bit, generate a repeated start and read into ``in_buffer``. ``out_buffer`` and //| ``in_buffer`` can be the same buffer because they are used sequentially. @@ -284,8 +284,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_writeto_obj, 1, bitbangio_i2c_wr //| will so it saves memory. //| //| :param int address: 7-bit device address -//| :param bytearray out_buffer: buffer containing the bytes to write -//| :param bytearray in_buffer: buffer to write into +//| :param ~_typing.ReadableBuffer out_buffer: buffer containing the bytes to write +//| :param ~_typing.WriteableBuffer in_buffer: buffer to write into //| :param int out_start: Index to start writing from //| :param int out_end: Index to read up to but not include. Defaults to ``len(buffer)`` //| :param int in_start: Index to start writing at diff --git a/shared-bindings/bitbangio/SPI.c b/shared-bindings/bitbangio/SPI.c index 3e071ed743..fea88bbd40 100644 --- a/shared-bindings/bitbangio/SPI.c +++ b/shared-bindings/bitbangio/SPI.c @@ -254,8 +254,8 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bitbangio_spi_readinto_obj, 2, 2, bitbangio_ //| must be equal. //| If buffer slice lengths are both 0, nothing happens. //| -//| :param bytearray buffer_out: Write out the data in this buffer -//| :param bytearray buffer_in: Read data into this buffer +//| :param ~_typing.ReadableBuffer buffer_out: Write out the data in this buffer +//| :param ~_typing.WriteableBuffer buffer_in: Read data into this buffer //| :param int out_start: Start of the slice of buffer_out to write out: ``buffer_out[out_start:out_end]`` //| :param int out_end: End of the slice; this index is not included. Defaults to ``len(buffer_out)`` //| :param int in_start: Start of the slice of ``buffer_in`` to read into: ``buffer_in[in_start:in_end]`` diff --git a/shared-bindings/busio/I2C.c b/shared-bindings/busio/I2C.c index 4a5d39c52a..157e779fdc 100644 --- a/shared-bindings/busio/I2C.c +++ b/shared-bindings/busio/I2C.c @@ -125,7 +125,7 @@ static void check_lock(busio_i2c_obj_t *self) { } } -//| def scan(self) -> list: +//| def scan(self) -> List[int]: //| """Scan all I2C addresses between 0x08 and 0x77 inclusive and return a //| list of those that respond. //| @@ -185,7 +185,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_i2c_unlock_obj, busio_i2c_obj_unlock); //| ``buf[start:end]`` will so it saves memory. //| //| :param int address: 7-bit device address -//| :param bytearray buffer: buffer to write into +//| :param ~_typing.WriteableBuffer buffer: buffer to write into //| :param int start: Index to start writing at //| :param int end: Index to write up to but not include. Defaults to ``len(buffer)``""" //| ... @@ -239,7 +239,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_readfrom_into_obj, 3, busio_i2c_readfrom_in //| to poll for the existence of a device. //| //| :param int address: 7-bit device address -//| :param bytearray buffer: buffer containing the bytes to write +//| :param ~_typing.ReadbleBuffer buffer: buffer containing the bytes to write //| :param int start: Index to start writing from //| :param int end: Index to read up to but not include. Defaults to ``len(buffer)``""" //| ... @@ -291,8 +291,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_writeto_obj, 1, busio_i2c_writeto); //| will so it saves memory. //| //| :param int address: 7-bit device address -//| :param bytearray out_buffer: buffer containing the bytes to write -//| :param bytearray in_buffer: buffer to write into +//| :param ~_typing.ReadbleBuffer out_buffer: buffer containing the bytes to write +//| :param ~_typing.WriteableBuffer in_buffer: buffer to write into //| :param int out_start: Index to start writing from //| :param int out_end: Index to read up to but not include. Defaults to ``len(buffer)`` //| :param int in_start: Index to start writing at diff --git a/shared-bindings/busio/SPI.c b/shared-bindings/busio/SPI.c index 93dc64d50b..aefe4f5a77 100644 --- a/shared-bindings/busio/SPI.c +++ b/shared-bindings/busio/SPI.c @@ -232,7 +232,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_spi_unlock_obj, busio_spi_obj_unlock); //| """Write the data contained in ``buffer``. The SPI object must be locked. //| If the buffer is empty, nothing happens. //| -//| :param bytearray buffer: Write out the data in this buffer +//| :param ~_typing.ReadableBuffer buffer: Write out the data in this buffer //| :param int start: Start of the slice of ``buffer`` to write out: ``buffer[start:end]`` //| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)``""" //| ... @@ -275,7 +275,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_write_obj, 2, busio_spi_write); //| The SPI object must be locked. //| If the number of bytes to read is 0, nothing happens. //| -//| :param bytearray buffer: Read data into this buffer +//| :param ~_typing.WriteableBuffer buffer: Read data into this buffer //| :param int start: Start of the slice of ``buffer`` to read into: ``buffer[start:end]`` //| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)`` //| :param int write_value: Value to write while reading. (Usually ignored.)""" @@ -314,15 +314,15 @@ STATIC mp_obj_t busio_spi_readinto(size_t n_args, const mp_obj_t *pos_args, mp_m } MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_readinto_obj, 2, busio_spi_readinto); -//| def write_readinto(self, buffer_out: ReadableBuffer, buffer_in: ReadableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None: +//| def write_readinto(self, buffer_out: ReadableBuffer, buffer_in: WriteableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None: //| """Write out the data in ``buffer_out`` while simultaneously reading data into ``buffer_in``. //| The SPI object must be locked. //| The lengths of the slices defined by ``buffer_out[out_start:out_end]`` and ``buffer_in[in_start:in_end]`` //| must be equal. //| If buffer slice lengths are both 0, nothing happens. //| -//| :param bytearray buffer_out: Write out the data in this buffer -//| :param bytearray buffer_in: Read data into this buffer +//| :param ~_typing.ReadableBuffer buffer_out: Write out the data in this buffer +//| :param ~_typing.WriteableBuffer buffer_in: Read data into this buffer //| :param int out_start: Start of the slice of buffer_out to write out: ``buffer_out[out_start:out_end]`` //| :param int out_end: End of the slice; this index is not included. Defaults to ``len(buffer_out)`` //| :param int in_start: Start of the slice of ``buffer_in`` to read into: ``buffer_in[in_start:in_end]`` diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 70e29ff3e0..c4fbdab2e4 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -81,8 +81,8 @@ //| of the display to minimize tearing artifacts. //| //| :param display_bus: The bus that the display is connected to -//| :type display_bus: FourWire, ParallelBus or I2CDisplay -//| :param buffer init_sequence: Byte-packed initialization sequence. +//| :type _DisplayBus: FourWire, ParallelBus or I2CDisplay +//| :param ~_typing.ReadableBuffer init_sequence: Byte-packed initialization sequence. //| :param int width: Width in pixels //| :param int height: Height in pixels //| :param int colstart: The index if the first visible column @@ -344,7 +344,7 @@ const mp_obj_property_t displayio_display_auto_brightness_obj = { //| width: int -//| Gets the width of the board +//| """Gets the width of the board""" //| STATIC mp_obj_t displayio_display_obj_get_width(mp_obj_t self_in) { displayio_display_obj_t *self = native_display(self_in); @@ -360,7 +360,7 @@ const mp_obj_property_t displayio_display_width_obj = { }; //| height: int -//| """Gets the height of the board""" +//| """Gets the height of the board""" //| STATIC mp_obj_t displayio_display_obj_get_height(mp_obj_t self_in) { displayio_display_obj_t *self = native_display(self_in); @@ -399,7 +399,7 @@ const mp_obj_property_t displayio_display_rotation_obj = { }; //| bus: _DisplayBus -//| """The bus being used by the display""" +//| """The bus being used by the display""" //| //| STATIC mp_obj_t displayio_display_obj_get_bus(mp_obj_t self_in) { @@ -420,7 +420,7 @@ const mp_obj_property_t displayio_display_bus_obj = { //| """Extract the pixels from a single row //| //| :param int y: The top edge of the area -//| :param bytearray buffer: The buffer in which to place the pixel data""" +//| :param ~_typing.WriteableBuffer buffer: The buffer in which to place the pixel data""" //| ... //| STATIC mp_obj_t displayio_display_obj_fill_row(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index ee1586fe67..8be4ee4c4a 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -60,9 +60,9 @@ //| begin a new command definition. //| //| :param display_bus: The bus that the display is connected to -//| :type display_bus: displayio.FourWire or displayio.ParallelBus -//| :param buffer start_sequence: Byte-packed initialization sequence. -//| :param buffer stop_sequence: Byte-packed initialization sequence. +//| :type _DisplayBus: displayio.FourWire or displayio.ParallelBus +//| :param ~_typing.ReadableBuffer start_sequence: Byte-packed initialization sequence. +//| :param ~_typing.ReadableBuffer stop_sequence: Byte-packed initialization sequence. //| :param int width: Width in pixels //| :param int height: Height in pixels //| :param int ram_width: RAM width in pixels @@ -238,7 +238,7 @@ const mp_obj_property_t displayio_epaperdisplay_width_obj = { }; //| height: int -//| """Gets the height of the display in pixels""" +//| """Gets the height of the display in pixels""" //| STATIC mp_obj_t displayio_epaperdisplay_obj_get_height(mp_obj_t self_in) { displayio_epaperdisplay_obj_t *self = native_display(self_in); @@ -254,7 +254,7 @@ const mp_obj_property_t displayio_epaperdisplay_height_obj = { }; //| bus: _DisplayBus -//| """The bus being used by the display""" +//| """The bus being used by the display""" //| STATIC mp_obj_t displayio_epaperdisplay_obj_get_bus(mp_obj_t self_in) { displayio_epaperdisplay_obj_t *self = native_display(self_in); diff --git a/shared-bindings/displayio/Group.c b/shared-bindings/displayio/Group.c index a7810df5fd..386e270abd 100644 --- a/shared-bindings/displayio/Group.c +++ b/shared-bindings/displayio/Group.c @@ -190,7 +190,7 @@ const mp_obj_property_t displayio_group_y_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| def append(self, layer: Union[vectorio.Shape, Group, TileGrid]) -> None: +//| def append(self, layer: Union[vectorio.VectorShape, Group, TileGrid]) -> None: //| """Append a layer to the group. It will be drawn above other layers.""" //| ... //| @@ -201,7 +201,7 @@ STATIC mp_obj_t displayio_group_obj_append(mp_obj_t self_in, mp_obj_t layer) { } MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_append_obj, displayio_group_obj_append); -//| def insert(self, index: int, layer: Union[vectorio.Shape, Group, TileGrid]) -> None: +//| def insert(self, index: int, layer: Union[vectorio.VectorShape, Group, TileGrid]) -> None: //| """Insert a layer into the group.""" //| ... //| @@ -217,7 +217,7 @@ STATIC mp_obj_t displayio_group_obj_insert(mp_obj_t self_in, mp_obj_t index_obj, MP_DEFINE_CONST_FUN_OBJ_3(displayio_group_insert_obj, displayio_group_obj_insert); -//| def index(self, layer: Union[vectorio.Shape, Group, TileGrid]) -> int: +//| def index(self, layer: Union[vectorio.VectorShape, Group, TileGrid]) -> int: //| """Returns the index of the first copy of layer. Raises ValueError if not found.""" //| ... //| @@ -231,7 +231,7 @@ STATIC mp_obj_t displayio_group_obj_index(mp_obj_t self_in, mp_obj_t layer) { } MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_index_obj, displayio_group_obj_index); -//| def pop(self, i: int = -1) -> Union[vectorio.Shape, Group, TileGrid]: +//| def pop(self, i: int = -1) -> Union[vectorio.VectorShape, Group, TileGrid]: //| """Remove the ith item and return it.""" //| ... //| @@ -254,7 +254,7 @@ STATIC mp_obj_t displayio_group_obj_pop(size_t n_args, const mp_obj_t *pos_args, MP_DEFINE_CONST_FUN_OBJ_KW(displayio_group_pop_obj, 1, displayio_group_obj_pop); -//| def remove(self, layer: Union[vectorio.Shape, Group, TileGrid]) -> None: +//| def remove(self, layer: Union[vectorio.VectorShape, Group, TileGrid]) -> None: //| """Remove the first copy of layer. Raises ValueError if it is not present.""" //| ... //| @@ -284,7 +284,7 @@ STATIC mp_obj_t group_unary_op(mp_unary_op_t op, mp_obj_t self_in) { } } -//| def __getitem__(self, index: int) -> Union[vectorio.Shape, Group, TileGrid]: +//| def __getitem__(self, index: int) -> Union[vectorio.VectorShape, Group, TileGrid]: //| """Returns the value at the given index. //| //| This allows you to:: @@ -292,7 +292,7 @@ STATIC mp_obj_t group_unary_op(mp_unary_op_t op, mp_obj_t self_in) { //| print(group[0])""" //| ... //| -//| def __setitem__(self, index: int, value: Union[vectorio.Shape, Group, TileGrid]) -> None: +//| def __setitem__(self, index: int, value: Union[vectorio.VectorShape, Group, TileGrid]) -> None: //| """Sets the value at the given index. //| //| This allows you to:: diff --git a/shared-bindings/fontio/Glyph.c b/shared-bindings/fontio/Glyph.c index 6558e2e7a1..486cebd719 100644 --- a/shared-bindings/fontio/Glyph.c +++ b/shared-bindings/fontio/Glyph.c @@ -39,7 +39,7 @@ //| dx: int, //| dy: int, //| shift_x: int, -//| shift_y: int): +//| shift_y: int) -> None: //| """Named tuple used to capture a single glyph and its attributes. //| //| :param bitmap: the bitmap including the glyph diff --git a/shared-bindings/framebufferio/FramebufferDisplay.c b/shared-bindings/framebufferio/FramebufferDisplay.c index e29718fdf3..8d1e2ac9c3 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.c +++ b/shared-bindings/framebufferio/FramebufferDisplay.c @@ -47,11 +47,10 @@ //| objects in CircuitPython, Display objects live until `displayio.release_displays()` //| is called. This is done so that CircuitPython can use the display itself.""" //| -//| def __init__(self, framebuffer: rgbmatrix.RGBMatrix, *, rotation: int = 0, auto_refresh: bool = True) -> None: +//| def __init__(self, framebuffer: _typing.FrameBuffer, *, rotation: int = 0, auto_refresh: bool = True) -> None: //| """Create a Display object with the given framebuffer (a buffer, array, ulab.array, etc) //| -//| :param framebuffer: The framebuffer that the display is connected to -//| :type framebuffer: any core object implementing the framebuffer protocol +//| :param ~_typing.FrameBuffer framebuffer: The framebuffer that the display is connected to //| :param bool auto_refresh: Automatically refresh the screen //| :param int rotation: The rotation of the display in degrees clockwise. Must be in 90 degree increments (0, 90, 180, 270)""" //| ... @@ -245,7 +244,7 @@ const mp_obj_property_t framebufferio_framebufferdisplay_auto_brightness_obj = { }; //| width: int -//| """Gets the width of the framebuffer""" +//| """Gets the width of the framebuffer""" //| STATIC mp_obj_t framebufferio_framebufferdisplay_obj_get_width(mp_obj_t self_in) { framebufferio_framebufferdisplay_obj_t *self = native_display(self_in); @@ -261,7 +260,7 @@ const mp_obj_property_t framebufferio_framebufferdisplay_width_obj = { }; //| height: int -//| """Gets the height of the framebuffer""" +//| """Gets the height of the framebuffer""" //| STATIC mp_obj_t framebufferio_framebufferdisplay_obj_get_height(mp_obj_t self_in) { framebufferio_framebufferdisplay_obj_t *self = native_display(self_in); @@ -299,8 +298,8 @@ const mp_obj_property_t framebufferio_framebufferdisplay_rotation_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| framebuffer: rgbmatrix.RGBMatrix -//| """The framebuffer being used by the display""" +//| framebuffer: _typing.FrameBuffer +//| """The framebuffer being used by the display""" //| //| STATIC mp_obj_t framebufferio_framebufferdisplay_obj_get_framebuffer(mp_obj_t self_in) { @@ -317,11 +316,11 @@ const mp_obj_property_t framebufferio_framebufferframebuffer_obj = { }; -//| def fill_row(self, y: int, buffer: WriteableBuffer) -> displayio: +//| def fill_row(self, y: int, buffer: WriteableBuffer) -> WriteableBuffer: //| """Extract the pixels from a single row //| //| :param int y: The top edge of the area -//| :param bytearray buffer: The buffer in which to place the pixel data""" +//| :param ~_typing.WriteableBuffer buffer: The buffer in which to place the pixel data""" //| ... //| STATIC mp_obj_t framebufferio_framebufferdisplay_obj_fill_row(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { diff --git a/shared-bindings/help.rst b/shared-bindings/help.rst index f6d72a5568..ccc3790a5a 100644 --- a/shared-bindings/help.rst +++ b/shared-bindings/help.rst @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -:func:`help` - Built-in method to provide helpful information +:func:`help` -- Built-in method to provide helpful information ============================================================== .. function:: help(object=None) diff --git a/shared-bindings/i2cperipheral/I2CPeripheral.c b/shared-bindings/i2cperipheral/I2CPeripheral.c index cfebd472ee..b5ac861b4e 100644 --- a/shared-bindings/i2cperipheral/I2CPeripheral.c +++ b/shared-bindings/i2cperipheral/I2CPeripheral.c @@ -52,13 +52,14 @@ STATIC mp_obj_t mp_obj_new_i2cperipheral_i2c_peripheral_request(i2cperipheral_i2 //| class I2CPeripheral: //| """Two wire serial protocol peripheral""" //| -//| def __init__(self, scl: microcontroller.Pin, sda: microcontroller.Pin, addresses: tuple, smbus: bool = False) -> None: +//| def __init__(self, scl: microcontroller.Pin, sda: microcontroller.Pin, addresses: Sequence[int], smbus: bool = False) -> None: //| """I2C is a two-wire protocol for communicating between devices. //| This implements the peripheral (sensor, secondary) side. //| //| :param ~microcontroller.Pin scl: The clock pin //| :param ~microcontroller.Pin sda: The data pin -//| :param tuple addresses: The I2C addresses to respond to (how many is hw dependent). +//| :param addresses: The I2C addresses to respond to (how many is hw dependent). +//| :type addresses: list[int] //| :param bool smbus: Use SMBUS timings if the hardware supports it""" //| ... //| @@ -86,7 +87,7 @@ STATIC mp_obj_t i2cperipheral_i2c_peripheral_make_new(const mp_obj_type_t *type, while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) { mp_int_t value; if (!mp_obj_get_int_maybe(item, &value)) { - mp_raise_TypeError(translate("can't convert address to int")); + mp_raise_TypeError_varg(translate("can't convert %q to %q"), MP_QSTR_address, MP_QSTR_int); } if (value < 0x00 || value > 0x7f) { mp_raise_ValueError(translate("address out of bounds")); @@ -352,7 +353,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(i2cperipheral_i2c_peripheral_request_read_obj, 1, i2c //| def write(self, buffer: ReadableBuffer) -> int: //| """Write the data contained in buffer. //| -//| :param buffer: Write out the data in this buffer +//| :param ~_typing.ReadableBuffer buffer: Write out the data in this buffer //| :return: Number of bytes written""" //| ... //| diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c index c00b1e314d..2e58bdcc29 100644 --- a/shared-bindings/microcontroller/__init__.c +++ b/shared-bindings/microcontroller/__init__.c @@ -47,6 +47,9 @@ //| The `microcontroller` module defines the pins from the perspective of the //| microcontroller. See `board` for board-specific pin mappings.""" //| +//| from nvm import ByteArray +//| from watchdog import WatchDogTimer +//| //| cpu: Processor //| """CPU information and control, such as ``cpu.temperature`` and ``cpu.frequency`` @@ -133,14 +136,14 @@ STATIC mp_obj_t mcu_reset(void) { } STATIC MP_DEFINE_CONST_FUN_OBJ_0(mcu_reset_obj, mcu_reset); -//| nvm: Optional[nvm.ByteArray] +//| nvm: Optional[ByteArray] //| """Available non-volatile memory. //| This object is the sole instance of `nvm.ByteArray` when available or ``None`` otherwise. //| //| :type: nvm.ByteArray or None""" //| -//| watchdog: Optional[watchdog.WatchDogTimer] +//| watchdog: Optional[WatchDogTimer] //| """Available watchdog timer. //| This object is the sole instance of `watchdog.WatchDogTimer` when available or ``None`` otherwise.""" //| diff --git a/shared-bindings/multiterminal/__init__.c b/shared-bindings/multiterminal/__init__.c index 1fbeca79cc..689d3d7618 100644 --- a/shared-bindings/multiterminal/__init__.c +++ b/shared-bindings/multiterminal/__init__.c @@ -78,7 +78,7 @@ STATIC mp_obj_t multiterminal_obj_clear_secondary_terminal() { } MP_DEFINE_CONST_FUN_OBJ_0(multiterminal_clear_secondary_terminal_obj, multiterminal_obj_clear_secondary_terminal); -//| def schedule_secondary_terminal_read(socket: secondary_terminal) -> None: +//| def schedule_secondary_terminal_read(socket: socket.socket) -> None: //| """In cases where the underlying OS is doing task scheduling, this notifies //| the OS when more data is available on the socket to read. This is useful //| as a callback for lwip sockets.""" diff --git a/shared-bindings/neopixel_write/__init__.c b/shared-bindings/neopixel_write/__init__.c index 8eb426c2b7..a353e34aee 100644 --- a/shared-bindings/neopixel_write/__init__.c +++ b/shared-bindings/neopixel_write/__init__.c @@ -53,8 +53,8 @@ //| def neopixel_write(digitalinout: digitalio.DigitalInOut, buf: ReadableBuffer) -> None: //| """Write buf out on the given DigitalInOut. //| -//| :param digitalinout: the DigitalInOut to output with -//| :param buf: The bytes to clock out. No assumption is made about color order""" +//| :param ~digitalio.DigitalInOut digitalinout: the DigitalInOut to output with +//| :param ~_typing.ReadableBuffer buf: The bytes to clock out. No assumption is made about color order""" //| ... STATIC mp_obj_t neopixel_write_neopixel_write_(mp_obj_t digitalinout_obj, mp_obj_t buf) { if (!MP_OBJ_IS_TYPE(digitalinout_obj, &digitalio_digitalinout_type)) { diff --git a/shared-bindings/network/__init__.c b/shared-bindings/network/__init__.c index 35bbaa510d..cfcadd98f9 100644 --- a/shared-bindings/network/__init__.c +++ b/shared-bindings/network/__init__.c @@ -47,7 +47,7 @@ //| It is used by the 'socket' module to look up a suitable //| NIC when a socket is created.""" //| -//| def route() -> list: +//| def route() -> List[object]: //| """Returns a list of all configured NICs.""" //| ... //| diff --git a/shared-bindings/nvm/ByteArray.c b/shared-bindings/nvm/ByteArray.c index 994ce70458..bed15c9ede 100644 --- a/shared-bindings/nvm/ByteArray.c +++ b/shared-bindings/nvm/ByteArray.c @@ -73,12 +73,14 @@ STATIC MP_DEFINE_CONST_DICT(nvm_bytearray_locals_dict, nvm_bytearray_locals_dict //| @overload //| def __getitem__(self, index: slice) -> bytearray: ... +//| @overload //| def __getitem__(self, index: int) -> int: //| """Returns the value at the given index.""" //| ... //| //| @overload //| def __setitem__(self, index: slice, value: ReadableBuffer) -> None: ... +//| @overload //| def __setitem__(self, index: int, value: int) -> None: //| """Set the value at the given index.""" //| ... diff --git a/shared-bindings/os/__init__.c b/shared-bindings/os/__init__.c index 2406dbc371..c499df9724 100644 --- a/shared-bindings/os/__init__.c +++ b/shared-bindings/os/__init__.c @@ -43,12 +43,22 @@ //| code written in CircuitPython will work in CPython but not necessarily the //| other way around.""" //| +//| import typing -//| def uname() -> tuple: +//| def uname() -> _Uname: //| """Returns a named tuple of operating specific and CircuitPython port //| specific information.""" //| ... //| +//| class _Uname(typing.NamedTuple): +//| """The type of values that :py:func:`.uname()` returns""" +//| +//| sysname: str +//| nodename: str +//| release: str +//| version: str +//| machine: str +//| STATIC mp_obj_t os_uname(void) { return common_hal_os_uname(); } @@ -134,7 +144,7 @@ mp_obj_t os_rmdir(mp_obj_t path_in) { } MP_DEFINE_CONST_FUN_OBJ_1(os_rmdir_obj, os_rmdir); -//| def stat(path: str) -> str: +//| def stat(path: str) -> Tuple[int, int, int, int, int, int, int, int, int, int]: //| """Get the status of a file or directory. //| //| .. note:: On builds without long integers, the number of seconds diff --git a/shared-bindings/ps2io/Ps2.c b/shared-bindings/ps2io/Ps2.c index 15731ea404..0977e08ff7 100644 --- a/shared-bindings/ps2io/Ps2.c +++ b/shared-bindings/ps2io/Ps2.c @@ -133,7 +133,7 @@ STATIC mp_obj_t ps2io_ps2_obj_popleft(mp_obj_t self_in) { int b = common_hal_ps2io_ps2_popleft(self); if (b < 0) { - mp_raise_IndexError(translate("Pop from an empty Ps2 buffer")); + mp_raise_IndexError_varg(translate("pop from empty %q"), MP_QSTR_Ps2_space_buffer); } return MP_OBJ_NEW_SMALL_INT(b); } diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c index b2dd80682b..9cfc0d4095 100644 --- a/shared-bindings/rgbmatrix/RGBMatrix.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -128,7 +128,7 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_ } } -//| def __init__(self, *, width: int, bit_depth: int, rgb_pins: Sequence[digitalio.DigitalInOut], addr_pins: List[digitalio.DigitalInOut], clock_pin: digitalio.DigitalInOut, latch_pin: digitalio.DigitalInOut, output_enable_pin: digitalio.DigitalInOut, doublebuffer: bool = True, framebuffer: Optional[WriteableBuffer] = None, height: int = 0) -> None: +//| def __init__(self, *, width: int, bit_depth: int, rgb_pins: Sequence[digitalio.DigitalInOut], addr_pins: Sequence[digitalio.DigitalInOut], clock_pin: digitalio.DigitalInOut, latch_pin: digitalio.DigitalInOut, output_enable_pin: digitalio.DigitalInOut, doublebuffer: bool = True, framebuffer: Optional[WriteableBuffer] = None, height: int = 0) -> None: //| """Create a RGBMatrix object with the given attributes. The height of //| the display is determined by the number of rgb and address pins: //| len(rgb_pins) // 3 * 2 ** len(address_pins). With 6 RGB pins and 4 @@ -352,7 +352,8 @@ STATIC void rgbmatrix_rgbmatrix_get_bufinfo(mp_obj_t self_in, mp_buffer_info_t * // These version exists so that the prototype matches the protocol, // avoiding a type cast that can hide errors -STATIC void rgbmatrix_rgbmatrix_swapbuffers(mp_obj_t self_in) { +STATIC void rgbmatrix_rgbmatrix_swapbuffers(mp_obj_t self_in, uint8_t *dirty_row_bitmap) { + (void)dirty_row_bitmap; common_hal_rgbmatrix_rgbmatrix_refresh(self_in); } diff --git a/shared-bindings/rotaryio/__init__.c b/shared-bindings/rotaryio/__init__.c index 0fa457ca73..fd8578753d 100644 --- a/shared-bindings/rotaryio/__init__.c +++ b/shared-bindings/rotaryio/__init__.c @@ -38,10 +38,9 @@ //| The `rotaryio` module contains classes to read different rotation encoding schemes. See //| `Wikipedia's Rotary Encoder page `_ for more //| background. - +//| //| .. warning:: This module is not available in some SAMD21 (aka M0) builds. See the :ref:`module-support-matrix` for more info. //| - //| All classes change hardware state and should be deinitialized when they //| are no longer needed if the program continues after use. To do so, either //| call :py:meth:`!deinit` or use a context manager. See diff --git a/shared-bindings/sdcardio/SDCard.c b/shared-bindings/sdcardio/SDCard.c index a0582d1435..975f8b0953 100644 --- a/shared-bindings/sdcardio/SDCard.c +++ b/shared-bindings/sdcardio/SDCard.c @@ -125,7 +125,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(sdcardio_sdcard_deinit_obj, sdcardio_sdcard_deinit); //| """Read one or more blocks from the card //| //| :param int start_block: The block to start reading from -//| :param bytearray buf: The buffer to write into. Length must be multiple of 512. +//| :param ~_typing.WriteableBuffer buf: The buffer to write into. Length must be multiple of 512. //| //| :return: None""" //| @@ -149,7 +149,7 @@ MP_DEFINE_CONST_FUN_OBJ_3(sdcardio_sdcard_readblocks_obj, sdcardio_sdcard_readbl //| """Write one or more blocks to the card //| //| :param int start_block: The block to start writing from -//| :param bytearray buf: The buffer to read from. Length must be multiple of 512. +//| :param ~_typing.ReadableBuffer buf: The buffer to read from. Length must be multiple of 512. //| //| :return: None""" //| diff --git a/shared-bindings/sdioio/SDCard.c b/shared-bindings/sdioio/SDCard.c index 594fa71fff..aba414cd63 100644 --- a/shared-bindings/sdioio/SDCard.c +++ b/shared-bindings/sdioio/SDCard.c @@ -165,7 +165,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(sdioio_sdcard_count_obj, sdioio_sdcard_count); //| """Read one or more blocks from the card //| //| :param int start_block: The block to start reading from -//| :param bytearray buf: The buffer to write into. Length must be multiple of 512. +//| :param ~_typing.WriteableBuffer buf: The buffer to write into. Length must be multiple of 512. //| //| :return: None""" mp_obj_t sdioio_sdcard_readblocks(mp_obj_t self_in, mp_obj_t start_block_in, mp_obj_t buf_in) { @@ -182,12 +182,12 @@ mp_obj_t sdioio_sdcard_readblocks(mp_obj_t self_in, mp_obj_t start_block_in, mp_ MP_DEFINE_CONST_FUN_OBJ_3(sdioio_sdcard_readblocks_obj, sdioio_sdcard_readblocks); -//| def writeblocks(self, start_block: int, buf: WriteableBuffer) -> None: +//| def writeblocks(self, start_block: int, buf: ReadableBuffer) -> None: //| //| """Write one or more blocks to the card //| //| :param int start_block: The block to start writing from -//| :param bytearray buf: The buffer to read from. Length must be multiple of 512. +//| :param ~_typing.ReadableBuffer buf: The buffer to read from. Length must be multiple of 512. //| //| :return: None""" //| diff --git a/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.c b/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.c new file mode 100644 index 0000000000..e8f4e970a2 --- /dev/null +++ b/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.c @@ -0,0 +1,92 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/objarray.h" +#include "py/runtime.h" + +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" + +STATIC mp_obj_t sharpdisplay_framebuffer_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_spi_bus, ARG_chip_select, ARG_width, ARG_height, ARG_baudrate, NUM_ARGS }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_spi_bus, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_obj = MP_OBJ_NULL} }, + { MP_QSTR_chip_select, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_obj = MP_OBJ_NULL} }, + { MP_QSTR_width, MP_ARG_INT | MP_ARG_REQUIRED, {.u_int = 0} }, + { MP_QSTR_height, MP_ARG_INT | MP_ARG_REQUIRED, {.u_int = 0} }, + { MP_QSTR_baudrate, MP_ARG_INT, {.u_int = 2000000} }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + MP_STATIC_ASSERT( MP_ARRAY_SIZE(allowed_args) == NUM_ARGS ); + + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mcu_pin_obj_t *chip_select = validate_obj_is_free_pin(args[ARG_chip_select].u_obj); + busio_spi_obj_t *spi = validate_obj_is_spi_bus(args[ARG_spi_bus].u_obj); + + sharpdisplay_framebuffer_obj_t* self = &allocate_display_bus_or_raise()->sharpdisplay; + self->base.type = &sharpdisplay_framebuffer_type; + + common_hal_sharpdisplay_framebuffer_construct(self, spi, chip_select, args[ARG_baudrate].u_int, args[ARG_width].u_int, args[ARG_height].u_int); + + return MP_OBJ_FROM_PTR(self); +} + + +STATIC mp_int_t sharpdisplay_framebuffer_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) { + sharpdisplay_framebuffer_obj_t *self = (sharpdisplay_framebuffer_obj_t*)self_in; + // a readonly framebuffer would be unusual but not impossible + if ((flags & MP_BUFFER_WRITE) && !(self->bufinfo.typecode & MP_OBJ_ARRAY_TYPECODE_FLAG_RW)) { + return 1; + } + *bufinfo = self->bufinfo; + return 0; +} + +STATIC mp_obj_t sharpdisplay_framebuffer_deinit(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = (sharpdisplay_framebuffer_obj_t*)self_in; + common_hal_sharpdisplay_framebuffer_deinit(self); + + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(sharpdisplay_framebuffer_deinit_obj, sharpdisplay_framebuffer_deinit); + +STATIC const mp_rom_map_elem_t sharpdisplay_framebuffer_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&sharpdisplay_framebuffer_deinit_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(sharpdisplay_framebuffer_locals_dict, sharpdisplay_framebuffer_locals_dict_table); + +const mp_obj_type_t sharpdisplay_framebuffer_type = { + { &mp_type_type }, + .name = MP_QSTR_SharpMemoryFramebuffer, + .buffer_p = { .get_buffer = sharpdisplay_framebuffer_get_buffer, }, + .make_new = sharpdisplay_framebuffer_make_new, + .protocol = &sharpdisplay_framebuffer_proto, + .locals_dict = (mp_obj_dict_t*)&sharpdisplay_framebuffer_locals_dict, +}; diff --git a/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h b/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h new file mode 100644 index 0000000000..30f1b867b1 --- /dev/null +++ b/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h @@ -0,0 +1,34 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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 + +// #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" +// #include "shared-module/framebufferio/FramebufferDisplay.h" + +#include "py/objtype.h" + +extern const mp_obj_type_t sharpdisplay_framebuffer_type; diff --git a/shared-bindings/sharpdisplay/__init__.c b/shared-bindings/sharpdisplay/__init__.c new file mode 100644 index 0000000000..d1f728c61b --- /dev/null +++ b/shared-bindings/sharpdisplay/__init__.c @@ -0,0 +1,47 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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 + +#include "py/obj.h" +#include "py/runtime.h" + +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" + +//| """Support for Sharp Memory Display framebuffers""" +//| + +STATIC const mp_rom_map_elem_t sharpdisplay_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_sharpdisplay) }, + { MP_ROM_QSTR(MP_QSTR_SharpMemoryFramebuffer), MP_ROM_PTR(&sharpdisplay_framebuffer_type) }, +}; + +STATIC MP_DEFINE_CONST_DICT(sharpdisplay_module_globals, sharpdisplay_module_globals_table); + +const mp_obj_module_t sharpdisplay_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t*)&sharpdisplay_module_globals, +}; diff --git a/shared-bindings/sharpdisplay/__init__.h b/shared-bindings/sharpdisplay/__init__.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/shared-bindings/socket/__init__.c b/shared-bindings/socket/__init__.c index 53ac57d11a..38840da5ea 100644 --- a/shared-bindings/socket/__init__.c +++ b/shared-bindings/socket/__init__.c @@ -52,11 +52,17 @@ STATIC const mp_obj_type_t socket_type; //| def __init__(self, family: int, type: int, proto: int) -> None: //| """Create a new socket //| -//| :param ~int family: AF_INET or AF_INET6 -//| :param ~int type: SOCK_STREAM, SOCK_DGRAM or SOCK_RAW -//| :param ~int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)""" +//| :param int family: AF_INET or AF_INET6 +//| :param int type: SOCK_STREAM, SOCK_DGRAM or SOCK_RAW +//| :param int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)""" //| ... //| +//| AF_INET: int +//| AF_INET6: int +//| SOCK_STREAM: int +//| SOCK_DGRAM: int +//| SOCK_RAW: int +//| STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { mp_arg_check_num(n_args, kw_args, 0, 4, false); @@ -96,10 +102,11 @@ STATIC void socket_select_nic(mod_network_socket_obj_t *self, const byte *ip) { } } -//| def bind(self, address: tuple) -> None: +//| def bind(self, address: Tuple[str, int]) -> None: //| """Bind a socket to an address //| -//| :param ~tuple address: tuple of (remote_address, remote_port)""" +//| :param address: tuple of (remote_address, remote_port) +//| :type address: tuple(str, int)""" //| ... //| @@ -126,7 +133,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_bind_obj, socket_bind); //| def listen(self, backlog: int) -> None: //| """Set socket to listen for incoming connections //| -//| :param ~int backlog: length of backlog queue for waiting connetions""" +//| :param int backlog: length of backlog queue for waiting connetions""" //| ... //| @@ -148,7 +155,7 @@ STATIC mp_obj_t socket_listen(mp_obj_t self_in, mp_obj_t backlog) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_listen_obj, socket_listen); -//| def accept(self) -> tuple: +//| def accept(self) -> Tuple[socket, str]: //| """Accept a connection on a listening socket of type SOCK_STREAM, //| creating a new socket of type SOCK_STREAM. //| Returns a tuple of (new_socket, remote_address)""" @@ -185,10 +192,11 @@ STATIC mp_obj_t socket_accept(mp_obj_t self_in) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(socket_accept_obj, socket_accept); -//| def connect(self, address: tuple) -> None: +//| def connect(self, address: Tuple[str, int]) -> None: //| """Connect a socket to a remote address //| -//| :param ~tuple address: tuple of (remote_address, remote_port)""" +//| :param address: tuple of (remote_address, remote_port) +//| :type address: tuple(str, int)""" //| ... //| @@ -216,7 +224,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_connect_obj, socket_connect); //| """Send some bytes to the connected remote address. //| Suits sockets of type SOCK_STREAM //| -//| :param ~bytes bytes: some bytes to send""" +//| :param ~_typing.ReadableBuffer bytes: some bytes to send""" //| ... //| @@ -259,7 +267,7 @@ STATIC mp_int_t _socket_recv_into(mod_network_socket_obj_t *sock, byte *buf, mp_ //| Suits sockets of type SOCK_STREAM //| Returns an int of number of bytes read. //| -//| :param bytearray buffer: buffer to receive into +//| :param ~_typing.WriteableBuffer buffer: buffer to receive into //| :param int bufsize: optionally, a maximum number of bytes to read.""" //| ... //| @@ -290,7 +298,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_recv_into_obj, 2, 3, socket_re //| Suits sockets of type SOCK_STREAM //| Returns a bytes() of length <= bufsize //| -//| :param ~int bufsize: maximum number of bytes to receive""" +//| :param int bufsize: maximum number of bytes to receive""" //| ... //| @@ -312,12 +320,13 @@ STATIC mp_obj_t socket_recv(mp_obj_t self_in, mp_obj_t len_in) { } STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_recv_obj, socket_recv); -//| def sendto(self, bytes: ReadableBuffer, address: tuple) -> int: +//| def sendto(self, bytes: ReadableBuffer, address: Tuple[str, int]) -> int: //| """Send some bytes to a specific address. //| Suits sockets of type SOCK_DGRAM //| -//| :param ~bytes bytes: some bytes to send -//| :param ~tuple address: tuple of (remote_address, remote_port)""" +//| :param ~_typing.ReadableBuffer bytes: some bytes to send +//| :param address: tuple of (remote_address, remote_port) +//| :type address: tuple(str, int)""" //| ... //| @@ -346,7 +355,7 @@ STATIC mp_obj_t socket_sendto(mp_obj_t self_in, mp_obj_t data_in, mp_obj_t addr_ } STATIC MP_DEFINE_CONST_FUN_OBJ_3(socket_sendto_obj, socket_sendto); -//| def recvfrom(self, bufsize: int) -> Tuple[bytes, tuple]: +//| def recvfrom(self, bufsize: int) -> Tuple[bytes, Tuple[str, int]]: //| """Reads some bytes from the connected remote address. //| Suits sockets of type SOCK_STREAM //| @@ -354,7 +363,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_3(socket_sendto_obj, socket_sendto); //| * a bytes() of length <= bufsize //| * a remote_address, which is a tuple of ip address and port number //| -//| :param ~int bufsize: maximum number of bytes to receive""" +//| :param int bufsize: maximum number of bytes to receive""" //| ... //| @@ -422,7 +431,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_setsockopt_obj, 4, 4, socket_s //| def settimeout(self, value: int) -> None: //| """Set the timeout value for this socket. //| -//| :param ~int value: timeout in seconds. 0 means non-blocking. None means block indefinitely.""" +//| :param int value: timeout in seconds. 0 means non-blocking. None means block indefinitely.""" //| ... //| @@ -453,7 +462,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_settimeout_obj, socket_settimeout); //| def setblocking(self, flag: bool) -> Optional[int]: //| """Set the blocking behaviour of this socket. //| -//| :param ~bool flag: False means non-blocking, True means block indefinitely.""" +//| :param bool flag: False means non-blocking, True means block indefinitely.""" //| ... //| @@ -512,7 +521,7 @@ STATIC const mp_obj_type_t socket_type = { .locals_dict = (mp_obj_dict_t*)&socket_locals_dict, }; -//| def getaddrinfo(host: str, port: int) -> tuple: +//| def getaddrinfo(host: str, port: int) -> Tuple[int, int, int, str, str]: //| """Gets the address information for a hostname and port //| //| Returns the appropriate family, socket type, socket protocol and diff --git a/shared-bindings/storage/__init__.c b/shared-bindings/storage/__init__.c index 79c5274aae..cafaf59869 100644 --- a/shared-bindings/storage/__init__.c +++ b/shared-bindings/storage/__init__.c @@ -187,7 +187,7 @@ STATIC const mp_rom_map_elem_t storage_module_globals_table[] = { //| """Like builtin ``open()``""" //| ... //| -//| def ilistdir(self, path: str) -> Iterator[Tuple[AnyStr, int, int, int]]: +//| def ilistdir(self, path: str) -> Iterator[Union[Tuple[AnyStr, int, int, int], Tuple[AnyStr, int, int]]]: //| """Return an iterator whose values describe files and folders within //| ``path``""" //| ... @@ -200,11 +200,11 @@ STATIC const mp_rom_map_elem_t storage_module_globals_table[] = { //| """Like `os.rmdir`""" //| ... //| -//| def stat(self, path: str) -> str: +//| def stat(self, path: str) -> Tuple[int, int, int, int, int, int, int, int, int, int]: //| """Like `os.stat`""" //| ... //| -//| def statvfs(self, path: str) -> Tuple[str, str, str, str, str, str, str, str, str, str]: +//| def statvfs(self, path: int) -> Tuple[int, int, int, int, int, int, int, int, int, int]: //| """Like `os.statvfs`""" //| ... //| diff --git a/shared-bindings/struct/__init__.c b/shared-bindings/struct/__init__.c index d74b962125..b886a662e8 100644 --- a/shared-bindings/struct/__init__.c +++ b/shared-bindings/struct/__init__.c @@ -62,7 +62,7 @@ STATIC mp_obj_t struct_calcsize(mp_obj_t fmt_in) { } MP_DEFINE_CONST_FUN_OBJ_1(struct_calcsize_obj, struct_calcsize); -//| def pack(fmt: str, *values: ReadableBuffer) -> bytes: +//| def pack(fmt: str, *values: Any) -> bytes: //| """Pack the values according to the format string fmt. //| The return value is a bytes object encoding the values.""" //| ... @@ -80,7 +80,7 @@ STATIC mp_obj_t struct_pack(size_t n_args, const mp_obj_t *args) { } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_pack_obj, 1, MP_OBJ_FUN_ARGS_MAX, struct_pack); -//| def pack_into(fmt: str, buffer: WriteableBuffer, offset: int, *values: ReadableBuffer) -> None: +//| def pack_into(fmt: str, buffer: WriteableBuffer, offset: int, *values: Any) -> None: //| """Pack the values according to the format string fmt into a buffer //| starting at offset. offset may be negative to count from the end of buffer.""" //| ... @@ -106,7 +106,7 @@ STATIC mp_obj_t struct_pack_into(size_t n_args, const mp_obj_t *args) { } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_pack_into_obj, 3, MP_OBJ_FUN_ARGS_MAX, struct_pack_into); -//| def unpack(fmt: str, data: ReadableBuffer) -> tuple: +//| def unpack(fmt: str, data: ReadableBuffer) -> Tuple[Any, ...]: //| """Unpack from the data according to the format string fmt. The return value //| is a tuple of the unpacked values. The buffer size must match the size //| required by the format.""" @@ -124,7 +124,7 @@ STATIC mp_obj_t struct_unpack(size_t n_args, const mp_obj_t *args) { } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_obj, 2, 3, struct_unpack); -//| def unpack_from(fmt: str, data: ReadableBuffer, offset: int = 0) -> tuple: +//| def unpack_from(fmt: str, data: ReadableBuffer, offset: int = 0) -> Tuple[Any, ...]: //| """Unpack from the data starting at offset according to the format string fmt. //| offset may be negative to count from the end of buffer. The return value is //| a tuple of the unpacked values. The buffer size must be at least as big diff --git a/shared-bindings/supervisor/__init__.c b/shared-bindings/supervisor/__init__.c index b59394bbcd..bc6fdbff5a 100644 --- a/shared-bindings/supervisor/__init__.c +++ b/shared-bindings/supervisor/__init__.c @@ -45,7 +45,7 @@ //| This object is the sole instance of `supervisor.Runtime`.""" //| -//| def enable_autoreload(self) -> None: +//| def enable_autoreload() -> None: //| """Enable autoreload based on USB file write activity.""" //| ... //| @@ -55,7 +55,7 @@ STATIC mp_obj_t supervisor_enable_autoreload(void) { } MP_DEFINE_CONST_FUN_OBJ_0(supervisor_enable_autoreload_obj, supervisor_enable_autoreload); -//| def disable_autoreload(self) -> None: +//| def disable_autoreload() -> None: //| """Disable autoreload based on USB file write activity until //| `enable_autoreload` is called.""" //| ... @@ -66,7 +66,7 @@ STATIC mp_obj_t supervisor_disable_autoreload(void) { } MP_DEFINE_CONST_FUN_OBJ_0(supervisor_disable_autoreload_obj, supervisor_disable_autoreload); -//| def set_rgb_status_brightness(self, brightness: int) -> None: +//| def set_rgb_status_brightness(brightness: int) -> None: //| """Set brightness of status neopixel from 0-255 //| `set_rgb_status_brightness` is called.""" //| ... @@ -82,7 +82,7 @@ STATIC mp_obj_t supervisor_set_rgb_status_brightness(mp_obj_t lvl){ } MP_DEFINE_CONST_FUN_OBJ_1(supervisor_set_rgb_status_brightness_obj, supervisor_set_rgb_status_brightness); -//| def reload(self) -> None: +//| def reload() -> None: //| """Reload the main Python code and run it (equivalent to hitting Ctrl-D at the REPL).""" //| ... //| @@ -93,7 +93,7 @@ STATIC mp_obj_t supervisor_reload(void) { } MP_DEFINE_CONST_FUN_OBJ_0(supervisor_reload_obj, supervisor_reload); -//| def set_next_stack_limit(self, size: int) -> None: +//| def set_next_stack_limit(size: int) -> None: //| """Set the size of the stack for the next vm run. If its too large, the default will be used.""" //| ... //| diff --git a/shared-bindings/support_matrix.rst b/shared-bindings/support_matrix.rst index 124f3a8104..1b75e02567 100644 --- a/shared-bindings/support_matrix.rst +++ b/shared-bindings/support_matrix.rst @@ -6,11 +6,16 @@ Support Matrix The following table lists the available built-in modules for each CircuitPython capable board. -.. csv-table:: +.. list-table:: :header-rows: 1 :widths: 7, 50 - "Board", "Modules Available" - {% for key, value in support_matrix|dictsort -%} - "{{ key }}", "{{ '`' ~ value|join("`, `") ~ '`' }}" - {% endfor -%} + * - Board + - Modules Available + + {% for key, value in support_matrix|dictsort %} + {{ '.. _' ~ key|replace(" ", "-") ~ ':' }} + * - {{ key }} + - {{ '`' ~ value|join("`, `") ~ '`' }} + + {% endfor %} diff --git a/shared-bindings/terminalio/__init__.c b/shared-bindings/terminalio/__init__.c index 5892111395..9cd1da5b67 100644 --- a/shared-bindings/terminalio/__init__.c +++ b/shared-bindings/terminalio/__init__.c @@ -40,6 +40,9 @@ //| The `terminalio` module contains classes to display a character stream on a display. The built //| in font is available as ``terminalio.FONT``.""" //| +//| FONT: fontio.BuiltinFont +//| """The built in font""" +//| STATIC const mp_rom_map_elem_t terminalio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_terminalio) }, { MP_ROM_QSTR(MP_QSTR_Terminal), MP_OBJ_FROM_PTR(&terminalio_terminal_type) }, diff --git a/shared-bindings/time/__init__.c b/shared-bindings/time/__init__.c index 262da17fd2..0a78b377c5 100644 --- a/shared-bindings/time/__init__.c +++ b/shared-bindings/time/__init__.c @@ -93,7 +93,7 @@ mp_obj_t struct_time_make_new(const mp_obj_type_t *type, size_t n_args, const mp } //| class struct_time: -//| def __init__(self, time_tuple: tuple) -> None: +//| def __init__(self, time_tuple: Tuple[int, int, int, int, int, int, int, int, int]) -> None: //| """Structure used to capture a date and time. Note that it takes a tuple! //| //| :param tuple time_tuple: Tuple of time info: ``(tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec, tm_wday, tm_yday, tm_isdst)`` @@ -280,7 +280,7 @@ STATIC mp_obj_t time_mktime(mp_obj_t t) { mp_obj_tuple_get(t, &len, &elem); if (len != 9) { - mp_raise_TypeError(translate("function takes exactly 9 arguments")); + mp_raise_TypeError_varg(translate("function takes %d positional arguments but %d were given"), 9); } if (mp_obj_get_int(elem[0]) < 2000) { diff --git a/shared-bindings/usb_midi/__init__.c b/shared-bindings/usb_midi/__init__.c index 5570b601ca..e61086f84f 100644 --- a/shared-bindings/usb_midi/__init__.c +++ b/shared-bindings/usb_midi/__init__.c @@ -35,8 +35,14 @@ #include "py/runtime.h" -//| """Classes to transmit and receive MIDI messages over USB""" +//| """MIDI over USB //| +//| The `usb_midi` module contains classes to transmit and receive MIDI messages over USB.""" +//| +//| ports: Tuple[Union[PortIn, PortOut], ...] +//| """Tuple of all MIDI ports. Each item is ether `PortIn` or `PortOut`.""" +//| + mp_map_elem_t usb_midi_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_usb_midi) }, { MP_ROM_QSTR(MP_QSTR_ports), mp_const_empty_tuple }, diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index 957e9dc089..bc8c8d29c7 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -20,7 +20,7 @@ //| class VectorShape: -//| def __init__(self, shape: Polygon, pixel_shader: displayio.Palette, x: int=0, y: int=0) -> None: +//| def __init__(self, shape: Union[Polygon, Rectangle, Circle], pixel_shader: Union[displayio.ColorConverter, displayio.Palette], x: int=0, y: int=0) -> None: //| """Binds a vector shape to a location and pixel color //| //| :param shape: The shape to draw. @@ -145,7 +145,7 @@ const mp_obj_property_t vectorio_vector_shape_y_obj = { }; -//| pixel_shader: displayio.Palette +//| pixel_shader: Union[displayio.ColorConverter, displayio.Palette] //| """The pixel shader of the shape.""" //| STATIC mp_obj_t vectorio_vector_shape_obj_get_pixel_shader(mp_obj_t self_in) { diff --git a/shared-bindings/wiznet/wiznet5k.c b/shared-bindings/wiznet/wiznet5k.c index 4e5744d827..5e9a3a9fbc 100644 --- a/shared-bindings/wiznet/wiznet5k.c +++ b/shared-bindings/wiznet/wiznet5k.c @@ -134,7 +134,7 @@ const mp_obj_property_t wiznet5k_dhcp_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| def ifconfig(self, params: Optional[Tuple] = None) -> Optional[Tuple]: +//| def ifconfig(self, params: Optional[Tuple[str, str, str, str]] = None) -> Optional[Tuple[str, str, str, str]]: //| """Called without parameters, returns a tuple of //| (ip_address, subnet_mask, gateway_address, dns_server) //| diff --git a/shared-module/_pixelbuf/PixelBuf.c b/shared-module/_pixelbuf/PixelBuf.c index 9d671e454b..f3e679631e 100644 --- a/shared-module/_pixelbuf/PixelBuf.c +++ b/shared-module/_pixelbuf/PixelBuf.c @@ -132,6 +132,18 @@ void common_hal__pixelbuf_pixelbuf_set_brightness(mp_obj_t self_in, mp_float_t b } } +uint8_t _pixelbuf_get_as_uint8(mp_obj_t obj) { + if (MP_OBJ_IS_SMALL_INT(obj)) { + return MP_OBJ_SMALL_INT_VALUE(obj); + } else if (MP_OBJ_IS_INT(obj)) { + return mp_obj_get_int_truncated(obj); + } else if (mp_obj_is_float(obj)) { + return (uint8_t)mp_obj_get_float(obj); + } + mp_raise_TypeError_varg( + translate("can't convert %q to %q"), mp_obj_get_type_qstr(obj), MP_QSTR_int); +} + void _pixelbuf_parse_color(pixelbuf_pixelbuf_obj_t* self, mp_obj_t color, uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* w) { pixelbuf_byteorder_details_t *byteorder = &self->byteorder; // w is shared between white in NeoPixels and brightness in dotstars (so that DotStars can have @@ -142,8 +154,8 @@ void _pixelbuf_parse_color(pixelbuf_pixelbuf_obj_t* self, mp_obj_t color, uint8_ *w = 0; } - if (MP_OBJ_IS_INT(color)) { - mp_int_t value = mp_obj_get_int_truncated(color); + if (MP_OBJ_IS_INT(color) || mp_obj_is_float(color)) { + mp_int_t value = MP_OBJ_IS_INT(color) ? mp_obj_get_int_truncated(color) : mp_obj_get_float(color); *r = value >> 16 & 0xff; *g = (value >> 8) & 0xff; *b = value & 0xff; @@ -155,9 +167,9 @@ void _pixelbuf_parse_color(pixelbuf_pixelbuf_obj_t* self, mp_obj_t color, uint8_ mp_raise_ValueError_varg(translate("Expected tuple of length %d, got %d"), byteorder->bpp, len); } - *r = mp_obj_get_int_truncated(items[PIXEL_R]); - *g = mp_obj_get_int_truncated(items[PIXEL_G]); - *b = mp_obj_get_int_truncated(items[PIXEL_B]); + *r = _pixelbuf_get_as_uint8(items[PIXEL_R]); + *g = _pixelbuf_get_as_uint8(items[PIXEL_G]); + *b = _pixelbuf_get_as_uint8(items[PIXEL_B]); if (len > 3) { if (mp_obj_is_float(items[PIXEL_W])) { *w = 255 * mp_obj_get_float(items[PIXEL_W]); @@ -218,17 +230,35 @@ void _pixelbuf_set_pixel(pixelbuf_pixelbuf_obj_t* self, size_t index, mp_obj_t v _pixelbuf_set_pixel_color(self, index, r, g, b, w); } -void common_hal__pixelbuf_pixelbuf_set_pixels(mp_obj_t self_in, size_t start, mp_int_t step, size_t slice_len, mp_obj_t* values) { +void common_hal__pixelbuf_pixelbuf_set_pixels(mp_obj_t self_in, size_t start, mp_int_t step, size_t slice_len, mp_obj_t* values, + mp_obj_tuple_t *flatten_to) +{ pixelbuf_pixelbuf_obj_t* self = native_pixelbuf(self_in); - for (size_t i = 0; i < slice_len; i++) { - _pixelbuf_set_pixel(self, start, values[i]); - start+=step; + mp_obj_iter_buf_t iter_buf; + mp_obj_t iterable = mp_getiter(values, &iter_buf); + mp_obj_t item; + size_t i = 0; + bool flattened = flatten_to != mp_const_none; + if (flattened) flatten_to->len = self->bytes_per_pixel; + while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) { + if (flattened) { + flatten_to->items[i % self->bytes_per_pixel] = item; + if (++i % self->bytes_per_pixel == 0) { + _pixelbuf_set_pixel(self, start, flatten_to); + start+=step; + } + } else { + _pixelbuf_set_pixel(self, start, item); + start+=step; + } } if (self->auto_write) { common_hal__pixelbuf_pixelbuf_show(self_in); } } + + void common_hal__pixelbuf_pixelbuf_set_pixel(mp_obj_t self_in, size_t index, mp_obj_t value) { pixelbuf_pixelbuf_obj_t* self = native_pixelbuf(self_in); _pixelbuf_set_pixel(self, index, value); diff --git a/shared-module/board/__init__.c b/shared-module/board/__init__.c index 2c9139d8af..265c6517fa 100644 --- a/shared-module/board/__init__.c +++ b/shared-module/board/__init__.c @@ -39,6 +39,11 @@ #include "shared-module/displayio/__init__.h" #endif +#if CIRCUITPY_SHARPDISPLAY +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" +#endif + #if BOARD_I2C // Statically allocate the I2C object so it can live past the end of the heap and into the next VM. // That way it can be used by built-in I2CDisplay displays and be accessible through board.I2C(). @@ -148,10 +153,17 @@ void reset_board_busses(void) { bool display_using_spi = false; #if CIRCUITPY_DISPLAYIO for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].fourwire_bus.bus == spi_singleton) { + mp_const_obj_t bus_type = displays[i].bus_base.type; + if (bus_type == &displayio_fourwire_type && displays[i].fourwire_bus.bus == spi_singleton) { display_using_spi = true; break; } + #if CIRCUITPY_SHARPDISPLAY + if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type && displays[i].sharpdisplay.bus == spi_singleton) { + display_using_spi = true; + break; + } + #endif } #endif if (!display_using_spi) { diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index efc28470fb..4a6428ea00 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -19,14 +19,19 @@ #include "supervisor/spi_flash_api.h" #include "py/mpconfig.h" +#if CIRCUITPY_SHARPDISPLAY +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" +#endif + primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT]; #if CIRCUITPY_RGBMATRIX -STATIC bool any_display_uses_this_rgbmatrix(rgbmatrix_rgbmatrix_obj_t* pm) { +STATIC bool any_display_uses_this_framebuffer(mp_obj_base_t *obj) { for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].framebuffer_display.base.type == &framebufferio_framebufferdisplay_type) { + if (displays[i].display_base.type == &framebufferio_framebufferdisplay_type) { framebufferio_framebufferdisplay_obj_t* display = &displays[i].framebuffer_display; - if (display->framebuffer == pm) { + if (display->framebuffer == obj) { return true; } } @@ -102,9 +107,13 @@ void common_hal_displayio_release_displays(void) { common_hal_displayio_i2cdisplay_deinit(&displays[i].i2cdisplay_bus); } else if (bus_type == &displayio_parallelbus_type) { common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus); -#if CIRCUITPY_FRAMEBUFFERIO +#if CIRCUITPY_RGBMATRIX } else if (bus_type == &rgbmatrix_RGBMatrix_type) { common_hal_rgbmatrix_rgbmatrix_deinit(&displays[i].rgbmatrix); +#endif +#if CIRCUITPY_SHARPDISPLAY + } else if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type) { + common_hal_sharpdisplay_framebuffer_deinit(&displays[i].sharpdisplay); #endif } displays[i].fourwire_bus.base.type = &mp_type_NoneType; @@ -170,9 +179,14 @@ void reset_displays(void) { #if CIRCUITPY_RGBMATRIX } else if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix; - if(!any_display_uses_this_rgbmatrix(pm)) { + if(!any_display_uses_this_framebuffer(&pm->base)) { common_hal_rgbmatrix_rgbmatrix_deinit(pm); } +#endif +#if CIRCUITPY_SHARPDISPLAY + } else if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type) { + sharpdisplay_framebuffer_obj_t * sharp = &displays[i].sharpdisplay; + common_hal_sharpdisplay_framebuffer_reset(sharp); #endif } else { // Not an active display bus. @@ -203,6 +217,11 @@ void displayio_gc_collect(void) { rgbmatrix_rgbmatrix_collect_ptrs(&displays[i].rgbmatrix); } #endif +#if CIRCUITPY_SHARPDISPLAY + if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type) { + common_hal_sharpdisplay_framebuffer_collect_ptrs(&displays[i].sharpdisplay); + } +#endif if (displays[i].display.base.type == NULL) { continue; diff --git a/shared-module/displayio/__init__.h b/shared-module/displayio/__init__.h index 9eb10c28b2..44ad5a9a98 100644 --- a/shared-module/displayio/__init__.h +++ b/shared-module/displayio/__init__.h @@ -36,18 +36,28 @@ #include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/I2CDisplay.h" #include "shared-bindings/displayio/ParallelBus.h" +#if CIRCUITPY_RGBMATRIX #include "shared-bindings/rgbmatrix/RGBMatrix.h" +#endif +#if CIRCUITPY_SHARPDISPLAY +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" +#endif typedef struct { union { + mp_obj_base_t bus_base; displayio_fourwire_obj_t fourwire_bus; displayio_i2cdisplay_obj_t i2cdisplay_bus; displayio_parallelbus_obj_t parallel_bus; #if CIRCUITPY_RGBMATRIX rgbmatrix_rgbmatrix_obj_t rgbmatrix; +#endif +#if CIRCUITPY_SHARPDISPLAY + sharpdisplay_framebuffer_obj_t sharpdisplay; #endif }; union { + mp_obj_base_t display_base; displayio_display_obj_t display; displayio_epaperdisplay_obj_t epaper_display; #if CIRCUITPY_FRAMEBUFFERIO diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index 2a90fa0d4a..6b5346877c 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -40,6 +40,11 @@ #include #include +#define fb_getter_default(method, default_value) \ + (self->framebuffer_protocol->method \ + ? self->framebuffer_protocol->method(self->framebuffer) \ + : (default_value)) + void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebufferdisplay_obj_t* self, mp_obj_t framebuffer, uint16_t rotation, @@ -51,7 +56,7 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu uint16_t ram_width = 0x100; uint16_t ram_height = 0x100; - + uint16_t depth = fb_getter_default(get_color_depth, 16); displayio_display_core_construct( &self->core, NULL, @@ -62,16 +67,29 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu 0, 0, rotation, - self->framebuffer_protocol->get_color_depth(self->framebuffer), - false, - false, - self->framebuffer_protocol->get_bytes_per_cell(self->framebuffer), - false, - false); + depth, + fb_getter_default(get_grayscale, (depth < 8)), + fb_getter_default(get_pixels_in_byte_share_row, false), + fb_getter_default(get_bytes_per_cell, 2), + fb_getter_default(get_reverse_pixels_in_byte, false), + fb_getter_default(get_reverse_pixels_in_word, false) + ); + + self->first_pixel_offset = fb_getter_default(get_first_pixel_offset, 0); + self->row_stride = fb_getter_default(get_row_stride, 0); + if (self->row_stride == 0) { + self->row_stride = self->core.width * self->core.colorspace.depth/8; + } + + self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo); + size_t framebuffer_size = self->first_pixel_offset + self->row_stride * self->core.height; + if (self->bufinfo.len < framebuffer_size) { + mp_raise_IndexError_varg(translate("Framebuffer requires %d bytes"), framebuffer_size); + } self->first_manual_refresh = !auto_refresh; - self->native_frames_per_second = self->framebuffer_protocol->get_native_frames_per_second(self->framebuffer); + self->native_frames_per_second = fb_getter_default(get_native_frames_per_second, 60); self->native_ms_per_frame = 1000 / self->native_frames_per_second; supervisor_start_terminal(self->core.width, self->core.height); @@ -109,7 +127,7 @@ bool common_hal_framebufferio_framebufferdisplay_set_auto_brightness(framebuffer } mp_float_t common_hal_framebufferio_framebufferdisplay_get_brightness(framebufferio_framebufferdisplay_obj_t* self) { - if (self->framebuffer_protocol->set_brightness) { + if (self->framebuffer_protocol->get_brightness) { return self->framebuffer_protocol->get_brightness(self->framebuffer); } return -1; @@ -138,7 +156,8 @@ STATIC const displayio_area_t* _get_refresh_areas(framebufferio_framebufferdispl return NULL; } -STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const displayio_area_t* area) { +#define MARK_ROW_DIRTY(r) (dirty_row_bitmask[r/8] |= (1 << (r & 7))) +STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const displayio_area_t* area, uint8_t *dirty_row_bitmask) { uint16_t buffer_size = 128; // In uint32_ts displayio_area_t clipped; @@ -147,6 +166,14 @@ STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const di return true; } uint16_t subrectangles = 1; + + // If pixels are packed by row then rows are on byte boundaries + if (self->core.colorspace.depth < 8 && self->core.colorspace.pixels_in_byte_share_row) { + int div = 8 / self->core.colorspace.depth; + clipped.x1 = (clipped.x1 / div) * div; + clipped.x2 = ((clipped.x2 + div - 1) / div) * div; + } + uint16_t rows_per_buffer = displayio_area_height(&clipped); uint8_t pixels_per_word = (sizeof(uint32_t) * 8) / self->core.colorspace.depth; uint16_t pixels_per_buffer = displayio_area_size(&clipped); @@ -187,6 +214,7 @@ STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const di .x2 = clipped.x2, .y2 = clipped.y1 + rows_per_buffer * (j + 1) }; + if (remaining_rows < rows_per_buffer) { subrectangle.y2 = subrectangle.y1 + remaining_rows; } @@ -197,12 +225,18 @@ STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const di displayio_display_core_fill_area(&self->core, &subrectangle, mask, buffer); - // COULDDO: this arithmetic only supports multiple-of-8 bpp - uint8_t *dest = self->bufinfo.buf + (subrectangle.y1 * self->core.width + subrectangle.x1) * (self->core.colorspace.depth / 8); + uint8_t *buf = (uint8_t *)self->bufinfo.buf, *endbuf = buf + self->bufinfo.len; + (void)endbuf; // Hint to compiler that endbuf is "used" even if NDEBUG + buf += self->first_pixel_offset; + + size_t rowstride = self->row_stride; + uint8_t *dest = buf + subrectangle.y1 * rowstride + subrectangle.x1 * self->core.colorspace.depth / 8; uint8_t *src = (uint8_t*)buffer; - size_t rowsize = (subrectangle.x2 - subrectangle.x1) * (self->core.colorspace.depth / 8); - size_t rowstride = self->core.width * (self->core.colorspace.depth/8); + size_t rowsize = (subrectangle.x2 - subrectangle.x1) * self->core.colorspace.depth / 8; + for (uint16_t i = subrectangle.y1; i < subrectangle.y2; i++) { + assert(dest >= buf && dest < endbuf && dest+rowsize <= endbuf); + MARK_ROW_DIRTY(i); memcpy(dest, src, rowsize); dest += rowstride; src += rowsize; @@ -216,15 +250,23 @@ STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const di } STATIC void _refresh_display(framebufferio_framebufferdisplay_obj_t* self) { - displayio_display_core_start_refresh(&self->core); self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo); + if(!self->bufinfo.buf) { + return; + } + displayio_display_core_start_refresh(&self->core); const displayio_area_t* current_area = _get_refresh_areas(self); - while (current_area != NULL) { - _refresh_area(self, current_area); - current_area = current_area->next; + if (current_area) { + uint8_t dirty_row_bitmask[(self->core.height + 7) / 8]; + memset(dirty_row_bitmask, 0, sizeof(dirty_row_bitmask)); + self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo); + while (current_area != NULL) { + _refresh_area(self, current_area, dirty_row_bitmask); + current_area = current_area->next; + } + self->framebuffer_protocol->swapbuffers(self->framebuffer, dirty_row_bitmask); } displayio_display_core_finish_refresh(&self->core); - self->framebuffer_protocol->swapbuffers(self->framebuffer); } void common_hal_framebufferio_framebufferdisplay_set_rotation(framebufferio_framebufferdisplay_obj_t* self, int rotation){ @@ -307,11 +349,7 @@ void release_framebufferdisplay(framebufferio_framebufferdisplay_obj_t* self) { common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, false); release_display_core(&self->core); self->framebuffer_protocol->deinit(self->framebuffer); -} - -void reset_framebufferdisplay(framebufferio_framebufferdisplay_obj_t* self) { - common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, true); - common_hal_framebufferio_framebufferdisplay_show(self, NULL); + self->base.type = &mp_type_NoneType; } void framebufferio_framebufferdisplay_collect_ptrs(framebufferio_framebufferdisplay_obj_t* self) { @@ -320,6 +358,12 @@ void framebufferio_framebufferdisplay_collect_ptrs(framebufferio_framebufferdisp } void framebufferio_framebufferdisplay_reset(framebufferio_framebufferdisplay_obj_t* self) { - common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, true); - common_hal_framebufferio_framebufferdisplay_show(self, NULL); + mp_obj_type_t *fb_type = mp_obj_get_type(self->framebuffer); + if(fb_type != NULL && fb_type != &mp_type_NoneType) { + common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, true); + common_hal_framebufferio_framebufferdisplay_show(self, NULL); + self->core.full_refresh = true; + } else { + release_framebufferdisplay(self); + } } diff --git a/shared-module/framebufferio/FramebufferDisplay.h b/shared-module/framebufferio/FramebufferDisplay.h index ca1ab984a3..89df0d27c1 100644 --- a/shared-module/framebufferio/FramebufferDisplay.h +++ b/shared-module/framebufferio/FramebufferDisplay.h @@ -48,44 +48,65 @@ typedef struct { uint64_t last_refresh_call; uint16_t native_frames_per_second; uint16_t native_ms_per_frame; + uint16_t first_pixel_offset; + uint16_t row_stride; bool auto_refresh; bool first_manual_refresh; } framebufferio_framebufferdisplay_obj_t; void framebufferio_framebufferdisplay_background(framebufferio_framebufferdisplay_obj_t* self); void release_framebufferdisplay(framebufferio_framebufferdisplay_obj_t* self); -void reset_framebufferdisplay(framebufferio_framebufferdisplay_obj_t* self); void framebufferio_framebufferdisplay_reset(framebufferio_framebufferdisplay_obj_t* self); void framebufferio_framebufferdisplay_collect_ptrs(framebufferio_framebufferdisplay_obj_t* self); mp_obj_t common_hal_framebufferio_framebufferdisplay_get_framebuffer(framebufferio_framebufferdisplay_obj_t* self); -typedef void (*framebuffer_get_bufinfo_fun)(mp_obj_t, mp_buffer_info_t *bufinfo); -typedef void (*framebuffer_swapbuffers_fun)(mp_obj_t); -typedef void (*framebuffer_deinit_fun)(mp_obj_t); -typedef bool (*framebuffer_set_brightness_fun)(mp_obj_t, mp_float_t); -typedef mp_float_t (*framebuffer_get_brightness_fun)(mp_obj_t); -typedef bool (*framebuffer_set_auto_brightness_fun)(mp_obj_t, bool); typedef bool (*framebuffer_get_auto_brightness_fun)(mp_obj_t); -typedef int (*framebuffer_get_width_fun)(mp_obj_t); -typedef int (*framebuffer_get_height_fun)(mp_obj_t); -typedef int (*framebuffer_get_color_depth_fun)(mp_obj_t); +typedef bool (*framebuffer_get_reverse_pixels_in_byte_fun)(mp_obj_t); +typedef bool (*framebuffer_get_reverse_pixels_in_word_fun)(mp_obj_t); +typedef bool (*framebuffer_set_auto_brightness_fun)(mp_obj_t, bool); +typedef bool (*framebuffer_set_brightness_fun)(mp_obj_t, mp_float_t); typedef int (*framebuffer_get_bytes_per_cell_fun)(mp_obj_t); +typedef int (*framebuffer_get_color_depth_fun)(mp_obj_t); +typedef int (*framebuffer_get_first_pixel_offset_fun)(mp_obj_t); +typedef int (*framebuffer_get_grayscale_fun)(mp_obj_t); +typedef int (*framebuffer_get_height_fun)(mp_obj_t); typedef int (*framebuffer_get_native_frames_per_second_fun)(mp_obj_t); +typedef bool (*framebuffer_get_pixels_in_byte_share_row_fun)(mp_obj_t); +typedef int (*framebuffer_get_row_stride_fun)(mp_obj_t); +typedef int (*framebuffer_get_width_fun)(mp_obj_t); +typedef mp_float_t (*framebuffer_get_brightness_fun)(mp_obj_t); +typedef void (*framebuffer_deinit_fun)(mp_obj_t); +typedef void (*framebuffer_get_bufinfo_fun)(mp_obj_t, mp_buffer_info_t *bufinfo); +typedef void (*framebuffer_swapbuffers_fun)(mp_obj_t, uint8_t *dirty_row_bitmask); typedef struct _framebuffer_p_t { MP_PROTOCOL_HEAD // MP_QSTR_protocol_framebuffer + + // Mandatory framebuffer_get_bufinfo_fun get_bufinfo; framebuffer_swapbuffers_fun swapbuffers; framebuffer_deinit_fun deinit; framebuffer_get_width_fun get_width; framebuffer_get_height_fun get_height; - framebuffer_get_color_depth_fun get_color_depth; - framebuffer_get_bytes_per_cell_fun get_bytes_per_cell; - framebuffer_get_native_frames_per_second_fun get_native_frames_per_second; + + // Optional getters + framebuffer_get_bytes_per_cell_fun get_bytes_per_cell; // default: 2 + framebuffer_get_color_depth_fun get_color_depth; // default: 16 + framebuffer_get_first_pixel_offset_fun get_first_pixel_offset; // default: 0 + framebuffer_get_grayscale_fun get_grayscale; // default: grayscale if depth < 8 + framebuffer_get_native_frames_per_second_fun get_native_frames_per_second; // default: 60 + framebuffer_get_pixels_in_byte_share_row_fun get_pixels_in_byte_share_row; // default: false + framebuffer_get_reverse_pixels_in_byte_fun get_reverse_pixels_in_byte; // default: false + framebuffer_get_reverse_pixels_in_word_fun get_reverse_pixels_in_word; // default: false + framebuffer_get_row_stride_fun get_row_stride; // default: 0 (no extra row padding) + + // Optional -- default is no brightness control framebuffer_get_brightness_fun get_brightness; framebuffer_set_brightness_fun set_brightness; + + // Optional -- default is no automatic brightness control framebuffer_get_auto_brightness_fun get_auto_brightness; framebuffer_set_auto_brightness_fun set_auto_brightness; } framebuffer_p_t; diff --git a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c new file mode 100644 index 0000000000..71e00d7f01 --- /dev/null +++ b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c @@ -0,0 +1,277 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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 + +#include "py/gc.h" + +#include "shared-bindings/board/__init__.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" + +#include "supervisor/memory.h" + +#define SHARPMEM_BIT_WRITECMD_LSB (0x80) +#define SHARPMEM_BIT_VCOM_LSB (0x40) + +static inline void *hybrid_alloc(size_t sz) { + if (gc_alloc_possible()) { + return m_malloc(sz + sizeof(void*), true); + } else { + supervisor_allocation *allocation = allocate_memory(align32_size(sz), false); + if (!allocation) { + return NULL; + } + memset(allocation->ptr, 0, sz); + return allocation->ptr; + } +} + +static inline void hybrid_free(void *ptr_in) { + supervisor_allocation *allocation = allocation_from_ptr(ptr_in); + + if (allocation) { + free_memory(allocation); + } +} + +STATIC uint8_t bitrev(uint8_t n) { + uint8_t r = 0; + for(int i=0;i<8;i++) r |= ((n>>i) & 1)<<(7-i); + return r; +} + +int common_hal_sharpdisplay_framebuffer_get_width(sharpdisplay_framebuffer_obj_t *self) { + return self->width; +} + +int common_hal_sharpdisplay_framebuffer_get_height(sharpdisplay_framebuffer_obj_t *self) { + return self->height; +} + +int common_hal_sharpdisplay_framebuffer_get_row_stride(sharpdisplay_framebuffer_obj_t *self) { + return (self->width + 7) / 8 + 2; +} + +int common_hal_sharpdisplay_framebuffer_get_first_pixel_offset(sharpdisplay_framebuffer_obj_t *self) { + return 2; +} + +bool common_hal_sharpdisplay_framebuffer_get_reverse_pixels_in_byte(sharpdisplay_framebuffer_obj_t *self) { + return true; +} + +bool common_hal_sharpdisplay_framebuffer_get_pixels_in_byte_share_row(sharpdisplay_framebuffer_obj_t *self) { + return true; +} + +void common_hal_sharpdisplay_framebuffer_reset(sharpdisplay_framebuffer_obj_t *self) { + if (!allocation_from_ptr(self->bufinfo.buf)) { + self->bufinfo.buf = NULL; + } + + if (self->bus != &self->inline_bus +#if BOARD_SPI + && self->bus != common_hal_board_get_spi() +#endif + ) { + memcpy(&self->inline_bus, self->bus, sizeof(busio_spi_obj_t)); + self->bus = &self->inline_bus; + } +} + +void common_hal_sharpdisplay_framebuffer_reconstruct(sharpdisplay_framebuffer_obj_t *self) { + +} + +void common_hal_sharpdisplay_framebuffer_get_bufinfo(sharpdisplay_framebuffer_obj_t *self, mp_buffer_info_t *bufinfo) { + if (!self->bufinfo.buf) { + int row_stride = common_hal_sharpdisplay_framebuffer_get_row_stride(self); + int height = common_hal_sharpdisplay_framebuffer_get_height(self); + self->bufinfo.len = row_stride * height + 2; + self->bufinfo.buf = hybrid_alloc(self->bufinfo.len); + + uint8_t *data = self->bufinfo.buf; + *data++ = SHARPMEM_BIT_WRITECMD_LSB; + + for(int y=0; yfull_refresh = true; + } + *bufinfo = self->bufinfo; +} + +void common_hal_sharpdisplay_framebuffer_deinit(sharpdisplay_framebuffer_obj_t *self) { + if (self->base.type != &sharpdisplay_framebuffer_type) { + return; + } + + if (self->bus == &self->inline_bus) { + common_hal_busio_spi_deinit(self->bus); + } + + common_hal_reset_pin(self->chip_select.pin); + + hybrid_free(self->bufinfo.buf); + + memset(self, 0, sizeof(*self)); +} + +void common_hal_sharpdisplay_framebuffer_construct(sharpdisplay_framebuffer_obj_t *self, busio_spi_obj_t *spi, mcu_pin_obj_t *chip_select, int baudrate, int width, int height) { + common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select); + common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL); + common_hal_never_reset_pin(chip_select); + + self->bus = spi; + common_hal_busio_spi_never_reset(self->bus); + + self->width = width; + self->height = height; + self->baudrate = baudrate; + + int row_stride = common_hal_sharpdisplay_framebuffer_get_row_stride(self); + self->bufinfo.len = row_stride * height + 2; + self->bufinfo.buf = gc_alloc(self->bufinfo.len, false, true); + + uint8_t *data = self->bufinfo.buf; + *data++ = SHARPMEM_BIT_WRITECMD_LSB; + + for(int y=0; yheight; y++) { + *data = bitrev(y+1); + data += row_stride; + } + self->full_refresh = true; +} + +void common_hal_sharpdisplay_framebuffer_swapbuffers(sharpdisplay_framebuffer_obj_t *self, uint8_t *dirty_row_bitmask) { + // claim SPI bus + if (!common_hal_busio_spi_try_lock(self->bus)) { + return; + } + common_hal_busio_spi_configure(self->bus, self->baudrate, 0, 0, 8); + + // set chip select high + common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); + + // output the toggling signal + uint8_t *data = self->bufinfo.buf; + data[0] ^= SHARPMEM_BIT_VCOM_LSB; + + common_hal_busio_spi_write(self->bus, data++, 1); + + // output each changed row + size_t row_stride = common_hal_sharpdisplay_framebuffer_get_row_stride(self); + for(int y=0; yheight; y++) { + if(self->full_refresh || (dirty_row_bitmask[y/8] & (1 << (y & 7)))) { + common_hal_busio_spi_write(self->bus, data, row_stride); + } + data += row_stride; + } + + // output a trailing zero + common_hal_busio_spi_write(self->bus, data, 1); + + // set chip select low + common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); + + // release SPI bus + common_hal_busio_spi_unlock(self->bus); + + self->full_refresh = false; +} + +STATIC void sharpdisplay_framebuffer_deinit(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + common_hal_sharpdisplay_framebuffer_deinit(self); +} + +STATIC void sharpdisplay_framebuffer_get_bufinfo(mp_obj_t self_in, mp_buffer_info_t *bufinfo) { + sharpdisplay_framebuffer_obj_t *self = self_in; + common_hal_sharpdisplay_framebuffer_get_bufinfo(self, bufinfo); +} + +STATIC int sharpdisplay_framebuffer_get_color_depth(mp_obj_t self_in) { + return 1; +} + +STATIC int sharpdisplay_framebuffer_get_height(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_height(self); +} + +STATIC int sharpdisplay_framebuffer_get_width(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_width(self); +} + +STATIC int sharpdisplay_framebuffer_get_first_pixel_offset(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_first_pixel_offset(self); +} + +STATIC bool sharpdisplay_framebuffer_get_pixels_in_byte_share_row(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_pixels_in_byte_share_row(self); +} + +STATIC bool sharpdisplay_framebuffer_get_reverse_pixels_in_byte(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_reverse_pixels_in_byte(self); +} + +STATIC int sharpdisplay_framebuffer_get_row_stride(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_row_stride(self); +} + +STATIC void sharpdisplay_framebuffer_swapbuffers(mp_obj_t self_in, uint8_t *dirty_row_bitmask) { + sharpdisplay_framebuffer_obj_t *self = self_in; + common_hal_sharpdisplay_framebuffer_swapbuffers(self, dirty_row_bitmask); +} + +const framebuffer_p_t sharpdisplay_framebuffer_proto = { + MP_PROTO_IMPLEMENT(MP_QSTR_protocol_framebuffer) + .deinit = sharpdisplay_framebuffer_deinit, + .get_bufinfo = sharpdisplay_framebuffer_get_bufinfo, + .get_color_depth = sharpdisplay_framebuffer_get_color_depth, + .get_height = sharpdisplay_framebuffer_get_height, + .get_width = sharpdisplay_framebuffer_get_width, + .swapbuffers = sharpdisplay_framebuffer_swapbuffers, + + .get_first_pixel_offset = sharpdisplay_framebuffer_get_first_pixel_offset, + .get_pixels_in_byte_share_row = sharpdisplay_framebuffer_get_pixels_in_byte_share_row, + .get_reverse_pixels_in_byte = sharpdisplay_framebuffer_get_reverse_pixels_in_byte, + .get_row_stride = sharpdisplay_framebuffer_get_row_stride, +}; + +void common_hal_sharpdisplay_framebuffer_collect_ptrs(sharpdisplay_framebuffer_obj_t *self) { + gc_collect_ptr(self->framebuffer); + gc_collect_ptr(self->bus); + gc_collect_ptr(self->bufinfo.buf); +} diff --git a/shared-module/sharpdisplay/SharpMemoryFramebuffer.h b/shared-module/sharpdisplay/SharpMemoryFramebuffer.h new file mode 100644 index 0000000000..8acacc94e1 --- /dev/null +++ b/shared-module/sharpdisplay/SharpMemoryFramebuffer.h @@ -0,0 +1,60 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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 + +#include "py/obj.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/digitalio/DigitalInOut.h" +#include "shared-module/framebufferio/FramebufferDisplay.h" + +typedef struct { + mp_obj_base_t base; + mp_obj_t framebuffer; + busio_spi_obj_t* bus; + busio_spi_obj_t inline_bus; + digitalio_digitalinout_obj_t chip_select; + mp_buffer_info_t bufinfo; + + uint16_t width, height; + uint32_t baudrate; + + bool full_refresh:1; +} sharpdisplay_framebuffer_obj_t; + +void common_hal_sharpdisplay_framebuffer_construct(sharpdisplay_framebuffer_obj_t *self, busio_spi_obj_t *spi, mcu_pin_obj_t *chip_select, int baudrate, int width, int height); +void common_hal_sharpdisplay_framebuffer_swap_buffers(sharpdisplay_framebuffer_obj_t *self, uint8_t *dirty_row_bitmask); +void common_hal_sharpdisplay_framebuffer_deinit(sharpdisplay_framebuffer_obj_t *self); +void common_hal_sharpdisplay_framebuffer_get_bufinfo(sharpdisplay_framebuffer_obj_t *self, mp_buffer_info_t *bufinfo); +int common_hal_sharpdisplay_framebuffer_get_height(sharpdisplay_framebuffer_obj_t *self); +int common_hal_sharpdisplay_framebuffer_get_width(sharpdisplay_framebuffer_obj_t *self); +void common_hal_sharpdisplay_framebuffer_swap_buffers(sharpdisplay_framebuffer_obj_t *self, uint8_t *dirty_row_bitmask); +void common_hal_sharpdisplay_framebuffer_reset(sharpdisplay_framebuffer_obj_t *self); +void common_hal_sharpdisplay_framebuffer_reconstruct(sharpdisplay_framebuffer_obj_t *self); + +extern const framebuffer_p_t sharpdisplay_framebuffer_proto; + +void common_hal_sharpdisplay_framebuffer_collect_ptrs(sharpdisplay_framebuffer_obj_t*); diff --git a/shared-module/sharpdisplay/__init__.c b/shared-module/sharpdisplay/__init__.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/shared-module/sharpdisplay/__init__.h b/shared-module/sharpdisplay/__init__.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index 9c074209b8..634720d0ab 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -29,6 +29,7 @@ #include #include "py/mpstate.h" +#include "shared-bindings/displayio/Bitmap.h" #include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/Palette.h" #include "shared-bindings/displayio/TileGrid.h" @@ -38,19 +39,31 @@ #include "shared-module/displayio/__init__.h" #endif +#if CIRCUITPY_SHARPDISPLAY +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" +#endif + extern size_t blinka_bitmap_data[]; extern displayio_bitmap_t blinka_bitmap; extern displayio_group_t circuitpython_splash; +#if CIRCUITPY_TERMINALIO static supervisor_allocation* tilegrid_tiles = NULL; +#endif void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) { + // Default the scale to 2 because we may show blinka without the terminal for + // languages that don't have font support. + uint8_t scale = 2; + + #if CIRCUITPY_TERMINALIO displayio_tilegrid_t* grid = &supervisor_terminal_text_grid; uint16_t width_in_tiles = (width_px - blinka_bitmap.width) / grid->tile_width; // determine scale based on h - uint8_t scale = 1; - if (width_in_tiles > 80) { - scale = 2; + if (width_in_tiles < 80) { + scale = 1; } width_in_tiles = (width_px - blinka_bitmap.width * scale) / (grid->tile_width * scale); uint16_t height_in_tiles = height_px / (grid->tile_height * scale); @@ -58,7 +71,6 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) { if (remaining_pixels > 0) { height_in_tiles += 1; } - circuitpython_splash.scale = scale; uint16_t total_tiles = width_in_tiles * height_in_tiles; @@ -88,42 +100,56 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) { grid->full_change = true; common_hal_terminalio_terminal_construct(&supervisor_terminal, grid, &supervisor_terminal_font); + #endif + + circuitpython_splash.scale = scale; } void supervisor_stop_terminal(void) { + #if CIRCUITPY_TERMINALIO if (tilegrid_tiles != NULL) { free_memory(tilegrid_tiles); tilegrid_tiles = NULL; supervisor_terminal_text_grid.inline_tiles = false; supervisor_terminal_text_grid.tiles = NULL; } + #endif } void supervisor_display_move_memory(void) { - #if CIRCUITPY_DISPLAYIO + #if CIRCUITPY_TERMINALIO displayio_tilegrid_t* grid = &supervisor_terminal_text_grid; - if (MP_STATE_VM(terminal_tilegrid_tiles) == NULL || grid->tiles != MP_STATE_VM(terminal_tilegrid_tiles)) { - return; - } - uint16_t total_tiles = grid->width_in_tiles * grid->height_in_tiles; + if (MP_STATE_VM(terminal_tilegrid_tiles) != NULL && + grid->tiles == MP_STATE_VM(terminal_tilegrid_tiles)) { + uint16_t total_tiles = grid->width_in_tiles * grid->height_in_tiles; - tilegrid_tiles = allocate_memory(align32_size(total_tiles), false); - if (tilegrid_tiles != NULL) { - memcpy(tilegrid_tiles->ptr, grid->tiles, total_tiles); - grid->tiles = (uint8_t*) tilegrid_tiles->ptr; - } else { - grid->tiles = NULL; - grid->inline_tiles = false; - } - MP_STATE_VM(terminal_tilegrid_tiles) = NULL; - #if CIRCUITPY_RGBMATRIX - for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { - rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix; - common_hal_rgbmatrix_rgbmatrix_reconstruct(pm, NULL); + tilegrid_tiles = allocate_memory(align32_size(total_tiles), false); + if (tilegrid_tiles != NULL) { + memcpy(tilegrid_tiles->ptr, grid->tiles, total_tiles); + grid->tiles = (uint8_t*) tilegrid_tiles->ptr; + } else { + grid->tiles = NULL; + grid->inline_tiles = false; } + MP_STATE_VM(terminal_tilegrid_tiles) = NULL; } #endif + + #if CIRCUITPY_DISPLAYIO + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + #if CIRCUITPY_RGBMATRIX + if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { + rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix; + common_hal_rgbmatrix_rgbmatrix_reconstruct(pm, NULL); + } + #endif + #if CIRCUITPY_SHARPDISPLAY + if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type) { + sharpdisplay_framebuffer_obj_t * sharp = &displays[i].sharpdisplay; + common_hal_sharpdisplay_framebuffer_reconstruct(sharp); + } + #endif + } #endif } @@ -242,18 +268,26 @@ displayio_tilegrid_t blinka_sprite = { .in_group = true }; +#if CIRCUITPY_TERMINALIO +#define CHILD_COUNT 2 displayio_group_child_t splash_children[2] = { {&blinka_sprite, &blinka_sprite}, {&supervisor_terminal_text_grid, &supervisor_terminal_text_grid} }; +#else +#define CHILD_COUNT 1 +displayio_group_child_t splash_children[1] = { + {&blinka_sprite, &blinka_sprite}, +}; +#endif displayio_group_t circuitpython_splash = { .base = {.type = &displayio_group_type }, .x = 0, .y = 0, .scale = 2, - .size = 2, - .max_size = 2, + .size = CHILD_COUNT, + .max_size = CHILD_COUNT, .children = splash_children, .item_removed = false, .in_group = false, diff --git a/supervisor/shared/display.h b/supervisor/shared/display.h index 2a2ccf46df..4110cfe8e4 100644 --- a/supervisor/shared/display.h +++ b/supervisor/shared/display.h @@ -27,6 +27,10 @@ #ifndef MICROPY_INCLUDED_SUPERVISOR_SHARED_DISPLAY_H #define MICROPY_INCLUDED_SUPERVISOR_SHARED_DISPLAY_H +#include + +#if CIRCUITPY_TERMINALIO + #include "shared-bindings/displayio/Bitmap.h" #include "shared-bindings/displayio/TileGrid.h" #include "shared-bindings/fontio/BuiltinFont.h" @@ -42,6 +46,8 @@ extern displayio_bitmap_t supervisor_terminal_font_bitmap; extern displayio_tilegrid_t supervisor_terminal_text_grid; extern terminalio_terminal_obj_t supervisor_terminal; +#endif + void supervisor_start_terminal(uint16_t width_px, uint16_t height_px); void supervisor_stop_terminal(void); diff --git a/supervisor/shared/rgb_led_status.c b/supervisor/shared/rgb_led_status.c index f3c2106471..2f23e31258 100644 --- a/supervisor/shared/rgb_led_status.c +++ b/supervisor/shared/rgb_led_status.c @@ -28,6 +28,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "rgb_led_status.h" #include "supervisor/shared/tick.h" +#include "py/obj.h" #ifdef MICROPY_HW_NEOPIXEL uint8_t rgb_status_brightness = 63; @@ -365,6 +366,11 @@ void prep_rgb_status_animation(const pyexec_result_t* result, status->safe_mode = safe_mode; status->found_main = found_main; status->total_exception_cycle = 0; + status->ok = result->return_code != PYEXEC_EXCEPTION; + if (status->ok) { + // If this isn't an exception, skip exception sorting and handling + return; + } status->ones = result->exception_line % 10; status->ones += status->ones > 0 ? 1 : 0; status->tens = (result->exception_line / 10) % 10; @@ -382,11 +388,12 @@ void prep_rgb_status_animation(const pyexec_result_t* result, } line /= 10; } - status->ok = result->return_code != PYEXEC_EXCEPTION; if (!status->ok) { status->total_exception_cycle = EXCEPTION_TYPE_LENGTH_MS * 3 + LINE_NUMBER_TOGGLE_LENGTH * status->digit_sum + LINE_NUMBER_TOGGLE_LENGTH * num_places; } - if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_IndentationError)) { + if (!result->exception_type) { + status->exception_color = OTHER_ERROR; + } else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_IndentationError)) { status->exception_color = INDENTATION_ERROR; } else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_SyntaxError)) { status->exception_color = SYNTAX_ERROR; diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index a167ab392c..3275cc66f3 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -151,9 +151,13 @@ void print_safe_mode_message(safe_mode_t reason) { case GC_ALLOC_OUTSIDE_VM: serial_write_compressed(translate("Attempted heap allocation when MicroPython VM not running.")); break; +#ifdef SOFTDEVICE_PRESENT + // defined in ports/nrf/bluetooth/bluetooth_common.mk + // will print "Unknown reason" if somehow encountered on other ports case NORDIC_SOFT_DEVICE_ASSERT: serial_write_compressed(translate("Nordic Soft Device failure assertion.")); break; +#endif case FLASH_WRITE_FAIL: serial_write_compressed(translate("Failed to write internal flash.")); break; diff --git a/supervisor/shared/serial.c b/supervisor/shared/serial.c index 8eb78a90e5..303f89e752 100644 --- a/supervisor/shared/serial.c +++ b/supervisor/shared/serial.c @@ -99,7 +99,7 @@ void serial_write_substring(const char* text, uint32_t length) { if (length == 0) { return; } -#if CIRCUITPY_DISPLAYIO +#if CIRCUITPY_TERMINALIO int errcode; common_hal_terminalio_terminal_write(&supervisor_terminal, (const uint8_t*) text, length, &errcode); #endif diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index a066fc0fd4..25b240036d 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -110,7 +110,9 @@ ifeq ($(CIRCUITPY_DISPLAYIO), 1) SRC_SUPERVISOR += \ supervisor/shared/display.c - SUPERVISOR_O += $(BUILD)/autogen_display_resources.o + ifeq ($(CIRCUITPY_TERMINALIO), 1) + SUPERVISOR_O += $(BUILD)/autogen_display_resources.o + endif endif ifndef USB_INTERFACE_NAME USB_INTERFACE_NAME = "CircuitPython" diff --git a/tools/extract_pyi.py b/tools/extract_pyi.py index d29c3444f4..651216e11a 100644 --- a/tools/extract_pyi.py +++ b/tools/extract_pyi.py @@ -17,79 +17,102 @@ import black IMPORTS_IGNORE = frozenset({'int', 'float', 'bool', 'str', 'bytes', 'tuple', 'list', 'set', 'dict', 'bytearray', 'slice', 'file', 'buffer', 'range', 'array', 'struct_time'}) -IMPORTS_TYPING = frozenset({'Any', 'Optional', 'Union', 'Tuple', 'List', 'Sequence', 'Iterable', 'Iterator', 'overload'}) -IMPORTS_TYPESHED = frozenset({'ReadableBuffer', 'WriteableBuffer'}) +IMPORTS_TYPING = frozenset({'Any', 'Optional', 'Union', 'Tuple', 'List', 'Sequence', 'NamedTuple', 'Iterable', 'Iterator', 'Callable', 'AnyStr', 'overload'}) +CPY_TYPING = frozenset({'ReadableBuffer', 'WriteableBuffer', 'AudioSample', 'FrameBuffer'}) -def is_any(node): - node_type = type(node) +def is_typed(node, allow_any=False): if node is None: + return False + if allow_any: return True - if node_type == ast.Name and node.id == "Any": - return True - if (node_type == ast.Attribute and type(node.value) == ast.Name - and node.value.id == "typing" and node.attr == "Any"): - return True - return False + elif isinstance(node, ast.Name) and node.id == "Any": + return False + elif isinstance(node, ast.Attribute) and type(node.value) == ast.Name \ + and node.value.id == "typing" and node.attr == "Any": + return False + return True -def report_missing_annotations(tree): +def find_stub_issues(tree): for node in ast.walk(tree): - node_type = type(node) - if node_type == ast.AnnAssign: - if is_any(node.annotation): - print(f"Missing attribute type on line {node.lineno}") - elif node_type == ast.arg: - if is_any(node.annotation) and node.arg != "self": - print(f"Missing argument type: {node.arg} on line {node.lineno}") - elif node_type == ast.FunctionDef: - if is_any(node.returns) and node.name != "__init__": - print(f"Missing return type: {node.name} on line {node.lineno}") + if isinstance(node, ast.AnnAssign): + if not is_typed(node.annotation): + yield ("WARN", f"Missing attribute type on line {node.lineno}") + if isinstance(node.value, ast.Constant) and node.value.value == Ellipsis: + yield ("WARN", f"Unnecessary Ellipsis assignment (= ...) on line {node.lineno}.") + elif isinstance(node, ast.Assign): + if isinstance(node.value, ast.Constant) and node.value.value == Ellipsis: + yield ("WARN", f"Unnecessary Ellipsis assignment (= ...) on line {node.lineno}.") + elif isinstance(node, ast.arguments): + allargs = list(node.args + node.kwonlyargs) + if sys.version_info >= (3, 8): + allargs.extend(node.posonlyargs) + for arg_node in allargs: + if not is_typed(arg_node.annotation) and (arg_node.arg != "self" and arg_node.arg != "cls"): + yield ("WARN", f"Missing argument type: {arg_node.arg} on line {arg_node.lineno}") + if node.vararg and not is_typed(node.vararg.annotation, allow_any=True): + yield ("WARN", f"Missing argument type: *{node.vararg.arg} on line {node.vararg.lineno}") + if node.kwarg and not is_typed(node.kwarg.annotation, allow_any=True): + yield ("WARN", f"Missing argument type: **{node.kwarg.arg} on line {node.kwarg.lineno}") + elif isinstance(node, ast.FunctionDef): + if not is_typed(node.returns): + yield ("WARN", f"Missing return type: {node.name} on line {node.lineno}") def extract_imports(tree): modules = set() typing = set() - typeshed = set() + cpy_typing = set() def collect_annotations(anno_tree): if anno_tree is None: return for node in ast.walk(anno_tree): - node_type = type(node) - if node_type == ast.Name: + if isinstance(node, ast.Name): if node.id in IMPORTS_IGNORE: continue elif node.id in IMPORTS_TYPING: typing.add(node.id) - elif node.id in IMPORTS_TYPESHED: - typeshed.add(node.id) - if node_type == ast.Attribute: - if type(node.value) == ast.Name: + elif node.id in CPY_TYPING: + cpy_typing.add(node.id) + elif isinstance(node, ast.Attribute): + if isinstance(node.value, ast.Name): modules.add(node.value.id) for node in ast.walk(tree): - node_type = type(node) - if (node_type == ast.AnnAssign) or (node_type == ast.arg): + if isinstance(node, (ast.AnnAssign, ast.arg)): collect_annotations(node.annotation) - elif node_type == ast.FunctionDef: + elif isinstance(node, ast.Assign): + collect_annotations(node.value) + elif isinstance(node, ast.FunctionDef): collect_annotations(node.returns) for deco in node.decorator_list: - if deco.id in IMPORTS_TYPING: + if isinstance(deco, ast.Name) and (deco.id in IMPORTS_TYPING): typing.add(deco.id) return { "modules": sorted(modules), "typing": sorted(typing), - "typeshed": sorted(typeshed), + "cpy_typing": sorted(cpy_typing), } +def find_references(tree): + for node in ast.walk(tree): + if isinstance(node, ast.arguments): + for node in ast.walk(node): + if isinstance(node, ast.Attribute): + if isinstance(node.value, ast.Name) and node.value.id[0].isupper(): + yield node.value.id + + def convert_folder(top_level, stub_directory): ok = 0 total = 0 filenames = sorted(os.listdir(top_level)) - pyi_lines = [] + stub_fragments = [] + references = set() for filename in filenames: full_path = os.path.join(top_level, filename) @@ -99,50 +122,69 @@ def convert_folder(top_level, stub_directory): ok += mok total += mtotal elif filename.endswith(".c"): - with open(full_path, "r") as f: + with open(full_path, "r", encoding="utf-8") as f: for line in f: + line = line.rstrip() if line.startswith("//|"): - if line[3] == " ": + if len(line) == 3: + line = "" + elif line[3] == " ": line = line[4:] - elif line[3] == "\n": - line = line[3:] else: - continue + line = line[3:] + print("[WARN] There must be at least one space after '//|'") file_lines.append(line) elif filename.endswith(".pyi"): with open(full_path, "r") as f: - file_lines.extend(f.readlines()) + file_lines.extend(line.rstrip() for line in f) - # Always put the contents from an __init__ first. - if filename.startswith("__init__."): - pyi_lines = file_lines + pyi_lines - else: - pyi_lines.extend(file_lines) + fragment = "\n".join(file_lines).strip() + try: + tree = ast.parse(fragment) + except SyntaxError as e: + print(f"[ERROR] Failed to parse a Python stub from {full_path}") + traceback.print_exception(type(e), e, e.__traceback__) + return (ok, total + 1) + references.update(find_references(tree)) - if not pyi_lines: + if fragment: + name = os.path.splitext(os.path.basename(filename))[0] + if name == "__init__" or (name in references): + stub_fragments.insert(0, fragment) + else: + stub_fragments.append(fragment) + + if not stub_fragments: return (ok, total) stub_filename = os.path.join(stub_directory, "__init__.pyi") print(stub_filename) - stub_contents = "".join(pyi_lines) + stub_contents = "\n\n".join(stub_fragments) - # Validate that the module is a parseable stub. - total += 1 + # Validate the stub code. try: tree = ast.parse(stub_contents) - imports = extract_imports(tree) - report_missing_annotations(tree) - ok += 1 except SyntaxError as e: traceback.print_exception(type(e), e, e.__traceback__) return (ok, total) + error = False + for (level, msg) in find_stub_issues(tree): + if level == "ERROR": + error = True + print(f"[{level}] {msg}") + + total += 1 + if not error: + ok += 1 + # Add import statements + imports = extract_imports(tree) import_lines = ["from __future__ import annotations"] if imports["typing"]: import_lines.append("from typing import " + ", ".join(imports["typing"])) - if imports["typeshed"]: - import_lines.append("from _typeshed import " + ", ".join(imports["typeshed"])) + if imports["cpy_typing"]: + import_lines.append("from _typing import " + ", ".join(imports["cpy_typing"])) import_lines.extend(f"import {m}" for m in imports["modules"]) import_body = "\n".join(import_lines) m = re.match(r'(\s*""".*?""")', stub_contents, flags=re.DOTALL) @@ -159,7 +201,6 @@ def convert_folder(top_level, stub_directory): with open(stub_filename, "w") as f: f.write(stub_contents) - print() return (ok, total) diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py index 478a2f22f9..e4197aabf4 100644 --- a/tools/gen_display_resources.py +++ b/tools/gen_display_resources.py @@ -61,7 +61,6 @@ f.load_glyphs(set(ord(c) for c in all_characters)) # Get each glyph. for c in set(all_characters): if ord(c) not in f._glyphs: - print("Font missing character:", c, ord(c)) filtered_characters = filtered_characters.replace(c, "") continue g = f.get_glyph(ord(c))