Merge branch 'adafruit:main' into samd-sleep

This commit is contained in:
Max Holliday 2021-10-21 09:52:55 -07:00 committed by GitHub
commit e74a8e38fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
462 changed files with 4607 additions and 1803 deletions

View File

@ -145,6 +145,10 @@ jobs:
run: | run: |
git describe --dirty --tags git describe --dirty --tags
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags) echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies - name: Install dependencies
run: | run: |
brew install gettext brew install gettext

6
.gitmodules vendored
View File

@ -4,17 +4,13 @@
[submodule "lib/axtls"] [submodule "lib/axtls"]
path = lib/axtls path = lib/axtls
url = https://github.com/pfalcon/axtls url = https://github.com/micropython/axtls.git
branch = micropython
[submodule "lib/libffi"] [submodule "lib/libffi"]
path = lib/libffi path = lib/libffi
url = https://github.com/atgreen/libffi url = https://github.com/atgreen/libffi
[submodule "lib/berkeley-db-1.xx"] [submodule "lib/berkeley-db-1.xx"]
path = lib/berkeley-db-1.xx path = lib/berkeley-db-1.xx
url = https://github.com/pfalcon/berkeley-db-1.xx url = https://github.com/pfalcon/berkeley-db-1.xx
[submodule "lib/uzlib"]
path = lib/uzlib
url = https://github.com/pfalcon/uzlib
[submodule "tools/uf2"] [submodule "tools/uf2"]
path = tools/uf2 path = tools/uf2
url = https://github.com/Microsoft/uf2.git url = https://github.com/Microsoft/uf2.git

64
LICENSE
View File

@ -19,3 +19,67 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
--------------------------------------------------------------------------------
Unless specified otherwise (see below), the above license and copyright applies
to all files in this repository.
Individual files may include additional copyright holders.
The various ports of MicroPython may include third-party software that is
licensed under different terms. These licenses are summarised in the tree
below, please refer to these files and directories for further license and
copyright information. Note that (L)GPL-licensed code listed below is only
used during the build process and is not part of the compiled source code.
/ (MIT)
/drivers
/cc3000 (BSD-3-clause)
/cc3100 (BSD-3-clause)
/wiznet5k (BSD-3-clause)
/lib
/asf4 (Apache-2.0)
/axtls (BSD-3-clause)
/config
/scripts
/config (GPL-2.0-or-later)
/Rules.mak (GPL-2.0)
/berkeley-db-1xx (BSD-4-clause)
/btstack (See btstack/LICENSE)
/cmsis (BSD-3-clause)
/crypto-algorithms (NONE)
/libhydrogen (ISC)
/littlefs (BSD-3-clause)
/lwip (BSD-3-clause)
/mynewt-nimble (Apache-2.0)
/nrfx (BSD-3-clause)
/nxp_driver (BSD-3-Clause)
/oofatfs (BSD-1-clause)
/pico-sdk (BSD-3-clause)
/re15 (BSD-3-clause)
/stm32lib (BSD-3-clause)
/tinytest (BSD-3-clause)
/tinyusb (MIT)
/uzlib (Zlib)
/logo (uses OFL-1.1)
/ports
/cc3200
/hal (BSD-3-clause)
/simplelink (BSD-3-clause)
/FreeRTOS (GPL-2.0 with FreeRTOS exception)
/stm32
/usbd*.c (MCD-ST Liberty SW License Agreement V2)
/stm32_it.* (MIT + BSD-3-clause)
/system_stm32*.c (MIT + BSD-3-clause)
/boards
/startup_stm32*.s (BSD-3-clause)
/*/stm32*.h (BSD-3-clause)
/usbdev (MCD-ST Liberty SW License Agreement V2)
/usbhost (MCD-ST Liberty SW License Agreement V2)
/teensy
/core (PJRC.COM)
/zephyr
/src (Apache-2.0)
/tools
/dfu.py (LGPL-3.0-only)

View File

@ -209,6 +209,7 @@ exclude_patterns = ["**/build*",
"ports/stm/ref", "ports/stm/ref",
"ports/unix", "ports/unix",
"py", "py",
"shared/*",
"shared-bindings/util.*", "shared-bindings/util.*",
"shared-module", "shared-module",
"supervisor", "supervisor",

View File

@ -27,7 +27,7 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include "lib/utils/interrupt_char.h" #include "shared/runtime/interrupt_char.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "py/stream.h" #include "py/stream.h"

View File

@ -32,7 +32,7 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include "lib/utils/interrupt_char.h" #include "shared/runtime/interrupt_char.h"
#include "py/gc.h" #include "py/gc.h"
#include "py/objlist.h" #include "py/objlist.h"
#include "py/objstr.h" #include "py/objstr.h"

View File

@ -27,7 +27,7 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include "lib/utils/interrupt_char.h" #include "shared/runtime/interrupt_char.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "py/stream.h" #include "py/stream.h"

View File

@ -13,12 +13,9 @@ Building the documentation locally
If you're making changes to the documentation, you should build the If you're making changes to the documentation, you should build the
documentation locally so that you can preview your changes. documentation locally so that you can preview your changes.
Install Sphinx, recommonmark, and optionally (for the RTD-styling), sphinx_rtd_theme, Install the necessary packages, preferably in a virtualenv, in `circuitpython/`:
preferably in a virtualenv:
pip install sphinx pip install -r requirements-doc.txt
pip install recommonmark
pip install sphinx_rtd_theme
In `circuitpython/`, build the docs: In `circuitpython/`, build the docs:

View File

@ -222,6 +222,14 @@ TCP stream connections
This is a coroutine, and a MicroPython extension. This is a coroutine, and a MicroPython extension.
.. method:: Stream.readexactly(n)
Read exactly *n* bytes and return them as a bytes object.
Raises an ``EOFError`` exception if the stream ends before reading *n* bytes.
This is a coroutine.
.. method:: Stream.readline() .. method:: Stream.readline()
Read a line and return it. Read a line and return it.

View File

@ -24,7 +24,7 @@ Example::
# First, we need to open a stream which holds a database # First, we need to open a stream which holds a database
# This is usually a file, but can be in-memory database # This is usually a file, but can be in-memory database
# using uio.BytesIO, a raw flash partition, etc. # using io.BytesIO, a raw flash partition, etc.
# Oftentimes, you want to create a database file if it doesn't # Oftentimes, you want to create a database file if it doesn't
# exist and open if it exists. Idiom below takes care of this. # exist and open if it exists. Idiom below takes care of this.
# DO NOT open database with "a+b" access mode. # DO NOT open database with "a+b" access mode.

View File

@ -1,5 +1,5 @@
Builtin functions and exceptions :mod:`builtins` -- builtin functions and exceptions
================================ ===================================================
All builtin functions and exceptions are described here. They are also All builtin functions and exceptions are described here. They are also
available via ``builtins`` module. available via ``builtins`` module.

View File

@ -1,8 +1,6 @@
:mod:`uctypes` -- access binary data in a structured way :mod:`uctypes` -- access binary data in a structured way
======================================================== ========================================================
.. include:: ../templates/unsupported_in_circuitpython.inc
.. module:: uctypes .. module:: uctypes
:synopsis: access binary data in a structured way :synopsis: access binary data in a structured way

View File

@ -105,16 +105,23 @@ Other methods
Shift the contents of the FrameBuffer by the given vector. This may Shift the contents of the FrameBuffer by the given vector. This may
leave a footprint of the previous colors in the FrameBuffer. leave a footprint of the previous colors in the FrameBuffer.
.. method:: FrameBuffer.blit(fbuf, x, y[, key]) .. method:: FrameBuffer.blit(fbuf, x, y, key=-1, palette=None)
Draw another FrameBuffer on top of the current one at the given coordinates. Draw another FrameBuffer on top of the current one at the given coordinates.
If *key* is specified then it should be a color integer and the If *key* is specified then it should be a color integer and the
corresponding color will be considered transparent: all pixels with that corresponding color will be considered transparent: all pixels with that
color value will not be drawn. color value will not be drawn.
This method works between FrameBuffer instances utilising different formats, The *palette* argument enables blitting between FrameBuffers with differing
but the resulting colors may be unexpected due to the mismatch in color formats. Typical usage is to render a monochrome or grayscale glyph/icon to
formats. a color display. The *palette* is a FrameBuffer instance whose format is
that of the current FrameBuffer. The *palette* height is one pixel and its
pixel width is the number of colors in the source FrameBuffer. The *palette*
for an N-bit source needs 2**N pixels; the *palette* for a monochrome source
would have 2 pixels representing background and foreground colors. The
application assigns a color to each pixel in the *palette*. The color of the
current pixel will be that of that *palette* pixel whose x position is the
color of the corresponding source pixel.
Constants Constants
--------- ---------

View File

@ -1,9 +1,9 @@
:mod:`uheapq` -- heap queue algorithm :mod:`heapq` -- heap queue algorithm
===================================== ====================================
.. include:: ../templates/unsupported_in_circuitpython.inc .. include:: ../templates/unsupported_in_circuitpython.inc
.. module:: uheapq .. module:: heapq
:synopsis: heap queue algorithm :synopsis: heap queue algorithm
|see_cpython_module| :mod:`cpython:heapq`. |see_cpython_module| :mod:`cpython:heapq`.

View File

@ -18,15 +18,14 @@ These libraries are not enabled on CircuitPython builds with
limited flash memory, usually on non-Express builds: limited flash memory, usually on non-Express builds:
``binascii``, ``errno``, ``json``, ``re``. ``binascii``, ``errno``, ``json``, ``re``.
These libraries are not currently enabled in any CircuitPython build, but may be in the future, These libraries are not currently enabled in any CircuitPython build, but may be in the future:
with the ``u`` prefix dropped: ``ctypes``, ``hashlib``, ``zlib``.
``uctypes``, ``uhashlib``, ``uzlib``.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
builtins.rst builtins.rst
uheapq.rst heapq.rst
array.rst array.rst
binascii.rst binascii.rst
collections.rst collections.rst
@ -37,10 +36,10 @@ with the ``u`` prefix dropped:
json.rst json.rst
re.rst re.rst
sys.rst sys.rst
uasyncio.rst asyncio.rst
uctypes.rst ctypes.rst
uselect.rst select.rst
uzlib.rst zlib.rst
Omitted functions in the ``string`` library Omitted functions in the ``string`` library
------------------------------------------- -------------------------------------------

View File

@ -1,9 +1,9 @@
:mod:`uselect` -- wait for events on a set of streams :mod:`select` -- wait for events on a set of streams
======================================================================== ====================================================
.. include:: ../templates/unsupported_in_circuitpython.inc .. include:: ../templates/unsupported_in_circuitpython.inc
.. module:: uselect .. module:: select
:synopsis: wait for events on a set of streams :synopsis: wait for events on a set of streams
|see_cpython_module| :mod:`cpython:select`. |see_cpython_module| :mod:`cpython:select`.
@ -37,15 +37,15 @@ Methods
Register ``stream`` *obj* for polling. *eventmask* is logical OR of: Register ``stream`` *obj* for polling. *eventmask* is logical OR of:
* ``uselect.POLLIN`` - data available for reading * ``select.POLLIN`` - data available for reading
* ``uselect.POLLOUT`` - more data can be written * ``select.POLLOUT`` - more data can be written
Note that flags like ``uselect.POLLHUP`` and ``uselect.POLLERR`` are Note that flags like ``select.POLLHUP`` and ``select.POLLERR`` are
*not* valid as input eventmask (these are unsolicited events which *not* valid as input eventmask (these are unsolicited events which
will be returned from `poll()` regardless of whether they are asked will be returned from `poll()` regardless of whether they are asked
for). This semantics is per POSIX. for). This semantics is per POSIX.
*eventmask* defaults to ``uselect.POLLIN | uselect.POLLOUT``. *eventmask* defaults to ``select.POLLIN | select.POLLOUT``.
It is OK to call this function multiple times for the same *obj*. It is OK to call this function multiple times for the same *obj*.
Successive calls will update *obj*'s eventmask to the value of Successive calls will update *obj*'s eventmask to the value of
@ -69,8 +69,8 @@ Methods
Returns list of (``obj``, ``event``, ...) tuples. There may be other elements in Returns list of (``obj``, ``event``, ...) tuples. There may be other elements in
tuple, depending on a platform and version, so don't assume that its size is 2. tuple, depending on a platform and version, so don't assume that its size is 2.
The ``event`` element specifies which events happened with a stream and The ``event`` element specifies which events happened with a stream and
is a combination of ``uselect.POLL*`` constants described above. Note that is a combination of ``select.POLL*`` constants described above. Note that
flags ``uselect.POLLHUP`` and ``uselect.POLLERR`` can be returned at any time flags ``select.POLLHUP`` and ``select.POLLERR`` can be returned at any time
(even if were not asked for), and must be acted on accordingly (the (even if were not asked for), and must be acted on accordingly (the
corresponding stream unregistered from poll and likely closed), because corresponding stream unregistered from poll and likely closed), because
otherwise all further invocations of `poll()` may return immediately with otherwise all further invocations of `poll()` may return immediately with

View File

@ -1,9 +1,9 @@
:mod:`uzlib` -- zlib decompression :mod:`zlib` -- zlib decompression
================================== =================================
.. include:: ../templates/unsupported_in_circuitpython.inc .. include:: ../templates/unsupported_in_circuitpython.inc
.. module:: uzlib .. module:: zlib
:synopsis: zlib decompression :synopsis: zlib decompression
|see_cpython_module| :mod:`cpython:zlib`. |see_cpython_module| :mod:`cpython:zlib`.

View File

@ -18,7 +18,7 @@ void *memmove(void *dest, const void *src, size_t n) {
} }
void *malloc(size_t n) { void *malloc(size_t n) {
void *ptr = m_malloc(n, false); void *ptr = m_malloc(n);
return ptr; return ptr;
} }
void *realloc(void *ptr, size_t n) { void *realloc(void *ptr, size_t n) {
@ -26,7 +26,7 @@ void *realloc(void *ptr, size_t n) {
return NULL; return NULL;
} }
void *calloc(size_t n, size_t m) { void *calloc(size_t n, size_t m) {
void *ptr = m_malloc(n * m, false); void *ptr = m_malloc(n * m);
// memory already cleared by conservative GC // memory already cleared by conservative GC
return ptr; return ptr;
} }

View File

@ -46,7 +46,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(add_d_obj, add_d);
// to use but has access to the globals dict of the module via self->globals. // to use but has access to the globals dict of the module via self->globals.
STATIC mp_obj_t productf(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *args) { STATIC mp_obj_t productf(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *args) {
// Check number of arguments is valid // Check number of arguments is valid
mp_arg_check_num_mp(n_args, n_kw, 1, 1, false); mp_arg_check_num(n_args, n_kw, 1, 1, false);
// Extract buffer pointer and verify typecode // Extract buffer pointer and verify typecode
mp_buffer_info_t bufinfo; mp_buffer_info_t bufinfo;

View File

@ -31,4 +31,7 @@ const mp_obj_module_t example_user_cmodule = {
}; };
// Register the module to make it available in Python. // Register the module to make it available in Python.
MP_REGISTER_MODULE(MP_QSTR_cexample, example_user_cmodule, MODULE_CEXAMPLE_ENABLED); // Note: the "1" in the third argument means this module is always enabled.
// This "1" can be optionally replaced with a macro like MODULE_CEXAMPLE_ENABLED
// which can then be used to conditionally enable this module.
MP_REGISTER_MODULE(MP_QSTR_cexample, example_user_cmodule, 1);

View File

@ -0,0 +1,15 @@
# Create an INTERFACE library for our C module.
add_library(usermod_cexample INTERFACE)
# Add our source files to the lib
target_sources(usermod_cexample INTERFACE
${CMAKE_CURRENT_LIST_DIR}/examplemodule.c
)
# Add the current directory as an include directory.
target_include_directories(usermod_cexample INTERFACE
${CMAKE_CURRENT_LIST_DIR}
)
# Link our INTERFACE library to the usermod target.
target_link_libraries(usermod INTERFACE usermod_cexample)

View File

@ -22,4 +22,7 @@ const mp_obj_module_t cppexample_user_cmodule = {
}; };
// Register the module to make it available in Python. // Register the module to make it available in Python.
MP_REGISTER_MODULE(MP_QSTR_cppexample, cppexample_user_cmodule, MODULE_CPPEXAMPLE_ENABLED); // Note: the "1" in the third argument means this module is always enabled.
// This "1" can be optionally replaced with a macro like MODULE_CPPEXAMPLE_ENABLED
// which can then be used to conditionally enable this module.
MP_REGISTER_MODULE(MP_QSTR_cppexample, cppexample_user_cmodule, 1);

View File

@ -0,0 +1,16 @@
# Create an INTERFACE library for our CPP module.
add_library(usermod_cppexample INTERFACE)
# Add our source files to the library.
target_sources(usermod_cppexample INTERFACE
${CMAKE_CURRENT_LIST_DIR}/example.cpp
${CMAKE_CURRENT_LIST_DIR}/examplemodule.c
)
# Add the current directory as an include directory.
target_include_directories(usermod_cppexample INTERFACE
${CMAKE_CURRENT_LIST_DIR}
)
# Link our INTERFACE library to the usermod target.
target_link_libraries(usermod INTERFACE usermod_cppexample)

View File

@ -0,0 +1,10 @@
# This top-level micropython.cmake is responsible for listing
# the individual modules we want to include.
# Paths are absolute, and ${CMAKE_CURRENT_LIST_DIR} can be
# used to prefix subdirectories.
# Add the C example.
include(${CMAKE_CURRENT_LIST_DIR}/cexample/micropython.cmake)
# Add the CPP example.
include(${CMAKE_CURRENT_LIST_DIR}/cppexample/micropython.cmake)

View File

@ -0,0 +1,55 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef AXTLS_OS_PORT_H
#define AXTLS_OS_PORT_H
#include <errno.h>
#include "py/stream.h"
#include "lib/crypto-algorithms/sha256.h"
#define SSL_CTX_MUTEX_INIT(mutex)
#define SSL_CTX_MUTEX_DESTROY(mutex)
#define SSL_CTX_LOCK(mutex)
#define SSL_CTX_UNLOCK(mutex)
#define SOCKET_READ(s, buf, size) mp_stream_posix_read((void *)s, buf, size)
#define SOCKET_WRITE(s, buf, size) mp_stream_posix_write((void *)s, buf, size)
#define SOCKET_CLOSE(A) UNUSED
#define SOCKET_ERRNO() errno
#define SHA256_CTX CRYAL_SHA256_CTX
#define SHA256_Init(ctx) sha256_init(ctx)
#define SHA256_Update(ctx, buf, size) sha256_update(ctx, buf, size)
#define SHA256_Final(hash, ctx) sha256_final(ctx, hash)
#define TTY_FLUSH()
#ifdef WDEV_HWRNG
// For esp8266 port: use the hardware RNG.
#define PLATFORM_RNG_U8() (*WDEV_HWRNG)
#endif
#endif // AXTLS_OS_PORT_H

View File

@ -4,8 +4,9 @@ set(MICROPY_EXTMOD_DIR "${MICROPY_DIR}/extmod")
set(MICROPY_OOFATFS_DIR "${MICROPY_DIR}/lib/oofatfs") set(MICROPY_OOFATFS_DIR "${MICROPY_DIR}/lib/oofatfs")
set(MICROPY_SOURCE_EXTMOD set(MICROPY_SOURCE_EXTMOD
${MICROPY_DIR}/lib/embed/abort_.c ${MICROPY_DIR}/shared/libc/abort_.c
${MICROPY_DIR}/lib/utils/printf.c ${MICROPY_DIR}/shared/libc/printf.c
${MICROPY_EXTMOD_DIR}/machine_bitstream.c
${MICROPY_EXTMOD_DIR}/machine_i2c.c ${MICROPY_EXTMOD_DIR}/machine_i2c.c
${MICROPY_EXTMOD_DIR}/machine_mem.c ${MICROPY_EXTMOD_DIR}/machine_mem.c
${MICROPY_EXTMOD_DIR}/machine_pulse.c ${MICROPY_EXTMOD_DIR}/machine_pulse.c

View File

@ -157,7 +157,7 @@ LWIP_DIR = lib/lwip/src
INC += -I$(TOP)/$(LWIP_DIR)/include INC += -I$(TOP)/$(LWIP_DIR)/include
CFLAGS_MOD += -DMICROPY_PY_LWIP=1 CFLAGS_MOD += -DMICROPY_PY_LWIP=1
$(BUILD)/$(LWIP_DIR)/core/ipv4/dhcp.o: CFLAGS_MOD += -Wno-address $(BUILD)/$(LWIP_DIR)/core/ipv4/dhcp.o: CFLAGS_MOD += -Wno-address
SRC_MOD += extmod/modlwip.c lib/netutils/netutils.c SRC_MOD += extmod/modlwip.c shared/netutils/netutils.c
SRC_MOD += $(addprefix $(LWIP_DIR)/,\ SRC_MOD += $(addprefix $(LWIP_DIR)/,\
apps/mdns/mdns.c \ apps/mdns/mdns.c \
core/def.c \ core/def.c \

View File

@ -244,8 +244,8 @@ STATIC void fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, u
formats[fb->format].fill_rect(fb, x, y, xend - x, yend - y, col); formats[fb->format].fill_rect(fb, x, y, xend - x, yend - y, col);
} }
STATIC mp_obj_t framebuf_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t framebuf_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, kw_args, 4, 5, false); mp_arg_check_num(n_args, n_kw, 4, 5, false);
mp_obj_framebuf_t *o = m_new_obj(mp_obj_framebuf_t); mp_obj_framebuf_t *o = m_new_obj(mp_obj_framebuf_t);
o->base.type = type; o->base.type = type;
@ -481,6 +481,10 @@ STATIC mp_obj_t framebuf_blit(size_t n_args, const mp_obj_t *args) {
if (n_args > 4) { if (n_args > 4) {
key = mp_obj_get_int(args[4]); key = mp_obj_get_int(args[4]);
} }
mp_obj_framebuf_t *palette = NULL;
if (n_args > 5 && args[5] != mp_const_none) {
palette = MP_OBJ_TO_PTR(mp_obj_cast_to_native_base(args[5], MP_OBJ_FROM_PTR(&mp_type_framebuf)));
}
if ( if (
(x >= self->width) || (x >= self->width) ||
@ -504,6 +508,9 @@ STATIC mp_obj_t framebuf_blit(size_t n_args, const mp_obj_t *args) {
int cx1 = x1; int cx1 = x1;
for (int cx0 = x0; cx0 < x0end; ++cx0) { for (int cx0 = x0; cx0 < x0end; ++cx0) {
uint32_t col = getpixel(source, cx1, y1); uint32_t col = getpixel(source, cx1, y1);
if (palette) {
col = getpixel(palette, col, 0);
}
if (col != (uint32_t)key) { if (col != (uint32_t)key) {
setpixel(self, cx0, y0, col); setpixel(self, cx0, y0, col);
} }
@ -513,7 +520,7 @@ STATIC mp_obj_t framebuf_blit(size_t n_args, const mp_obj_t *args) {
} }
return mp_const_none; return mp_const_none;
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_blit_obj, 4, 5, framebuf_blit); STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_blit_obj, 4, 6, framebuf_blit);
STATIC mp_obj_t framebuf_scroll(mp_obj_t self_in, mp_obj_t xstep_in, mp_obj_t ystep_in) { STATIC mp_obj_t framebuf_scroll(mp_obj_t self_in, mp_obj_t xstep_in, mp_obj_t ystep_in) {
mp_obj_framebuf_t *self = native_framebuf(self_in); mp_obj_framebuf_t *self = native_framebuf(self_in);

View File

@ -31,6 +31,9 @@
#if MICROPY_PY_UASYNCIO #if MICROPY_PY_UASYNCIO
// Used when task cannot be guaranteed to be non-NULL.
#define TASK_PAIRHEAP(task) ((task) ? &(task)->pairheap : NULL)
#define TASK_STATE_RUNNING_NOT_WAITED_ON (mp_const_true) #define TASK_STATE_RUNNING_NOT_WAITED_ON (mp_const_true)
#define TASK_STATE_DONE_NOT_WAITED_ON (mp_const_none) #define TASK_STATE_DONE_NOT_WAITED_ON (mp_const_none)
#define TASK_STATE_DONE_WAS_WAITED_ON (mp_const_false) #define TASK_STATE_DONE_WAS_WAITED_ON (mp_const_false)
@ -55,7 +58,7 @@ typedef struct _mp_obj_task_queue_t {
STATIC const mp_obj_type_t task_queue_type; STATIC const mp_obj_type_t task_queue_type;
STATIC const mp_obj_type_t task_type; STATIC const mp_obj_type_t task_type;
STATIC mp_obj_t task_queue_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args); STATIC mp_obj_t task_queue_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args);
/******************************************************************************/ /******************************************************************************/
// Ticks for task ordering in pairing heap // Ticks for task ordering in pairing heap
@ -81,9 +84,9 @@ STATIC int task_lt(mp_pairheap_t *n1, mp_pairheap_t *n2) {
/******************************************************************************/ /******************************************************************************/
// TaskQueue class // TaskQueue class
STATIC mp_obj_t task_queue_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t task_queue_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
(void)args; (void)args;
mp_arg_check_num(n_args, kw_args, 0, 0, false); mp_arg_check_num(n_args, n_kw, 0, 0, false);
mp_obj_task_queue_t *self = m_new_obj(mp_obj_task_queue_t); mp_obj_task_queue_t *self = m_new_obj(mp_obj_task_queue_t);
self->base.type = type; self->base.type = type;
self->heap = (mp_obj_task_t *)mp_pairheap_new(task_lt); self->heap = (mp_obj_task_t *)mp_pairheap_new(task_lt);
@ -110,7 +113,7 @@ STATIC mp_obj_t task_queue_push_sorted(size_t n_args, const mp_obj_t *args) {
assert(mp_obj_is_small_int(args[2])); assert(mp_obj_is_small_int(args[2]));
task->ph_key = args[2]; task->ph_key = args[2];
} }
self->heap = (mp_obj_task_t *)mp_pairheap_push(task_lt, &self->heap->pairheap, &task->pairheap); self->heap = (mp_obj_task_t *)mp_pairheap_push(task_lt, TASK_PAIRHEAP(self->heap), TASK_PAIRHEAP(task));
return mp_const_none; return mp_const_none;
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(task_queue_push_sorted_obj, 2, 3, task_queue_push_sorted); STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(task_queue_push_sorted_obj, 2, 3, task_queue_push_sorted);
@ -156,8 +159,8 @@ STATIC const mp_obj_type_t task_queue_type = {
// This is the core uasyncio context with cur_task, _task_queue and CancelledError. // This is the core uasyncio context with cur_task, _task_queue and CancelledError.
STATIC mp_obj_t uasyncio_context = MP_OBJ_NULL; STATIC mp_obj_t uasyncio_context = MP_OBJ_NULL;
STATIC mp_obj_t task_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t task_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, kw_args, 1, 2, false); mp_arg_check_num(n_args, n_kw, 1, 2, false);
mp_obj_task_t *self = m_new_obj(mp_obj_task_t); mp_obj_task_t *self = m_new_obj(mp_obj_task_t);
self->pairheap.base.type = type; self->pairheap.base.type = type;
mp_pairheap_init_node(task_lt, &self->pairheap); mp_pairheap_init_node(task_lt, &self->pairheap);

View File

@ -205,7 +205,7 @@ STATIC mp_obj_t mod_binascii_b2a_base64(mp_obj_t data) {
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_binascii_b2a_base64_obj, mod_binascii_b2a_base64); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_binascii_b2a_base64_obj, mod_binascii_b2a_base64);
#if MICROPY_PY_UBINASCII_CRC32 #if MICROPY_PY_UBINASCII_CRC32
#include "../../lib/uzlib/src/tinf.h" #include "lib/uzlib/tinf.h"
STATIC mp_obj_t mod_binascii_crc32(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t mod_binascii_crc32(size_t n_args, const mp_obj_t *args) {
mp_buffer_info_t bufinfo; mp_buffer_info_t bufinfo;

View File

@ -74,8 +74,8 @@ STATIC NORETURN void syntax_error(void) {
mp_raise_TypeError(MP_ERROR_TEXT("syntax error in uctypes descriptor")); mp_raise_TypeError(MP_ERROR_TEXT("syntax error in uctypes descriptor"));
} }
STATIC mp_obj_t uctypes_struct_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t uctypes_struct_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, kw_args, 2, 3, false); mp_arg_check_num(n_args, n_kw, 2, 3, false);
mp_obj_uctypes_struct_t *o = m_new_obj(mp_obj_uctypes_struct_t); mp_obj_uctypes_struct_t *o = m_new_obj(mp_obj_uctypes_struct_t);
o->base.type = type; o->base.type = type;
o->addr = (void *)(uintptr_t)mp_obj_int_get_truncated(args[0]); o->addr = (void *)(uintptr_t)mp_obj_int_get_truncated(args[0]);

View File

@ -21,7 +21,7 @@
#if MICROPY_SSL_MBEDTLS #if MICROPY_SSL_MBEDTLS
#include "mbedtls/sha256.h" #include "mbedtls/sha256.h"
#else #else
#include "crypto-algorithms/sha256.h" #include "lib/crypto-algorithms/sha256.h"
#endif #endif
#endif #endif
@ -106,11 +106,10 @@ static void check_not_unicode(const mp_obj_t arg) {
} }
#if MICROPY_PY_UHASHLIB_SHA256 #if MICROPY_PY_UHASHLIB_SHA256
#include "crypto-algorithms/sha256.c" #include "lib/crypto-algorithms/sha256.c"
#endif
STATIC mp_obj_t uhashlib_sha256_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t uhashlib_sha256_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, kw_args, 0, 1, false); mp_arg_check_num(n_args, n_kw, 0, 1, false);
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(CRYAL_SHA256_CTX)); mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(CRYAL_SHA256_CTX));
o->base.type = type; o->base.type = type;
o->final = false; o->final = false;
@ -160,6 +159,8 @@ STATIC const mp_obj_type_t uhashlib_sha256_type = {
}; };
#endif #endif
#endif
#if MICROPY_PY_UHASHLIB_SHA1 #if MICROPY_PY_UHASHLIB_SHA1
STATIC mp_obj_t uhashlib_sha1_update(mp_obj_t self_in, mp_obj_t arg); STATIC mp_obj_t uhashlib_sha1_update(mp_obj_t self_in, mp_obj_t arg);

View File

@ -17,6 +17,62 @@
#if MICROPY_PY_UJSON #if MICROPY_PY_UJSON
#if MICROPY_PY_UJSON_SEPARATORS
enum {
DUMP_MODE_TO_STRING = 1,
DUMP_MODE_TO_STREAM = 2,
};
STATIC mp_obj_t mod_ujson_dump_helper(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args, unsigned int mode) {
enum { ARG_separators };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_separators, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_NONE} },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args - mode, pos_args + mode, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
mp_print_ext_t print_ext;
if (args[ARG_separators].u_obj == mp_const_none) {
print_ext.item_separator = ", ";
print_ext.key_separator = ": ";
} else {
mp_obj_t *items;
mp_obj_get_array_fixed_n(args[ARG_separators].u_obj, 2, &items);
print_ext.item_separator = mp_obj_str_get_str(items[0]);
print_ext.key_separator = mp_obj_str_get_str(items[1]);
}
if (mode == DUMP_MODE_TO_STRING) {
// dumps(obj)
vstr_t vstr;
vstr_init_print(&vstr, 8, &print_ext.base);
mp_obj_print_helper(&print_ext.base, pos_args[0], PRINT_JSON);
return mp_obj_new_str_from_vstr(&mp_type_str, &vstr);
} else {
// dump(obj, stream)
print_ext.base.data = MP_OBJ_TO_PTR(pos_args[1]);
print_ext.base.print_strn = mp_stream_write_adaptor;
mp_get_stream_raise(pos_args[1], MP_STREAM_OP_WRITE);
mp_obj_print_helper(&print_ext.base, pos_args[0], PRINT_JSON);
return mp_const_none;
}
}
STATIC mp_obj_t mod_ujson_dump(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
return mod_ujson_dump_helper(n_args, pos_args, kw_args, DUMP_MODE_TO_STREAM);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_ujson_dump_obj, 2, mod_ujson_dump);
STATIC mp_obj_t mod_ujson_dumps(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
return mod_ujson_dump_helper(n_args, pos_args, kw_args, DUMP_MODE_TO_STRING);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_ujson_dumps_obj, 1, mod_ujson_dumps);
#else
STATIC mp_obj_t mod_ujson_dump(mp_obj_t obj, mp_obj_t stream) { STATIC mp_obj_t mod_ujson_dump(mp_obj_t obj, mp_obj_t stream) {
mp_get_stream_raise(stream, MP_STREAM_OP_WRITE); mp_get_stream_raise(stream, MP_STREAM_OP_WRITE);
mp_print_t print = {MP_OBJ_TO_PTR(stream), mp_stream_write_adaptor}; mp_print_t print = {MP_OBJ_TO_PTR(stream), mp_stream_write_adaptor};
@ -33,6 +89,7 @@ STATIC mp_obj_t mod_ujson_dumps(mp_obj_t obj) {
return mp_obj_new_str_from_vstr(&mp_type_str, &vstr); return mp_obj_new_str_from_vstr(&mp_type_str, &vstr);
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_ujson_dumps_obj, mod_ujson_dumps); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_ujson_dumps_obj, mod_ujson_dumps);
#endif
#define JSON_DEBUG(...) (void)0 #define JSON_DEBUG(...) (void)0
// #define JSON_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__) // #define JSON_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)

View File

@ -16,7 +16,7 @@
#define re1_5_stack_chk() MP_STACK_CHECK() #define re1_5_stack_chk() MP_STACK_CHECK()
#include "re1.5/re1.5.h" #include "lib/re1.5/re1.5.h"
#if MICROPY_PY_URE_DEBUG #if MICROPY_PY_URE_DEBUG
#define FLAG_DEBUG 0x1000 #define FLAG_DEBUG 0x1000
@ -49,7 +49,7 @@ STATIC mp_obj_t match_group(mp_obj_t self_in, mp_obj_t no_in) {
mp_obj_match_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_match_t *self = MP_OBJ_TO_PTR(self_in);
mp_int_t no = mp_obj_get_int(no_in); mp_int_t no = mp_obj_get_int(no_in);
if (no < 0 || no >= self->num_matches) { if (no < 0 || no >= self->num_matches) {
mp_raise_arg1(&mp_type_IndexError, no_in); mp_raise_type_arg(&mp_type_IndexError, no_in);
} }
const char *start = self->caps[no * 2]; const char *start = self->caps[no * 2];
@ -88,7 +88,7 @@ STATIC void match_span_helper(size_t n_args, const mp_obj_t *args, mp_obj_t span
if (n_args == 2) { if (n_args == 2) {
no = mp_obj_get_int(args[1]); no = mp_obj_get_int(args[1]);
if (no < 0 || no >= self->num_matches) { if (no < 0 || no >= self->num_matches) {
mp_raise_arg1(&mp_type_IndexError, args[1]); mp_raise_type_arg(&mp_type_IndexError, args[1]);
} }
} }
@ -345,7 +345,7 @@ STATIC mp_obj_t re_sub_helper(size_t n_args, const mp_obj_t *args) {
} }
if (match_no >= (unsigned int)match->num_matches) { if (match_no >= (unsigned int)match->num_matches) {
mp_raise_arg1(&mp_type_IndexError, MP_OBJ_NEW_SMALL_INT(match_no)); mp_raise_type_arg(&mp_type_IndexError, MP_OBJ_NEW_SMALL_INT(match_no));
} }
const char *start_match = match->caps[match_no * 2]; const char *start_match = match->caps[match_no * 2];
@ -477,11 +477,11 @@ MP_REGISTER_MODULE(MP_QSTR_re, mp_module_ure, MICROPY_PY_URE);
// only if module is enabled by config setting. // only if module is enabled by config setting.
#define re1_5_fatal(x) assert(!x) #define re1_5_fatal(x) assert(!x)
#include "re1.5/compilecode.c" #include "lib/re1.5/compilecode.c"
#if MICROPY_PY_URE_DEBUG #if MICROPY_PY_URE_DEBUG
#include "re1.5/dumpcode.c" #include "lib/re1.5/dumpcode.c"
#endif #endif
#include "re1.5/recursiveloop.c" #include "lib/re1.5/recursiveloop.c"
#include "re1.5/charclass.c" #include "lib/re1.5/charclass.c"
#endif // MICROPY_PY_URE #endif // MICROPY_PY_URE

View File

@ -87,6 +87,7 @@ STATIC mp_uint_t poll_map_poll(mp_map_t *poll_map, size_t *rwx_num) {
return n_ready; return n_ready;
} }
#if MICROPY_PY_USELECT_SELECT
// select(rlist, wlist, xlist[, timeout]) // select(rlist, wlist, xlist[, timeout])
STATIC mp_obj_t select_select(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t select_select(size_t n_args, const mp_obj_t *args) {
// get array data from tuple/list arguments // get array data from tuple/list arguments
@ -153,6 +154,7 @@ STATIC mp_obj_t select_select(size_t n_args, const mp_obj_t *args) {
} }
} }
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_select_select_obj, 3, 4, select_select); MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_select_select_obj, 3, 4, select_select);
#endif // MICROPY_PY_USELECT_SELECT
typedef struct _mp_obj_poll_t { typedef struct _mp_obj_poll_t {
mp_obj_base_t base; mp_obj_base_t base;
@ -335,7 +337,9 @@ MP_DEFINE_CONST_FUN_OBJ_0(mp_select_poll_obj, select_poll);
STATIC const mp_rom_map_elem_t mp_module_select_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module_select_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uselect) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uselect) },
#if MICROPY_PY_USELECT_SELECT
{ MP_ROM_QSTR(MP_QSTR_select), MP_ROM_PTR(&mp_select_select_obj) }, { MP_ROM_QSTR(MP_QSTR_select), MP_ROM_PTR(&mp_select_select_obj) },
#endif
{ MP_ROM_QSTR(MP_QSTR_poll), MP_ROM_PTR(&mp_select_poll_obj) }, { MP_ROM_QSTR(MP_QSTR_poll), MP_ROM_PTR(&mp_select_poll_obj) },
{ MP_ROM_QSTR(MP_QSTR_POLLIN), MP_ROM_INT(MP_STREAM_POLL_RD) }, { MP_ROM_QSTR(MP_QSTR_POLLIN), MP_ROM_INT(MP_STREAM_POLL_RD) },
{ MP_ROM_QSTR(MP_QSTR_POLLOUT), MP_ROM_INT(MP_STREAM_POLL_WR) }, { MP_ROM_QSTR(MP_QSTR_POLLOUT), MP_ROM_INT(MP_STREAM_POLL_WR) },

View File

@ -55,8 +55,8 @@ STATIC bool time_less_than(struct qentry *item, struct qentry *parent) {
return res && res < (MODULO / 2); return res && res < (MODULO / 2);
} }
STATIC mp_obj_t utimeq_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t utimeq_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, kw_args, 1, 1, false); mp_arg_check_num(n_args, n_kw, 1, 1, false);
mp_uint_t alloc = mp_obj_get_int(args[0]); mp_uint_t alloc = mp_obj_get_int(args[0]);
mp_obj_utimeq_t *o = m_new_obj_var(mp_obj_utimeq_t, struct qentry, alloc); mp_obj_utimeq_t *o = m_new_obj_var(mp_obj_utimeq_t, struct qentry, alloc);
o->base.type = type; o->base.type = type;

View File

@ -15,7 +15,7 @@
#if MICROPY_PY_UZLIB #if MICROPY_PY_UZLIB
#define UZLIB_CONF_PARANOID_CHECKS (1) #define UZLIB_CONF_PARANOID_CHECKS (1)
#include "../lib/uzlib/src/tinf.h" #include "lib/uzlib/tinf.h"
#if 0 // print debugging info #if 0 // print debugging info
#define DEBUG_printf DEBUG_printf #define DEBUG_printf DEBUG_printf
@ -48,8 +48,8 @@ STATIC int read_src_stream(TINF_DATA *data) {
return c; return c;
} }
STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, kw_args, 1, 2, false); mp_arg_check_num(n_args, n_kw, 1, 2, false);
mp_get_stream_raise(args[0], MP_STREAM_OP_READ); mp_get_stream_raise(args[0], MP_STREAM_OP_READ);
mp_obj_decompio_t *o = m_new_obj(mp_obj_decompio_t); mp_obj_decompio_t *o = m_new_obj(mp_obj_decompio_t);
o->base.type = type; o->base.type = type;
@ -186,7 +186,7 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
return res; return res;
error: error:
mp_raise_arg1(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st)); mp_raise_type_arg(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st));
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_uzlib_decompress_obj, 1, 3, mod_uzlib_decompress); STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_uzlib_decompress_obj, 1, 3, mod_uzlib_decompress);
@ -209,10 +209,10 @@ const mp_obj_module_t mp_module_uzlib = {
// only if module is enabled by config setting. // only if module is enabled by config setting.
#pragma GCC diagnostic ignored "-Wsign-compare" #pragma GCC diagnostic ignored "-Wsign-compare"
#include "../lib/uzlib/src/tinflate.c" #include "lib/uzlib/tinflate.c"
#include "../lib/uzlib/src/tinfzlib.c" #include "lib/uzlib/tinfzlib.c"
#include "../lib/uzlib/src/tinfgzip.c" #include "lib/uzlib/tinfgzip.c"
#include "../lib/uzlib/src/adler32.c" #include "lib/uzlib/adler32.c"
#include "../lib/uzlib/src/crc32.c" #include "lib/uzlib/crc32.c"
#endif // MICROPY_PY_UZLIB #endif // MICROPY_PY_UZLIB

View File

@ -79,8 +79,8 @@ async def open_connection(host, port):
from uerrno import EINPROGRESS from uerrno import EINPROGRESS
import usocket as socket import usocket as socket
ai = socket.getaddrinfo(host, port)[0] # TODO this is blocking! ai = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)[0] # TODO this is blocking!
s = socket.socket() s = socket.socket(ai[0], ai[1], ai[2])
s.setblocking(False) s.setblocking(False)
ss = Stream(s) ss = Stream(s)
try: try:
@ -107,15 +107,7 @@ class Server:
async def wait_closed(self): async def wait_closed(self):
await self.task await self.task
async def _serve(self, cb, host, port, backlog): async def _serve(self, s, cb):
import usocket as socket
ai = socket.getaddrinfo(host, port)[0] # TODO this is blocking!
s = socket.socket()
s.setblocking(False)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(ai[-1])
s.listen(backlog)
# Accept incoming connections # Accept incoming connections
while True: while True:
try: try:
@ -137,9 +129,20 @@ class Server:
# Helper function to start a TCP stream server, running as a new task # Helper function to start a TCP stream server, running as a new task
# TODO could use an accept-callback on socket read activity instead of creating a task # TODO could use an accept-callback on socket read activity instead of creating a task
async def start_server(cb, host, port, backlog=5): async def start_server(cb, host, port, backlog=5):
s = Server() import usocket as socket
s.task = core.create_task(s._serve(cb, host, port, backlog))
return s # Create and bind server socket.
host = socket.getaddrinfo(host, port)[0] # TODO this is blocking!
s = socket.socket()
s.setblocking(False)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(host[-1])
s.listen(backlog)
# Create and return server object and task.
srv = Server()
srv.task = core.create_task(srv._serve(s, cb))
return srv
################################################################################ ################################################################################

@ -1 +1 @@
Subproject commit 8d93ddeaf3548d5466cee0a392a4ee89f07ce2e5 Subproject commit b913d064e525f674d0219524988e6d9d834fe09c

View File

@ -27,7 +27,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(mp_utime_sleep_obj, time_sleep);
STATIC mp_obj_t time_sleep_ms(mp_obj_t arg) { STATIC mp_obj_t time_sleep_ms(mp_obj_t arg) {
mp_int_t ms = mp_obj_get_int(arg); mp_int_t ms = mp_obj_get_int(arg);
if (ms > 0) { if (ms >= 0) {
mp_hal_delay_ms(ms); mp_hal_delay_ms(ms);
} }
return mp_const_none; return mp_const_none;

View File

@ -150,7 +150,7 @@ STATIC mp_obj_t mp_vfs_autodetect(mp_obj_t bdev_obj) {
#if MICROPY_VFS_LFS1 #if MICROPY_VFS_LFS1
if (memcmp(&buf[32], "littlefs", 8) == 0) { if (memcmp(&buf[32], "littlefs", 8) == 0) {
// LFS1 // LFS1
mp_obj_t vfs = mp_type_vfs_lfs1.make_new(&mp_type_vfs_lfs1, 1, &bdev_obj, NULL); mp_obj_t vfs = mp_type_vfs_lfs1.make_new(&mp_type_vfs_lfs1, 1, 0, &bdev_obj);
nlr_pop(); nlr_pop();
return vfs; return vfs;
} }
@ -158,7 +158,7 @@ STATIC mp_obj_t mp_vfs_autodetect(mp_obj_t bdev_obj) {
#if MICROPY_VFS_LFS2 #if MICROPY_VFS_LFS2
if (memcmp(&buf[0], "littlefs", 8) == 0) { if (memcmp(&buf[0], "littlefs", 8) == 0) {
// LFS2 // LFS2
mp_obj_t vfs = mp_type_vfs_lfs2.make_new(&mp_type_vfs_lfs2, 1, &bdev_obj, NULL); mp_obj_t vfs = mp_type_vfs_lfs2.make_new(&mp_type_vfs_lfs2, 1, 0, &bdev_obj);
nlr_pop(); nlr_pop();
return vfs; return vfs;
} }
@ -171,7 +171,7 @@ STATIC mp_obj_t mp_vfs_autodetect(mp_obj_t bdev_obj) {
#endif #endif
#if MICROPY_VFS_FAT #if MICROPY_VFS_FAT
return mp_fat_vfs_type.make_new(&mp_fat_vfs_type, 1, &bdev_obj, NULL); return mp_fat_vfs_type.make_new(&mp_fat_vfs_type, 1, 0, &bdev_obj);
#endif #endif
// no filesystem found // no filesystem found

View File

@ -18,7 +18,7 @@
#include "py/mperrno.h" #include "py/mperrno.h"
#include "lib/oofatfs/ff.h" #include "lib/oofatfs/ff.h"
#include "extmod/vfs_fat.h" #include "extmod/vfs_fat.h"
#include "lib/timeutils/timeutils.h" #include "shared/timeutils/timeutils.h"
#include "supervisor/filesystem.h" #include "supervisor/filesystem.h"
#include "supervisor/shared/translate.h" #include "supervisor/shared/translate.h"
@ -45,8 +45,8 @@ STATIC mp_import_stat_t fat_vfs_import_stat(void *vfs_in, const char *path) {
return MP_IMPORT_STAT_NO_EXIST; return MP_IMPORT_STAT_NO_EXIST;
} }
STATIC mp_obj_t fat_vfs_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t fat_vfs_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, kw_args, 1, 1, false); mp_arg_check_num(n_args, n_kw, 1, 1, false);
// create new object // create new object
fs_user_mount_t *vfs = m_new_obj(fs_user_mount_t); fs_user_mount_t *vfs = m_new_obj(fs_user_mount_t);
@ -88,7 +88,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(fat_vfs_del_obj, fat_vfs_del);
STATIC mp_obj_t fat_vfs_mkfs(mp_obj_t bdev_in) { STATIC mp_obj_t fat_vfs_mkfs(mp_obj_t bdev_in) {
// create new object // create new object
fs_user_mount_t *vfs = MP_OBJ_TO_PTR(fat_vfs_make_new(&mp_fat_vfs_type, 1, &bdev_in, NULL)); fs_user_mount_t *vfs = MP_OBJ_TO_PTR(fat_vfs_make_new(&mp_fat_vfs_type, 1, 0, &bdev_in));
// make the filesystem // make the filesystem
uint8_t working_buf[FF_MAX_SS]; uint8_t working_buf[FF_MAX_SS];

View File

@ -209,9 +209,9 @@ STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_ar
return MP_OBJ_FROM_PTR(o); return MP_OBJ_FROM_PTR(o);
} }
STATIC mp_obj_t file_obj_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t file_obj_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_val_t arg_vals[FILE_OPEN_NUM_ARGS]; mp_arg_val_t arg_vals[FILE_OPEN_NUM_ARGS];
mp_arg_parse_all(n_args, args, kw_args, FILE_OPEN_NUM_ARGS, file_open_args, arg_vals); mp_arg_parse_all_kw_array(n_args, n_kw, args, FILE_OPEN_NUM_ARGS, file_open_args, arg_vals);
return file_open(NULL, type, arg_vals); return file_open(NULL, type, arg_vals);
} }

View File

@ -26,7 +26,7 @@
#include "py/runtime.h" #include "py/runtime.h"
#include "py/mphal.h" #include "py/mphal.h"
#include "lib/timeutils/timeutils.h" #include "shared/timeutils/timeutils.h"
#include "extmod/vfs.h" #include "extmod/vfs.h"
#include "extmod/vfs_lfs.h" #include "extmod/vfs_lfs.h"

View File

@ -34,7 +34,7 @@
#include "py/objstr.h" #include "py/objstr.h"
#include "py/mperrno.h" #include "py/mperrno.h"
#include "extmod/vfs.h" #include "extmod/vfs.h"
#include "lib/timeutils/timeutils.h" #include "shared/timeutils/timeutils.h"
STATIC int MP_VFS_LFSx(dev_ioctl)(const struct LFSx_API (config) * c, int cmd, int arg, bool must_return_int) { STATIC int MP_VFS_LFSx(dev_ioctl)(const struct LFSx_API (config) * c, int cmd, int arg, bool must_return_int) {
mp_obj_t ret = mp_vfs_blockdev_ioctl(c->context, cmd, arg); mp_obj_t ret = mp_vfs_blockdev_ioctl(c->context, cmd, arg);
@ -113,9 +113,9 @@ const char *MP_VFS_LFSx(make_path)(MP_OBJ_VFS_LFSx * self, mp_obj_t path_in) {
return path; return path;
} }
STATIC mp_obj_t MP_VFS_LFSx(make_new)(const mp_obj_type_t * type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { STATIC mp_obj_t MP_VFS_LFSx(make_new)(const mp_obj_type_t * type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
mp_arg_val_t args[MP_ARRAY_SIZE(lfs_make_allowed_args)]; mp_arg_val_t args[MP_ARRAY_SIZE(lfs_make_allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(lfs_make_allowed_args), lfs_make_allowed_args, args); mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(lfs_make_allowed_args), lfs_make_allowed_args, args);
MP_OBJ_VFS_LFSx *self = m_new0(MP_OBJ_VFS_LFSx, 1); MP_OBJ_VFS_LFSx *self = m_new0(MP_OBJ_VFS_LFSx, 1);
self->base.type = type; self->base.type = type;

View File

@ -71,8 +71,8 @@ STATIC mp_import_stat_t mp_vfs_posix_import_stat(void *self_in, const char *path
return MP_IMPORT_STAT_NO_EXIST; return MP_IMPORT_STAT_NO_EXIST;
} }
STATIC mp_obj_t vfs_posix_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t vfs_posix_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, kw_args, 0, 1, false); mp_arg_check_num(n_args, n_kw, 0, 1, false);
mp_obj_vfs_posix_t *vfs = m_new_obj(mp_obj_vfs_posix_t); mp_obj_vfs_posix_t *vfs = m_new_obj(mp_obj_vfs_posix_t);
vfs->base.type = type; vfs->base.type = type;

View File

@ -89,14 +89,14 @@ mp_obj_t mp_vfs_posix_file_open(const mp_obj_type_t *type, mp_obj_t file_in, mp_
return MP_OBJ_FROM_PTR(o); return MP_OBJ_FROM_PTR(o);
} }
STATIC mp_obj_t vfs_posix_file_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t vfs_posix_file_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
static const mp_arg_t allowed_args[] = { static const mp_arg_t allowed_args[] = {
{ MP_QSTR_file, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_rom_obj = MP_ROM_NONE} }, { MP_QSTR_file, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_rom_obj = MP_ROM_NONE} },
{ MP_QSTR_mode, MP_ARG_OBJ, {.u_rom_obj = MP_ROM_QSTR(MP_QSTR_r)} }, { MP_QSTR_mode, MP_ARG_OBJ, {.u_rom_obj = MP_ROM_QSTR(MP_QSTR_r)} },
}; };
mp_arg_val_t arg_vals[MP_ARRAY_SIZE(allowed_args)]; mp_arg_val_t arg_vals[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, arg_vals); mp_arg_parse_all_kw_array(n_args, n_kw, args, MP_ARRAY_SIZE(allowed_args), allowed_args, arg_vals);
return mp_vfs_posix_file_open(type, arg_vals[0].u_obj, arg_vals[1].u_obj); return mp_vfs_posix_file_open(type, arg_vals[0].u_obj, arg_vals[1].u_obj);
} }

View File

@ -1,2 +1,3 @@
This directory contains standard, low-level C libraries with emphasis on This directory contains third-party, low-level C libraries and SDKs.
being independent and efficient. They can be used by any port. Libraries that do not target any specific platform are generally chosen
based on them being independent and efficient.

@ -1 +1 @@
Subproject commit 43a6e6bd3bbc03dc501e16b89fba0ef042ed3ea0 Subproject commit 531cab9c278c947d268bd4c94ecab9153a961b43

View File

@ -15,6 +15,7 @@
/*************************** HEADER FILES ***************************/ /*************************** HEADER FILES ***************************/
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include "sha256.h" #include "sha256.h"
@ -47,7 +48,7 @@ static void sha256_transform(CRYAL_SHA256_CTX *ctx, const BYTE data[])
WORD a, b, c, d, e, f, g, h, i, j, t1, t2, m[64]; WORD a, b, c, d, e, f, g, h, i, j, t1, t2, m[64];
for (i = 0, j = 0; i < 16; ++i, j += 4) for (i = 0, j = 0; i < 16; ++i, j += 4)
m[i] = (data[j] << 24) | (data[j + 1] << 16) | (data[j + 2] << 8) | (data[j + 3]); m[i] = ((uint32_t)data[j] << 24) | (data[j + 1] << 16) | (data[j + 2] << 8) | (data[j + 3]);
for ( ; i < 64; ++i) for ( ; i < 64; ++i)
m[i] = SIG1(m[i - 2]) + m[i - 7] + SIG0(m[i - 15]) + m[i - 16]; m[i] = SIG1(m[i - 2]) + m[i - 7] + SIG0(m[i - 15]) + m[i - 16];

@ -1 +0,0 @@
Subproject commit 27e4f4c15ba30c2cfc89575159e8efb50f95037e

78
lib/uzlib/adler32.c Normal file
View File

@ -0,0 +1,78 @@
/*
* Adler-32 checksum
*
* Copyright (c) 2003 by Joergen Ibsen / Jibz
* All Rights Reserved
*
* http://www.ibsensoftware.com/
*
* This software is provided 'as-is', without any express
* or implied warranty. In no event will the authors be
* held liable for any damages arising from the use of
* this software.
*
* Permission is granted to anyone to use this software
* for any purpose, including commercial applications,
* and to alter it and redistribute it freely, subject to
* the following restrictions:
*
* 1. The origin of this software must not be
* misrepresented; you must not claim that you
* wrote the original software. If you use this
* software in a product, an acknowledgment in
* the product documentation would be appreciated
* but is not required.
*
* 2. Altered source versions must be plainly marked
* as such, and must not be misrepresented as
* being the original software.
*
* 3. This notice may not be removed or altered from
* any source distribution.
*/
/*
* Adler-32 algorithm taken from the zlib source, which is
* Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
*/
#include "tinf.h"
#define A32_BASE 65521
#define A32_NMAX 5552
uint32_t uzlib_adler32(const void *data, unsigned int length, uint32_t prev_sum /* 1 */)
{
const unsigned char *buf = (const unsigned char *)data;
unsigned int s1 = prev_sum & 0xffff;
unsigned int s2 = prev_sum >> 16;
while (length > 0)
{
int k = length < A32_NMAX ? length : A32_NMAX;
int i;
for (i = k / 16; i; --i, buf += 16)
{
s1 += buf[0]; s2 += s1; s1 += buf[1]; s2 += s1;
s1 += buf[2]; s2 += s1; s1 += buf[3]; s2 += s1;
s1 += buf[4]; s2 += s1; s1 += buf[5]; s2 += s1;
s1 += buf[6]; s2 += s1; s1 += buf[7]; s2 += s1;
s1 += buf[8]; s2 += s1; s1 += buf[9]; s2 += s1;
s1 += buf[10]; s2 += s1; s1 += buf[11]; s2 += s1;
s1 += buf[12]; s2 += s1; s1 += buf[13]; s2 += s1;
s1 += buf[14]; s2 += s1; s1 += buf[15]; s2 += s1;
}
for (i = k % 16; i; --i) { s1 += *buf++; s2 += s1; }
s1 %= A32_BASE;
s2 %= A32_BASE;
length -= k;
}
return (s2 << 16) | s1;
}

63
lib/uzlib/crc32.c Normal file
View File

@ -0,0 +1,63 @@
/*
* CRC32 checksum
*
* Copyright (c) 1998-2003 by Joergen Ibsen / Jibz
* All Rights Reserved
*
* http://www.ibsensoftware.com/
*
* This software is provided 'as-is', without any express
* or implied warranty. In no event will the authors be
* held liable for any damages arising from the use of
* this software.
*
* Permission is granted to anyone to use this software
* for any purpose, including commercial applications,
* and to alter it and redistribute it freely, subject to
* the following restrictions:
*
* 1. The origin of this software must not be
* misrepresented; you must not claim that you
* wrote the original software. If you use this
* software in a product, an acknowledgment in
* the product documentation would be appreciated
* but is not required.
*
* 2. Altered source versions must be plainly marked
* as such, and must not be misrepresented as
* being the original software.
*
* 3. This notice may not be removed or altered from
* any source distribution.
*/
/*
* CRC32 algorithm taken from the zlib source, which is
* Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
*/
#include "tinf.h"
static const unsigned int tinf_crc32tab[16] = {
0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190,
0x6b6b51f4, 0x4db26158, 0x5005713c, 0xedb88320, 0xf00f9344,
0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278,
0xbdbdf21c
};
/* crc is previous value for incremental computation, 0xffffffff initially */
uint32_t uzlib_crc32(const void *data, unsigned int length, uint32_t crc)
{
const unsigned char *buf = (const unsigned char *)data;
unsigned int i;
for (i = 0; i < length; ++i)
{
crc ^= buf[i];
crc = tinf_crc32tab[crc & 0x0f] ^ (crc >> 4);
crc = tinf_crc32tab[crc & 0x0f] ^ (crc >> 4);
}
// return value suitable for passing in next time, for final value invert it
return crc/* ^ 0xffffffff*/;
}

45
lib/uzlib/defl_static.h Normal file
View File

@ -0,0 +1,45 @@
/*
* Copyright (c) uzlib authors
*
* This software is provided 'as-is', without any express
* or implied warranty. In no event will the authors be
* held liable for any damages arising from the use of
* this software.
*
* Permission is granted to anyone to use this software
* for any purpose, including commercial applications,
* and to alter it and redistribute it freely, subject to
* the following restrictions:
*
* 1. The origin of this software must not be
* misrepresented; you must not claim that you
* wrote the original software. If you use this
* software in a product, an acknowledgment in
* the product documentation would be appreciated
* but is not required.
*
* 2. Altered source versions must be plainly marked
* as such, and must not be misrepresented as
* being the original software.
*
* 3. This notice may not be removed or altered from
* any source distribution.
*/
/* This files contains type declaration and prototypes for defl_static.c.
They may be altered/distinct from the originals used in PuTTY source
code. */
struct Outbuf {
unsigned char *outbuf;
int outlen, outsize;
unsigned long outbits;
int noutbits;
int comp_disabled;
};
void outbits(struct Outbuf *out, unsigned long bits, int nbits);
void zlib_start_block(struct Outbuf *ctx);
void zlib_finish_block(struct Outbuf *ctx);
void zlib_literal(struct Outbuf *ectx, unsigned char c);
void zlib_match(struct Outbuf *ectx, int distance, int len);

3
lib/uzlib/tinf.h Normal file
View File

@ -0,0 +1,3 @@
/* Compatibility header for the original tinf lib/older versions of uzlib.
Note: may be removed in the future, please migrate to uzlib.h. */
#include "uzlib.h"

9
lib/uzlib/tinf_compat.h Normal file
View File

@ -0,0 +1,9 @@
/* This header contains compatibility defines for the original tinf API
and uzlib 2.x and below API. These defines are deprecated and going
to be removed in the future, so applications should migrate to new
uzlib API. */
#define TINF_DATA struct uzlib_uncomp
#define destSize dest_size
#define destStart dest_start
#define readSource source_read_cb

110
lib/uzlib/tinfgzip.c Normal file
View File

@ -0,0 +1,110 @@
/*
* uzlib - tiny deflate/inflate library (deflate, gzip, zlib)
*
* Copyright (c) 2003 by Joergen Ibsen / Jibz
* All Rights Reserved
*
* http://www.ibsensoftware.com/
*
* Copyright (c) 2014-2018 by Paul Sokolovsky
*
* This software is provided 'as-is', without any express
* or implied warranty. In no event will the authors be
* held liable for any damages arising from the use of
* this software.
*
* Permission is granted to anyone to use this software
* for any purpose, including commercial applications,
* and to alter it and redistribute it freely, subject to
* the following restrictions:
*
* 1. The origin of this software must not be
* misrepresented; you must not claim that you
* wrote the original software. If you use this
* software in a product, an acknowledgment in
* the product documentation would be appreciated
* but is not required.
*
* 2. Altered source versions must be plainly marked
* as such, and must not be misrepresented as
* being the original software.
*
* 3. This notice may not be removed or altered from
* any source distribution.
*/
#include "tinf.h"
#define FTEXT 1
#define FHCRC 2
#define FEXTRA 4
#define FNAME 8
#define FCOMMENT 16
void tinf_skip_bytes(TINF_DATA *d, int num);
uint16_t tinf_get_uint16(TINF_DATA *d);
void tinf_skip_bytes(TINF_DATA *d, int num)
{
while (num--) uzlib_get_byte(d);
}
uint16_t tinf_get_uint16(TINF_DATA *d)
{
unsigned int v = uzlib_get_byte(d);
v = (uzlib_get_byte(d) << 8) | v;
return v;
}
int uzlib_gzip_parse_header(TINF_DATA *d)
{
unsigned char flg;
/* -- check format -- */
/* check id bytes */
if (uzlib_get_byte(d) != 0x1f || uzlib_get_byte(d) != 0x8b) return TINF_DATA_ERROR;
/* check method is deflate */
if (uzlib_get_byte(d) != 8) return TINF_DATA_ERROR;
/* get flag byte */
flg = uzlib_get_byte(d);
/* check that reserved bits are zero */
if (flg & 0xe0) return TINF_DATA_ERROR;
/* -- find start of compressed data -- */
/* skip rest of base header of 10 bytes */
tinf_skip_bytes(d, 6);
/* skip extra data if present */
if (flg & FEXTRA)
{
unsigned int xlen = tinf_get_uint16(d);
tinf_skip_bytes(d, xlen);
}
/* skip file name if present */
if (flg & FNAME) { while (uzlib_get_byte(d)); }
/* skip file comment if present */
if (flg & FCOMMENT) { while (uzlib_get_byte(d)); }
/* check header crc if present */
if (flg & FHCRC)
{
/*unsigned int hcrc =*/ tinf_get_uint16(d);
// TODO: Check!
// if (hcrc != (tinf_crc32(src, start - src) & 0x0000ffff))
// return TINF_DATA_ERROR;
}
/* initialize for crc32 checksum */
d->checksum_type = TINF_CHKSUM_CRC;
d->checksum = ~0;
return TINF_OK;
}

659
lib/uzlib/tinflate.c Normal file
View File

@ -0,0 +1,659 @@
/*
* uzlib - tiny deflate/inflate library (deflate, gzip, zlib)
*
* Copyright (c) 2003 by Joergen Ibsen / Jibz
* All Rights Reserved
* http://www.ibsensoftware.com/
*
* Copyright (c) 2014-2018 by Paul Sokolovsky
*
* This software is provided 'as-is', without any express
* or implied warranty. In no event will the authors be
* held liable for any damages arising from the use of
* this software.
*
* Permission is granted to anyone to use this software
* for any purpose, including commercial applications,
* and to alter it and redistribute it freely, subject to
* the following restrictions:
*
* 1. The origin of this software must not be
* misrepresented; you must not claim that you
* wrote the original software. If you use this
* software in a product, an acknowledgment in
* the product documentation would be appreciated
* but is not required.
*
* 2. Altered source versions must be plainly marked
* as such, and must not be misrepresented as
* being the original software.
*
* 3. This notice may not be removed or altered from
* any source distribution.
*/
#include <assert.h>
#include "tinf.h"
#define UZLIB_DUMP_ARRAY(heading, arr, size) \
{ \
printf("%s", heading); \
for (int i = 0; i < size; ++i) { \
printf(" %d", (arr)[i]); \
} \
printf("\n"); \
}
uint32_t tinf_get_le_uint32(TINF_DATA *d);
uint32_t tinf_get_be_uint32(TINF_DATA *d);
/* --------------------------------------------------- *
* -- uninitialized global data (static structures) -- *
* --------------------------------------------------- */
#ifdef RUNTIME_BITS_TABLES
/* extra bits and base tables for length codes */
unsigned char length_bits[30];
unsigned short length_base[30];
/* extra bits and base tables for distance codes */
unsigned char dist_bits[30];
unsigned short dist_base[30];
#else
const unsigned char length_bits[30] = {
0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 2, 2, 2, 2,
3, 3, 3, 3, 4, 4, 4, 4,
5, 5, 5, 5
};
const unsigned short length_base[30] = {
3, 4, 5, 6, 7, 8, 9, 10,
11, 13, 15, 17, 19, 23, 27, 31,
35, 43, 51, 59, 67, 83, 99, 115,
131, 163, 195, 227, 258
};
const unsigned char dist_bits[30] = {
0, 0, 0, 0, 1, 1, 2, 2,
3, 3, 4, 4, 5, 5, 6, 6,
7, 7, 8, 8, 9, 9, 10, 10,
11, 11, 12, 12, 13, 13
};
const unsigned short dist_base[30] = {
1, 2, 3, 4, 5, 7, 9, 13,
17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073,
4097, 6145, 8193, 12289, 16385, 24577
};
#endif
/* special ordering of code length codes */
const unsigned char clcidx[] = {
16, 17, 18, 0, 8, 7, 9, 6,
10, 5, 11, 4, 12, 3, 13, 2,
14, 1, 15
};
/* ----------------------- *
* -- utility functions -- *
* ----------------------- */
#ifdef RUNTIME_BITS_TABLES
/* build extra bits and base tables */
static void tinf_build_bits_base(unsigned char *bits, unsigned short *base, int delta, int first)
{
int i, sum;
/* build bits table */
for (i = 0; i < delta; ++i) bits[i] = 0;
for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta;
/* build base table */
for (sum = first, i = 0; i < 30; ++i)
{
base[i] = sum;
sum += 1 << bits[i];
}
}
#endif
/* build the fixed huffman trees */
static void tinf_build_fixed_trees(TINF_TREE *lt, TINF_TREE *dt)
{
int i;
/* build fixed length tree */
for (i = 0; i < 7; ++i) lt->table[i] = 0;
lt->table[7] = 24;
lt->table[8] = 152;
lt->table[9] = 112;
for (i = 0; i < 24; ++i) lt->trans[i] = 256 + i;
for (i = 0; i < 144; ++i) lt->trans[24 + i] = i;
for (i = 0; i < 8; ++i) lt->trans[24 + 144 + i] = 280 + i;
for (i = 0; i < 112; ++i) lt->trans[24 + 144 + 8 + i] = 144 + i;
/* build fixed distance tree */
for (i = 0; i < 5; ++i) dt->table[i] = 0;
dt->table[5] = 32;
for (i = 0; i < 32; ++i) dt->trans[i] = i;
}
/* given an array of code lengths, build a tree */
static void tinf_build_tree(TINF_TREE *t, const unsigned char *lengths, unsigned int num)
{
unsigned short offs[16];
unsigned int i, sum;
/* clear code length count table */
for (i = 0; i < 16; ++i) t->table[i] = 0;
/* scan symbol lengths, and sum code length counts */
for (i = 0; i < num; ++i) t->table[lengths[i]]++;
#if UZLIB_CONF_DEBUG_LOG >= 2
UZLIB_DUMP_ARRAY("codelen counts:", t->table, TINF_ARRAY_SIZE(t->table));
#endif
/* In the lengths array, 0 means unused code. So, t->table[0] now contains
number of unused codes. But table's purpose is to contain # of codes of
particular length, and there're 0 codes of length 0. */
t->table[0] = 0;
/* compute offset table for distribution sort */
for (sum = 0, i = 0; i < 16; ++i)
{
offs[i] = sum;
sum += t->table[i];
}
#if UZLIB_CONF_DEBUG_LOG >= 2
UZLIB_DUMP_ARRAY("codelen offsets:", offs, TINF_ARRAY_SIZE(offs));
#endif
/* create code->symbol translation table (symbols sorted by code) */
for (i = 0; i < num; ++i)
{
if (lengths[i]) t->trans[offs[lengths[i]]++] = i;
}
}
/* ---------------------- *
* -- decode functions -- *
* ---------------------- */
unsigned char uzlib_get_byte(TINF_DATA *d)
{
/* If end of source buffer is not reached, return next byte from source
buffer. */
if (d->source < d->source_limit) {
return *d->source++;
}
/* Otherwise if there's callback and we haven't seen EOF yet, try to
read next byte using it. (Note: the callback can also update ->source
and ->source_limit). */
if (d->readSource && !d->eof) {
int val = d->readSource(d);
if (val >= 0) {
return (unsigned char)val;
}
}
/* Otherwise, we hit EOF (either from ->readSource() or from exhaustion
of the buffer), and it will be "sticky", i.e. further calls to this
function will end up here too. */
d->eof = true;
return 0;
}
uint32_t tinf_get_le_uint32(TINF_DATA *d)
{
uint32_t val = 0;
int i;
for (i = 4; i--;) {
val = val >> 8 | ((uint32_t)uzlib_get_byte(d)) << 24;
}
return val;
}
uint32_t tinf_get_be_uint32(TINF_DATA *d)
{
uint32_t val = 0;
int i;
for (i = 4; i--;) {
val = val << 8 | uzlib_get_byte(d);
}
return val;
}
/* get one bit from source stream */
static int tinf_getbit(TINF_DATA *d)
{
unsigned int bit;
/* check if tag is empty */
if (!d->bitcount--)
{
/* load next tag */
d->tag = uzlib_get_byte(d);
d->bitcount = 7;
}
/* shift bit out of tag */
bit = d->tag & 0x01;
d->tag >>= 1;
return bit;
}
/* read a num bit value from a stream and add base */
static unsigned int tinf_read_bits(TINF_DATA *d, int num, int base)
{
unsigned int val = 0;
/* read num bits */
if (num)
{
unsigned int limit = 1 << (num);
unsigned int mask;
for (mask = 1; mask < limit; mask *= 2)
if (tinf_getbit(d)) val += mask;
}
return val + base;
}
/* given a data stream and a tree, decode a symbol */
static int tinf_decode_symbol(TINF_DATA *d, TINF_TREE *t)
{
int sum = 0, cur = 0, len = 0;
/* get more bits while code value is above sum */
do {
cur = 2*cur + tinf_getbit(d);
if (++len == TINF_ARRAY_SIZE(t->table)) {
return TINF_DATA_ERROR;
}
sum += t->table[len];
cur -= t->table[len];
} while (cur >= 0);
sum += cur;
#if UZLIB_CONF_PARANOID_CHECKS
if (sum < 0 || sum >= TINF_ARRAY_SIZE(t->trans)) {
return TINF_DATA_ERROR;
}
#endif
return t->trans[sum];
}
/* given a data stream, decode dynamic trees from it */
static int tinf_decode_trees(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt)
{
/* code lengths for 288 literal/len symbols and 32 dist symbols */
unsigned char lengths[288+32];
unsigned int hlit, hdist, hclen, hlimit;
unsigned int i, num, length;
/* get 5 bits HLIT (257-286) */
hlit = tinf_read_bits(d, 5, 257);
/* get 5 bits HDIST (1-32) */
hdist = tinf_read_bits(d, 5, 1);
/* get 4 bits HCLEN (4-19) */
hclen = tinf_read_bits(d, 4, 4);
for (i = 0; i < 19; ++i) lengths[i] = 0;
/* read code lengths for code length alphabet */
for (i = 0; i < hclen; ++i)
{
/* get 3 bits code length (0-7) */
unsigned int clen = tinf_read_bits(d, 3, 0);
lengths[clcidx[i]] = clen;
}
/* build code length tree, temporarily use length tree */
tinf_build_tree(lt, lengths, 19);
/* decode code lengths for the dynamic trees */
hlimit = hlit + hdist;
for (num = 0; num < hlimit; )
{
int sym = tinf_decode_symbol(d, lt);
unsigned char fill_value = 0;
int lbits, lbase = 3;
/* error decoding */
if (sym < 0) return sym;
switch (sym)
{
case 16:
/* copy previous code length 3-6 times (read 2 bits) */
if (num == 0) return TINF_DATA_ERROR;
fill_value = lengths[num - 1];
lbits = 2;
break;
case 17:
/* repeat code length 0 for 3-10 times (read 3 bits) */
lbits = 3;
break;
case 18:
/* repeat code length 0 for 11-138 times (read 7 bits) */
lbits = 7;
lbase = 11;
break;
default:
/* values 0-15 represent the actual code lengths */
lengths[num++] = sym;
/* continue the for loop */
continue;
}
/* special code length 16-18 are handled here */
length = tinf_read_bits(d, lbits, lbase);
if (num + length > hlimit) return TINF_DATA_ERROR;
for (; length; --length)
{
lengths[num++] = fill_value;
}
}
#if UZLIB_CONF_DEBUG_LOG >= 2
printf("lit code lengths (%d):", hlit);
UZLIB_DUMP_ARRAY("", lengths, hlit);
printf("dist code lengths (%d):", hdist);
UZLIB_DUMP_ARRAY("", lengths + hlit, hdist);
#endif
#if UZLIB_CONF_PARANOID_CHECKS
/* Check that there's "end of block" symbol */
if (lengths[256] == 0) {
return TINF_DATA_ERROR;
}
#endif
/* build dynamic trees */
tinf_build_tree(lt, lengths, hlit);
tinf_build_tree(dt, lengths + hlit, hdist);
return TINF_OK;
}
/* ----------------------------- *
* -- block inflate functions -- *
* ----------------------------- */
/* given a stream and two trees, inflate next byte of output */
static int tinf_inflate_block_data(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt)
{
if (d->curlen == 0) {
unsigned int offs;
int dist;
int sym = tinf_decode_symbol(d, lt);
//printf("huff sym: %02x\n", sym);
if (d->eof) {
return TINF_DATA_ERROR;
}
/* literal byte */
if (sym < 256) {
TINF_PUT(d, sym);
return TINF_OK;
}
/* end of block */
if (sym == 256) {
return TINF_DONE;
}
/* substring from sliding dictionary */
sym -= 257;
if (sym >= 29) {
return TINF_DATA_ERROR;
}
/* possibly get more bits from length code */
d->curlen = tinf_read_bits(d, length_bits[sym], length_base[sym]);
dist = tinf_decode_symbol(d, dt);
if (dist >= 30) {
return TINF_DATA_ERROR;
}
/* possibly get more bits from distance code */
offs = tinf_read_bits(d, dist_bits[dist], dist_base[dist]);
/* calculate and validate actual LZ offset to use */
if (d->dict_ring) {
if (offs > d->dict_size) {
return TINF_DICT_ERROR;
}
/* Note: unlike full-dest-in-memory case below, we don't
try to catch offset which points to not yet filled
part of the dictionary here. Doing so would require
keeping another variable to track "filled in" size
of the dictionary. Appearance of such an offset cannot
lead to accessing memory outside of the dictionary
buffer, and clients which don't want to leak unrelated
information, should explicitly initialize dictionary
buffer passed to uzlib. */
d->lzOff = d->dict_idx - offs;
if (d->lzOff < 0) {
d->lzOff += d->dict_size;
}
} else {
/* catch trying to point before the start of dest buffer */
if (offs > (unsigned int)(d->dest - d->destStart)) {
return TINF_DATA_ERROR;
}
d->lzOff = -offs;
}
}
/* copy next byte from dict substring */
if (d->dict_ring) {
TINF_PUT(d, d->dict_ring[d->lzOff]);
if ((unsigned)++d->lzOff == d->dict_size) {
d->lzOff = 0;
}
} else {
d->dest[0] = d->dest[d->lzOff];
d->dest++;
}
d->curlen--;
return TINF_OK;
}
/* inflate next byte from uncompressed block of data */
static int tinf_inflate_uncompressed_block(TINF_DATA *d)
{
if (d->curlen == 0) {
unsigned int length, invlength;
/* get length */
length = uzlib_get_byte(d);
length += 256 * uzlib_get_byte(d);
/* get one's complement of length */
invlength = uzlib_get_byte(d);
invlength += 256 * uzlib_get_byte(d);
/* check length */
if (length != (~invlength & 0x0000ffff)) return TINF_DATA_ERROR;
/* increment length to properly return TINF_DONE below, without
producing data at the same time */
d->curlen = length + 1;
/* make sure we start next block on a byte boundary */
d->bitcount = 0;
}
if (--d->curlen == 0) {
return TINF_DONE;
}
unsigned char c = uzlib_get_byte(d);
TINF_PUT(d, c);
return TINF_OK;
}
/* ---------------------- *
* -- public functions -- *
* ---------------------- */
/* initialize global (static) data */
void uzlib_init(void)
{
#ifdef RUNTIME_BITS_TABLES
/* build extra bits and base tables */
tinf_build_bits_base(length_bits, length_base, 4, 3);
tinf_build_bits_base(dist_bits, dist_base, 2, 1);
/* fix a special case */
length_bits[28] = 0;
length_base[28] = 258;
#endif
}
/* initialize decompression structure */
void uzlib_uncompress_init(TINF_DATA *d, void *dict, unsigned int dictLen)
{
d->eof = 0;
d->bitcount = 0;
d->bfinal = 0;
d->btype = -1;
d->dict_size = dictLen;
d->dict_ring = dict;
d->dict_idx = 0;
d->curlen = 0;
}
/* inflate next output bytes from compressed stream */
int uzlib_uncompress(TINF_DATA *d)
{
do {
int res;
/* start a new block */
if (d->btype == -1) {
next_blk:
/* read final block flag */
d->bfinal = tinf_getbit(d);
/* read block type (2 bits) */
d->btype = tinf_read_bits(d, 2, 0);
#if UZLIB_CONF_DEBUG_LOG >= 1
printf("Started new block: type=%d final=%d\n", d->btype, d->bfinal);
#endif
if (d->btype == 1) {
/* build fixed huffman trees */
tinf_build_fixed_trees(&d->ltree, &d->dtree);
} else if (d->btype == 2) {
/* decode trees from stream */
res = tinf_decode_trees(d, &d->ltree, &d->dtree);
if (res != TINF_OK) {
return res;
}
}
}
/* process current block */
switch (d->btype)
{
case 0:
/* decompress uncompressed block */
res = tinf_inflate_uncompressed_block(d);
break;
case 1:
case 2:
/* decompress block with fixed/dynamic huffman trees */
/* trees were decoded previously, so it's the same routine for both */
res = tinf_inflate_block_data(d, &d->ltree, &d->dtree);
break;
default:
return TINF_DATA_ERROR;
}
if (res == TINF_DONE && !d->bfinal) {
/* the block has ended (without producing more data), but we
can't return without data, so start procesing next block */
goto next_blk;
}
if (res != TINF_OK) {
return res;
}
} while (d->dest < d->dest_limit);
return TINF_OK;
}
/* inflate next output bytes from compressed stream, updating
checksum, and at the end of stream, verify it */
int uzlib_uncompress_chksum(TINF_DATA *d)
{
int res;
unsigned char *data = d->dest;
res = uzlib_uncompress(d);
if (res < 0) return res;
switch (d->checksum_type) {
case TINF_CHKSUM_ADLER:
d->checksum = uzlib_adler32(data, d->dest - data, d->checksum);
break;
case TINF_CHKSUM_CRC:
d->checksum = uzlib_crc32(data, d->dest - data, d->checksum);
break;
}
if (res == TINF_DONE) {
unsigned int val;
switch (d->checksum_type) {
case TINF_CHKSUM_ADLER:
val = tinf_get_be_uint32(d);
if (d->checksum != val) {
return TINF_CHKSUM_ERROR;
}
break;
case TINF_CHKSUM_CRC:
val = tinf_get_le_uint32(d);
if (~d->checksum != val) {
return TINF_CHKSUM_ERROR;
}
// Uncompressed size. TODO: Check
val = tinf_get_le_uint32(d);
break;
}
}
return res;
}

66
lib/uzlib/tinfzlib.c Normal file
View File

@ -0,0 +1,66 @@
/*
* uzlib - tiny deflate/inflate library (deflate, gzip, zlib)
*
* Copyright (c) 2003 by Joergen Ibsen / Jibz
* All Rights Reserved
*
* http://www.ibsensoftware.com/
*
* Copyright (c) 2014-2018 by Paul Sokolovsky
*
* This software is provided 'as-is', without any express
* or implied warranty. In no event will the authors be
* held liable for any damages arising from the use of
* this software.
*
* Permission is granted to anyone to use this software
* for any purpose, including commercial applications,
* and to alter it and redistribute it freely, subject to
* the following restrictions:
*
* 1. The origin of this software must not be
* misrepresented; you must not claim that you
* wrote the original software. If you use this
* software in a product, an acknowledgment in
* the product documentation would be appreciated
* but is not required.
*
* 2. Altered source versions must be plainly marked
* as such, and must not be misrepresented as
* being the original software.
*
* 3. This notice may not be removed or altered from
* any source distribution.
*/
#include "tinf.h"
int uzlib_zlib_parse_header(TINF_DATA *d)
{
unsigned char cmf, flg;
/* -- get header bytes -- */
cmf = uzlib_get_byte(d);
flg = uzlib_get_byte(d);
/* -- check format -- */
/* check checksum */
if ((256*cmf + flg) % 31) return TINF_DATA_ERROR;
/* check method is deflate */
if ((cmf & 0x0f) != 8) return TINF_DATA_ERROR;
/* check window size is valid */
if ((cmf >> 4) > 7) return TINF_DATA_ERROR;
/* check there is no preset dictionary */
if (flg & 0x20) return TINF_DATA_ERROR;
/* initialize for adler32 checksum */
d->checksum_type = TINF_CHKSUM_ADLER;
d->checksum = 1;
return cmf >> 4;
}

169
lib/uzlib/uzlib.h Normal file
View File

@ -0,0 +1,169 @@
/*
* uzlib - tiny deflate/inflate library (deflate, gzip, zlib)
*
* Copyright (c) 2003 by Joergen Ibsen / Jibz
* All Rights Reserved
* http://www.ibsensoftware.com/
*
* Copyright (c) 2014-2018 by Paul Sokolovsky
*
* This software is provided 'as-is', without any express
* or implied warranty. In no event will the authors be
* held liable for any damages arising from the use of
* this software.
*
* Permission is granted to anyone to use this software
* for any purpose, including commercial applications,
* and to alter it and redistribute it freely, subject to
* the following restrictions:
*
* 1. The origin of this software must not be
* misrepresented; you must not claim that you
* wrote the original software. If you use this
* software in a product, an acknowledgment in
* the product documentation would be appreciated
* but is not required.
*
* 2. Altered source versions must be plainly marked
* as such, and must not be misrepresented as
* being the original software.
*
* 3. This notice may not be removed or altered from
* any source distribution.
*/
#ifndef UZLIB_H_INCLUDED
#define UZLIB_H_INCLUDED
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include "defl_static.h"
#include "uzlib_conf.h"
#if UZLIB_CONF_DEBUG_LOG
#include <stdio.h>
#endif
/* calling convention */
#ifndef TINFCC
#ifdef __WATCOMC__
#define TINFCC __cdecl
#else
#define TINFCC
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* ok status, more data produced */
#define TINF_OK 0
/* end of compressed stream reached */
#define TINF_DONE 1
#define TINF_DATA_ERROR (-3)
#define TINF_CHKSUM_ERROR (-4)
#define TINF_DICT_ERROR (-5)
/* checksum types */
#define TINF_CHKSUM_NONE 0
#define TINF_CHKSUM_ADLER 1
#define TINF_CHKSUM_CRC 2
/* helper macros */
#define TINF_ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*(arr)))
/* data structures */
typedef struct {
unsigned short table[16]; /* table of code length counts */
unsigned short trans[288]; /* code -> symbol translation table */
} TINF_TREE;
struct uzlib_uncomp {
/* Pointer to the next byte in the input buffer */
const unsigned char *source;
/* Pointer to the next byte past the input buffer (source_limit = source + len) */
const unsigned char *source_limit;
/* If source_limit == NULL, or source >= source_limit, this function
will be used to read next byte from source stream. The function may
also return -1 in case of EOF (or irrecoverable error). Note that
besides returning the next byte, it may also update source and
source_limit fields, thus allowing for buffered operation. */
int (*source_read_cb)(struct uzlib_uncomp *uncomp);
unsigned int tag;
unsigned int bitcount;
/* Destination (output) buffer start */
unsigned char *dest_start;
/* Current pointer in dest buffer */
unsigned char *dest;
/* Pointer past the end of the dest buffer, similar to source_limit */
unsigned char *dest_limit;
/* Accumulating checksum */
unsigned int checksum;
char checksum_type;
bool eof;
int btype;
int bfinal;
unsigned int curlen;
int lzOff;
unsigned char *dict_ring;
unsigned int dict_size;
unsigned int dict_idx;
TINF_TREE ltree; /* dynamic length/symbol tree */
TINF_TREE dtree; /* dynamic distance tree */
};
#include "tinf_compat.h"
#define TINF_PUT(d, c) \
{ \
*d->dest++ = c; \
if (d->dict_ring) { d->dict_ring[d->dict_idx++] = c; if (d->dict_idx == d->dict_size) d->dict_idx = 0; } \
}
unsigned char TINFCC uzlib_get_byte(TINF_DATA *d);
/* Decompression API */
void TINFCC uzlib_init(void);
void TINFCC uzlib_uncompress_init(TINF_DATA *d, void *dict, unsigned int dictLen);
int TINFCC uzlib_uncompress(TINF_DATA *d);
int TINFCC uzlib_uncompress_chksum(TINF_DATA *d);
int TINFCC uzlib_zlib_parse_header(TINF_DATA *d);
int TINFCC uzlib_gzip_parse_header(TINF_DATA *d);
/* Compression API */
typedef const uint8_t *uzlib_hash_entry_t;
struct uzlib_comp {
struct Outbuf out;
uzlib_hash_entry_t *hash_table;
unsigned int hash_bits;
unsigned int dict_size;
};
void TINFCC uzlib_compress(struct uzlib_comp *c, const uint8_t *src, unsigned slen);
/* Checksum API */
/* prev_sum is previous value for incremental computation, 1 initially */
uint32_t TINFCC uzlib_adler32(const void *data, unsigned int length, uint32_t prev_sum);
/* crc is previous value for incremental computation, 0xffffffff initially */
uint32_t TINFCC uzlib_crc32(const void *data, unsigned int length, uint32_t crc);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* UZLIB_H_INCLUDED */

22
lib/uzlib/uzlib_conf.h Normal file
View File

@ -0,0 +1,22 @@
/*
* uzlib - tiny deflate/inflate library (deflate, gzip, zlib)
*
* Copyright (c) 2014-2018 by Paul Sokolovsky
*/
#ifndef UZLIB_CONF_H_INCLUDED
#define UZLIB_CONF_H_INCLUDED
#ifndef UZLIB_CONF_DEBUG_LOG
/* Debug logging level 0, 1, 2, etc. */
#define UZLIB_CONF_DEBUG_LOG 0
#endif
#ifndef UZLIB_CONF_PARANOID_CHECKS
/* Perform extra checks on the input stream, even if they aren't proven
to be strictly required (== lack of them wasn't proven to lead to
crashes). */
#define UZLIB_CONF_PARANOID_CHECKS 0
#endif
#endif /* UZLIB_CONF_H_INCLUDED */

View File

@ -560,6 +560,10 @@ msgstr ""
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "Kedalaman bit harus kelipatan 8." msgstr "Kedalaman bit harus kelipatan 8."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "" msgstr ""
@ -2523,10 +2527,6 @@ msgstr "__new__ arg harus berupa user-type"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "sebuah objek menyerupai byte (bytes-like) dibutuhkan" msgstr "sebuah objek menyerupai byte (bytes-like) dibutuhkan"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort() dipanggil"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "alamat di luar batas" msgstr "alamat di luar batas"
@ -3022,6 +3022,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "" msgstr ""
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "" msgstr ""
@ -3103,26 +3107,6 @@ msgstr "argumen keyword ekstra telah diberikan"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "argumen posisi ekstra telah diberikan" msgstr "argumen posisi ekstra telah diberikan"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr ""
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr ""
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr ""
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr ""
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3400,10 +3384,6 @@ msgstr ""
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "argumen-argumen tidak valid"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4009,7 +3989,7 @@ msgid "queue overflow"
msgstr "antrian meluap (overflow)" msgstr "antrian meluap (overflow)"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
@ -4070,7 +4050,7 @@ msgstr "nilai sampling keluar dari jangkauan"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "kompilasi script tidak didukung" msgstr "kompilasi script tidak didukung"
@ -4346,7 +4326,7 @@ msgid "unicode name escapes"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "" msgstr ""
#: py/objstr.c #: py/objstr.c
@ -4500,6 +4480,12 @@ msgstr "zi harus berjenis float"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "abort() called"
#~ msgstr "abort() dipanggil"
#~ msgid "invalid arguments"
#~ msgstr "argumen-argumen tidak valid"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "daftar %q harus berupa daftar" #~ msgstr "daftar %q harus berupa daftar"

View File

@ -551,6 +551,10 @@ msgstr ""
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "" msgstr ""
@ -2485,10 +2489,6 @@ msgstr ""
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "" msgstr ""
#: lib/embed/abort_.c
msgid "abort() called"
msgstr ""
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "" msgstr ""
@ -2984,6 +2984,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "" msgstr ""
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "" msgstr ""
@ -3065,26 +3069,6 @@ msgstr ""
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "" msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr ""
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr ""
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr ""
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr ""
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3362,10 +3346,6 @@ msgstr ""
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -3970,7 +3950,7 @@ msgid "queue overflow"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
@ -4031,7 +4011,7 @@ msgstr ""
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""
@ -4307,7 +4287,7 @@ msgid "unicode name escapes"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "" msgstr ""
#: py/objstr.c #: py/objstr.c

View File

@ -554,6 +554,10 @@ msgstr ""
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "" msgstr ""
@ -2484,10 +2488,6 @@ msgstr ""
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "" msgstr ""
#: lib/embed/abort_.c
msgid "abort() called"
msgstr ""
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "" msgstr ""
@ -2983,6 +2983,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "" msgstr ""
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "" msgstr ""
@ -3064,26 +3068,6 @@ msgstr ""
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "" msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr ""
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr ""
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr ""
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr ""
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3361,10 +3345,6 @@ msgstr ""
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -3969,7 +3949,7 @@ msgid "queue overflow"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
@ -4030,7 +4010,7 @@ msgstr ""
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""
@ -4306,7 +4286,7 @@ msgid "unicode name escapes"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "" msgstr ""
#: py/objstr.c #: py/objstr.c

View File

@ -562,6 +562,10 @@ msgstr "Bittiefe muss zwischen 1 und 6 liegen, nicht %d"
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "Bit depth muss ein Vielfaches von 8 sein." msgstr "Bit depth muss ein Vielfaches von 8 sein."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "Sowohl RX als auch TX sind zu Flusssteuerung erforderlich" msgstr "Sowohl RX als auch TX sind zu Flusssteuerung erforderlich"
@ -2529,10 +2533,6 @@ msgstr "__new__ arg muss user-type sein"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "ein Byte-ähnliches Objekt ist erforderlich" msgstr "ein Byte-ähnliches Objekt ist erforderlich"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort() wurde aufgerufen"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "Adresse außerhalb der Grenzen" msgstr "Adresse außerhalb der Grenzen"
@ -3040,6 +3040,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "Division durch Null" msgstr "Division durch Null"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "leer" msgstr "leer"
@ -3121,26 +3125,6 @@ msgstr "Es wurden zusätzliche Schlüsselwort-Argumente angegeben"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "Es wurden zusätzliche Argumente ohne Schlüsselwort angegeben" msgstr "Es wurden zusätzliche Argumente ohne Schlüsselwort angegeben"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr "f-string expression Teil kann kein '#' beinhalten"
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr "Die f-String expression darf keinen Backslash enthalten"
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr "f-string: leere expression nicht erlaubt"
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr "f-string: erwartet '}'"
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr "f-string: einzelne '}' nicht erlaubt"
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3420,10 +3404,6 @@ msgstr "Das Intervall muss im Bereich %s-%s sein"
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "ungültige argumente"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4038,8 +4018,8 @@ msgid "queue overflow"
msgstr "Warteschlangenüberlauf" msgstr "Warteschlangenüberlauf"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "rohe F-Strings sind nicht implementiert" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "real and imaginary parts must be of equal length" msgid "real and imaginary parts must be of equal length"
@ -4101,7 +4081,7 @@ msgstr "Abtastrate außerhalb der Reichweite"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "kompilieren von Skripten nicht unterstützt" msgstr "kompilieren von Skripten nicht unterstützt"
@ -4380,10 +4360,8 @@ msgid "unicode name escapes"
msgstr "Unicode Name ausgebrochen (escaped)" msgstr "Unicode Name ausgebrochen (escaped)"
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "" msgstr ""
"Einrückung entspricht keiner äußeren Einrückungsebene. Bitte Leerzeichen am "
"Zeilenanfang kontrollieren"
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4536,6 +4514,35 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "abort() called"
#~ msgstr "abort() wurde aufgerufen"
#~ msgid "f-string expression part cannot include a '#'"
#~ msgstr "f-string expression Teil kann kein '#' beinhalten"
#~ msgid "f-string expression part cannot include a backslash"
#~ msgstr "Die f-String expression darf keinen Backslash enthalten"
#~ msgid "f-string: empty expression not allowed"
#~ msgstr "f-string: leere expression nicht erlaubt"
#~ msgid "f-string: expecting '}'"
#~ msgstr "f-string: erwartet '}'"
#~ msgid "f-string: single '}' is not allowed"
#~ msgstr "f-string: einzelne '}' nicht erlaubt"
#~ msgid "invalid arguments"
#~ msgstr "ungültige argumente"
#~ msgid "raw f-strings are not implemented"
#~ msgstr "rohe F-Strings sind nicht implementiert"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr ""
#~ "Einrückung entspricht keiner äußeren Einrückungsebene. Bitte Leerzeichen "
#~ "am Zeilenanfang kontrollieren"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "%q Liste muss eine Liste sein" #~ msgstr "%q Liste muss eine Liste sein"

