diff --git a/conf.py b/conf.py index e14c6ace83..645961c457 100644 --- a/conf.py +++ b/conf.py @@ -30,6 +30,7 @@ from collections import defaultdict from sphinx.transforms import SphinxTransform from docutils import nodes from sphinx import addnodes +from sphinx.ext import intersphinx tools_describe = str(pathlib.Path(__file__).parent / "tools/describe") @@ -441,7 +442,8 @@ texinfo_documents = [ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {"cpython": ('https://docs.python.org/3/', None), - "register": ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None)} + "register": ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None), + "typing": ('https://circuitpython.readthedocs.io/projects/adafruit-circuitpython-typing/en/latest/', None)} # Adapted from sphinxcontrib-redirects from sphinx.builders import html as builders @@ -483,6 +485,26 @@ def generate_redirects(app): with open(redirected_filename, 'w') as f: f.write(TEMPLATE % urllib.parse.quote(to_path, '#/')) +def adafruit_typing_workaround(app, env, node, contnode): + # Sphinx marks a requesting node that uses circuitpython-typing + # as looking for a "class" definition, but unfortunately + # Sphinx doesn't recognize TypeAlias based types usefully from + # the typing library. + # (see: https://github.com/sphinx-doc/sphinx/issues/8934) + # Instead, it categorizes these types as "data". + # (see: python -m sphinx.ext.intersphinx \ + # https://docs.circuitpython.org/projects/adafruit-circuitpython-typing/en/latest/objects.inv) + # This workaround traps missing references, checks if + # they are likely to be in the circuitpython_typing package, + # and changes the requesting type from "class" to "data" if + # needed, and re-tries the reference resolver. + ref = node.get("reftarget", None) + if ref and ref.startswith("circuitpython_typing."): + dtype = node.get("reftype", None) + if dtype != "data": + node.attributes.update({"reftype": "data"}) + return intersphinx.missing_reference(app, env, node, contnode) + class CoreModuleTransform(SphinxTransform): default_priority = 870 @@ -519,4 +541,5 @@ def setup(app): app.add_js_file("filter.js") app.add_config_value('redirects_file', 'redirects', 'env') app.connect('builder-inited', generate_redirects) + app.connect('missing-reference', adafruit_typing_workaround) app.add_transform(CoreModuleTransform) diff --git a/docs/redirects.txt b/docs/redirects.txt index b8282635ab..47ec20d577 100644 --- a/docs/redirects.txt +++ b/docs/redirects.txt @@ -1,3 +1,4 @@ +index.rst README.html shared-bindings//__init__.rst shared-bindings// shared-bindings/_bleio/Adapter.rst shared-bindings/_bleio/#_bleio.Adapter shared-bindings/_bleio/Address.rst shared-bindings/_bleio/#_bleio.Address diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index f7efb47385..92def05fbf 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -148,50 +148,21 @@ def get_board_mapping(): return boards -def read_mpconfig(): - """Open 'circuitpy_mpconfig.mk' and return the contents.""" - configs = [] - cpy_mpcfg = get_circuitpython_root_dir() / "py" / "circuitpy_mpconfig.mk" - with open(cpy_mpcfg) as mpconfig: - configs = mpconfig.read() - - return configs - - def build_module_map(): """Establish the base of the JSON file, based on the contents from - `configs`. Base will contain module names, if they're part of - the `FULL_BUILD`, or their default value (0, 1, or a list of - modules that determine default [see audiocore, audiomixer, etc.]). - + `configs`. Base contains the module name and the controlling C macro name. """ base = dict() modules = get_bindings() - configs = read_mpconfig() - full_build = False for module in modules: full_name = module if module in ADDITIONAL_MODULES: search_identifier = ADDITIONAL_MODULES[module] else: search_identifier = "CIRCUITPY_" + module.lstrip("_").upper() - re_pattern = f"{re.escape(search_identifier)}\s*\??=\s*(.+)" - find_config = re.findall(re_pattern, configs) - if not find_config: - continue - find_config = ", ".join([x.strip("$()") for x in find_config]) - - full_build = int("CIRCUITPY_FULL_BUILD" in find_config) - if not full_build: - default_val = find_config - else: - default_val = "None" base[module] = { "name": full_name, - "full_build": str(full_build), - "default_value": default_val, - "excluded": {}, "key": search_identifier, } @@ -199,15 +170,14 @@ def build_module_map(): def get_settings_from_makefile(port_dir, board_name): - """Invoke make in a mode which prints the database, then parse it for - settings. + """Invoke make to print the value of critical build settings This means that the effect of all Makefile directives is taken into account, without having to re-encode the logic that sets them in this script, something that has proved error-prone """ contents = subprocess.run( - ["make", "-C", port_dir, f"BOARD={board_name}", "-qp", "print-CC"], + ["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS", "print-SRC_PATTERNS"], encoding="utf-8", errors="replace", stdout=subprocess.PIPE, @@ -223,9 +193,10 @@ def get_settings_from_makefile(port_dir, board_name): settings = {} for line in contents.stdout.split("\n"): - # Handle both = and := definitions. - m = re.match(r"^([A-Z][A-Z0-9_]*) :?= (.*)$", line) - if m: + if line.startswith('CFLAGS ='): + for m in re.findall('-D([A-Z][A-Z0-9_]*)=(\d+)', line): + settings[m[0]] = m[1] + elif m := re.match(r"^([A-Z][A-Z0-9_]*) = (.*)$", line): settings[m.group(1)] = m.group(2) return settings @@ -268,6 +239,10 @@ def get_repository_url(directory): repository_urls[directory] = path return path +def remove_prefix(s, prefix): + if not s.startswith(prefix): + raise ValueError(f"{s=} does not start with {prefix=}") + return s.removeprefix(prefix) def frozen_modules_from_dirs(frozen_mpy_dirs, withurl): """ @@ -280,7 +255,8 @@ def frozen_modules_from_dirs(frozen_mpy_dirs, withurl): """ frozen_modules = [] for frozen_path in filter(lambda x: x, frozen_mpy_dirs.split(" ")): - source_dir = get_circuitpython_root_dir() / frozen_path[7:] + frozen_path = remove_prefix(frozen_path, '../../') + source_dir = get_circuitpython_root_dir() / frozen_path url_repository = get_repository_url(source_dir) for sub in source_dir.glob("*"): if sub.name in FROZEN_EXCLUDES: diff --git a/extmod/ulab b/extmod/ulab index 3728d22732..84f99f17fc 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit 3728d22732dedc8a591b7df18a16d3ef1aed6a39 +Subproject commit 84f99f17fc02b03c13f99485d9cf68bc9d17c600 diff --git a/locale/ID.po b/locale/ID.po index 483c5f48ac..795848785a 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -1770,6 +1770,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "Tambahkan module apapun pada filesystem\n" @@ -1849,7 +1853,8 @@ msgstr "Kesalahan pembuatan nomor acak" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Baca-saja" @@ -2077,8 +2082,8 @@ msgid "Too many channels in sample." msgstr "Terlalu banyak channel dalam sampel" #: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "Terlalu banyak tampilan bus" +msgid "Too many display busses; forgot displayio.release_displays() ?" +msgstr "" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -3282,6 +3287,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3327,10 +3336,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4050,7 +4055,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "" @@ -4385,6 +4390,9 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "Zi harus berbentuk (n_section, 2)" +#~ msgid "Too many display busses" +#~ msgstr "Terlalu banyak tampilan bus" + #~ msgid "Hardware busy, try alternative pins" #~ msgstr "Perangkat keras sibuk, coba pin alternatif" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 1892339213..1ac4c2e3c6 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1473,6 +1473,10 @@ msgstr "" msgid "No capture in progress" msgstr "" +#: shared-module/usb/core/Device.c +msgid "No configuration set" +msgstr "" + #: shared-bindings/_bleio/PacketBuffer.c msgid "No connection: length cannot be determined" msgstr "" @@ -1536,6 +1540,10 @@ msgstr "" msgid "No timer available" msgstr "" +#: shared-module/usb/core/Device.c +msgid "No usb host port initialized" +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic system firmware out of memory" msgstr "" @@ -2056,7 +2064,7 @@ msgid "Too many channels in sample." msgstr "" #: shared-module/displayio/__init__.c -msgid "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" msgstr "" #: shared-module/displayio/__init__.c @@ -3259,6 +3267,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3304,10 +3316,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 0ffa07aed8..c9c6b2bd72 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -1761,6 +1761,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "" @@ -1840,7 +1844,8 @@ msgstr "" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -2066,7 +2071,7 @@ msgid "Too many channels in sample." msgstr "" #: shared-module/displayio/__init__.c -msgid "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" msgstr "" #: shared-module/displayio/__init__.c @@ -3269,6 +3274,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3314,10 +3323,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4036,7 +4041,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 609437e439..394ab6875f 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -1794,6 +1794,10 @@ msgstr "Pins müssen geordnete GPIO-Pins sein" msgid "Pins must share PWM slice" msgstr "Pins muss ein geteiltes PWM-Stück sein" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "und alle Module im Dateisystem\n" @@ -1874,7 +1878,8 @@ msgstr "Fehler bei der Erzeugung von Zufallszahlen" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Nur lesen möglich, da Schreibgeschützt" @@ -2109,8 +2114,8 @@ msgid "Too many channels in sample." msgstr "Zu viele Kanäle im sample." #: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "Zu viele Anzeigebusse" +msgid "Too many display busses; forgot displayio.release_displays() ?" +msgstr "" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -3342,6 +3347,10 @@ msgstr "Eingabedaten müssen iterierbar sein" msgid "input dtype must be float or complex" msgstr "Eingabe dtype muss float oder complex sein" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "Eingabematrix ist asymmetrisch" @@ -3387,10 +3396,6 @@ msgstr "Die Eingabe muss Tupel, Liste, Bereich oder Ndarray sein" msgid "input vectors must be of equal length" msgstr "Eingabevektoren müssen gleich lang sein" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "Eingaben sind nicht iterierbar" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "interp ist für 1D-Iterables gleicher Länge definiert" @@ -4121,7 +4126,7 @@ msgstr "sos[:, 3] sollten alle Einsen sein" msgid "sosfilt requires iterable arguments" msgstr "sosfilt erfordert iterierbare Argumente" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "Quell-Palette zu groß" @@ -4458,6 +4463,12 @@ msgstr "zi muss eine Gleitkommazahl sein" msgid "zi must be of shape (n_section, 2)" msgstr "zi muss die Form (n_section, 2) haben" +#~ msgid "inputs are not iterable" +#~ msgstr "Eingaben sind nicht iterierbar" + +#~ msgid "Too many display busses" +#~ msgstr "Zu viele Anzeigebusse" + #~ msgid "Cannot transfer without MOSI and MISO pins" #~ msgstr "Kann nicht ohne MISO und MOSI Pins transferieren" diff --git a/locale/el.po b/locale/el.po index 57fd874dd6..a6fccf1ae7 100644 --- a/locale/el.po +++ b/locale/el.po @@ -1775,6 +1775,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "" @@ -1854,7 +1858,8 @@ msgstr "" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -2080,7 +2085,7 @@ msgid "Too many channels in sample." msgstr "" #: shared-module/displayio/__init__.c -msgid "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" msgstr "" #: shared-module/displayio/__init__.c @@ -3283,6 +3288,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3328,10 +3337,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4050,7 +4055,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 13de7645fe..42ed734f7a 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-07-28 00:10+0000\n" +"PO-Revision-Date: 2023-07-30 11:47+0000\n" "Last-Translator: Andi Chandler \n" "Language-Team: none\n" "Language: en_GB\n" @@ -1777,6 +1777,10 @@ msgstr "Pins must be sequential GPIO pins" msgid "Pins must share PWM slice" msgstr "Pins must share PWM slice" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "Pipe error" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "Plus any modules on the filesystem\n" @@ -1854,7 +1858,8 @@ msgstr "Random number generation error" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Read-only" @@ -2082,8 +2087,8 @@ msgid "Too many channels in sample." msgstr "Too many channels in sample." #: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" +msgstr "Too many display busses; forgot displayio.release_displays() ?" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -3297,6 +3302,10 @@ msgstr "input data must be an iterable" msgid "input dtype must be float or complex" msgstr "input dtype must be float or complex" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "input matrix is asymmetric" @@ -3342,10 +3351,6 @@ msgstr "input must be tuple, list, range, or ndarray" msgid "input vectors must be of equal length" msgstr "input vectors must be of equal length" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "inputs are not iterable" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "interp is defined for 1D iterables of equal length" @@ -4064,7 +4069,7 @@ msgstr "sos[:, 3] should be all ones" msgid "sosfilt requires iterable arguments" msgstr "sosfilt requires iterable arguments" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "source palette too large" @@ -4399,6 +4404,12 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "inputs are not iterable" +#~ msgstr "inputs are not iterable" + +#~ msgid "Too many display busses" +#~ msgstr "Too many display busses" + #~ msgid "Cannot transfer without MOSI and MISO pins" #~ msgstr "Cannot transfer without MOSI and MISO pins" diff --git a/locale/es.po b/locale/es.po index 92af54c327..8a6a67e02c 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-07-16 04:32+0000\n" -"Last-Translator: Jose David M \n" +"PO-Revision-Date: 2023-07-30 11:47+0000\n" +"Last-Translator: Pablo Martinez Bernal \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" @@ -1808,6 +1808,10 @@ msgstr "Los pines deben ser pines GPIO secuenciales" msgid "Pins must share PWM slice" msgstr "Los pines deben compartir la división PWM" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "Error de conexión" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "Además de cualquier módulo en el sistema de archivos\n" @@ -1888,7 +1892,8 @@ msgstr "Error de generación de números aleatorios" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Solo-lectura" @@ -2121,8 +2126,9 @@ msgid "Too many channels in sample." msgstr "Demasiados canales en sample." #: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "Demasiados buses de pantalla" +msgid "Too many display busses; forgot displayio.release_displays() ?" +msgstr "" +"Demasiados buses para displays. Olvidaste displayio.release_displays() ?" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -2853,7 +2859,7 @@ msgstr "no se puede crear instancia" #: extmod/ulab/code/ndarray.c msgid "cannot delete array elements" -msgstr "" +msgstr "no se pudo eliminar elementos del array" #: py/runtime.c msgid "cannot import name %q" @@ -3318,11 +3324,11 @@ msgstr "ensamblador en línea debe ser una función" #: extmod/ulab/code/numpy/vector.c msgid "input and output dimensions differ" -msgstr "" +msgstr "dimensiones de entrada y salida distintas" #: extmod/ulab/code/numpy/vector.c msgid "input and output shapes differ" -msgstr "" +msgstr "formas de entrada y salida distintas" #: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" @@ -3344,6 +3350,10 @@ msgstr "los datos de entrada deben ser iterables" msgid "input dtype must be float or complex" msgstr "dtype de entrada debe ser float o complex" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "la matriz de entrada es asimétrica" @@ -3389,10 +3399,6 @@ msgstr "la entrada debe ser una tupla, lista, rango o ndarray" msgid "input vectors must be of equal length" msgstr "los vectores de entrada deben ser de igual tamaño" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "Entradas no son iterables" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "interp está definido para iterables 1D de igual tamaño" @@ -3658,7 +3664,7 @@ msgstr "yield nativo" #: extmod/ulab/code/ndarray.c msgid "ndarray length overflows" -msgstr "" +msgstr "la longitud de ndarray desborda" #: py/runtime.c #, c-format @@ -3763,7 +3769,7 @@ msgstr "no esta implementado para complex dtype" #: extmod/ulab/code/numpy/bitwise.c msgid "not supported for input types" -msgstr "" +msgstr "no soportado para los tipos de entrada" #: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" @@ -3915,11 +3921,11 @@ msgstr "La matriz de salida es demasiado pequeña" #: extmod/ulab/code/numpy/vector.c msgid "out keyword is not supported for complex dtype" -msgstr "" +msgstr "out no soportado para el dtype 'complex'" #: extmod/ulab/code/numpy/vector.c msgid "out keyword is not supported for function" -msgstr "" +msgstr "out no soportado para funciones" #: extmod/ulab/code/utils/utils.c msgid "out must be a float dense array" @@ -3927,11 +3933,11 @@ msgstr "la matriz de salida debe ser densa de números float" #: extmod/ulab/code/numpy/vector.c msgid "out must be an ndarray" -msgstr "" +msgstr "out debe ser un ndarray" #: extmod/ulab/code/numpy/vector.c msgid "out must be of float dtype" -msgstr "" +msgstr "el dtype de out debe ser float" #: shared-bindings/bitmaptools/__init__.c msgid "out of range of target" @@ -4118,7 +4124,7 @@ msgstr "sos[:, 3] deberían ser todos unos" msgid "sosfilt requires iterable arguments" msgstr "sosfilt requiere argumentos iterables" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "paleta fuente muy larga" @@ -4454,6 +4460,12 @@ 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 "inputs are not iterable" +#~ msgstr "Entradas no son iterables" + +#~ msgid "Too many display busses" +#~ msgstr "Demasiados buses de pantalla" + #~ msgid "Cannot transfer without MOSI and MISO pins" #~ msgstr "No puede ser transferido si los pines MOSI y MISO" diff --git a/locale/fil.po b/locale/fil.po index aff40a5bb7..15b2f87c02 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -1764,6 +1764,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "Kasama ang kung ano pang modules na sa filesystem\n" @@ -1841,7 +1845,8 @@ msgstr "" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Basahin-lamang" @@ -2067,7 +2072,7 @@ msgid "Too many channels in sample." msgstr "Sobra ang channels sa sample." #: shared-module/displayio/__init__.c -msgid "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" msgstr "" #: shared-module/displayio/__init__.c @@ -3284,6 +3289,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3329,10 +3338,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4057,7 +4062,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 18c0d68845..f99e183c0e 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -1818,6 +1818,10 @@ msgstr "Les broches doivent être des broches GPIO à la suite" msgid "Pins must share PWM slice" msgstr "Les broches doivent partager la tranche PWM" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "Ainsi que tout autres modules présents sur le système de fichiers\n" @@ -1899,7 +1903,8 @@ msgstr "Erreur de génération de chiffres aléatoires" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Lecture seule" @@ -2128,8 +2133,8 @@ msgid "Too many channels in sample." msgstr "Trop de canaux dans l'échantillon." #: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "Trop de bus d'affichage" +msgid "Too many display busses; forgot displayio.release_displays() ?" +msgstr "" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -3363,6 +3368,10 @@ msgstr "les données d'entrée doivent être un itérable" msgid "input dtype must be float or complex" msgstr "le dtype d'entrée doit être un flottant ou un complexe" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "la matrice d'entrée est asymétrique" @@ -3408,10 +3417,6 @@ msgstr "l'entrée 'input' doit être tuple, list, range ou ndarray" msgid "input vectors must be of equal length" msgstr "les vecteurs d'entrée doivent être de longueur égale" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "les entrées ne sont pas itérables" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "interp n'est défini que pour les 1D itérables de taille identique" @@ -4141,7 +4146,7 @@ msgstr "sos[:, 3] doivent tous être à un" msgid "sosfilt requires iterable arguments" msgstr "sosfilt nécessite des argument itératifs" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "la palette source est trop grande" @@ -4477,6 +4482,12 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "inputs are not iterable" +#~ msgstr "les entrées ne sont pas itérables" + +#~ msgid "Too many display busses" +#~ msgstr "Trop de bus d'affichage" + #~ msgid "Cannot transfer without MOSI and MISO pins" #~ msgstr "Impossible de transférer sans une broche MOSI ou MISO" diff --git a/locale/hi.po b/locale/hi.po index 7469814d21..a6bd1fc756 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -1748,6 +1748,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "" @@ -1825,7 +1829,8 @@ msgstr "" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -2051,7 +2056,7 @@ msgid "Too many channels in sample." msgstr "" #: shared-module/displayio/__init__.c -msgid "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" msgstr "" #: shared-module/displayio/__init__.c @@ -3254,6 +3259,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3299,10 +3308,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4021,7 +4026,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 6a4e37a0ef..3a82f92b53 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -1770,6 +1770,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c #, fuzzy msgid "Plus any modules on the filesystem\n" @@ -1848,7 +1852,8 @@ msgstr "" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Sola lettura" @@ -2074,7 +2079,7 @@ msgid "Too many channels in sample." msgstr "" #: shared-module/displayio/__init__.c -msgid "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" msgstr "" #: shared-module/displayio/__init__.c @@ -3289,6 +3294,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3334,10 +3343,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4067,7 +4072,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 32b5569072..fe8a1440c4 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -1763,6 +1763,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "" @@ -1841,7 +1845,8 @@ msgstr "乱数生成エラー" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "読み込み専用" @@ -2067,7 +2072,7 @@ msgid "Too many channels in sample." msgstr "サンプルのチャンネル数が多すぎます" #: shared-module/displayio/__init__.c -msgid "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" msgstr "" #: shared-module/displayio/__init__.c @@ -3276,6 +3281,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "入力行列が非対称" @@ -3321,10 +3330,6 @@ msgstr "入力はtuple, list, range, ndarrayでなければなりません" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4045,7 +4050,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 0dd12d03e5..a55f2a3588 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -1751,6 +1751,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "" @@ -1828,7 +1832,8 @@ msgstr "" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -2054,7 +2059,7 @@ msgid "Too many channels in sample." msgstr "" #: shared-module/displayio/__init__.c -msgid "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" msgstr "" #: shared-module/displayio/__init__.c @@ -3258,6 +3263,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3303,10 +3312,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4025,7 +4030,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 7d115254be..4ece57854a 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -1767,6 +1767,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "En iedere module in het bestandssysteem\n" @@ -1846,7 +1850,8 @@ msgstr "Random number generatie fout" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Alleen-lezen" @@ -2072,8 +2077,8 @@ msgid "Too many channels in sample." msgstr "Teveel kanalen in sample." #: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "Teveel beeldscherm bussen" +msgid "Too many display busses; forgot displayio.release_displays() ?" +msgstr "" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -3285,6 +3290,10 @@ msgstr "invoerdata moet itereerbaar zijn" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "invoermatrix is asymmetrisch" @@ -3330,10 +3339,6 @@ msgstr "invoer moet een tuple, lijst, bereik of ndarray zijn" msgid "input vectors must be of equal length" msgstr "invoervectors moeten van gelijke lengte zijn" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "invoer is niet itereerbaar" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4055,7 +4060,7 @@ msgstr "sos[:, 3] moeten allemaal 1 zijn" msgid "sosfilt requires iterable arguments" msgstr "sosfilt vereist itereerbare argumenten" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "bronpalet te groot" @@ -4390,6 +4395,12 @@ 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 "inputs are not iterable" +#~ msgstr "invoer is niet itereerbaar" + +#~ msgid "Too many display busses" +#~ msgstr "Teveel beeldscherm bussen" + #~ msgid "Hardware busy, try alternative pins" #~ msgstr "Hardware bezig, probeer alternatieve pinnen" diff --git a/locale/pl.po b/locale/pl.po index b97a3ba2a8..1c6c1b16d5 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -1756,6 +1756,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "Oraz moduły w systemie plików\n" @@ -1833,7 +1837,8 @@ msgstr "Błąd generowania liczb losowych" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Tylko do odczytu" @@ -2059,8 +2064,8 @@ msgid "Too many channels in sample." msgstr "Zbyt wiele kanałów." #: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "Zbyt wiele magistrali" +msgid "Too many display busses; forgot displayio.release_displays() ?" +msgstr "" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -3263,6 +3268,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3308,10 +3317,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "wektory wejściowe muszą być równej długości" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4031,7 +4036,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "źródłowa paleta jest zbyt duża" @@ -4366,6 +4371,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Too many display busses" +#~ msgstr "Zbyt wiele magistrali" + #~ msgid "Hardware busy, try alternative pins" #~ msgstr "Sprzęt zajęty, wypróbuj alternatywne piny" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index af480bd9aa..c3a7acdfd6 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-07-27 17:07+0000\n" +"PO-Revision-Date: 2023-07-30 11:47+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -1802,6 +1802,10 @@ msgstr "Pinos devem ser pinos GPIO sequenciais" msgid "Pins must share PWM slice" msgstr "Os pinos devem compartilhar a fatia do PWM" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "Erro de pipe" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "Além de quaisquer módulos no sistema de arquivos\n" @@ -1884,7 +1888,8 @@ msgstr "Houve um erro na geração do número aleatório" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Somente leitura" @@ -2116,8 +2121,10 @@ msgid "Too many channels in sample." msgstr "Muitos canais na amostra." #: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "Muitos barramentos estão sendo exibidos" +msgid "Too many display busses; forgot displayio.release_displays() ?" +msgstr "" +"Excesso de barramentos de exibição; esqueceu do displayio." +"release_displays() ?" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -3343,6 +3350,10 @@ msgstr "os dados da entrada devem ser iteráveis" msgid "input dtype must be float or complex" msgstr "o tipo da entrada dtype deve ser flutuante ou complexo" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "a matriz da entrada é assimétrica" @@ -3388,10 +3399,6 @@ msgstr "A entrada deve ser tupla, lista, intervalo ou matriz" msgid "input vectors must be of equal length" msgstr "os vetores da entrada devem ter o mesmo comprimento" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "as entradas não são iteráveis" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "o interp é definido para iteráveis 1D com comprimento igual" @@ -4120,7 +4127,7 @@ msgstr "sos[:, 3] deve ser um em todos" msgid "sosfilt requires iterable arguments" msgstr "o sosfilt requer que os argumentos sejam iteráveis" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "a paleta de origem é muito grande" @@ -4455,6 +4462,12 @@ 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 "inputs are not iterable" +#~ msgstr "as entradas não são iteráveis" + +#~ msgid "Too many display busses" +#~ msgstr "Muitos barramentos estão sendo exibidos" + #~ msgid "Cannot transfer without MOSI and MISO pins" #~ msgstr "Não é possível transferir sem os pinos MOSI e MISO" diff --git a/locale/ru.po b/locale/ru.po index 12040cc439..8e354a4960 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -1807,6 +1807,10 @@ msgstr "Пины должны быть последовательными выв msgid "Pins must share PWM slice" msgstr "Пины должны иметь общий срез ШИМ" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "" @@ -1886,7 +1890,8 @@ msgstr "" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -2114,7 +2119,7 @@ msgid "Too many channels in sample." msgstr "" #: shared-module/displayio/__init__.c -msgid "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" msgstr "" #: shared-module/displayio/__init__.c @@ -3317,6 +3322,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3362,10 +3371,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4084,7 +4089,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "" diff --git a/locale/sv.po b/locale/sv.po index 1b927ef549..2f4914442a 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-07-27 17:07+0000\n" +"PO-Revision-Date: 2023-08-03 16:12+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -1786,6 +1786,10 @@ msgstr "Pins måste vara sekventiella GPIO-pinnar" msgid "Pins must share PWM slice" msgstr "Pinnar måste dela PWM-segment" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "Pipe-fel" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "Plus eventuella moduler i filsystemet\n" @@ -1865,7 +1869,8 @@ msgstr "Fel vid generering av slumptal" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Skrivskyddad" @@ -2093,8 +2098,8 @@ msgid "Too many channels in sample." msgstr "För många kanaler i sampling." #: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "För många display-bussar" +msgid "Too many display busses; forgot displayio.release_displays() ?" +msgstr "För många displaybussar; glömt displayio.release_displays() ?" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -3311,6 +3316,10 @@ msgstr "indata måste vara en iterable" msgid "input dtype must be float or complex" msgstr "indatatyp måste vara float eller complex" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "indata är inte itererbar" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "indatamatrisen är asymmetrisk" @@ -3356,10 +3365,6 @@ msgstr "indata måste vara tupel, lista, range, eller ndarray" msgid "input vectors must be of equal length" msgstr "indatavektorer måste ha samma längd" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "indata är inte iterbara" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "interp är definierad för 1D-iterabla med samma längd" @@ -4082,7 +4087,7 @@ msgstr "sos[:, 3] måste vara ettor" msgid "sosfilt requires iterable arguments" msgstr "sosfilt kräver iterable argument" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "källpalett för stor" @@ -4417,6 +4422,12 @@ 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 "inputs are not iterable" +#~ msgstr "indata är inte iterbara" + +#~ msgid "Too many display busses" +#~ msgstr "För många display-bussar" + #~ msgid "Cannot transfer without MOSI and MISO pins" #~ msgstr "Det går inte att överföra utan MOSI- och MISO-pinnar" diff --git a/locale/tr.po b/locale/tr.po index 851fef7f94..c741fce473 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -1767,6 +1767,10 @@ msgstr "" msgid "Pins must share PWM slice" msgstr "" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "" @@ -1847,7 +1851,8 @@ msgstr "" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -2073,7 +2078,7 @@ msgid "Too many channels in sample." msgstr "" #: shared-module/displayio/__init__.c -msgid "Too many display busses" +msgid "Too many display busses; forgot displayio.release_displays() ?" msgstr "" #: shared-module/displayio/__init__.c @@ -3276,6 +3281,10 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3321,10 +3330,6 @@ msgstr "" msgid "input vectors must be of equal length" msgstr "" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "" @@ -4043,7 +4048,7 @@ msgstr "" msgid "sosfilt requires iterable arguments" msgstr "" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 3853fdc0d7..8171696471 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-07-21 00:10+0000\n" +"PO-Revision-Date: 2023-08-02 22:07+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -1791,6 +1791,10 @@ msgstr "yǐn jiǎo bì xū shì lián xù de GPIO yǐn jiǎo" msgid "Pins must share PWM slice" msgstr "yǐn jiǎo bì xū gòng xiǎng PWM qiē piàn" +#: shared-module/usb/core/Device.c +msgid "Pipe error" +msgstr "guǎndào cuòwù" + #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" msgstr "Zài wénjiàn xìtǒng shàng tiānjiā rènhé mókuài\n" @@ -1870,7 +1874,8 @@ msgstr "Suíjī shù shēngchéng cuòwù" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c +#: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c +#: shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Zhǐ dú" @@ -2098,8 +2103,8 @@ msgid "Too many channels in sample." msgstr "Chōuyàng zhōng de píndào tài duō." #: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "Xiǎnshì zǒngxiàn tài duōle" +msgid "Too many display busses; forgot displayio.release_displays() ?" +msgstr "Xiǎnshì zǒngxiàn guòduō;wàngjì displayio.release_displays() ?" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -2823,7 +2828,7 @@ msgstr "wúfǎ chuàngjiàn shílì" #: extmod/ulab/code/ndarray.c msgid "cannot delete array elements" -msgstr "" +msgstr "wúfǎ shānchú shùzǔ yuánsù" #: py/runtime.c msgid "cannot import name %q" @@ -3291,11 +3296,11 @@ msgstr "nèi lián jíhé bìxū shì yīgè hánshù" #: extmod/ulab/code/numpy/vector.c msgid "input and output dimensions differ" -msgstr "" +msgstr "shūrù hé shūchū chǐcùn bùtóng" #: extmod/ulab/code/numpy/vector.c msgid "input and output shapes differ" -msgstr "" +msgstr "shūrù hé shūchū xíngzhuàng bùtóng" #: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" @@ -3317,6 +3322,10 @@ msgstr "shūrù shùjù bìxū shì kě diédài de" msgid "input dtype must be float or complex" msgstr "shū rù dtype bì xū shì fú diǎn xíng huò fù shù" +#: extmod/ulab/code/numpy/poly.c +msgid "input is not iterable" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "shūrù jǔzhèn bù duìchèn" @@ -3362,10 +3371,6 @@ msgstr "shūrù bìxū shì yuán zǔ, lièbiǎo, fànwéi huò ndarray" msgid "input vectors must be of equal length" msgstr "shūrù xiàngliàng de chángdù bìxū xiāngděng" -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "shū rù bù kě yí dòng" - #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" msgstr "zhōng jiān wéi cháng dù xiāng děng de 1D kě yì jiāo qì dìng yì" @@ -3628,7 +3633,7 @@ msgstr "yuán chǎn" #: extmod/ulab/code/ndarray.c msgid "ndarray length overflows" -msgstr "" +msgstr "ndarray chángdù yìchū" #: py/runtime.c #, c-format @@ -3730,7 +3735,7 @@ msgstr "wèi zhēn duì fù zá de dtype shí xiàn" #: extmod/ulab/code/numpy/bitwise.c msgid "not supported for input types" -msgstr "" +msgstr "bù zhīchí shūrù lèixíng" #: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" @@ -3882,11 +3887,11 @@ msgstr "chū zhèn liè tài xiǎo" #: extmod/ulab/code/numpy/vector.c msgid "out keyword is not supported for complex dtype" -msgstr "" +msgstr "fùzá de dtype bù zhīchí out guānjiànzì" #: extmod/ulab/code/numpy/vector.c msgid "out keyword is not supported for function" -msgstr "" +msgstr "hánshù bù zhīchí out guānjiànzì" #: extmod/ulab/code/utils/utils.c msgid "out must be a float dense array" @@ -3894,11 +3899,11 @@ msgstr "chū bì xū shì yí gè fú dòng mì jí zhèn liè" #: extmod/ulab/code/numpy/vector.c msgid "out must be an ndarray" -msgstr "" +msgstr "shūchū bìxū shì ndarray" #: extmod/ulab/code/numpy/vector.c msgid "out must be of float dtype" -msgstr "" +msgstr "out bìxū shì fúdiǎn xíng dtype" #: shared-bindings/bitmaptools/__init__.c msgid "out of range of target" @@ -4085,7 +4090,7 @@ msgstr "sos [:, 3] yīnggāi quán shì" msgid "sosfilt requires iterable arguments" msgstr "sosfilt xūyào diédài cānshù" -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +#: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" msgstr "yuán miànbǎn tài dà" @@ -4423,6 +4428,12 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "inputs are not iterable" +#~ msgstr "shū rù bù kě yí dòng" + +#~ msgid "Too many display busses" +#~ msgstr "Xiǎnshì zǒngxiàn tài duōle" + #~ msgid "Cannot transfer without MOSI and MISO pins" #~ msgstr "méiyǒu MOSI hé MISO yǐnjiǎo, wúfǎ chuánshū" diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 10ac738cac..b1bfa4f8c7 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -330,13 +330,13 @@ $(BUILD)/esp-idf: TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET).defaults ifeq ($(CIRCUITPY_ESP_FLASH_SIZE), 2MB) - FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults + FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults else UF2_BOOTLOADER ?= $(CIRCUITPY_USB) ifeq ($(UF2_BOOTLOADER), 1) - FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults + FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults else - FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults + FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults endif endif @@ -446,11 +446,13 @@ else all: $(BUILD)/firmware.bin endif +$(IDF_CMAKE_TARGETS): esp-idf-stamp + .PHONY: esp-idf-stamp esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h $(Q)ninja -C $(BUILD)/esp-idf $(IDF_CMAKE_TARGETS) -$(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp +$(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp $(IDF_CMAKE_TARGETS) $(STEPECHO) "LINK $@" $(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(ESP_IDF_COMPONENTS_EXPANDED) $(BINARY_BLOBS) $(MBEDTLS_COMPONENTS_LINK_EXPANDED) $(BUILD)/esp-idf/esp-idf/newlib/libnewlib.a -Wl,--end-group -u newlib_include_pthread_impl -u ld_include_highint_hdl -Wl,--start-group $(LIBS) -Wl,--end-group $(BUILD)/esp-idf/esp-idf/pthread/libpthread.a -u __cxx_fatal_exception diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/sdkconfig b/ports/espressif/boards/adafruit_esp32s2_camera/sdkconfig deleted file mode 100644 index 9d8bbde967..0000000000 --- a/ports/espressif/boards/adafruit_esp32s2_camera/sdkconfig +++ /dev/null @@ -1,33 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y - -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 - -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/board.c b/ports/espressif/boards/adafruit_esp32s3_camera/board.c similarity index 60% rename from ports/espressif/boards/adafruit_esp32s2_camera/board.c rename to ports/espressif/boards/adafruit_esp32s3_camera/board.c index 4799a07b79..65042bcea5 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/board.c +++ b/ports/espressif/boards/adafruit_esp32s3_camera/board.c @@ -35,6 +35,8 @@ #include "shared-bindings/board/__init__.h" #include "esp_log.h" +#include "esp_err.h" +#include "driver/i2c.h" displayio_fourwire_obj_t board_display_obj; @@ -50,7 +52,69 @@ uint8_t display_init_sequence[] = { 0x29, 0 | DELAY, 5, // _DISPON }; +#define I2C_MASTER_SCL_IO 34 +#define I2C_MASTER_SDA_IO 33 +#define I2C_MASTER_NUM 0 +#define I2C_MASTER_FREQ_HZ 400000 +#define I2C_MASTER_TX_BUF_DISABLE 0 +#define I2C_MASTER_RX_BUF_DISABLE 0 +#define I2C_MASTER_TIMEOUT_MS 1000 +#define I2C_WAIT 40 // Timing (in microseconds) for I2C + +#define AW9523_ADDR (0x5B) +#define AW9523_REG_SOFTRESET (0x7f) +#define AW9523_REG_OUTPUT0 (0x02) +#define AW9523_REG_CONFIG0 (0x04) +#define AW9523_DEFAULT_OUTPUT (0) +#define AW9523_DEFAULT_CONFIG (0x2) + + +static void io_expander_backlight_init(void) { + int i2c_num = I2C_MASTER_NUM; + i2c_config_t conf = { + .mode = I2C_MODE_MASTER, + .sda_io_num = I2C_MASTER_SDA_IO, + .scl_io_num = I2C_MASTER_SCL_IO, + .sda_pullup_en = GPIO_PULLUP_ENABLE, + .scl_pullup_en = GPIO_PULLUP_ENABLE, + .master.clk_speed = I2C_MASTER_FREQ_HZ, + }; + i2c_param_config(i2c_num, &conf); + i2c_driver_install(i2c_num, conf.mode, I2C_MASTER_RX_BUF_DISABLE, I2C_MASTER_TX_BUF_DISABLE, 0); + i2c_cmd_handle_t cmd = i2c_cmd_link_create(); + i2c_master_start(cmd); + i2c_master_write_byte(cmd, AW9523_ADDR << 1 | I2C_MASTER_WRITE, true); + i2c_master_write_byte(cmd, AW9523_REG_SOFTRESET, true); + i2c_master_write_byte(cmd, 0, true); + i2c_master_stop(cmd); + i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); + i2c_cmd_link_delete(cmd); + + cmd = i2c_cmd_link_create(); + i2c_master_start(cmd); + i2c_master_write_byte(cmd, AW9523_ADDR << 1 | I2C_MASTER_WRITE, true); + i2c_master_write_byte(cmd, AW9523_REG_CONFIG0, true); + i2c_master_write_byte(cmd, AW9523_DEFAULT_CONFIG >> 8, true); + i2c_master_write_byte(cmd, AW9523_DEFAULT_CONFIG & 0xff, true); + i2c_master_stop(cmd); + i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); + i2c_cmd_link_delete(cmd); + + cmd = i2c_cmd_link_create(); + i2c_master_start(cmd); + i2c_master_write_byte(cmd, AW9523_ADDR << 1 | I2C_MASTER_WRITE, true); + i2c_master_write_byte(cmd, AW9523_REG_OUTPUT0, true); + i2c_master_write_byte(cmd, AW9523_DEFAULT_OUTPUT >> 8, true); + i2c_master_write_byte(cmd, AW9523_DEFAULT_OUTPUT & 0xff, true); + i2c_master_stop(cmd); + i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); + i2c_cmd_link_delete(cmd); + + i2c_driver_delete(i2c_num); +} + void board_init(void) { + io_expander_backlight_init(); busio_spi_obj_t *spi = common_hal_board_create_spi(0); displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus; bus->base.type = &displayio_fourwire_type; @@ -84,7 +148,7 @@ void board_init(void) { MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command display_init_sequence, sizeof(display_init_sequence), - &pin_GPIO41, // backlight pin + NULL, // backlight pin NO_BRIGHTNESS_COMMAND, 1.0f, // brightness false, // single_byte_bounds diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.h similarity index 92% rename from ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h rename to ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.h index 64ab1b966d..daa9bc92e5 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.h @@ -27,13 +27,11 @@ // Micropython setup #define MICROPY_HW_BOARD_NAME "Adafruit Camera" -#define MICROPY_HW_MCU_NAME "ESP32S2" +#define MICROPY_HW_MCU_NAME "ESP32S3" -#define MICROPY_HW_NEOPIXEL (&pin_GPIO21) +#define MICROPY_HW_NEOPIXEL (&pin_GPIO1) #define MICROPY_HW_NEOPIXEL_COUNT (1) -#define MICROPY_HW_LED_STATUS (&pin_GPIO1) - #define DEFAULT_I2C_BUS_SDA (&pin_GPIO33) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO34) diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk new file mode 100644 index 0000000000..6b94c979dc --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk @@ -0,0 +1,21 @@ +USB_VID = 0x239A +USB_PID = 0x8118 +USB_PRODUCT = "Camera" +USB_MANUFACTURER = "Adafruit" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_SIZE = 4MB +FLASH_SDKCONFIG = esp-idf-config/sdkconfig-4MB-1ota.defaults + +CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_CANIO = 0 +CIRCUITPY_ESPCAMERA = 1 +CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_KEYPAD = 0 +CIRCUITPY_ONEWIREIO = 0 +CIRCUITPY_PARALLELDISPLAY = 0 +CIRCUITPY_RGBMATRIX = 0 +CIRCUITPY_ROTARYIO = 0 diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c b/ports/espressif/boards/adafruit_esp32s3_camera/pins.c similarity index 88% rename from ports/espressif/boards/adafruit_esp32s2_camera/pins.c rename to ports/espressif/boards/adafruit_esp32s3_camera/pins.c index 5de2d800aa..743788bb7f 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c +++ b/ports/espressif/boards/adafruit_esp32s3_camera/pins.c @@ -24,21 +24,21 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, - { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO41) }, - { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO40) }, - { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO39) }, { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO40) }, - { MP_ROM_QSTR(MP_QSTR_CARD_CS), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_CARD_CS), MP_ROM_PTR(&pin_GPIO48) }, { MP_ROM_QSTR(MP_QSTR_IRQ), MP_ROM_PTR(&pin_GPIO3) }, - { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO1) }, - { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_BATTERY_MONITOR), MP_ROM_PTR(&pin_GPIO4) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig b/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig new file mode 100644 index 0000000000..cf6a6def7c --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig @@ -0,0 +1,62 @@ +# Component config +# +# +# ESP32S3-Specific +# +CONFIG_ESP32S3_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +CONFIG_SPIRAM_MODE_QUAD=y +# CONFIG_SPIRAM_MODE_OCT is not set +CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM Clock and CS IO for ESP32S3 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM Clock and CS IO for ESP32S3 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# end of ESP32S3-Specific + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP + +# CONFIG_OV7670_SUPPORT is not set +# CONFIG_NT99141_SUPPORT is not set +CONFIG_OV3360_SUPPORT=n +# CONFIG_OV2640_SUPPORT is not set +CONFIG_OV5640_SUPPORT=y +# CONFIG_GC2145_SUPPORT is not set +# CONFIG_GC032A_SUPPORT is not set +# CONFIG_GC0308_SUPPORT is not set +# CONFIG_BF3005_SUPPORT is not set +# CONFIG_BF20A6_SUPPORT is not set +# CONFIG_SC101IOT_SUPPORT is not set +# CONFIG_SC030IOT_SUPPORT is not set +# end of Component config diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/board.c b/ports/espressif/boards/adafruit_metro_esp32s3/board.c new file mode 100644 index 0000000000..164430c88c --- /dev/null +++ b/ports/espressif/boards/adafruit_metro_esp32s3/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.h b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.h new file mode 100644 index 0000000000..d1e0ba0c26 --- /dev/null +++ b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.h @@ -0,0 +1,46 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Adafruit Metro ESP32S3" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO45) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO13) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO48) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO47) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO41) +#define DEFAULT_UART_BUS_TX (&pin_GPIO40) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk similarity index 52% rename from ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.mk rename to ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk index 1823c1dd88..039c689eaf 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk @@ -1,10 +1,10 @@ USB_VID = 0x239A -USB_PID = 0x8118 -USB_PRODUCT = "Camera" +USB_PID = 0x0145 +USB_PRODUCT = "Metro ESP32-S3" USB_MANUFACTURER = "Adafruit" -IDF_TARGET = esp32s2 +IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_FLASH_SIZE = 16MB diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/pins.c b/ports/espressif/boards/adafruit_metro_esp32s3/pins.c new file mode 100644 index 0000000000..dfad4381ef --- /dev/null +++ b/ports/espressif/boards/adafruit_metro_esp32s3/pins.c @@ -0,0 +1,95 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO1) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO41) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO41) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO40) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO40) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_GPIO47) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO47),MP_ROM_PTR(&pin_GPIO47) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_GPIO48) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO48),MP_ROM_PTR(&pin_GPIO48) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_GPIO35) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO35),MP_ROM_PTR(&pin_GPIO35) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_GPIO37) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO37),MP_ROM_PTR(&pin_GPIO37) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO43) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig new file mode 100644 index 0000000000..2d72ed5391 --- /dev/null +++ b/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig @@ -0,0 +1,46 @@ +# +# Component config +# +# +# ESP32S3-Specific +# +CONFIG_ESP32S3_SPIRAM_SUPPORT=y +# +# SPI RAM config +# +# CONFIG_SPIRAM_MODE_QUAD is not set +CONFIG_SPIRAM_MODE_OCT=y +CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config + +# PSRAM Clock and CS IO for ESP32S3 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM Clock and CS IO for ESP32S3 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_120M is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# end of SPI RAM config + +# end of ESP32S3-Specific + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="Metro-ESP32S3" +# end of LWIP diff --git a/ports/espressif/boards/beetle-esp32-c3/sdkconfig b/ports/espressif/boards/beetle-esp32-c3/sdkconfig index 68be40df7a..69da6d30fd 100644 --- a/ports/espressif/boards/beetle-esp32-c3/sdkconfig +++ b/ports/espressif/boards/beetle-esp32-c3/sdkconfig @@ -1,5 +1,5 @@ # # LWIP # -CONFIG_LWIP_LOCAL_HOSTNAME="beetle-esp32-c3 +CONFIG_LWIP_LOCAL_HOSTNAME="beetle-esp32-c3" # end of LWIP diff --git a/ports/espressif/boards/brainboardz_neuron/mpconfigboard.h b/ports/espressif/boards/brainboardz_neuron/mpconfigboard.h index 72cda83c9b..760041ddf4 100755 --- a/ports/espressif/boards/brainboardz_neuron/mpconfigboard.h +++ b/ports/espressif/boards/brainboardz_neuron/mpconfigboard.h @@ -35,6 +35,6 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) -#define DEFAULT_SPI_BUS_SCK (&pin_GPIO14) -#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO15) -#define DEFAULT_SPI_BUS_MISO (&pin_GPIO13) +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO40) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO41) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO39) diff --git a/ports/espressif/boards/brainboardz_neuron/pins.c b/ports/espressif/boards/brainboardz_neuron/pins.c index 5c198c20a7..62b95421f8 100755 --- a/ports/espressif/boards/brainboardz_neuron/pins.c +++ b/ports/espressif/boards/brainboardz_neuron/pins.c @@ -23,35 +23,31 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, - { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO14) }, - { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO15) }, - { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, - { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO16) }, - { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, - { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, @@ -61,7 +57,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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_IO47), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, diff --git a/ports/espressif/boards/es3ink/board.c b/ports/espressif/boards/es3ink/board.c new file mode 100644 index 0000000000..b3c8cb4191 --- /dev/null +++ b/ports/espressif/boards/es3ink/board.c @@ -0,0 +1,39 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif /* DEBUG */ +} + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/es3ink/mpconfigboard.h b/ports/espressif/boards/es3ink/mpconfigboard.h new file mode 100644 index 0000000000..5aa60a122a --- /dev/null +++ b/ports/espressif/boards/es3ink/mpconfigboard.h @@ -0,0 +1,47 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "ES3ink" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO8) +#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO18) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO4) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO12) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO13) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/es3ink/mpconfigboard.mk b/ports/espressif/boards/es3ink/mpconfigboard.mk new file mode 100644 index 0000000000..bd55e68379 --- /dev/null +++ b/ports/espressif/boards/es3ink/mpconfigboard.mk @@ -0,0 +1,10 @@ +USB_VID = 0x1209 +USB_PID = 0x2031 +USB_PRODUCT = "ES3ink" +USB_MANUFACTURER = "Czech maker" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=16MB diff --git a/ports/espressif/boards/es3ink/pins.c b/ports/espressif/boards/es3ink/pins.c new file mode 100644 index 0000000000..3706eb09a6 --- /dev/null +++ b/ports/espressif/boards/es3ink/pins.c @@ -0,0 +1,87 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_EPD_RESET), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_EPD_BUSY), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_EPD_CS), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_EPD_DC), MP_ROM_PTR(&pin_GPIO10) }, + + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { 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_IO47), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, + + { 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_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) } + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/es3ink/sdkconfig b/ports/espressif/boards/es3ink/sdkconfig new file mode 100644 index 0000000000..89d29d8ea9 --- /dev/null +++ b/ports/espressif/boards/es3ink/sdkconfig @@ -0,0 +1,16 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y + +CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +CONFIG_SPIRAM_SIZE=8388608 +CONFIG_SPIRAM_MODE_OCT=y +CONFIG_SPIRAM_SPEED_80M=y + +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 + +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +CONFIG_SPIRAM_USE_MEMMAP=y +CONFIG_SPIRAM_MEMTEST=y + +CONFIG_LWIP_LOCAL_HOSTNAME="es3ink" diff --git a/ports/espressif/esp-idf-config/partitions-4MB-1ota.csv b/ports/espressif/esp-idf-config/partitions-4MB-1ota.csv new file mode 100644 index 0000000000..ab7fa8669d --- /dev/null +++ b/ports/espressif/esp-idf-config/partitions-4MB-1ota.csv @@ -0,0 +1,10 @@ +# ESP-IDF Partition Table +# Name, Type, SubType, Offset, Size, Flags +# bootloader.bin,, 0x1000, 32K +# partition table, 0x8000, 4K + +nvs, data, nvs, 0x9000, 20K, +otadata, data, ota, 0xe000, 8K, +ota_0, app, ota_0, 0x10000, 2816K, +uf2, app, factory,0x2d0000, 256K, +ffat, data, fat, 0x310000, 960K, diff --git a/ports/espressif/esp-idf-config/sdkconfig-4MB-1ota.defaults b/ports/espressif/esp-idf-config/sdkconfig-4MB-1ota.defaults new file mode 100644 index 0000000000..5677b79418 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-4MB-1ota.defaults @@ -0,0 +1,18 @@ +# +# Serial flasher config +# +# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +# end of Serial flasher config + +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-1ota.csv" +# +# Partition Table +# +CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB-1ota.csv" +# end of Partition Table diff --git a/ports/espressif/esp32-camera b/ports/espressif/esp32-camera index 4ff7f348d0..2758089a06 160000 --- a/ports/espressif/esp32-camera +++ b/ports/espressif/esp32-camera @@ -1 +1 @@ -Subproject commit 4ff7f348d0713ea8eca022f73a059b0fe0934531 +Subproject commit 2758089a06ccae79d8fcab6c93e2ca3761646f9f diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 63cea3d0a8..982e3bde36 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -14,11 +14,8 @@ CIRCUITPY_FULL_BUILD ?= 1 CIRCUITPY_ALARM ?= 1 CIRCUITPY_ANALOGBUFIO ?= 1 CIRCUITPY_AUDIOBUSIO ?= 1 -CIRCUITPY_AUDIOBUSIO_I2SOUT ?= 1 CIRCUITPY_AUDIOBUSIO_PDMIN ?= 0 -CIRCUITPY_AUDIOCORE ?= 1 CIRCUITPY_AUDIOIO ?= 0 -CIRCUITPY_AUDIOMIXER ?= 1 CIRCUITPY_AUDIOMP3 ?= 0 CIRCUITPY_BLEIO ?= 1 CIRCUITPY_BLEIO_HCI = 0 diff --git a/ports/espressif/tools/build_memory_info.py b/ports/espressif/tools/build_memory_info.py index a11bef82bc..bbcd3d2df7 100644 --- a/ports/espressif/tools/build_memory_info.py +++ b/ports/espressif/tools/build_memory_info.py @@ -73,7 +73,9 @@ with open(sys.argv[2], "r") as f: ota = None app = None for partition in csv.reader(f): - if partition[0][0] == "#": + if not partition: # empty row + continue + if partition[0].startswith("#"): continue subtype = partition[2].strip() if subtype == "factory": diff --git a/ports/raspberrypi/boards/pajenicko_picopad/board.c b/ports/raspberrypi/boards/pajenicko_picopad/board.c index 0d092a1f4d..e81525d0d8 100644 --- a/ports/raspberrypi/boards/pajenicko_picopad/board.c +++ b/ports/raspberrypi/boards/pajenicko_picopad/board.c @@ -39,7 +39,7 @@ displayio_fourwire_obj_t board_display_obj; uint8_t display_init_sequence[] = { 0x01, 0 | DELAY, 150, // SWRESET - 0x36, 1, 0x68, // MADCTL + 0x36, 1, 0x60, // MADCTL 0x35, 1, 0x00, // TEON 0xB2, 5, 0x0c, 0x0c, 0x00, 0x33, 0x33, // FRMCTR2 0x3A, 1, 0x05, // COLMOD diff --git a/ports/raspberrypi/link.ld b/ports/raspberrypi/link.ld index 0e584c94ac..0e0e7a3c5c 100644 --- a/ports/raspberrypi/link.ld +++ b/ports/raspberrypi/link.ld @@ -211,7 +211,7 @@ SECTIONS _ld_dtcm_data_flash_copy = LOADADDR(.dtcm_data); _ld_dtcm_data_size = SIZEOF(.dtcm_data); - .dtcm_bss : + .dtcm_bss (NOLOAD) : { . = ALIGN(4); diff --git a/ports/stm/supervisor/internal_flash.c b/ports/stm/supervisor/internal_flash.c index f3f9719753..3bbc50ae74 100644 --- a/ports/stm/supervisor/internal_flash.c +++ b/ports/stm/supervisor/internal_flash.c @@ -302,10 +302,9 @@ mp_uint_t supervisor_flash_read_blocks(uint8_t *dest, uint32_t block, uint32_t n uint32_t sector_start_addr; flash_get_sector_info(src, §or_start_addr, §or_size); // Count how many blocks are left in the sector - uint32_t count = (sector_size - (src - sector_start_addr)) / FILESYSTEM_BLOCK_SIZE; - count = MIN(num_blocks, count); + uint32_t blocks_left_in_sector = (sector_size - (src - sector_start_addr)) / FILESYSTEM_BLOCK_SIZE; - if (count < num_blocks && _cache_flash_addr == sector_start_addr) { + if (num_blocks <= blocks_left_in_sector && _cache_flash_addr == sector_start_addr) { // Read is contained in the cache, so just read cache memcpy(dest, (_flash_cache + (src - sector_start_addr)), FILESYSTEM_BLOCK_SIZE * num_blocks); } else { diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index a7f3aa3be5..2f7bd580f6 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -26,6 +26,22 @@ # Boards default to all modules enabled (with exceptions) # Manually disable by overriding in #mpconfigboard.mk +# These Makefile variables are used to implement the "any" and "all" functions. +# Note that these only work when the arguments expand to "0" and/or "1" but not +# if they expand to other values like "yes", "/bin/sh", or "false". +# +# Make's "sort" will transform a mixed sequence of 0s and 1s to "0 1" (because +# it also eliminates duplicates), or a non-mixed sequence of "0" or "1" to just +# itself. Thus, if all the inputs are 1 then the first word will be 1; if any +# of the inputs are 1, then the last word will be 1. +enable-if-any=$(lastword $(sort $(1) 0)) +enable-if-all=$(firstword $(sort $(1) 1)) + +# To use any/all, you "$(call)" it, with the values to test after a comma. +# Usually the values are other $(CIRCUITPY_foo) variables. The definition +# of CIRCUITPY_AUDIOCORE and CIRCUITPY_AUDIOMP3 below are typical of how +# any/all are expected to be used. + # Always on. Present here to help generate documentation module support matrix for "builtins". CIRCUITPY = 1 CFLAGS += -DCIRCUITPY=$(CIRCUITPY) @@ -95,16 +111,10 @@ CFLAGS += -DCIRCUITPY_AUDIOIO=$(CIRCUITPY_AUDIOIO) CIRCUITPY_AUDIOPWMIO ?= 0 CFLAGS += -DCIRCUITPY_AUDIOPWMIO=$(CIRCUITPY_AUDIOPWMIO) -ifndef CIRCUITPY_AUDIOCORE -ifeq ($(CIRCUITPY_AUDIOPWMIO),1) -CIRCUITPY_AUDIOCORE = $(CIRCUITPY_AUDIOPWMIO) -else -CIRCUITPY_AUDIOCORE = $(CIRCUITPY_AUDIOIO) -endif -endif +CIRCUITPY_AUDIOCORE ?= $(call enable-if-any,$(CIRCUITPY_AUDIOPWMIO) $(CIRCUITPY_AUDIOIO) $(CIRCUITPY_AUDIOBUSIO)) CFLAGS += -DCIRCUITPY_AUDIOCORE=$(CIRCUITPY_AUDIOCORE) -CIRCUITPY_AUDIOMIXER ?= $(CIRCUITPY_AUDIOIO) +CIRCUITPY_AUDIOMIXER ?= $(CIRCUITPY_AUDIOCORE) CFLAGS += -DCIRCUITPY_AUDIOMIXER=$(CIRCUITPY_AUDIOMIXER) ifndef CIRCUITPY_AUDIOCORE_DEBUG @@ -112,13 +122,7 @@ CIRCUITPY_AUDIOCORE_DEBUG ?= 0 endif CFLAGS += -DCIRCUITPY_AUDIOCORE_DEBUG=$(CIRCUITPY_AUDIOCORE_DEBUG) -ifndef CIRCUITPY_AUDIOMP3 -ifeq ($(CIRCUITPY_FULL_BUILD),1) -CIRCUITPY_AUDIOMP3 = $(CIRCUITPY_AUDIOCORE) -else -CIRCUITPY_AUDIOMP3 = 0 -endif -endif +CIRCUITPY_AUDIOMP3 ?= $(call enable-if-all,$(CIRCUITPY_FULL_BUILD) $(CIRCUITPY_AUDIOCORE)) CFLAGS += -DCIRCUITPY_AUDIOMP3=$(CIRCUITPY_AUDIOMP3) CIRCUITPY_BINASCII ?= $(CIRCUITPY_FULL_BUILD) @@ -200,15 +204,9 @@ endif CFLAGS += -DCIRCUITPY_PARALLELDISPLAY=$(CIRCUITPY_PARALLELDISPLAY) # bitmaptools and framebufferio rely on displayio -ifeq ($(CIRCUITPY_DISPLAYIO),1) -CIRCUITPY_BITMAPTOOLS ?= $(CIRCUITPY_FULL_BUILD) -CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD) -CIRCUITPY_VECTORIO ?= 1 -else -CIRCUITPY_BITMAPTOOLS ?= 0 -CIRCUITPY_FRAMEBUFFERIO ?= 0 -CIRCUITPY_VECTORIO ?= 0 -endif +CIRCUITPY_BITMAPTOOLS ?= $(call enable-if-all,$(CIRCUITPY_FULL_BUILD) $(CIRCUITPY_DISPLAYIO)) +CIRCUITPY_FRAMEBUFFERIO ?= $(call enable-if-all,$(CIRCUITPY_FULL_BUILD) $(CIRCUITPY_DISPLAYIO)) +CIRCUITPY_VECTORIO ?= $(CIRCUITPY_DISPLAYIO) CFLAGS += -DCIRCUITPY_BITMAPTOOLS=$(CIRCUITPY_BITMAPTOOLS) CFLAGS += -DCIRCUITPY_FRAMEBUFFERIO=$(CIRCUITPY_FRAMEBUFFERIO) CFLAGS += -DCIRCUITPY_VECTORIO=$(CIRCUITPY_VECTORIO) @@ -255,12 +253,7 @@ CFLAGS += -DCIRCUITPY_FUTURE=$(CIRCUITPY_FUTURE) CIRCUITPY_GETPASS ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_GETPASS=$(CIRCUITPY_GETPASS) -ifeq ($(CIRCUITPY_DISPLAYIO),1) -#CIRCUITPY_GIFIO ?= $(CIRCUITPY_CAMERA) -CIRCUITPY_GIFIO ?= 1 -else -CIRCUITPY_GIFIO ?= 0 -endif +CIRCUITPY_GIFIO ?= $(CIRCUITPY_DISPLAYIO) CFLAGS += -DCIRCUITPY_GIFIO=$(CIRCUITPY_GIFIO) CIRCUITPY_GNSS ?= 0 @@ -468,9 +461,7 @@ CFLAGS += -DCIRCUITPY_SYS=$(CIRCUITPY_SYS) CIRCUITPY_TERMINALIO ?= $(CIRCUITPY_DISPLAYIO) CFLAGS += -DCIRCUITPY_TERMINALIO=$(CIRCUITPY_TERMINALIO) -ifeq ($(CIRCUITPY_DISPLAYIO),1) -CIRCUITPY_FONTIO ?= $(CIRCUITPY_TERMINALIO) -endif +CIRCUITPY_FONTIO ?= $(call enable-if-all,$(CIRCUITPY_DISPLAYIO) $(CIRCUITPY_TERMINALIO)) CFLAGS += -DCIRCUITPY_FONTIO=$(CIRCUITPY_FONTIO) CIRCUITPY_TIME ?= 1 diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 5139a55645..2eb966ef8d 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -949,37 +949,37 @@ STATIC mp_obj_t bitmaptools_obj_draw_circle(size_t n_args, const mp_obj_t *pos_a MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_circle_obj, 0, bitmaptools_obj_draw_circle); -//| def blit( -//| dest_bitmap: displayio.Bitmap, -//| source_bitmap: displayio.Bitmap, -//| x: int, -//| y: int, -//| *, -//| x1: int, -//| y1: int, -//| x2: int, -//| y2: int, -//| skip_source_index: int, -//| skip_dest_index: int -//| ) -> None: -//| """Inserts the source_bitmap region defined by rectangular boundaries -//| (x1,y1) and (x2,y2) into the bitmap at the specified (x,y) location. +//| def blit( +//| dest_bitmap: displayio.Bitmap, +//| source_bitmap: displayio.Bitmap, +//| x: int, +//| y: int, +//| *, +//| x1: int, +//| y1: int, +//| x2: int, +//| y2: int, +//| skip_source_index: int, +//| skip_dest_index: int +//| ) -> None: +//| """Inserts the source_bitmap region defined by rectangular boundaries +//| (x1,y1) and (x2,y2) into the bitmap at the specified (x,y) location. //| -//| :param bitmap dest_bitmap: Destination bitmap that the area will be copied into. -//| :param bitmap source_bitmap: Source bitmap that contains the graphical region to be copied -//| :param int x: Horizontal pixel location in bitmap where source_bitmap upper-left -//| corner will be placed -//| :param int y: Vertical pixel location in bitmap where source_bitmap upper-left -//| corner will be placed -//| :param int x1: Minimum x-value for rectangular bounding box to be copied from the source bitmap -//| :param int y1: Minimum y-value for rectangular bounding box to be copied from the source bitmap -//| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be copied from the source bitmap -//| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be copied from the source bitmap -//| :param int skip_source_index: bitmap palette index in the source that will not be copied, -//| set to None to copy all pixels -//| :param int skip_dest_index: bitmap palette index in the destination bitmap that will not get overwritten -//| by the pixels from the source""" -//| ... +//| :param bitmap dest_bitmap: Destination bitmap that the area will be copied into. +//| :param bitmap source_bitmap: Source bitmap that contains the graphical region to be copied +//| :param int x: Horizontal pixel location in bitmap where source_bitmap upper-left +//| corner will be placed +//| :param int y: Vertical pixel location in bitmap where source_bitmap upper-left +//| corner will be placed +//| :param int x1: Minimum x-value for rectangular bounding box to be copied from the source bitmap +//| :param int y1: Minimum y-value for rectangular bounding box to be copied from the source bitmap +//| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be copied from the source bitmap +//| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be copied from the source bitmap +//| :param int skip_source_index: bitmap palette index in the source that will not be copied, +//| set to None to copy all pixels +//| :param int skip_dest_index: bitmap palette index in the destination bitmap that will not get overwritten +//| by the pixels from the source""" +//| ... //| STATIC mp_obj_t bitmaptools_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum {ARG_destination, ARG_source, ARG_x, ARG_y, ARG_x1, ARG_y1, ARG_x2, ARG_y2, ARG_skip_source_index, ARG_skip_dest_index}; diff --git a/shared-bindings/usb/core/Device.c b/shared-bindings/usb/core/Device.c index d5525431a3..7af131cde7 100644 --- a/shared-bindings/usb/core/Device.c +++ b/shared-bindings/usb/core/Device.c @@ -123,7 +123,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_manufacturer_obj, usb_core_device_ MP_PROPERTY_GETTER(usb_core_device_manufacturer_obj, (mp_obj_t)&usb_core_device_get_manufacturer_obj); -//| def set_configuration(self, configuration=None): +//| def set_configuration(self, configuration=1): //| """Set the active configuration. //| //| The configuration parameter is the bConfigurationValue field of the @@ -136,7 +136,7 @@ MP_PROPERTY_GETTER(usb_core_device_manufacturer_obj, STATIC mp_obj_t usb_core_device_set_configuration(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_configuration }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_configuration, MP_ARG_INT, {.u_int = 0x100} }, + { MP_QSTR_configuration, MP_ARG_INT, {.u_int = 1} }, }; usb_core_device_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index e9431dee14..f01cca781e 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -386,5 +386,5 @@ primary_display_bus_t *allocate_display_bus_or_raise(void) { if (result) { return result; } - mp_raise_RuntimeError(translate("Too many display busses")); + mp_raise_RuntimeError(translate("Too many display busses; forgot displayio.release_displays() ?")); } diff --git a/shared-module/usb/core/Device.c b/shared-module/usb/core/Device.c index faed49e383..b6f7a57676 100644 --- a/shared-module/usb/core/Device.c +++ b/shared-module/usb/core/Device.c @@ -51,6 +51,10 @@ void tuh_umount_cb(uint8_t dev_addr) { STATIC xfer_result_t _xfer_result; STATIC size_t _actual_len; bool common_hal_usb_core_device_construct(usb_core_device_obj_t *self, uint8_t device_number) { + if (!tuh_inited()) { + mp_raise_RuntimeError(translate("No usb host port initialized")); + } + if (device_number == 0 || device_number > CFG_TUH_DEVICE_MAX + CFG_TUH_HUB) { return false; } @@ -132,13 +136,23 @@ mp_obj_t common_hal_usb_core_device_get_manufacturer(usb_core_device_obj_t *self } void common_hal_usb_core_device_set_configuration(usb_core_device_obj_t *self, mp_int_t configuration) { - if (configuration == 0x100) { - tusb_desc_configuration_t desc; - if (!tuh_descriptor_get_configuration(self->device_number, 0, &desc, sizeof(desc), _transfer_done_cb, 0) || - !_wait_for_callback()) { - return; - } - configuration = desc.bConfigurationValue; + // We assume that the config index is one less than the value. + uint8_t config_index = configuration - 1; + // Get the configuration descriptor and cache it. We'll use it later to open + // endpoints. + + // Get only the config descriptor first. + tusb_desc_configuration_t desc; + if (!tuh_descriptor_get_configuration(self->device_number, config_index, &desc, sizeof(desc), _transfer_done_cb, 0) || + !_wait_for_callback()) { + return; + } + + // Get the config descriptor plus interfaces and endpoints. + self->configuration_descriptor = m_realloc(self->configuration_descriptor, desc.wTotalLength); + if (!tuh_descriptor_get_configuration(self->device_number, config_index, self->configuration_descriptor, desc.wTotalLength, _transfer_done_cb, 0) || + !_wait_for_callback()) { + return; } tuh_configuration_set(self->device_number, configuration, _transfer_done_cb, 0); _wait_for_callback(); @@ -159,6 +173,7 @@ STATIC size_t _xfer(tuh_xfer_t *xfer, mp_int_t timeout) { RUN_BACKGROUND_TASKS; } if (mp_hal_is_interrupted()) { + tuh_edpt_abort_xfer(xfer->daddr, xfer->ep_addr); return 0; } xfer_result_t result = _xfer_result; @@ -167,6 +182,7 @@ STATIC size_t _xfer(tuh_xfer_t *xfer, mp_int_t timeout) { mp_raise_usb_core_USBError(translate("Pipe error")); } if (result == 0xff) { + tuh_edpt_abort_xfer(xfer->daddr, xfer->ep_addr); mp_raise_usb_core_USBTimeoutError(); } if (result == XFER_RESULT_SUCCESS) { @@ -191,17 +207,13 @@ STATIC bool _open_endpoint(usb_core_device_obj_t *self, mp_int_t endpoint) { return true; } - // Fetch the full configuration descriptor and search for the endpoint's descriptor. - uint8_t desc_buf[128]; - if (!tuh_descriptor_get_configuration(self->device_number, self->configuration_index, &desc_buf, sizeof(desc_buf), _transfer_done_cb, 0) || - !_wait_for_callback()) { - return false; + if (self->configuration_descriptor == NULL) { + mp_raise_usb_core_USBError(translate("No configuration set")); } - tusb_desc_configuration_t *desc_cfg = (tusb_desc_configuration_t *)desc_buf; + + tusb_desc_configuration_t *desc_cfg = (tusb_desc_configuration_t *)self->configuration_descriptor; uint32_t total_length = tu_le16toh(desc_cfg->wTotalLength); - // Cap to the buffer size we requested. - total_length = MIN(total_length, sizeof(desc_buf)); uint8_t const *desc_end = ((uint8_t const *)desc_cfg) + total_length; uint8_t const *p_desc = tu_desc_next(desc_cfg); @@ -287,6 +299,7 @@ mp_int_t common_hal_usb_core_device_ctrl_transfer(usb_core_device_obj_t *self, RUN_BACKGROUND_TASKS; } if (mp_hal_is_interrupted()) { + tuh_edpt_abort_xfer(xfer.daddr, xfer.ep_addr); return 0; } xfer_result_t result = _xfer_result; @@ -295,6 +308,7 @@ mp_int_t common_hal_usb_core_device_ctrl_transfer(usb_core_device_obj_t *self, mp_raise_usb_core_USBError(translate("Pipe error")); } if (result == 0xff) { + tuh_edpt_abort_xfer(xfer.daddr, xfer.ep_addr); mp_raise_usb_core_USBTimeoutError(); } if (result == XFER_RESULT_SUCCESS) { diff --git a/shared-module/usb/core/Device.h b/shared-module/usb/core/Device.h index bb32cb5766..b68a015f7a 100644 --- a/shared-module/usb/core/Device.h +++ b/shared-module/usb/core/Device.h @@ -32,7 +32,8 @@ typedef struct { mp_obj_base_t base; uint8_t device_number; - uint8_t configuration_index; // not number + uint8_t configuration_index; // not bConfigurationValue + uint8_t *configuration_descriptor; // Contains the length of the all descriptors. uint8_t open_endpoints[8]; } usb_core_device_obj_t; diff --git a/tools/check_translations.py b/tools/check_translations.py index 95776a5449..19bfa8afb0 100644 --- a/tools/check_translations.py +++ b/tools/check_translations.py @@ -22,7 +22,9 @@ for po_filename in po_filenames: missing = all_ids - po_ids if missing: - print("Missing message id. Please run `make translate`") + print( + "Missing message id. Please run `make translate` and then `git commit locale/circuitpython.pot`" + ) print(missing) sys.exit(-1) else: