Merge branch 'main' into enable_uasyncio

This commit is contained in:
Tsutomu IKEGAMI 2022-02-22 16:53:10 +09:00
commit 0929353e5c
208 changed files with 3924 additions and 1690 deletions

View File

@ -72,10 +72,10 @@ jobs:
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --emit native
working-directory: tests
- name: mpy Tests
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy -d basics float micropython
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --via-mpy -d basics float micropython
working-directory: tests
- name: Native mpy Tests
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy --emit native -d basics float micropython
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --via-mpy --emit native -d basics float micropython
working-directory: tests
- name: Build native modules
run: |

6
.gitmodules vendored
View File

@ -277,3 +277,9 @@
[submodule "ports/stm/st_driver/stm32f4xx_hal_driver"]
path = ports/stm/st_driver/stm32f4xx_hal_driver
url = https://github.com/adafruit/stm32f4xx_hal_driver.git
[submodule "frozen/Adafruit_CircuitPython_PortalBase"]
path = frozen/Adafruit_CircuitPython_PortalBase
url = https://github.com/adafruit/Adafruit_CircuitPython_PortalBase.git
[submodule "frozen/Adafruit_CircuitPython_FakeRequests"]
path = frozen/Adafruit_CircuitPython_FakeRequests
url = https://github.com/adafruit/Adafruit_CircuitPython_FakeRequests.git

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2013-2021 Damien P. George
Copyright (c) 2013-2022 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

View File

@ -21,11 +21,11 @@ For example::
import framebuf
# FrameBuffer needs 2 bytes for every RGB565 pixel
fbuf = framebuf.FrameBuffer(bytearray(10 * 100 * 2), 10, 100, framebuf.RGB565)
fbuf = framebuf.FrameBuffer(bytearray(100 * 10 * 2), 100, 10, framebuf.RGB565)
fbuf.fill(0)
fbuf.text('MicroPython!', 0, 0, 0xffff)
fbuf.hline(0, 10, 96, 0xffff)
fbuf.hline(0, 9, 96, 0xffff)
Constructors
------------

View File

@ -80,6 +80,14 @@ Constants
A mutable list of directories to search for imported modules.
.. admonition:: Difference to CPython
:class: attention
On MicroPython, an entry with the value ``".frozen"`` will indicate that import
should search :term:`frozen modules <frozen module>` at that point in the search.
If no frozen module is found then search will *not* look for a directory called
``.frozen``, instead it will continue with the next entry in ``sys.path``.
.. data:: platform
The platform that CircuitPython is running on. For OS/RTOS ports, this is

View File

@ -10,11 +10,13 @@ set(MICROPY_SOURCE_EXTMOD
${MICROPY_EXTMOD_DIR}/machine_i2c.c
${MICROPY_EXTMOD_DIR}/machine_mem.c
${MICROPY_EXTMOD_DIR}/machine_pulse.c
${MICROPY_EXTMOD_DIR}/machine_pwm.c
${MICROPY_EXTMOD_DIR}/machine_signal.c
${MICROPY_EXTMOD_DIR}/machine_spi.c
${MICROPY_EXTMOD_DIR}/modbluetooth.c
${MICROPY_EXTMOD_DIR}/modbtree.c
${MICROPY_EXTMOD_DIR}/modframebuf.c
${MICROPY_EXTMOD_DIR}/modnetwork.c
${MICROPY_EXTMOD_DIR}/modonewire.c
${MICROPY_EXTMOD_DIR}/moduasyncio.c
${MICROPY_EXTMOD_DIR}/modubinascii.c
@ -23,9 +25,11 @@ set(MICROPY_SOURCE_EXTMOD
${MICROPY_EXTMOD_DIR}/moduhashlib.c
${MICROPY_EXTMOD_DIR}/moduheapq.c
${MICROPY_EXTMOD_DIR}/modujson.c
${MICROPY_EXTMOD_DIR}/moduplatform.c
${MICROPY_EXTMOD_DIR}/modurandom.c
${MICROPY_EXTMOD_DIR}/modure.c
${MICROPY_EXTMOD_DIR}/moduselect.c
${MICROPY_EXTMOD_DIR}/modusocket.c
${MICROPY_EXTMOD_DIR}/modussl_axtls.c
${MICROPY_EXTMOD_DIR}/modussl_mbedtls.c
${MICROPY_EXTMOD_DIR}/modutimeq.c

View File

@ -9,6 +9,8 @@
#include "py/obj.h"
#include "py/mphal.h"
#if MICROPY_PY_ONEWIRE
/******************************************************************************/
// Low-level 1-Wire routines
@ -139,3 +141,5 @@ const mp_obj_module_t mp_module_onewire = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t *)&onewire_module_globals,
};
#endif // MICROPY_PY_ONEWIRE

146
extmod/moduplatform.c Normal file
View File

@ -0,0 +1,146 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2013-2021 Ibrahim Abdelkader <iabdalkader@openmv.io>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#include "py/runtime.h"
#include "py/objtuple.h"
#include "py/objstr.h"
#include "py/mphal.h"
#include "genhdr/mpversion.h"
#if MICROPY_PY_UPLATFORM
// platform - Access to underlying platform's identifying data
// TODO: Add more architectures, compilers and libraries.
// See: https://sourceforge.net/p/predef/wiki/Home/
#if defined(__ARM_ARCH)
#define PLATFORM_ARCH "arm"
#elif defined(__x86_64__) || defined(_WIN64)
#define PLATFORM_ARCH "x86_64"
#elif defined(__i386__) || defined(_M_IX86)
#define PLATFORM_ARCH "x86"
#elif defined(__xtensa__) || defined(_M_IX86)
#define PLATFORM_ARCH "xtensa"
#else
#define PLATFORM_ARCH ""
#endif
#if defined(__GNUC__)
#define PLATFORM_COMPILER \
"GCC " \
MP_STRINGIFY(__GNUC__) "." \
MP_STRINGIFY(__GNUC_MINOR__) "." \
MP_STRINGIFY(__GNUC_PATCHLEVEL__)
#elif defined(__ARMCC_VERSION)
#define PLATFORM_COMPILER \
"ARMCC " \
MP_STRINGIFY((__ARMCC_VERSION / 1000000)) "." \
MP_STRINGIFY((__ARMCC_VERSION / 10000 % 100)) "." \
MP_STRINGIFY((__ARMCC_VERSION % 10000))
#elif defined(_MSC_VER)
#if defined(_WIN64)
#define COMPILER_BITS "64 bit"
#elif defined(_M_IX86)
#define COMPILER_BITS "32 bit"
#else
#define COMPILER_BITS ""
#endif
#define PLATFORM_COMPILER \
"MSC v." MP_STRINGIFY(_MSC_VER) " " COMPILER_BITS
#else
#define PLATFORM_COMPILER ""
#endif
#if defined(__GLIBC__)
#define PLATFORM_LIBC_LIB "glibc"
#define PLATFORM_LIBC_VER \
MP_STRINGIFY(__GLIBC__) "." \
MP_STRINGIFY(__GLIBC_MINOR__)
#elif defined(__NEWLIB__)
#define PLATFORM_LIBC_LIB "newlib"
#define PLATFORM_LIBC_VER _NEWLIB_VERSION
#else
#define PLATFORM_LIBC_LIB ""
#define PLATFORM_LIBC_VER ""
#endif
#if defined(__linux)
#define PLATFORM_SYSTEM "Linux"
#elif defined(__unix__)
#define PLATFORM_SYSTEM "Unix"
#elif defined(__CYGWIN__)
#define PLATFORM_SYSTEM "Cygwin"
#elif defined(_WIN32)
#define PLATFORM_SYSTEM "Windows"
#else
#define PLATFORM_SYSTEM "MicroPython"
#endif
#ifndef MICROPY_PLATFORM_VERSION
#define MICROPY_PLATFORM_VERSION ""
#endif
STATIC const MP_DEFINE_STR_OBJ(info_platform_obj, PLATFORM_SYSTEM "-" MICROPY_VERSION_STRING "-" \
PLATFORM_ARCH "-" MICROPY_PLATFORM_VERSION "-with-" PLATFORM_LIBC_LIB "" PLATFORM_LIBC_VER);
STATIC const MP_DEFINE_STR_OBJ(info_python_compiler_obj, PLATFORM_COMPILER);
STATIC const MP_DEFINE_STR_OBJ(info_libc_lib_obj, PLATFORM_LIBC_LIB);
STATIC const MP_DEFINE_STR_OBJ(info_libc_ver_obj, PLATFORM_LIBC_VER);
STATIC const mp_rom_obj_tuple_t info_libc_tuple_obj = {
{&mp_type_tuple}, 2, {MP_ROM_PTR(&info_libc_lib_obj), MP_ROM_PTR(&info_libc_ver_obj)}
};
STATIC mp_obj_t platform_platform(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
return MP_OBJ_FROM_PTR(&info_platform_obj);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(platform_platform_obj, 0, platform_platform);
STATIC mp_obj_t platform_python_compiler(void) {
return MP_OBJ_FROM_PTR(&info_python_compiler_obj);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(platform_python_compiler_obj, platform_python_compiler);
STATIC mp_obj_t platform_libc_ver(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
return MP_OBJ_FROM_PTR(&info_libc_tuple_obj);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(platform_libc_ver_obj, 0, platform_libc_ver);
STATIC const mp_rom_map_elem_t modplatform_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uplatform) },
{ MP_ROM_QSTR(MP_QSTR_platform), MP_ROM_PTR(&platform_platform_obj) },
{ MP_ROM_QSTR(MP_QSTR_python_compiler), MP_ROM_PTR(&platform_python_compiler_obj) },
{ MP_ROM_QSTR(MP_QSTR_libc_ver), MP_ROM_PTR(&platform_libc_ver_obj) },
};
STATIC MP_DEFINE_CONST_DICT(modplatform_globals, modplatform_globals_table);
const mp_obj_module_t mp_module_uplatform = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t *)&modplatform_globals,
};
#endif // MICROPY_PY_UPLATFORM

View File

@ -477,11 +477,16 @@ MP_REGISTER_MODULE(MP_QSTR_re, mp_module_ure, MICROPY_PY_URE);
// only if module is enabled by config setting.
#define re1_5_fatal(x) assert(!x)
#include "lib/re1.5/compilecode.c"
#if MICROPY_PY_URE_DEBUG
#include "lib/re1.5/dumpcode.c"
#endif
#include "lib/re1.5/recursiveloop.c"
#include "lib/re1.5/charclass.c"
#if MICROPY_PY_URE_DEBUG
// Make sure the output print statements go to the same output as other Python output.
#define printf(...) mp_printf(&mp_plat_print, __VA_ARGS__)
#include "lib/re1.5/dumpcode.c"
#undef printf
#endif
#endif // MICROPY_PY_URE

View File

@ -36,7 +36,7 @@ class SingletonGenerator:
self.state = None
self.exc = StopIteration()
def __iter__(self):
def __await__(self):
return self
def __next__(self):

View File

@ -66,7 +66,7 @@ async def gather(*aws, return_exceptions=False):
# # cancel all waiting tasks
# raise er
ts[i] = await ts[i]
except Exception as er:
except (core.CancelledError, Exception) as er:
if return_exceptions:
ts[i] = er
else:

View File

@ -130,7 +130,7 @@ class Task:
self.ph_next = None # Paring heap
self.ph_rightmost_parent = None # Paring heap
def __iter__(self):
def __await__(self):
if not self.state:
# Task finished, signal that is has been await'ed on.
self.state = False

@ -1 +1 @@
Subproject commit 0c7c6b88f3ec1b1d11d2f7d8b185e28ac657c06d
Subproject commit 5d01882c41dbc4115bc94f0b61c093d5a6b812b6

View File