View File

@ -551,6 +551,10 @@ msgstr ""
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "" msgstr ""
@ -2481,10 +2485,6 @@ msgstr ""
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "" msgstr ""
#: lib/embed/abort_.c
msgid "abort() called"
msgstr ""
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "" msgstr ""
@ -2980,6 +2980,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "" msgstr ""
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "" msgstr ""
@ -3061,26 +3065,6 @@ msgstr ""
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "" msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr ""
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr ""
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr ""
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr ""
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3358,10 +3342,6 @@ msgstr ""
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -3966,7 +3946,7 @@ msgid "queue overflow"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
@ -4027,7 +4007,7 @@ msgstr ""
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""
@ -4303,7 +4283,7 @@ msgid "unicode name escapes"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "" msgstr ""
#: py/objstr.c #: py/objstr.c

View File

@ -562,6 +562,10 @@ msgstr "Bit depth must be from 1 to 6 inclusive, not %d"
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "Bit depth must be multiple of 8." msgstr "Bit depth must be multiple of 8."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "Both RX and TX required for flow control" msgstr "Both RX and TX required for flow control"
@ -2520,10 +2524,6 @@ msgstr "__new__ arg must be a user-type"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "a bytes-like object is required" msgstr "a bytes-like object is required"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort() called"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "address out of bounds" msgstr "address out of bounds"
@ -3022,6 +3022,10 @@ msgstr "divide by zero"
msgid "division by zero" msgid "division by zero"
msgstr "division by zero" msgstr "division by zero"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "empty" msgstr "empty"
@ -3103,26 +3107,6 @@ msgstr "extra keyword arguments given"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "extra positional arguments given" msgstr "extra positional arguments given"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr "f-string expression part cannot include a '#'"
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr "f-string expression part cannot include a backslash"
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr "f-string: empty expression not allowed"
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr "f-string: expecting '}'"
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr "f-string: single '}' is not allowed"
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3400,10 +3384,6 @@ msgstr "interval must be in range %s-%s"
msgid "invalid architecture" msgid "invalid architecture"
msgstr "invalid architecture" msgstr "invalid architecture"
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "invalid arguments"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4008,8 +3988,8 @@ msgid "queue overflow"
msgstr "queue overflow" msgstr "queue overflow"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "raw f-strings are not implemented" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "real and imaginary parts must be of equal length" msgid "real and imaginary parts must be of equal length"
@ -4071,7 +4051,7 @@ msgstr "sampling rate out of range"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "schedule queue full" msgstr "schedule queue full"
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "script compilation not supported" msgstr "script compilation not supported"
@ -4347,8 +4327,8 @@ msgid "unicode name escapes"
msgstr "unicode name escapes" msgstr "unicode name escapes"
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "unindent does not match any outer indentation level" msgstr ""
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4501,6 +4481,33 @@ msgstr "zi must be of float type"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)"
#~ msgid "abort() called"
#~ msgstr "abort() called"
#~ msgid "f-string expression part cannot include a '#'"
#~ msgstr "f-string expression part cannot include a '#'"
#~ msgid "f-string expression part cannot include a backslash"
#~ msgstr "f-string expression part cannot include a backslash"
#~ msgid "f-string: empty expression not allowed"
#~ msgstr "f-string: empty expression not allowed"
#~ msgid "f-string: expecting '}'"
#~ msgstr "f-string: expecting '}'"
#~ msgid "f-string: single '}' is not allowed"
#~ msgstr "f-string: single '}' is not allowed"
#~ msgid "invalid arguments"
#~ msgstr "invalid arguments"
#~ msgid "raw f-strings are not implemented"
#~ msgstr "raw f-strings are not implemented"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr "unindent does not match any outer indentation level"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "%q list must be a list" #~ msgstr "%q list must be a list"

View File

@ -2943,7 +2943,7 @@ msgstr ""
msgid "schedule stack full" msgid "schedule stack full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: shared/runtime/pyexec.c py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""

View File

@ -2950,7 +2950,7 @@ msgstr ""
msgid "schedule stack full" msgid "schedule stack full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: shared/runtime/pyexec.c py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""

View File

@ -566,6 +566,10 @@ msgstr "Bit depth tiene que ser de 1 a 6 inclusivo, no %d"
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "Bits depth debe ser múltiplo de 8." msgstr "Bits depth debe ser múltiplo de 8."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "Ambos RX y TX requeridos para control de flujo" msgstr "Ambos RX y TX requeridos para control de flujo"
@ -2556,10 +2560,6 @@ msgstr "__new__ arg debe ser un user-type"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "se requiere un objeto bytes-like" msgstr "se requiere un objeto bytes-like"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "se llamó abort()"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "address fuera de límites" msgstr "address fuera de límites"
@ -3062,6 +3062,10 @@ msgstr "divide por cero"
msgid "division by zero" msgid "division by zero"
msgstr "división por cero" msgstr "división por cero"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "vacío" msgstr "vacío"
@ -3143,26 +3147,6 @@ msgstr "argumento(s) por palabra clave adicionales fueron dados"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "argumento posicional adicional dado" msgstr "argumento posicional adicional dado"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr "La parte de expresión f-string no puede incluir un '#'"
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr "La parte de expresión f-string no puede incluir una barra invertida"
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr "cadena-f: expresión vacía no permitida"
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr "f-string: esperando '}'"
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr "cadena-f: solo '}' no está permitido"
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3440,10 +3424,6 @@ msgstr "el intervalo debe ser der rango %s-%s"
msgid "invalid architecture" msgid "invalid architecture"
msgstr "arquitectura inválida" msgstr "arquitectura inválida"
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "argumentos inválidos"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4055,8 +4035,8 @@ msgid "queue overflow"
msgstr "desbordamiento de cola(queue)" msgstr "desbordamiento de cola(queue)"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "no está implementado cadenas-f sin procesar" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "real and imaginary parts must be of equal length" msgid "real and imaginary parts must be of equal length"
@ -4118,7 +4098,7 @@ msgstr "frecuencia de muestreo fuera de rango"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "cola de planificación llena" msgstr "cola de planificación llena"
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "script de compilación no soportado" msgstr "script de compilación no soportado"
@ -4395,8 +4375,8 @@ msgid "unicode name escapes"
msgstr "nombre en unicode escapa" msgstr "nombre en unicode escapa"
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "sangría no coincide con ningún nivel exterior" msgstr ""
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4549,6 +4529,33 @@ msgstr "zi debe ser de tipo flotante"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "zi debe ser una forma (n_section,2)" msgstr "zi debe ser una forma (n_section,2)"
#~ msgid "abort() called"
#~ msgstr "se llamó abort()"
#~ msgid "f-string expression part cannot include a '#'"
#~ msgstr "La parte de expresión f-string no puede incluir un '#'"
#~ msgid "f-string expression part cannot include a backslash"
#~ msgstr "La parte de expresión f-string no puede incluir una barra invertida"
#~ msgid "f-string: empty expression not allowed"
#~ msgstr "cadena-f: expresión vacía no permitida"
#~ msgid "f-string: expecting '}'"
#~ msgstr "f-string: esperando '}'"
#~ msgid "f-string: single '}' is not allowed"
#~ msgstr "cadena-f: solo '}' no está permitido"
#~ msgid "invalid arguments"
#~ msgstr "argumentos inválidos"
#~ msgid "raw f-strings are not implemented"
#~ msgstr "no está implementado cadenas-f sin procesar"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr "sangría no coincide con ningún nivel exterior"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "%q lista debe ser una lista" #~ msgstr "%q lista debe ser una lista"

View File

@ -558,6 +558,10 @@ msgstr ""
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "Bit depth ay dapat multiple ng 8." msgstr "Bit depth ay dapat multiple ng 8."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "" msgstr ""
@ -2509,10 +2513,6 @@ msgstr "__new__ arg ay dapat na user-type"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "a bytes-like object ay kailangan" msgstr "a bytes-like object ay kailangan"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort() tinawag"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "wala sa sakop ang address" msgstr "wala sa sakop ang address"
@ -3019,6 +3019,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "dibisyon ng zero" msgstr "dibisyon ng zero"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "walang laman" msgstr "walang laman"
@ -3101,26 +3105,6 @@ msgstr "dagdag na keyword argument na ibinigay"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "dagdag na positional argument na ibinigay" msgstr "dagdag na positional argument na ibinigay"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr ""
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr ""
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr ""
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr ""
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3399,10 +3383,6 @@ msgstr ""
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "mali ang mga argumento"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4013,7 +3993,7 @@ msgid "queue overflow"
msgstr "puno na ang pila (overflow)" msgstr "puno na ang pila (overflow)"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
@ -4076,7 +4056,7 @@ msgstr "pagpili ng rate wala sa sakop"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "script kompilasyon hindi supportado" msgstr "script kompilasyon hindi supportado"
@ -4354,8 +4334,8 @@ msgid "unicode name escapes"
msgstr "unicode name escapes" msgstr "unicode name escapes"
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "unindent hindi tugma sa indentation level sa labas" msgstr ""
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4510,6 +4490,15 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "abort() called"
#~ msgstr "abort() tinawag"
#~ msgid "invalid arguments"
#~ msgstr "mali ang mga argumento"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr "unindent hindi tugma sa indentation level sa labas"
#, fuzzy #, fuzzy
#~ msgid "Expected a Characteristic" #~ msgid "Expected a Characteristic"
#~ msgstr "Hindi mabasa and Characteristic." #~ msgstr "Hindi mabasa and Characteristic."

View File

@ -568,6 +568,10 @@ msgstr "Bit depth doit être entre 1 et 6 inclusivement, et non %d"
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "La profondeur de bit doit être un multiple de 8." msgstr "La profondeur de bit doit être un multiple de 8."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "RX et TX requis pour le contrôle de flux" msgstr "RX et TX requis pour le contrôle de flux"
@ -2558,10 +2562,6 @@ msgstr "l'argument __new__ doit être d'un type défini par l'utilisateur"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "un objet 'bytes-like' est requis" msgstr "un objet 'bytes-like' est requis"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort() appelé"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "adresse hors limites" msgstr "adresse hors limites"
@ -3068,6 +3068,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "division par zéro" msgstr "division par zéro"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "vide" msgstr "vide"
@ -3149,28 +3153,6 @@ msgstr "argument(s) nommé(s) supplémentaire(s) donné(s)"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "argument(s) positionnel(s) supplémentaire(s) donné(s)" msgstr "argument(s) positionnel(s) supplémentaire(s) donné(s)"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr "La partie d'expression de chaîne f ne peut pas inclure de '#'"
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr ""
"La partie d'expression de chaîne f ne peut pas inclure de barre oblique "
"inverse"
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr "f-string : expression vide non autorisée"
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr "f-string : attend '}'"
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr "f-string : single '}' n'est pas autorisé"
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3449,10 +3431,6 @@ msgstr "interval doit être dans la portée %s-%s"
msgid "invalid architecture" msgid "invalid architecture"
msgstr "architecture invalide" msgstr "architecture invalide"
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "arguments invalides"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4066,8 +4044,8 @@ msgid "queue overflow"
msgstr "dépassement de file" msgstr "dépassement de file"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "les chaînes f brutes ne sont pas implémentées" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "real and imaginary parts must be of equal length" msgid "real and imaginary parts must be of equal length"
@ -4129,7 +4107,7 @@ msgstr "taux d'échantillonage hors bornes"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "file de schédule pleine" msgstr "file de schédule pleine"
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "compilation de script non supportée" msgstr "compilation de script non supportée"
@ -4406,8 +4384,8 @@ msgid "unicode name escapes"
msgstr "échappements de nom unicode" msgstr "échappements de nom unicode"
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "la désindentation ne correspond à aucune indentation précédente" msgstr ""
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4560,6 +4538,35 @@ msgstr "zi doit être de type float"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "zi doit être de forme (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)"
#~ msgid "abort() called"
#~ msgstr "abort() appelé"
#~ msgid "f-string expression part cannot include a '#'"
#~ msgstr "La partie d'expression de chaîne f ne peut pas inclure de '#'"
#~ msgid "f-string expression part cannot include a backslash"
#~ msgstr ""
#~ "La partie d'expression de chaîne f ne peut pas inclure de barre oblique "
#~ "inverse"
#~ msgid "f-string: empty expression not allowed"
#~ msgstr "f-string : expression vide non autorisée"
#~ msgid "f-string: expecting '}'"
#~ msgstr "f-string : attend '}'"
#~ msgid "f-string: single '}' is not allowed"
#~ msgstr "f-string : single '}' n'est pas autorisé"
#~ msgid "invalid arguments"
#~ msgstr "arguments invalides"
#~ msgid "raw f-strings are not implemented"
#~ msgstr "les chaînes f brutes ne sont pas implémentées"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr "la désindentation ne correspond à aucune indentation précédente"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "La liste %q doit être une liste" #~ msgstr "La liste %q doit être une liste"

View File

@ -551,6 +551,10 @@ msgstr ""
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "" msgstr ""
@ -2481,10 +2485,6 @@ msgstr ""
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "" msgstr ""
#: lib/embed/abort_.c
msgid "abort() called"
msgstr ""
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "" msgstr ""
@ -2980,6 +2980,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "" msgstr ""
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "" msgstr ""
@ -3061,26 +3065,6 @@ msgstr ""
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "" msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr ""
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr ""
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr ""
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr ""
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3358,10 +3342,6 @@ msgstr ""
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -3966,7 +3946,7 @@ msgid "queue overflow"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
@ -4027,7 +4007,7 @@ msgstr ""
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""
@ -4303,7 +4283,7 @@ msgid "unicode name escapes"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "" msgstr ""
#: py/objstr.c #: py/objstr.c

View File

@ -566,6 +566,10 @@ msgstr "La profondità dei bit deve essere inclusiva da 1 a 6, non %d"
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "La profondità di bit deve essere un multiplo di 8." msgstr "La profondità di bit deve essere un multiplo di 8."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "Sia RX che TX richiedono il controllo del flow" msgstr "Sia RX che TX richiedono il controllo del flow"
@ -2522,10 +2526,6 @@ msgstr ""
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "un oggetto byte-like è richiesto" msgstr "un oggetto byte-like è richiesto"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort() chiamato"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "indirizzo fuori limite" msgstr "indirizzo fuori limite"
@ -3030,6 +3030,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "divisione per zero" msgstr "divisione per zero"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "vuoto" msgstr "vuoto"
@ -3112,26 +3116,6 @@ msgstr "argomento nominato aggiuntivo fornito"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "argomenti posizonali extra dati" msgstr "argomenti posizonali extra dati"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr ""
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr ""
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr ""
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr ""
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3410,10 +3394,6 @@ msgstr ""
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "argomenti non validi"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4029,7 +4009,7 @@ msgid "queue overflow"
msgstr "overflow della coda" msgstr "overflow della coda"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
@ -4092,7 +4072,7 @@ msgstr "frequenza di campionamento fuori intervallo"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "compilazione dello scrip non suportata" msgstr "compilazione dello scrip non suportata"
@ -4370,7 +4350,7 @@ msgid "unicode name escapes"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "" msgstr ""
#: py/objstr.c #: py/objstr.c
@ -4526,6 +4506,12 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "abort() called"
#~ msgstr "abort() chiamato"
#~ msgid "invalid arguments"
#~ msgstr "argomenti non validi"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "lista %q deve essere una lista" #~ msgstr "lista %q deve essere una lista"

View File

@ -558,6 +558,10 @@ msgstr ""
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "ビット深度は8の倍数でなければなりません" msgstr "ビット深度は8の倍数でなければなりません"
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "フロー制御のためRXとTXの両方が必要" msgstr "フロー制御のためRXとTXの両方が必要"
@ -2496,10 +2500,6 @@ msgstr "__new__の引数はユーザ型でなければなりません"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "bytes-likeオブジェクトが必要" msgstr "bytes-likeオブジェクトが必要"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort()が呼ばれました"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "アドレスが範囲外" msgstr "アドレスが範囲外"
@ -2999,6 +2999,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "ゼロ除算 (division by zero)" msgstr "ゼロ除算 (division by zero)"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "" msgstr ""
@ -3080,26 +3084,6 @@ msgstr "余分なキーワード引数があります"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "余分な位置引数が与えられました" msgstr "余分な位置引数が与えられました"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr "f-文字列の表現部は '#' を持てません"
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr "f-文字列の表現部はバックスラッシュを持てません"
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr "f-文字列: 空の表現は許されません"
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr "f-string: '}'が必要"
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr "f-string: 1つだけの'}'は許されません"
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3378,10 +3362,6 @@ msgstr "intervalは%s-%sの範囲でなければなりません"
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "不正な引数"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -3988,8 +3968,8 @@ msgid "queue overflow"
msgstr "キューがオーバーフローしました" msgstr "キューがオーバーフローしました"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "raw f-文字列は実装されていません" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "real and imaginary parts must be of equal length" msgid "real and imaginary parts must be of equal length"
@ -4050,7 +4030,7 @@ msgstr "サンプリングレートが範囲外"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "スクリプトのコンパイルは非対応" msgstr "スクリプトのコンパイルは非対応"
@ -4326,8 +4306,8 @@ msgid "unicode name escapes"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "インデントの解除が、外側のどのインデントにも一致していません" msgstr ""
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4480,6 +4460,33 @@ msgstr "ziはfloat値でなければなりません"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "abort() called"
#~ msgstr "abort()が呼ばれました"
#~ msgid "f-string expression part cannot include a '#'"
#~ msgstr "f-文字列の表現部は '#' を持てません"
#~ msgid "f-string expression part cannot include a backslash"
#~ msgstr "f-文字列の表現部はバックスラッシュを持てません"
#~ msgid "f-string: empty expression not allowed"
#~ msgstr "f-文字列: 空の表現は許されません"
#~ msgid "f-string: expecting '}'"
#~ msgstr "f-string: '}'が必要"
#~ msgid "f-string: single '}' is not allowed"
#~ msgstr "f-string: 1つだけの'}'は許されません"
#~ msgid "invalid arguments"
#~ msgstr "不正な引数"
#~ msgid "raw f-strings are not implemented"
#~ msgstr "raw f-文字列は実装されていません"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr "インデントの解除が、外側のどのインデントにも一致していません"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "%q リストはリストでなければなりません" #~ msgstr "%q リストはリストでなければなりません"

View File