@ -17,6 +17,8 @@
#ifdef _WIN32
#define fsync _commit
#else
#include <poll.h>
#endif
typedef struct _mp_obj_vfs_posix_file_t {
@ -180,6 +182,32 @@ STATIC mp_uint_t vfs_posix_file_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_
return 0;
case MP_STREAM_GET_FILENO:
return o->fd;
#if MICROPY_PY_USELECT
case MP_STREAM_POLL: {
#ifdef _WIN32
mp_raise_NotImplementedError(MP_ERROR_TEXT("poll on file not available on win32"));
#else
mp_uint_t ret = 0;
uint8_t pollevents = 0;
if (arg & MP_STREAM_POLL_RD) {
pollevents |= POLLIN;
}
if (arg & MP_STREAM_POLL_WR) {
pollevents |= POLLOUT;
}
struct pollfd pfd = { .fd = o->fd, .events = pollevents };
if (poll(&pfd, 1, 0) > 0) {
if (pfd.revents & POLLIN) {
ret |= MP_STREAM_POLL_RD;
}
if (pfd.revents & POLLOUT) {
ret |= MP_STREAM_POLL_WR;
}
}
return ret;
#endif
}
#endif
default:
*errcode = EINVAL;
return MP_STREAM_ERROR;

@ -1 +1 @@
Subproject commit c55da0dee66302d2fa8ed31623d047c307f409b2
Subproject commit baab505fd4dcc54d8e9d45e6463c68bdc6d100eb

@ -1 +1 @@
Subproject commit a695cde1b1cc957bcd10875b12ae82d1deeb0157
Subproject commit beec03065712cd62f79e839d5cf8f7c9847fc3b1

@ -1 +1 @@
Subproject commit c24a5310bc259cd9d93b1f42468e07f41d4b0e56
Subproject commit 859a7d403e4e79ec1c8915c81ba581dbaab8a4ac

@ -1 +1 @@
Subproject commit 169715b3444c614e55827ccf79b35b2b5e11f1d2
Subproject commit a8abc3aa8dece6c4d0152b001dfca7d2c279f899

@ -1 +1 @@
Subproject commit 2017afdfb43d3d9c5a73f8e85e951a583b18206a
Subproject commit b04042addd47c2645e139032b02a3b9ddeeb3425

@ -1 +1 @@
Subproject commit 8d09b29a1a92499dbbd10dd832f27db71057af5f
Subproject commit 938f6bb335ba5e4c56a8062c591ff9f3c18c4297

@ -1 +1 @@
Subproject commit 8a6ab89b7d19f45a20b3f794cf900e23c9a8453b
Subproject commit 8e7e111a9ff39d3f4311caa7babeb451422c759f

@ -1 +1 @@
Subproject commit 4fc5a32763c4a6eac3a9446e296a9e925cc29a5c
Subproject commit df2449815433e05ea0f89c19518ccde7a10a2faa

@ -1 +1 @@
Subproject commit 993bd12e1747ec117e8d104a5e9f4659c8a347a3
Subproject commit 708bb0c82c7b075bd6912c97231aea880b1a1cb8

@ -1 +1 @@
Subproject commit 0ec87891f9a28ee3c5ae3b020b60d361684f466d
Subproject commit 0bd04a235556979bd13a373821a6602445fe132b

@ -1 +1 @@
Subproject commit e07090117766d4a9ea2de07cd6f5418990cc598b
Subproject commit eb6124fdff59b98d7d49dd86072df99c0e97167b

@ -1 +1 @@
Subproject commit de4829a027a45882ae5477e50a75985e0e59f759
Subproject commit 13775b058422085762874fde8e587f2e9f066855

@ -0,0 +1 @@
Subproject commit f6cdec74b64112016c459abe4a5d31a3b34caeb3

@ -1 +1 @@
Subproject commit 68744ede79c992a3df8322c21a1468c5ccaef2ee
Subproject commit bccbe3da75f42b540b3faebb9d5a2d1ccf5e7147

@ -1 +1 @@
Subproject commit d79dd180cf6062e97d6a12cbc8dc7fdbedcc752b
Subproject commit 2fddabcaf0df1763111ed9dbf9e2d4cdb5b0434e

@ -1 +1 @@
Subproject commit 2ca37f927b3ee3aad379c2991f36b3ef1be0203d
Subproject commit 9771c9369c7e251f514eb26abcfcea1e891e6f27

@ -1 +1 @@
Subproject commit 8fc5eaecb3e24e4109bcc788f41461f1c45c3719
Subproject commit 29816fbe98c012ea0a1b5cae7f07aeae7ebf8b52

@ -1 +1 @@
Subproject commit ebbe69667d53ae76bc6d82e5296f87520ffbb5ae
Subproject commit acc4bdd73fdceb74d75cd5a1f261ae157ee32613

@ -1 +1 @@
Subproject commit f94ef67425516f23c889d217ffe5a3a710c1d278
Subproject commit 75e9ec62e4fe47a7212a69fb84aa1cfa7848e2b3

@ -1 +1 @@
Subproject commit 1127e3f7bcefa9fddb5b7f30533ecc6c58b420ea
Subproject commit 6641509ef43b672a82addf41f02b6466d6c67f01

@ -1 +1 @@
Subproject commit 9995c45a5ed1d455a4a8b7bfb9eb134de7f2b9db
Subproject commit fd478fda7adbd254282b8cad5000f06a96760c91

@ -1 +1 @@
Subproject commit 9ca3bf00c6a2dd1de2d315a3b952a381d720aa7d
Subproject commit a115fc30df1c230c09c8a533ca77f3a4afd9f6c3

@ -0,0 +1 @@
Subproject commit 77ba8eedf89b96c85a6194e5da2061c9d5c20242

@ -1 +1 @@
Subproject commit 4ac43288938abb4c3db127eeb79ef0d4ea4c16ea
Subproject commit 011acd627fc24342c397fc640b204a798f7b69dd

@ -1 +1 @@
Subproject commit 9ac490905834466319279a3390c914f1fd83733f
Subproject commit c58defd70947531c5a9c37ddcb569f240567a78b

@ -1 +1 @@
Subproject commit 0df4521b4a04ca1236960ff889ede118ec4305b5
Subproject commit 742ac7c8fb52bb85d9fd367b60a7f80475d7ed14

@ -1 +1 @@
Subproject commit 79678c6adb2252de8fed6273604bc6ac676132a5
Subproject commit 49ab415d6b601c99979262f9e91c21dcb3a927a7

@ -1 +1 @@
Subproject commit 900b28cbae008e3253c4c40496e49faea9fb7034
Subproject commit 270565665ada26fe8d7a99a3cb5941b452444471

@ -1 +1 @@
Subproject commit b7a76420d1dec119f8744aa7c0ea500e235561d1
Subproject commit 9dd51fecfcbb15cb2a00eeadbd66b36ce0c09ee2

@ -1 +1 @@
Subproject commit c5b480434de8fa56d8ba978a57cd3919fdc9da2a
Subproject commit 79c70a49285be8b6548de3f5ca20aa5ac1fafa22

@ -1 +1 @@
Subproject commit ca56187fe7af315130808191b004432fdfdc1b09
Subproject commit 272d225365eed46916390cf1f393dd08bc00b7d4

@ -1 +1 @@
Subproject commit 755784b6acc8ba419a085bee2d2dc4374f0d0030
Subproject commit fad0f89e760829a76f553ef8459f61001597a846

@ -1 +1 @@
Subproject commit d4ac6ce3eea2c87781fa2df4e431d9440c610fad
Subproject commit e86f258e43591ce4a04661277e77e9fdf6fec27e

@ -1 +1 @@
Subproject commit f06ac21e96321724258e00f7596d874eff53f0b8
Subproject commit c89c8689161e5b35bfe4fa8355615696e03f0648

View File

@ -2462,6 +2462,16 @@ msgstr "Tipe urf nrfx tak sesuai"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2535,12 +2545,14 @@ msgstr "Operasi yang tidak didukung"
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr "Panjang nilai != Panjang tetap yang dibutuhkan"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2911,6 +2923,10 @@ msgstr ""
msgid "can't load with '%q' index"
msgstr ""
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2973,10 +2989,6 @@ msgstr ""
msgid "cannot import name %q"
msgstr ""
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "tidak dapat melakukan relative import"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3667,6 +3679,10 @@ msgstr ""
msgid "matrix is not positive definite"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3821,6 +3837,7 @@ msgstr ""
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4044,6 +4061,10 @@ msgstr ""
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4089,6 +4110,7 @@ msgstr ""
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4675,6 +4697,9 @@ msgstr "zi harus berjenis float"
msgid "zi must be of shape (n_section, 2)"
msgstr "Zi harus berbentuk (n_section, 2)"
#~ msgid "cannot perform relative import"
#~ msgstr "tidak dapat melakukan relative import"
#~ msgid "Unsupported pull value."
#~ msgstr "Nilai tarikan yang tidak didukung."

View File

@ -2427,6 +2427,16 @@ msgstr ""
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2498,12 +2508,14 @@ msgstr ""
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2874,6 +2886,10 @@ msgstr ""
msgid "can't load with '%q' index"
msgstr ""
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2936,10 +2952,6 @@ msgstr ""
msgid "cannot import name %q"
msgstr ""
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr ""
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3630,7 +3642,7 @@ msgstr ""
msgid "matrix is not positive definite"
msgstr ""
#: shared-bindings/wifi/Radio.c
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
@ -3788,6 +3800,7 @@ msgstr ""
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4010,6 +4023,10 @@ msgstr ""
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4055,6 +4072,7 @@ msgstr ""
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h

View File

@ -2438,6 +2438,16 @@ msgstr ""
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2509,12 +2519,14 @@ msgstr ""
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2885,6 +2897,10 @@ msgstr ""
msgid "can't load with '%q' index"
msgstr ""
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2947,10 +2963,6 @@ msgstr ""
msgid "cannot import name %q"
msgstr ""
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr ""
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3641,6 +3653,10 @@ msgstr ""
msgid "matrix is not positive definite"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3795,6 +3811,7 @@ msgstr ""
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4017,6 +4034,10 @@ msgstr ""
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4062,6 +4083,7 @@ msgstr ""
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h

View File

@ -2462,6 +2462,16 @@ msgstr "Unerwarteter nrfx uuid-Typ"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2537,12 +2547,14 @@ msgstr "Nicht unterstützte Operation"
msgid "Update Failed"
msgstr "Update fehlgeschlagen"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr "Wert Länge != Erforderliche feste Länge"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2918,6 +2930,10 @@ msgstr "Laden von '%q' nicht möglich"
msgid "can't load with '%q' index"
msgstr "Laden mit '%q' index nicht möglich"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2986,10 +3002,6 @@ msgstr "Kann Instanz nicht erstellen"
msgid "cannot import name %q"
msgstr "Name %q kann nicht importiert werden"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "kann keinen relativen Import durchführen"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr "Kann nicht eindeutig die Größe (sizeof) des Skalars ermitteln"
@ -3692,6 +3704,10 @@ msgstr "Mathe-Domain-Fehler"
msgid "matrix is not positive definite"
msgstr "Matrix ist nicht positiv definitiv"
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3846,6 +3862,7 @@ msgstr "kein solches Attribut"
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr "non-UUID gefunden in service_uuids_whitelist"
@ -4072,6 +4089,10 @@ msgstr "Der Pixelwert erfordert zu viele Bits"
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader muss displayio.Palette oder displayio.ColorConverter sein"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr "Polygon kann nur in einem übergeordneten Element registriert werden"
@ -4117,6 +4138,7 @@ msgstr "pow() mit 3 Argumenten erfordert Integer"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4708,6 +4730,9 @@ msgstr "zi muss eine Gleitkommazahl sein"
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "cannot perform relative import"
#~ msgstr "kann keinen relativen Import durchführen"
#~ msgid "Unsupported pull value."
#~ msgstr "Nicht unterstützter Pull-Wert."

View File

@ -2427,6 +2427,16 @@ msgstr ""
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2498,12 +2508,14 @@ msgstr ""
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2874,6 +2886,10 @@ msgstr ""
msgid "can't load with '%q' index"
msgstr ""
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2936,10 +2952,6 @@ msgstr ""
msgid "cannot import name %q"
msgstr ""
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr ""
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3630,6 +3642,10 @@ msgstr ""
msgid "matrix is not positive definite"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3784,6 +3800,7 @@ msgstr ""
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4006,6 +4023,10 @@ msgstr ""
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4051,6 +4072,7 @@ msgstr ""
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h

View File

@ -2458,6 +2458,16 @@ msgstr "Unexpected nrfx uuid type"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr "Unhandled ESP TLS error %d %d %x %d"
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2531,12 +2541,14 @@ msgstr "Unsupported operation"
msgid "Update Failed"
msgstr "Update failed"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr "Value length != required fixed length"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2908,6 +2920,10 @@ msgstr "can't load from '%q'"
msgid "can't load with '%q' index"
msgstr "can't load with '%q' index"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr "can't send non-None value to a just-started generator"
@ -2972,10 +2988,6 @@ msgstr "can't create instance"
msgid "cannot import name %q"
msgstr "can't import name %q"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "can't perform relative import"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr "cannot unambiguously get sizeof scalar"
@ -3667,6 +3679,10 @@ msgstr "math domain error"
msgid "matrix is not positive definite"
msgstr "matrix is not positive definite"
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3821,6 +3837,7 @@ msgstr "no such attribute"
msgid "non-Device in %q"
msgstr "non-Device in %q"
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr "non-UUID found in service_uuids_whitelist"
@ -4043,6 +4060,10 @@ msgstr "pixel value requires too many bits"
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader must be displayio.Palette or displayio.ColorConverter"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr "polygon can only be registered in one parent"
@ -4088,6 +4109,7 @@ msgstr "pow() with 3 arguments requires integers"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4676,6 +4698,9 @@ msgstr "zi must be of float type"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi must be of shape (n_section, 2)"
#~ msgid "cannot perform relative import"
#~ msgstr "can't perform relative import"
#, c-format
#~ msgid "No I2C device at address: %x"
#~ msgstr "No I2C device at address: %x"

View File

@ -2489,6 +2489,16 @@ msgstr "Tipo de uuid nrfx inesperado"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr "Error no manejado de ESP TLS %d %d %x %d"
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2562,12 +2572,14 @@ msgstr "Operación no soportada"
msgid "Update Failed"
msgstr "La actualización fallo"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr "Tamaño del valor != del tamaño fijo requerido"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2943,6 +2955,10 @@ msgstr "no se puede cargar desde '%q'"
msgid "can't load with '%q' index"
msgstr "no se puede cargar con el índice '%q'"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -3010,10 +3026,6 @@ msgstr "no se puede crear instancia"
msgid "cannot import name %q"
msgstr "no se puede importar name '%q'"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "no se puedo realizar importación relativa"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr "no se puede sin ambiguedades traer el sizeof del escalar"
@ -3709,6 +3721,10 @@ msgstr "error de dominio matemático"
msgid "matrix is not positive definite"
msgstr "matrix no es definida positiva"
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3864,6 +3880,7 @@ msgstr "no hay tal atributo"
msgid "non-Device in %q"
msgstr "hay un no-Device en %q"
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr "no UUID encontrado en service_uuids_whitelist"
@ -4089,6 +4106,10 @@ msgstr "valor del pixel require demasiado bits"
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader debe ser displayio.Palette o displayio.ColorConverter"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr "el polígono solo se puede registrar en uno de los padres"
@ -4134,6 +4155,7 @@ msgstr "pow() con 3 argumentos requiere enteros"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4723,6 +4745,9 @@ msgstr "zi debe ser de tipo flotante"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi debe ser una forma (n_section,2)"
#~ msgid "cannot perform relative import"
#~ msgstr "no se puedo realizar importación relativa"
#, c-format
#~ msgid "No I2C device at address: %x"
#~ msgstr "No hay dispositivo I2C en la dirección: %x"

View File

@ -2448,6 +2448,16 @@ msgstr "hindi inaasahang indent"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2520,12 +2530,14 @@ msgstr "Hindi sinusuportahang operasyon"
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2899,6 +2911,10 @@ msgstr "hidi ma i-load galing sa '%q'"
msgid "can't load with '%q' index"
msgstr "hindi ma i-load gamit ng '%q' na index"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr "hindi mapadala ang non-None value sa isang kaka umpisang generator"
@ -2965,10 +2981,6 @@ msgstr "hindi magawa ang instance"
msgid "cannot import name %q"
msgstr "hindi ma-import ang name %q"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "hindi maaring isagawa ang relative import"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3669,6 +3681,10 @@ msgstr "may pagkakamali sa math domain"
msgid "matrix is not positive definite"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3823,6 +3839,7 @@ msgstr "walang ganoon na attribute"
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4047,6 +4064,10 @@ msgstr ""
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader ay dapat displayio.Palette o displayio.ColorConverter"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4092,6 +4113,7 @@ msgstr "pow() na may 3 argumento kailangan ng integers"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4684,6 +4706,9 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "cannot perform relative import"
#~ msgstr "hindi maaring isagawa ang relative import"
#~ msgid "Unsupported pull value."
#~ msgstr "Hindi suportado ang pull value."

View File

@ -2505,6 +2505,16 @@ msgstr "Type inattendu pour l'uuid nrfx"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr "Erreur ESP TLS non gérée %d %d %x %d"
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2579,12 +2589,14 @@ msgstr "Opération non supportée"
msgid "Update Failed"
msgstr "Mise-à-jour échouée"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr "Longueur de valeur != Longueur fixe requise"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2967,6 +2979,10 @@ msgstr "impossible de charger depuis '%q'"
msgid "can't load with '%q' index"
msgstr "impossible de charger avec l'indice '%q'"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -3035,10 +3051,6 @@ msgstr "ne peut pas créer une instance"
msgid "cannot import name %q"
msgstr "ne peut pas importer le nom %q"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "ne peut pas réaliser un import relatif"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr "ne peut récupérer sans ambigüité le sizeof d'un scalaire"
@ -3739,6 +3751,10 @@ msgstr "erreur de domaine math"
msgid "matrix is not positive definite"
msgstr "la matrice n'est pas définie positive"
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3893,6 +3909,7 @@ msgstr "pas de tel attribut"
msgid "non-Device in %q"
msgstr "aucun appareil dans %q"
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr "non UUID trouvé dans service_uuids_whitelist"
@ -4120,6 +4137,10 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
"pixel_shader doit être un objet displayio.Palette ou displayio.ColorConverter"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr "le polygone ne peut être enregistré que dans un parent"
@ -4165,6 +4186,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4754,6 +4776,9 @@ msgstr "zi doit être de type float"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi doit être de forme (n_section, 2)"
#~ msgid "cannot perform relative import"
#~ msgstr "ne peut pas réaliser un import relatif"
#, c-format
#~ msgid "No I2C device at address: %x"
#~ msgstr "Pas de dispositif I2C à l'adresse : %x"

View File

@ -2427,6 +2427,16 @@ msgstr ""
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2498,12 +2508,14 @@ msgstr ""
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2874,6 +2886,10 @@ msgstr ""
msgid "can't load with '%q' index"
msgstr ""
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2936,10 +2952,6 @@ msgstr ""
msgid "cannot import name %q"
msgstr ""
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr ""
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3630,6 +3642,10 @@ msgstr ""
msgid "matrix is not positive definite"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3784,6 +3800,7 @@ msgstr ""
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4006,6 +4023,10 @@ msgstr ""
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4051,6 +4072,7 @@ msgstr ""
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h

View File

@ -2467,6 +2467,16 @@ msgstr "indentazione inaspettata"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2539,12 +2549,14 @@ msgstr "Operazione non supportata"
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2919,6 +2931,10 @@ msgstr "impossibile caricare da '%q'"
msgid "can't load with '%q' index"
msgstr "impossibile caricare con indice '%q'"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2981,10 +2997,6 @@ msgstr "impossibile creare un istanza"
msgid "cannot import name %q"
msgstr "impossibile imporate il nome %q"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "impossibile effettuare l'importazione relativa"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3687,6 +3699,10 @@ msgstr "errore di dominio matematico"
msgid "matrix is not positive definite"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3841,6 +3857,7 @@ msgstr "attributo inesistente"
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4069,6 +4086,10 @@ msgstr ""
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader deve essere displayio.Palette o displayio.ColorConverter"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4114,6 +4135,7 @@ msgstr "pow() con 3 argomenti richiede interi"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4706,6 +4728,9 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "cannot perform relative import"
#~ msgstr "impossibile effettuare l'importazione relativa"
#~ msgid "Unsupported pull value."
#~ msgstr "Valore di pull non supportato."

View File

@ -2442,6 +2442,16 @@ msgstr "想定されていないnrfx UUID型"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2513,12 +2523,14 @@ msgstr "非対応の操作"
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2889,6 +2901,10 @@ msgstr ""
msgid "can't load with '%q' index"
msgstr ""
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2951,10 +2967,6 @@ msgstr "インスタンスを作れません"
msgid "cannot import name %q"
msgstr ""
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "相対インポートはできません"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3650,6 +3662,10 @@ msgstr "定義域エラー"
msgid "matrix is not positive definite"
msgstr "正定値行列ではありません"
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3804,6 +3820,7 @@ msgstr "指定の属性はありません"
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4028,6 +4045,10 @@ msgstr ""
"pixel_shaderはdisplayio.Paletteかdisplayio.ColorConverterのどちらかでなければ"
"なりません"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4073,6 +4094,7 @@ msgstr "pow()の第3引数には整数が必要"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4660,6 +4682,9 @@ msgstr "ziはfloat値でなければなりません"
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "cannot perform relative import"
#~ msgstr "相対インポートはできません"
#~ msgid "Unsupported pull value."
#~ msgstr "非対応のpull値"

View File

@ -2431,6 +2431,16 @@ msgstr ""
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2502,12 +2512,14 @@ msgstr ""
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2878,6 +2890,10 @@ msgstr ""
msgid "can't load with '%q' index"
msgstr ""
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2940,10 +2956,6 @@ msgstr ""
msgid "cannot import name %q"
msgstr ""
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr ""
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3634,6 +3646,10 @@ msgstr ""
msgid "matrix is not positive definite"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3788,6 +3804,7 @@ msgstr ""
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4010,6 +4027,10 @@ msgstr ""
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4055,6 +4076,7 @@ msgstr ""
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h

View File

@ -2453,6 +2453,16 @@ msgstr "Onverwacht mrfx uuid type"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr "Niet behandelde ESP TLS fout %d %d %x %d"
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2526,12 +2536,14 @@ msgstr "Niet-ondersteunde operatie"
msgid "Update Failed"
msgstr "Update Mislukt"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr "Waarde lengte != vereist vaste lengte"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2907,6 +2919,10 @@ msgstr "kan niet laden van '%q'"
msgid "can't load with '%q' index"
msgstr "kan niet met '%q' index laden"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr "kan geen niet-'None' waarde naar een net gestartte generator sturen"
@ -2969,10 +2985,6 @@ msgstr "kan geen instantie creëren"
msgid "cannot import name %q"
msgstr "kan naam %q niet importeren"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "kan geen relatieve import uitvoeren"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3670,6 +3682,10 @@ msgstr "fout in het wiskundig domein (math domain error)"
msgid "matrix is not positive definite"
msgstr "matrix is niet positief-definiet"
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3824,6 +3840,7 @@ msgstr "niet zo'n attribuut"
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr "niet-UUID gevonden in service_uuids_whitelist"
@ -4046,6 +4063,10 @@ msgstr "pixel waarde vereist te veel bits"
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader moet displayio.Palette of displayio.ColorConverter zijn"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4092,6 +4113,7 @@ msgstr "pow() met 3 argumenten vereist integers"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4680,6 +4702,9 @@ msgstr "zi moet van type float zijn"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi moet vorm (n_section, 2) hebben"
#~ msgid "cannot perform relative import"
#~ msgstr "kan geen relatieve import uitvoeren"
#, c-format
#~ msgid "No I2C device at address: %x"
#~ msgstr "Geen I2C-apparaat op adres: %x"

View File

@ -2438,6 +2438,16 @@ msgstr "Nieoczekiwany typ nrfx uuid"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2509,12 +2519,14 @@ msgstr "Zła operacja"
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2885,6 +2897,10 @@ msgstr "nie można ładować z '%q'"
msgid "can't load with '%q' index"
msgstr "nie można ładować z indeksem '%q'"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr "świeżo stworzony generator może tylko przyjąć None"
@ -2947,10 +2963,6 @@ msgstr "nie można stworzyć instancji"
msgid "cannot import name %q"
msgstr "nie można zaimportować nazwy %q"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "nie można wykonać relatywnego importu"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3642,6 +3654,10 @@ msgstr "błąd domeny"
msgid "matrix is not positive definite"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3796,6 +3812,7 @@ msgstr "nie ma takiego atrybutu"
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4019,6 +4036,10 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
"pixel_shader musi być typu displayio.Palette lub dispalyio.ColorConverter"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4064,6 +4085,7 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4651,6 +4673,9 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "cannot perform relative import"
#~ msgstr "nie można wykonać relatywnego importu"
#~ msgid "Unsupported pull value."
#~ msgstr "Zła wartość podciągnięcia."

View File

@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2022-02-11 10:58+0000\n"
"PO-Revision-Date: 2022-02-21 08:55+0000\n"
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
"Language-Team: \n"
"Language: pt_BR\n"
@ -2498,6 +2498,16 @@ msgstr "Tipo uuid nrfx inesperado"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr "Erro não tratado do ESP TLS %d %d %x %d"
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr "Houve um erro BLE desconhecido em %s:%d: %d"
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr "Houve um erro BLE desconhecido: %d"
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2571,12 +2581,14 @@ msgstr "Operação não suportada"
msgid "Update Failed"
msgstr "A atualização falou"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr "Comprimento do valor != comprimento fixo necessário"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2958,6 +2970,10 @@ msgstr "não é possível carregar a partir de '%q'"
msgid "can't load with '%q' index"
msgstr "não é possível carregar com o índice '%q'"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr "não é possível realizar a importação relativa"
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -3024,10 +3040,6 @@ msgstr "não é possível criar instância"
msgid "cannot import name %q"
msgstr "não pode importar nome %q"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "não pode executar a importação relativa"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr "Não é possível obter de forma inequívoca a escala do sizeof"
@ -3727,6 +3739,10 @@ msgstr "erro de domínio matemático"
msgid "matrix is not positive definite"
msgstr "a matriz não é definitiva positiva"
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr "max_connections deve estar entre 0 e 10"
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3883,6 +3899,7 @@ msgstr "não há tal atributo"
msgid "non-Device in %q"
msgstr "não dispositivo em %q"
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr "um não UUID foi encontrado na lista service_uuids_whitelist"
@ -4110,6 +4127,10 @@ msgstr "o valor do pixel requer bits demais"
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "o pixel_shader deve ser displayio.Palette ou displayio.ColorConverter"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr "a sondagem no arquivo não está disponível no win32"
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr "o polígono só pode ser registrado em um pai"
@ -4155,6 +4176,7 @@ msgstr "o pow() com 3 argumentos requer números inteiros"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4743,6 +4765,9 @@ msgstr "zi deve ser de um tipo float"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi deve estar na forma (n_section, 2)"
#~ msgid "cannot perform relative import"
#~ msgstr "não pode executar a importação relativa"
#, c-format
#~ msgid "No I2C device at address: %x"
#~ msgstr "Nenhum dispositivo I2C no endereço: %x"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-12-04 12:51+0000\n"
"PO-Revision-Date: 2022-02-14 18:08+0000\n"
"Last-Translator: Clay <code.clayt@gmail.com>\n"
"Language-Team: none\n"
"Language: ru\n"
@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.10-dev\n"
"X-Generator: Weblate 4.11-dev\n"
#: main.c
msgid ""
@ -77,12 +77,10 @@ msgid ""
msgstr "%d адресные пины, %d rgb пины и %d плитки указывают высоту %d а не %d"
#: shared-bindings/microcontroller/Pin.c
#, fuzzy
msgid "%q and %q contain duplicate pins"
msgstr "%q и %q содержат пины-дупликаты"
#: shared-bindings/microcontroller/Pin.c
#, fuzzy
msgid "%q contains duplicate pins"
msgstr "%q содержит пины-дупликаты"
@ -439,7 +437,7 @@ msgstr "Все каналы событий синхронизации уже и
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr "Все таймеры для этого Пина уже используются"
msgstr "Все таймеры для этого пина уже используются"
#: ports/atmel-samd/common-hal/_pew/PewPew.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
@ -702,12 +700,12 @@ msgstr "Сигнал из глубокого сна может подавать
msgid "Can only alarm on one low pin while others alarm high from deep sleep."
msgstr ""
"Сигнал из глубокого сна может подаваться по низкому уровню только на одном "
"выводе, пока остальные сигналят по высокому уровню."
"пане, пока остальные подают сигнал по высокому уровню."
#: ports/espressif/common-hal/alarm/pin/PinAlarm.c
msgid "Can only alarm on two low pins from deep sleep."
msgstr ""
"Сигнал из глубокого сна может подаваться только на двух выводах по низкому "
"Сигнал из глубокого сна может подаваться только на двух пинах по низкому "
"уровню."
#: ports/nrf/common-hal/_bleio/Characteristic.c
@ -748,16 +746,16 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "Cannot output both channels on the same pin"
msgstr "Невозможно вывести оба канала на один вывод"
msgstr "Невозможно вывести оба канала на один пин"
#: ports/espressif/common-hal/alarm/pin/PinAlarm.c
msgid "Cannot pull on input-only pin."
msgstr ""
"Невозможно установить подтяжку на выводе, предназначенном только для ввода."
"Невозможно установить подтяжку на пине, предназначенном только для ввода."
#: shared-module/bitbangio/SPI.c
msgid "Cannot read without MISO pin."
msgstr "Считывание невозможно без вывода MISO."
msgstr "Считывание невозможно без пина MISO."
#: shared-bindings/audiobusio/PDMIn.c
msgid "Cannot record to a file"
@ -792,7 +790,7 @@ msgstr "Срез субкласса невозможен"
#: shared-module/bitbangio/SPI.c
msgid "Cannot transfer without MOSI and MISO pins."
msgstr "Передача данных невозможна без выводов MOSI и MISO."
msgstr "Передача данных невозможна без пинов MOSI и MISO."
#: shared-bindings/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
@ -801,11 +799,11 @@ msgstr "Невозможно изменить частоту на таймере
#: ports/espressif/common-hal/alarm/pin/PinAlarm.c
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c
msgid "Cannot wake on pin edge. Only level."
msgstr "Невозможно проснуться по pin edge. Только по уровню."
msgstr "Невозможно проснуться по спаду/росту на пине. Только по уровню."
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr "Запись невозможна без вывода MOSI."
msgstr "Запись невозможна без пина MOSI."
#: shared-bindings/_bleio/CharacteristicBuffer.c
msgid "CharacteristicBuffer writing not provided"
@ -821,7 +819,7 @@ msgstr "CircuitPython не смог выделить heap."
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr "Не удалось инициализировать тактовый вывод."
msgstr "Не удалось инициализировать пин Clock."
#: shared-module/bitbangio/I2C.c
msgid "Clock stretch too long"
@ -930,7 +928,7 @@ msgstr "ЦАП уже используется"
#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c
#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c
msgid "Data 0 pin must be byte aligned"
msgstr "Вывод data 0 должен быть выровнен по байтам"
msgstr "Пин data 0 должен быть байтово выровнен"
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
@ -949,7 +947,8 @@ msgstr "Данные слишком велики для пакета объяв
#: ports/stm/common-hal/alarm/pin/PinAlarm.c
msgid "Deep sleep pins must use a rising edge with pulldown"
msgstr ""
"Выводы глубокого сна должны использовать rising edge с подтяжкой к земле"
"Выводы глубокого сна должны использовать сигнал по возрастанию с подтяжкой к "
"земле"
#: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length."
@ -961,7 +960,7 @@ msgstr "Устройство используется"
#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
msgid "DigitalInOut not supported on given pin"
msgstr "DigitalInOut не поддерживается на данном выводе"
msgstr "DigitalInOut не поддерживается на данном пине"
#: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c
@ -975,7 +974,6 @@ msgid "Display rotation must be in 90 degree increments"
msgstr "Поворот дисплея должен осуществляться с шагом 90 градусов"
#: shared-bindings/digitalio/DigitalInOut.c
#, fuzzy
msgid "Drive mode not used when direction is input."
msgstr "Drive mode не используется, когда направление является входным."
@ -1173,11 +1171,11 @@ msgstr ""
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr "Оборудование занято, попробуйте использовать другие выводы"
msgstr "Оборудование занято, попробуйте использовать другие пины"
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Hardware in use, try alternative pins"
msgstr "Оборудование используется, попробуйте использовать другие выводы"
msgstr "Оборудование используется, попробуйте использовать другие пины"
#: shared-bindings/wifi/Radio.c
msgid "Hostname must be between 1 and 253 characters"
@ -1227,13 +1225,12 @@ msgstr "Неверный размер программы инициализац
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
"Начальное направление вывода set конфликтует с начальным направлением вывода "
"out"
"Начальное направление пина set конфликтует с начальным направлением пина out"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
"Начальное состояние вывода set конфликтует с начальным состоянием вывода out"
"Начальное состояние пина set конфликтует с начальным состоянием пина out"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
@ -1256,20 +1253,19 @@ msgstr "Ошибка ввода/вывода"
#, c-format
msgid "Instruction %d shifts in more bits than pin count"
msgstr ""
"Инструкция %d вводит (shifts in) большее количество бит, чем количество "
"выводов"
"Инструкция %d вводит (shifts in) большее количество бит, чем количество пинов"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format
msgid "Instruction %d shifts out more bits than pin count"
msgstr ""
"Инструкция %d выводит (shifts out) большее количество бит, чем количество "
"выводов"
"пинов"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format
msgid "Instruction %d uses extra pin"
msgstr "Инструкция %d использует дополнительный вывод"
msgstr "Инструкция %d использует дополнительный пин"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format
@ -1285,7 +1281,6 @@ msgid "Insufficient encryption"
msgstr "Недостаточное шифрование"
#: ports/espressif/common-hal/wifi/Radio.c
#, fuzzy
msgid "Interface must be started"
msgstr "Интерфейс должен быть запущен"
@ -1315,13 +1310,13 @@ msgstr "Недопустимый %q"
#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Invalid %q pin"
msgstr "Недопустимый вывод %q"
msgstr "Недопустимый пин %q"
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr "Неверный выбор вывода %q"
msgstr "Неверный выбор пина %q"
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
@ -1347,7 +1342,7 @@ msgstr "Неверный BSSID"
#: ports/espressif/common-hal/analogio/AnalogOut.c
#: ports/stm/common-hal/analogio/AnalogOut.c
msgid "Invalid DAC pin supplied"
msgstr "Передан неверный вывод ЦАП"
msgstr "Передан неверный пин ЦАП"
#: shared-bindings/wifi/Radio.c
msgid "Invalid MAC address"
@ -1368,7 +1363,7 @@ msgstr "Недопустимая частота ШИМ"
#: ports/espressif/common-hal/analogio/AnalogIn.c
msgid "Invalid Pin"
msgstr "Неверный вывод"
msgstr "Неверный пин"
#: ports/espressif/bindings/espidf/__init__.c
#: ports/espressif/common-hal/busio/I2C.c
@ -1450,15 +1445,15 @@ msgstr "Неверная фаза"
#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Недопустимый вывод"
msgstr "Недопустимый пин"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "Invalid pin for left channel"
msgstr "Недопустимый вывод для левого канала"
msgstr "Недопустимый пин для левого канала"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "Invalid pin for right channel"
msgstr "Недопустимый вывод для правого канала"
msgstr "Недопустимый пин для правого канала"
#: ports/atmel-samd/common-hal/busio/I2C.c
#: ports/atmel-samd/common-hal/busio/SPI.c
@ -1478,7 +1473,7 @@ msgstr "Недопустимый вывод для правого канала"
#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c
#: shared-bindings/busio/UART.c
msgid "Invalid pins"
msgstr "Недопустимые выводы"
msgstr "Недопустимые пины"
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
#: shared-bindings/displayio/FourWire.c
@ -1552,11 +1547,11 @@ msgstr "MAC адрес был недействительным"
#: shared-module/bitbangio/SPI.c
msgid "MISO pin init failed."
msgstr "Не удалось инициализировать вывод MISO."
msgstr "Не удалось инициализировать пин MISO."
#: shared-module/bitbangio/SPI.c
msgid "MOSI pin init failed."
msgstr "Не удалось инициализировать вывод MOSI."
msgstr "Не удалось инициализировать пин MOSI."
#: shared-bindings/is31fl3741/IS31FL3741.c
msgid "Mapping must be a tuple"
@ -1577,44 +1572,43 @@ msgstr "Задержка включения микрофона должна бы
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
msgid "Missing MISO or MOSI Pin"
msgstr "Отсутствует вывод MISO или MOSI"
msgstr "Отсутствует пин MISO или MOSI"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format
msgid "Missing first_in_pin. Instruction %d reads pin(s)"
msgstr "Отсутствует first_in_pin. Инструкция %d читает состояние вывода (-ов)"
msgstr "Отсутствует first_in_pin. Инструкция %d читает состояние пина (-ов)"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format
msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)"
msgstr ""
"Отсутствует first_out_pin. Инструкция %d вводит (shifts out) на вывод(ы)"
msgstr "Отсутствует first_out_pin. Инструкция %d вводит (shifts out) на пин(ы)"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, fuzzy, c-format
#, c-format
msgid "Missing first_in_pin. Instruction %d waits based on pin"
msgstr "Отсутствует first_in_pin. Инструкция %d ожидает на основе вывода"
msgstr "Отсутствует first_in_pin. Инструкция %d ожидает на основе пина"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format
msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)"
msgstr ""
"Отсутствует first_out_pin. Инструкция %d выводит (shifts out) на вывод(ы)"
"Отсутствует first_out_pin. Инструкция %d выводит (shifts out) на пин(ы)"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, fuzzy, c-format
#, c-format
msgid "Missing first_out_pin. Instruction %d writes pin(s)"
msgstr "Отсутствует first_out_pin. Инструкция %d записывает вывод(ы)"
msgstr "Отсутствует first_out_pin. Инструкция %d записывает пин(ы)"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format
msgid "Missing first_set_pin. Instruction %d sets pin(s)"
msgstr "Отсутствует first_set_pin. Инструкция %d устанавливает вывод(ы)"
msgstr "Отсутствует first_set_pin. Инструкция %d устанавливает пин(ы)"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format
msgid "Missing jmp_pin. Instruction %d jumps on pin"
msgstr "Отсутствует jmp_pin. Инструкция %d перепрыгивает на вывод"
msgstr "Отсутствует jmp_pin. Инструкция %d перепрыгивает на пин"
#: shared-module/usb_hid/Device.c
#, c-format
@ -1627,12 +1621,12 @@ msgstr "Должен быть субклассом %q."
#: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c
msgid "Must provide MISO or MOSI pin"
msgstr "Вывод MISO или MOSI должен быть предоставлен"
msgstr "Пин MISO или MOSI должен быть предоставлен"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "Количество используемых rgb-контактов должно быть кратно 6, а не %d."
msgstr "Количество используемых rgb-пинов должно быть кратно 6, а не %d"
#: supervisor/shared/safe_mode.c
msgid "NLR jump failed. Likely memory corruption."
@ -1678,26 +1672,26 @@ msgstr ""
#: ports/espressif/common-hal/busio/SPI.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
msgid "No MISO Pin"
msgstr "Нет вывода MISO"
msgstr "Нет пина MISO"
#: ports/espressif/common-hal/busio/SPI.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
msgid "No MOSI Pin"
msgstr "Нет вывода MOSI"
msgstr "Нет пина MOSI"
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/espressif/common-hal/busio/UART.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "No RX pin"
msgstr "Нет вывода RX"
msgstr "Нет пина RX"
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/espressif/common-hal/busio/UART.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "No TX pin"
msgstr "Нет вывода TX"
msgstr "Нет пина TX"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "No available clocks"
@ -1725,13 +1719,13 @@ msgstr "Отсутствует аппаратный генератор случ
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr "Отсутствует аппаратная поддержка вывода clk"
msgstr "Отсутствует аппаратная поддержка пина clk"
#: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
msgstr "Отсутствует аппаратная поддержка на выводе"
msgstr "Отсутствует аппаратная поддержка на пине"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
@ -1766,14 +1760,13 @@ msgstr "В программе отсутствует вывод"
#: ports/espressif/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c
#, fuzzy
msgid "No pull up found on SDA or SCL; check your wiring"
msgstr ""
"Подтяжка на выводах SDA или SCL не обнаружена; проверь схему подключения"
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr "Отсутствует подтяжка к земле на выводе; Рекомендуется 1 Мегаом"
msgstr "Отсутствует подтяжка к земле на пине; Рекомендуется 1 Мегаом"
#: py/moduerrno.c
msgid "No space left on device"
@ -1811,7 +1804,6 @@ msgid "Not playing"
msgstr "Не играет"
#: shared-bindings/_bleio/__init__.c
#, fuzzy
msgid "Not settable"
msgstr "Не устанавливается"
@ -1833,7 +1825,6 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
#, fuzzy
msgid "Only 8 or 16 bit mono with "
msgstr "Только 8- или 16-битное моно с "
@ -1846,12 +1837,12 @@ msgid "Only IPv4 sockets supported"
msgstr "Поддерживаются только сокеты IPv4"
#: shared-module/displayio/OnDiskBitmap.c
#, fuzzy, c-format
#, c-format
msgid ""
"Only Windows format, uncompressed BMP supported: given header size is %d"
msgstr ""
"Поддерживается только формат Windows, несжатый BMP: заданный размер "
"заголовка - %d."
"заголовка - %d"
#: shared-bindings/_bleio/Adapter.c
msgid "Only connectable advertisements can be directed"
@ -1954,15 +1945,15 @@ msgstr ""
#: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c
#: ports/stm/common-hal/alarm/pin/PinAlarm.c
msgid "Pin cannot wake from Deep Sleep"
msgstr ""
msgstr "Пин не может вывести из глубокого сна"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Pin count must be at least 1"
msgstr ""
msgstr "Количество пинов должно быть не менее 1"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Pin count too large"
msgstr ""
msgstr "Слишком большое количество пинов"
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
#: ports/cxd56/common-hal/analogio/AnalogIn.c
@ -1972,25 +1963,25 @@ msgstr ""
#: ports/raspberrypi/common-hal/analogio/AnalogIn.c
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr ""
msgstr "Пин не имеет возможности АЦП"
#: ports/stm/common-hal/alarm/pin/PinAlarm.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "Pin interrupt already in use"
msgstr ""
msgstr "Прерывание пина уже используется"
#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c
#: shared-bindings/digitalio/DigitalInOut.c
msgid "Pin is input only"
msgstr ""
msgstr "Пин является только входом"
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
msgstr "Пин должен быть на канале ШИМ B"
#: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts"
msgstr ""
msgstr "Пин должен поддерживать аппаратные прерывания"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
@ -1999,18 +1990,21 @@ msgid ""
"bytes. If this cannot be avoided, pass allow_inefficient=True to the "
"constructor"
msgstr ""
"Pinout использует %d байт на элемент, что потребляет больше, чем идеальные "
"%d байт. Если этого нельзя избежать, передайте allow_inefficient=True в "
"конструктор"
#: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c
msgid "Pins must be sequential"
msgstr ""
msgstr "Пины должны быть последовательными"
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential GPIO pins"
msgstr ""
msgstr "Пины должны быть последовательными выводами GPIO"
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice"
msgstr ""
msgstr "Пины должны иметь общий срез ШИМ"
#: py/builtinhelp.c
msgid "Plus any modules on the filesystem\n"
@ -2203,7 +2197,7 @@ msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Set pin count must be between 1 and 5"
msgstr ""
msgstr "Число Set пинов должно быть от 1 до 5"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Side set pin count must be between 1 and 5"
@ -2239,7 +2233,7 @@ msgstr ""
#: shared-bindings/paralleldisplay/ParallelBus.c
msgid "Specify exactly one of data0 or data_pins"
msgstr ""
msgstr "Укажите точно один из data0 или data_pins"
#: extmod/modure.c
msgid "Splitting with sub-captures"
@ -2263,7 +2257,7 @@ msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Supply at least one UART pin"
msgstr ""
msgstr "Предоставьте хотяб один пин UART"
#: shared-bindings/alarm/time/TimeAlarm.c
msgid "Supply one of monotonic_time or epoch_time"
@ -2291,7 +2285,7 @@ msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30"
msgstr ""
msgstr "Длина rgb_pins должна быть 6, 12, 18, 24 или 30"
#: supervisor/shared/safe_mode.c
msgid ""
@ -2325,6 +2319,8 @@ msgid ""
"This microcontroller only supports data0=, not data_pins=, because it "
"requires contiguous pins."
msgstr ""
"Этот микроконтроллер поддерживает только data0=, а не data_pins=, поскольку "
"для него требуются смежные выводы."
#: shared-bindings/displayio/TileGrid.c
msgid "Tile height must exactly divide bitmap height"
@ -2482,6 +2478,16 @@ msgstr ""
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2553,12 +2559,14 @@ msgstr ""
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2929,6 +2937,10 @@ msgstr ""
msgid "can't load with '%q' index"
msgstr ""
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2991,10 +3003,6 @@ msgstr ""
msgid "cannot import name %q"
msgstr ""
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr ""
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3106,7 +3114,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c
#, c-format
msgid "data pin #%d in use"
msgstr ""
msgstr "data-пин #%d уже используется"
#: extmod/ulab/code/ndarray.c
msgid "data type not understood"
@ -3685,6 +3693,10 @@ msgstr ""
msgid "matrix is not positive definite"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3825,7 +3837,7 @@ msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/paralleldisplay/ParallelBus.c
msgid "no reset pin available"
msgstr ""
msgstr "нет доступного контакта сброса"
#: shared-module/sdcardio/SDCard.c
msgid "no response from SD card"
@ -3839,6 +3851,7 @@ msgstr ""
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4061,6 +4074,10 @@ msgstr ""
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4106,6 +4123,7 @@ msgstr ""
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4202,12 +4220,12 @@ msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr ""
msgstr "rgb_pins[%d] дублирует другое назначение пинов"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
msgstr "rgb_pins[%d] не находится на том же порту, что и clock"
#: extmod/ulab/code/numpy/numerical.c
msgid "roll argument must be an ndarray"
@ -4685,7 +4703,6 @@ msgid "zi must be an ndarray"
msgstr ""
#: extmod/ulab/code/scipy/signal/signal.c
#, fuzzy
msgid "zi must be of float type"
msgstr "zi должно быть типа float"