@ -554,6 +554,10 @@ msgstr ""
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "" msgstr ""
@ -2485,10 +2489,6 @@ msgstr ""
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "" msgstr ""
#: lib/embed/abort_.c
msgid "abort() called"
msgstr ""
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "" msgstr ""
@ -2984,6 +2984,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "" msgstr ""
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "" msgstr ""
@ -3065,26 +3069,6 @@ msgstr ""
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "" msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr ""
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr ""
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr ""
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr ""
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3362,10 +3346,6 @@ msgstr ""
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -3970,7 +3950,7 @@ msgid "queue overflow"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
@ -4031,7 +4011,7 @@ msgstr ""
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""
@ -4307,7 +4287,7 @@ msgid "unicode name escapes"
msgstr "" msgstr ""
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "" msgstr ""
#: py/objstr.c #: py/objstr.c

View File

@ -556,6 +556,10 @@ msgstr "Bitdiepte moet tussen 1 en 6 liggen, niet %d"
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "Bit diepte moet een meervoud van 8 zijn." msgstr "Bit diepte moet een meervoud van 8 zijn."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "RX en TX zijn beide vereist voor stroomregeling" msgstr "RX en TX zijn beide vereist voor stroomregeling"
@ -2518,10 +2522,6 @@ msgstr "__new__ arg moet een user-type zijn"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "een bytes-achtig object is vereist" msgstr "een bytes-achtig object is vereist"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort() aangeroepen"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "adres buiten bereik" msgstr "adres buiten bereik"
@ -3021,6 +3021,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "deling door nul" msgstr "deling door nul"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "leeg" msgstr "leeg"
@ -3102,26 +3106,6 @@ msgstr "extra keyword argumenten gegeven"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "extra positionele argumenten gegeven" msgstr "extra positionele argumenten gegeven"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr "f-string expressie deel kan geen '#' bevatten"
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr "f-string expressie deel kan geen backslash bevatten"
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr "f-string: lege expressie niet toegestaan"
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr "f-string: verwacht '}'"
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr "f-string: enkele '}' is niet toegestaan"
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3400,10 +3384,6 @@ msgstr "interval moet binnen bereik %s-%s vallen"
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "ongeldige argumenten"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4012,8 +3992,8 @@ msgid "queue overflow"
msgstr "wachtrij overloop" msgstr "wachtrij overloop"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "ruwe f-strings zijn niet geïmplementeerd" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "real and imaginary parts must be of equal length" msgid "real and imaginary parts must be of equal length"
@ -4075,7 +4055,7 @@ msgstr "bemonsteringssnelheid buiten bereik"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "scriptcompilatie wordt niet ondersteund" msgstr "scriptcompilatie wordt niet ondersteund"
@ -4351,8 +4331,8 @@ msgid "unicode name escapes"
msgstr "op naam gebaseerde unicode escapes zijn niet geïmplementeerd" msgstr "op naam gebaseerde unicode escapes zijn niet geïmplementeerd"
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "inspringing komt niet overeen met hoger gelegen inspringingsniveaus" msgstr ""
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4505,6 +4485,33 @@ msgstr "zi moet van type float zijn"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "zi moet vorm (n_section, 2) hebben" msgstr "zi moet vorm (n_section, 2) hebben"
#~ msgid "abort() called"
#~ msgstr "abort() aangeroepen"
#~ msgid "f-string expression part cannot include a '#'"
#~ msgstr "f-string expressie deel kan geen '#' bevatten"
#~ msgid "f-string expression part cannot include a backslash"
#~ msgstr "f-string expressie deel kan geen backslash bevatten"
#~ msgid "f-string: empty expression not allowed"
#~ msgstr "f-string: lege expressie niet toegestaan"
#~ msgid "f-string: expecting '}'"
#~ msgstr "f-string: verwacht '}'"
#~ msgid "f-string: single '}' is not allowed"
#~ msgstr "f-string: enkele '}' is niet toegestaan"
#~ msgid "invalid arguments"
#~ msgstr "ongeldige argumenten"
#~ msgid "raw f-strings are not implemented"
#~ msgstr "ruwe f-strings zijn niet geïmplementeerd"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr "inspringing komt niet overeen met hoger gelegen inspringingsniveaus"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "%q lijst moet een lijst zijn" #~ msgstr "%q lijst moet een lijst zijn"

View File

@ -558,6 +558,10 @@ msgstr ""
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "Głębia musi być wielokrotnością 8." msgstr "Głębia musi być wielokrotnością 8."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "Do kontroli przepływu wymagane są zarówno RX, jak i TX" msgstr "Do kontroli przepływu wymagane są zarówno RX, jak i TX"
@ -2498,10 +2502,6 @@ msgstr "Argument __new__ musi być typu użytkownika"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "wymagany obiekt typu bytes" msgstr "wymagany obiekt typu bytes"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "Wywołano abort()"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "adres poza zakresem" msgstr "adres poza zakresem"
@ -2998,6 +2998,10 @@ msgstr ""
msgid "division by zero" msgid "division by zero"
msgstr "dzielenie przez zero" msgstr "dzielenie przez zero"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "puste" msgstr "puste"
@ -3079,26 +3083,6 @@ msgstr "nadmiarowe argumenty nazwane"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "nadmiarowe argumenty pozycyjne" msgstr "nadmiarowe argumenty pozycyjne"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr ""
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr ""
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr ""
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr ""
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr ""
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3376,10 +3360,6 @@ msgstr "interwał musi mieścić się w zakresie %s-%s"
msgid "invalid architecture" msgid "invalid architecture"
msgstr "" msgstr ""
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "złe arguemnty"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -3985,7 +3965,7 @@ msgid "queue overflow"
msgstr "przepełnienie kolejki" msgstr "przepełnienie kolejki"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
@ -4047,7 +4027,7 @@ msgstr "częstotliwość próbkowania poza zakresem"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "" msgstr ""
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "kompilowanie skryptów nieobsługiwane" msgstr "kompilowanie skryptów nieobsługiwane"
@ -4323,8 +4303,8 @@ msgid "unicode name escapes"
msgstr "nazwy unicode" msgstr "nazwy unicode"
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "wcięcie nie pasuje do żadnego wcześniejszego wcięcia" msgstr ""
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4477,6 +4457,15 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "abort() called"
#~ msgstr "Wywołano abort()"
#~ msgid "invalid arguments"
#~ msgstr "złe arguemnty"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr "wcięcie nie pasuje do żadnego wcześniejszego wcięcia"
#~ msgid "Column entry must be digitalio.DigitalInOut" #~ msgid "Column entry must be digitalio.DigitalInOut"
#~ msgstr "Kolumny muszą być typu digitalio.DigitalInOut" #~ msgstr "Kolumny muszą być typu digitalio.DigitalInOut"

View File

@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n" "POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2021-10-08 16:30+0000\n" "PO-Revision-Date: 2021-10-20 07:36+0000\n"
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n" "Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: pt_BR\n" "Language: pt_BR\n"
@ -151,7 +151,7 @@ msgstr "%q deve estar entre %d e %d"
#: py/argcheck.c #: py/argcheck.c
msgid "%q must be of type %q" msgid "%q must be of type %q"
msgstr "" msgstr "%q deve ser do tipo %q"
#: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/busio/UART.c
msgid "%q must be power of 2" msgid "%q must be power of 2"
@ -569,6 +569,12 @@ msgstr "A profundidade dos bits deve ser de 1 até 6 inclusive, porém não %d"
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "A profundidade de bits deve ser o múltiplo de 8." msgstr "A profundidade de bits deve ser o múltiplo de 8."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
"O dispositivo de inicialização deve ser o primeiro dispositivo (interface "
"#0)."
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "Ambos os RX e TX são necessários para o controle do fluxo" msgstr "Ambos os RX e TX são necessários para o controle do fluxo"
@ -2563,10 +2569,6 @@ msgstr "O argumento __new__ deve ser um tipo usuário"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "é necessário objetos tipo bytes" msgstr "é necessário objetos tipo bytes"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort() chamado"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "endereço fora dos limites" msgstr "endereço fora dos limites"
@ -3071,6 +3073,10 @@ msgstr "divido por zero"
msgid "division by zero" msgid "division by zero"
msgstr "divisão por zero" msgstr "divisão por zero"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr "o divisor deve ser 4"
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "vazio" msgstr "vazio"
@ -3152,26 +3158,6 @@ msgstr "argumentos extras de palavras-chave passados"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "argumentos extra posicionais passados" msgstr "argumentos extra posicionais passados"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr "A parte da expressão f-string não pode incluir um '#'"
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr "A parte da expressão f-string não pode incluir uma barra invertida"
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr "f-string: expressão vazia não é permitida"
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr "f-string: esperando '}'"
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr "f-string: um único '}' não é permitido"
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3450,10 +3436,6 @@ msgstr "o intervalo deve estar entre %s-%s"
msgid "invalid architecture" msgid "invalid architecture"
msgstr "arquitetura inválida" msgstr "arquitetura inválida"
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "argumentos inválidos"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4068,8 +4050,8 @@ msgid "queue overflow"
msgstr "estouro de fila" msgstr "estouro de fila"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "o f-strings bruto não estão implementados" msgstr "os f-strings brutos não são suportados"
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "real and imaginary parts must be of equal length" msgid "real and imaginary parts must be of equal length"
@ -4131,7 +4113,7 @@ msgstr "Taxa de amostragem fora do intervalo"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "fila de espera cheia" msgstr "fila de espera cheia"
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "compilação de script não suportada" msgstr "compilação de script não suportada"
@ -4407,8 +4389,8 @@ msgid "unicode name escapes"
msgstr "escapar o nome unicode" msgstr "escapar o nome unicode"
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "o unindent não coincide com nenhum nível de recuo externo" msgstr "sem indentação não corresponde com nenhum nível de indentação exterior"
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4561,6 +4543,33 @@ msgstr "zi deve ser de um tipo float"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "zi deve estar na forma (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)"
#~ msgid "abort() called"
#~ msgstr "abort() chamado"
#~ msgid "f-string expression part cannot include a '#'"
#~ msgstr "A parte da expressão f-string não pode incluir um '#'"
#~ msgid "f-string expression part cannot include a backslash"
#~ msgstr "A parte da expressão f-string não pode incluir uma barra invertida"
#~ msgid "f-string: empty expression not allowed"
#~ msgstr "f-string: expressão vazia não é permitida"
#~ msgid "f-string: expecting '}'"
#~ msgstr "f-string: esperando '}'"
#~ msgid "f-string: single '}' is not allowed"
#~ msgstr "f-string: um único '}' não é permitido"
#~ msgid "invalid arguments"
#~ msgstr "argumentos inválidos"
#~ msgid "raw f-strings are not implemented"
#~ msgstr "o f-strings bruto não estão implementados"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr "o unindent não coincide com nenhum nível de recuo externo"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "A lista %q deve ser uma lista" #~ msgstr "A lista %q deve ser uma lista"

View File

@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n" "POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2021-10-11 09:40+0000\n" "PO-Revision-Date: 2021-10-20 07:36+0000\n"
"Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n" "Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: sv\n" "Language: sv\n"
@ -561,6 +561,10 @@ msgstr "Bitdjup måste vara inom 1 till 6, inte %d"
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "Bitdjup måste vara multipel av 8." msgstr "Bitdjup måste vara multipel av 8."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr "Startenheten måste vara den första enheten (gränssnitt #0)."
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "Både RX och TX krävs för handskakning" msgstr "Både RX och TX krävs för handskakning"
@ -2533,10 +2537,6 @@ msgstr "__new__ arg måste vara en användartyp"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "ett bytesliknande objekt krävs" msgstr "ett bytesliknande objekt krävs"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort() anropad"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "adress utanför gränsen" msgstr "adress utanför gränsen"
@ -3037,6 +3037,10 @@ msgstr "division med noll"
msgid "division by zero" msgid "division by zero"
msgstr "division med noll" msgstr "division med noll"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr "divisor måste vara 4"
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "tom" msgstr "tom"
@ -3118,26 +3122,6 @@ msgstr "extra keyword-argument angivna"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "extra positions-argument angivna" msgstr "extra positions-argument angivna"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr "f-stränguttrycksdelen kan inte innehålla en '#'"
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr "f-string-uttrycksdelen kan inte innehålla ett omvänt snedstreck"
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr "f-sträng: tomt uttryck inte tillåten"
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr "f-string: förväntat '}'"
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr "f-string: singel '}' är inte tillåten"
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3415,10 +3399,6 @@ msgstr "interval måste vara i intervallet %s-%s"
msgid "invalid architecture" msgid "invalid architecture"
msgstr "ogiltig arkitektur" msgstr "ogiltig arkitektur"
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "ogiltiga argument"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4027,8 +4007,8 @@ msgid "queue overflow"
msgstr "köstorlek överskreds" msgstr "köstorlek överskreds"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "råa f-strängar inte implementerade" msgstr "råa f-strängar stöds inte"
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "real and imaginary parts must be of equal length" msgid "real and imaginary parts must be of equal length"
@ -4090,7 +4070,7 @@ msgstr "samplingsfrekvens utanför räckvidden"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "schemakön full" msgstr "schemakön full"
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "skriptkompilering stöds inte" msgstr "skriptkompilering stöds inte"
@ -4366,8 +4346,8 @@ msgid "unicode name escapes"
msgstr "unicode-namn flyr" msgstr "unicode-namn flyr"
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "indentering inte matchar någon yttre indenteringsnivå" msgstr "avindentering matchar inte någon yttre indentering"
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4520,6 +4500,33 @@ msgstr "zi måste vara av typ float"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "zi måste vara i formen (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)"
#~ msgid "abort() called"
#~ msgstr "abort() anropad"
#~ msgid "f-string expression part cannot include a '#'"
#~ msgstr "f-stränguttrycksdelen kan inte innehålla en '#'"
#~ msgid "f-string expression part cannot include a backslash"
#~ msgstr "f-string-uttrycksdelen kan inte innehålla ett omvänt snedstreck"
#~ msgid "f-string: empty expression not allowed"
#~ msgstr "f-sträng: tomt uttryck inte tillåten"
#~ msgid "f-string: expecting '}'"
#~ msgstr "f-string: förväntat '}'"
#~ msgid "f-string: single '}' is not allowed"
#~ msgstr "f-string: singel '}' är inte tillåten"
#~ msgid "invalid arguments"
#~ msgstr "ogiltiga argument"
#~ msgid "raw f-strings are not implemented"
#~ msgstr "råa f-strängar inte implementerade"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr "indentering inte matchar någon yttre indenteringsnivå"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "%q-listan måste vara en lista" #~ msgstr "%q-listan måste vara en lista"

View File

@ -563,6 +563,10 @@ msgstr "wèi shēn dù bì xū bāo hán 1 dào 6, ér bù shì %d"
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
msgstr "Bǐtè shēndù bìxū shì 8 bèi yǐshàng." msgstr "Bǐtè shēndù bìxū shì 8 bèi yǐshàng."
#: supervisor/shared/safe_mode.c
msgid "Boot device must be first device (interface #0)."
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control" msgid "Both RX and TX required for flow control"
msgstr "liú liàng kòng zhì suǒ xū de RX hé TX" msgstr "liú liàng kòng zhì suǒ xū de RX hé TX"
@ -2535,10 +2539,6 @@ msgstr "__new__ cānshù bìxū shì yònghù lèixíng"
msgid "a bytes-like object is required" msgid "a bytes-like object is required"
msgstr "xūyào yīgè zì jié lèi duìxiàng" msgstr "xūyào yīgè zì jié lèi duìxiàng"
#: lib/embed/abort_.c
msgid "abort() called"
msgstr "abort() diàoyòng"
#: shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "address out of bounds" msgid "address out of bounds"
msgstr "dìzhǐ chāochū biānjiè" msgstr "dìzhǐ chāochū biānjiè"
@ -3040,6 +3040,10 @@ msgstr "chú yǐ líng"
msgid "division by zero" msgid "division by zero"
msgstr "bèi líng chú" msgstr "bèi líng chú"
#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c
msgid "divisor must be 4"
msgstr ""
#: py/objdeque.c #: py/objdeque.c
msgid "empty" msgid "empty"
msgstr "kòngxián" msgstr "kòngxián"
@ -3121,26 +3125,6 @@ msgstr "éwài de guānjiàn cí cānshù"
msgid "extra positional arguments given" msgid "extra positional arguments given"
msgstr "gěi chūle éwài de wèizhì cānshù" msgstr "gěi chūle éwài de wèizhì cānshù"
#: py/parse.c
msgid "f-string expression part cannot include a '#'"
msgstr "f-string biǎodá shì bùfèn bùnéng bāohán '#'"
#: py/parse.c
msgid "f-string expression part cannot include a backslash"
msgstr "f-string biǎodá shì bùfèn bùnéng bāohán fǎn xié gāng"
#: py/parse.c
msgid "f-string: empty expression not allowed"
msgstr "f-string: bù yǔnxǔ shǐyòng kōng biǎodá shì"
#: py/parse.c
msgid "f-string: expecting '}'"
msgstr "f-string: qídài '}'"
#: py/parse.c
msgid "f-string: single '}' is not allowed"
msgstr "f-string: bù yǔnxǔ shǐyòng dāngè '}'"
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
@ -3418,10 +3402,6 @@ msgstr "Jiàngé bìxū zài %s-%s fànwéi nèi"
msgid "invalid architecture" msgid "invalid architecture"
msgstr "wú xiào de jià gòu" msgstr "wú xiào de jià gòu"
#: lib/netutils/netutils.c
msgid "invalid arguments"
msgstr "wúxiào de cānshù"
#: shared-bindings/bitmaptools/__init__.c #: shared-bindings/bitmaptools/__init__.c
#, c-format #, c-format
msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"
@ -4027,8 +4007,8 @@ msgid "queue overflow"
msgstr "duìliè yìchū" msgstr "duìliè yìchū"
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not supported"
msgstr "wèi zhíxíng yuánshǐ f-strings" msgstr ""
#: extmod/ulab/code/numpy/fft/fft_tools.c #: extmod/ulab/code/numpy/fft/fft_tools.c
msgid "real and imaginary parts must be of equal length" msgid "real and imaginary parts must be of equal length"
@ -4090,7 +4070,7 @@ msgstr "qǔyàng lǜ chāochū fànwéi"
msgid "schedule queue full" msgid "schedule queue full"
msgstr "shí jiān biǎo duì liè yǐ mǎn" msgstr "shí jiān biǎo duì liè yǐ mǎn"
#: lib/utils/pyexec.c py/builtinimport.c #: py/builtinimport.c
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "bù zhīchí jiǎoběn biānyì" msgstr "bù zhīchí jiǎoběn biānyì"
@ -4366,8 +4346,8 @@ msgid "unicode name escapes"
msgstr "unicode míngchēng táoyì" msgstr "unicode míngchēng táoyì"
#: py/parse.c #: py/parse.c
msgid "unindent does not match any outer indentation level" msgid "unindent doesn't match any outer indent level"
msgstr "bùsuō jìn yǔ rènhé wàibù suō jìn jíbié dōu bù pǐpèi" msgstr ""
#: py/objstr.c #: py/objstr.c
#, c-format #, c-format
@ -4520,6 +4500,33 @@ msgstr "zi bìxū wèi fú diǎn xíng"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)"
#~ msgid "abort() called"
#~ msgstr "abort() diàoyòng"
#~ msgid "f-string expression part cannot include a '#'"
#~ msgstr "f-string biǎodá shì bùfèn bùnéng bāohán '#'"
#~ msgid "f-string expression part cannot include a backslash"
#~ msgstr "f-string biǎodá shì bùfèn bùnéng bāohán fǎn xié gāng"
#~ msgid "f-string: empty expression not allowed"
#~ msgstr "f-string: bù yǔnxǔ shǐyòng kōng biǎodá shì"
#~ msgid "f-string: expecting '}'"
#~ msgstr "f-string: qídài '}'"
#~ msgid "f-string: single '}' is not allowed"
#~ msgstr "f-string: bù yǔnxǔ shǐyòng dāngè '}'"
#~ msgid "invalid arguments"
#~ msgstr "wúxiào de cānshù"
#~ msgid "raw f-strings are not implemented"
#~ msgstr "wèi zhíxíng yuánshǐ f-strings"
#~ msgid "unindent does not match any outer indentation level"
#~ msgstr "bùsuō jìn yǔ rènhé wàibù suō jìn jíbié dōu bù pǐpèi"
#~ msgid "%q list must be a list" #~ msgid "%q list must be a list"
#~ msgstr "%q lièbiǎo bìxū shì lièbiǎo" #~ msgstr "%q lièbiǎo bìxū shì lièbiǎo"