View File

@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2022-02-11 10:58+0000\n"
"PO-Revision-Date: 2022-02-19 20:22+0000\n"
"Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: sv\n"
@ -2469,6 +2469,16 @@ msgstr "Oväntad nrfx uuid-typ"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr "Ej hanterat ESP TLS-fel %d %d %x %d"
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr "Okänt BLE-fel vid %s:%d: %d"
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr "Okänt BLE-fel: %d"
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2542,12 +2552,14 @@ msgstr "Åtgärd som inte stöds"
msgid "Update Failed"
msgstr "Uppdateringen misslyckades"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr "Värdets längde ! = krävd fast längd"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2926,6 +2938,10 @@ msgstr "kan inte ladda från '%q'"
msgid "can't load with '%q' index"
msgstr "kan inte ladda med '%q' index"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr "kan inte utföra relativ import"
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr "kan inte skicka icke-None värde till nystartad generator"
@ -2990,10 +3006,6 @@ msgstr "kan inte skapa instans"
msgid "cannot import name %q"
msgstr "kan inte importera namn %q"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "kan inte utföra relativ import"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr "Kan inte entydigt få sizeof scalar"
@ -3690,6 +3702,10 @@ msgstr "matematikdomänfel"
msgid "matrix is not positive definite"
msgstr "matrisen är inte positiv bestämd"
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr "max_connections måste vara mellan 0 och 10"
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3844,6 +3860,7 @@ msgstr "inget sådant attribut"
msgid "non-Device in %q"
msgstr "icke-enhet i %q"
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr "icke-UUID hittades i service_uuids_whitelist"
@ -4067,6 +4084,10 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
"pixel_shader måste vara displayio.Palette eller displayio.ColorConverter"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr "filbevakning är inte tillgänglig på win32"
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr "polygon kan endast registreras i en förälder"
@ -4112,6 +4133,7 @@ msgstr "pow() med 3 argument kräver heltal"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4700,6 +4722,9 @@ msgstr "zi måste vara av typ float"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi måste vara i formen (n_section, 2)"
#~ msgid "cannot perform relative import"
#~ msgstr "kan inte utföra relativ import"
#, c-format
#~ msgid "No I2C device at address: %x"
#~ msgstr "Ingen I2C-enhet på adress: %x"

View File

@ -2445,6 +2445,16 @@ msgstr ""
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2516,12 +2526,14 @@ msgstr ""
msgid "Update Failed"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr ""
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2892,6 +2904,10 @@ msgstr ""
msgid "can't load with '%q' index"
msgstr ""
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr ""
@ -2954,10 +2970,6 @@ msgstr ""
msgid "cannot import name %q"
msgstr ""
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr ""
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr ""
@ -3648,6 +3660,10 @@ msgstr ""
msgid "matrix is not positive definite"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3802,6 +3818,7 @@ msgstr ""
msgid "non-Device in %q"
msgstr ""
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr ""
@ -4024,6 +4041,10 @@ msgstr ""
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr ""
@ -4069,6 +4090,7 @@ msgstr ""
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h

View File

@ -2481,6 +2481,16 @@ msgstr "Yìwài de nrfx uuid lèixíng"
msgid "Unhandled ESP TLS error %d %d %x %d"
msgstr "Wèi chǔlǐ de ESP TLS cuòwù %d %d %x %d"
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error at %s:%d: %d"
msgstr ""
#: ports/espressif/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown BLE error: %d"
msgstr ""
#: shared-bindings/wifi/Radio.c
#, c-format
msgid "Unknown failure %d"
@ -2554,12 +2564,14 @@ msgstr "Bù zhīchí de cāozuò"
msgid "Update Failed"
msgstr "gēng xīn shī bài"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
msgid "Value length != required fixed length"
msgstr "Zhí chángdù != Suǒ xū de gùdìng chángdù"
#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -2938,6 +2950,10 @@ msgstr "wúfǎ cóng '%q' jiāzài"
msgid "can't load with '%q' index"
msgstr "wúfǎ yòng '%q' ' suǒyǐn jiāzài"
#: py/builtinimport.c
msgid "can't perform relative import"
msgstr ""
#: py/objgenerator.c
msgid "can't send non-None value to a just-started generator"
msgstr "wúfǎ xiàng gānggāng qǐdòng de shēngchéng qì fāsòng fēi zhí"
@ -3001,10 +3017,6 @@ msgstr "wúfǎ chuàngjiàn shílì"
msgid "cannot import name %q"
msgstr "wúfǎ dǎorù míngchēng %q"
#: py/builtinimport.c
msgid "cannot perform relative import"
msgstr "wúfǎ zhíxíng xiāngguān dǎorù"
#: extmod/moductypes.c
msgid "cannot unambiguously get sizeof scalar"
msgstr "bù néng háo bù hán hu de dé dào dà xiǎo de lín"
@ -3701,6 +3713,10 @@ msgstr "shùxué yù cuòwù"
msgid "matrix is not positive definite"
msgstr "jǔzhèn bùshì zhèngdìng de"
#: ports/espressif/common-hal/wifi/Radio.c
msgid "max_connections must be between 0 and 10"
msgstr ""
#: ports/espressif/common-hal/_bleio/Descriptor.c
#: ports/nrf/common-hal/_bleio/Characteristic.c
#: ports/nrf/common-hal/_bleio/Descriptor.c
@ -3855,6 +3871,7 @@ msgstr "méiyǒu cǐ shǔxìng"
msgid "non-Device in %q"
msgstr "fēi shè bèi zài %q"
#: ports/espressif/common-hal/_bleio/Connection.c
#: ports/nrf/common-hal/_bleio/Connection.c
msgid "non-UUID found in service_uuids_whitelist"
msgstr "Zài service_uuids bái míngdān zhōng zhǎodào fēi UUID"
@ -4077,6 +4094,10 @@ msgstr "xiàngsù zhí xūyào tài duō wèi"
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader bìxū shì displayio.Palette huò displayio.ColorConverter"
#: extmod/vfs_posix_file.c
msgid "poll on file not available on win32"
msgstr ""
#: shared-module/vectorio/Polygon.c
msgid "polygon can only be registered in one parent"
msgstr "duōbiānxíng zhī néng zài yīgè fù jí zhōng zhùcè"
@ -4122,6 +4143,7 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù"
#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h
#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h
@ -4713,6 +4735,9 @@ msgstr "zi bìxū wèi fú diǎn xíng"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)"
#~ msgid "cannot perform relative import"
#~ msgstr "wúfǎ zhíxíng xiāngguān dǎorù"
#, c-format
#~ msgid "No I2C device at address: %x"
#~ msgstr "dì zhǐ wú I2C shè bèi: %x"

36
main.c
View File