4
main.c
View File

@ -40,8 +40,8 @@
#include "py/gc.h" #include "py/gc.h"
#include "py/stackctrl.h" #include "py/stackctrl.h"
#include "lib/mp-readline/readline.h" #include "shared/readline/readline.h"
#include "lib/utils/pyexec.h" #include "shared/runtime/pyexec.h"
#include "background.h" #include "background.h"
#include "mpconfigboard.h" #include "mpconfigboard.h"

View File

@ -2,7 +2,7 @@
# #
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
PROG=mpy-cross.static.exe PROG=mpy-cross.static
CROSS_COMPILE = x86_64-w64-mingw32- CROSS_COMPILE = x86_64-w64-mingw32-
BUILD=build-static-mingw BUILD=build-static-mingw
STATIC_BUILD=1 STATIC_BUILD=1

View File

@ -8,7 +8,7 @@
#include "py/mpstate.h" #include "py/mpstate.h"
#include "py/gc.h" #include "py/gc.h"
#include "lib/utils/gchelper.h" #include "shared/runtime/gchelper.h"
#if MICROPY_ENABLE_GC #if MICROPY_ENABLE_GC

View File

@ -41,7 +41,9 @@
#define MICROPY_READER_POSIX (1) #define MICROPY_READER_POSIX (1)
#define MICROPY_ENABLE_RUNTIME (0) #define MICROPY_ENABLE_RUNTIME (0)
#define MICROPY_ENABLE_GC (1) #define MICROPY_ENABLE_GC (1)
#ifndef __EMSCRIPTEN__
#define MICROPY_STACK_CHECK (1) #define MICROPY_STACK_CHECK (1)
#endif
#define MICROPY_HELPER_LEXER_UNIX (1) #define MICROPY_HELPER_LEXER_UNIX (1)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ) #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_ENABLE_SOURCE_LINE (1) #define MICROPY_ENABLE_SOURCE_LINE (1)
@ -54,6 +56,7 @@
#define MICROPY_PY_ASYNC_AWAIT (1) #define MICROPY_PY_ASYNC_AWAIT (1)
#define MICROPY_USE_INTERNAL_PRINTF (0) #define MICROPY_USE_INTERNAL_PRINTF (0)
#define MICROPY_PY_FSTRINGS (1)
#define MICROPY_PY_BUILTINS_STR_UNICODE (1) #define MICROPY_PY_BUILTINS_STR_UNICODE (1)
#if !(defined(MICROPY_GCREGS_SETJMP) || defined(__x86_64__) || defined(__i386__) || defined(__thumb2__) || defined(__thumb__) || defined(__arm__)) #if !(defined(MICROPY_GCREGS_SETJMP) || defined(__x86_64__) || defined(__i386__) || defined(__thumb2__) || defined(__thumb__) || defined(__arm__))

View File

@ -69,7 +69,7 @@ endif
SRC_C += \ SRC_C += \
main.c \ main.c \
gccollect.c \ gccollect.c \
lib/utils/gchelper_generic.c \ shared/runtime/gchelper_generic.c \
supervisor/stub/safe_mode.c \ supervisor/stub/safe_mode.c \
supervisor/stub/stack.c \ supervisor/stub/stack.c \
supervisor/shared/translate.c supervisor/shared/translate.c

View File

@ -89,7 +89,7 @@
<Import Project="$(PyMsvcDir)sources.props" /> <Import Project="$(PyMsvcDir)sources.props" />
<ItemGroup> <ItemGroup>
<ClCompile Include="@(PyCoreSource)" /> <ClCompile Include="@(PyCoreSource)" />
<ClCompile Include="$(PyBaseDir)lib/utils/gchelper_generic.c" > <ClCompile Include="$(PyBaseDir)shared/runtime/gchelper_generic.c" >
<PreprocessorDefinitions>MICROPY_GCREGS_SETJMP</PreprocessorDefinitions> <PreprocessorDefinitions>MICROPY_GCREGS_SETJMP</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<ClCompile Include="$(PyBaseDir)mpy-cross\gccollect.c"/> <ClCompile Include="$(PyBaseDir)mpy-cross\gccollect.c"/>

View File

@ -60,7 +60,7 @@ HAL_DIR=hal/$(MCU_SERIES)
INC += -I. \ INC += -I. \
-I../.. \ -I../.. \
-I../lib/mp-readline \ -I../lib/mp-readline \
-I../lib/timeutils \ -I../shared/timeutils \
-Iasf4/$(CHIP_FAMILY) \ -Iasf4/$(CHIP_FAMILY) \
-Iasf4/$(CHIP_FAMILY)/hal/include \ -Iasf4/$(CHIP_FAMILY)/hal/include \
-Iasf4/$(CHIP_FAMILY)/hal/utils/include \ -Iasf4/$(CHIP_FAMILY)/hal/utils/include \
@ -364,11 +364,11 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o))
SRC_QSTR += $(HEADER_BUILD)/sdiodata.h SRC_QSTR += $(HEADER_BUILD)/sdiodata.h
$(HEADER_BUILD)/sdiodata.h: tools/mksdiodata.py | $(HEADER_BUILD) $(HEADER_BUILD)/sdiodata.h: tools/mksdiodata.py | $(HEADER_BUILD)
$(Q)$(PYTHON3) $< > $@ $(Q)$(PYTHON) $< > $@
SRC_QSTR += $(HEADER_BUILD)/candata.h SRC_QSTR += $(HEADER_BUILD)/candata.h
$(HEADER_BUILD)/candata.h: tools/mkcandata.py | $(HEADER_BUILD) $(HEADER_BUILD)/candata.h: tools/mkcandata.py | $(HEADER_BUILD)
$(Q)$(PYTHON3) $< > $@ $(Q)$(PYTHON) $< > $@
SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)
# Sources that only hold QSTRs after pre-processing. # Sources that only hold QSTRs after pre-processing.
@ -380,7 +380,7 @@ $(BUILD)/firmware.elf: $(OBJ) $(GENERATED_LD_FILE)
$(STEPECHO) "LINK $@" $(STEPECHO) "LINK $@"
$(Q)echo $(OBJ) > $(BUILD)/firmware.objs $(Q)echo $(OBJ) > $(BUILD)/firmware.objs
$(Q)$(CC) -o $@ $(LDFLAGS) @$(BUILD)/firmware.objs -Wl,--start-group $(LIBS) -Wl,--end-group $(Q)$(CC) -o $@ $(LDFLAGS) @$(BUILD)/firmware.objs -Wl,--start-group $(LIBS) -Wl,--end-group
$(Q)$(SIZE) $@ | $(PYTHON3) $(TOP)/tools/build_memory_info.py $(GENERATED_LD_FILE) $(Q)$(SIZE) $@ | $(PYTHON) $(TOP)/tools/build_memory_info.py $(GENERATED_LD_FILE)
$(BUILD)/firmware.bin: $(BUILD)/firmware.elf $(BUILD)/firmware.bin: $(BUILD)/firmware.elf
$(STEPECHO) "Create $@" $(STEPECHO) "Create $@"
@ -388,7 +388,7 @@ $(BUILD)/firmware.bin: $(BUILD)/firmware.elf
$(BUILD)/firmware.uf2: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2: $(BUILD)/firmware.bin
$(STEPECHO) "Create $@" $(STEPECHO) "Create $@"
$(Q)$(PYTHON3) $(TOP)/tools/uf2/utils/uf2conv.py -b $(BOOTLOADER_SIZE) -c -o $@ $^ $(Q)$(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -b $(BOOTLOADER_SIZE) -c -o $@ $^
include $(TOP)/py/mkrules.mk include $(TOP)/py/mkrules.mk

View File

@ -396,7 +396,7 @@ STATIC void dma_callback_fun(void *arg) {
} }
} }
void audio_evsys_handler(void) { void audio_dma_evsys_handler(void) {
for (uint8_t i = 0; i < AUDIO_DMA_CHANNEL_COUNT; i++) { for (uint8_t i = 0; i < AUDIO_DMA_CHANNEL_COUNT; i++) {
audio_dma_t *dma = audio_dma_state[i]; audio_dma_t *dma = audio_dma_state[i];
if (dma == NULL) { if (dma == NULL) {

View File

@ -101,6 +101,6 @@ void audio_dma_background(void);
uint8_t find_sync_event_channel_raise(void); uint8_t find_sync_event_channel_raise(void);
void audio_evsys_handler(void); void audio_dma_evsys_handler(void);
#endif // MICROPY_INCLUDED_ATMEL_SAMD_AUDIO_DMA_H #endif // MICROPY_INCLUDED_ATMEL_SAMD_AUDIO_DMA_H

View File

@ -35,6 +35,7 @@
#include "common-hal/audiobusio/PDMIn.h" #include "common-hal/audiobusio/PDMIn.h"
#include "shared-bindings/analogio/AnalogOut.h" #include "shared-bindings/analogio/AnalogOut.h"
#include "shared-bindings/audiobusio/PDMIn.h" #include "shared-bindings/audiobusio/PDMIn.h"
#include "shared-bindings/microcontroller/__init__.h"
#include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/Pin.h"
#include "supervisor/shared/translate.h" #include "supervisor/shared/translate.h"
@ -64,7 +65,20 @@
#define SERCTRL(name) I2S_RXCTRL_ ## name #define SERCTRL(name) I2S_RXCTRL_ ## name
#endif #endif
// Set by interrupt handler when DMA block has finished transferring.
static bool pdmin_dma_block_done;
// Event channel used to trigger interrupt. Set to invalid value EVSYS_SYNCH_NUM when not in use.
static uint8_t pdmin_event_channel;
void pdmin_evsys_handler(void) {
if (pdmin_event_channel < EVSYS_SYNCH_NUM && event_interrupt_active(pdmin_event_channel)) {
pdmin_dma_block_done = true;
}
}
void pdmin_reset(void) { void pdmin_reset(void) {
pdmin_event_channel = EVSYS_SYNCH_NUM;
while (I2S->SYNCBUSY.reg & I2S_SYNCBUSY_ENABLE) {} while (I2S->SYNCBUSY.reg & I2S_SYNCBUSY_ENABLE) {}
I2S->INTENCLR.reg = I2S_INTENCLR_MASK; I2S->INTENCLR.reg = I2S_INTENCLR_MASK;
I2S->INTFLAG.reg = I2S_INTFLAG_MASK; I2S->INTFLAG.reg = I2S_INTFLAG_MASK;
@ -368,7 +382,8 @@ static uint16_t filter_sample(uint32_t pdm_samples[4]) {
uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* self, uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* self,
uint16_t* output_buffer, uint32_t output_buffer_length) { uint16_t* output_buffer, uint32_t output_buffer_length) {
uint8_t dma_channel = dma_allocate_channel(); uint8_t dma_channel = dma_allocate_channel();
uint8_t event_channel = find_sync_event_channel_raise(); pdmin_event_channel = find_sync_event_channel_raise();
pdmin_dma_block_done = false;
// We allocate two buffers on the stack to use for double buffering. // We allocate two buffers on the stack to use for double buffering.
const uint8_t samples_per_buffer = SAMPLES_PER_BUFFER; const uint8_t samples_per_buffer = SAMPLES_PER_BUFFER;
@ -391,7 +406,7 @@ uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* se
#endif #endif
dma_configure(dma_channel, trigger_source, true); dma_configure(dma_channel, trigger_source, true);
init_event_channel_interrupt(event_channel, CORE_GCLK, EVSYS_ID_GEN_DMAC_CH_0 + dma_channel); init_event_channel_interrupt(pdmin_event_channel, CORE_GCLK, EVSYS_ID_GEN_DMAC_CH_0 + dma_channel);
// Turn on serializer now to get it in sync with DMA. // Turn on serializer now to get it in sync with DMA.
i2s_set_serializer_enable(self->serializer, true); i2s_set_serializer_enable(self->serializer, true);
audio_dma_enable_channel(dma_channel); audio_dma_enable_channel(dma_channel);
@ -402,23 +417,12 @@ uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* se
uint32_t remaining_samples_needed = output_buffer_length; uint32_t remaining_samples_needed = output_buffer_length;
while (values_output < output_buffer_length) { while (values_output < output_buffer_length) {
if (event_interrupt_overflow(event_channel)) { while (!pdmin_dma_block_done) {
// Looks like we aren't keeping up. We shouldn't skip a buffer so stop early.
break;
}
// Wait for the next buffer to fill
uint32_t wait_counts = 0;
#ifdef SAMD21
#define MAX_WAIT_COUNTS 1000
#endif
#ifdef SAM_D5X_E5X
#define MAX_WAIT_COUNTS 6000
#endif
// If wait_counts exceeds the max count, buffer has probably stopped filling;
// DMA may have missed an I2S trigger event.
while (!event_interrupt_active(event_channel) && ++wait_counts < MAX_WAIT_COUNTS) {
RUN_BACKGROUND_TASKS; RUN_BACKGROUND_TASKS;
} }
common_hal_mcu_disable_interrupts();
pdmin_dma_block_done = false;
common_hal_mcu_enable_interrupts();
// The mic is running all the time, so we don't need to wait the usual 10msec or 100msec // The mic is running all the time, so we don't need to wait the usual 10msec or 100msec
// for it to start up. // for it to start up.
@ -430,6 +434,7 @@ uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* se
buffer = second_buffer; buffer = second_buffer;
descriptor = &second_descriptor; descriptor = &second_descriptor;
} }
// Decimate and filter the buffer that was just filled. // Decimate and filter the buffer that was just filled.
uint32_t samples_gathered = descriptor->BTCNT.reg / words_per_sample; uint32_t samples_gathered = descriptor->BTCNT.reg / words_per_sample;
// Don't run off the end of output buffer. Process only as many as needed. // Don't run off the end of output buffer. Process only as many as needed.
@ -472,7 +477,8 @@ uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* se
} }
} }
disable_event_channel(event_channel); disable_event_channel(pdmin_event_channel);
pdmin_event_channel = EVSYS_SYNCH_NUM; // Invalid event_channel.
dma_free_channel(dma_channel); dma_free_channel(dma_channel);
// Turn off serializer, but leave clock on, to avoid mic startup delay. // Turn off serializer, but leave clock on, to avoid mic startup delay.
i2s_set_serializer_enable(self->serializer, false); i2s_set_serializer_enable(self->serializer, false);
@ -481,5 +487,4 @@ uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* se
} }
void common_hal_audiobusio_pdmin_record_to_file(audiobusio_pdmin_obj_t* self, uint8_t* buffer, uint32_t length) { void common_hal_audiobusio_pdmin_record_to_file(audiobusio_pdmin_obj_t* self, uint8_t* buffer, uint32_t length) {
} }

View File

@ -46,6 +46,8 @@ typedef struct {
void pdmin_reset(void); void pdmin_reset(void);
void pdmin_evsys_handler(void);
void pdmin_background(void); void pdmin_background(void);
#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOBUSIO_AUDIOOUT_H #endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_AUDIOBUSIO_AUDIOOUT_H

View File

@ -36,7 +36,7 @@
#include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/__init__.h"
#include "supervisor/shared/translate.h" #include "supervisor/shared/translate.h"
#include "common-hal/busio/SPI.h" // for never_reset_sercom #include "common-hal/busio/__init__.h"
// Number of times to try to send packet if failed. // Number of times to try to send packet if failed.
#define ATTEMPTS 2 #define ATTEMPTS 2

View File

@ -32,7 +32,9 @@
#include "peripheral_clk_config.h" #include "peripheral_clk_config.h"
#include "supervisor/board.h" #include "supervisor/board.h"
#include "common-hal/busio/__init__.h"
#include "common-hal/microcontroller/Pin.h" #include "common-hal/microcontroller/Pin.h"
#include "hal/include/hal_gpio.h" #include "hal/include/hal_gpio.h"
#include "hal/include/hal_spi_m_sync.h" #include "hal/include/hal_spi_m_sync.h"
#include "hal/include/hpl_spi_m_sync.h" #include "hal/include/hpl_spi_m_sync.h"
@ -40,43 +42,6 @@
#include "samd/dma.h" #include "samd/dma.h"
#include "samd/sercom.h" #include "samd/sercom.h"
bool never_reset_sercoms[SERCOM_INST_NUM];
void never_reset_sercom(Sercom *sercom) {
// Reset all SERCOMs except the ones being used by on-board devices.
Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS;
for (int i = 0; i < SERCOM_INST_NUM; i++) {
if (sercom_instances[i] == sercom) {
never_reset_sercoms[i] = true;
break;
}
}
}
void allow_reset_sercom(Sercom *sercom) {
// Reset all SERCOMs except the ones being used by on-board devices.
Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS;
for (int i = 0; i < SERCOM_INST_NUM; i++) {
if (sercom_instances[i] == sercom) {
never_reset_sercoms[i] = false;
break;
}
}
}
void reset_sercoms(void) {
// Reset all SERCOMs except the ones being used by on-board devices.
Sercom *sercom_instances[SERCOM_INST_NUM] = SERCOM_INSTS;
for (int i = 0; i < SERCOM_INST_NUM; i++) {
if (never_reset_sercoms[i]) {
continue;
}
// SWRST is same for all modes of SERCOMs.
sercom_instances[i]->SPI.CTRLA.bit.SWRST = 1;
}
}
void common_hal_busio_spi_construct(busio_spi_obj_t *self, void common_hal_busio_spi_construct(busio_spi_obj_t *self,
const mcu_pin_obj_t *clock, const mcu_pin_obj_t *mosi, const mcu_pin_obj_t *clock, const mcu_pin_obj_t *mosi,
const mcu_pin_obj_t *miso) { const mcu_pin_obj_t *miso) {

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