@ -162,9 +162,9 @@ STATIC void start_mp(supervisor_allocation *heap, bool first_run) {
mp_obj_list_init((mp_obj_list_t *)mp_sys_path, 0);
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script)
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_));
// Frozen modules are in their own pseudo-dir, e.g., ".frozen".
// Prioritize .frozen over /lib.
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_FROZEN_FAKE_DIR_QSTR));
#if MICROPY_MODULE_FROZEN
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__dot_frozen));
#endif
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
mp_obj_list_init((mp_obj_list_t *)mp_sys_argv, 0);
@ -301,7 +301,8 @@ STATIC void cleanup_after_vm(supervisor_allocation *heap, mp_obj_t exception) {
STATIC void print_code_py_status_message(safe_mode_t safe_mode) {
if (autoreload_is_enabled()) {
serial_write_compressed(translate("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n"));
serial_write_compressed(
translate("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n"));
} else {
serial_write_compressed(translate("Auto-reload is off.\n"));
}
@ -401,7 +402,8 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re
// the options because it can be treated like any other reason-for-stickiness bit. The
// source is different though: it comes from the options that will apply to the next run,
// while the rest of next_code_options is what applied to this run.
if (next_code_allocation != NULL && (((next_code_info_t *)next_code_allocation->ptr)->options & SUPERVISOR_NEXT_CODE_OPT_NEWLY_SET)) {
if (next_code_allocation != NULL &&
(((next_code_info_t *)next_code_allocation->ptr)->options & SUPERVISOR_NEXT_CODE_OPT_NEWLY_SET)) {
next_code_options |= SUPERVISOR_NEXT_CODE_OPT_NEWLY_SET;
}
@ -527,9 +529,9 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re
// Sleep until our next interrupt.
#if CIRCUITPY_ALARM
if (result.return_code & PYEXEC_DEEP_SLEEP) {
// Make sure we have been awake long enough for USB to connect (enumeration delay).
int64_t connecting_delay_ticks = CIRCUITPY_USB_CONNECTED_SLEEP_DELAY * 1024 - port_get_raw_ticks(NULL);
// Until it's safe to decide whether we're real/fake sleeping
const bool awoke_from_true_deep_sleep =
common_hal_mcu_processor_get_reset_reason() == RESET_REASON_DEEP_SLEEP_ALARM;
if (fake_sleeping) {
// This waits until a pretend deep sleep alarm occurs. They are set
// during common_hal_alarm_set_deep_sleep_alarms. On some platforms
@ -537,18 +539,28 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re
// for deep sleep alarms above. If it wasn't a deep sleep alarm,
// then we'll idle here again.
common_hal_alarm_pretending_deep_sleep();
} else if (connecting_delay_ticks < 0) {
// Entering deep sleep (may be fake or real.)
}
// The first time we go into a deep sleep, make sure we have been awake long enough
// for USB to connect (enumeration delay), or for the BLE workflow to start.
// We wait CIRCUITPY_WORKFLOW_CONNECTION_SLEEP_DELAY seconds after a restart.
// But if we woke up from a real deep sleep, don't wait for connection. The user will need to
// do a hard reset to get out of the real deep sleep.
else if (awoke_from_true_deep_sleep ||
port_get_raw_ticks(NULL) > CIRCUITPY_WORKFLOW_CONNECTION_SLEEP_DELAY * 1024) {
// OK to start sleeping, real or fake.
status_led_deinit();
deinit_rxtx_leds();
board_deinit();
if (!supervisor_workflow_active()) {
// Continue with true deep sleep even if workflow is available.
if (awoke_from_true_deep_sleep || !supervisor_workflow_active()) {
// Enter true deep sleep. When we wake up we'll be back at the
// top of main(), not in this loop.
common_hal_alarm_enter_deep_sleep();
// Does not return.
} else {
serial_write_compressed(translate("Pretending to deep sleep until alarm, CTRL-C or file write.\n"));
serial_write_compressed(
translate("Pretending to deep sleep until alarm, CTRL-C or file write.\n"));
fake_sleeping = true;
}
} else {

View File

@ -23,10 +23,7 @@ by the target MicroPython runtime (eg onto a pyboard's filesystem), and then
imported like any other Python module using `import foo`.
Different target runtimes may require a different format of the compiled
bytecode, and such options can be passed to the cross compiler. For example,
the unix port of MicroPython requires the following:
$ ./mpy-cross -mcache-lookup-bc foo.py
bytecode, and such options can be passed to the cross compiler.
If the Python code contains `@native` or `@viper` annotations, then you must
specify `-march` to match the target architecture.

View File

@ -87,7 +87,6 @@ STATIC int usage(char **argv) {
"Target specific options:\n"
"-msmall-int-bits=number : set the maximum bits used to encode a small-int\n"
"-mno-unicode : don't support unicode in compiled strings\n"
"-mcache-lookup-bc : cache map lookups in the bytecode\n"
"-march=<arch> : set architecture for native emitter; x86, x64, armv6, armv7m, armv7em, armv7emsp, armv7emdp, xtensa, xtensawin\n"
"\n"
"Implementation specific options:\n", argv[0]
@ -172,8 +171,6 @@ MP_NOINLINE int main_(int argc, char **argv) {
#ifdef _WIN32
set_fmode_binary();
#endif
mp_obj_list_init(mp_sys_path, 0);
mp_obj_list_init(mp_sys_argv, 0);
#if MICROPY_EMIT_NATIVE
// Set default emitter options
@ -184,7 +181,6 @@ MP_NOINLINE int main_(int argc, char **argv) {
// set default compiler configuration
mp_dynamic_compiler.small_int_bits = 31;
mp_dynamic_compiler.opt_cache_map_lookup_in_bytecode = 0;
mp_dynamic_compiler.py_builtins_str_unicode = 1;
#if defined(__i386__)
mp_dynamic_compiler.native_arch = MP_NATIVE_ARCH_X86;
@ -243,10 +239,6 @@ MP_NOINLINE int main_(int argc, char **argv) {
return usage(argv);
}
// TODO check that small_int_bits is within range of host's capabilities
} else if (strcmp(argv[a], "-mno-cache-lookup-bc") == 0) {
mp_dynamic_compiler.opt_cache_map_lookup_in_bytecode = 0;
} else if (strcmp(argv[a], "-mcache-lookup-bc") == 0) {
mp_dynamic_compiler.opt_cache_map_lookup_in_bytecode = 1;
} else if (strcmp(argv[a], "-mno-unicode") == 0) {
mp_dynamic_compiler.py_builtins_str_unicode = 0;
} else if (strcmp(argv[a], "-municode") == 0) {

View File

@ -36,8 +36,6 @@
#define MICROPY_COMP_TRIPLE_TUPLE_ASSIGN (1)
#define MICROPY_COMP_RETURN_IF_EXPR (1)
#define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (0)
#define MICROPY_READER_POSIX (1)
#define MICROPY_ENABLE_RUNTIME (0)
#define MICROPY_ENABLE_GC (1)

View File

@ -9,3 +9,14 @@ CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"
LONGINT_IMPL = MPZ
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PortalBase
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ESP32SPI
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
CIRCUITPY_SHARPDISPLAY=0
CIRCUITPY_SDCARDIO=0
CIRCUITPY_BLEIO_HCI=0
CIRCUITPY_BLEIO=0

View File

@ -9,3 +9,11 @@ CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ, GD25Q64C"
LONGINT_IMPL = MPZ
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PortalBase
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ESP32SPI
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_FakeRequests

View File

@ -9,3 +9,11 @@ CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ, GD25Q64C"
LONGINT_IMPL = MPZ
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PortalBase
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ESP32SPI
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_FakeRequests

View File

@ -268,6 +268,10 @@ ifneq ($(CIRCUITPY_USB),0)
SRC_C += lib/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c
endif
ifneq ($(CIRCUITPY_BLEIO),0)
SRC_C += common-hal/_bleio/ble_events.c
endif
SRC_COMMON_HAL_EXPANDED = \
$(addprefix shared-bindings/, $(SRC_COMMON_HAL)) \
$(addprefix shared-bindings/, $(SRC_BINDINGS_ENUMS)) \

View File

@ -71,14 +71,6 @@ uint8_t display_init_sequence[] = {
void board_init(void) {
// Never reset the I2C/TFT power pin because doing so will reset the display.
// Instead, on reset set the default value and free the pin for user use.
// Relying on the normal pin reset would briefly float/pull the pin that
// could lead to a power brownout.
common_hal_never_reset_pin(&pin_GPIO21);
reset_board();
busio_spi_obj_t *spi = common_hal_board_create_spi(0);
displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus;
bus->base.type = &displayio_fourwire_type;
@ -99,7 +91,6 @@ void board_init(void) {
// workaround as board_init() is called before reset_port() in main.c
pwmout_reset();
common_hal_displayio_display_construct(
display,
bus,
@ -138,12 +129,18 @@ bool board_requests_safe_mode(void) {
return false;
}
void reset_board(void) {
// Turn on TFT and I2C
gpio_set_direction(21, GPIO_MODE_DEF_OUTPUT);
gpio_set_level(21, true);
bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
// Override the I2C/TFT power pin reset to prevent resetting the display.
if (pin_number == 21) {
// Turn on TFT and I2C
gpio_set_direction(21, GPIO_MODE_DEF_OUTPUT);
gpio_set_level(21, true);
return true;
}
return false;
}
free_pin_number(21);
void reset_board(void) {
}
void board_deinit(void) {

View File

@ -43,7 +43,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO33) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO34) },
{ MP_ROM_QSTR(MP_QSTR_I2C_TFT_POWER), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_TFT_I2C_POWER), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) },
{ MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) },

View File

@ -17,3 +17,10 @@ CIRCUITPY_ESP_FLASH_FREQ=40m
CIRCUITPY_ESP_FLASH_SIZE=4MB
CIRCUITPY_MODULE=wrover
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PortalBase
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_FakeRequests
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text

View File

@ -172,6 +172,25 @@ void reset_board(void) {
}
bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
// Pin 16 is speaker enable and it's pulled down on the board. We don't want
// to pull it high because then we'll compete with the external pull down.
// So, reset without any pulls internally.
if (pin_number == 16) {
gpio_config_t cfg = {
.pin_bit_mask = BIT64(16),
.mode = GPIO_MODE_DISABLE,
// The pin is externally pulled down, so we don't need to pull it.
.pull_up_en = false,
.pull_down_en = false,
.intr_type = GPIO_INTR_DISABLE,
};
gpio_config(&cfg);
return true;
}
return false;
}
void board_deinit(void) {
displayio_epaperdisplay_obj_t *display = &displays[0].epaper_display;
if (display->base.type == &displayio_epaperdisplay_type) {

View File

@ -17,3 +17,11 @@ CIRCUITPY_ESP_FLASH_FREQ=40m
CIRCUITPY_ESP_FLASH_SIZE=4MB
CIRCUITPY_MODULE=wrover
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PortalBase
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_FakeRequests
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH

View File

@ -50,5 +50,7 @@
#define DOUBLE_TAP_PIN (&pin_GPIO10)
#ifdef DEBUG
#define DEBUG_UART_RX (&pin_GPIO16)
#define DEBUG_UART_TX (&pin_GPIO5)
#endif

View File

@ -0,0 +1,165 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "supervisor/board.h"
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-module/displayio/__init__.h"
#include "shared-module/displayio/mipi_constants.h"
#define DELAY 0x80
// display init sequence according to LilyGO example app
uint8_t display_init_sequence[] = {
// sw reset
0x01, 0 | DELAY, 150,
// sleep out
0x11, 0 | DELAY, 255,
// normal display mode on
0x13, 0,
// display and color format settings
0x36, 1, 0x08,
0xB6, 2, 0x0A, 0x82,
0x3A, 1 | DELAY, 0x55, 10,
// ST7789V frame rate setting
0xB2, 5, 0x0C, 0x0C, 0x00, 0x33, 0x33,
// voltages: VGH / VGL
0xB7, 1, 0x35,
// ST7789V power setting
0xBB, 1, 0x28,
0xC0, 1, 0x0C,
0xC2, 2, 0x01, 0xFF,
0xC3, 1, 0x10,
0xC4, 1, 0x20,
0xC6, 1, 0x0F,
0xD0, 2, 0xA4, 0xA1,
// ST7789V gamma setting
0xE0, 14, 0xD0, 0x00, 0x02, 0x07, 0x0A, 0x28, 0x32, 0x44, 0x42, 0x06, 0x0E, 0x12, 0x14, 0x17,
0xE1, 14, 0xD0, 0x00, 0x02, 0x07, 0x0A, 0x28, 0x31, 0x54, 0x47, 0x0E, 0x1C, 0x17, 0x1B, 0x1E,
0x21, 0,
// display on
0x29, 0 | DELAY, 255,
};
static void display_init(void) {
busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus;
common_hal_busio_spi_construct(
spi,
&pin_GPIO34, // CLK
&pin_GPIO33, // MOSI
NULL, // MISO not connected
false); // Not half-duplex
common_hal_busio_spi_never_reset(spi);
displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus;
bus->base.type = &displayio_fourwire_type;
common_hal_displayio_fourwire_construct(
bus,
spi,
&pin_GPIO35, // DC
&pin_GPIO36, // CS
NULL, // NO RST ?
40000000, // baudrate
0, // polarity
0 // phase
);
displayio_display_obj_t *display = &displays[0].display;
display->base.type = &displayio_display_type;
// workaround as board_init() is called before reset_port() in main.c
pwmout_reset();
common_hal_displayio_display_construct(
display,
bus,
240, // width (after rotation)
135, // height (after rotation)
52, // column start
40, // row start
90, // rotation
16, // color depth
false, // grayscale
false, // pixels in a byte share a row. Only valid for depths < 8
1, // bytes per cell. Only valid for depths < 8
false, // reverse_pixels_in_byte. Only valid for depths < 8
true, // reverse_pixels_in_word
MIPI_COMMAND_SET_COLUMN_ADDRESS, // set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // set row command
MIPI_COMMAND_WRITE_MEMORY_START, // write memory command
display_init_sequence,
sizeof(display_init_sequence),
&pin_GPIO38, // backlight pin
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness (ignored)
false, // auto_brightness
false, // single_byte_bounds
false, // data_as_commands
true, // auto_refresh
60, // native_frames_per_second
true, // backlight_on_high
false // SH1107_addressing
);
common_hal_never_reset_pin(&pin_GPIO38); // backlight pin
}
void board_init(void) {
// USB
common_hal_never_reset_pin(&pin_GPIO19);
common_hal_never_reset_pin(&pin_GPIO20);
// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
#endif
// SPI Flash and RAM
common_hal_never_reset_pin(&pin_GPIO26);
common_hal_never_reset_pin(&pin_GPIO27);
common_hal_never_reset_pin(&pin_GPIO28);
common_hal_never_reset_pin(&pin_GPIO29);
common_hal_never_reset_pin(&pin_GPIO30);
common_hal_never_reset_pin(&pin_GPIO31);
common_hal_never_reset_pin(&pin_GPIO32);
// Display
display_init();
}
bool board_requests_safe_mode(void) {
return false;
}
void reset_board(void) {
}
void board_deinit(void) {
}

View File

@ -0,0 +1,40 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
// Micropython setup
#define MICROPY_HW_BOARD_NAME "IoTs2"
#define MICROPY_HW_MCU_NAME "ESP32S2"
#define MICROPY_HW_LED (&pin_GPIO37)
#define MICROPY_HW_NEOPIXEL (&pin_GPIO16)
#define MICROPY_HW_BUTTON (&pin_GPIO21)
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO21)
#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")
#define AUTORESET_DELAY_MS 500

View File

@ -0,0 +1,18 @@
USB_VID = 0x303A
USB_PID = 0x80E8
USB_PRODUCT = "HiiBot IoTs2"
USB_MANUFACTURER = "HiiBot"
IDF_TARGET = esp32s2
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ
# The default queue depth of 16 overflows on release builds,
# so increase it to 32.
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
CIRCUITPY_ESP_FLASH_MODE=qio
CIRCUITPY_ESP_FLASH_FREQ=40m
CIRCUITPY_ESP_FLASH_SIZE=8MB
#CIRCUITPY_ESP_FLASH_SIZE=4MB

View File

@ -0,0 +1,77 @@
#include "shared-bindings/board/__init__.h"
#include "shared-module/displayio/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
{ MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO1) }, // miniI2C
{ MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) }, // miniI2C
{ MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) },
{ MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) },
{ MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) },
{ MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) },
{ MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },
{ MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO16) },
{ MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },
{ MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO17) },
{ MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },
{ MP_ROM_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_GPIO33) },
{ MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) },
{ MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_GPIO34) },
{ MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },
{ MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO35) },
{ MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },
{ MP_ROM_QSTR(MP_QSTR_TFT_NSS), MP_ROM_PTR(&pin_GPIO36) },
{ MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },
{ MP_ROM_QSTR(MP_QSTR_BLUELED), MP_ROM_PTR(&pin_GPIO37) },
{ MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) },
{ MP_ROM_QSTR(MP_QSTR_TFT_BL), MP_ROM_PTR(&pin_GPIO38) },
{ MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) },
{ MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO40) },
{ MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO41) },
{ MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO42) },
{ MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) },
{ MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -0,0 +1,40 @@
CONFIG_ESP32S2_SPIRAM_SUPPORT=y
#
# SPI RAM config
#
# CONFIG_SPIRAM_TYPE_AUTO is not set
# CONFIG_SPIRAM_TYPE_ESPPSRAM16=y
# CONFIG_SPIRAM_TYPE_ESPPSRAM32=y
CONFIG_SPIRAM_TYPE_ESPPSRAM64=y
CONFIG_SPIRAM_SIZE=8388608
# CONFIG_SPIRAM_SIZE=2097152
#
# PSRAM clock and cs IO for ESP32S2
#
CONFIG_DEFAULT_PSRAM_CLK_IO=30
CONFIG_DEFAULT_PSRAM_CS_IO=26
# end of PSRAM clock and cs IO for ESP32S2
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
# CONFIG_SPIRAM_RODATA is not set
# CONFIG_SPIRAM_SPEED_80M is not set
CONFIG_SPIRAM_SPEED_40M=y
# CONFIG_SPIRAM_SPEED_26M is not set
# CONFIG_SPIRAM_SPEED_20M is not set
CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
CONFIG_SPIRAM_USE_MEMMAP=y
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
# CONFIG_SPIRAM_USE_MALLOC is not set
CONFIG_SPIRAM_MEMTEST=y
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
# end of SPI RAM config
#
# LWIP
#
CONFIG_LWIP_LOCAL_HOSTNAME="HiiBot_IoTs2"
# end of LWIP

View File

@ -28,6 +28,8 @@
#include "mpconfigboard.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "components/driver/include/driver/gpio.h"
void board_init(void) {
// Debug UART
#ifdef DEBUG
@ -40,6 +42,17 @@ bool board_requests_safe_mode(void) {
return false;
}
bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
// Pin 21 is a high side LED so pull it down to prevent lighting the LED.
if (pin_number == 21) {
gpio_reset_pin(21);
gpio_pullup_dis(21);
gpio_pulldown_en(21);
return true;
}
return false;
}
void reset_board(void) {
}

View File

@ -256,6 +256,17 @@ STATIC void _convert_address(const bleio_address_obj_t *address, ble_addr_t *nim
memcpy(nimble_address->val, (uint8_t *)address_buf_info.buf, NUM_BLEIO_ADDRESS_BYTES);
}
STATIC int _mtu_reply(uint16_t conn_handle,
const struct ble_gatt_error *error,
uint16_t mtu, void *arg) {
bleio_connection_internal_t *connection = (bleio_connection_internal_t *)arg;
if (conn_handle != connection->conn_handle || error->status != 0) {
return 0;
}
connection->mtu = mtu;
return 0;
}
STATIC void _new_connection(uint16_t conn_handle) {
// Set the tx_power for the connection higher than the advertisement.
esp_ble_tx_power_set(conn_handle, ESP_PWR_LVL_N0);
@ -275,12 +286,96 @@ STATIC void _new_connection(uint16_t conn_handle) {
connection->pair_status = PAIR_NOT_PAIRED;
connection->mtu = 0;
ble_gattc_exchange_mtu(conn_handle, _mtu_reply, connection);
// Change the callback for the connection.
ble_gap_set_event_cb(conn_handle, bleio_connection_event_cb, connection);
}
static int _connect_event(struct ble_gap_event *event, void *self_in) {
bleio_adapter_obj_t *self = (bleio_adapter_obj_t *)self_in;
#if CIRCUITPY_VERBOSE_BLE
mp_printf(&mp_plat_print, "Connect event: %d\n", event->type);
#endif
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
if (event->connect.status == 0) {
_new_connection(event->connect.conn_handle);
// Set connections objs back to NULL since we have a new
// connection and need a new tuple.
self->connection_objs = NULL;
xTaskNotify(cp_task, event->connect.conn_handle, eSetValueWithOverwrite);
} else {
xTaskNotify(cp_task, -event->connect.status, eSetValueWithOverwrite);
}
break;
default:
#if CIRCUITPY_VERBOSE_BLE
// For debugging.
mp_printf(&mp_plat_print, "Unhandled connect event: %d\n", event->type);
#endif
break;
}
return 0;
}
mp_obj_t common_hal_bleio_adapter_connect(bleio_adapter_obj_t *self, bleio_address_obj_t *address, mp_float_t timeout) {
mp_raise_NotImplementedError(NULL);
// Stop any active scan.
if (self->scan_results != NULL) {
common_hal_bleio_adapter_stop_scan(self);
}
struct ble_gap_conn_params conn_params = {
.scan_itvl = MSEC_TO_UNITS(100, UNIT_0_625_MS),
.scan_window = MSEC_TO_UNITS(100, UNIT_0_625_MS),
.itvl_min = MSEC_TO_UNITS(15, UNIT_1_25_MS),
.itvl_max = MSEC_TO_UNITS(300, UNIT_1_25_MS),
.latency = 0,
.supervision_timeout = MSEC_TO_UNITS(4000, UNIT_10_MS),
.min_ce_len = BLE_GAP_INITIAL_CONN_MIN_CE_LEN,
.max_ce_len = BLE_GAP_INITIAL_CONN_MAX_CE_LEN
};
uint8_t own_addr_type;
// TODO: Use a resolvable address if the peer has our key.
CHECK_NIMBLE_ERROR(ble_hs_id_infer_auto(false, &own_addr_type));
ble_addr_t addr;
_convert_address(address, &addr);
cp_task = xTaskGetCurrentTaskHandle();
// Make sure we don't have a pending notification from a previous time. This
// can happen if a previous wait timed out before the notification was given.
xTaskNotifyStateClear(cp_task);
CHECK_NIMBLE_ERROR(
ble_gap_connect(own_addr_type, &addr,
SEC_TO_UNITS(timeout, UNIT_1_MS) + 0.5f,
&conn_params,
_connect_event, self));
int error_code;
CHECK_NOTIFY(xTaskNotifyWait(0, 0, (uint32_t *)&error_code, 200));
// Negative values are error codes, connection handle otherwise.
if (error_code < 0) {
CHECK_BLE_ERROR(-error_code);
}
uint16_t conn_handle = error_code;
// TODO: If we have keys, then try and encrypt the connection.
// TODO: Negotiate for better PHY and data lengths since we are the central. These are
// nice-to-haves so ignore any errors.
// Make the connection object and return it.
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
bleio_connection_internal_t *connection = &bleio_connections[i];
if (connection->conn_handle == conn_handle) {
connection->is_central = true;
return bleio_connection_new_from_internal(connection);
}
}
mp_raise_bleio_BluetoothError(translate("Failed to connect: internal error"));

View File

@ -42,40 +42,22 @@ void common_hal_bleio_characteristic_construct(bleio_characteristic_obj_t *self,
bleio_attribute_security_mode_t read_perm, bleio_attribute_security_mode_t write_perm,
mp_int_t max_length, bool fixed_length, mp_buffer_info_t *initial_value_bufinfo,
const char *user_description) {
mp_raise_NotImplementedError(NULL);
self->service = service;
self->uuid = uuid;
self->handle = BLEIO_HANDLE_INVALID;
self->cccd_handle = BLEIO_HANDLE_INVALID;
self->sccd_handle = BLEIO_HANDLE_INVALID;
self->props = props;
self->read_perm = read_perm;
self->write_perm = write_perm;
self->initial_value_len = 0;
self->initial_value = NULL;
if (initial_value_bufinfo != NULL) {
// Copy the initial value if it's on the heap. Otherwise it's internal and we may not be able
// to allocate.
self->initial_value_len = initial_value_bufinfo->len;
if (gc_alloc_possible()) {
if (gc_nbytes(initial_value_bufinfo->buf) > 0) {
uint8_t *initial_value = m_malloc(self->initial_value_len, false);
memcpy(initial_value, initial_value_bufinfo->buf, self->initial_value_len);
self->initial_value = initial_value;
} else {
self->initial_value = initial_value_bufinfo->buf;
}
self->descriptor_list = mp_obj_new_list(0, NULL);
} else {
self->initial_value = initial_value_bufinfo->buf;
self->descriptor_list = NULL;
}
common_hal_bleio_characteristic_set_value(self, initial_value_bufinfo);
if (gc_alloc_possible()) {
self->descriptor_list = mp_obj_new_list(0, NULL);
} else {
self->descriptor_list = NULL;
}
// const mp_int_t max_length_max = fixed_length ? BLE_GATTS_FIX_ATTR_LEN_MAX : BLE_GATTS_VAR_ATTR_LEN_MAX;
// if (max_length < 0 || max_length > max_length_max) {
// mp_raise_ValueError_varg(translate("max_length must be 0-%d when fixed_length is %s"),
// max_length_max, fixed_length ? "True" : "False");
// }
// TODO: Implement this.
self->max_length = max_length;
self->fixed_length = fixed_length;
@ -97,8 +79,60 @@ bleio_service_obj_t *common_hal_bleio_characteristic_get_service(bleio_character
return self->service;
}
typedef struct {
TaskHandle_t task;
uint8_t *buf;
uint16_t len;
} _read_info_t;
STATIC int _read_cb(uint16_t conn_handle,
const struct ble_gatt_error *error,
struct ble_gatt_attr *attr,
void *arg) {
_read_info_t *read_info = (_read_info_t *)arg;
switch (error->status) {
case 0: {
int len = MIN(read_info->len, OS_MBUF_PKTLEN(attr->om));
os_mbuf_copydata(attr->om, attr->offset, len, read_info->buf);
read_info->len = len;
}
MP_FALLTHROUGH;
default:
#if CIRCUITPY_VERBOSE_BLE
// For debugging.
mp_printf(&mp_plat_print, "Read status: %d\n", error->status);
#endif
xTaskNotify(read_info->task, error->status, eSetValueWithOverwrite);
break;
}
return 0;
}
size_t common_hal_bleio_characteristic_get_value(bleio_characteristic_obj_t *self, uint8_t *buf, size_t len) {
// TODO: Implement this.
// Do GATT operations only if this characteristic has been added to a registered service.
if (self->handle == BLEIO_HANDLE_INVALID) {
return 0;
}
uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection);
if (common_hal_bleio_service_get_is_remote(self->service)) {
_read_info_t read_info = {
.task = xTaskGetCurrentTaskHandle(),
.buf = buf,
.len = len
};
CHECK_NIMBLE_ERROR(ble_gattc_read(conn_handle, self->handle, _read_cb, &read_info));
int error_code;
xTaskNotifyWait(0, 0, (uint32_t *)&error_code, 200);
CHECK_BLE_ERROR(error_code);
return read_info.len;
} else {
len = MIN(self->current_value_len, len);
memcpy(buf, self->current_value, len);
return len;
}
return 0;
}
@ -106,8 +140,62 @@ size_t common_hal_bleio_characteristic_get_max_length(bleio_characteristic_obj_t
return self->max_length;
}
STATIC int _write_cb(uint16_t conn_handle,
const struct ble_gatt_error *error,
struct ble_gatt_attr *attr,
void *arg) {
TaskHandle_t task = (TaskHandle_t)arg;
xTaskNotify(task, error->status, eSetValueWithOverwrite);
return 0;
}
void common_hal_bleio_characteristic_set_value(bleio_characteristic_obj_t *self, mp_buffer_info_t *bufinfo) {
// TODO: Implement this.
if (common_hal_bleio_service_get_is_remote(self->service)) {
uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection);
if ((self->props & CHAR_PROP_WRITE_NO_RESPONSE) != 0) {
CHECK_NIMBLE_ERROR(ble_gattc_write_no_rsp_flat(conn_handle, self->handle, bufinfo->buf, bufinfo->len));
} else {
CHECK_NIMBLE_ERROR(ble_gattc_write_flat(conn_handle, self->handle, bufinfo->buf, bufinfo->len, _write_cb, xTaskGetCurrentTaskHandle()));
int error_code;
xTaskNotifyWait(0, 0, (uint32_t *)&error_code, 200);
CHECK_BLE_ERROR(error_code);
}
} else {
// Validate data length for local characteristics only.
// TODO: Test this once we can get servers going.
if (self->fixed_length && bufinfo->len != self->max_length) {
mp_raise_ValueError(translate("Value length != required fixed length"));
}
if (bufinfo->len > self->max_length) {
mp_raise_ValueError(translate("Value length > max_length"));
}
if (bufinfo == NULL) {
self->current_value_len = 0;
ble_gatts_chr_updated(self->handle);
return;
}
self->current_value_len = bufinfo->len;
// If we've already allocated an internal buffer or the provided buffer
// is on the heap, then copy into the internal buffer.
if (self->current_value_alloc > 0 || gc_nbytes(bufinfo->buf) > 0) {
if (self->current_value_alloc < bufinfo->len) {
self->current_value = m_realloc(self->current_value, bufinfo->len);
// Get the number of bytes from the heap because it may be more
// than the len due to gc block size.
self->current_value_alloc = gc_nbytes(self->current_value);
}
memcpy(self->current_value, bufinfo->buf, bufinfo->len);
} else {
// Otherwise, use the provided buffer to delay any heap allocation.
self->current_value = bufinfo->buf;
self->current_value_alloc = 0;
}
ble_gatts_chr_updated(self->handle);
}
}
bleio_uuid_obj_t *common_hal_bleio_characteristic_get_uuid(bleio_characteristic_obj_t *self) {
@ -118,10 +206,32 @@ bleio_characteristic_properties_t common_hal_bleio_characteristic_get_properties
return self->props;
}
void common_hal_bleio_characteristic_add_descriptor(bleio_characteristic_obj_t *self, bleio_descriptor_obj_t *descriptor) {
void common_hal_bleio_characteristic_add_descriptor(bleio_characteristic_obj_t *self,
bleio_descriptor_obj_t *descriptor) {
// TODO: Implement this.
mp_obj_list_append(MP_OBJ_FROM_PTR(self->descriptor_list),
MP_OBJ_FROM_PTR(descriptor));
}
void common_hal_bleio_characteristic_set_cccd(bleio_characteristic_obj_t *self, bool notify, bool indicate) {
// TODO: Implement this.
if (self->cccd_handle == BLEIO_HANDLE_INVALID) {
mp_raise_bleio_BluetoothError(translate("No CCCD for this Characteristic"));
}
if (!common_hal_bleio_service_get_is_remote(self->service)) {
mp_raise_bleio_RoleError(translate("Can't set CCCD on local Characteristic"));
}
const uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection);
common_hal_bleio_check_connected(conn_handle);
uint16_t cccd_value =
(notify ? 1 << 0 : 0) |
(indicate ? 1 << 1: 0);
CHECK_NIMBLE_ERROR(ble_gattc_write_flat(conn_handle, self->cccd_handle, &cccd_value, 2, _write_cb, xTaskGetCurrentTaskHandle()));
int error_code;
xTaskNotifyWait(0, 0, (uint32_t *)&error_code, 200);
CHECK_BLE_ERROR(error_code);
}

View File

@ -39,9 +39,13 @@ typedef struct _bleio_characteristic_obj {
// Will be MP_OBJ_NULL before being assigned to a Service.
bleio_service_obj_t *service;
bleio_uuid_obj_t *uuid;
const uint8_t *initial_value;
uint16_t initial_value_len;
uint8_t *current_value;
uint16_t current_value_len;
// Our internal allocation length. If > 0, then current_value is managed by
// this characteristic.
uint16_t current_value_alloc;
uint16_t max_length;
uint16_t def_handle;
uint16_t handle;
bleio_characteristic_properties_t props;
bleio_attribute_security_mode_t read_perm;

View File

@ -28,6 +28,7 @@
#include <stdio.h>
#include "shared/runtime/interrupt_char.h"
#include "py/ringbuf.h"
#include "py/runtime.h"
#include "py/stream.h"
@ -37,14 +38,38 @@
#include "common-hal/_bleio/CharacteristicBuffer.h"
#include "shared-bindings/_bleio/CharacteristicBuffer.h"
STATIC int characteristic_buffer_on_ble_evt(struct ble_gap_event *event, void *param) {
bleio_characteristic_buffer_obj_t *self = (bleio_characteristic_buffer_obj_t *)param;
switch (event->type) {
case BLE_GAP_EVENT_NOTIFY_RX: {
// A remote service wrote to this characteristic.
// Must be a notification, and event handle must match the handle for my characteristic.
if (event->notify_rx.indication == 0 &&
event->notify_rx.attr_handle == self->characteristic->handle) {
const struct os_mbuf *m = event->notify_rx.om;
while (m != NULL) {
ringbuf_put_n(&self->ringbuf, m->om_data, m->om_len);
m = SLIST_NEXT(m, om_next);
}
}
break;
}
default:
#if CIRCUITPY_VERBOSE_BLE
mp_printf(&mp_plat_print, "Unhandled gap event %d\n", event->type);
#endif
return 0;
break;
}
return 0;
}
void _common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self,
bleio_characteristic_obj_t *characteristic,
mp_float_t timeout,
uint8_t *buffer, size_t buffer_size,
void *static_handler_entry) {
mp_raise_NotImplementedError(NULL);
self->characteristic = characteristic;
self->timeout_ms = timeout * 1000;
@ -53,6 +78,11 @@ void _common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buff
self->ringbuf.iget = 0;
self->ringbuf.iput = 0;
if (static_handler_entry != NULL) {
ble_event_add_handler_entry((ble_event_handler_entry_t *)static_handler_entry, characteristic_buffer_on_ble_evt, self);
} else {
ble_event_add_handler(characteristic_buffer_on_ble_evt, self);
}
}
// Assumes that timeout and buffer_size have been validated before call.
@ -65,17 +95,32 @@ void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffe
}
uint32_t common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_t *self, uint8_t *data, size_t len, int *errcode) {
// TODO: Implement this.
return 0;
uint64_t start_ticks = supervisor_ticks_ms64();
// Wait for all bytes received or timeout
while ((ringbuf_num_filled(&self->ringbuf) < len) && (supervisor_ticks_ms64() - start_ticks < self->timeout_ms)) {
RUN_BACKGROUND_TASKS;
// Allow user to break out of a timeout with a KeyboardInterrupt.
if (mp_hal_is_interrupted()) {
return 0;
}
}
uint32_t num_bytes_read = ringbuf_get_n(&self->ringbuf, data, len);
return num_bytes_read;
}
// NOTE: The nRF port has protection around these operations because the ringbuf
// is filled from an interrupt. On ESP the ringbuf is filled from the BLE host
// task that won't interrupt us.
uint32_t common_hal_bleio_characteristic_buffer_rx_characters_available(bleio_characteristic_buffer_obj_t *self) {
// TODO: Implement this.
return 0;
return ringbuf_num_filled(&self->ringbuf);
}
void common_hal_bleio_characteristic_buffer_clear_rx_buffer(bleio_characteristic_buffer_obj_t *self) {
// TODO: Implement this.
ringbuf_clear(&self->ringbuf);
}
bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer_obj_t *self) {
@ -83,7 +128,10 @@ bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer
}
void common_hal_bleio_characteristic_buffer_deinit(bleio_characteristic_buffer_obj_t *self) {
// TODO: Implement this.
if (!common_hal_bleio_characteristic_buffer_deinited(self)) {
ble_event_remove_handler(characteristic_buffer_on_ble_evt, self);
self->characteristic = NULL;
}
}
bool common_hal_bleio_characteristic_buffer_connected(bleio_characteristic_buffer_obj_t *self) {

View File

@ -48,6 +48,9 @@
#include "host/ble_att.h"
// Give 20 seconds for discovery
#define DISCOVERY_TIMEOUT_MS 20000
int bleio_connection_event_cb(struct ble_gap_event *event, void *connection_in) {
bleio_connection_internal_t *connection = (bleio_connection_internal_t *)connection_in;
@ -69,9 +72,35 @@ int bleio_connection_event_cb(struct ble_gap_event *event, void *connection_in)
}
case BLE_GAP_EVENT_PHY_UPDATE_COMPLETE: {
#if CIRCUITPY_VERBOSE_BLE
mp_printf(&mp_plat_print, "TODO connection event: PHY update complete\n");
#endif
break;
}
case BLE_GAP_EVENT_CONN_UPDATE: {
#if CIRCUITPY_VERBOSE_BLE
mp_printf(&mp_plat_print, "TODO connection event: connection update\n");
#endif
break;
}
case BLE_GAP_EVENT_L2CAP_UPDATE_REQ: {
#if CIRCUITPY_VERBOSE_BLE
mp_printf(&mp_plat_print, "TODO connection event: l2cap update request\n");
#endif
break;
}
// These events are actually att specific so forward to all registered
// handlers for them. The handlers themselves decide whether an event
// is interesting to them.
case BLE_GAP_EVENT_NOTIFY_RX:
MP_FALLTHROUGH;
case BLE_GAP_EVENT_NOTIFY_TX:
MP_FALLTHROUGH;
case BLE_GAP_EVENT_SUBSCRIBE:
return ble_event_run_handlers(event);
default:
#if CIRCUITPY_VERBOSE_BLE
mp_printf(&mp_plat_print, "Unhandled connection event: %d\n", event->type);
@ -96,7 +125,7 @@ bool common_hal_bleio_connection_get_connected(bleio_connection_obj_t *self) {
}
void common_hal_bleio_connection_disconnect(bleio_connection_internal_t *self) {
// TODO: Implement this.
ble_gap_terminate(self->conn_handle, BLE_ERR_REM_USER_CONN_TERM);
}
void common_hal_bleio_connection_pair(bleio_connection_internal_t *self, bool bond) {
@ -121,7 +150,265 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
// TODO: Implement this.
}
STATIC volatile int _last_discovery_status;
static TaskHandle_t discovery_task = NULL;
STATIC int _discovered_service_cb(uint16_t conn_handle,
const struct ble_gatt_error *error,
const struct ble_gatt_svc *svc,
void *arg) {
bleio_connection_internal_t *self = (bleio_connection_internal_t *)arg;
if (error->status != BLE_ERR_SUCCESS) {
// Keep the first error in case it's due to memory.
if (_last_discovery_status == BLE_ERR_SUCCESS) {
_last_discovery_status = error->status;
xTaskNotifyGive(discovery_task);
}
return 0;
}
// If any of these memory allocations fail, we set _last_discovery_status
// and let the process continue.
if (_last_discovery_status != BLE_ERR_SUCCESS) {
return 0;
}
bleio_service_obj_t *service = m_new_obj(bleio_service_obj_t);
if (service == NULL) {
_last_discovery_status = BLE_ERR_MEM_CAPACITY;
return 0;
}
service->base.type = &bleio_service_type;
// Initialize several fields at once.
bleio_service_from_connection(service, bleio_connection_new_from_internal(self));
service->is_remote = true;
service->start_handle = svc->start_handle;
service->end_handle = svc->end_handle;
service->handle = svc->start_handle;
bleio_uuid_obj_t *uuid = m_new_obj(bleio_uuid_obj_t);
if (uuid == NULL) {
_last_discovery_status = BLE_ERR_MEM_CAPACITY;
return 0;
}
uuid->base.type = &bleio_uuid_type;
uuid->nimble_ble_uuid = svc->uuid;
service->uuid = uuid;
mp_obj_list_append(MP_OBJ_FROM_PTR(self->remote_service_list),
MP_OBJ_FROM_PTR(service));
return 0;
}
STATIC int _discovered_characteristic_cb(uint16_t conn_handle,
const struct ble_gatt_error *error,
const struct ble_gatt_chr *chr,
void *arg) {
bleio_service_obj_t *service = (bleio_service_obj_t *)arg;
if (error->status != BLE_ERR_SUCCESS) {
// Keep the first error in case it's due to memory.
if (_last_discovery_status == BLE_ERR_SUCCESS) {
_last_discovery_status = error->status;
xTaskNotifyGive(discovery_task);
}
}
// If any of these memory allocations fail, we set _last_discovery_status
// and let the process continue.
if (_last_discovery_status != BLE_ERR_SUCCESS) {
return 0;
}
bleio_characteristic_obj_t *characteristic = m_new_obj(bleio_characteristic_obj_t);
if (characteristic == NULL) {
_last_discovery_status = BLE_ERR_MEM_CAPACITY;
return 0;
}
characteristic->base.type = &bleio_characteristic_type;
// Known characteristic UUID.
bleio_uuid_obj_t *uuid = m_new_obj(bleio_uuid_obj_t);
if (uuid == NULL) {
_last_discovery_status = BLE_ERR_MEM_CAPACITY;
return 0;
}
uuid->base.type = &bleio_uuid_type;
uuid->nimble_ble_uuid = chr->uuid;
bleio_characteristic_properties_t props =
((chr->properties & BLE_GATT_CHR_PROP_BROADCAST) != 0 ? CHAR_PROP_BROADCAST : 0) |
((chr->properties & BLE_GATT_CHR_PROP_INDICATE) != 0 ? CHAR_PROP_INDICATE : 0) |
((chr->properties & BLE_GATT_CHR_PROP_NOTIFY) != 0 ? CHAR_PROP_NOTIFY : 0) |
((chr->properties & BLE_GATT_CHR_PROP_READ) != 0 ? CHAR_PROP_READ : 0) |
((chr->properties & BLE_GATT_CHR_PROP_WRITE) != 0 ? CHAR_PROP_WRITE : 0) |
((chr->properties & BLE_GATT_CHR_PROP_WRITE_NO_RSP) != 0 ? CHAR_PROP_WRITE_NO_RESPONSE : 0);
// Call common_hal_bleio_characteristic_construct() to initalize some fields and set up evt handler.
common_hal_bleio_characteristic_construct(
characteristic, service, chr->val_handle, uuid,
props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN,
0, false, // max_length, fixed_length: values don't matter for gattc
mp_const_empty_bytes,
NULL);
// Set def_handle directly since it is only used in discovery.
characteristic->def_handle = chr->def_handle;
mp_obj_list_append(MP_OBJ_FROM_PTR(service->characteristic_list),
MP_OBJ_FROM_PTR(characteristic));
return 0;
}
STATIC int _discovered_descriptor_cb(uint16_t conn_handle,
const struct ble_gatt_error *error,
uint16_t chr_val_handle,
const struct ble_gatt_dsc *dsc,
void *arg) {
bleio_characteristic_obj_t *characteristic = (bleio_characteristic_obj_t *)arg;
if (error->status != BLE_ERR_SUCCESS) {
// Keep the first error in case it's due to memory.
if (_last_discovery_status == BLE_ERR_SUCCESS) {
_last_discovery_status = error->status;
}
xTaskNotifyGive(discovery_task);
}
// If any of these memory allocations fail, we set _last_discovery_status
// and let the process continue.
if (_last_discovery_status != BLE_ERR_SUCCESS) {
return 0;
}
// Remember handles for certain well-known descriptors.
switch (dsc->uuid.u16.value) {
case 0x2902:
characteristic->cccd_handle = dsc->handle;
break;
case 0x2903:
characteristic->sccd_handle = dsc->handle;
break;
case 0x2901:
characteristic->user_desc_handle = dsc->handle;
break;
default:
break;
}
bleio_descriptor_obj_t *descriptor = m_new_obj(bleio_descriptor_obj_t);
if (descriptor == NULL) {
_last_discovery_status = BLE_ERR_MEM_CAPACITY;
return 0;
}
descriptor->base.type = &bleio_descriptor_type;
bleio_uuid_obj_t *uuid = m_new_obj(bleio_uuid_obj_t);
if (uuid == NULL) {
_last_discovery_status = BLE_ERR_MEM_CAPACITY;
return 0;
}
uuid->base.type = &bleio_uuid_type;
uuid->nimble_ble_uuid = dsc->uuid;
common_hal_bleio_descriptor_construct(
descriptor, characteristic, uuid,
SECURITY_MODE_OPEN, SECURITY_MODE_OPEN,
0, false, mp_const_empty_bytes);
descriptor->handle = dsc->handle;
mp_obj_list_append(MP_OBJ_FROM_PTR(characteristic->descriptor_list),
MP_OBJ_FROM_PTR(descriptor));
return 0;
}
STATIC void discover_remote_services(bleio_connection_internal_t *self, mp_obj_t service_uuids_whitelist) {
// Start over with an empty list.
self->remote_service_list = mp_obj_new_list(0, NULL);
discovery_task = xTaskGetCurrentTaskHandle();
if (service_uuids_whitelist == mp_const_none) {
_last_discovery_status = BLE_ERR_SUCCESS;
CHECK_NIMBLE_ERROR(ble_gattc_disc_all_svcs(self->conn_handle, _discovered_service_cb, self));
// Wait for sync.
ulTaskNotifyTake(pdTRUE, pdMS_TO_TICKS(DISCOVERY_TIMEOUT_MS));
if (_last_discovery_status != BLE_HS_EDONE) {
CHECK_BLE_ERROR(_last_discovery_status);
}
} else {
mp_obj_iter_buf_t iter_buf;
mp_obj_t iterable = mp_getiter(service_uuids_whitelist, &iter_buf);
mp_obj_t uuid_obj;
while ((uuid_obj = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
if (!mp_obj_is_type(uuid_obj, &bleio_uuid_type)) {
mp_raise_TypeError(translate("non-UUID found in service_uuids_whitelist"));
}
bleio_uuid_obj_t *uuid = MP_OBJ_TO_PTR(uuid_obj);
_last_discovery_status = BLE_ERR_SUCCESS;
// Make sure we start with a clean notification state
ulTaskNotifyValueClear(discovery_task, 0xffffffff);
CHECK_NIMBLE_ERROR(ble_gattc_disc_svc_by_uuid(self->conn_handle, &uuid->nimble_ble_uuid.u,
_discovered_service_cb, self));
// Wait for sync.
CHECK_NOTIFY(ulTaskNotifyTake(pdTRUE, pdMS_TO_TICKS(DISCOVERY_TIMEOUT_MS)));
if (_last_discovery_status != BLE_HS_EDONE) {
CHECK_BLE_ERROR(_last_discovery_status);
}
}
}
for (size_t i = 0; i < self->remote_service_list->len; i++) {
bleio_service_obj_t *service = MP_OBJ_TO_PTR(self->remote_service_list->items[i]);
_last_discovery_status = BLE_ERR_SUCCESS;
CHECK_NIMBLE_ERROR(ble_gattc_disc_all_chrs(self->conn_handle,
service->start_handle,
service->end_handle,
_discovered_characteristic_cb,
service));
// Wait for sync.
CHECK_NOTIFY(ulTaskNotifyTake(pdTRUE, pdMS_TO_TICKS(DISCOVERY_TIMEOUT_MS)));
if (_last_discovery_status != BLE_HS_EDONE) {
CHECK_BLE_ERROR(_last_discovery_status);
}
// Got characteristics for this service. Now discover descriptors for each characteristic.
size_t char_list_len = service->characteristic_list->len;
for (size_t char_idx = 0; char_idx < char_list_len; ++char_idx) {
bleio_characteristic_obj_t *characteristic =
MP_OBJ_TO_PTR(service->characteristic_list->items[char_idx]);
// Determine the handle range for the given characteristic's descriptors.
// The end of the range is dictated by the next characteristic or the end
// handle of the service.
const bool last_characteristic = char_idx == char_list_len - 1;
bleio_characteristic_obj_t *next_characteristic = last_characteristic
? NULL
: MP_OBJ_TO_PTR(service->characteristic_list->items[char_idx + 1]);
uint16_t end_handle = next_characteristic == NULL
? service->end_handle
: next_characteristic->def_handle - 1;
_last_discovery_status = BLE_ERR_SUCCESS;
CHECK_NIMBLE_ERROR(ble_gattc_disc_all_dscs(self->conn_handle, characteristic->handle,
end_handle,
_discovered_descriptor_cb, characteristic));
// Wait for sync.
ulTaskNotifyTake(pdTRUE, pdMS_TO_TICKS(DISCOVERY_TIMEOUT_MS));
if (_last_discovery_status != BLE_HS_EDONE) {
CHECK_BLE_ERROR(_last_discovery_status);
}
}
}
}
mp_obj_tuple_t *common_hal_bleio_connection_discover_remote_services(bleio_connection_obj_t *self, mp_obj_t service_uuids_whitelist) {
discover_remote_services(self->connection, service_uuids_whitelist);
bleio_connection_ensure_connected(self);
// Convert to a tuple and then clear the list so the callee will take ownership.
mp_obj_tuple_t *services_tuple =
@ -129,7 +416,6 @@ mp_obj_tuple_t *common_hal_bleio_connection_discover_remote_services(bleio_conne
self->connection->remote_service_list->items);
mp_obj_list_clear(MP_OBJ_FROM_PTR(self->connection->remote_service_list));
// TODO: Implement this.
return services_tuple;
}

View File

@ -36,7 +36,6 @@
#include "host/ble_att.h"
void common_hal_bleio_descriptor_construct(bleio_descriptor_obj_t *self, bleio_characteristic_obj_t *characteristic, bleio_uuid_obj_t *uuid, bleio_attribute_security_mode_t read_perm, bleio_attribute_security_mode_t write_perm, mp_int_t max_length, bool fixed_length, mp_buffer_info_t *initial_value_bufinfo) {
mp_raise_NotImplementedError(NULL);
self->characteristic = characteristic;
self->uuid = uuid;
self->handle = BLEIO_HANDLE_INVALID;

View File

@ -33,6 +33,8 @@
#include "common-hal/_bleio/UUID.h"
#include "host/ble_gatt.h"
// Forward declare characteristic because it includes a Descriptor.
struct _bleio_characteristic_obj;
@ -45,6 +47,7 @@ typedef struct _bleio_descriptor_obj {
uint16_t max_length;
bool fixed_length;
uint16_t handle;
struct ble_gatt_dsc_def def;
bleio_attribute_security_mode_t read_perm;
bleio_attribute_security_mode_t write_perm;
} bleio_descriptor_obj_t;

View File

@ -40,13 +40,113 @@
#include "host/ble_att.h"
STATIC void write_to_ringbuf(bleio_packet_buffer_obj_t *self, const struct os_mbuf *mbuf) {
size_t len = OS_MBUF_PKTLEN(mbuf);
if (len + sizeof(uint16_t) > ringbuf_capacity(&self->ringbuf)) {
// This shouldn't happen but can if our buffer size was much smaller than
// the writes the client actually makes.
return;
}
// Make room for the new value by dropping the oldest packets first.
while (ringbuf_capacity(&self->ringbuf) - ringbuf_num_filled(&self->ringbuf) < len + sizeof(uint16_t)) {
uint16_t packet_length;
ringbuf_get_n(&self->ringbuf, (uint8_t *)&packet_length, sizeof(uint16_t));
for (uint16_t i = 0; i < packet_length; i++) {
ringbuf_get(&self->ringbuf);
}
// set an overflow flag?
}
ringbuf_put_n(&self->ringbuf, (uint8_t *)&len, sizeof(uint16_t));
while (mbuf != NULL) {
ringbuf_put_n(&self->ringbuf, mbuf->om_data, mbuf->om_len);
mbuf = SLIST_NEXT(mbuf, om_next);
}
}
STATIC int packet_buffer_on_ble_client_evt(struct ble_gap_event *event, void *param);
STATIC int queue_next_write(bleio_packet_buffer_obj_t *self);
STATIC int _write_cb(uint16_t conn_handle,
const struct ble_gatt_error *error,
struct ble_gatt_attr *attr,
void *arg) {
if (error->status != 0) {
mp_printf(&mp_plat_print, "write failed %d\n", error->status);
}
bleio_packet_buffer_obj_t *self = (bleio_packet_buffer_obj_t *)arg;
queue_next_write(self);
return 0;
}
STATIC int queue_next_write(bleio_packet_buffer_obj_t *self) {
// Queue up the next outgoing buffer. We use two, one that has been passed to the SD for
// transmission (when packet_queued is true) and the other is `pending` and can still be
// modified. By primarily appending to the `pending` buffer we can reduce the protocol overhead
// of the lower level link and ATT layers.
self->packet_queued = false;
if (self->pending_size > 0) {
uint16_t conn_handle = self->conn_handle;
int err_code = NIMBLE_OK;
if (self->client) {
if (self->write_type == CHAR_PROP_WRITE_NO_RESPONSE) {
err_code = ble_gattc_write_no_rsp_flat(conn_handle,
self->characteristic->handle,
self->outgoing[self->pending_index],
self->pending_size);
// We don't set packet_queued because we NimBLE will buffer our
// outgoing packets.
} else {
err_code = ble_gattc_write_flat(conn_handle,
self->characteristic->handle,
self->outgoing[self->pending_index],
self->pending_size,
_write_cb, self);
self->pending_index = (self->pending_index + 1) % 2;
self->packet_queued = true;
}
self->pending_size = 0;
} else {
// TODO: Notify because we're the server.
}
if (err_code != NIMBLE_OK) {
// On error, simply skip updating the pending buffers so that the next HVC or WRITE
// complete event triggers another attempt.
return err_code;
}
}
return NIMBLE_OK;
}
STATIC int packet_buffer_on_ble_client_evt(struct ble_gap_event *event, void *param) {
bleio_packet_buffer_obj_t *self = (bleio_packet_buffer_obj_t *)param;
if (event->type == BLE_GAP_EVENT_DISCONNECT && self->conn_handle == event->disconnect.conn.conn_handle) {
self->conn_handle = BLEIO_HANDLE_INVALID;
}
switch (event->type) {
case BLE_GAP_EVENT_NOTIFY_RX: {
if (event->notify_rx.conn_handle != self->conn_handle) {
return false;
}
// Must be a notification, and event handle must match the handle for my characteristic.
if (event->notify_rx.attr_handle == self->characteristic->handle) {
write_to_ringbuf(self, event->notify_rx.om);
}
break;
}
default:
return false;
break;
}
return true;
}
void _common_hal_bleio_packet_buffer_construct(
bleio_packet_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic,
uint32_t *incoming_buffer, size_t incoming_buffer_size,
uint32_t *outgoing_buffer1, uint32_t *outgoing_buffer2, size_t max_packet_size,
void *static_handler_entry) {
mp_raise_NotImplementedError(NULL);
self->characteristic = characteristic;
self->client = self->characteristic->service->is_remote;
self->max_packet_size = max_packet_size;
@ -76,6 +176,29 @@ void _common_hal_bleio_packet_buffer_construct(
self->outgoing[0] = outgoing_buffer1;
self->outgoing[1] = outgoing_buffer2;
if (self->client) {
if (static_handler_entry != NULL) {
ble_event_add_handler_entry((ble_event_handler_entry_t *)static_handler_entry, packet_buffer_on_ble_client_evt, self);
} else {
ble_event_add_handler(packet_buffer_on_ble_client_evt, self);
}
if (incoming) {
// Prefer notify if both are available.
if (incoming & CHAR_PROP_NOTIFY) {
common_hal_bleio_characteristic_set_cccd(self->characteristic, true, false);
} else {
common_hal_bleio_characteristic_set_cccd(self->characteristic, false, true);
}
}
if (outgoing) {
self->write_type = CHAR_PROP_WRITE;
if (outgoing & CHAR_PROP_WRITE_NO_RESPONSE) {
self->write_type = CHAR_PROP_WRITE_NO_RESPONSE;
}
}
} else {
// TODO: Setup for server.
}
}
void common_hal_bleio_packet_buffer_construct(
@ -104,7 +227,12 @@ void common_hal_bleio_packet_buffer_construct(
uint32_t *outgoing2 = NULL;
if (outgoing) {
outgoing1 = m_malloc(max_packet_size, false);
outgoing2 = m_malloc(max_packet_size, false);
// Only allocate the second buffer if we are doing writes with responses.
// Without responses, we just write as quickly as we can.
if (outgoing == CHAR_PROP_WRITE) {
outgoing2 = m_malloc(max_packet_size, false);
}
}
_common_hal_bleio_packet_buffer_construct(self, characteristic,
incoming_buffer, incoming_buffer_size,
@ -117,9 +245,25 @@ mp_int_t common_hal_bleio_packet_buffer_readinto(bleio_packet_buffer_obj_t *self
return 0;
}
// Copy received data. Lock out write interrupt handler while copying.
// TODO: Implement this.
return 0;
// Get packet length, which is in first two bytes of packet.
uint16_t packet_length;
ringbuf_get_n(&self->ringbuf, (uint8_t *)&packet_length, sizeof(uint16_t));
mp_int_t ret;
if (packet_length > len) {
// Packet is longer than requested. Return negative of overrun value.
ret = len - packet_length;
// Discard the packet if it's too large. Don't fill data.
while (packet_length--) {
(void)ringbuf_get(&self->ringbuf);
}
} else {
// Read as much as possible, but might be shorter than len.
ringbuf_get_n(&self->ringbuf, data, packet_length);
ret = packet_length;
}
return ret;
}
mp_int_t common_hal_bleio_packet_buffer_write(bleio_packet_buffer_obj_t *self, const uint8_t *data, size_t len, uint8_t *header, size_t header_len) {
@ -172,10 +316,9 @@ mp_int_t common_hal_bleio_packet_buffer_write(bleio_packet_buffer_obj_t *self, c
self->pending_size += len;
num_bytes_written += len;
// TODO: Implement this.
// If no writes are queued then sneak in this data.
if (!self->packet_queued) {
CHECK_NIMBLE_ERROR(queue_next_write(self));
}
return num_bytes_written;
}
@ -270,6 +413,6 @@ bool common_hal_bleio_packet_buffer_deinited(bleio_packet_buffer_obj_t *self) {
void common_hal_bleio_packet_buffer_deinit(bleio_packet_buffer_obj_t *self) {
if (!common_hal_bleio_packet_buffer_deinited(self)) {
ble_event_remove_handler(packet_buffer_on_ble_client_evt, self);
}
// TODO: Implement this.
}

View File

@ -41,12 +41,6 @@ uint32_t _common_hal_bleio_service_construct(bleio_service_obj_t *self, bleio_uu
self->is_remote = false;
self->connection = NULL;
self->is_secondary = is_secondary;
// uint8_t service_type = BLE_GATT_SVC_TYPE_PRIMARY;
// if (is_secondary) {
// service_type = BLE_GATT_SVC_TYPE_SECONDARY;
// }
return 0;
}
@ -57,7 +51,7 @@ void common_hal_bleio_service_construct(bleio_service_obj_t *self, bleio_uuid_ob
}
void bleio_service_from_connection(bleio_service_obj_t *self, mp_obj_t connection) {
self->handle = 0xFFFF;
self->handle = BLEIO_HANDLE_INVALID;
self->uuid = NULL;
self->characteristic_list = mp_obj_new_list(0, NULL);
self->is_remote = true;

View File

@ -40,6 +40,7 @@
#include "common-hal/_bleio/__init__.h"
// #include "common-hal/_bleio/bonding.h"
#include "common-hal/_bleio/ble_events.h"
// Turn off BLE on a reset or reload.
void bleio_reset() {
@ -50,6 +51,7 @@ void bleio_reset() {
}
supervisor_stop_bluetooth();
ble_event_reset();
bleio_adapter_reset(&common_hal_bleio_adapter_obj);
common_hal_bleio_adapter_set_enabled(&common_hal_bleio_adapter_obj, false);
supervisor_start_bluetooth();
@ -97,3 +99,36 @@ void check_nimble_error(int rc, const char *file, size_t line) {
break;
}
}
void check_ble_error(int error_code, const char *file, size_t line) {
if (error_code == BLE_ERR_SUCCESS) {
return;
}
switch (error_code) {
default:
#if CIRCUITPY_VERBOSE_BLE
if (file) {
mp_raise_bleio_BluetoothError(translate("Unknown BLE error at %s:%d: %d"), file, line, error_code);
}
#else
(void)file;
(void)line;
mp_raise_bleio_BluetoothError(translate("Unknown BLE error: %d"), error_code);
#endif
break;
}
}
void check_notify(BaseType_t result) {
if (result == pdTRUE) {
return;
}
mp_raise_msg(&mp_type_TimeoutError, NULL);
}
void common_hal_bleio_check_connected(uint16_t conn_handle) {
if (conn_handle == BLEIO_HANDLE_INVALID) {
mp_raise_ConnectionError(translate("Not connected"));
}
}

View File

@ -27,6 +27,8 @@
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BLEIO_INIT_H
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BLEIO_INIT_H
#include "FreeRTOS.h"
void bleio_background(void);
// typedef struct {
@ -43,6 +45,10 @@ void bleio_background(void);
void check_nimble_error(int rc, const char *file, size_t line);
#define CHECK_NIMBLE_ERROR(rc) check_nimble_error(rc, __FILE__, __LINE__)
void check_ble_error(int error_code, const char *file, size_t line);
#define CHECK_BLE_ERROR(error_code) check_ble_error(error_code, __FILE__, __LINE__)
void check_notify(BaseType_t result);
#define CHECK_NOTIFY(result) check_notify(result)
#define MSEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000) / (RESOLUTION))
#define SEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000000) / (RESOLUTION))
@ -51,6 +57,7 @@ void check_nimble_error(int rc, const char *file, size_t line);
#define ADV_INTERVAL_UNIT_FLOAT_SECS (0.000625)
// Microseconds is the base unit. The macros above know that.
#define UNIT_0_625_MS (625)
#define UNIT_1_MS (1000)
#define UNIT_1_25_MS (1250)
#define UNIT_10_MS (10000)

View File

@ -0,0 +1,116 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2016 Glenn Ruben Bakke
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "common-hal/_bleio/ble_events.h"
#include <stdbool.h>
#include <stdio.h>
#include "py/misc.h"
#include "py/mpstate.h"
#include "py/runtime.h"
#if CIRCUITPY_SERIAL_BLE && CIRCUITPY_VERBOSE_BLE
#include "supervisor/shared/bluetooth/serial.h"
#endif
void ble_event_reset(void) {
// Linked list items will be gc'd.
MP_STATE_VM(ble_event_handler_entries) = NULL;
}
void ble_event_add_handler_entry(ble_event_handler_entry_t *entry,
ble_gap_event_fn *func, void *param) {
ble_event_handler_entry_t *it = MP_STATE_VM(ble_event_handler_entries);
while (it != NULL) {
// If event handler and its corresponding param are already on the list, don't add again.
if ((it->func == func) && (it->param == param)) {
return;
}
it = it->next;
}
entry->next = MP_STATE_VM(ble_event_handler_entries);
entry->param = param;
entry->func = func;
MP_STATE_VM(ble_event_handler_entries) = entry;
}
void ble_event_add_handler(ble_gap_event_fn *func, void *param) {
ble_event_handler_entry_t *it = MP_STATE_VM(ble_event_handler_entries);
while (it != NULL) {
// If event handler and its corresponding param are already on the list, don't add again.
if ((it->func == func) && (it->param == param)) {
return;
}
it = it->next;
}
// Add a new handler to the front of the list
ble_event_handler_entry_t *handler = m_new_ll(ble_event_handler_entry_t, 1);
ble_event_add_handler_entry(handler, func, param);
}
void ble_event_remove_handler(ble_gap_event_fn *func, void *param) {
ble_event_handler_entry_t *it = MP_STATE_VM(ble_event_handler_entries);
ble_event_handler_entry_t **prev = &MP_STATE_VM(ble_event_handler_entries);
while (it != NULL) {
if ((it->func == func) && (it->param == param)) {
// Splice out the matching handler.
*prev = it->next;
// Clear next of the removed node so it's clearly not in a list.
it->next = NULL;
return;
}
prev = &(it->next);
it = it->next;
}
}
int ble_event_run_handlers(struct ble_gap_event *event) {
#if CIRCUITPY_SERIAL_BLE && CIRCUITPY_VERBOSE_BLE
ble_serial_disable();
#endif
#if CIRCUITPY_VERBOSE_BLE
mp_printf(&mp_plat_print, "BLE GAP event: 0x%04x\n", event->type);
#endif
ble_event_handler_entry_t *it = MP_STATE_VM(ble_event_handler_entries);
bool done = false;
while (it != NULL) {
// Capture next before calling the function in case it removes itself from the list.
ble_event_handler_entry_t *next = it->next;
done = it->func(event, it->param) || done;
it = next;
}
#if CIRCUITPY_SERIAL_BLE && CIRCUITPY_VERBOSE_BLE
ble_serial_enable();
#endif
return 0;
}

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