Merge pull request #28 from adafruit/main

Merge from adafruit/main
This commit is contained in:
DavePutz 2020-09-14 16:50:40 -05:00 committed by GitHub
commit 2a2a8d6457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
480 changed files with 31165 additions and 4823 deletions

View File

@ -36,7 +36,7 @@ jobs:
- name: Install deps
run: |
sudo apt-get install -y eatmydata
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli
- name: Versions
run: |
@ -73,12 +73,19 @@ jobs:
with:
name: stubs
path: circuitpython-stubs*
- name: Docs
- name: Test Documentation Build (HTML)
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
- uses: actions/upload-artifact@v2
with:
name: docs
path: _build/html
- name: Test Documentation Build (LaTeX/PDF)
run: |
make latexpdf
- uses: actions/upload-artifact@v2
with:
name: docs
path: _build/latex
- name: Translations
run: make check-translate
- name: New boards check
@ -227,6 +234,7 @@ jobs:
- "makerdiary_nrf52840_m2_devkit"
- "makerdiary_nrf52840_mdk"
- "makerdiary_nrf52840_mdk_usb_dongle"
- "matrixportal_m4"
- "meowbit_v121"
- "meowmeow"
- "metro_m0_express"
@ -253,6 +261,7 @@ jobs:
- "pca10100"
- "pewpew10"
- "pewpew_m4"
- "picoplanet"
- "pirkey_m0"
- "pitaya_go"
- "pyb_nano_v2"
@ -266,6 +275,7 @@ jobs:
- "pyportal"
- "pyportal_titano"
- "pyruler"
- "qtpy_m0"
- "raytac_mdbt50q-db-40"
- "robohatmm1_m4"
- "sam32"
@ -400,8 +410,11 @@ jobs:
fail-fast: false
matrix:
board:
- "electroniccats_bastwifi"
- "espressif_kaluga_1"
- "espressif_saola_1_wroom"
- "espressif_saola_1_wrover"
- "microdev_micro_s2"
- "unexpectedmaker_feathers2"
steps:
@ -422,6 +435,11 @@ jobs:
with:
path: ${{ github.workspace }}/.idf_tools
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20200801
- name: Clone IDF submodules
run: |
(cd $IDF_PATH && git submodule update --init)
env:
IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf
- name: Install IDF tools
run: |
$IDF_PATH/tools/idf_tools.py --non-interactive install required

7
.gitignore vendored
View File

@ -57,7 +57,7 @@ _build
######################
genrst/
/autoapi/
/shared-bindings/**/*.rst
/shared-bindings/*/**/*.rst
# ctags and similar
###################
@ -80,3 +80,8 @@ TAGS
*.mo
.vscode
# Python Virtual Environments
####################
.venv
.env

6
.gitmodules vendored
View File

@ -147,3 +147,9 @@
[submodule "ports/esp32s2/esp-idf"]
path = ports/esp32s2/esp-idf
url = https://github.com/tannewt/esp-idf.git
[submodule "frozen/Adafruit_CircuitPython_RFM9x"]
path = frozen/Adafruit_CircuitPython_RFM9x
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM9x.git
[submodule "frozen/Adafruit_CircuitPython_RFM69"]
path = frozen/Adafruit_CircuitPython_RFM69
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git

View File

@ -8,6 +8,13 @@
version: 2
submodules:
include:
- extmod/ulab
formats:
- pdf
python:
version: 3
install:

View File

@ -245,6 +245,10 @@ stubs:
@$(PYTHON) tools/extract_pyi.py ports/atmel-samd/bindings $(STUBDIR)
@$(PYTHON) setup.py -q sdist
.PHONY: check-stubs
check-stubs: stubs
MYPYPATH=$(STUBDIR) mypy --strict $(STUBDIR)
update-frozen-libraries:
@echo "Updating all frozen libraries to latest tagged version."
cd frozen; for library in *; do cd $$library; ../../tools/git-checkout-latest-tag.sh; cd ..; done

62
conf.py
View File

@ -17,14 +17,17 @@
#
# SPDX-License-Identifier: MIT
import json
import logging
import os
import re
import subprocess
import sys
import urllib.parse
import recommonmark
from sphinx.transforms import SphinxTransform
from docutils import nodes
from sphinx import addnodes
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@ -39,6 +42,9 @@ master_doc = 'docs/index'
# Grab the JSON values to use while building the module support matrix
# in 'shared-bindings/index.rst'
# The stubs must be built before we calculate the shared bindings matrix
subprocess.check_output(["make", "stubs"])
#modules_support_matrix = shared_bindings_matrix.support_matrix_excluded_boards()
modules_support_matrix = shared_bindings_matrix.support_matrix_by_board()
@ -74,7 +80,6 @@ source_suffix = {
'.md': 'markdown',
}
subprocess.check_output(["make", "stubs"])
extensions.append('autoapi.extension')
autoapi_type = 'python'
@ -84,6 +89,7 @@ autoapi_dirs = [os.path.join('circuitpython-stubs', x) for x in os.listdir('circ
autoapi_add_toctree_entry = False
autoapi_options = ['members', 'undoc-members', 'private-members', 'show-inheritance', 'special-members', 'show-module-summary']
autoapi_template_dir = 'docs/autoapi/templates'
autoapi_python_class_content = "both"
autoapi_python_use_implicit_namespaces = True
autoapi_root = "shared-bindings"
@ -106,7 +112,25 @@ copyright = '2014-2020, MicroPython & CircuitPython contributors (https://github
#
# We don't follow "The short X.Y version" vs "The full version, including alpha/beta/rc tags"
# breakdown, so use the same version identifier for both to avoid confusion.
version = release = '0.0.0'
final_version = ""
git_describe = subprocess.run(
["git", "describe", "--dirty", "--tags"],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding="utf-8"
)
if git_describe.returncode == 0:
git_version = re.search(
r"^\d(?:\.\d){0,2}(?:\-(?:alpha|beta|rc)\.\d+){0,1}",
str(git_describe.stdout)
)
if git_version:
final_version = git_version[0]
else:
print("Failed to retrieve git version:", git_describe.stdout)
version = release = final_version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -122,6 +146,7 @@ version = release = '0.0.0'
# directories to ignore when looking for source files.
exclude_patterns = ["**/build*",
".git",
".env",
".venv",
".direnv",
"docs/autoapi",
@ -423,7 +448,38 @@ def generate_redirects(app):
with open(redirected_filename, 'w') as f:
f.write(TEMPLATE % urllib.parse.quote(to_path, '#/'))
class CoreModuleTransform(SphinxTransform):
default_priority = 870
def _convert_first_paragraph_into_title(self):
title = self.document.next_node(nodes.title)
paragraph = self.document.next_node(nodes.paragraph)
if not title or not paragraph:
return
if isinstance(paragraph[0], nodes.paragraph):
paragraph = paragraph[0]
if all(isinstance(child, nodes.Text) for child in paragraph.children):
for child in paragraph.children:
title.append(nodes.Text(" \u2013 "))
title.append(child)
paragraph.parent.remove(paragraph)
def _enable_linking_to_nonclass_targets(self):
for desc in self.document.traverse(addnodes.desc):
for xref in desc.traverse(addnodes.pending_xref):
if xref.attributes.get("reftype") == "class":
xref.attributes.pop("refspecific", None)
def apply(self, **kwargs):
docname = self.env.docname
if docname.startswith(autoapi_root) and docname.endswith("/index"):
self._convert_first_paragraph_into_title()
self._enable_linking_to_nonclass_targets()
def setup(app):
app.add_css_file("customstyle.css")
app.add_config_value('redirects_file', 'redirects', 'env')
app.connect('builder-inited', generate_redirects)
app.add_transform(CoreModuleTransform)

View File

@ -0,0 +1,958 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Dan Halbert for Adafruit Industries
* Copyright (c) 2016 Glenn Ruben Bakke
* Copyright (c) 2018 Artur Pacholec
*
* 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 <math.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "hci.h"
#include "py/gc.h"
#include "py/mphal.h"
#include "py/objstr.h"
#include "py/runtime.h"
#include "supervisor/shared/safe_mode.h"
#include "supervisor/shared/tick.h"
#include "supervisor/usb.h"
#include "shared-bindings/_bleio/__init__.h"
#include "shared-bindings/_bleio/Adapter.h"
#include "shared-bindings/_bleio/Address.h"
#include "shared-bindings/_bleio/Characteristic.h"
#include "shared-bindings/_bleio/Service.h"
#include "shared-bindings/nvm/ByteArray.h"
#include "shared-bindings/_bleio/Connection.h"
#include "shared-bindings/_bleio/ScanEntry.h"
#include "shared-bindings/time/__init__.h"
#define MSEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000) / (RESOLUTION))
#define SEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000000) / (RESOLUTION))
#define UNITS_TO_SEC(TIME, RESOLUTION) (((TIME) * (RESOLUTION)) / 1000000)
// 0.625 msecs (625 usecs)
#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_25_MS (1250)
#define UNIT_10_MS (10000)
#define MAX_ADVERTISEMENT_SIZE (31)
// TODO make this settable from Python.
#define DEFAULT_TX_POWER 0 // 0 dBm
#define MAX_ANONYMOUS_ADV_TIMEOUT_SECS (60*15)
#define MAX_LIMITED_DISCOVERABLE_ADV_TIMEOUT_SECS (180)
#define BLE_MIN_CONN_INTERVAL MSEC_TO_UNITS(15, UNIT_0_625_MS)
#define BLE_MAX_CONN_INTERVAL MSEC_TO_UNITS(15, UNIT_0_625_MS)
#define BLE_SLAVE_LATENCY 0
#define BLE_CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS)
bleio_connection_internal_t bleio_connections[BLEIO_TOTAL_CONNECTION_COUNT];
STATIC void add_generic_services(bleio_adapter_obj_t *adapter) {
// Create Generic Access UUID, Service, and Characteristics.
// Generic Access Service setup.
bleio_uuid_obj_t *generic_access_service_uuid = m_new_obj(bleio_uuid_obj_t);
generic_access_service_uuid->base.type = &bleio_uuid_type;
common_hal_bleio_uuid_construct(generic_access_service_uuid, 0x1800, NULL);
bleio_uuid_obj_t *device_name_characteristic_uuid = m_new_obj(bleio_uuid_obj_t);
device_name_characteristic_uuid->base.type = &bleio_uuid_type;
common_hal_bleio_uuid_construct(device_name_characteristic_uuid, 0x2A00, NULL);
bleio_uuid_obj_t *appearance_characteristic_uuid = m_new_obj(bleio_uuid_obj_t);
appearance_characteristic_uuid->base.type = &bleio_uuid_type;
common_hal_bleio_uuid_construct(appearance_characteristic_uuid, 0x2A01, NULL);
// Not implemented:
// Peripheral Preferred Connection Parameters
// Central Address Resolution
bleio_service_obj_t *generic_access_service = m_new_obj(bleio_service_obj_t);
generic_access_service->base.type = &bleio_service_type;
common_hal_bleio_service_construct(generic_access_service, generic_access_service_uuid, false);
adapter->device_name_characteristic = m_new_obj(bleio_characteristic_obj_t);
adapter->device_name_characteristic->base.type = &bleio_characteristic_type;
char generic_name[] = { 'C', 'I', 'R', 'C', 'U', 'I', 'T', 'P', 'Y', 'n', 'n', 'n', 'n' };
mp_buffer_info_t generic_name_bufinfo = {
.buf = generic_name,
.len = sizeof(generic_name),
};
// Will be added to service by constructor.
common_hal_bleio_characteristic_construct(
adapter->device_name_characteristic,
generic_access_service,
BLE_GATT_HANDLE_INVALID,
device_name_characteristic_uuid,
CHAR_PROP_READ,
SECURITY_MODE_OPEN,
SECURITY_MODE_NO_ACCESS,
248, // max length, from Bluetooth spec
false, // not fixed length
&generic_name_bufinfo
);
uint16_t zero_16 = 0;
mp_buffer_info_t zero_16_value = {
.buf = &zero_16,
.len = sizeof(zero_16),
};
adapter->appearance_characteristic = m_new_obj(bleio_characteristic_obj_t);
adapter->appearance_characteristic->base.type = &bleio_characteristic_type;
common_hal_bleio_characteristic_construct(
adapter->appearance_characteristic,
generic_access_service,
BLE_GATT_HANDLE_INVALID,
appearance_characteristic_uuid,
CHAR_PROP_READ,
SECURITY_MODE_OPEN,
SECURITY_MODE_NO_ACCESS,
2, // max length, from Bluetooth spec
true, // fixed length
&zero_16_value
);
// Generic Attribute Service setup.
bleio_uuid_obj_t *generic_attribute_service_uuid = m_new_obj(bleio_uuid_obj_t);
generic_attribute_service_uuid->base.type = &bleio_uuid_type;
common_hal_bleio_uuid_construct(generic_attribute_service_uuid, 0x1801, NULL);
bleio_uuid_obj_t *service_changed_characteristic_uuid = m_new_obj(bleio_uuid_obj_t);
service_changed_characteristic_uuid->base.type = &bleio_uuid_type;
common_hal_bleio_uuid_construct(service_changed_characteristic_uuid, 0x2A05, NULL);
bleio_service_obj_t *generic_attribute_service = m_new_obj(bleio_service_obj_t);
generic_attribute_service->base.type = &bleio_service_type;
common_hal_bleio_service_construct(generic_attribute_service, generic_attribute_service_uuid, false);
adapter->service_changed_characteristic = m_new_obj(bleio_characteristic_obj_t);
adapter->service_changed_characteristic->base.type = &bleio_characteristic_type;
uint32_t zero_32 = 0;
mp_buffer_info_t zero_32_value = {
.buf = &zero_32,
.len = sizeof(zero_32),
};
common_hal_bleio_characteristic_construct(
adapter->service_changed_characteristic,
generic_attribute_service,
BLE_GATT_HANDLE_INVALID,
service_changed_characteristic_uuid,
CHAR_PROP_INDICATE,
SECURITY_MODE_OPEN,
SECURITY_MODE_NO_ACCESS,
4, // max length, from Bluetooth spec
true, // fixed length
&zero_32_value
);
}
STATIC void check_enabled(bleio_adapter_obj_t *adapter) {
if (!common_hal_bleio_adapter_get_enabled(adapter)) {
mp_raise_bleio_BluetoothError(translate("Adapter not enabled"));
}
}
// STATIC bool adapter_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
// bleio_adapter_obj_t *self = (bleio_adapter_obj_t*)self_in;
// // For debugging.
// // mp_printf(&mp_plat_print, "Adapter event: 0x%04x\n", ble_evt->header.evt_id);
// switch (ble_evt->header.evt_id) {
// case BLE_GAP_EVT_CONNECTED: {
// // Find an empty connection. One must always be available because the SD has the same
// // total connection limit.
// bleio_connection_internal_t *connection;
// for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
// connection = &bleio_connections[i];
// if (connection->conn_handle == BLE_CONN_HANDLE_INVALID) {
// break;
// }
// }
// // Central has connected.
// ble_gap_evt_connected_t* connected = &ble_evt->evt.gap_evt.params.connected;
// connection->conn_handle = ble_evt->evt.gap_evt.conn_handle;
// connection->connection_obj = mp_const_none;
// connection->pair_status = PAIR_NOT_PAIRED;
// connection->mtu = 0;
// ble_drv_add_event_handler_entry(&connection->handler_entry, connection_on_ble_evt, connection);
// self->connection_objs = NULL;
// // Save the current connection parameters.
// memcpy(&connection->conn_params, &connected->conn_params, sizeof(ble_gap_conn_params_t));
// #if CIRCUITPY_VERBOSE_BLE
// ble_gap_conn_params_t *cp = &connected->conn_params;
// mp_printf(&mp_plat_print, "conn params: min_ci %d max_ci %d s_l %d sup_timeout %d\n", cp->min_conn_interval, cp->max_conn_interval, cp->slave_latency, cp->conn_sup_timeout);
// #endif
// // See if connection interval set by Central is out of range.
// // If so, negotiate our preferred range.
// ble_gap_conn_params_t conn_params;
// sd_ble_gap_ppcp_get(&conn_params);
// if (conn_params.min_conn_interval < connected->conn_params.min_conn_interval ||
// conn_params.min_conn_interval > connected->conn_params.max_conn_interval) {
// sd_ble_gap_conn_param_update(ble_evt->evt.gap_evt.conn_handle, &conn_params);
// }
// self->current_advertising_data = NULL;
// break;
// }
// case BLE_GAP_EVT_DISCONNECTED: {
// // Find the connection that was disconnected.
// bleio_connection_internal_t *connection;
// for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
// connection = &bleio_connections[i];
// if (connection->conn_handle == ble_evt->evt.gap_evt.conn_handle) {
// break;
// }
// }
// ble_drv_remove_event_handler(connection_on_ble_evt, connection);
// connection->conn_handle = BLE_CONN_HANDLE_INVALID;
// connection->pair_status = PAIR_NOT_PAIRED;
// if (connection->connection_obj != mp_const_none) {
// bleio_connection_obj_t* obj = connection->connection_obj;
// obj->connection = NULL;
// obj->disconnect_reason = ble_evt->evt.gap_evt.params.disconnected.reason;
// }
// self->connection_objs = NULL;
// break;
// }
// case BLE_GAP_EVT_ADV_SET_TERMINATED:
// self->current_advertising_data = NULL;
// break;
// default:
// // For debugging.
// // mp_printf(&mp_plat_print, "Unhandled adapter event: 0x%04x\n", ble_evt->header.evt_id);
// return false;
// break;
// }
// return true;
// }
char default_ble_name[] = { 'C', 'I', 'R', 'C', 'U', 'I', 'T', 'P', 'Y', 0, 0, 0, 0};
// Get various values and limits set by the adapter.
// Set event mask.
STATIC void bleio_adapter_hci_init(bleio_adapter_obj_t *self) {
const size_t len = sizeof(default_ble_name);
bt_addr_t addr;
hci_check_error(hci_read_bd_addr(&addr));
default_ble_name[len - 4] = nibble_to_hex_lower[addr.val[1] >> 4 & 0xf];
default_ble_name[len - 3] = nibble_to_hex_lower[addr.val[1] & 0xf];
default_ble_name[len - 2] = nibble_to_hex_lower[addr.val[0] >> 4 & 0xf];
default_ble_name[len - 1] = nibble_to_hex_lower[addr.val[0] & 0xf];
self->name = mp_obj_new_str(default_ble_name, len);
// Get version information.
if (hci_read_local_version(&self->hci_version, &self->hci_revision, &self->lmp_version,
&self->manufacturer, &self->lmp_subversion) != HCI_OK) {
mp_raise_bleio_BluetoothError(translate("Could not read HCI version"));
}
// Get supported features.
if (hci_le_read_local_supported_features(self->features) != HCI_OK) {
mp_raise_bleio_BluetoothError(translate("Could not read BLE features"));
}
// Enabled desired events.
// Most importantly, includes:
// BT_EVT_MASK_LE_META_EVENT BT_EVT_BIT(61)
if (hci_set_event_mask(0x3FFFFFFFFFFFFFFF) != HCI_OK) {
mp_raise_bleio_BluetoothError(translate("Could not set event mask"));
}
// The default events for LE are:
// BT_EVT_MASK_LE_CONN_COMPLETE, BT_EVT_MASK_LE_ADVERTISING_REPORT,
// BT_EVT_MASK_LE_CONN_UPDATE_COMPLETE, BT_EVT_MASK_LE_REMOTE_FEAT_COMPLETE
// BT_EVT_MASK_LE_LTK_REQUEST.
// That's all we need right now, so we don't bother to set the LE event mask.
// Get ACL buffer info.
uint16_t le_max_len;
uint8_t le_max_num;
if (hci_le_read_buffer_size(&le_max_len, &le_max_num) == HCI_OK) {
self->max_acl_buffer_len = le_max_len;
self->max_acl_num_buffers = le_max_num;
} else {
// LE Read Buffer Size not available; use the general Read Buffer Size.
uint16_t acl_max_len;
uint8_t sco_max_len;
uint16_t acl_max_num;
uint16_t sco_max_num;
if (hci_read_buffer_size(&acl_max_len, &sco_max_len, &acl_max_num, &sco_max_num) != HCI_OK) {
mp_raise_bleio_BluetoothError(translate("Could not read BLE buffer info"));
}
self->max_acl_buffer_len = acl_max_len;
self->max_acl_num_buffers = acl_max_num;
}
// Get max advertising length if extended advertising is supported.
if (BT_FEAT_LE_EXT_ADV(self->features)) {
uint16_t max_adv_data_len;
if (hci_le_read_maximum_advertising_data_length(&max_adv_data_len) != HCI_OK) {
mp_raise_bleio_BluetoothError(translate("Could not get max advertising length"));
}
self->max_adv_data_len = max_adv_data_len;
} else {
self->max_adv_data_len = MAX_ADVERTISEMENT_SIZE;
}
}
void common_hal_bleio_adapter_construct_hci_uart(bleio_adapter_obj_t *self, busio_uart_obj_t *uart, digitalio_digitalinout_obj_t *rts, digitalio_digitalinout_obj_t *cts) {
self->allocated = true;
self->hci_uart = uart;
self->rts_digitalinout = rts;
self->cts_digitalinout = cts;
// Advertising-related fields are initialized by common_hal_bleio_adapter_set_enabled().
self->enabled = false;
common_hal_bleio_adapter_set_enabled(self, true);
bleio_adapter_hci_init(self);
common_hal_bleio_adapter_set_name(self, default_ble_name);
}
void common_hal_bleio_adapter_set_enabled(bleio_adapter_obj_t *self, bool enabled) {
const bool is_enabled = common_hal_bleio_adapter_get_enabled(self);
// Don't enable or disable twice
if (is_enabled == enabled) {
return;
}
self->enabled = enabled;
// We must poll for input from the HCI adapter.
// TODO Can we instead trigger an interrupt on UART input traffic?
if (enabled) {
supervisor_enable_tick();
} else {
supervisor_disable_tick();
}
// Enabling or disabling: stop any current activity; reset to known state.
hci_reset();
self->now_advertising = false;
self->extended_advertising = false;
self->circuitpython_advertising = false;
self->advertising_timeout_msecs = 0;
if (enabled) {
// Reset list of known attributes.
// Indices into the list are handles. Handle 0x0000 designates an invalid handle,
// so store None there to skip it.
self->attributes = mp_obj_new_list(0, NULL);
bleio_adapter_add_attribute(self, mp_const_none);
add_generic_services(self);
}
}
bool common_hal_bleio_adapter_get_enabled(bleio_adapter_obj_t *self) {
return self->enabled;
}
bleio_address_obj_t *common_hal_bleio_adapter_get_address(bleio_adapter_obj_t *self) {
check_enabled(self);
bt_addr_t addr;
hci_check_error(hci_read_bd_addr(&addr));
bleio_address_obj_t *address = m_new_obj(bleio_address_obj_t);
address->base.type = &bleio_address_type;
common_hal_bleio_address_construct(address, addr.val, BT_ADDR_LE_PUBLIC);
return address;
}
bool common_hal_bleio_adapter_set_address(bleio_adapter_obj_t *self, bleio_address_obj_t *address) {
mp_buffer_info_t bufinfo;
if (!mp_get_buffer(address->bytes, &bufinfo, MP_BUFFER_READ)) {
return false;
}
return hci_le_set_random_address(bufinfo.buf) == HCI_OK;
}
mp_obj_str_t* common_hal_bleio_adapter_get_name(bleio_adapter_obj_t *self) {
return self->name;
}
void common_hal_bleio_adapter_set_name(bleio_adapter_obj_t *self, const char* name) {
self->name = mp_obj_new_str(name, strlen(name));
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(self->name, &bufinfo, MP_BUFFER_READ);
bleio_characteristic_set_local_value(self->device_name_characteristic, &bufinfo);
}
// STATIC bool scan_on_ble_evt(ble_evt_t *ble_evt, void *scan_results_in) {
// bleio_scanresults_obj_t *scan_results = (bleio_scanresults_obj_t*)scan_results_in;
// if (ble_evt->header.evt_id == BLE_GAP_EVT_TIMEOUT &&
// ble_evt->evt.gap_evt.params.timeout.src == BLE_GAP_TIMEOUT_SRC_SCAN) {
// shared_module_bleio_scanresults_set_done(scan_results, true);
// ble_drv_remove_event_handler(scan_on_ble_evt, scan_results);
// return true;
// }
// if (ble_evt->header.evt_id != BLE_GAP_EVT_ADV_REPORT) {
// return false;
// }
// ble_gap_evt_adv_report_t *report = &ble_evt->evt.gap_evt.params.adv_report;
// shared_module_bleio_scanresults_append(scan_results,
// supervisor_ticks_ms64(),
// report->type.connectable,
// report->type.scan_response,
// report->rssi,
// report->peer_addr.addr,
// report->peer_addr.addr_type,
// report->data.p_data,
// report->data.len);
// const uint32_t err_code = sd_ble_gap_scan_start(NULL, scan_results->common_hal_data);
// if (err_code != NRF_SUCCESS) {
// // TODO: Pass the error into the scan results so it can throw an exception.
// scan_results->done = true;
// }
// return true;
// }
mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t* prefixes, size_t prefix_length, bool extended, mp_int_t buffer_size, mp_float_t timeout, mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active) {
// TODO
mp_raise_NotImplementedError(NULL);
check_enabled(self);
if (self->scan_results != NULL) {
if (!shared_module_bleio_scanresults_get_done(self->scan_results)) {
mp_raise_bleio_BluetoothError(translate("Scan already in progess. Stop with stop_scan."));
}
self->scan_results = NULL;
}
self->scan_results = shared_module_bleio_new_scanresults(buffer_size, prefixes, prefix_length, minimum_rssi);
// size_t max_packet_size = extended ? BLE_GAP_SCAN_BUFFER_EXTENDED_MAX_SUPPORTED : BLE_GAP_SCAN_BUFFER_MAX;
// uint8_t *raw_data = m_malloc(sizeof(ble_data_t) + max_packet_size, false);
// ble_data_t * sd_data = (ble_data_t *) raw_data;
// self->scan_results->common_hal_data = sd_data;
// sd_data->len = max_packet_size;
// sd_data->p_data = raw_data + sizeof(ble_data_t);
// ble_drv_add_event_handler(scan_on_ble_evt, self->scan_results);
// uint32_t nrf_timeout = SEC_TO_UNITS(timeout, UNIT_10_MS);
// if (timeout <= 0.0001) {
// nrf_timeout = BLE_GAP_SCAN_TIMEOUT_UNLIMITED;
// }
// ble_gap_scan_params_t scan_params = {
// .extended = extended,
// .interval = SEC_TO_UNITS(interval, UNIT_0_625_MS),
// .timeout = nrf_timeout,
// .window = SEC_TO_UNITS(window, UNIT_0_625_MS),
// .scan_phys = BLE_GAP_PHY_1MBPS,
// .active = active
// };
// uint32_t err_code;
// vm_used_ble = true;
// err_code = sd_ble_gap_scan_start(&scan_params, sd_data);
// if (err_code != NRF_SUCCESS) {
// self->scan_results = NULL;
// ble_drv_remove_event_handler(scan_on_ble_evt, self->scan_results);
// check_nrf_error(err_code);
// }
return MP_OBJ_FROM_PTR(self->scan_results);
}
void common_hal_bleio_adapter_stop_scan(bleio_adapter_obj_t *self) {
// TODO
mp_raise_NotImplementedError(NULL);
check_enabled(self);
// If not already scanning, no problem.
if (hci_le_set_scan_enable(BT_HCI_LE_SCAN_DISABLE, BT_HCI_LE_SCAN_FILTER_DUP_DISABLE) == HCI_OK) {
shared_module_bleio_scanresults_set_done(self->scan_results, true);
self->scan_results = NULL;
}
}
// typedef struct {
// uint16_t conn_handle;
// volatile bool done;
// } connect_info_t;
// STATIC bool connect_on_ble_evt(ble_evt_t *ble_evt, void *info_in) {
// connect_info_t *info = (connect_info_t*)info_in;
// switch (ble_evt->header.evt_id) {
// case BLE_GAP_EVT_CONNECTED:
// info->conn_handle = ble_evt->evt.gap_evt.conn_handle;
// info->done = true;
// break;
// case BLE_GAP_EVT_TIMEOUT:
// // Handle will be invalid.
// info->done = true;
// break;
// default:
// // For debugging.
// // mp_printf(&mp_plat_print, "Unhandled central event: 0x%04x\n", ble_evt->header.evt_id);
// return false;
// break;
// }
// return true;
// }
mp_obj_t common_hal_bleio_adapter_connect(bleio_adapter_obj_t *self, bleio_address_obj_t *address, mp_float_t timeout) {
// TODO
mp_raise_NotImplementedError(NULL);
check_enabled(self);
// ble_gap_addr_t addr;
// addr.addr_type = address->type;
// mp_buffer_info_t address_buf_info;
// mp_get_buffer_raise(address->bytes, &address_buf_info, MP_BUFFER_READ);
// memcpy(addr.addr, (uint8_t *) address_buf_info.buf, NUM_BLEIO_ADDRESS_BYTES);
// ble_gap_scan_params_t scan_params = {
// .interval = MSEC_TO_UNITS(100, UNIT_0_625_MS),
// .window = MSEC_TO_UNITS(100, UNIT_0_625_MS),
// .scan_phys = BLE_GAP_PHY_1MBPS,
// // timeout of 0 means no timeout
// .timeout = SEC_TO_UNITS(timeout, UNIT_10_MS),
// };
// ble_gap_conn_params_t conn_params = {
// .conn_sup_timeout = MSEC_TO_UNITS(4000, UNIT_10_MS),
// .min_conn_interval = MSEC_TO_UNITS(15, UNIT_1_25_MS),
// .max_conn_interval = MSEC_TO_UNITS(300, UNIT_1_25_MS),
// .slave_latency = 0, // number of conn events
// };
// connect_info_t event_info;
// ble_drv_add_event_handler(connect_on_ble_evt, &event_info);
// event_info.done = false;
vm_used_ble = true;
// uint32_t err_code = sd_ble_gap_connect(&addr, &scan_params, &conn_params, BLE_CONN_CFG_TAG_CUSTOM);
// if (err_code != NRF_SUCCESS) {
// ble_drv_remove_event_handler(connect_on_ble_evt, &event_info);
// check_nrf_error(err_code);
// }
// while (!event_info.done) {
// RUN_BACKGROUND_TASKS;
// }
// ble_drv_remove_event_handler(connect_on_ble_evt, &event_info);
// uint16_t conn_handle = event_info.conn_handle;
// if (conn_handle == BLE_CONN_HANDLE_INVALID) {
// mp_raise_bleio_BluetoothError(translate("Failed to connect: timeout"));
// }
// // Negotiate for better PHY, larger MTU and data lengths since we are the central. These are
// // nice-to-haves so ignore any errors.
// ble_gap_phys_t const phys = {
// .rx_phys = BLE_GAP_PHY_AUTO,
// .tx_phys = BLE_GAP_PHY_AUTO,
// };
// sd_ble_gap_phy_update(conn_handle, &phys);
// sd_ble_gattc_exchange_mtu_request(conn_handle, BLE_GATTS_VAR_ATTR_LEN_MAX);
// sd_ble_gap_data_length_update(conn_handle, NULL, NULL);
// 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) {
// return bleio_connection_new_from_internal(connection);
// }
// }
mp_raise_bleio_BluetoothError(translate("Failed to connect: internal error"));
return mp_const_none;
}
STATIC void check_data_fit(size_t data_len, bool connectable) {
if (data_len > MAX_ADVERTISEMENT_SIZE) {
mp_raise_ValueError(translate("Data too large for advertisement packet"));
}
}
// STATIC bool advertising_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
// bleio_adapter_obj_t *self = (bleio_adapter_obj_t*)self_in;
// switch (ble_evt->header.evt_id) {
// case BLE_GAP_EVT_ADV_SET_TERMINATED:
// common_hal_bleio_adapter_stop_advertising(self);
// ble_drv_remove_event_handler(advertising_on_ble_evt, self_in);
// break;
// default:
// // For debugging.
// // mp_printf(&mp_plat_print, "Unhandled advertising event: 0x%04x\n", ble_evt->header.evt_id);
// return false;
// break;
// }
// return true;
// }
uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len) {
check_enabled(self);
if (self->now_advertising) {
if (self->circuitpython_advertising) {
common_hal_bleio_adapter_stop_advertising(self);
} else {
// User-requested advertising.
// TODO allow multiple advertisements.
// Already advertising. Can't advertise twice.
return 1;
}
}
// Peer address, which we don't use (no directed advertising).
bt_addr_le_t empty_addr = { 0 };
bool extended =
advertising_data_len > self->max_adv_data_len || scan_response_data_len > self->max_adv_data_len;
if (extended) {
if (!BT_FEAT_LE_EXT_ADV(self->features)) {
mp_raise_bleio_BluetoothError(translate("Data length needs extended advertising, but this adapter does not support it"));
}
uint16_t props = 0;
if (connectable) {
props |= BT_HCI_LE_ADV_PROP_CONN;
}
if (scan_response_data_len > 0) {
props |= BT_HCI_LE_ADV_PROP_SCAN;
}
// Advertising interval.
uint32_t interval_units = SEC_TO_UNITS(interval, UNIT_0_625_MS);
hci_check_error(
hci_le_set_extended_advertising_parameters(
0, // handle
props, // adv properties
interval_units, // min interval
interval_units, // max interval
0b111, // channel map: channels 37, 38, 39
anonymous ? BT_ADDR_LE_RANDOM : BT_ADDR_LE_PUBLIC,
&empty_addr, // peer_addr,
0x00, // filter policy: no filter
DEFAULT_TX_POWER,
BT_HCI_LE_EXT_SCAN_PHY_1M, // Secondary PHY to use
0x00, // AUX_ADV_IND shall be sent prior to next adv event
BT_HCI_LE_EXT_SCAN_PHY_1M, // Secondary PHY to use
0x00, // Advertising SID
0x00 // Scan req notify disable
));
// We can use the duration mechanism provided, instead of our own.
self->advertising_timeout_msecs = 0;
uint8_t handle[1] = { 0 };
uint16_t duration_10msec[1] = { timeout * 100 };
uint8_t max_ext_adv_evts[1] = { 0 };
hci_check_error(
hci_le_set_extended_advertising_enable(
BT_HCI_LE_ADV_ENABLE,
1, // one advertising set.
handle,
duration_10msec,
max_ext_adv_evts
));
self->extended_advertising = true;
} else {
// Legacy advertising (not extended).
uint8_t adv_type;
if (connectable) {
// Connectable, scannable, undirected.
adv_type = BT_HCI_ADV_IND;
} else if (scan_response_data_len > 0) {
// Unconnectable, scannable, undirected.
adv_type = BT_HCI_ADV_SCAN_IND;
} else {
// Unconnectable, unscannable, undirected.
adv_type = BT_HCI_ADV_NONCONN_IND;
}
// Advertising interval.
uint16_t interval_units = SEC_TO_UNITS(interval, UNIT_0_625_MS);
hci_check_error(
hci_le_set_advertising_parameters(
interval_units, // min interval
interval_units, // max interval
adv_type,
anonymous ? BT_ADDR_LE_RANDOM : BT_ADDR_LE_PUBLIC,
&empty_addr,
0b111, // channel map: channels 37, 38, 39
0x00 // filter policy: no filter
));
// The HCI commands expect MAX_ADVERTISEMENT_SIZE (31)octets,
// even though the actual data length may be shorter.
uint8_t full_data[MAX_ADVERTISEMENT_SIZE] = { 0 };
memcpy(full_data, advertising_data, MIN(sizeof(full_data), advertising_data_len));
hci_check_error(hci_le_set_advertising_data(advertising_data_len, full_data));
memset(full_data, 0, sizeof(full_data));
if (scan_response_data_len > 0) {
memcpy(full_data, scan_response_data, MIN(sizeof(full_data), scan_response_data_len));
hci_check_error(hci_le_set_scan_response_data(scan_response_data_len, full_data));
}
// No duration mechanism is provided for legacy advertising, so we need to do our own.
self->advertising_timeout_msecs = timeout * 1000;
self->advertising_start_ticks = supervisor_ticks_ms64();
// Start advertising.
hci_check_error(hci_le_set_advertising_enable(BT_HCI_LE_ADV_ENABLE));
self->extended_advertising = false;
} // end legacy advertising setup
vm_used_ble = true;
self->now_advertising = true;
return 0;
}
void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo) {
check_enabled(self);
// interval value has already been validated.
check_data_fit(advertising_data_bufinfo->len, connectable);
check_data_fit(scan_response_data_bufinfo->len, connectable);
if (advertising_data_bufinfo->len > MAX_ADVERTISEMENT_SIZE && scan_response_data_bufinfo->len > 0) {
mp_raise_bleio_BluetoothError(translate("Extended advertisements with scan response not supported."));
}
// Anonymous mode requires a timeout so that we don't continue to broadcast
// the same data while cycling the MAC address -- otherwise, what's the
// point of randomizing the MAC address?
if (timeout == 0 && anonymous) {
timeout = MAX_ANONYMOUS_ADV_TIMEOUT_SECS;
} else {
if (timeout > MAX_LIMITED_DISCOVERABLE_ADV_TIMEOUT_SECS) {
mp_raise_bleio_BluetoothError(translate("Timeout is too long: Maximum timeout length is %d seconds"),
MAX_LIMITED_DISCOVERABLE_ADV_TIMEOUT_SECS);
}
}
const uint32_t result =_common_hal_bleio_adapter_start_advertising(
self, connectable, anonymous, timeout, interval,
advertising_data_bufinfo->buf,
advertising_data_bufinfo->len,
scan_response_data_bufinfo->buf,
scan_response_data_bufinfo->len);
if (result) {
mp_raise_bleio_BluetoothError(translate("Already advertising"));
}
self->circuitpython_advertising = false;
}
void common_hal_bleio_adapter_stop_advertising(bleio_adapter_obj_t *self) {
check_enabled(self);
self->now_advertising = false;
self->extended_advertising = false;
self->circuitpython_advertising = false;
int result = hci_le_set_advertising_enable(BT_HCI_LE_ADV_DISABLE);
// OK if we're already stopped. There seems to be an ESP32 HCI bug:
// If advertising is already off, then LE_SET_ADV_ENABLE does not return a response.
if (result != HCI_RESPONSE_TIMEOUT) {
hci_check_error(result);
}
//TODO startup CircuitPython advertising again.
}
// Note that something stopped advertising, such as a connection happening.
//Don't ask the adapter to stop.
void bleio_adapter_advertising_was_stopped(bleio_adapter_obj_t *self) {
self->now_advertising = false;
self->extended_advertising = false;
self->circuitpython_advertising = false;
}
bool common_hal_bleio_adapter_get_advertising(bleio_adapter_obj_t *self) {
check_enabled(self);
return self->now_advertising;
}
bool common_hal_bleio_adapter_get_connected(bleio_adapter_obj_t *self) {
check_enabled(self);
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
bleio_connection_internal_t *connection = &bleio_connections[i];
if (connection->conn_handle != BLE_CONN_HANDLE_INVALID) {
return true;
}
}
return false;
}
mp_obj_t common_hal_bleio_adapter_get_connections(bleio_adapter_obj_t *self) {
check_enabled(self);
if (self->connection_objs != NULL) {
return self->connection_objs;
}
size_t total_connected = 0;
mp_obj_t items[BLEIO_TOTAL_CONNECTION_COUNT];
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
bleio_connection_internal_t *connection = &bleio_connections[i];
if (connection->conn_handle != BLE_CONN_HANDLE_INVALID) {
if (connection->connection_obj == mp_const_none) {
connection->connection_obj = bleio_connection_new_from_internal(connection);
}
items[total_connected] = connection->connection_obj;
total_connected++;
}
}
self->connection_objs = mp_obj_new_tuple(total_connected, items);
return self->connection_objs;
}
void common_hal_bleio_adapter_erase_bonding(bleio_adapter_obj_t *self) {
// TODO
mp_raise_NotImplementedError(NULL);
check_enabled(self);
//FIX bonding_erase_storage();
}
uint16_t bleio_adapter_add_attribute(bleio_adapter_obj_t *adapter, mp_obj_t *attribute) {
check_enabled(adapter);
// The handle is the index of this attribute in the attributes list.
uint16_t handle = (uint16_t) adapter->attributes->len;
mp_obj_list_append(adapter->attributes, attribute);
if (MP_OBJ_IS_TYPE(attribute, &bleio_service_type)) {
adapter->last_added_service_handle = handle;
}
if (MP_OBJ_IS_TYPE(attribute, &bleio_characteristic_type)) {
adapter->last_added_characteristic_handle = handle;
}
return handle;
}
mp_obj_t* bleio_adapter_get_attribute(bleio_adapter_obj_t *adapter, uint16_t handle) {
check_enabled(adapter);
if (handle == 0 || handle >= adapter->attributes->len) {
return mp_const_none;
}
return adapter->attributes->items[handle];
}
uint16_t bleio_adapter_max_attribute_handle(bleio_adapter_obj_t *adapter) {
check_enabled(adapter);
return adapter->attributes->len - 1;
}
void bleio_adapter_gc_collect(bleio_adapter_obj_t* adapter) {
gc_collect_root((void**)adapter, sizeof(bleio_adapter_obj_t) / sizeof(size_t));
gc_collect_root((void**)bleio_connections, sizeof(bleio_connections) / sizeof(size_t));
}
void bleio_adapter_reset(bleio_adapter_obj_t* adapter) {
if (!common_hal_bleio_adapter_get_enabled(adapter)) {
return;
}
// Adapter will be reset.
common_hal_bleio_adapter_set_enabled(adapter, false);
adapter->connection_objs = NULL;
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
bleio_connection_internal_t *connection = &bleio_connections[i];
// Disconnect all connections with Python state cleanly. Keep any supervisor-only connections.
if (connection->connection_obj != mp_const_none &&
connection->conn_handle != BLE_CONN_HANDLE_INVALID) {
common_hal_bleio_connection_disconnect(connection);
}
connection->connection_obj = mp_const_none;
}
}
void bleio_adapter_background(bleio_adapter_obj_t* adapter) {
if (!common_hal_bleio_adapter_get_enabled(adapter)) {
return;
}
if (adapter->advertising_timeout_msecs > 0 &&
supervisor_ticks_ms64() - adapter->advertising_start_ticks > adapter->advertising_timeout_msecs) {
adapter->advertising_timeout_msecs = 0;
common_hal_bleio_adapter_stop_advertising(adapter);
}
hci_result_t result = hci_poll_for_incoming_pkt();
if (result != HCI_OK) {
mp_printf(&mp_plat_print, "bad hci_poll_for_incoming_pkt() result in background: %d\n", result);
}
}

View File

@ -0,0 +1,99 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 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.
*/
#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ADAPTER_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ADAPTER_H
#include "py/obj.h"
#include "py/objtuple.h"
#include "shared-bindings/_bleio/Characteristic.h"
#include "shared-bindings/_bleio/Connection.h"
#include "shared-bindings/_bleio/ScanResults.h"
#include "shared-bindings/busio/UART.h"
#include "shared-bindings/digitalio/DigitalInOut.h"
#ifndef BLEIO_TOTAL_CONNECTION_COUNT
#define BLEIO_TOTAL_CONNECTION_COUNT 5
#endif
extern bleio_connection_internal_t bleio_connections[BLEIO_TOTAL_CONNECTION_COUNT];
typedef struct _bleio_adapter_obj_t {
mp_obj_base_t base;
bleio_scanresults_obj_t *scan_results;
mp_obj_t name;
mp_obj_tuple_t *connection_objs;
busio_uart_obj_t* hci_uart;
digitalio_digitalinout_obj_t *rts_digitalinout;
digitalio_digitalinout_obj_t *cts_digitalinout;
bool allocated; // True when in use.
bool now_advertising;
bool extended_advertising;
bool circuitpython_advertising;
bool enabled;
// HCI adapter version info.
uint8_t hci_version;
uint8_t lmp_version;
uint16_t hci_revision;
uint16_t manufacturer;
uint16_t lmp_subversion;
// Used to monitor advertising timeout for legacy avertising.
uint64_t advertising_start_ticks;
uint64_t advertising_timeout_msecs; // If zero, do not check.
// Generic services characteristics.
bleio_characteristic_obj_t *device_name_characteristic;
bleio_characteristic_obj_t *appearance_characteristic;
bleio_characteristic_obj_t * service_changed_characteristic;
uint16_t max_acl_buffer_len;
uint16_t max_acl_num_buffers;
uint16_t max_adv_data_len;
uint8_t features[8]; // Supported BLE features.
// All the local attributes for this device. The index into the list
// corresponds to the handle.
mp_obj_list_t *attributes;
// Handle for last added service. Characteristics can only be added immediately after
// the service they belong to. This vets that.
uint16_t last_added_service_handle;
uint16_t last_added_characteristic_handle;
} bleio_adapter_obj_t;
uint16_t bleio_adapter_add_attribute(bleio_adapter_obj_t *adapter, mp_obj_t *attribute);
void bleio_adapter_advertising_was_stopped(bleio_adapter_obj_t *self);
mp_obj_t* bleio_adapter_get_attribute(bleio_adapter_obj_t *adapter, uint16_t handle);
uint16_t bleio_adapter_max_attribute_handle(bleio_adapter_obj_t *adapter);
void bleio_adapter_background(bleio_adapter_obj_t* adapter);
void bleio_adapter_gc_collect(bleio_adapter_obj_t* adapter);
void bleio_adapter_reset(bleio_adapter_obj_t* adapter);
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ADAPTER_H

View File

@ -0,0 +1,49 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/runtime.h"
#include "shared-bindings/_bleio/Attribute.h"
#include "shared-bindings/_bleio/Characteristic.h"
#include "shared-bindings/_bleio/Descriptor.h"
#include "shared-bindings/_bleio/Service.h"
bleio_uuid_obj_t *bleio_attribute_get_uuid(mp_obj_t *attribute) {
if (MP_OBJ_IS_TYPE(attribute, &bleio_characteristic_type)) {
bleio_characteristic_obj_t *characteristic = MP_OBJ_TO_PTR(attribute);
return characteristic->uuid;
}
if (MP_OBJ_IS_TYPE(attribute, &bleio_descriptor_type)) {
bleio_descriptor_obj_t *descriptor = MP_OBJ_TO_PTR(attribute);
return descriptor->uuid;
}
if (MP_OBJ_IS_TYPE(attribute, &bleio_service_type)) {
bleio_service_obj_t *service = MP_OBJ_TO_PTR(attribute);
return service->uuid;
}
mp_raise_RuntimeError(translate("Invalid BLE attribute"));
}

View File

@ -0,0 +1,35 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ATTRIBUTE_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ATTRIBUTE_H
#include "shared-module/_bleio/Attribute.h"
#include "shared-bindings/_bleio/UUID.h"
bleio_uuid_obj_t *bleio_attribute_get_uuid(mp_obj_t *attribute);
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ATTRIBUTE_H

View File

@ -0,0 +1,228 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec
*
* 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 "shared-bindings/_bleio/__init__.h"
#include "shared-bindings/_bleio/Characteristic.h"
#include "shared-bindings/_bleio/CharacteristicBuffer.h"
#include "shared-bindings/_bleio/Descriptor.h"
#include "shared-bindings/_bleio/PacketBuffer.h"
#include "shared-bindings/_bleio/Service.h"
#include "common-hal/_bleio/Adapter.h"
#include "common-hal/_bleio/att.h"
#define CCCD_NOTIFY 0x1
#define CCCD_INDICATE 0x2
void common_hal_bleio_characteristic_construct(bleio_characteristic_obj_t *self, bleio_service_obj_t *service, uint16_t handle, bleio_uuid_obj_t *uuid, bleio_characteristic_properties_t props, 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) {
self->service = service;
self->uuid = uuid;
self->decl_handle = BLE_GATT_HANDLE_INVALID;
self->handle = BLE_GATT_HANDLE_INVALID;
self->props = props;
self->read_perm = read_perm;
self->write_perm = write_perm;
self->descriptor_list = mp_obj_new_list(0, NULL);
self->observer = mp_const_none;
self->user_desc = NULL;
self->cccd = NULL;
self->sccd = NULL;
self->value = mp_obj_new_bytes(initial_value_bufinfo->buf, initial_value_bufinfo->len);
const mp_int_t max_length_max = 512;
if (max_length < 0 || max_length > max_length_max) {
mp_raise_ValueError(translate("max_length must be <= 512"));
}
self->max_length = max_length;
self->fixed_length = fixed_length;
if (service->is_remote) {
self->handle = handle;
} else {
common_hal_bleio_service_add_characteristic(self->service, self, initial_value_bufinfo);
}
}
mp_obj_tuple_t *common_hal_bleio_characteristic_get_descriptors(bleio_characteristic_obj_t *self) {
return mp_obj_new_tuple(self->descriptor_list->len, self->descriptor_list->items);
}
bleio_service_obj_t *common_hal_bleio_characteristic_get_service(bleio_characteristic_obj_t *self) {
return self->service;
}
size_t common_hal_bleio_characteristic_get_value(bleio_characteristic_obj_t *self, uint8_t* buf, size_t len) {
// Do GATT operations only if this characteristic has been added to a registered service.
if (self->handle != BLE_GATT_HANDLE_INVALID) {
//FIX uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection);
if (common_hal_bleio_service_get_is_remote(self->service)) {
//FIX read remote chars
//uint8_t rsp[MAX(len, 512)];
//FIX improve att_read_req to write into our requested buffer.
// return att_read_req(conn_handle, self->handle, rsp);
return 0; //FIX
} else {
mp_buffer_info_t bufinfo;
if (!mp_get_buffer(self->value, &bufinfo, MP_BUFFER_READ)) {
return 0;
}
const size_t actual_length = MIN(len, bufinfo.len);
memcpy(buf, bufinfo.buf, actual_length);
return actual_length;
}
}
return 0;
}
void common_hal_bleio_characteristic_set_value(bleio_characteristic_obj_t *self, mp_buffer_info_t *bufinfo) {
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"));
}
// Do GATT operations only if this characteristic has been added to a registered service.
if (self->handle != BLE_GATT_HANDLE_INVALID) {
if (common_hal_bleio_service_get_is_remote(self->service)) {
//FIX uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection);
if (self->props & CHAR_PROP_WRITE) {
//FIX writing remote chars
//uint8_t rsp[sizeof(bt_att_error_rsp)];
//att_write_req(conn_handle, self->handle, bufinfo->buf, bufinfo->len, rsp);
} else if (self->props & CHAR_PROP_WRITE_NO_RESPONSE) {
//att_write_cmd(conn_handle, self->handle, bufinfo->buff, bufinfo->len);
} else {
mp_raise_bleio_BluetoothError(translate("Characteristic not writable"));
}
} else {
// Always write the value locally even if no connections are active.
bleio_characteristic_set_local_value(self, bufinfo);
// Notify or indicate all active connections.
uint16_t cccd_value = 0;
mp_buffer_info_t cccd_bufinfo = {
.buf = &cccd_value,
.len = sizeof(cccd_value),
};
const bool notify = self->props & CHAR_PROP_NOTIFY;
const bool indicate = self->props & CHAR_PROP_INDICATE;
// Read the CCCD value, if there is one.
if ((notify | indicate) && self->cccd != NULL) {
common_hal_bleio_descriptor_get_value(self->cccd, cccd_bufinfo.buf, cccd_bufinfo.len);
}
// It's possible that both notify and indicate are set.
if (notify && (cccd_value & CCCD_NOTIFY)) {
att_notify(self->handle, bufinfo->buf, MIN(bufinfo->len, self->max_length));
}
if (indicate && (cccd_value & CCCD_INDICATE)) {
att_indicate(self->handle, bufinfo->buf, MIN(bufinfo->len, self->max_length));
}
}
}
}
bleio_uuid_obj_t *common_hal_bleio_characteristic_get_uuid(bleio_characteristic_obj_t *self) {
return self->uuid;
}
bleio_characteristic_properties_t common_hal_bleio_characteristic_get_properties(bleio_characteristic_obj_t *self) {
return self->props;
}
void common_hal_bleio_characteristic_add_descriptor(bleio_characteristic_obj_t *self, bleio_descriptor_obj_t *descriptor) {
if (self->handle != common_hal_bleio_adapter_obj.last_added_characteristic_handle) {
mp_raise_bleio_BluetoothError(
translate("Descriptor can only be added to most recently added characteristic"));
}
descriptor->handle = bleio_adapter_add_attribute(&common_hal_bleio_adapter_obj, MP_OBJ_TO_PTR(descriptor));
// Include this descriptor in the service handle's range.
self->service->end_handle = descriptor->handle;
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) {
if (self->cccd == NULL) {
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 ? CCCD_NOTIFY : 0) |
(indicate ? CCCD_INDICATE : 0);
//FIX do remote
(void) cccd_value;
// uint8_t rsp[sizeof(bt_att_error_rsp)];
// if (att_write_req(conn_handle, self->cccd->handle, &cccd_value, sizeof(cccd_value)) == 0) {
// mp_raise_bleio_BluetoothError(translate("Could not write CCCD"));
// }
}
bool bleio_characteristic_set_local_value(bleio_characteristic_obj_t *self, mp_buffer_info_t *bufinfo) {
if (self->fixed_length && bufinfo->len != self->max_length) {
return false;
}
if (bufinfo->len > self->max_length) {
return false;
}
self->value = mp_obj_new_bytes(bufinfo->buf, bufinfo->len);
if (MP_OBJ_IS_TYPE(self->observer, &bleio_characteristic_buffer_type)) {
bleio_characteristic_buffer_update(MP_OBJ_FROM_PTR(self->observer), bufinfo);
} else if (MP_OBJ_IS_TYPE(self->observer, &bleio_packet_buffer_type)) {
bleio_packet_buffer_update(MP_OBJ_FROM_PTR(self->observer), bufinfo);
} else {
return false;
}
return true;
}
void bleio_characteristic_set_observer(bleio_characteristic_obj_t *self, mp_obj_t observer) {
self->observer = observer;
}
void bleio_characteristic_clear_observer(bleio_characteristic_obj_t *self) {
self->observer = mp_const_none;
}

View File

@ -0,0 +1,63 @@
/*
* 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
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTIC_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTIC_H
#include "shared-bindings/_bleio/Attribute.h"
#include "common-hal/_bleio/Descriptor.h"
#include "shared-module/_bleio/Characteristic.h"
#include "common-hal/_bleio/Service.h"
#include "common-hal/_bleio/UUID.h"
typedef struct _bleio_characteristic_obj {
mp_obj_base_t base;
// Will be MP_OBJ_NULL before being assigned to a Service.
bleio_service_obj_t *service;
bleio_uuid_obj_t *uuid;
mp_obj_t value;
mp_obj_t observer;
mp_obj_list_t *descriptor_list;
uint16_t max_length;
bool fixed_length;
uint16_t decl_handle;
uint16_t handle; // Should be decl_handle+1.
bleio_characteristic_properties_t props;
bleio_attribute_security_mode_t read_perm;
bleio_attribute_security_mode_t write_perm;
bleio_descriptor_obj_t *descriptor_linked_list;
bleio_descriptor_obj_t *user_desc;
bleio_descriptor_obj_t *cccd;
bleio_descriptor_obj_t *sccd;
} bleio_characteristic_obj_t;
bool bleio_characteristic_set_local_value(bleio_characteristic_obj_t *self, mp_buffer_info_t *bufinfo);
void bleio_characteristic_set_observer(bleio_characteristic_obj_t *self, mp_obj_t observer);
void bleio_characteristic_clear_observer(bleio_characteristic_obj_t *self);
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTIC_H

View File

@ -0,0 +1,104 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Dan Halbert 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 <string.h>
#include <stdio.h>
#include "lib/utils/interrupt_char.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "shared-bindings/_bleio/__init__.h"
#include "shared-bindings/_bleio/Connection.h"
#include "supervisor/shared/tick.h"
#include "common-hal/_bleio/CharacteristicBuffer.h"
// Push all the data onto the ring buffer. When the buffer is full, new bytes will be dropped.
STATIC void write_to_ringbuf(bleio_characteristic_buffer_obj_t *self, uint8_t *data, uint16_t len) {
ringbuf_put_n(&self->ringbuf, data, len);
}
void bleio_characteristic_buffer_update(bleio_characteristic_buffer_obj_t *self, mp_buffer_info_t *bufinfo) {
write_to_ringbuf(self, bufinfo->buf, bufinfo->len);
}
// Assumes that timeout and buffer_size have been validated before call.
void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self,
bleio_characteristic_obj_t *characteristic,
mp_float_t timeout,
size_t buffer_size) {
self->characteristic = characteristic;
self->timeout_ms = timeout * 1000;
// This is a macro.
// true means long-lived, so it won't be moved.
ringbuf_alloc(&self->ringbuf, buffer_size, true);
bleio_characteristic_set_observer(characteristic, self);
}
uint32_t common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_t *self, uint8_t *data, size_t len, int *errcode) {
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;
}
uint32_t common_hal_bleio_characteristic_buffer_rx_characters_available(bleio_characteristic_buffer_obj_t *self) {
uint16_t count = ringbuf_num_filled(&self->ringbuf);
return count;
}
void common_hal_bleio_characteristic_buffer_clear_rx_buffer(bleio_characteristic_buffer_obj_t *self) {
ringbuf_clear(&self->ringbuf);
}
bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer_obj_t *self) {
return self->characteristic == NULL;
}
void common_hal_bleio_characteristic_buffer_deinit(bleio_characteristic_buffer_obj_t *self) {
if (!common_hal_bleio_characteristic_buffer_deinited(self)) {
bleio_characteristic_clear_observer(self->characteristic);
}
}
bool common_hal_bleio_characteristic_buffer_connected(bleio_characteristic_buffer_obj_t *self) {
return self->characteristic != NULL &&
self->characteristic->service != NULL &&
(!self->characteristic->service->is_remote ||
(self->characteristic->service->connection != MP_OBJ_NULL &&
common_hal_bleio_connection_get_connected(self->characteristic->service->connection)));
}

View File

@ -0,0 +1,43 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTICBUFFER_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTICBUFFER_H
#include "py/ringbuf.h"
#include "shared-bindings/_bleio/Characteristic.h"
typedef struct {
mp_obj_base_t base;
bleio_characteristic_obj_t *characteristic;
uint32_t timeout_ms;
// Ring buffer storing consecutive incoming values.
ringbuf_t ringbuf;
} bleio_characteristic_buffer_obj_t;
void bleio_characteristic_buffer_update(bleio_characteristic_buffer_obj_t *self, mp_buffer_info_t *bufinfo);
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTICBUFFER_H

View File

@ -0,0 +1,772 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec
*
* 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 "shared-bindings/_bleio/Connection.h"
#include "att.h"
#include <string.h>
#include <stdio.h>
#include "lib/utils/interrupt_char.h"
#include "py/gc.h"
#include "py/objlist.h"
#include "py/objstr.h"
#include "py/qstr.h"
#include "py/runtime.h"
#include "shared-bindings/_bleio/__init__.h"
#include "shared-bindings/_bleio/Adapter.h"
#include "shared-bindings/_bleio/Attribute.h"
#include "shared-bindings/_bleio/Characteristic.h"
#include "shared-bindings/_bleio/Service.h"
#include "shared-bindings/_bleio/UUID.h"
#include "supervisor/shared/tick.h"
#define BLE_ADV_LENGTH_FIELD_SIZE 1
#define BLE_ADV_AD_TYPE_FIELD_SIZE 1
#define BLE_AD_TYPE_FLAGS_DATA_SIZE 1
// static const ble_gap_sec_params_t pairing_sec_params = {
// .bond = 1,
// .mitm = 0,
// .lesc = 0,
// .keypress = 0,
// .oob = 0,
// .io_caps = BLE_GAP_IO_CAPS_NONE,
// .min_key_size = 7,
// .max_key_size = 16,
// .kdist_own = { .enc = 1, .id = 1},
// .kdist_peer = { .enc = 1, .id = 1},
// };
#define CONNECTION_DEBUG (1)
#if CONNECTION_DEBUG
#define CONNECTION_DEBUG_PRINTF(...) printf(__VA_ARGS__)
#else
#define CONNECTION_DEBUG_PRINTF(...)
#endif
static volatile bool m_discovery_in_process;
static volatile bool m_discovery_successful;
//FIX static bleio_service_obj_t *m_char_discovery_service;
//FIX static bleio_characteristic_obj_t *m_desc_discovery_characteristic;
// bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
// bleio_connection_internal_t *self = (bleio_connection_internal_t*)self_in;
// if (BLE_GAP_EVT_BASE <= ble_evt->header.evt_id && ble_evt->header.evt_id <= BLE_GAP_EVT_LAST &&
// ble_evt->evt.gap_evt.conn_handle != self->conn_handle) {
// return false;
// }
// if (BLE_GATTS_EVT_BASE <= ble_evt->header.evt_id && ble_evt->header.evt_id <= BLE_GATTS_EVT_LAST &&
// ble_evt->evt.gatts_evt.conn_handle != self->conn_handle) {
// return false;
// }
// switch (ble_evt->header.evt_id) {
// case BLE_GAP_EVT_DISCONNECTED:
// // Adapter.c does the work for this event.
// break;
// case BLE_GAP_EVT_PHY_UPDATE_REQUEST: {
// ble_gap_phys_t const phys = {
// .rx_phys = BLE_GAP_PHY_AUTO,
// .tx_phys = BLE_GAP_PHY_AUTO,
// };
// sd_ble_gap_phy_update(ble_evt->evt.gap_evt.conn_handle, &phys);
// break;
// }
// case BLE_GAP_EVT_PHY_UPDATE: { // 0x22
// break;
// }
// case BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST:
// // SoftDevice will respond to a length update request.
// sd_ble_gap_data_length_update(self->conn_handle, NULL, NULL);
// break;
// case BLE_GAP_EVT_DATA_LENGTH_UPDATE: { // 0x24
// break;
// }
// case BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST: {
// ble_gatts_evt_exchange_mtu_request_t *request =
// &ble_evt->evt.gatts_evt.params.exchange_mtu_request;
// uint16_t new_mtu = BLE_GATTS_VAR_ATTR_LEN_MAX;
// if (request->client_rx_mtu < new_mtu) {
// new_mtu = request->client_rx_mtu;
// }
// if (new_mtu < BLE_GATT_ATT_MTU_DEFAULT) {
// new_mtu = BLE_GATT_ATT_MTU_DEFAULT;
// }
// if (self->mtu > 0) {
// new_mtu = self->mtu;
// }
// self->mtu = new_mtu;
// sd_ble_gatts_exchange_mtu_reply(self->conn_handle, new_mtu);
// break;
// }
// case BLE_GATTC_EVT_EXCHANGE_MTU_RSP: {
// ble_gattc_evt_exchange_mtu_rsp_t *response =
// &ble_evt->evt.gattc_evt.params.exchange_mtu_rsp;
// self->mtu = response->server_rx_mtu;
// break;
// }
// case BLE_GATTS_EVT_WRITE:
// // A client wrote a value.
// // If we are bonded and it's a CCCD (UUID 0x2902), store the CCCD value.
// if (self->conn_handle != BLE_CONN_HANDLE_INVALID &&
// self->pair_status == PAIR_PAIRED &&
// ble_evt->evt.gatts_evt.params.write.uuid.type == BLE_UUID_TYPE_BLE &&
// ble_evt->evt.gatts_evt.params.write.uuid.uuid == 0x2902) {
// //
// // Save sys_attr data (CCCD state) in bonding area at
// // next opportunity, but also remember time of this
// // request, so we can consolidate closely-spaced requests.
// self->do_bond_cccds = true;
// self->do_bond_cccds_request_time = supervisor_ticks_ms64();
// }
// // Return false so other handlers get this event as well.
// return false;
// case BLE_GATTS_EVT_SYS_ATTR_MISSING:
// sd_ble_gatts_sys_attr_set(self->conn_handle, NULL, 0, 0);
// break;
// #if CIRCUITPY_VERBOSE_BLE
// // Use read authorization to snoop on all reads when doing verbose debugging.
// case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: {
// ble_gatts_evt_rw_authorize_request_t *request =
// &ble_evt->evt.gatts_evt.params.authorize_request;
// mp_printf(&mp_plat_print, "Read %x offset %d ", request->request.read.handle, request->request.read.offset);
// uint8_t value_bytes[22];
// ble_gatts_value_t value;
// value.offset = request->request.read.offset;
// value.len = 22;
// value.p_value = value_bytes;
// sd_ble_gatts_value_get(self->conn_handle, request->request.read.handle, &value);
// size_t len = value.len;
// if (len > 22) {
// len = 22;
// }
// for (uint8_t i = 0; i < len; i++) {
// mp_printf(&mp_plat_print, " %02x", value_bytes[i]);
// }
// mp_printf(&mp_plat_print, "\n");
// ble_gatts_rw_authorize_reply_params_t reply;
// reply.type = request->type;
// reply.params.read.gatt_status = BLE_GATT_STATUS_SUCCESS;
// reply.params.read.update = false;
// reply.params.read.offset = request->request.read.offset;
// sd_ble_gatts_rw_authorize_reply(self->conn_handle, &reply);
// break;
// }
// #endif
// case BLE_GATTS_EVT_HVN_TX_COMPLETE: // Capture this for now. 0x55
// break;
// case BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST: {
// self->conn_params_updating = true;
// ble_gap_evt_conn_param_update_request_t *request =
// &ble_evt->evt.gap_evt.params.conn_param_update_request;
// sd_ble_gap_conn_param_update(self->conn_handle, &request->conn_params);
// break;
// }
// case BLE_GAP_EVT_CONN_PARAM_UPDATE: { // 0x12
// ble_gap_evt_conn_param_update_t *result =
// &ble_evt->evt.gap_evt.params.conn_param_update;
// #if CIRCUITPY_VERBOSE_BLE
// ble_gap_conn_params_t *cp = &ble_evt->evt.gap_evt.params.conn_param_update.conn_params;
// mp_printf(&mp_plat_print, "conn params updated: min_ci %d max_ci %d s_l %d sup_timeout %d\n", cp->min_conn_interval, cp->max_conn_interval, cp->slave_latency, cp->conn_sup_timeout);
// #endif
// memcpy(&self->conn_params, &result->conn_params, sizeof(ble_gap_conn_params_t));
// self->conn_params_updating = false;
// break;
// }
// case BLE_GAP_EVT_SEC_PARAMS_REQUEST: {
// // First time pairing.
// // 1. Either we or peer initiate the process
// // 2. Peer asks for security parameters using BLE_GAP_EVT_SEC_PARAMS_REQUEST.
// // 3. Pair Key exchange ("just works" implemented now; TODO: out-of-band key pairing)
// // 4. Connection is secured: BLE_GAP_EVT_CONN_SEC_UPDATE
// // 5. Long-term Keys exchanged: BLE_GAP_EVT_AUTH_STATUS
// bonding_clear_keys(&self->bonding_keys);
// self->ediv = EDIV_INVALID;
// ble_gap_sec_keyset_t keyset = {
// .keys_own = {
// .p_enc_key = &self->bonding_keys.own_enc,
// .p_id_key = NULL,
// .p_sign_key = NULL,
// .p_pk = NULL
// },
// .keys_peer = {
// .p_enc_key = &self->bonding_keys.peer_enc,
// .p_id_key = &self->bonding_keys.peer_id,
// .p_sign_key = NULL,
// .p_pk = NULL
// }
// };
// sd_ble_gap_sec_params_reply(self->conn_handle, BLE_GAP_SEC_STATUS_SUCCESS,
// self->is_central ? NULL : &pairing_sec_params,
// &keyset);
// break;
// }
// case BLE_GAP_EVT_LESC_DHKEY_REQUEST:
// // TODO for LESC pairing:
// // sd_ble_gap_lesc_dhkey_reply(...);
// break;
// case BLE_GAP_EVT_AUTH_STATUS: { // 0x19
// // Key exchange completed.
// ble_gap_evt_auth_status_t* status = &ble_evt->evt.gap_evt.params.auth_status;
// self->sec_status = status->auth_status;
// if (status->auth_status == BLE_GAP_SEC_STATUS_SUCCESS) {
// self->ediv = self->bonding_keys.own_enc.master_id.ediv;
// self->pair_status = PAIR_PAIRED;
// // Save keys in bonding area at next opportunity.
// self->do_bond_keys = true;
// } else {
// // Inform busy-waiter pairing has failed.
// self->pair_status = PAIR_NOT_PAIRED;
// }
// break;
// }
// case BLE_GAP_EVT_SEC_INFO_REQUEST: { // 0x14
// // Peer asks for the stored keys.
// // - load key and return if bonded previously.
// // - Else return NULL --> Initiate key exchange
// ble_gap_evt_sec_info_request_t* sec_info_request = &ble_evt->evt.gap_evt.params.sec_info_request;
// (void) sec_info_request;
// if ( bonding_load_keys(self->is_central, sec_info_request->master_id.ediv, &self->bonding_keys) ) {
// sd_ble_gap_sec_info_reply(
// self->conn_handle,
// &self->bonding_keys.own_enc.enc_info,
// &self->bonding_keys.peer_id.id_info,
// NULL);
// self->ediv = self->bonding_keys.own_enc.master_id.ediv;
// } else {
// // We don't have stored keys. Ask for keys.
// sd_ble_gap_sec_info_reply(self->conn_handle, NULL, NULL, NULL);
// }
// break;
// }
// case BLE_GAP_EVT_CONN_SEC_UPDATE: { // 0x1a
// // We get this both on first-time pairing and on subsequent pairings using stored keys.
// ble_gap_conn_sec_t* conn_sec = &ble_evt->evt.gap_evt.params.conn_sec_update.conn_sec;
// if (conn_sec->sec_mode.sm <= 1 && conn_sec->sec_mode.lv <= 1) {
// // Security setup did not succeed:
// // mode 0, level 0 means no access
// // mode 1, level 1 means open link
// // mode >=1 and/or level >=1 means encryption is set up
// self->pair_status = PAIR_NOT_PAIRED;
// } else {
// if (bonding_load_cccd_info(self->is_central, self->conn_handle, self->ediv)) {
// // Did an sd_ble_gatts_sys_attr_set() with the stored sys_attr values.
// } else {
// // No matching bonding found, so use fresh system attributes.
// sd_ble_gatts_sys_attr_set(self->conn_handle, NULL, 0, 0);
// }
// self->pair_status = PAIR_PAIRED;
// }
// break;
// }
// default:
// return false;
// }
// return true;
// }
void bleio_connection_clear(bleio_connection_internal_t *self) {
mp_obj_list_clear(MP_OBJ_FROM_PTR(self->remote_service_list));
self->conn_handle = BLE_CONN_HANDLE_INVALID;
self->pair_status = PAIR_NOT_PAIRED;
self->is_central = false;
//FIX bonding_clear_keys(&self->bonding_keys);
}
bool common_hal_bleio_connection_get_paired(bleio_connection_obj_t *self) {
if (self->connection == NULL) {
return false;
}
return self->connection->pair_status == PAIR_PAIRED;
}
bool common_hal_bleio_connection_get_connected(bleio_connection_obj_t *self) {
if (self->connection == NULL) {
return false;
}
return self->connection->conn_handle != BLE_CONN_HANDLE_INVALID;
}
void common_hal_bleio_connection_disconnect(bleio_connection_internal_t *self) {
hci_disconnect(self->conn_handle);
}
void common_hal_bleio_connection_pair(bleio_connection_internal_t *self, bool bond) {
self->pair_status = PAIR_WAITING;
//FIX check_nrf_error(sd_ble_gap_authenticate(self->conn_handle, &pairing_sec_params));
while (self->pair_status == PAIR_WAITING && !mp_hal_is_interrupted()) {
RUN_BACKGROUND_TASKS;
}
if (mp_hal_is_interrupted()) {
return;
}
//FIX check_sec_status(self->sec_status);
}
mp_float_t common_hal_bleio_connection_get_connection_interval(bleio_connection_internal_t *self) {
while (self->conn_params_updating && !mp_hal_is_interrupted()) {
RUN_BACKGROUND_TASKS;
}
//FIX return 1.25f * self->conn_params.min_conn_interval;
return 0.0f;
}
// Return the current negotiated MTU length, minus overhead.
mp_int_t common_hal_bleio_connection_get_max_packet_length(bleio_connection_internal_t *self) {
return (self->mtu == 0 ? BT_ATT_DEFAULT_LE_MTU : self->mtu) - 3;
}
void common_hal_bleio_connection_set_connection_interval(bleio_connection_internal_t *self, mp_float_t new_interval) {
// self->conn_params_updating = true;
// uint16_t interval = new_interval / 1.25f;
// self->conn_params.min_conn_interval = interval;
// self->conn_params.max_conn_interval = interval;
// uint32_t status = NRF_ERROR_BUSY;
// while (status == NRF_ERROR_BUSY) {
// status = sd_ble_gap_conn_param_update(self->conn_handle, &self->conn_params);
// RUN_BACKGROUND_TASKS;
// }
// check_nrf_error(status);
}
// service_uuid may be NULL, to discover all services.
// STATIC bool discover_next_services(bleio_connection_internal_t* connection, uint16_t start_handle, ble_uuid_t *service_uuid) {
// m_discovery_successful = false;
// m_discovery_in_process = true;
// uint32_t nrf_err = NRF_ERROR_BUSY;
// while (nrf_err == NRF_ERROR_BUSY) {
// nrf_err = sd_ble_gattc_primary_services_discover(connection->conn_handle, start_handle, service_uuid);
// }
// check_nrf_error(nrf_err);
// // Wait for a discovery event.
// while (m_discovery_in_process) {
// MICROPY_VM_HOOK_LOOP;
// }
// return m_discovery_successful;
// }
// STATIC bool discover_next_characteristics(bleio_connection_internal_t* connection, bleio_service_obj_t *service, uint16_t start_handle) {
// m_char_discovery_service = service;
// ble_gattc_handle_range_t handle_range;
// handle_range.start_handle = start_handle;
// handle_range.end_handle = service->end_handle;
// m_discovery_successful = false;
// m_discovery_in_process = true;
// uint32_t err_code = sd_ble_gattc_characteristics_discover(connection->conn_handle, &handle_range);
// if (err_code != NRF_SUCCESS) {
// return false;
// }
// // Wait for a discovery event.
// while (m_discovery_in_process) {
// MICROPY_VM_HOOK_LOOP;
// }
// return m_discovery_successful;
// }
// STATIC bool discover_next_descriptors(bleio_connection_internal_t* connection, bleio_characteristic_obj_t *characteristic, uint16_t start_handle, uint16_t end_handle) {
// m_desc_discovery_characteristic = characteristic;
// ble_gattc_handle_range_t handle_range;
// handle_range.start_handle = start_handle;
// handle_range.end_handle = end_handle;
// m_discovery_successful = false;
// m_discovery_in_process = true;
// uint32_t err_code = sd_ble_gattc_descriptors_discover(connection->conn_handle, &handle_range);
// if (err_code != NRF_SUCCESS) {
// return false;
// }
// // Wait for a discovery event.
// while (m_discovery_in_process) {
// MICROPY_VM_HOOK_LOOP;
// }
// return m_discovery_successful;
// }
// STATIC void on_primary_srv_discovery_rsp(ble_gattc_evt_prim_srvc_disc_rsp_t *response, bleio_connection_internal_t* connection) {
// for (size_t i = 0; i < response->count; ++i) {
// ble_gattc_service_t *gattc_service = &response->services[i];
// bleio_service_obj_t *service = m_new_obj(bleio_service_obj_t);
// service->base.type = &bleio_service_type;
// // Initialize several fields at once.
// bleio_service_from_connection(service, bleio_connection_new_from_internal(connection));
// service->is_remote = true;
// service->start_handle = gattc_service->handle_range.start_handle;
// service->end_handle = gattc_service->handle_range.end_handle;
// service->handle = gattc_service->handle_range.start_handle;
// if (gattc_service->uuid.type != BLE_UUID_TYPE_UNKNOWN) {
// // Known service UUID.
// bleio_uuid_obj_t *uuid = m_new_obj(bleio_uuid_obj_t);
// uuid->base.type = &bleio_uuid_type;
// bleio_uuid_construct_from_nrf_ble_uuid(uuid, &gattc_service->uuid);
// service->uuid = uuid;
// } else {
// // The discovery response contained a 128-bit UUID that has not yet been registered with the
// // softdevice via sd_ble_uuid_vs_add(). We need to fetch the 128-bit value and register it.
// // For now, just set the UUID to NULL.
// service->uuid = NULL;
// }
//
// mp_obj_list_append(MP_OBJ_FROM_PTR(connection->remote_service_list),
// MP_OBJ_FROM_PTR(service));
// }
//
// if (response->count > 0) {
// m_discovery_successful = true;
// }
// m_discovery_in_process = false;
// }
// STATIC void on_char_discovery_rsp(ble_gattc_evt_char_disc_rsp_t *response, bleio_connection_internal_t* connection) {
// for (size_t i = 0; i < response->count; ++i) {
// ble_gattc_char_t *gattc_char = &response->chars[i];
// bleio_characteristic_obj_t *characteristic = m_new_obj(bleio_characteristic_obj_t);
// characteristic->base.type = &bleio_characteristic_type;
// bleio_uuid_obj_t *uuid = NULL;
// if (gattc_char->uuid.type != BLE_UUID_TYPE_UNKNOWN) {
// // Known characteristic UUID.
// uuid = m_new_obj(bleio_uuid_obj_t);
// uuid->base.type = &bleio_uuid_type;
// bleio_uuid_construct_from_nrf_ble_uuid(uuid, &gattc_char->uuid);
// } else {
// // The discovery response contained a 128-bit UUID that has not yet been registered with the
// // softdevice via sd_ble_uuid_vs_add(). We need to fetch the 128-bit value and register it.
// // For now, just leave the UUID as NULL.
// }
// bleio_characteristic_properties_t props =
// (gattc_char->char_props.broadcast ? CHAR_PROP_BROADCAST : 0) |
// (gattc_char->char_props.indicate ? CHAR_PROP_INDICATE : 0) |
// (gattc_char->char_props.notify ? CHAR_PROP_NOTIFY : 0) |
// (gattc_char->char_props.read ? CHAR_PROP_READ : 0) |
// (gattc_char->char_props.write ? CHAR_PROP_WRITE : 0) |
// (gattc_char->char_props.write_wo_resp ? 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, m_char_discovery_service, gattc_char->handle_value, uuid,
// props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN,
// GATT_MAX_DATA_LENGTH, false, // max_length, fixed_length: values may not matter for gattc
// NULL);
// mp_obj_list_append(MP_OBJ_FROM_PTR(m_char_discovery_service->characteristic_list),
// MP_OBJ_FROM_PTR(characteristic));
// }
// if (response->count > 0) {
// m_discovery_successful = true;
// }
// m_discovery_in_process = false;
// }
// STATIC void on_desc_discovery_rsp(ble_gattc_evt_desc_disc_rsp_t *response, bleio_connection_internal_t* connection) {
// for (size_t i = 0; i < response->count; ++i) {
// ble_gattc_desc_t *gattc_desc = &response->descs[i];
// // Remember handles for certain well-known descriptors.
// switch (gattc_desc->uuid.uuid) {
// case BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG:
// m_desc_discovery_characteristic->cccd_handle = gattc_desc->handle;
// break;
// case BLE_UUID_DESCRIPTOR_SERVER_CHAR_CONFIG:
// m_desc_discovery_characteristic->sccd_handle = gattc_desc->handle;
// break;
// case BLE_UUID_DESCRIPTOR_CHAR_USER_DESC:
// m_desc_discovery_characteristic->user_desc_handle = gattc_desc->handle;
// break;
// default:
// // TODO: sd_ble_gattc_descriptors_discover() can return things that are not descriptors,
// // so ignore those.
// // https://devzone.nordicsemi.com/f/nordic-q-a/49500/sd_ble_gattc_descriptors_discover-is-returning-attributes-that-are-not-descriptors
// break;
// }
// bleio_descriptor_obj_t *descriptor = m_new_obj(bleio_descriptor_obj_t);
// descriptor->base.type = &bleio_descriptor_type;
// bleio_uuid_obj_t *uuid = NULL;
// if (gattc_desc->uuid.type != BLE_UUID_TYPE_UNKNOWN) {
// // Known descriptor UUID.
// uuid = m_new_obj(bleio_uuid_obj_t);
// uuid->base.type = &bleio_uuid_type;
// bleio_uuid_construct_from_nrf_ble_uuid(uuid, &gattc_desc->uuid);
// } else {
// // The discovery response contained a 128-bit UUID that has not yet been registered with the
// // softdevice via sd_ble_uuid_vs_add(). We need to fetch the 128-bit value and register it.
// // For now, just leave the UUID as NULL.
// }
// common_hal_bleio_descriptor_construct(
// descriptor, m_desc_discovery_characteristic, uuid,
// SECURITY_MODE_OPEN, SECURITY_MODE_OPEN,
// GATT_MAX_DATA_LENGTH, false, mp_const_empty_bytes);
// descriptor->handle = gattc_desc->handle;
// mp_obj_list_append(MP_OBJ_FROM_PTR(m_desc_discovery_characteristic->descriptor_list),
// MP_OBJ_FROM_PTR(descriptor));
// }
// if (response->count > 0) {
// m_discovery_successful = true;
// }
// m_discovery_in_process = false;
// }
// STATIC bool discovery_on_ble_evt(ble_evt_t *ble_evt, mp_obj_t payload) {
// bleio_connection_internal_t* connection = MP_OBJ_TO_PTR(payload);
// switch (ble_evt->header.evt_id) {
// case BLE_GAP_EVT_DISCONNECTED:
// m_discovery_successful = false;
// m_discovery_in_process = false;
// break;
// case BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP:
// on_primary_srv_discovery_rsp(&ble_evt->evt.gattc_evt.params.prim_srvc_disc_rsp, connection);
// break;
// case BLE_GATTC_EVT_CHAR_DISC_RSP:
// on_char_discovery_rsp(&ble_evt->evt.gattc_evt.params.char_disc_rsp, connection);
// break;
// case BLE_GATTC_EVT_DESC_DISC_RSP:
// on_desc_discovery_rsp(&ble_evt->evt.gattc_evt.params.desc_disc_rsp, connection);
// break;
// default:
// // CONNECTION_DEBUG_PRINTF(&mp_plat_print, "Unhandled discovery event: 0x%04x\n", ble_evt->header.evt_id);
// return false;
// break;
// }
// return true;
// }
// STATIC void discover_remote_services(bleio_connection_internal_t *self, mp_obj_t service_uuids_whitelist) {
// ble_drv_add_event_handler(discovery_on_ble_evt, self);
// // Start over with an empty list.
// self->remote_service_list = mp_obj_new_list(0, NULL);
// if (service_uuids_whitelist == mp_const_none) {
// // List of service UUID's not given, so discover all available services.
// uint16_t next_service_start_handle = BLE_GATT_HANDLE_START;
// while (discover_next_services(self, next_service_start_handle, MP_OBJ_NULL)) {
// // discover_next_services() appends to remote_services_list.
// // Get the most recently discovered service, and then ask for services
// // whose handles start after the last attribute handle inside that service.
// // There must be at least one if discover_next_services() returned true.
// const bleio_service_obj_t *service =
// self->remote_service_list->items[self->remote_service_list->len - 1];
// next_service_start_handle = service->end_handle + 1;
// }
// } 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);
// ble_uuid_t nrf_uuid;
// bleio_uuid_convert_to_nrf_ble_uuid(uuid, &nrf_uuid);
// // Service might or might not be discovered; that's ok. Caller has to check
// // Central.remote_services to find out.
// // We only need to call this once for each service to discover.
// discover_next_services(self, BLE_GATT_HANDLE_START, &nrf_uuid);
// }
// }
// 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]);
// // Skip the service if it had an unknown (unregistered) UUID.
// if (service->uuid == NULL) {
// continue;
// }
// uint16_t next_char_start_handle = service->start_handle;
// // Stop when we go past the end of the range of handles for this service or
// // discovery call returns nothing.
// // discover_next_characteristics() appends to the characteristic_list.
// while (next_char_start_handle <= service->end_handle &&
// discover_next_characteristics(self, service, next_char_start_handle)) {
// // Get the most recently discovered characteristic, and then ask for characteristics
// // whose handles start after the last attribute handle inside that characteristic.
// const bleio_characteristic_obj_t *characteristic =
// MP_OBJ_TO_PTR(service->characteristic_list->items[service->characteristic_list->len - 1]);
// next_char_start_handle = characteristic->handle + 1;
// }
// // 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]);
// 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]);
// // Skip the characteristic if it had an unknown (unregistered) UUID.
// if (characteristic->uuid == NULL) {
// continue;
// }
// uint16_t next_desc_start_handle = characteristic->handle + 1;
// // Don't run past the end of this service or the beginning of the next characteristic.
// uint16_t next_desc_end_handle = next_characteristic == NULL
// ? service->end_handle
// : next_characteristic->handle - 1;
// // Stop when we go past the end of the range of handles for this service or
// // discovery call returns nothing.
// // discover_next_descriptors() appends to the descriptor_linked_list.
// while (next_desc_start_handle <= service->end_handle &&
// next_desc_start_handle <= next_desc_end_handle &&
// discover_next_descriptors(self, characteristic,
// next_desc_start_handle, next_desc_end_handle)) {
// // Get the most recently discovered descriptor, and then ask for descriptors
// // whose handles start after that descriptor's handle.
// // There must be at least one if discover_next_descriptors() returned true.
// const bleio_descriptor_obj_t *descriptor =
// characteristic->descriptor_list->items[characteristic->descriptor_list->len - 1];
// next_desc_start_handle = descriptor->handle + 1;
// }
// }
// }
// // This event handler is no longer needed.
// ble_drv_remove_event_handler(discovery_on_ble_evt, self);
// }
mp_obj_tuple_t *common_hal_bleio_connection_discover_remote_services(bleio_connection_obj_t *self, mp_obj_t service_uuids_whitelist) {
//FIX 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 =
mp_obj_new_tuple(self->connection->remote_service_list->len,
self->connection->remote_service_list->items);
mp_obj_list_clear(MP_OBJ_FROM_PTR(self->connection->remote_service_list));
return services_tuple;
}
uint16_t bleio_connection_get_conn_handle(bleio_connection_obj_t *self) {
if (self == NULL || self->connection == NULL) {
return BLE_CONN_HANDLE_INVALID;
}
return self->connection->conn_handle;
}
mp_obj_t bleio_connection_new_from_internal(bleio_connection_internal_t* internal) {
if (internal->connection_obj != mp_const_none) {
return internal->connection_obj;
}
bleio_connection_obj_t *connection = m_new_obj(bleio_connection_obj_t);
connection->base.type = &bleio_connection_type;
connection->connection = internal;
internal->connection_obj = connection;
return MP_OBJ_FROM_PTR(connection);
}
// Find the connection that uses the given conn_handle. Return NULL if not found.
bleio_connection_internal_t *bleio_conn_handle_to_connection(uint16_t conn_handle) {
bleio_connection_internal_t *connection;
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
connection = &bleio_connections[i];
if (connection->conn_handle == conn_handle) {
return connection;
}
}
return NULL;
}

View File

@ -0,0 +1,89 @@
/*
* 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
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CONNECTION_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CONNECTION_H
#include <stdbool.h>
#include "py/obj.h"
#include "py/objlist.h"
#include "common-hal/_bleio/__init__.h"
#include "shared-module/_bleio/Address.h"
#include "common-hal/_bleio/Service.h"
typedef enum {
PAIR_NOT_PAIRED,
PAIR_WAITING,
PAIR_PAIRED,
} pair_status_t;
// We split the Connection object into two so that the internal mechanics can live outside of the
// VM. If it were one object, then we'd risk user code seeing a connection object of theirs be
// reused.
typedef struct {
uint16_t conn_handle;
bool is_central;
// Remote services discovered when this peripheral is acting as a client.
mp_obj_list_t *remote_service_list;
// The advertising data and scan response buffers are held by us, not by the SD, so we must
// maintain them and not change it. If we need to change the contents during advertising,
// there are tricks to get the SD to notice (see DevZone - TBS).
bonding_keys_t bonding_keys;
// EDIV: Encrypted Diversifier: Identifies LTK during legacy pairing.
uint16_t ediv;
volatile pair_status_t pair_status;
uint8_t sec_status; // Internal security status.
mp_obj_t connection_obj;
//REMOVE ble_gap_conn_params_t conn_params;
volatile bool conn_params_updating;
uint16_t mtu;
// Request that CCCD values for this connection be saved, using sys_attr values.
volatile bool do_bond_cccds;
// Request that security key info for this connection be saved.
volatile bool do_bond_keys;
// Time of setting do_bond_ccds: we delay a bit to consolidate multiple CCCD changes
// into one write. Time is currently in ticks_ms.
uint64_t do_bond_cccds_request_time;
//FIX from att.c
uint8_t role;
bt_addr_le_t addr;
} bleio_connection_internal_t;
typedef struct {
mp_obj_base_t base;
bleio_connection_internal_t* connection;
// The HCI disconnect reason.
uint8_t disconnect_reason;
} bleio_connection_obj_t;
uint16_t bleio_connection_get_conn_handle(bleio_connection_obj_t *self);
mp_obj_t bleio_connection_new_from_internal(bleio_connection_internal_t* connection);
bleio_connection_internal_t *bleio_conn_handle_to_connection(uint16_t conn_handle);
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CONNECTION_H

View File

@ -0,0 +1,114 @@
/*
* 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 "py/runtime.h"
#include "shared-bindings/_bleio/__init__.h"
#include "shared-bindings/_bleio/Descriptor.h"
#include "shared-bindings/_bleio/Service.h"
#include "shared-bindings/_bleio/UUID.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) {
self->characteristic = characteristic;
self->uuid = uuid;
self->handle = BLE_GATT_HANDLE_INVALID;
self->read_perm = read_perm;
self->write_perm = write_perm;
self->value = mp_obj_new_bytes(initial_value_bufinfo->buf, initial_value_bufinfo->len);
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");
}
self->max_length = max_length;
self->fixed_length = fixed_length;
common_hal_bleio_descriptor_set_value(self, initial_value_bufinfo);
}
bleio_uuid_obj_t *common_hal_bleio_descriptor_get_uuid(bleio_descriptor_obj_t *self) {
return self->uuid;
}
bleio_characteristic_obj_t *common_hal_bleio_descriptor_get_characteristic(bleio_descriptor_obj_t *self) {
return self->characteristic;
}
size_t common_hal_bleio_descriptor_get_value(bleio_descriptor_obj_t *self, uint8_t* buf, size_t len) {
// Do GATT operations only if this descriptor has been registered
if (self->handle != BLE_GATT_HANDLE_INVALID) {
if (common_hal_bleio_service_get_is_remote(self->characteristic->service)) {
//uint16_t conn_handle = bleio_connection_get_conn_handle(self->characteristic->service->connection);
//FIX have att_read_req fill in a buffer
//uint8_t rsp[MAX(len, 512)];
//return att_read_req(conn_handle, self->handle, rsp, len);
return 0;
} else {
mp_buffer_info_t bufinfo;
if (!mp_get_buffer(self->value, &bufinfo, MP_BUFFER_READ)) {
return 0;
}
const size_t actual_length = MIN(len, bufinfo.len);
memcpy(buf, bufinfo.buf, actual_length);
return actual_length;
}
}
return 0;
}
void common_hal_bleio_descriptor_set_value(bleio_descriptor_obj_t *self, mp_buffer_info_t *bufinfo) {
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"));
}
self->value = mp_obj_new_bytes(bufinfo->buf, bufinfo->len);
// Do GATT operations only if this descriptor has been registered.
if (self->handle != BLE_GATT_HANDLE_INVALID) {
if (common_hal_bleio_service_get_is_remote(self->characteristic->service)) {
//FIX
// uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection);
// att_write_req(conn_handle, self->handle, bufinfo->buf, bufinfo->len, rsp);
} else {
// Always write the value locally even if no connections are active.
if (self->fixed_length && bufinfo->len != self->max_length) {
return;
}
if (bufinfo->len > self->max_length) {
return;
}
self->value = mp_obj_new_bytes(bufinfo->buf, bufinfo->len);
}
}
}

View File

@ -0,0 +1,53 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 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.
*/
#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_DESCRIPTOR_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_DESCRIPTOR_H
#include "py/obj.h"
#include "common-hal/_bleio/UUID.h"
// Forward declare characteristic because it includes a Descriptor.
struct _bleio_characteristic_obj;
typedef struct _bleio_descriptor_obj {
mp_obj_base_t base;
// Will be MP_OBJ_NULL before being assigned to a Characteristic.
struct _bleio_characteristic_obj *characteristic;
bleio_uuid_obj_t *uuid;
mp_obj_t value;
uint16_t max_length;
bool fixed_length;
uint16_t handle;
bleio_attribute_security_mode_t read_perm;
bleio_attribute_security_mode_t write_perm;
struct _bleio_descriptor_obj* next;
} bleio_descriptor_obj_t;
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_DESCRIPTOR_H

View File

@ -0,0 +1,265 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019-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 <string.h>
#include <stdio.h>
#include "lib/utils/interrupt_char.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "shared-bindings/_bleio/__init__.h"
#include "shared-bindings/_bleio/Connection.h"
#include "shared-bindings/_bleio/PacketBuffer.h"
#include "supervisor/shared/tick.h"
STATIC void write_to_ringbuf(bleio_packet_buffer_obj_t *self, uint8_t *data, uint16_t len) {
if (len + sizeof(uint16_t) > ringbuf_capacity(&self->ringbuf)) {
// This shouldn't happen.
return;
}
// Push all the data onto the ring buffer.
// 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));
ringbuf_put_n(&self->ringbuf, data, len);
}
STATIC uint32_t 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) {
mp_buffer_info_t bufinfo = {
.buf = self->outgoing[self->pending_index],
.len = self->pending_size,
};
common_hal_bleio_characteristic_set_value(self->characteristic, &bufinfo);
self->pending_size = 0;
self->pending_index = (self->pending_index + 1) % 2;
self->packet_queued = true;
}
return 0;
}
void bleio_packet_buffer_update(bleio_packet_buffer_obj_t *self, mp_buffer_info_t *bufinfo) {
write_to_ringbuf(self, bufinfo->buf, bufinfo->len);
}
void common_hal_bleio_packet_buffer_construct(
bleio_packet_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic,
size_t buffer_size) {
self->characteristic = characteristic;
self->client = self->characteristic->service->is_remote;
bleio_characteristic_properties_t incoming =
self->characteristic->props & (CHAR_PROP_WRITE_NO_RESPONSE | CHAR_PROP_WRITE);
bleio_characteristic_properties_t outgoing =
self->characteristic->props & (CHAR_PROP_NOTIFY | CHAR_PROP_INDICATE);
if (self->client) {
// Swap if we're the client.
bleio_characteristic_properties_t temp = incoming;
incoming = outgoing;
outgoing = temp;
self->conn_handle = bleio_connection_get_conn_handle(MP_OBJ_TO_PTR(self->characteristic->service->connection));
} else {
self->conn_handle = BLE_CONN_HANDLE_INVALID;
}
if (incoming) {
if (!ringbuf_alloc(&self->ringbuf, buffer_size * (sizeof(uint16_t) + characteristic->max_length), false)) {
mp_raise_ValueError(translate("Buffer too large and unable to allocate"));
}
}
if (outgoing) {
self->packet_queued = false;
self->pending_index = 0;
self->pending_size = 0;
self->outgoing[0] = m_malloc(characteristic->max_length, false);
self->outgoing[1] = m_malloc(characteristic->max_length, false);
} else {
self->outgoing[0] = NULL;
self->outgoing[1] = NULL;
}
bleio_characteristic_set_observer(self->characteristic, self);
}
mp_int_t common_hal_bleio_packet_buffer_readinto(bleio_packet_buffer_obj_t *self, uint8_t *data, size_t len) {
if (ringbuf_num_filled(&self->ringbuf) < 2) {
return 0;
}
// Copy received data.
// 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, uint8_t *data, size_t len, uint8_t* header, size_t header_len) {
if (self->outgoing[0] == NULL) {
mp_raise_bleio_BluetoothError(translate("Writes not supported on Characteristic"));
}
if (self->conn_handle == BLE_CONN_HANDLE_INVALID) {
return -1;
}
uint16_t outgoing_packet_length = common_hal_bleio_packet_buffer_get_outgoing_packet_length(self);
if (len + header_len > outgoing_packet_length) {
// Supplied data will not fit in a single BLE packet.
mp_raise_ValueError(translate("Total data to write is larger than outgoing_packet_length"));
}
if (len + self->pending_size > outgoing_packet_length) {
// No room to append len bytes to packet. Wait until we get a free buffer,
// and keep checking that we haven't been disconnected.
while (self->pending_size != 0 && self->conn_handle != BLE_CONN_HANDLE_INVALID) {
RUN_BACKGROUND_TASKS;
}
}
if (self->conn_handle == BLE_CONN_HANDLE_INVALID) {
return -1;
}
size_t num_bytes_written = 0;
uint8_t* pending = self->outgoing[self->pending_index];
if (self->pending_size == 0) {
memcpy(pending, header, header_len);
self->pending_size += header_len;
num_bytes_written += header_len;
}
memcpy(pending + self->pending_size, data, len);
self->pending_size += len;
num_bytes_written += len;
// If no writes are queued then sneak in this data.
if (!self->packet_queued) {
queue_next_write(self);
}
return num_bytes_written;
}
mp_int_t common_hal_bleio_packet_buffer_get_incoming_packet_length(bleio_packet_buffer_obj_t *self) {
// If this PacketBuffer is coming from a remote service via NOTIFY or INDICATE
// the maximum size is what can be sent in one
// BLE packet. But we must be connected to know that value.
//
// Otherwise it can be as long as the characteristic
// will permit, whether or not we're connected.
if (self->characteristic == NULL) {
return -1;
}
if (self->characteristic->service != NULL &&
self->characteristic->service->is_remote &&
(common_hal_bleio_characteristic_get_properties(self->characteristic) &
(CHAR_PROP_INDICATE | CHAR_PROP_NOTIFY))) {
// We are talking to a remote service, and data is arriving via NOTIFY or INDICATE.
if (self->conn_handle != BLE_CONN_HANDLE_INVALID) {
bleio_connection_internal_t *connection = bleio_conn_handle_to_connection(self->conn_handle);
if (connection) {
return MIN(common_hal_bleio_connection_get_max_packet_length(connection),
self->characteristic->max_length);
}
}
// There's no current connection, so we don't know the MTU, and
// we can't tell what the largest incoming packet length would be.
return -1;
}
return self->characteristic->max_length;
}
mp_int_t common_hal_bleio_packet_buffer_get_outgoing_packet_length(bleio_packet_buffer_obj_t *self) {
// If we are sending data via NOTIFY or INDICATE, the maximum size
// is what can be sent in one BLE packet. But we must be connected
// to know that value.
//
// Otherwise it can be as long as the characteristic
// will permit, whether or not we're connected.
if (self->characteristic == NULL) {
return -1;
}
if (self->characteristic->service != NULL &&
!self->characteristic->service->is_remote &&
(common_hal_bleio_characteristic_get_properties(self->characteristic) &
(CHAR_PROP_INDICATE | CHAR_PROP_NOTIFY))) {
// We are sending to a client, via NOTIFY or INDICATE.
if (self->conn_handle != BLE_CONN_HANDLE_INVALID) {
bleio_connection_internal_t *connection = bleio_conn_handle_to_connection(self->conn_handle);
if (connection) {
return MIN(common_hal_bleio_connection_get_max_packet_length(connection),
self->characteristic->max_length);
}
}
// There's no current connection, so we don't know the MTU, and
// we can't tell what the largest outgoing packet length would be.
return -1;
}
return self->characteristic->max_length;
}
bool common_hal_bleio_packet_buffer_deinited(bleio_packet_buffer_obj_t *self) {
return self->characteristic == NULL;
}
void common_hal_bleio_packet_buffer_deinit(bleio_packet_buffer_obj_t *self) {
if (!common_hal_bleio_packet_buffer_deinited(self)) {
bleio_characteristic_clear_observer(self->characteristic);
}
}

View File

@ -0,0 +1,53 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019-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.
*/
#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_PACKETBUFFER_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_PACKETBUFFER_H
#include "py/ringbuf.h"
#include "shared-bindings/_bleio/Characteristic.h"
typedef struct {
mp_obj_base_t base;
bleio_characteristic_obj_t *characteristic;
// Ring buffer storing consecutive incoming values.
ringbuf_t ringbuf;
// Two outgoing buffers to alternate between. One will be queued for transmission by the SD and
// the other is waiting to be queued and can be extended.
uint8_t* outgoing[2];
volatile uint16_t pending_size;
// We remember the conn_handle so we can do a NOTIFY/INDICATE to a client.
// We can find out the conn_handle on a Characteristic write or a CCCD write (but not a read).
volatile uint16_t conn_handle;
uint8_t pending_index;
uint8_t write_type;
bool client;
bool packet_queued;
} bleio_packet_buffer_obj_t;
void bleio_packet_buffer_update(bleio_packet_buffer_obj_t *self, mp_buffer_info_t *bufinfo);
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_PACKETBUFFER_H

View File

@ -0,0 +1,129 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec
*
* 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 "shared-bindings/_bleio/__init__.h"
#include "shared-bindings/_bleio/Characteristic.h"
#include "shared-bindings/_bleio/Descriptor.h"
#include "shared-bindings/_bleio/Service.h"
#include "shared-bindings/_bleio/Adapter.h"
uint32_t _common_hal_bleio_service_construct(bleio_service_obj_t *self, bleio_uuid_obj_t *uuid, bool is_secondary, mp_obj_list_t * characteristic_list) {
self->uuid = uuid;
self->characteristic_list = characteristic_list;
self->is_remote = false;
self->connection = NULL;
self->is_secondary = is_secondary;
vm_used_ble = true;
self->handle = bleio_adapter_add_attribute(&common_hal_bleio_adapter_obj, MP_OBJ_TO_PTR(self));
self->start_handle = self->handle;
self->end_handle = self->handle;
if (self->handle == BLE_GATT_HANDLE_INVALID) {
return 1;
}
return 0;
}
void common_hal_bleio_service_construct(bleio_service_obj_t *self, bleio_uuid_obj_t *uuid, bool is_secondary) {
if (_common_hal_bleio_service_construct(self, uuid, is_secondary,
mp_obj_new_list(0, NULL)) != 0) {
mp_raise_RuntimeError(translate("Failed to add service"));
}
}
void bleio_service_from_connection(bleio_service_obj_t *self, mp_obj_t connection) {
self->handle = 0xFFFF;
self->uuid = NULL;
self->characteristic_list = mp_obj_new_list(0, NULL);
self->is_remote = true;
self->is_secondary = false;
self->connection = connection;
}
bleio_uuid_obj_t *common_hal_bleio_service_get_uuid(bleio_service_obj_t *self) {
return self->uuid;
}
mp_obj_tuple_t *common_hal_bleio_service_get_characteristics(bleio_service_obj_t *self) {
return mp_obj_new_tuple(self->characteristic_list->len, self->characteristic_list->items);
}
bool common_hal_bleio_service_get_is_remote(bleio_service_obj_t *self) {
return self->is_remote;
}
bool common_hal_bleio_service_get_is_secondary(bleio_service_obj_t *self) {
return self->is_secondary;
}
void common_hal_bleio_service_add_characteristic(bleio_service_obj_t *self,
bleio_characteristic_obj_t *characteristic,
mp_buffer_info_t *initial_value_bufinfo) {
if (self->handle != common_hal_bleio_adapter_obj.last_added_service_handle) {
mp_raise_bleio_BluetoothError(
translate("Characteristic can only be added to most recently added service"));
}
characteristic->decl_handle = bleio_adapter_add_attribute(
&common_hal_bleio_adapter_obj, MP_OBJ_TO_PTR(characteristic));
// This is the value handle.
characteristic->handle = bleio_adapter_add_attribute(
&common_hal_bleio_adapter_obj, MP_OBJ_TO_PTR(characteristic));
self->end_handle = characteristic->handle;
if (characteristic->props & (CHAR_PROP_NOTIFY | CHAR_PROP_INDICATE)) {
// We need a CCCD if this characteristic is doing notify or indicate.
bleio_descriptor_obj_t *cccd = m_new_obj(bleio_descriptor_obj_t);
cccd->base.type = &bleio_descriptor_type;
uint16_t zero = 0;
mp_buffer_info_t zero_cccd_value = {
.buf = &zero,
.len = sizeof(zero),
};
common_hal_bleio_descriptor_construct(
cccd,
characteristic,
&cccd_uuid, // 0x2902
SECURITY_MODE_OPEN, // CCCD read perm
characteristic->read_perm, // Make CCCD write perm match characteristic read perm.
2, // 2 bytes
true, // fixed length
&zero_cccd_value // Initial value is 0.
);
// Adds CCCD to attribute table, and also extends self->end_handle to include the CCCD.
common_hal_bleio_characteristic_add_descriptor(characteristic, cccd);
characteristic->cccd = cccd;
}
mp_obj_list_append(self->characteristic_list, MP_OBJ_FROM_PTR(characteristic));
}

View File

@ -0,0 +1,54 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_SERVICE_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_SERVICE_H
#include "py/objlist.h"
#include "common-hal/_bleio/UUID.h"
typedef struct bleio_service_obj {
mp_obj_base_t base;
// Handle for the local service.
uint16_t handle;
// True if created during discovery.
bool is_remote;
bool is_secondary;
bleio_uuid_obj_t *uuid;
// The connection object is set only when this is a remote service.
// A local service doesn't know the connection.
mp_obj_t connection;
mp_obj_list_t *characteristic_list;
// Range of attribute handles of this service.
uint16_t start_handle;
uint16_t end_handle;
struct bleio_service_obj* next;
} bleio_service_obj_t;
void bleio_service_from_connection(bleio_service_obj_t *self, mp_obj_t connection);
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_SERVICE_H

View File

@ -0,0 +1,75 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 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 <string.h>
#include "py/runtime.h"
#include "common-hal/_bleio/UUID.h"
#include "shared-bindings/_bleio/__init__.h"
#include "shared-bindings/_bleio/Adapter.h"
// If uuid128 is NULL, this is a Bluetooth SIG 16-bit UUID.
// If uuid128 is not NULL, it's a 128-bit (16-byte) UUID, with bytes 12 and 13 zero'd out, where
// the 16-bit part goes. Those 16 bits are passed in uuid16.
void common_hal_bleio_uuid_construct(bleio_uuid_obj_t *self, mp_int_t uuid16, const uint8_t uuid128[16]) {
self->size = uuid128 == NULL ? 16 : 128;
self->uuid16 = uuid16;
if (uuid128) {
memcpy(self->uuid128, uuid128, 16);
self->uuid128[12] = uuid16 & 0xff;
self->uuid128[13] = uuid16 >> 8;
} else {
memset(self->uuid128, 0, 16);
}
}
uint32_t common_hal_bleio_uuid_get_size(bleio_uuid_obj_t *self) {
return self->size;
}
uint32_t common_hal_bleio_uuid_get_uuid16(bleio_uuid_obj_t *self) {
return self->uuid16;
}
void common_hal_bleio_uuid_get_uuid128(bleio_uuid_obj_t *self, uint8_t uuid128[16]) {
memcpy(uuid128, self->uuid128, 16);
}
void common_hal_bleio_uuid_pack_into(bleio_uuid_obj_t *self, uint8_t* buf) {
if (self->size == 16) {
buf[0] = self->uuid16 & 0xff;
buf[1] = self->uuid16 >> 8;
} else {
common_hal_bleio_uuid_get_uuid128(self, buf);
}
}
// Return a uui16 only if this is a standard uuid. Otherwise return BLE_UUID_UNKNOWN.
uint16_t bleio_uuid_get_uuid16_or_unknown(bleio_uuid_obj_t *uuid) {
return uuid->size == 16 ? uuid->uuid16 : BLE_UUID_UNKNOWN;
}

View File

@ -0,0 +1,58 @@
/*
* 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.
*/
#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_UUID_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_UUID_H
#include "py/obj.h"
// Types returned by attribute table lookups. These are UUIDs.
typedef enum {
BLE_UUID_UNKNOWN = 0x0000,
BLE_UUID_SERVICE_PRIMARY = 0x2800,
BLE_UUID_SERVICE_SECONDARY = 0x2801,
BLE_UUID_SERVICE_INCLUDE = 0x2802, // not yet implemented by us
BLE_UUID_CHARACTERISTIC = 0x2803,
BLE_UUID_CHAR_EXTENDED_PROPS = 0x2900, // not yet implemented by us
BLE_UUID_CHAR_USER_DESC = 0x2901, // not yet implemented by us
BLE_UUID_CCCD = 0x2902,
BLE_UUID_SCCD = 0x2903, // not yet implemented by us
BLE_UUID_CHAR_PRESENTATION_FMT = 0x2904, // not yet implemented by us
BLE_UUID_CHAR_AGGREGATE_FMT = 0x2905, // not yet implemented by us
} ble_standard_uuid;
typedef struct {
mp_obj_base_t base;
uint8_t size;
uint16_t uuid16;
uint8_t uuid128[16];
} bleio_uuid_obj_t;
uint16_t bleio_uuid_get_uuid16_or_unknown(bleio_uuid_obj_t *uuid);
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_UUID_H

View File

@ -0,0 +1,112 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 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 <string.h>
#include "py/runtime.h"
#include "shared-bindings/_bleio/__init__.h"
#include "shared-bindings/_bleio/Adapter.h"
#include "shared-bindings/_bleio/Characteristic.h"
#include "shared-bindings/_bleio/Connection.h"
#include "shared-bindings/_bleio/Descriptor.h"
#include "shared-bindings/_bleio/Service.h"
#include "shared-bindings/_bleio/UUID.h"
#include "supervisor/shared/bluetooth.h"
// UUID shared by all cccd's.
bleio_uuid_obj_t cccd_uuid;
bool vm_used_ble;
// void check_sec_status(uint8_t sec_status) {
// if (sec_status == BLE_GAP_SEC_STATUS_SUCCESS) {
// return;
// }
// switch (sec_status) {
// case BLE_GAP_SEC_STATUS_UNSPECIFIED:
// mp_raise_bleio_SecurityError(translate("Unspecified issue. Can be that the pairing prompt on the other device was declined or ignored."));
// return;
// default:
// mp_raise_bleio_SecurityError(translate("Unknown security error: 0x%04x"), sec_status);
// }
// }
// Turn off BLE on a reset or reload.
void bleio_reset() {
// Create a UUID object for all CCCD's.
cccd_uuid.base.type = &bleio_uuid_type;
common_hal_bleio_uuid_construct(&cccd_uuid, BLE_UUID_CCCD, NULL);
bleio_hci_reset();
if (!common_hal_bleio_adapter_get_enabled(&common_hal_bleio_adapter_obj)) {
return;
}
bleio_adapter_reset(&common_hal_bleio_adapter_obj);
if (!vm_used_ble) {
// No user-code BLE operations were done, so we can maintain the supervisor state.
return;
}
common_hal_bleio_adapter_set_enabled(&common_hal_bleio_adapter_obj, false);
common_hal_bleio_adapter_obj.allocated = false;
bleio_set_adapter(mp_const_none);
//FIX bonding_reset();
supervisor_start_bluetooth();
}
// The singleton _bleio.Adapter object, bound to _bleio.adapter
bleio_adapter_obj_t common_hal_bleio_adapter_obj = {
.base = {
.type = &bleio_adapter_type,
},
};
bleio_adapter_obj_t *common_hal_bleio_allocate_adapter_or_raise(void) {
if (common_hal_bleio_adapter_obj.allocated) {
mp_raise_RuntimeError(translate("Too many Adapters"));
}
return &common_hal_bleio_adapter_obj;
}
void common_hal_bleio_check_connected(uint16_t conn_handle) {
if (conn_handle == BLE_CONN_HANDLE_INVALID) {
mp_raise_bleio_ConnectionError(translate("Not connected"));
}
}
void common_hal_bleio_gc_collect(void) {
bleio_adapter_gc_collect(&common_hal_bleio_adapter_obj);
}
void bleio_background(void) {
bleio_adapter_background(&common_hal_bleio_adapter_obj);
}

View File

@ -0,0 +1,62 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_INIT_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_INIT_H
#include <stdbool.h>
#include "shared-bindings/_bleio/UUID.h"
#include "att.h"
#include "hci.h"
void bleio_background(void);
void bleio_reset(void);
typedef struct {
// ble_gap_enc_key_t own_enc;
// ble_gap_enc_key_t peer_enc;
// ble_gap_id_key_t peer_id;
} bonding_keys_t;
// We assume variable length data.
// 20 bytes max (23 - 3).
#define GATT_MAX_DATA_LENGTH (BT_ATT_DEFAULT_LE_MTU - 3)
//FIX
#define BLE_GATT_HANDLE_INVALID 0x0000
#define BLE_CONN_HANDLE_INVALID 0xFFFF
#define BLE_GATTS_FIX_ATTR_LEN_MAX (510) /**< Maximum length for fixed length Attribute Values. */
#define BLE_GATTS_VAR_ATTR_LEN_MAX (512) /**< Maximum length for variable length Attribute Values. */
// Track if the user code modified the BLE state to know if we need to undo it on reload.
extern bool vm_used_ble;
// UUID shared by all CCCD's.
extern bleio_uuid_obj_t cccd_uuid;
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_INIT_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
// Derived from ArduinoBLE.
// Copyright 2020 Dan Halbert for Adafruit Industries
/*
This file is part of the ArduinoBLE library.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_ATT_H
#define MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_ATT_H
#include <stdbool.h>
#include <stdint.h>
#include "hci_include/addr.h"
#include "hci_include/att.h"
#include "hci_include/att_internal.h"
void bleio_att_reset(void);
//FIX void att_set_event_handler(BLEDeviceEvent event, BLEDeviceEventHandler eventHandler);
bool att_address_is_connected(bt_addr_le_t *addr);
bool att_connect_to_address(bt_addr_le_t *addr);
bool att_disconnect(uint16_t conn_handle);
bool att_disconnect_all(void);
bool att_discover_attributes(bt_addr_le_t *addr, const char* service_uuid_filter);
bool att_exchange_mtu(uint16_t conn_handle);
bool att_handle_is_connected(uint16_t handle);
bool att_indicate(uint16_t handle, const uint8_t* value, int length);
bool att_is_connected(void);
bool att_notify(uint16_t handle, const uint8_t* value, int length);
int att_read_req(uint16_t conn_handle, uint16_t handle, uint8_t response_buffer[]);
int att_write_req(uint16_t conn_handle, uint16_t handle, const uint8_t* data, uint8_t data_len, uint8_t response_buffer[]);
uint16_t att_conn_handle(bt_addr_le_t *addr);
uint16_t att_mtu(uint16_t handle);
void att_add_connection(uint16_t handle, uint8_t role, bt_addr_le_t *peer_addr, uint16_t interval, uint16_t latency, uint16_t supervision_timeout, uint8_t master_clock_accuracy);
void att_process_data(uint16_t conn_handle, uint8_t dlen, uint8_t data[]);
void att_remove_connection(uint16_t conn_handle, uint8_t reason);
void att_set_max_mtu(uint16_t max_mtu);
void att_set_timeout(unsigned long timeout);
void att_write_cmd(uint16_t conn_handle, uint16_t handle, const uint8_t* data, uint8_t data_len);
#endif // MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_ATT_H

View File

@ -0,0 +1,806 @@
// This file is derived from the ArduinoBLE library. Its header is below.
/*
This file is part of the ArduinoBLE library.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "att.h"
#include "hci.h"
#include "py/obj.h"
#include "py/mperrno.h"
#include "py/runtime.h"
// Zephyr include files to define HCI communication values and structs.
#include "hci_include/hci.h"
#include "hci_include/hci_err.h"
#include "hci_include/l2cap_internal.h"
#include <string.h>
#include "py/mphal.h" //*****************************
#include "supervisor/shared/tick.h"
#include "shared-bindings/_bleio/__init__.h"
#include "common-hal/_bleio/Adapter.h"
#include "shared-bindings/microcontroller/__init__.h"
// Set to 1 for extensive HCI packet logging.
#define HCI_DEBUG 0
// HCI H4 protocol packet types: first byte in the packet.
#define H4_CMD 0x01
#define H4_ACL 0x02
#define H4_SCO 0x03
#define H4_EVT 0x04
#define CTS_TIMEOUT_MSECS (1000)
#define RESPONSE_TIMEOUT_MSECS (1000)
// These are the headers of the full packets that are sent over the serial interface.
// They all have a one-byte type-field at the front, one of the H4_xxx packet types.
typedef struct __attribute__ ((packed)) {
uint8_t pkt_type;
uint16_t opcode;
uint8_t param_len;
uint8_t params[];
} h4_hci_cmd_pkt_t;
#define ACL_DATA_PB_FIRST_NON_FLUSH 0
#define ACL_DATA_PB_MIDDLE 1
#define ACL_DATA_PB_FIRST_FLUSH 2
#define ACL_DATA_PB_FULL 3
typedef struct __attribute__ ((packed)) {
uint8_t pkt_type;
uint16_t handle : 12;
uint8_t pb: 2; // Packet boundary flag: ACL_DATA_PB values.
uint8_t bc: 2; // Broadcast flag: always 0b00 for BLE.
uint16_t data_len; // length of data[] in this packet.
uint8_t data[];
} h4_hci_acl_pkt_t;
// The ACL data in an h4_hci_acl_pkt_t may be fragmented across
// multiple ACL_DATA packets, and need to be recombined. This is the
// structure of the combined packet or the first fragment.
typedef struct __attribute__ ((packed)) {
uint16_t acl_data_len; // Length of acl_data. Does not include this header.
uint16_t cid; // Channel ID.
uint8_t acl_data[]; // Length is acl_data_len of full packet.
} acl_data_t;
typedef struct __attribute__ ((packed)) {
uint8_t pkt_type;
uint8_t evt;
uint8_t param_len;
uint8_t params[];
} h4_hci_evt_pkt_t;
//////////////////////////////////////////////////////////////////////
// Static storage:
//FIX size
#define RX_BUFFER_SIZE (3 + 255)
#define ACL_DATA_BUFFER_SIZE (255)
STATIC uint8_t rx_buffer[RX_BUFFER_SIZE];
STATIC size_t rx_idx;
STATIC uint8_t acl_data_buffer[ACL_DATA_BUFFER_SIZE];
STATIC size_t acl_data_len;
STATIC size_t num_command_packets_allowed;
STATIC volatile size_t pending_pkt;
// Results from parsing a command response packet.
STATIC bool cmd_response_received;
STATIC uint16_t cmd_response_opcode;
STATIC uint8_t cmd_response_status;
STATIC size_t cmd_response_len;
STATIC uint8_t* cmd_response_data;
STATIC volatile bool hci_poll_in_progress = false;
//////////////////////////////////////////////////////////////////////
#if HCI_DEBUG
#include "hci_debug.c"
#endif // HCI_DEBUG
STATIC void process_acl_data_pkt(uint8_t pkt_len, uint8_t pkt_data[]) {
h4_hci_acl_pkt_t *pkt = (h4_hci_acl_pkt_t*) pkt_data;
if (pkt->pb != ACL_DATA_PB_MIDDLE) {
// This is the start of a fragmented acl_data packet or is a full packet.
memcpy(acl_data_buffer, pkt->data, pkt->data_len);
acl_data_len = pkt->data_len;
} else {
// This is a middle or end fragment of acl data.
// Append to the accumulated data so far.
memcpy(&acl_data_buffer[acl_data_len], pkt->data, pkt->data_len);
acl_data_len += pkt->data_len;
}
acl_data_t *acl = (acl_data_t *) &acl_data_buffer;
if (acl_data_len != sizeof(acl) + acl->acl_data_len) {
// We don't have the full packet yet.
return;
}
if (acl->cid == BT_L2CAP_CID_ATT) {
att_process_data(pkt->handle, acl->acl_data_len, acl->acl_data);
}
// } else if (aclHdr->cid == BT_L2CAP_CID_LE_SIG) {
// L2CAPSignaling.handleData(aclHdr->handle & 0x0fff, aclHdr->len, &rx_buffer[1 + sizeof(HCIACLHdr)]);
// } else {
// struct __attribute__ ((packed)) {
// uint8_t op;
// uint8_t id;
// uint16_t length;
// uint16_t reason;
// uint16_t localCid;
// uint16_t remoteCid;
// } l2capRejectCid= { 0x01, 0x00, 0x006, 0x0002, aclHdr->cid, 0x0000 };
// sendAclPkt(aclHdr->handle & 0x0fff, 0x0005, sizeof(l2capRejectCid), &l2capRejectCid);
// }
}
// Process number of completed packets. Reduce number of pending packets by reported
// number of completed.
STATIC void process_num_comp_pkts(uint16_t handle, uint16_t num_pkts) {
if (num_pkts && pending_pkt > num_pkts) {
pending_pkt -= num_pkts;
} else {
pending_pkt = 0;
}
}
STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[])
{
h4_hci_evt_pkt_t *pkt = (h4_hci_evt_pkt_t*) pkt_data;
switch (pkt->evt) {
case BT_HCI_EVT_DISCONN_COMPLETE: {
struct bt_hci_evt_disconn_complete *disconn_complete =
(struct bt_hci_evt_disconn_complete*) pkt->params;
(void) disconn_complete;
att_remove_connection(disconn_complete->handle, disconn_complete->reason);
//FIX L2CAPSignaling.removeConnection(disconn_complete->handle, disconn_complete->reason);
break;
}
case BT_HCI_EVT_CMD_COMPLETE: {
struct cmd_complete_with_status {
struct bt_hci_evt_cmd_complete cmd_complete;
struct bt_hci_evt_cc_status cc_status;
} __packed;
struct cmd_complete_with_status *evt = (struct cmd_complete_with_status *) pkt->params;
num_command_packets_allowed = evt->cmd_complete.ncmd;
cmd_response_received = true;
cmd_response_opcode = evt->cmd_complete.opcode;
cmd_response_status = evt->cc_status.status;
// All the bytes following cmd_complete, -including- the status byte, which is
// included in all the _bt_hci_rp_* structs.
cmd_response_data = (uint8_t *) &evt->cc_status;
// Includes status byte.
cmd_response_len = pkt->param_len - sizeof_field(struct cmd_complete_with_status, cmd_complete);
break;
}
case BT_HCI_EVT_CMD_STATUS: {
struct bt_hci_evt_cmd_status *evt = (struct bt_hci_evt_cmd_status *) pkt->params;
num_command_packets_allowed = evt->ncmd;
cmd_response_received = true;
cmd_response_opcode = evt->opcode;
cmd_response_status = evt->status;
cmd_response_data = NULL;
cmd_response_len = 0;
break;
}
case BT_HCI_EVT_NUM_COMPLETED_PACKETS: {
struct bt_hci_evt_num_completed_packets *evt =
(struct bt_hci_evt_num_completed_packets *) pkt->params;
// Start at zero-th pair: (conn handle, num completed packets).
struct bt_hci_handle_count *handle_and_count = &(evt->h[0]);
for (uint8_t i = 0; i < evt->num_handles; i++) {
process_num_comp_pkts(handle_and_count->handle, handle_and_count->count);
handle_and_count++;
}
break;
}
case BT_HCI_EVT_LE_META_EVENT: {
struct bt_hci_evt_le_meta_event *meta_evt = (struct bt_hci_evt_le_meta_event *) pkt->params;
uint8_t *le_evt = pkt->params + sizeof (struct bt_hci_evt_le_meta_event);
if (meta_evt->subevent == BT_HCI_EVT_LE_CONN_COMPLETE) {
// Advertising stops when connection occurs.
// We don't tell the adapter to stop, because stopping advertising
// when it's already stopped seems to exercise a bug in the ESP32 HCI code:
// It doesn't return a response.
bleio_adapter_advertising_was_stopped(&common_hal_bleio_adapter_obj);
struct bt_hci_evt_le_conn_complete *le_conn_complete =
(struct bt_hci_evt_le_conn_complete *) le_evt;
if (le_conn_complete->status == BT_HCI_ERR_SUCCESS) {
att_add_connection(
le_conn_complete->handle,
le_conn_complete->role,
&le_conn_complete->peer_addr,
le_conn_complete->interval,
le_conn_complete->latency,
le_conn_complete->supv_timeout,
le_conn_complete->clock_accuracy);
}
} else if (meta_evt->subevent == BT_HCI_EVT_LE_ADVERTISING_REPORT) {
struct bt_hci_evt_le_advertising_info *le_advertising_info =
(struct bt_hci_evt_le_advertising_info *) le_evt;
if (le_advertising_info->evt_type == BT_HCI_ADV_DIRECT_IND) {
//FIX
// last byte is RSSI
// GAP.handleLeAdvertisingReport(leAdvertisingReport->type,
// leAdvertisingReport->peerBdaddrType,
// leAdvertisingReport->peerBdaddr,
// leAdvertisingReport->eirLength,
// leAdvertisingReport->eirData,
// rssi); //FIX, don't separate
}
}
break;
}
default:
#if HCI_DEBUG
mp_printf(&mp_plat_print, "process_evt_pkt: Unknown event: %02x\n");
#endif
break;
}
}
void bleio_hci_reset(void) {
rx_idx = 0;
pending_pkt = 0;
hci_poll_in_progress = false;
bleio_att_reset();
}
hci_result_t hci_poll_for_incoming_pkt(void) {
common_hal_mcu_disable_interrupts();
if (hci_poll_in_progress) {
common_hal_mcu_enable_interrupts();
return HCI_OK;
}
hci_poll_in_progress = true;
common_hal_mcu_enable_interrupts();
// Assert RTS low to say we're ready to read data.
common_hal_digitalio_digitalinout_set_value(common_hal_bleio_adapter_obj.rts_digitalinout, false);
int errcode = 0;
bool packet_is_complete = false;
// Read bytes until we run out. There may be more than one packet in the input buffer.
while (!packet_is_complete &&
common_hal_busio_uart_rx_characters_available(common_hal_bleio_adapter_obj.hci_uart) > 0) {
// Read just one character a a time, so we don't accidentally get part of a second
// packet.
size_t num_read =
common_hal_busio_uart_read(common_hal_bleio_adapter_obj.hci_uart, rx_buffer + rx_idx, 1, &errcode);
if (num_read == 0) {
return HCI_OK;
}
if (errcode) {
if (errcode == EAGAIN) {
continue;
}
hci_poll_in_progress = false;
mp_printf(&mp_plat_print, "HCI_READ_ERROR, errcode: %x\n", errcode);
return HCI_READ_ERROR;
}
rx_idx++;
if (rx_idx >= sizeof(rx_buffer)) {
// Incoming packet is too large. Should not happen.
return HCI_READ_ERROR;
}
switch (rx_buffer[0]) {
case H4_ACL:
if (rx_idx >= sizeof(h4_hci_acl_pkt_t)) {
const size_t total_len =
sizeof(h4_hci_acl_pkt_t) + ((h4_hci_acl_pkt_t *) rx_buffer)->data_len;
if (rx_idx == total_len) {
packet_is_complete = true;
}
if (rx_idx > total_len) {
return HCI_PACKET_SIZE_ERROR;
}
}
break;
case H4_EVT:
if (rx_idx >= sizeof(h4_hci_evt_pkt_t)) {
const size_t total_len =
sizeof(h4_hci_evt_pkt_t) + ((h4_hci_evt_pkt_t *) rx_buffer)->param_len;
if (rx_idx == total_len) {
packet_is_complete = true;
}
if (rx_idx > total_len) {
return HCI_PACKET_SIZE_ERROR;
}
}
break;
default:
// Unknown or bad packet type. Start over.
rx_idx = 0;
break;
}
} // end while
if (packet_is_complete) {
// Stop incoming data while processing packet.
common_hal_digitalio_digitalinout_set_value(common_hal_bleio_adapter_obj.rts_digitalinout, true);
size_t pkt_len = rx_idx;
// Reset for next packet.
rx_idx = 0;
packet_is_complete = false;
switch (rx_buffer[0]) {
case H4_ACL:
#if HCI_DEBUG
dump_acl_pkt(false, pkt_len, rx_buffer);
#endif
process_acl_data_pkt(pkt_len, rx_buffer);
break;
case H4_EVT:
#if HCI_DEBUG
dump_evt_pkt(false, pkt_len, rx_buffer);
#endif
process_evt_pkt(pkt_len, rx_buffer);
break;
default:
#if HCI_DEBUG
mp_printf(&mp_plat_print, "Unknown HCI packet type: %d\n", rx_buffer[0]);
#endif
break;
}
// Let incoming bytes flow again.
common_hal_digitalio_digitalinout_set_value(common_hal_bleio_adapter_obj.rts_digitalinout, false);
}
// All done with this batch. Hold off receiving bytes until we're ready again.
///common_hal_digitalio_digitalinout_set_value(common_hal_bleio_adapter_obj.rts_digitalinout, true);
hci_poll_in_progress = false;
return HCI_OK;
}
STATIC hci_result_t write_pkt(uint8_t *buffer, size_t len) {
// Wait for CTS to go low before writing to HCI adapter.
uint64_t start = supervisor_ticks_ms64();
while (common_hal_digitalio_digitalinout_get_value(common_hal_bleio_adapter_obj.cts_digitalinout)) {
RUN_BACKGROUND_TASKS;
if (supervisor_ticks_ms64() - start > CTS_TIMEOUT_MSECS) {
return HCI_WRITE_TIMEOUT;
}
}
int errcode = 0;
common_hal_busio_uart_write(common_hal_bleio_adapter_obj.hci_uart, buffer, len, &errcode);
if (errcode) {
return HCI_WRITE_ERROR;
}
return HCI_OK;
}
STATIC hci_result_t send_command(uint16_t opcode, uint8_t params_len, void* params) {
uint8_t cmd_pkt_len = sizeof(h4_hci_cmd_pkt_t) + params_len;
uint8_t tx_buffer[cmd_pkt_len];
// cmd header is at the beginning of tx_buffer
h4_hci_cmd_pkt_t *cmd_pkt = (h4_hci_cmd_pkt_t *) tx_buffer;
cmd_pkt->pkt_type = H4_CMD;
cmd_pkt->opcode = opcode;
cmd_pkt->param_len = params_len;
memcpy(cmd_pkt->params, params, params_len);
#if HCI_DEBUG
dump_cmd_pkt(true, sizeof(tx_buffer), tx_buffer);
#endif
int result = write_pkt(tx_buffer, cmd_pkt_len);
if (result != HCI_OK) {
return result;
}
cmd_response_received = false;
// Wait for a response. Note that other packets may be received that are not
// command responses.
uint64_t start = supervisor_ticks_ms64();
while (supervisor_ticks_ms64() - start < RESPONSE_TIMEOUT_MSECS) {
// RUN_BACKGROUND_TASKS includes hci_poll_for_incoming_pkt();
RUN_BACKGROUND_TASKS;
if (cmd_response_received && cmd_response_opcode == opcode) {
// If this is definitely a response to the command that was sent,
// return the status value, which will will be
// BT_HCI_ERR_SUCCESS (0x00) if the command succeeded,
// or a BT_HCI_ERR_x value (> 0x00) if there was a problem.
return cmd_response_status;
}
}
// No I/O error, but no response sent back in time.
return HCI_RESPONSE_TIMEOUT;
}
hci_result_t hci_send_acl_pkt(uint16_t handle, uint8_t cid, uint16_t data_len, uint8_t *data) {
// Wait for all backlogged packets to finish.
while (pending_pkt >= common_hal_bleio_adapter_obj.max_acl_num_buffers) {
// RUN_BACKGROUND_TASKS includes hci_poll_for_incoming_pkt();
RUN_BACKGROUND_TASKS;
}
// buf_len is size of entire packet including header.
const size_t buf_len = sizeof(h4_hci_acl_pkt_t) + sizeof(acl_data_t) + data_len;
uint8_t tx_buffer[buf_len];
h4_hci_acl_pkt_t *acl_pkt = (h4_hci_acl_pkt_t *) tx_buffer;
acl_data_t *acl_data = (acl_data_t *) acl_pkt->data;
acl_pkt->pkt_type = H4_ACL;
acl_pkt->handle = handle;
acl_pkt->pb = ACL_DATA_PB_FIRST_FLUSH;
acl_pkt->bc = 0;
acl_pkt->data_len = (uint16_t)(sizeof(acl_data_t) + data_len);
acl_data->acl_data_len = data_len;
acl_data->cid = cid;
memcpy(&acl_data->acl_data, data, data_len);
#if HCI_DEBUG
dump_acl_pkt(true, buf_len, tx_buffer);
#endif
pending_pkt++;
int errcode = 0;
common_hal_busio_uart_write(common_hal_bleio_adapter_obj.hci_uart, tx_buffer, buf_len, &errcode);
if (errcode) {
return HCI_WRITE_ERROR;
}
return HCI_OK;
}
hci_result_t hci_reset(void) {
return send_command(BT_HCI_OP_RESET, 0, NULL);
}
hci_result_t hci_read_local_version(uint8_t *hci_version, uint16_t *hci_revision, uint8_t *lmp_version, uint16_t *manufacturer, uint16_t *lmp_subversion) {
hci_result_t result = send_command(BT_HCI_OP_READ_LOCAL_VERSION_INFO, 0, NULL);
if (result == HCI_OK) {
struct bt_hci_rp_read_local_version_info *response =
(struct bt_hci_rp_read_local_version_info *) cmd_response_data;
*hci_version = response->hci_version;
*hci_revision = response->hci_revision;
*lmp_version = response->lmp_version;
*manufacturer = response->manufacturer;
*lmp_subversion = response->lmp_subversion;
}
return result;
}
hci_result_t hci_read_bd_addr(bt_addr_t *addr) {
int result = send_command(BT_HCI_OP_READ_BD_ADDR, 0, NULL);
if (result == HCI_OK) {
struct bt_hci_rp_read_bd_addr *response = (struct bt_hci_rp_read_bd_addr *) cmd_response_data;
memcpy(addr->val, response->bdaddr.val, sizeof_field(bt_addr_t, val));
}
return result;
}
hci_result_t hci_read_rssi(uint16_t handle, int *rssi) {
int result = send_command(BT_HCI_OP_READ_RSSI, sizeof(handle), &handle);
if (result == HCI_OK) {
struct bt_hci_rp_read_rssi *response = (struct bt_hci_rp_read_rssi *) cmd_response_data;
*rssi = response->rssi;
}
return result;
}
hci_result_t hci_set_event_mask(uint64_t event_mask) {
return send_command(BT_HCI_OP_SET_EVENT_MASK, sizeof(event_mask), &event_mask);
}
hci_result_t hci_le_read_buffer_size(uint16_t *le_max_len, uint8_t *le_max_num) {
int result = send_command(BT_HCI_OP_LE_READ_BUFFER_SIZE, 0, NULL);
if (result == HCI_OK) {
struct bt_hci_rp_le_read_buffer_size *response =
(struct bt_hci_rp_le_read_buffer_size *) cmd_response_data;
*le_max_len = response->le_max_len;
*le_max_num = response->le_max_num;
}
return result;
}
hci_result_t hci_read_buffer_size(uint16_t *acl_max_len, uint8_t *sco_max_len, uint16_t *acl_max_num, uint16_t *sco_max_num) {
int result = send_command(BT_HCI_OP_READ_BUFFER_SIZE, 0, NULL);
if (result == HCI_OK) {
struct bt_hci_rp_read_buffer_size *response =
(struct bt_hci_rp_read_buffer_size *) cmd_response_data;
*acl_max_len = response->acl_max_len;
*sco_max_len = response->sco_max_len;
*acl_max_num = response->acl_max_num;
*sco_max_num = response->sco_max_num;
}
return result;
}
hci_result_t hci_le_set_random_address(uint8_t addr[6]) {
return send_command(BT_HCI_OP_LE_SET_RANDOM_ADDRESS, 6, addr);
}
hci_result_t hci_le_set_advertising_parameters(uint16_t min_interval, uint16_t max_interval, uint8_t type, uint8_t own_addr_type, bt_addr_le_t *direct_addr, uint8_t channel_map, uint8_t filter_policy) {
struct bt_hci_cp_le_set_adv_param params = {
.min_interval = min_interval,
.max_interval = max_interval,
.type = type,
.own_addr_type = own_addr_type,
// .direct_addr set below.
.channel_map = channel_map,
.filter_policy = filter_policy,
};
params.direct_addr.type = direct_addr->type;
memcpy(params.direct_addr.a.val, direct_addr->a.val, sizeof(params.direct_addr.a.val));
return send_command(BT_HCI_OP_LE_SET_ADV_PARAM, sizeof(params), &params);
}
hci_result_t hci_le_set_extended_advertising_parameters(uint8_t handle, uint16_t props, uint32_t prim_min_interval, uint32_t prim_max_interval, uint8_t prim_channel_map, uint8_t own_addr_type, bt_addr_le_t *peer_addr, uint8_t filter_policy, int8_t tx_power, uint8_t prim_adv_phy, uint8_t sec_adv_max_skip, uint8_t sec_adv_phy, uint8_t sid, uint8_t scan_req_notify_enable) {
struct bt_hci_cp_le_set_ext_adv_param params = {
.handle = handle,
.props = props,
// .prim_min_interval and .prim_max_interval set below
.prim_channel_map = prim_channel_map,
.own_addr_type = own_addr_type,
// .peer_addr set below.
.tx_power = tx_power,
.sec_adv_max_skip = sec_adv_max_skip,
.sec_adv_phy = sec_adv_phy,
.sid = sid,
.scan_req_notify_enable = scan_req_notify_enable,
};
// Assumes little-endian.
memcpy(params.prim_min_interval, (void *) &prim_min_interval,
sizeof_field(struct bt_hci_cp_le_set_ext_adv_param, prim_min_interval));
memcpy(params.prim_max_interval, (void *) &prim_max_interval,
sizeof_field(struct bt_hci_cp_le_set_ext_adv_param, prim_max_interval));
memcpy(params.peer_addr.a.val, peer_addr->a.val, sizeof_field(bt_addr_le_t, a.val));
return send_command(BT_HCI_OP_LE_SET_EXT_ADV_PARAM, sizeof(params), &params);
}
hci_result_t hci_le_read_maximum_advertising_data_length(uint16_t *max_adv_data_len) {
int result = send_command(BT_HCI_OP_LE_READ_MAX_ADV_DATA_LEN, 0, NULL);
if (result == HCI_OK) {
struct bt_hci_rp_le_read_max_adv_data_len *response =
(struct bt_hci_rp_le_read_max_adv_data_len *) cmd_response_data;
*max_adv_data_len = response->max_adv_data_len;
}
return result;
}
hci_result_t hci_le_read_local_supported_features(uint8_t features[8]) {
int result = send_command(BT_HCI_OP_LE_READ_LOCAL_FEATURES, 0, NULL);
if (result == HCI_OK) {
struct bt_hci_rp_le_read_local_features *response =
(struct bt_hci_rp_le_read_local_features *) cmd_response_data;
memcpy(features, response->features,
sizeof_field(struct bt_hci_rp_le_read_local_features, features));
}
return result;
}
hci_result_t hci_le_set_advertising_data(uint8_t len, uint8_t data[]) {
struct bt_hci_cp_le_set_adv_data params = {
// Zero out unused data bytes.
.data = { 0 },
};
params.len = len;
memcpy(params.data, data, len);
// All data bytes are sent even if some are unused.
return send_command(BT_HCI_OP_LE_SET_ADV_DATA, sizeof(params), &params);
}
hci_result_t hci_le_set_extended_advertising_data(uint8_t handle, uint8_t op, uint8_t frag_pref, uint8_t len, uint8_t data[]) {
const uint8_t max_len = sizeof_field(struct bt_hci_cp_le_set_ext_adv_data, data);
uint8_t valid_len = MIN(len, max_len);
struct bt_hci_cp_le_set_ext_adv_data params = {
.handle = handle,
.op = op,
.frag_pref = frag_pref,
.len = valid_len,
};
memcpy(params.data, data, valid_len);
return send_command(BT_HCI_OP_LE_SET_EXT_ADV_DATA, sizeof(params) - (max_len - valid_len), &params);
}
hci_result_t hci_le_set_scan_response_data(uint8_t len, uint8_t data[]) {
struct bt_hci_cp_le_set_scan_rsp_data params = {
// Zero out unused data bytes.
.data = { 0 },
};
params.len = len;
memcpy(params.data, data, len);
// All data bytes are sent even if some are unused.
return send_command(BT_HCI_OP_LE_SET_SCAN_RSP_DATA, sizeof(params), &params);
}
hci_result_t hci_le_set_advertising_enable(uint8_t enable) {
return send_command(BT_HCI_OP_LE_SET_ADV_ENABLE, sizeof(enable), &enable);
}
hci_result_t hci_le_set_extended_advertising_enable(uint8_t enable, uint8_t set_num, uint8_t handle[], uint16_t duration[], uint8_t max_ext_adv_evts[]) {
uint8_t params[sizeof(struct bt_hci_cp_le_set_ext_adv_enable) +
set_num * (sizeof(struct bt_hci_ext_adv_set))];
struct bt_hci_cp_le_set_ext_adv_enable *params_p = (struct bt_hci_cp_le_set_ext_adv_enable *) &params;
params_p->enable = enable;
params_p->set_num = set_num;
for (size_t i = 0; i < set_num; i++) {
params_p->s[i].handle = handle[i];
params_p->s[i].duration = duration[i];
params_p->s[i].max_ext_adv_evts = max_ext_adv_evts[i];
}
return send_command(BT_HCI_OP_LE_SET_EXT_ADV_ENABLE, sizeof(params), &params);
}
hci_result_t hci_le_set_scan_parameters(uint8_t scan_type, uint16_t interval, uint16_t window, uint8_t addr_type, uint8_t filter_policy) {
struct bt_hci_cp_le_set_scan_param params = {
.scan_type = scan_type,
.interval = interval,
.window = window,
.addr_type = addr_type,
.filter_policy = filter_policy,
};
return send_command(BT_HCI_OP_LE_SET_SCAN_PARAM, sizeof(params), &params);
}
hci_result_t hci_le_set_scan_enable(uint8_t enable, uint8_t filter_dup) {
struct bt_hci_cp_le_set_scan_enable params = {
.enable = enable,
.filter_dup = filter_dup,
};
return send_command(BT_HCI_OP_LE_SET_SCAN_ENABLE, sizeof(params), &params);
}
hci_result_t hci_le_create_conn(uint16_t scan_interval, uint16_t scan_window, uint8_t filter_policy, bt_addr_le_t *peer_addr, uint8_t own_addr_type, uint16_t conn_interval_min, uint16_t conn_interval_max, uint16_t conn_latency, uint16_t supervision_timeout, uint16_t min_ce_len, uint16_t max_ce_len) {
struct bt_hci_cp_le_create_conn params = {
.scan_interval = scan_interval,
.scan_window = scan_window,
.filter_policy = filter_policy,
// .peer_addr is set below
.own_addr_type = own_addr_type,
.conn_interval_min = conn_interval_min,
.conn_interval_max = conn_interval_max,
.conn_latency = conn_latency,
.supervision_timeout = supervision_timeout,
.min_ce_len = min_ce_len,
.max_ce_len = max_ce_len,
};
params.peer_addr.type = peer_addr->type;
memcpy(params.peer_addr.a.val, peer_addr->a.val, sizeof(params.peer_addr.a.val));
return send_command(BT_HCI_OP_LE_CREATE_CONN, sizeof(params), &params);
}
hci_result_t hci_le_cancel_conn(void) {
return send_command(BT_HCI_OP_CONNECT_CANCEL, 0, NULL);
}
hci_result_t hci_le_conn_update(uint16_t handle, uint16_t conn_interval_min, uint16_t conn_interval_max, uint16_t conn_latency, uint16_t supervision_timeout) {
struct hci_cp_le_conn_update params = {
.handle = handle,
.conn_interval_min = conn_interval_min,
.conn_interval_max = conn_interval_max,
.conn_latency = conn_latency,
.supervision_timeout = supervision_timeout,
.min_ce_len = 4,
.max_ce_len = 6,
};
return send_command(BT_HCI_OP_LE_CONN_UPDATE, sizeof(params), &params);
}
hci_result_t hci_disconnect(uint16_t handle) {
struct bt_hci_cp_disconnect params = {
.handle = handle,
.reason = BT_HCI_ERR_REMOTE_USER_TERM_CONN,
};
return send_command(BT_HCI_OP_DISCONNECT, sizeof(params), &params);
}
void hci_check_error(hci_result_t result) {
switch (result) {
case HCI_OK:
return;
case HCI_RESPONSE_TIMEOUT:
mp_raise_bleio_BluetoothError(translate("Timeout waiting for HCI response"));
return;
case HCI_WRITE_TIMEOUT:
mp_raise_bleio_BluetoothError(translate("Timeout waiting to write HCI request"));
return;
case HCI_READ_ERROR:
mp_raise_bleio_BluetoothError(translate("Error reading from HCI adapter"));
return;
case HCI_WRITE_ERROR:
mp_raise_bleio_BluetoothError(translate("Error writing to HCI adapter"));
return;
case HCI_PACKET_SIZE_ERROR:
mp_raise_RuntimeError(translate("HCI packet size mismatch"));
return;
case HCI_ATT_ERROR:
mp_raise_RuntimeError(translate("Error in ATT protocol code"));
return;
default:
// Should be an HCI status error, > 0.
if (result > 0) {
mp_raise_bleio_BluetoothError(translate("HCI status error: %02x"), result);
} else {
mp_raise_bleio_BluetoothError(translate("Unknown hci_result_t: %d"), result);
}
return;
}
}

View File

@ -0,0 +1,81 @@
/*
This file is part of the ArduinoBLE library.
Copyright (c) 2018 Arduino SA. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_HCI_H
#define MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_HCI_H
#include <stdint.h>
#include "common-hal/_bleio/hci_include/hci.h"
#include "common-hal/_bleio/hci_include/hci_err.h"
// Incomplete forward declaration to get around mutually-dependent include files.
typedef struct _bleio_adapter_obj_t bleio_adapter_obj_t;
// An hci_result_t is one of the HCI_x values below,
// or it is > 0 and is an HCI command status value (see hci_include/hci_err.h)
typedef int hci_result_t;
#define HCI_OK (0)
#define HCI_RESPONSE_TIMEOUT (-1)
#define HCI_WRITE_TIMEOUT (-2)
#define HCI_READ_ERROR (-3)
#define HCI_WRITE_ERROR (-4)
#define HCI_ATT_ERROR (-5)
#define HCI_PACKET_SIZE_ERROR (-6)
extern void bleio_hci_reset(void);
void hci_check_error(hci_result_t result);
hci_result_t hci_disconnect(uint16_t handle);
hci_result_t hci_le_cancel_conn(void);
hci_result_t hci_le_conn_update(uint16_t handle, uint16_t conn_interval_min, uint16_t conn_interval_max, uint16_t conn_latency, uint16_t supervision_timeout);
hci_result_t hci_le_create_conn(uint16_t scan_interval, uint16_t scan_window, uint8_t filter_policy, bt_addr_le_t *peer_addr, uint8_t own_addr_type, uint16_t conn_interval_min, uint16_t conn_interval_max, uint16_t conn_latency, uint16_t supervision_timeout, uint16_t min_ce_len, uint16_t max_ce_len);
hci_result_t hci_le_read_buffer_size(uint16_t *le_max_len, uint8_t *le_max_num);
hci_result_t hci_le_read_maximum_advertising_data_length(uint16_t *max_adv_data_len);
hci_result_t hci_le_read_local_supported_features(uint8_t features[8]);
hci_result_t hci_le_set_advertising_data(uint8_t length, uint8_t data[]);
hci_result_t hci_le_set_advertising_enable(uint8_t enable);
hci_result_t hci_le_set_advertising_parameters(uint16_t min_interval, uint16_t max_interval, uint8_t type, uint8_t own_addr_type, bt_addr_le_t *direct_addr, uint8_t channel_map, uint8_t filter_policy);
hci_result_t hci_le_set_extended_advertising_data(uint8_t handle, uint8_t op, uint8_t frag_pref, uint8_t len, uint8_t data[]);
hci_result_t hci_le_set_extended_advertising_enable(uint8_t enable, uint8_t set_num, uint8_t handle[], uint16_t duration[], uint8_t max_ext_adv_evts[]);
hci_result_t hci_le_set_extended_advertising_parameters(uint8_t handle, uint16_t props, uint32_t prim_min_interval, uint32_t prim_max_interval, uint8_t prim_channel_map, uint8_t own_addr_type, bt_addr_le_t *peer_addr, uint8_t filter_policy, int8_t tx_power, uint8_t prim_adv_phy, uint8_t sec_adv_max_skip, uint8_t sec_adv_phy, uint8_t sid, uint8_t scan_req_notify_enable);
hci_result_t hci_le_set_random_address(uint8_t addr[6]);
hci_result_t hci_le_set_scan_enable(uint8_t enable, uint8_t filter_dup);
hci_result_t hci_le_set_scan_parameters(uint8_t scan_type, uint16_t interval, uint16_t window, uint8_t addr_type, uint8_t filter_policy);
hci_result_t hci_le_set_scan_response_data(uint8_t length, uint8_t data[]);
hci_result_t hci_poll_for_incoming_pkt(void);
hci_result_t hci_read_bd_addr(bt_addr_t *addr);
hci_result_t hci_read_buffer_size(uint16_t *acl_max_len, uint8_t *sco_max_len, uint16_t *acl_max_num, uint16_t *sco_max_num);
hci_result_t hci_read_local_version(uint8_t *hci_version, uint16_t *hci_revision, uint8_t *lmp_version, uint16_t *manufacturer, uint16_t *lmp_subversion);
hci_result_t hci_read_rssi(uint16_t handle, int *rssi);
hci_result_t hci_reset(void);
hci_result_t hci_send_acl_pkt(uint16_t handle, uint8_t cid, uint16_t data_len, uint8_t *data);
hci_result_t hci_set_event_mask(uint64_t event_mask);
#endif // MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_HCI_H

View File

@ -0,0 +1,335 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Dan Halbert 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.
*/
// This file is #include'd in hci.c when HCI_DEBUG is non-zero.
STATIC const char* att_opcode_name(uint16_t opcode) {
switch (opcode) {
case BT_ATT_OP_ERROR_RSP: return "ERROR_RSP";
case BT_ATT_OP_MTU_REQ: return "MTU_REQ";
case BT_ATT_OP_MTU_RSP: return "MTU_RSP";
case BT_ATT_OP_FIND_INFO_REQ: return "FIND_INFO_REQ";
case BT_ATT_OP_FIND_INFO_RSP: return "FIND_INFO_RSP";
case BT_ATT_OP_FIND_TYPE_REQ: return "FIND_TYPE_REQ";
case BT_ATT_OP_FIND_TYPE_RSP: return "FIND_TYPE_RSP";
case BT_ATT_OP_READ_TYPE_REQ: return "READ_TYPE_REQ";
case BT_ATT_OP_READ_TYPE_RSP: return "READ_TYPE_RSP";
case BT_ATT_OP_READ_REQ: return "READ_REQ";
case BT_ATT_OP_READ_RSP: return "READ_RSP";
case BT_ATT_OP_READ_BLOB_REQ: return "READ_BLOB_REQ";
case BT_ATT_OP_READ_BLOB_RSP: return "READ_BLOB_RSP";
case BT_ATT_OP_READ_MULT_REQ: return "READ_MULT_REQ";
case BT_ATT_OP_READ_MULT_RSP: return "READ_MULT_RSP";
case BT_ATT_OP_READ_GROUP_REQ: return "READ_GROUP_REQ";
case BT_ATT_OP_READ_GROUP_RSP: return "READ_GROUP_RSP";
case BT_ATT_OP_WRITE_REQ: return "WRITE_REQ";
case BT_ATT_OP_WRITE_RSP: return "WRITE_RSP";
case BT_ATT_OP_PREPARE_WRITE_REQ: return "PREPARE_WRITE_REQ";
case BT_ATT_OP_PREPARE_WRITE_RSP: return "PREPARE_WRITE_RSP";
case BT_ATT_OP_EXEC_WRITE_REQ: return "EXEC_WRITE_REQ";
case BT_ATT_OP_EXEC_WRITE_RSP: return "EXEC_WRITE_RSP";
case BT_ATT_OP_NOTIFY: return "NOTIFY";
case BT_ATT_OP_INDICATE: return "INDICATE";
case BT_ATT_OP_CONFIRM: return "CONFIRM";
case BT_ATT_OP_READ_MULT_VL_REQ: return "READ_MULT_VL_REQ";
case BT_ATT_OP_READ_MULT_VL_RSP: return "READ_MULT_VL_RSP";
case BT_ATT_OP_NOTIFY_MULT: return "NOTIFY_MULT";
case BT_ATT_OP_WRITE_CMD: return "WRITE_CMD";
case BT_ATT_OP_SIGNED_WRITE_CMD: return "SIGNED_WRITE_CMD";
default: return "";
}
}
STATIC const char* hci_evt_name(uint8_t evt) {
switch (evt) {
case BT_HCI_EVT_UNKNOWN: return "UNKNOWN";
case BT_HCI_EVT_VENDOR: return "VENDOR";
case BT_HCI_EVT_INQUIRY_COMPLETE: return "INQUIRY_COMPLETE";
case BT_HCI_EVT_CONN_COMPLETE: return "CONN_COMPLETE";
case BT_HCI_EVT_CONN_REQUEST: return "CONN_REQUEST";
case BT_HCI_EVT_DISCONN_COMPLETE: return "DISCONN_COMPLETE";
case BT_HCI_EVT_AUTH_COMPLETE: return "AUTH_COMPLETE";
case BT_HCI_EVT_REMOTE_NAME_REQ_COMPLETE: return "REMOTE_NAME_REQ_COMPLETE";
case BT_HCI_EVT_ENCRYPT_CHANGE: return "ENCRYPT_CHANGE";
case BT_HCI_EVT_REMOTE_FEATURES: return "REMOTE_FEATURES";
case BT_HCI_EVT_REMOTE_VERSION_INFO: return "REMOTE_VERSION_INFO";
case BT_HCI_EVT_CMD_COMPLETE: return "CMD_COMPLETE";
case BT_HCI_EVT_CMD_STATUS: return "CMD_STATUS";
case BT_HCI_EVT_ROLE_CHANGE: return "ROLE_CHANGE";
case BT_HCI_EVT_NUM_COMPLETED_PACKETS: return "NUM_COMPLETED_PACKETS";
case BT_HCI_EVT_PIN_CODE_REQ: return "PIN_CODE_REQ";
case BT_HCI_EVT_LINK_KEY_REQ: return "LINK_KEY_REQ";
case BT_HCI_EVT_LINK_KEY_NOTIFY: return "LINK_KEY_NOTIFY";
case BT_HCI_EVT_DATA_BUF_OVERFLOW: return "DATA_BUF_OVERFLOW";
case BT_HCI_EVT_INQUIRY_RESULT_WITH_RSSI: return "INQUIRY_RESULT_WITH_RSSI";
case BT_HCI_EVT_REMOTE_EXT_FEATURES: return "REMOTE_EXT_FEATURES";
case BT_HCI_EVT_SYNC_CONN_COMPLETE: return "SYNC_CONN_COMPLETE";
case BT_HCI_EVT_EXTENDED_INQUIRY_RESULT: return "EXTENDED_INQUIRY_RESULT";
case BT_HCI_EVT_ENCRYPT_KEY_REFRESH_COMPLETE: return "ENCRYPT_KEY_REFRESH_COMPLETE";
case BT_HCI_EVT_IO_CAPA_REQ: return "IO_CAPA_REQ";
case BT_HCI_EVT_IO_CAPA_RESP: return "IO_CAPA_RESP";
case BT_HCI_EVT_USER_CONFIRM_REQ: return "USER_CONFIRM_REQ";
case BT_HCI_EVT_USER_PASSKEY_REQ: return "USER_PASSKEY_REQ";
case BT_HCI_EVT_SSP_COMPLETE: return "SSP_COMPLETE";
case BT_HCI_EVT_USER_PASSKEY_NOTIFY: return "USER_PASSKEY_NOTIFY";
case BT_HCI_EVT_LE_META_EVENT: return "LE_META_EVENT";
case BT_HCI_EVT_AUTH_PAYLOAD_TIMEOUT_EXP: return "AUTH_PAYLOAD_TIMEOUT_EXP";
default: return "";
}
}
STATIC const char* hci_evt_le_name(uint8_t evt_le) {
switch (evt_le) {
case BT_HCI_EVT_LE_CONN_COMPLETE: return "LE_CONN_COMPLETE";
case BT_HCI_EVT_LE_ADVERTISING_REPORT: return "LE_ADVERTISING_REPORT";
case BT_HCI_EVT_LE_CONN_UPDATE_COMPLETE: return "LE_CONN_UPDATE_COMPLETE";
case BT_HCI_EVT_LE_LTK_REQUEST: return "LE_LTK_REQUEST";
case BT_HCI_EVT_LE_CONN_PARAM_REQ: return "LE_CONN_PARAM_REQ";
case BT_HCI_EVT_LE_DATA_LEN_CHANGE: return "LE_DATA_LEN_CHANGE";
case BT_HCI_EVT_LE_P256_PUBLIC_KEY_COMPLETE: return "LE_P256_PUBLIC_KEY_COMPLETE";
case BT_HCI_EVT_LE_GENERATE_DHKEY_COMPLETE: return "LE_GENERATE_DHKEY_COMPLETE";
case BT_HCI_EVT_LE_ENH_CONN_COMPLETE: return "LE_ENH_CONN_COMPLETE";
case BT_HCI_EVT_LE_DIRECT_ADV_REPORT: return "LE_DIRECT_ADV_REPORT";
case BT_HCI_EVT_LE_PHY_UPDATE_COMPLETE: return "LE_PHY_UPDATE_COMPLETE";
case BT_HCI_EVT_LE_EXT_ADVERTISING_REPORT: return "LE_EXT_ADVERTISING_REPORT";
case BT_HCI_EVT_LE_PER_ADV_SYNC_ESTABLISHED: return "LE_PER_ADV_SYNC_ESTABLISHED";
case BT_HCI_EVT_LE_PER_ADVERTISING_REPORT: return "LE_PER_ADVERTISING_REPORT";
case BT_HCI_EVT_LE_PER_ADV_SYNC_LOST: return "LE_PER_ADV_SYNC_LOST";
case BT_HCI_EVT_LE_SCAN_TIMEOUT: return "LE_SCAN_TIMEOUT";
case BT_HCI_EVT_LE_ADV_SET_TERMINATED: return "LE_ADV_SET_TERMINATED";
case BT_HCI_EVT_LE_SCAN_REQ_RECEIVED: return "LE_SCAN_REQ_RECEIVED";
case BT_HCI_EVT_LE_CHAN_SEL_ALGO: return "LE_CHAN_SEL_ALGO";
default: return "";
}
}
STATIC const char* hci_opcode_name(uint16_t opcode) {
switch (opcode) {
case BT_OP_NOP: return "NOP";
case BT_HCI_OP_INQUIRY: return "INQUIRY";
case BT_HCI_OP_INQUIRY_CANCEL: return "INQUIRY_CANCEL";
case BT_HCI_OP_CONNECT: return "CONNECT";
case BT_HCI_OP_DISCONNECT: return "DISCONNECT";
case BT_HCI_OP_CONNECT_CANCEL: return "CONNECT_CANCEL";
case BT_HCI_OP_ACCEPT_CONN_REQ: return "ACCEPT_CONN_REQ";
case BT_HCI_OP_SETUP_SYNC_CONN: return "SETUP_SYNC_CONN";
case BT_HCI_OP_ACCEPT_SYNC_CONN_REQ: return "ACCEPT_SYNC_CONN_REQ";
case BT_HCI_OP_REJECT_CONN_REQ: return "REJECT_CONN_REQ";
case BT_HCI_OP_LINK_KEY_REPLY: return "LINK_KEY_REPLY";
case BT_HCI_OP_LINK_KEY_NEG_REPLY: return "LINK_KEY_NEG_REPLY";
case BT_HCI_OP_PIN_CODE_REPLY: return "PIN_CODE_REPLY";
case BT_HCI_OP_PIN_CODE_NEG_REPLY: return "PIN_CODE_NEG_REPLY";
case BT_HCI_OP_AUTH_REQUESTED: return "AUTH_REQUESTED";
case BT_HCI_OP_SET_CONN_ENCRYPT: return "SET_CONN_ENCRYPT";
case BT_HCI_OP_REMOTE_NAME_REQUEST: return "REMOTE_NAME_REQUEST";
case BT_HCI_OP_REMOTE_NAME_CANCEL: return "REMOTE_NAME_CANCEL";
case BT_HCI_OP_READ_REMOTE_FEATURES: return "READ_REMOTE_FEATURES";
case BT_HCI_OP_READ_REMOTE_EXT_FEATURES: return "READ_REMOTE_EXT_FEATURES";
case BT_HCI_OP_READ_REMOTE_VERSION_INFO: return "READ_REMOTE_VERSION_INFO";
case BT_HCI_OP_IO_CAPABILITY_REPLY: return "IO_CAPABILITY_REPLY";
case BT_HCI_OP_USER_CONFIRM_REPLY: return "USER_CONFIRM_REPLY";
case BT_HCI_OP_USER_CONFIRM_NEG_REPLY: return "USER_CONFIRM_NEG_REPLY";
case BT_HCI_OP_USER_PASSKEY_REPLY: return "USER_PASSKEY_REPLY";
case BT_HCI_OP_USER_PASSKEY_NEG_REPLY: return "USER_PASSKEY_NEG_REPLY";
case BT_HCI_OP_IO_CAPABILITY_NEG_REPLY: return "IO_CAPABILITY_NEG_REPLY";
case BT_HCI_OP_SET_EVENT_MASK: return "SET_EVENT_MASK";
case BT_HCI_OP_RESET: return "RESET";
case BT_HCI_OP_WRITE_LOCAL_NAME: return "WRITE_LOCAL_NAME";
case BT_HCI_OP_WRITE_PAGE_TIMEOUT: return "WRITE_PAGE_TIMEOUT";
case BT_HCI_OP_WRITE_SCAN_ENABLE: return "WRITE_SCAN_ENABLE";
case BT_HCI_OP_READ_TX_POWER_LEVEL: return "READ_TX_POWER_LEVEL";
case BT_HCI_OP_SET_CTL_TO_HOST_FLOW: return "SET_CTL_TO_HOST_FLOW";
case BT_HCI_OP_HOST_BUFFER_SIZE: return "HOST_BUFFER_SIZE";
case BT_HCI_OP_HOST_NUM_COMPLETED_PACKETS: return "HOST_NUM_COMPLETED_PACKETS";
case BT_HCI_OP_WRITE_INQUIRY_MODE: return "WRITE_INQUIRY_MODE";
case BT_HCI_OP_WRITE_SSP_MODE: return "WRITE_SSP_MODE";
case BT_HCI_OP_SET_EVENT_MASK_PAGE_2: return "SET_EVENT_MASK_PAGE_2";
case BT_HCI_OP_LE_WRITE_LE_HOST_SUPP: return "LE_WRITE_LE_HOST_SUPP";
case BT_HCI_OP_WRITE_SC_HOST_SUPP: return "WRITE_SC_HOST_SUPP";
case BT_HCI_OP_READ_AUTH_PAYLOAD_TIMEOUT: return "READ_AUTH_PAYLOAD_TIMEOUT";
case BT_HCI_OP_WRITE_AUTH_PAYLOAD_TIMEOUT: return "WRITE_AUTH_PAYLOAD_TIMEOUT";
case BT_HCI_OP_READ_LOCAL_VERSION_INFO: return "READ_LOCAL_VERSION_INFO";
case BT_HCI_OP_READ_SUPPORTED_COMMANDS: return "READ_SUPPORTED_COMMANDS";
case BT_HCI_OP_READ_LOCAL_EXT_FEATURES: return "READ_LOCAL_EXT_FEATURES";
case BT_HCI_OP_READ_LOCAL_FEATURES: return "READ_LOCAL_FEATURES";
case BT_HCI_OP_READ_BUFFER_SIZE: return "READ_BUFFER_SIZE";
case BT_HCI_OP_READ_BD_ADDR: return "READ_BD_ADDR";
case BT_HCI_OP_READ_RSSI: return "READ_RSSI";
case BT_HCI_OP_READ_ENCRYPTION_KEY_SIZE: return "READ_ENCRYPTION_KEY_SIZE";
case BT_HCI_OP_LE_SET_EVENT_MASK: return "LE_SET_EVENT_MASK";
case BT_HCI_OP_LE_READ_BUFFER_SIZE: return "LE_READ_BUFFER_SIZE";
case BT_HCI_OP_LE_READ_LOCAL_FEATURES: return "LE_READ_LOCAL_FEATURES";
case BT_HCI_OP_LE_SET_RANDOM_ADDRESS: return "LE_SET_RANDOM_ADDRESS";
case BT_HCI_OP_LE_SET_ADV_PARAM: return "LE_SET_ADV_PARAM";
case BT_HCI_OP_LE_READ_ADV_CHAN_TX_POWER: return "LE_READ_ADV_CHAN_TX_POWER";
case BT_HCI_OP_LE_SET_ADV_DATA: return "LE_SET_ADV_DATA";
case BT_HCI_OP_LE_SET_SCAN_RSP_DATA: return "LE_SET_SCAN_RSP_DATA";
case BT_HCI_OP_LE_SET_ADV_ENABLE: return "LE_SET_ADV_ENABLE";
case BT_HCI_OP_LE_SET_SCAN_PARAM: return "LE_SET_SCAN_PARAM";
case BT_HCI_OP_LE_SET_SCAN_ENABLE: return "LE_SET_SCAN_ENABLE";
case BT_HCI_OP_LE_CREATE_CONN: return "LE_CREATE_CONN";
case BT_HCI_OP_LE_CREATE_CONN_CANCEL: return "LE_CREATE_CONN_CANCEL";
case BT_HCI_OP_LE_READ_WL_SIZE: return "LE_READ_WL_SIZE";
case BT_HCI_OP_LE_CLEAR_WL: return "LE_CLEAR_WL";
case BT_HCI_OP_LE_ADD_DEV_TO_WL: return "LE_ADD_DEV_TO_WL";
case BT_HCI_OP_LE_REM_DEV_FROM_WL: return "LE_REM_DEV_FROM_WL";
case BT_HCI_OP_LE_CONN_UPDATE: return "LE_CONN_UPDATE";
case BT_HCI_OP_LE_SET_HOST_CHAN_CLASSIF: return "LE_SET_HOST_CHAN_CLASSIF";
case BT_HCI_OP_LE_READ_CHAN_MAP: return "LE_READ_CHAN_MAP";
case BT_HCI_OP_LE_READ_REMOTE_FEATURES: return "LE_READ_REMOTE_FEATURES";
case BT_HCI_OP_LE_ENCRYPT: return "LE_ENCRYPT";
case BT_HCI_OP_LE_RAND: return "LE_RAND";
case BT_HCI_OP_LE_START_ENCRYPTION: return "LE_START_ENCRYPTION";
case BT_HCI_OP_LE_LTK_REQ_REPLY: return "LE_LTK_REQ_REPLY";
case BT_HCI_OP_LE_LTK_REQ_NEG_REPLY: return "LE_LTK_REQ_NEG_REPLY";
case BT_HCI_OP_LE_READ_SUPP_STATES: return "LE_READ_SUPP_STATES";
case BT_HCI_OP_LE_RX_TEST: return "LE_RX_TEST";
case BT_HCI_OP_LE_TX_TEST: return "LE_TX_TEST";
case BT_HCI_OP_LE_TEST_END: return "LE_TEST_END";
case BT_HCI_OP_LE_CONN_PARAM_REQ_REPLY: return "LE_CONN_PARAM_REQ_REPLY";
case BT_HCI_OP_LE_CONN_PARAM_REQ_NEG_REPLY: return "LE_CONN_PARAM_REQ_NEG_REPLY";
case BT_HCI_OP_LE_SET_DATA_LEN: return "LE_SET_DATA_LEN";
case BT_HCI_OP_LE_READ_DEFAULT_DATA_LEN: return "LE_READ_DEFAULT_DATA_LEN";
case BT_HCI_OP_LE_WRITE_DEFAULT_DATA_LEN: return "LE_WRITE_DEFAULT_DATA_LEN";
case BT_HCI_OP_LE_P256_PUBLIC_KEY: return "LE_P256_PUBLIC_KEY";
case BT_HCI_OP_LE_GENERATE_DHKEY: return "LE_GENERATE_DHKEY";
case BT_HCI_OP_LE_ADD_DEV_TO_RL: return "LE_ADD_DEV_TO_RL";
case BT_HCI_OP_LE_REM_DEV_FROM_RL: return "LE_REM_DEV_FROM_RL";
case BT_HCI_OP_LE_CLEAR_RL: return "LE_CLEAR_RL";
case BT_HCI_OP_LE_READ_RL_SIZE: return "LE_READ_RL_SIZE";
case BT_HCI_OP_LE_READ_PEER_RPA: return "LE_READ_PEER_RPA";
case BT_HCI_OP_LE_READ_LOCAL_RPA: return "LE_READ_LOCAL_RPA";
case BT_HCI_OP_LE_SET_ADDR_RES_ENABLE: return "LE_SET_ADDR_RES_ENABLE";
case BT_HCI_OP_LE_SET_RPA_TIMEOUT: return "LE_SET_RPA_TIMEOUT";
case BT_HCI_OP_LE_READ_MAX_DATA_LEN: return "LE_READ_MAX_DATA_LEN";
case BT_HCI_OP_LE_READ_PHY: return "LE_READ_PHY";
case BT_HCI_OP_LE_SET_DEFAULT_PHY: return "LE_SET_DEFAULT_PHY";
case BT_HCI_OP_LE_SET_PHY: return "LE_SET_PHY";
case BT_HCI_OP_LE_ENH_RX_TEST: return "LE_ENH_RX_TEST";
case BT_HCI_OP_LE_ENH_TX_TEST: return "LE_ENH_TX_TEST";
case BT_HCI_OP_LE_SET_ADV_SET_RANDOM_ADDR: return "LE_SET_ADV_SET_RANDOM_ADDR";
case BT_HCI_OP_LE_SET_EXT_ADV_PARAM: return "LE_SET_EXT_ADV_PARAM";
case BT_HCI_OP_LE_SET_EXT_ADV_DATA: return "LE_SET_EXT_ADV_DATA";
case BT_HCI_OP_LE_SET_EXT_SCAN_RSP_DATA: return "LE_SET_EXT_SCAN_RSP_DATA";
case BT_HCI_OP_LE_SET_EXT_ADV_ENABLE: return "LE_SET_EXT_ADV_ENABLE";
case BT_HCI_OP_LE_READ_MAX_ADV_DATA_LEN: return "LE_READ_MAX_ADV_DATA_LEN";
case BT_HCI_OP_LE_READ_NUM_ADV_SETS: return "LE_READ_NUM_ADV_SETS";
case BT_HCI_OP_LE_REMOVE_ADV_SET: return "LE_REMOVE_ADV_SET";
case BT_HCI_OP_CLEAR_ADV_SETS: return "CLEAR_ADV_SETS";
case BT_HCI_OP_LE_SET_PER_ADV_PARAM: return "LE_SET_PER_ADV_PARAM";
case BT_HCI_OP_LE_SET_PER_ADV_DATA: return "LE_SET_PER_ADV_DATA";
case BT_HCI_OP_LE_SET_PER_ADV_ENABLE: return "LE_SET_PER_ADV_ENABLE";
case BT_HCI_OP_LE_SET_EXT_SCAN_PARAM: return "LE_SET_EXT_SCAN_PARAM";
case BT_HCI_OP_LE_SET_EXT_SCAN_ENABLE: return "LE_SET_EXT_SCAN_ENABLE";
case BT_HCI_OP_LE_EXT_CREATE_CONN: return "LE_EXT_CREATE_CONN";
case BT_HCI_OP_LE_PER_ADV_CREATE_SYNC: return "LE_PER_ADV_CREATE_SYNC";
case BT_HCI_OP_LE_PER_ADV_CREATE_SYNC_CANCEL: return "LE_PER_ADV_CREATE_SYNC_CANCEL";
case BT_HCI_OP_LE_PER_ADV_TERMINATE_SYNC: return "LE_PER_ADV_TERMINATE_SYNC";
case BT_HCI_OP_LE_ADD_DEV_TO_PER_ADV_LIST: return "LE_ADD_DEV_TO_PER_ADV_LIST";
case BT_HCI_OP_LE_REM_DEV_FROM_PER_ADV_LIST: return "LE_REM_DEV_FROM_PER_ADV_LIST";
case BT_HCI_OP_LE_CLEAR_PER_ADV_LIST: return "LE_CLEAR_PER_ADV_LIST";
case BT_HCI_OP_LE_READ_PER_ADV_LIST_SIZE: return "LE_READ_PER_ADV_LIST_SIZE";
case BT_HCI_OP_LE_READ_TX_POWER: return "LE_READ_TX_POWER";
case BT_HCI_OP_LE_READ_RF_PATH_COMP: return "LE_READ_RF_PATH_COMP";
case BT_HCI_OP_LE_WRITE_RF_PATH_COMP: return "LE_WRITE_RF_PATH_COMP";
case BT_HCI_OP_LE_SET_PRIVACY_MODE: return "LE_SET_PRIVACY_MODE";
default: return "";
}
}
STATIC void dump_cmd_pkt(bool tx, uint8_t pkt_len, uint8_t pkt_data[]) {
h4_hci_cmd_pkt_t *pkt = (h4_hci_cmd_pkt_t *) pkt_data;
mp_printf(&mp_plat_print,
"%s HCI COMMAND (%x) op: %s (%04x), len: %d, data: ",
tx ? "TX->" : "RX<-",
pkt->pkt_type,
hci_opcode_name(pkt->opcode), pkt->opcode, pkt->param_len);
for (size_t i = 0; i < pkt->param_len; i++) {
mp_printf(&mp_plat_print, "%02x ", pkt->params[i]);
}
if (pkt_len != sizeof(h4_hci_cmd_pkt_t) + pkt->param_len) {
mp_printf(&mp_plat_print, " LENGTH MISMATCH, pkt_len: %d", pkt_len);
}
mp_printf(&mp_plat_print, "\n");
}
STATIC void dump_acl_pkt(bool tx, uint8_t pkt_len, uint8_t pkt_data[]) {
h4_hci_acl_pkt_t *pkt = (h4_hci_acl_pkt_t *) pkt_data;
acl_data_t *acl = (acl_data_t *) pkt->data;
mp_printf(&mp_plat_print,
"%s HCI ACLDATA (%x) ",
tx ? "TX->" : "RX<-", pkt->pkt_type);
if (pkt->pb != ACL_DATA_PB_MIDDLE && acl->cid == BT_L2CAP_CID_ATT) {
// This is the start of a fragmented acl_data packet or is a full packet,
// and is an ATT protocol packet.
mp_printf(&mp_plat_print, "att: %s (%02x), ", att_opcode_name(acl->acl_data[0]), acl->acl_data[0]);
}
mp_printf(&mp_plat_print,
"handle: %04x, pb: %d, bc: %d, data_len: %d, ",
pkt->handle, pkt->pb, pkt->bc, pkt->data_len);
if (pkt->pb != ACL_DATA_PB_MIDDLE) {
// This is the start of a fragmented acl_data packet or is a full packet.
mp_printf(&mp_plat_print,
"acl data_len: %d, cid: %04x, data: ",
acl->acl_data_len, acl->cid);
for (size_t i = 0; i < acl->acl_data_len; i++) {
mp_printf(&mp_plat_print, "%02x ", acl->acl_data[i]);
}
} else {
for (size_t i = 0; i < pkt->data_len; i++) {
mp_printf(&mp_plat_print, "more data: %02x ", pkt->data[i]);
}
}
if (pkt_len != sizeof(h4_hci_acl_pkt_t) + pkt->data_len) {
mp_printf(&mp_plat_print, " LENGTH MISMATCH, pkt_len: %d", pkt_len);
}
mp_printf(&mp_plat_print, "\n");
}
STATIC void dump_evt_pkt(bool tx, uint8_t pkt_len, uint8_t pkt_data[]) {
h4_hci_evt_pkt_t *pkt = (h4_hci_evt_pkt_t *) pkt_data;
mp_printf(&mp_plat_print,
"%s HCI EVENT (%x) evt: %s (%02x), param_len: %d, data: ",
tx ? "TX->" : "RX<-",
pkt->pkt_type,
pkt->evt == BT_HCI_EVT_LE_META_EVENT
? hci_evt_le_name(pkt->params[0])
: hci_evt_name(pkt->evt),
pkt->evt, pkt->param_len);
for (size_t i = 0; i < pkt->param_len; i++) {
mp_printf(&mp_plat_print, "%02x ", pkt->params[i]);
}
if (pkt_len != sizeof(h4_hci_evt_pkt_t) + pkt->param_len) {
mp_printf(&mp_plat_print, " LENGTH MISMATCH, pkt_len: %d", pkt_len);
}
mp_printf(&mp_plat_print, "\n");
}

View File

@ -0,0 +1,2 @@
The HCI-related include files here were copied from the Zephyr project, from this commit:
https://github.com/zephyrproject-rtos/zephyr/tree/0a87f9359edf1ec1c169626df3e19c2b4a4e9646/include/bluetooth

View File

@ -0,0 +1,101 @@
// CircuitPython: Adapted from Zephyer include files.
/** @file
* @brief Bluetooth device address definitions and utilities.
*/
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
* Copyright 2020 Dan Halbert for Adafruit Industries
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_ADDR_H_
#define ZEPHYR_INCLUDE_BLUETOOTH_ADDR_H_
#include <stdbool.h>
#include <string.h>
/**
* @brief Bluetooth device address definitions and utilities.
* @defgroup bt_addr Device Address
* @ingroup bluetooth
* @{
*/
#define BT_ADDR_LE_PUBLIC 0x00
#define BT_ADDR_LE_RANDOM 0x01
#define BT_ADDR_LE_PUBLIC_ID 0x02
#define BT_ADDR_LE_RANDOM_ID 0x03
/** Bluetooth Device Address */
typedef struct {
uint8_t val[6];
} bt_addr_t;
/** Bluetooth LE Device Address */
typedef struct {
uint8_t type;
bt_addr_t a;
} bt_addr_le_t;
#define BT_ADDR_ANY ((bt_addr_t[]) { { { 0, 0, 0, 0, 0, 0 } } })
#define BT_ADDR_NONE ((bt_addr_t[]) { { \
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } })
#define BT_ADDR_LE_ANY ((bt_addr_le_t[]) { { 0, { { 0, 0, 0, 0, 0, 0 } } } })
#define BT_ADDR_LE_NONE ((bt_addr_le_t[]) { { 0, \
{ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } } })
static inline int bt_addr_cmp(const bt_addr_t *a, const bt_addr_t *b)
{
return memcmp(a, b, sizeof(*a));
}
static inline int bt_addr_le_cmp(const bt_addr_le_t *a, const bt_addr_le_t *b)
{
return memcmp(a, b, sizeof(*a));
}
static inline void bt_addr_copy(bt_addr_t *dst, const bt_addr_t *src)
{
memcpy(dst, src, sizeof(*dst));
}
static inline void bt_addr_le_copy(bt_addr_le_t *dst, const bt_addr_le_t *src)
{
memcpy(dst, src, sizeof(*dst));
}
#define BT_ADDR_IS_RPA(a) (((a)->val[5] & 0xc0) == 0x40)
#define BT_ADDR_IS_NRPA(a) (((a)->val[5] & 0xc0) == 0x00)
#define BT_ADDR_IS_STATIC(a) (((a)->val[5] & 0xc0) == 0xc0)
#define BT_ADDR_SET_RPA(a) ((a)->val[5] = (((a)->val[5] & 0x3f) | 0x40))
#define BT_ADDR_SET_NRPA(a) ((a)->val[5] &= 0x3f)
#define BT_ADDR_SET_STATIC(a) ((a)->val[5] |= 0xc0)
int bt_addr_le_create_nrpa(bt_addr_le_t *addr);
int bt_addr_le_create_static(bt_addr_le_t *addr);
static inline bool bt_addr_le_is_rpa(const bt_addr_le_t *addr)
{
if (addr->type != BT_ADDR_LE_RANDOM) {
return false;
}
return BT_ADDR_IS_RPA(&addr->a);
}
static inline bool bt_addr_le_is_identity(const bt_addr_le_t *addr)
{
if (addr->type == BT_ADDR_LE_PUBLIC) {
return true;
}
return BT_ADDR_IS_STATIC(&addr->a);
}
/**
* @}
*/
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_ADDR_H_ */

View File

@ -0,0 +1,41 @@
// CircuitPython: Adapted from Zephyr include file.
/** @file
* @brief Attribute Protocol handling.
*/
/*
* Copyright (c) 2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_
#define ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_
/* Error codes for Error response PDU */
#define BT_ATT_ERR_INVALID_HANDLE 0x01
#define BT_ATT_ERR_READ_NOT_PERMITTED 0x02
#define BT_ATT_ERR_WRITE_NOT_PERMITTED 0x03
#define BT_ATT_ERR_INVALID_PDU 0x04
#define BT_ATT_ERR_AUTHENTICATION 0x05
#define BT_ATT_ERR_NOT_SUPPORTED 0x06
#define BT_ATT_ERR_INVALID_OFFSET 0x07
#define BT_ATT_ERR_AUTHORIZATION 0x08
#define BT_ATT_ERR_PREPARE_QUEUE_FULL 0x09
#define BT_ATT_ERR_ATTRIBUTE_NOT_FOUND 0x0a
#define BT_ATT_ERR_ATTRIBUTE_NOT_LONG 0x0b
#define BT_ATT_ERR_ENCRYPTION_KEY_SIZE 0x0c
#define BT_ATT_ERR_INVALID_ATTRIBUTE_LEN 0x0d
#define BT_ATT_ERR_UNLIKELY 0x0e
#define BT_ATT_ERR_INSUFFICIENT_ENCRYPTION 0x0f
#define BT_ATT_ERR_UNSUPPORTED_GROUP_TYPE 0x10
#define BT_ATT_ERR_INSUFFICIENT_RESOURCES 0x11
#define BT_ATT_ERR_DB_OUT_OF_SYNC 0x12
#define BT_ATT_ERR_VALUE_NOT_ALLOWED 0x13
/* Common Profile Error Codes (from CSS) */
#define BT_ATT_ERR_WRITE_REQ_REJECTED 0xfc
#define BT_ATT_ERR_CCC_IMPROPER_CONF 0xfd
#define BT_ATT_ERR_PROCEDURE_IN_PROGRESS 0xfe
#define BT_ATT_ERR_OUT_OF_RANGE 0xff
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_ */

View File

@ -0,0 +1,266 @@
// CircuitPython: Adapted from Zephyr include file.
/* att_internal.h - Attribute protocol handling */
/*
* Copyright (c) 2015-2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
// for __packed
#include <string.h>
#define BT_EATT_PSM 0x27
#define BT_ATT_DEFAULT_LE_MTU 23
#define BT_ATT_TIMEOUT K_SECONDS(30)
//FIX #if BT_L2CAP_RX_MTU < CONFIG_BT_L2CAP_TX_MTU
// #define BT_ATT_MTU BT_L2CAP_RX_MTU
// #else
// #define BT_ATT_MTU CONFIG_BT_L2CAP_TX_MTU
// #endif
struct bt_att_hdr {
uint8_t code;
} __packed;
#define BT_ATT_OP_ERROR_RSP 0x01
struct bt_att_error_rsp {
uint8_t request;
uint16_t handle;
uint8_t error;
} __packed;
#define BT_ATT_OP_MTU_REQ 0x02
struct bt_att_exchange_mtu_req {
uint16_t mtu;
} __packed;
#define BT_ATT_OP_MTU_RSP 0x03
struct bt_att_exchange_mtu_rsp {
uint16_t mtu;
} __packed;
/* Find Information Request */
#define BT_ATT_OP_FIND_INFO_REQ 0x04
struct bt_att_find_info_req {
uint16_t start_handle;
uint16_t end_handle;
} __packed;
/* Format field values for BT_ATT_OP_FIND_INFO_RSP */
#define BT_ATT_INFO_16 0x01
#define BT_ATT_INFO_128 0x02
struct bt_att_info_16 {
uint16_t handle;
uint16_t uuid;
} __packed;
struct bt_att_info_128 {
uint16_t handle;
uint8_t uuid[16];
} __packed;
/* Find Information Response */
#define BT_ATT_OP_FIND_INFO_RSP 0x05
struct bt_att_find_info_rsp {
uint8_t format;
uint8_t info[0];
} __packed;
/* Find By Type Value Request */
#define BT_ATT_OP_FIND_TYPE_REQ 0x06
struct bt_att_find_type_req {
uint16_t start_handle;
uint16_t end_handle;
uint16_t type;
uint8_t value[0];
} __packed;
struct bt_att_handle_group {
uint16_t start_handle;
uint16_t end_handle;
} __packed;
/* Find By Type Value Response */
#define BT_ATT_OP_FIND_TYPE_RSP 0x07
struct bt_att_find_type_rsp {
struct bt_att_handle_group list[0];
} __packed;
/* Read By Type Request */
#define BT_ATT_OP_READ_TYPE_REQ 0x08
struct bt_att_read_type_req {
uint16_t start_handle;
uint16_t end_handle;
uint8_t uuid[0];
} __packed;
struct bt_att_data {
uint16_t handle;
uint8_t value[0];
} __packed;
/* Read By Type Response */
#define BT_ATT_OP_READ_TYPE_RSP 0x09
struct bt_att_read_type_rsp {
uint8_t len;
struct bt_att_data data[0];
} __packed;
/* Read Request */
#define BT_ATT_OP_READ_REQ 0x0a
struct bt_att_read_req {
uint16_t handle;
} __packed;
/* Read Response */
#define BT_ATT_OP_READ_RSP 0x0b
struct bt_att_read_rsp {
uint8_t value[0];
} __packed;
/* Read Blob Request */
#define BT_ATT_OP_READ_BLOB_REQ 0x0c
struct bt_att_read_blob_req {
uint16_t handle;
uint16_t offset;
} __packed;
/* Read Blob Response */
#define BT_ATT_OP_READ_BLOB_RSP 0x0d
struct bt_att_read_blob_rsp {
uint8_t value[0];
} __packed;
/* Read Multiple Request */
#define BT_ATT_READ_MULT_MIN_LEN_REQ 0x04
#define BT_ATT_OP_READ_MULT_REQ 0x0e
struct bt_att_read_mult_req {
uint16_t handles[0];
} __packed;
/* Read Multiple Respose */
#define BT_ATT_OP_READ_MULT_RSP 0x0f
struct bt_att_read_mult_rsp {
uint8_t value[0];
} __packed;
/* Read by Group Type Request */
#define BT_ATT_OP_READ_GROUP_REQ 0x10
struct bt_att_read_group_req {
uint16_t start_handle;
uint16_t end_handle;
uint8_t uuid[0];
} __packed;
struct bt_att_group_data {
uint16_t start_handle;
uint16_t end_handle;
uint8_t value[0];
} __packed;
/* Read by Group Type Response */
#define BT_ATT_OP_READ_GROUP_RSP 0x11
struct bt_att_read_group_rsp {
uint8_t len;
struct bt_att_group_data data[0];
} __packed;
/* Write Request */
#define BT_ATT_OP_WRITE_REQ 0x12
struct bt_att_write_req {
uint16_t handle;
uint8_t value[0];
} __packed;
/* Write Response */
#define BT_ATT_OP_WRITE_RSP 0x13
/* Prepare Write Request */
#define BT_ATT_OP_PREPARE_WRITE_REQ 0x16
struct bt_att_prepare_write_req {
uint16_t handle;
uint16_t offset;
uint8_t value[0];
} __packed;
/* Prepare Write Respond */
#define BT_ATT_OP_PREPARE_WRITE_RSP 0x17
struct bt_att_prepare_write_rsp {
uint16_t handle;
uint16_t offset;
uint8_t value[0];
} __packed;
/* Execute Write Request */
#define BT_ATT_FLAG_CANCEL 0x00
#define BT_ATT_FLAG_EXEC 0x01
#define BT_ATT_OP_EXEC_WRITE_REQ 0x18
struct bt_att_exec_write_req {
uint8_t flags;
} __packed;
/* Execute Write Response */
#define BT_ATT_OP_EXEC_WRITE_RSP 0x19
/* Handle Value Notification */
#define BT_ATT_OP_NOTIFY 0x1b
struct bt_att_notify {
uint16_t handle;
uint8_t value[0];
} __packed;
/* Handle Value Indication */
#define BT_ATT_OP_INDICATE 0x1d
struct bt_att_indicate {
uint16_t handle;
uint8_t value[0];
} __packed;
/* Handle Value Confirm */
#define BT_ATT_OP_CONFIRM 0x1e
struct bt_att_signature {
uint8_t value[12];
} __packed;
#define BT_ATT_OP_READ_MULT_VL_REQ 0x20
struct bt_att_read_mult_vl_req {
uint16_t handles[0];
} __packed;
/* Read Multiple Respose */
#define BT_ATT_OP_READ_MULT_VL_RSP 0x21
struct bt_att_read_mult_vl_rsp {
uint16_t len;
uint8_t value[0];
} __packed;
/* Handle Multiple Value Notification */
#define BT_ATT_OP_NOTIFY_MULT 0x23
struct bt_att_notify_mult {
uint16_t handle;
uint16_t len;
uint8_t value[0];
} __packed;
/* Write Command */
#define BT_ATT_OP_WRITE_CMD 0x52
struct bt_att_write_cmd {
uint16_t handle;
uint8_t value[0];
} __packed;
/* Signed Write Command */
#define BT_ATT_OP_SIGNED_WRITE_CMD 0xd2
struct bt_att_signed_write_cmd {
uint16_t handle;
uint8_t value[0];
} __packed;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,92 @@
/** @file
* @brief Bluetooth Host Control Interface status codes.
*/
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_STATUS_H_
#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_STATUS_H_
#ifdef __cplusplus
extern "C" {
#endif
/** HCI Error Codes, BT Core Spec v5.2 [Vol 1, Part F]. */
#define BT_HCI_ERR_SUCCESS 0x00
#define BT_HCI_ERR_UNKNOWN_CMD 0x01
#define BT_HCI_ERR_UNKNOWN_CONN_ID 0x02
#define BT_HCI_ERR_HW_FAILURE 0x03
#define BT_HCI_ERR_PAGE_TIMEOUT 0x04
#define BT_HCI_ERR_AUTH_FAIL 0x05
#define BT_HCI_ERR_PIN_OR_KEY_MISSING 0x06
#define BT_HCI_ERR_MEM_CAPACITY_EXCEEDED 0x07
#define BT_HCI_ERR_CONN_TIMEOUT 0x08
#define BT_HCI_ERR_CONN_LIMIT_EXCEEDED 0x09
#define BT_HCI_ERR_SYNC_CONN_LIMIT_EXCEEDED 0x0a
#define BT_HCI_ERR_CONN_ALREADY_EXISTS 0x0b
#define BT_HCI_ERR_CMD_DISALLOWED 0x0c
#define BT_HCI_ERR_INSUFFICIENT_RESOURCES 0x0d
#define BT_HCI_ERR_INSUFFICIENT_SECURITY 0x0e
#define BT_HCI_ERR_BD_ADDR_UNACCEPTABLE 0x0f
#define BT_HCI_ERR_CONN_ACCEPT_TIMEOUT 0x10
#define BT_HCI_ERR_UNSUPP_FEATURE_PARAM_VAL 0x11
#define BT_HCI_ERR_INVALID_PARAM 0x12
#define BT_HCI_ERR_REMOTE_USER_TERM_CONN 0x13
#define BT_HCI_ERR_REMOTE_LOW_RESOURCES 0x14
#define BT_HCI_ERR_REMOTE_POWER_OFF 0x15
#define BT_HCI_ERR_LOCALHOST_TERM_CONN 0x16
#define BT_HCI_ERR_REPEATED_ATTEMPTS 0x17
#define BT_HCI_ERR_PAIRING_NOT_ALLOWED 0x18
#define BT_HCI_ERR_UNKNOWN_LMP_PDU 0x19
#define BT_HCI_ERR_UNSUPP_REMOTE_FEATURE 0x1a
#define BT_HCI_ERR_SCO_OFFSET_REJECTED 0x1b
#define BT_HCI_ERR_SCO_INTERVAL_REJECTED 0x1c
#define BT_HCI_ERR_SCO_AIR_MODE_REJECTED 0x1d
#define BT_HCI_ERR_INVALID_LL_PARAM 0x1e
#define BT_HCI_ERR_UNSPECIFIED 0x1f
#define BT_HCI_ERR_UNSUPP_LL_PARAM_VAL 0x20
#define BT_HCI_ERR_ROLE_CHANGE_NOT_ALLOWED 0x21
#define BT_HCI_ERR_LL_RESP_TIMEOUT 0x22
#define BT_HCI_ERR_LL_PROC_COLLISION 0x23
#define BT_HCI_ERR_LMP_PDU_NOT_ALLOWED 0x24
#define BT_HCI_ERR_ENC_MODE_NOT_ACCEPTABLE 0x25
#define BT_HCI_ERR_LINK_KEY_CANNOT_BE_CHANGED 0x26
#define BT_HCI_ERR_REQUESTED_QOS_NOT_SUPPORTED 0x27
#define BT_HCI_ERR_INSTANT_PASSED 0x28
#define BT_HCI_ERR_PAIRING_NOT_SUPPORTED 0x29
#define BT_HCI_ERR_DIFF_TRANS_COLLISION 0x2a
#define BT_HCI_ERR_QOS_UNACCEPTABLE_PARAM 0x2c
#define BT_HCI_ERR_QOS_REJECTED 0x2d
#define BT_HCI_ERR_CHAN_ASSESS_NOT_SUPPORTED 0x2e
#define BT_HCI_ERR_INSUFF_SECURITY 0x2f
#define BT_HCI_ERR_PARAM_OUT_OF_MANDATORY_RANGE 0x30
#define BT_HCI_ERR_ROLE_SWITCH_PENDING 0x32
#define BT_HCI_ERR_RESERVED_SLOT_VIOLATION 0x34
#define BT_HCI_ERR_ROLE_SWITCH_FAILED 0x35
#define BT_HCI_ERR_EXT_INQ_RESP_TOO_LARGE 0x36
#define BT_HCI_ERR_SIMPLE_PAIR_NOT_SUPP_BY_HOST 0x37
#define BT_HCI_ERR_HOST_BUSY_PAIRING 0x38
#define BT_HCI_ERR_CONN_REJECTED_DUE_TO_NO_CHAN 0x39
#define BT_HCI_ERR_CONTROLLER_BUSY 0x3a
#define BT_HCI_ERR_UNACCEPT_CONN_PARAM 0x3b
#define BT_HCI_ERR_ADV_TIMEOUT 0x3c
#define BT_HCI_ERR_TERM_DUE_TO_MIC_FAIL 0x3d
#define BT_HCI_ERR_CONN_FAIL_TO_ESTAB 0x3e
#define BT_HCI_ERR_MAC_CONN_FAILED 0x3f
#define BT_HCI_ERR_CLOCK_ADJUST_REJECTED 0x40
#define BT_HCI_ERR_SUBMAP_NOT_DEFINED 0x41
#define BT_HCI_ERR_UNKNOWN_ADV_IDENTIFIER 0x42
#define BT_HCI_ERR_LIMIT_REACHED 0x43
#define BT_HCI_ERR_OP_CANCELLED_BY_HOST 0x44
#define BT_HCI_ERR_PACKET_TOO_LONG 0x45
#define BT_HCI_ERR_AUTHENTICATION_FAIL __DEPRECATED_MACRO BT_HCI_ERR_AUTH_FAIL
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_STATUS_H_ */

View File

@ -0,0 +1,152 @@
/** @file
* @brief Bluetooth HCI RAW channel handling
*/
/*
* Copyright (c) 2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_
#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_
/**
* @brief HCI RAW channel
* @defgroup hci_raw HCI RAW channel
* @ingroup bluetooth
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
#if defined(CONFIG_BT_CTLR_TX_BUFFER_SIZE)
#define BT_L2CAP_MTU (CONFIG_BT_CTLR_TX_BUFFER_SIZE - BT_L2CAP_HDR_SIZE)
#else
#define BT_L2CAP_MTU 65 /* 64-byte public key + opcode */
#endif /* CONFIG_BT_CTLR */
/** Data size needed for ACL buffers */
#define BT_BUF_ACL_SIZE BT_L2CAP_BUF_SIZE(BT_L2CAP_MTU)
#if defined(CONFIG_BT_CTLR_TX_BUFFERS)
#define BT_HCI_ACL_COUNT CONFIG_BT_CTLR_TX_BUFFERS
#else
#define BT_HCI_ACL_COUNT 6
#endif
#define BT_BUF_TX_SIZE MAX(BT_BUF_RX_SIZE, BT_BUF_ACL_SIZE)
/** @brief Send packet to the Bluetooth controller
*
* Send packet to the Bluetooth controller. Caller needs to
* implement netbuf pool.
*
* @param buf netbuf packet to be send
*
* @return Zero on success or (negative) error code otherwise.
*/
int bt_send(struct net_buf *buf);
enum {
/** Passthrough mode
*
* While in this mode the buffers are passed as is between the stack
* and the driver.
*/
BT_HCI_RAW_MODE_PASSTHROUGH = 0x00,
/** H:4 mode
*
* While in this mode H:4 headers will added into the buffers
* according to the buffer type when coming from the stack and will be
* removed and used to set the buffer type.
*/
BT_HCI_RAW_MODE_H4 = 0x01,
};
/** @brief Set Bluetooth RAW channel mode
*
* Set access mode of Bluetooth RAW channel.
*
* @param mode Access mode.
*
* @return Zero on success or (negative) error code otherwise.
*/
int bt_hci_raw_set_mode(uint8_t mode);
/** @brief Get Bluetooth RAW channel mode
*
* Get access mode of Bluetooth RAW channel.
*
* @return Access mode.
*/
uint8_t bt_hci_raw_get_mode(void);
#define BT_HCI_ERR_EXT_HANDLED 0xff
/** Helper macro to define a command extension
*
* @param _op Opcode of the command.
* @param _min_len Minimal length of the command.
* @param _func Handler function to be called.
*/
#define BT_HCI_RAW_CMD_EXT(_op, _min_len, _func) \
{ \
.op = _op, \
.min_len = _min_len, \
.func = _func, \
}
struct bt_hci_raw_cmd_ext {
/** Opcode of the command */
uint16_t op;
/** Minimal length of the command */
size_t min_len;
/** Handler function.
*
* Handler function to be called when a command is intercepted.
*
* @param buf Buffer containing the command.
*
* @return HCI Status code or BT_HCI_ERR_EXT_HANDLED if command has
* been handled already and a response has been sent as oppose to
* BT_HCI_ERR_SUCCESS which just indicates that the command can be
* sent to the controller to be processed.
*/
uint8_t (*func)(struct net_buf *buf);
};
/** @brief Register Bluetooth RAW command extension table
*
* Register Bluetooth RAW channel command extension table, opcodes in this
* table are intercepted to sent to the handler function.
*
* @param cmds Pointer to the command extension table.
* @param size Size of the command extension table.
*/
void bt_hci_raw_cmd_ext_register(struct bt_hci_raw_cmd_ext *cmds, size_t size);
/** @brief Enable Bluetooth RAW channel:
*
* Enable Bluetooth RAW HCI channel.
*
* @param rx_queue netbuf queue where HCI packets received from the Bluetooth
* controller are to be queued. The queue is defined in the caller while
* the available buffers pools are handled in the stack.
*
* @return Zero on success or (negative) error code otherwise.
*/
int bt_enable_raw(struct k_fifo *rx_queue);
#ifdef __cplusplus
}
#endif
/**
* @}
*/
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_RAW_H_ */

View File

@ -0,0 +1,379 @@
/* hci_vs.h - Bluetooth Host Control Interface Vendor Specific definitions */
/*
* Copyright (c) 2017-2018 Nordic Semiconductor ASA
* Copyright (c) 2015-2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_VS_H_
#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_VS_H_
#include <bluetooth/hci.h>
#ifdef __cplusplus
extern "C" {
#endif
#define BT_VS_CMD_BIT_VERSION 0
#define BT_VS_CMD_BIT_SUP_CMD 1
#define BT_VS_CMD_BIT_SUP_FEAT 2
#define BT_VS_CMD_BIT_SET_EVT_MASK 3
#define BT_VS_CMD_BIT_RESET 4
#define BT_VS_CMD_BIT_WRITE_BDADDR 5
#define BT_VS_CMD_BIT_SET_TRACE_ENABLE 6
#define BT_VS_CMD_BIT_READ_BUILD_INFO 7
#define BT_VS_CMD_BIT_READ_STATIC_ADDRS 8
#define BT_VS_CMD_BIT_READ_KEY_ROOTS 9
#define BT_VS_CMD_BIT_READ_CHIP_TEMP 10
#define BT_VS_CMD_BIT_READ_HOST_STACK_CMD 11
#define BT_VS_CMD_BIT_SET_SCAN_REP_ENABLE 12
#define BT_VS_CMD_BIT_WRITE_TX_POWER 13
#define BT_VS_CMD_BIT_READ_TX_POWER 14
#define BT_VS_CMD_SUP_FEAT(cmd) BT_LE_FEAT_TEST(cmd, \
BT_VS_CMD_BIT_SUP_FEAT)
#define BT_VS_CMD_READ_STATIC_ADDRS(cmd) BT_LE_FEAT_TEST(cmd, \
BT_VS_CMD_BIT_READ_STATIC_ADDRS)
#define BT_VS_CMD_READ_KEY_ROOTS(cmd) BT_LE_FEAT_TEST(cmd, \
BT_VS_CMD_BIT_READ_KEY_ROOTS)
#define BT_HCI_VS_HW_PLAT_INTEL 0x0001
#define BT_HCI_VS_HW_PLAT_NORDIC 0x0002
#define BT_HCI_VS_HW_PLAT_NXP 0x0003
#define BT_HCI_VS_HW_VAR_NORDIC_NRF51X 0x0001
#define BT_HCI_VS_HW_VAR_NORDIC_NRF52X 0x0002
#define BT_HCI_VS_HW_VAR_NORDIC_NRF53X 0x0003
#define BT_HCI_VS_FW_VAR_STANDARD_CTLR 0x0001
#define BT_HCI_VS_FW_VAR_VS_CTLR 0x0002
#define BT_HCI_VS_FW_VAR_FW_LOADER 0x0003
#define BT_HCI_VS_FW_VAR_RESCUE_IMG 0x0004
#define BT_HCI_OP_VS_READ_VERSION_INFO BT_OP(BT_OGF_VS, 0x0001)
struct bt_hci_rp_vs_read_version_info {
uint8_t status;
uint16_t hw_platform;
uint16_t hw_variant;
uint8_t fw_variant;
uint8_t fw_version;
uint16_t fw_revision;
uint32_t fw_build;
} __packed;
#define BT_HCI_OP_VS_READ_SUPPORTED_COMMANDS BT_OP(BT_OGF_VS, 0x0002)
struct bt_hci_rp_vs_read_supported_commands {
uint8_t status;
uint8_t commands[64];
} __packed;
#define BT_HCI_OP_VS_READ_SUPPORTED_FEATURES BT_OP(BT_OGF_VS, 0x0003)
struct bt_hci_rp_vs_read_supported_features {
uint8_t status;
uint8_t features[8];
} __packed;
#define BT_HCI_OP_VS_SET_EVENT_MASK BT_OP(BT_OGF_VS, 0x0004)
struct bt_hci_cp_vs_set_event_mask {
uint8_t event_mask[8];
} __packed;
#define BT_HCI_VS_RESET_SOFT 0x00
#define BT_HCI_VS_RESET_HARD 0x01
#define BT_HCI_OP_VS_RESET BT_OP(BT_OGF_VS, 0x0005)
struct bt_hci_cp_vs_reset {
uint8_t type;
} __packed;
#define BT_HCI_OP_VS_WRITE_BD_ADDR BT_OP(BT_OGF_VS, 0x0006)
struct bt_hci_cp_vs_write_bd_addr {
bt_addr_t bdaddr;
} __packed;
#define BT_HCI_VS_TRACE_DISABLED 0x00
#define BT_HCI_VS_TRACE_ENABLED 0x01
#define BT_HCI_VS_TRACE_HCI_EVTS 0x00
#define BT_HCI_VS_TRACE_VDC 0x01
#define BT_HCI_OP_VS_SET_TRACE_ENABLE BT_OP(BT_OGF_VS, 0x0007)
struct bt_hci_cp_vs_set_trace_enable {
uint8_t enable;
uint8_t type;
} __packed;
#define BT_HCI_OP_VS_READ_BUILD_INFO BT_OP(BT_OGF_VS, 0x0008)
struct bt_hci_rp_vs_read_build_info {
uint8_t status;
uint8_t info[0];
} __packed;
struct bt_hci_vs_static_addr {
bt_addr_t bdaddr;
uint8_t ir[16];
} __packed;
#define BT_HCI_OP_VS_READ_STATIC_ADDRS BT_OP(BT_OGF_VS, 0x0009)
struct bt_hci_rp_vs_read_static_addrs {
uint8_t status;
uint8_t num_addrs;
struct bt_hci_vs_static_addr a[0];
} __packed;
#define BT_HCI_OP_VS_READ_KEY_HIERARCHY_ROOTS BT_OP(BT_OGF_VS, 0x000a)
struct bt_hci_rp_vs_read_key_hierarchy_roots {
uint8_t status;
uint8_t ir[16];
uint8_t er[16];
} __packed;
#define BT_HCI_OP_VS_READ_CHIP_TEMP BT_OP(BT_OGF_VS, 0x000b)
struct bt_hci_rp_vs_read_chip_temp {
uint8_t status;
int8_t temps;
} __packed;
struct bt_hci_vs_cmd {
uint16_t vendor_id;
uint16_t opcode_base;
} __packed;
#define BT_HCI_VS_VID_ANDROID 0x0001
#define BT_HCI_VS_VID_MICROSOFT 0x0002
#define BT_HCI_OP_VS_READ_HOST_STACK_CMDS BT_OP(BT_OGF_VS, 0x000c)
struct bt_hci_rp_vs_read_host_stack_cmds {
uint8_t status;
uint8_t num_cmds;
struct bt_hci_vs_cmd c[0];
} __packed;
#define BT_HCI_VS_SCAN_REQ_REPORTS_DISABLED 0x00
#define BT_HCI_VS_SCAN_REQ_REPORTS_ENABLED 0x01
#define BT_HCI_OP_VS_SET_SCAN_REQ_REPORTS BT_OP(BT_OGF_VS, 0x000d)
struct bt_hci_cp_vs_set_scan_req_reports {
uint8_t enable;
} __packed;
#define BT_HCI_VS_LL_HANDLE_TYPE_ADV 0x00
#define BT_HCI_VS_LL_HANDLE_TYPE_SCAN 0x01
#define BT_HCI_VS_LL_HANDLE_TYPE_CONN 0x02
#define BT_HCI_VS_LL_TX_POWER_LEVEL_NO_PREF 0x7F
#define BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL BT_OP(BT_OGF_VS, 0x000e)
struct bt_hci_cp_vs_write_tx_power_level {
uint8_t handle_type;
uint16_t handle;
int8_t tx_power_level;
} __packed;
struct bt_hci_rp_vs_write_tx_power_level {
uint8_t status;
uint8_t handle_type;
uint16_t handle;
int8_t selected_tx_power;
} __packed;
#define BT_HCI_OP_VS_READ_TX_POWER_LEVEL BT_OP(BT_OGF_VS, 0x000f)
struct bt_hci_cp_vs_read_tx_power_level {
uint8_t handle_type;
uint16_t handle;
} __packed;
struct bt_hci_rp_vs_read_tx_power_level {
uint8_t status;
uint8_t handle_type;
uint16_t handle;
int8_t tx_power_level;
} __packed;
#define BT_HCI_OP_VS_READ_USB_TRANSPORT_MODE BT_OP(BT_OGF_VS, 0x0010)
struct bt_hci_rp_vs_read_usb_transport_mode {
uint8_t status;
uint8_t num_supported_modes;
uint8_t supported_mode[0];
} __packed;
#define BT_HCI_VS_USB_H2_MODE 0x00
#define BT_HCI_VS_USB_H4_MODE 0x01
#define BT_HCI_OP_VS_SET_USB_TRANSPORT_MODE BT_OP(BT_OGF_VS, 0x0011)
struct bt_hci_cp_vs_set_usb_transport_mode {
uint8_t mode;
} __packed;
/* Events */
struct bt_hci_evt_vs {
uint8_t subevent;
} __packed;
#define BT_HCI_EVT_VS_FATAL_ERROR 0x02
struct bt_hci_evt_vs_fatal_error {
uint64_t pc;
uint8_t err_info[0];
} __packed;
#define BT_HCI_VS_TRACE_LMP_TX 0x01
#define BT_HCI_VS_TRACE_LMP_RX 0x02
#define BT_HCI_VS_TRACE_LLCP_TX 0x03
#define BT_HCI_VS_TRACE_LLCP_RX 0x04
#define BT_HCI_VS_TRACE_LE_CONN_IND 0x05
#define BT_HCI_EVT_VS_TRACE_INFO 0x03
struct bt_hci_evt_vs_trace_info {
uint8_t type;
uint8_t data[0];
} __packed;
#define BT_HCI_EVT_VS_SCAN_REQ_RX 0x04
struct bt_hci_evt_vs_scan_req_rx {
bt_addr_le_t addr;
int8_t rssi;
} __packed;
/* Event mask bits */
#define BT_EVT_MASK_VS_FATAL_ERROR BT_EVT_BIT(1)
#define BT_EVT_MASK_VS_TRACE_INFO BT_EVT_BIT(2)
#define BT_EVT_MASK_VS_SCAN_REQ_RX BT_EVT_BIT(3)
/* Mesh HCI commands */
#define BT_HCI_MESH_REVISION 0x01
#define BT_HCI_OP_VS_MESH BT_OP(BT_OGF_VS, 0x0042)
#define BT_HCI_MESH_EVT_PREFIX 0xF0
struct bt_hci_cp_mesh {
uint8_t opcode;
} __packed;
#define BT_HCI_OC_MESH_GET_OPTS 0x00
struct bt_hci_rp_mesh_get_opts {
uint8_t status;
uint8_t opcode;
uint8_t revision;
uint8_t ch_map;
int8_t min_tx_power;
int8_t max_tx_power;
uint8_t max_scan_filter;
uint8_t max_filter_pattern;
uint8_t max_adv_slot;
uint8_t max_tx_window;
uint8_t evt_prefix_len;
uint8_t evt_prefix;
} __packed;
#define BT_HCI_MESH_PATTERN_LEN_MAX 0x0f
#define BT_HCI_OC_MESH_SET_SCAN_FILTER 0x01
struct bt_hci_mesh_pattern {
uint8_t pattern_len;
uint8_t pattern[0];
} __packed;
struct bt_hci_cp_mesh_set_scan_filter {
uint8_t scan_filter;
uint8_t filter_dup;
uint8_t num_patterns;
struct bt_hci_mesh_pattern patterns[0];
} __packed;
struct bt_hci_rp_mesh_set_scan_filter {
uint8_t status;
uint8_t opcode;
uint8_t scan_filter;
} __packed;
#define BT_HCI_OC_MESH_ADVERTISE 0x02
struct bt_hci_cp_mesh_advertise {
uint8_t adv_slot;
uint8_t own_addr_type;
bt_addr_t random_addr;
uint8_t ch_map;
int8_t tx_power;
uint8_t min_tx_delay;
uint8_t max_tx_delay;
uint8_t retx_count;
uint8_t retx_interval;
uint8_t scan_delay;
uint16_t scan_duration;
uint8_t scan_filter;
uint8_t data_len;
uint8_t data[31];
} __packed;
struct bt_hci_rp_mesh_advertise {
uint8_t status;
uint8_t opcode;
uint8_t adv_slot;
} __packed;
#define BT_HCI_OC_MESH_ADVERTISE_TIMED 0x03
struct bt_hci_cp_mesh_advertise_timed {
uint8_t adv_slot;
uint8_t own_addr_type;
bt_addr_t random_addr;
uint8_t ch_map;
int8_t tx_power;
uint8_t retx_count;
uint8_t retx_interval;
uint32_t instant;
uint16_t tx_delay;
uint16_t tx_window;
uint8_t data_len;
uint8_t data[31];
} __packed;
struct bt_hci_rp_mesh_advertise_timed {
uint8_t status;
uint8_t opcode;
uint8_t adv_slot;
} __packed;
#define BT_HCI_OC_MESH_ADVERTISE_CANCEL 0x04
struct bt_hci_cp_mesh_advertise_cancel {
uint8_t adv_slot;
} __packed;
struct bt_hci_rp_mesh_advertise_cancel {
uint8_t status;
uint8_t opcode;
uint8_t adv_slot;
} __packed;
#define BT_HCI_OC_MESH_SET_SCANNING 0x05
struct bt_hci_cp_mesh_set_scanning {
uint8_t enable;
uint8_t ch_map;
uint8_t scan_filter;
} __packed;
struct bt_hci_rp_mesh_set_scanning {
uint8_t status;
uint8_t opcode;
} __packed;
/* Events */
struct bt_hci_evt_mesh {
uint8_t prefix;
uint8_t subevent;
} __packed;
#define BT_HCI_EVT_MESH_ADV_COMPLETE 0x00
struct bt_hci_evt_mesh_adv_complete {
uint8_t adv_slot;
} __packed;
#define BT_HCI_EVT_MESH_SCANNING_REPORT 0x01
struct bt_hci_evt_mesh_scan_report {
bt_addr_le_t addr;
uint8_t chan;
int8_t rssi;
uint32_t instant;
uint8_t data_len;
uint8_t data[0];
} __packed;
struct bt_hci_evt_mesh_scanning_report {
uint8_t num_reports;
struct bt_hci_evt_mesh_scan_report reports[0];
} __packed;
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_VS_H_ */

View File

@ -0,0 +1,230 @@
// CircuitPython: Adapted from Zephyr include file.
/** @file
* @brief Internal APIs for Bluetooth L2CAP handling.
*/
/*
* Copyright (c) 2015-2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
// for __packed
#include <string.h>
enum l2cap_conn_list_action {
BT_L2CAP_CHAN_LOOKUP,
BT_L2CAP_CHAN_DETACH,
};
#define BT_L2CAP_CID_BR_SIG 0x0001
#define BT_L2CAP_CID_ATT 0x0004
#define BT_L2CAP_CID_LE_SIG 0x0005
#define BT_L2CAP_CID_SMP 0x0006
#define BT_L2CAP_CID_BR_SMP 0x0007
#define BT_L2CAP_PSM_RFCOMM 0x0003
struct bt_l2cap_hdr {
uint16_t len;
uint16_t cid;
} __packed;
struct bt_l2cap_sig_hdr {
uint8_t code;
uint8_t ident;
uint16_t len;
} __packed;
#define BT_L2CAP_REJ_NOT_UNDERSTOOD 0x0000
#define BT_L2CAP_REJ_MTU_EXCEEDED 0x0001
#define BT_L2CAP_REJ_INVALID_CID 0x0002
#define BT_L2CAP_CMD_REJECT 0x01
struct bt_l2cap_cmd_reject {
uint16_t reason;
uint8_t data[0];
} __packed;
struct bt_l2cap_cmd_reject_cid_data {
uint16_t scid;
uint16_t dcid;
} __packed;
#define BT_L2CAP_CONN_REQ 0x02
struct bt_l2cap_conn_req {
uint16_t psm;
uint16_t scid;
} __packed;
/* command statuses in reposnse */
#define BT_L2CAP_CS_NO_INFO 0x0000
#define BT_L2CAP_CS_AUTHEN_PEND 0x0001
/* valid results in conn response on BR/EDR */
#define BT_L2CAP_BR_SUCCESS 0x0000
#define BT_L2CAP_BR_PENDING 0x0001
#define BT_L2CAP_BR_ERR_PSM_NOT_SUPP 0x0002
#define BT_L2CAP_BR_ERR_SEC_BLOCK 0x0003
#define BT_L2CAP_BR_ERR_NO_RESOURCES 0x0004
#define BT_L2CAP_BR_ERR_INVALID_SCID 0x0006
#define BT_L2CAP_BR_ERR_SCID_IN_USE 0x0007
#define BT_L2CAP_CONN_RSP 0x03
struct bt_l2cap_conn_rsp {
uint16_t dcid;
uint16_t scid;
uint16_t result;
uint16_t status;
} __packed;
#define BT_L2CAP_CONF_SUCCESS 0x0000
#define BT_L2CAP_CONF_UNACCEPT 0x0001
#define BT_L2CAP_CONF_REJECT 0x0002
#define BT_L2CAP_CONF_REQ 0x04
struct bt_l2cap_conf_req {
uint16_t dcid;
uint16_t flags;
uint8_t data[0];
} __packed;
#define BT_L2CAP_CONF_RSP 0x05
struct bt_l2cap_conf_rsp {
uint16_t scid;
uint16_t flags;
uint16_t result;
uint8_t data[0];
} __packed;
/* Option type used by MTU config request data */
#define BT_L2CAP_CONF_OPT_MTU 0x01
/* Options bits selecting most significant bit (hint) in type field */
#define BT_L2CAP_CONF_HINT 0x80
#define BT_L2CAP_CONF_MASK 0x7f
struct bt_l2cap_conf_opt {
uint8_t type;
uint8_t len;
uint8_t data[0];
} __packed;
#define BT_L2CAP_DISCONN_REQ 0x06
struct bt_l2cap_disconn_req {
uint16_t dcid;
uint16_t scid;
} __packed;
#define BT_L2CAP_DISCONN_RSP 0x07
struct bt_l2cap_disconn_rsp {
uint16_t dcid;
uint16_t scid;
} __packed;
#define BT_L2CAP_INFO_FEAT_MASK 0x0002
#define BT_L2CAP_INFO_FIXED_CHAN 0x0003
#define BT_L2CAP_INFO_REQ 0x0a
struct bt_l2cap_info_req {
uint16_t type;
} __packed;
/* info result */
#define BT_L2CAP_INFO_SUCCESS 0x0000
#define BT_L2CAP_INFO_NOTSUPP 0x0001
#define BT_L2CAP_INFO_RSP 0x0b
struct bt_l2cap_info_rsp {
uint16_t type;
uint16_t result;
uint8_t data[0];
} __packed;
#define BT_L2CAP_CONN_PARAM_REQ 0x12
struct bt_l2cap_conn_param_req {
uint16_t min_interval;
uint16_t max_interval;
uint16_t latency;
uint16_t timeout;
} __packed;
#define BT_L2CAP_CONN_PARAM_ACCEPTED 0x0000
#define BT_L2CAP_CONN_PARAM_REJECTED 0x0001
#define BT_L2CAP_CONN_PARAM_RSP 0x13
struct bt_l2cap_conn_param_rsp {
uint16_t result;
} __packed;
#define BT_L2CAP_LE_CONN_REQ 0x14
struct bt_l2cap_le_conn_req {
uint16_t psm;
uint16_t scid;
uint16_t mtu;
uint16_t mps;
uint16_t credits;
} __packed;
/* valid results in conn response on LE */
#define BT_L2CAP_LE_SUCCESS 0x0000
#define BT_L2CAP_LE_ERR_PSM_NOT_SUPP 0x0002
#define BT_L2CAP_LE_ERR_NO_RESOURCES 0x0004
#define BT_L2CAP_LE_ERR_AUTHENTICATION 0x0005
#define BT_L2CAP_LE_ERR_AUTHORIZATION 0x0006
#define BT_L2CAP_LE_ERR_KEY_SIZE 0x0007
#define BT_L2CAP_LE_ERR_ENCRYPTION 0x0008
#define BT_L2CAP_LE_ERR_INVALID_SCID 0x0009
#define BT_L2CAP_LE_ERR_SCID_IN_USE 0x000A
#define BT_L2CAP_LE_ERR_UNACCEPT_PARAMS 0x000B
#define BT_L2CAP_LE_ERR_INVALID_PARAMS 0x000C
#define BT_L2CAP_LE_CONN_RSP 0x15
struct bt_l2cap_le_conn_rsp {
uint16_t dcid;
uint16_t mtu;
uint16_t mps;
uint16_t credits;
uint16_t result;
} __packed;
#define BT_L2CAP_LE_CREDITS 0x16
struct bt_l2cap_le_credits {
uint16_t cid;
uint16_t credits;
} __packed;
#define BT_L2CAP_ECRED_CONN_REQ 0x17
struct bt_l2cap_ecred_conn_req {
uint16_t psm;
uint16_t mtu;
uint16_t mps;
uint16_t credits;
uint16_t scid[0];
} __packed;
#define BT_L2CAP_ECRED_CONN_RSP 0x18
struct bt_l2cap_ecred_conn_rsp {
uint16_t mtu;
uint16_t mps;
uint16_t credits;
uint16_t result;
uint16_t dcid[0];
} __packed;
#define BT_L2CAP_ECRED_RECONF_REQ 0x19
struct bt_l2cap_ecred_reconf_req {
uint16_t mtu;
uint16_t mps;
uint16_t scid[0];
} __packed;
#define BT_L2CAP_RECONF_SUCCESS 0x0000
#define BT_L2CAP_RECONF_INVALID_MTU 0x0001
#define BT_L2CAP_RECONF_INVALID_MPS 0x0002
#define BT_L2CAP_ECRED_RECONF_RSP 0x1a
struct bt_l2cap_ecred_reconf_rsp {
uint16_t result;
} __packed;

View File

@ -0,0 +1,29 @@
/*
* 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.
*/
#if CIRCUITPY_BLE_FILE_SERVICE
#error CIRCUITPY_BLE_FILE_SERVICE not implemented for CIRCUITPY_BLEIO_HCI
#endif

View File

@ -0,0 +1,34 @@
/*
* 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.
*/
#ifndef MICROPY_INCLUDED_DEVICE_BLE_HCI_SUPERVISOR_BLUETOOTH_H
#define MICROPY_INCLUDED_DEVICE_BLE_HCI_SUPERVISOR_BLUETOOTH_H
void supervisor_start_bluetooth(void);
bool supervisor_bluetooth_hook(ble_evt_t *ble_evt);
void supervisor_bluetooth_background(void);
#endif // MICROPY_INCLUDED_DEVICE_BLE_HCI_SUPERVISOR_BLUETOOTH_H

View File

@ -18,8 +18,7 @@
{% set visible_subpackages = obj.subpackages|selectattr("display")|list %}
{% if visible_subpackages %}
.. toctree::
:titlesonly:
:maxdepth: 3
:maxdepth: 2
{% for subpackage in visible_subpackages %}
{{ subpackage.short_name }}/index.rst

View File

@ -51,10 +51,15 @@ as a natural "TODO" list. An example minimal build list is shown below:
.. code-block:: makefile
# These modules are implemented in ports/<port>/common-hal:
CIRCUITPY_MICROCONTROLLER = 0 # Typically the first module to create
CIRCUITPY_DIGITALIO = 0 # Typically the second module to create
# Typically the first module to create
CIRCUITPY_MICROCONTROLLER = 0
# Typically the second module to create
CIRCUITPY_DIGITALIO = 0
# Other modules:
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_BUSIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_PULSEIO = 0
CIRCUITPY_OS = 0
@ -63,22 +68,34 @@ as a natural "TODO" list. An example minimal build list is shown below:
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_SDCARDIO = 0
CIRCUITPY_FRAMEBUFFERIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO (stub ok)
# Requires SPI, PulseIO (stub ok):
CIRCUITPY_DISPLAYIO = 0
# These modules are implemented in shared-module/ - they can be included in
# any port once their prerequisites in common-hal are complete.
CIRCUITPY_BITBANGIO = 0 # Requires DigitalIO
CIRCUITPY_GAMEPAD = 0 # Requires DigitalIO
CIRCUITPY_PIXELBUF = 0 # Requires neopixel_write or SPI (dotstar)
CIRCUITPY_RANDOM = 0 # Requires OS
CIRCUITPY_STORAGE = 0 # Requires OS, filesystem
CIRCUITPY_TOUCHIO = 0 # Requires Microcontroller
CIRCUITPY_USB_HID = 0 # Requires USB
CIRCUITPY_USB_MIDI = 0 # Requires USB
CIRCUITPY_REQUIRE_I2C_PULLUPS = 0 # Does nothing without I2C
CIRCUITPY_ULAB = 0 # No requirements, but takes extra flash
# Requires DigitalIO:
CIRCUITPY_BITBANGIO = 0
# Requires DigitalIO
CIRCUITPY_GAMEPAD = 0
# Requires neopixel_write or SPI (dotstar)
CIRCUITPY_PIXELBUF = 0
# Requires OS
CIRCUITPY_RANDOM = 0
# Requires OS, filesystem
CIRCUITPY_STORAGE = 0
# Requires Microcontroller
CIRCUITPY_TOUCHIO = 0
# Requires USB
CIRCUITPY_USB_HID = 0
CIRCUITPY_USB_MIDI = 0
# Does nothing without I2C
CIRCUITPY_REQUIRE_I2C_PULLUPS = 0
# No requirements, but takes extra flash
CIRCUITPY_ULAB = 0
Step 2: Init
--------------

View File

@ -1,4 +1,4 @@
sphinx<3
sphinx<4
recommonmark==0.6.0
sphinxcontrib-svg2pdfconverter==0.1.0
astroid

View File

@ -6,18 +6,28 @@ def rstjinja(app, docname, source):
Render our pages as a jinja template for fancy templating goodness.
"""
# Make sure we're outputting HTML
if app.builder.format != 'html':
if app.builder.format not in ("html", "latex"):
return
# we only want our one jinja template to run through this func
if "shared-bindings/support_matrix" not in docname:
return
src = source[0]
src = rendered = source[0]
print(docname)
rendered = app.builder.templates.render_string(
src, app.config.html_context
)
if app.builder.format == "html":
rendered = app.builder.templates.render_string(
src, app.config.html_context
)
else:
from sphinx.util.template import BaseRenderer
renderer = BaseRenderer()
rendered = renderer.render_string(
src,
app.config.html_context
)
source[0] = rendered
def setup(app):

View File

@ -28,6 +28,7 @@ import re
import subprocess
import sys
from concurrent.futures import ThreadPoolExecutor
SUPPORTED_PORTS = ['atmel-samd', 'esp32s2', 'litex', 'mimxrt10xx', 'nrf', 'stm']
@ -43,7 +44,7 @@ def get_shared_bindings():
""" Get a list of modules in shared-bindings based on folder names
"""
shared_bindings_dir = get_circuitpython_root_dir() / "shared-bindings"
return [item.name for item in shared_bindings_dir.iterdir()]
return [item.name for item in shared_bindings_dir.iterdir()] + ["ulab"]
def read_mpconfig():
@ -131,38 +132,46 @@ def lookup_setting(settings, key, default=''):
key = value[2:-1]
return value
def all_ports_all_boards(ports=SUPPORTED_PORTS):
for port in ports:
port_dir = get_circuitpython_root_dir() / "ports" / port
for entry in (port_dir / "boards").iterdir():
if not entry.is_dir():
continue
yield (port, entry)
def support_matrix_by_board(use_branded_name=True):
""" Compiles a list of the available core modules available for each
board.
"""
base = build_module_map()
boards = dict()
for port in SUPPORTED_PORTS:
def support_matrix(arg):
port, entry = arg
port_dir = get_circuitpython_root_dir() / "ports" / port
for entry in (port_dir / "boards").iterdir():
if not entry.is_dir():
continue
board_modules = []
settings = get_settings_from_makefile(str(port_dir), entry.name)
if use_branded_name:
with open(entry / "mpconfigboard.h") as get_name:
board_contents = get_name.read()
board_name_re = re.search(r"(?<=MICROPY_HW_BOARD_NAME)\s+(.+)",
board_contents)
if board_name_re:
board_name = board_name_re.group(1).strip('"')
else:
board_name = entry.name
settings = get_settings_from_makefile(str(port_dir), entry.name)
board_modules = []
for module in base:
key = f'CIRCUITPY_{module.upper()}'
if int(lookup_setting(settings, key, '0')):
board_modules.append(base[module]['name'])
if use_branded_name:
with open(entry / "mpconfigboard.h") as get_name:
board_contents = get_name.read()
board_name_re = re.search(r"(?<=MICROPY_HW_BOARD_NAME)\s+(.+)",
board_contents)
if board_name_re:
board_name = board_name_re.group(1).strip('"')
return (board_name, sorted(board_modules))
board_modules = []
for module in base:
key = f'CIRCUITPY_{module.upper()}'
if int(lookup_setting(settings, key, '0')):
board_modules.append(base[module]['name'])
boards[board_name] = sorted(board_modules)
executor = ThreadPoolExecutor(max_workers=os.cpu_count())
boards = dict(sorted(executor.map(support_matrix, all_ports_all_boards())))
#print(json.dumps(boards, indent=2))
return boards

View File

@ -520,7 +520,7 @@ STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t base_in, mp_obj_t index_in, mp_ob
uint val_type = GET_TYPE(arr_sz, VAL_TYPE_BITS);
arr_sz &= VALUE_MASK(VAL_TYPE_BITS);
if (index >= arr_sz) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_IndexError, translate("struct: index out of range")));
mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_struct);
}
if (t->len == 2) {

View File

@ -22,6 +22,7 @@ recursiveloop(char *pc, const char *sp, Subject *input, const char **subp, int n
case Char:
if(*sp != *pc++)
return 0;
/* FALLTHROUGH */
case Any:
sp++;
continue;

View File

@ -42,7 +42,7 @@ const byte fresult_to_errno_table[20] = {
STATIC void file_obj_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
(void)kind;
mp_printf(print, "<io.%s %p>", mp_obj_get_type_str(self_in), MP_OBJ_TO_PTR(self_in));
mp_printf(print, "<io.%q %p>", mp_obj_get_type_qstr(self_in), MP_OBJ_TO_PTR(self_in));
}
STATIC mp_uint_t file_obj_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *errcode) {

View File

@ -34,7 +34,7 @@ STATIC void check_fd_is_open(const mp_obj_vfs_posix_file_t *o) {
STATIC void vfs_posix_file_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
(void)kind;
mp_obj_vfs_posix_file_t *self = MP_OBJ_TO_PTR(self_in);
mp_printf(print, "<io.%s %d>", mp_obj_get_type_str(self_in), self->fd);
mp_printf(print, "<io.%q %d>", mp_obj_get_type_qstr(self_in), self->fd);
}
mp_obj_t mp_vfs_posix_file_open(const mp_obj_type_t *type, mp_obj_t file_in, mp_obj_t mode_in) {

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

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

View File

@ -35,9 +35,9 @@
* Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
*/
#ifdef __STDC__
static const __int32_t two_over_pi[] = {
static const __uint8_t two_over_pi[] = {
#else
static __int32_t two_over_pi[] = {
static __uint8_t two_over_pi[] = {
#endif
0xA2, 0xF9, 0x83, 0x6E, 0x4E, 0x44, 0x15, 0x29, 0xFC,
0x27, 0x57, 0xD1, 0xF5, 0x34, 0xDD, 0xC0, 0xDB, 0x62,
@ -145,6 +145,7 @@ pio2_3t = 6.1232342629e-17; /* 0x248d3132 */
return -1;
}
}
#if CIRCUITPY_FULL_BUILD
if(ix<=0x43490f80) { /* |x| ~<= 2^7*(pi/2), medium size */
t = fabsf(x);
n = (__int32_t) (t*invpio2+half);
@ -180,6 +181,11 @@ pio2_3t = 6.1232342629e-17; /* 0x248d3132 */
if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
else return n;
}
#else
// Suppress "defined but not used" diagnostics
(void) j; (void) fn; (void) r; (void) t; (void) w; (void) pio2_3t;
(void) pio2_3; (void) invpio2; (void)half; (void)npio2_hw;
#endif
/*
* all other (large) arguments
*/

View File

@ -188,7 +188,7 @@ extern float __ieee754_scalbf __P((float,float));
extern float __kernel_sinf __P((float,float,int));
extern float __kernel_cosf __P((float,float));
extern float __kernel_tanf __P((float,float,int));
extern int __kernel_rem_pio2f __P((float*,float*,int,int,int,const __int32_t*));
extern int __kernel_rem_pio2f __P((float*,float*,int,int,int,const __uint8_t*));
/* A union which permits us to convert between a float and a 32 bit
int. */

View File

@ -62,10 +62,10 @@ two8 = 2.5600000000e+02, /* 0x43800000 */
twon8 = 3.9062500000e-03; /* 0x3b800000 */
#ifdef __STDC__
int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const __int32_t *ipio2)
int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const __uint8_t *ipio2)
#else
int __kernel_rem_pio2f(x,y,e0,nx,prec,ipio2)
float x[], y[]; int e0,nx,prec; __int32_t ipio2[];
float x[], y[]; int e0,nx,prec; __uint8_t ipio2[];
#endif
{
__int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;

View File

@ -58,6 +58,16 @@ STATIC char *str_dup_maybe(const char *str) {
return s2;
}
STATIC size_t count_cont_bytes(char *start, char *end) {
int count = 0;
for (char *pos = start; pos < end; pos++) {
if(UTF8_IS_CONT(*pos)) {
count++;
}
}
return count;
}
// By default assume terminal which implements VT100 commands...
#ifndef MICROPY_HAL_HAS_VT100
#define MICROPY_HAL_HAS_VT100 (1)
@ -92,6 +102,7 @@ typedef struct _readline_t {
int escape_seq;
int hist_cur;
size_t cursor_pos;
uint8_t utf8_cont_chars;
char escape_seq_buf[1];
const char *prompt;
} readline_t;
@ -99,7 +110,8 @@ typedef struct _readline_t {
STATIC readline_t rl;
int readline_process_char(int c) {
size_t last_line_len = rl.line->len;
size_t last_line_len = utf8_charlen((byte *)rl.line->buf, rl.line->len);
int cont_chars = 0;
int redraw_step_back = 0;
bool redraw_from_cursor = false;
int redraw_step_forward = 0;
@ -132,7 +144,7 @@ int readline_process_char(int c) {
goto right_arrow_key;
} else if (c == CHAR_CTRL_K) {
// CTRL-K is kill from cursor to end-of-line, inclusive
vstr_cut_tail_bytes(rl.line, last_line_len - rl.cursor_pos);
vstr_cut_tail_bytes(rl.line, rl.line->len - rl.cursor_pos);
// set redraw parameters
redraw_from_cursor = true;
} else if (c == CHAR_CTRL_N) {
@ -143,6 +155,7 @@ int readline_process_char(int c) {
goto up_arrow_key;
} else if (c == CHAR_CTRL_U) {
// CTRL-U is kill from beginning-of-line up to cursor
cont_chars = count_cont_bytes(rl.line->buf+rl.orig_line_len, rl.line->buf+rl.cursor_pos);
vstr_cut_out_bytes(rl.line, rl.orig_line_len, rl.cursor_pos - rl.orig_line_len);
// set redraw parameters
redraw_step_back = rl.cursor_pos - rl.orig_line_len;
@ -178,6 +191,12 @@ int readline_process_char(int c) {
int nspace = 1;
#endif
// Check if we have moved into a UTF-8 continuation byte
while (UTF8_IS_CONT(rl.line->buf[rl.cursor_pos-nspace])) {
nspace++;
cont_chars++;
}
// do the backspace
vstr_cut_out_bytes(rl.line, rl.cursor_pos - nspace, nspace);
// set redraw parameters
@ -206,12 +225,27 @@ int readline_process_char(int c) {
redraw_step_forward = compl_len;
}
#endif
} else if (32 <= c ) {
} else if (32 <= c) {
// printable character
vstr_ins_char(rl.line, rl.cursor_pos, c);
// set redraw parameters
redraw_from_cursor = true;
redraw_step_forward = 1;
char lcp = rl.line->buf[rl.cursor_pos];
uint8_t cont_need = 0;
if (!UTF8_IS_CONT(c)) {
// ASCII or Lead code point
rl.utf8_cont_chars = 0;
lcp = c;
}else {
rl.utf8_cont_chars += 1;
}
if (lcp >= 0xc0 && lcp < 0xf8) {
cont_need = (0xe5 >> ((lcp >> 3) & 0x6)) & 3; // From unicode.c L195
}
vstr_ins_char(rl.line, rl.cursor_pos+rl.utf8_cont_chars, c);
// set redraw parameters if we have the entire character
if (rl.utf8_cont_chars == cont_need) {
redraw_from_cursor = true;
redraw_step_forward = rl.utf8_cont_chars+1;
cont_chars = rl.utf8_cont_chars;
}
}
} else if (rl.escape_seq == ESEQ_ESC) {
switch (c) {
@ -237,6 +271,8 @@ up_arrow_key:
#endif
// up arrow
if (rl.hist_cur + 1 < (int)READLINE_HIST_SIZE && MP_STATE_PORT(readline_hist)[rl.hist_cur + 1] != NULL) {
// Check for continuation characters
cont_chars = count_cont_bytes(rl.line->buf+rl.orig_line_len, rl.line->buf+rl.cursor_pos);
// increase hist num
rl.hist_cur += 1;
// set line to history
@ -253,6 +289,8 @@ down_arrow_key:
#endif
// down arrow
if (rl.hist_cur >= 0) {
// Check for continuation characters
cont_chars = count_cont_bytes(rl.line->buf+rl.orig_line_len, rl.line->buf+rl.cursor_pos);
// decrease hist num
rl.hist_cur -= 1;
// set line to history
@ -272,6 +310,11 @@ right_arrow_key:
// right arrow
if (rl.cursor_pos < rl.line->len) {
redraw_step_forward = 1;
// Check if we have moved into a UTF-8 continuation byte
while (UTF8_IS_CONT(rl.line->buf[rl.cursor_pos+redraw_step_forward]) &&
rl.cursor_pos+redraw_step_forward < rl.line->len) {
redraw_step_forward++;
}
}
} else if (c == 'D') {
#if MICROPY_REPL_EMACS_KEYS
@ -280,6 +323,11 @@ left_arrow_key:
// left arrow
if (rl.cursor_pos > rl.orig_line_len) {
redraw_step_back = 1;
// Check if we have moved into a UTF-8 continuation byte
while (UTF8_IS_CONT(rl.line->buf[rl.cursor_pos-redraw_step_back])) {
redraw_step_back++;
cont_chars++;
}
}
} else if (c == 'H') {
// home
@ -295,6 +343,7 @@ left_arrow_key:
if (c == '~') {
if (rl.escape_seq_buf[0] == '1' || rl.escape_seq_buf[0] == '7') {
home_key:
cont_chars = count_cont_bytes(rl.line->buf+rl.orig_line_len, rl.line->buf+rl.cursor_pos);
redraw_step_back = rl.cursor_pos - rl.orig_line_len;
} else if (rl.escape_seq_buf[0] == '4' || rl.escape_seq_buf[0] == '8') {
end_key:
@ -305,7 +354,12 @@ end_key:
delete_key:
#endif
if (rl.cursor_pos < rl.line->len) {
vstr_cut_out_bytes(rl.line, rl.cursor_pos, 1);
size_t len = 1;
while (UTF8_IS_CONT(rl.line->buf[rl.cursor_pos+len]) &&
rl.cursor_pos+len < rl.line->len) {
len++;
}
vstr_cut_out_bytes(rl.line, rl.cursor_pos, len);
redraw_from_cursor = true;
}
} else {
@ -331,18 +385,20 @@ delete_key:
// redraw command prompt, efficiently
if (redraw_step_back > 0) {
mp_hal_move_cursor_back(redraw_step_back);
mp_hal_move_cursor_back(redraw_step_back-cont_chars);
rl.cursor_pos -= redraw_step_back;
}
if (redraw_from_cursor) {
if (rl.line->len < last_line_len) {
if (utf8_charlen((byte *)rl.line->buf, rl.line->len) < last_line_len) {
// erase old chars
mp_hal_erase_line_from_cursor(last_line_len - rl.cursor_pos);
}
// Check for continuation characters
cont_chars = count_cont_bytes(rl.line->buf+rl.cursor_pos+redraw_step_forward, rl.line->buf+rl.line->len);
// draw new chars
mp_hal_stdout_tx_strn(rl.line->buf + rl.cursor_pos, rl.line->len - rl.cursor_pos);
// move cursor forward if needed (already moved forward by length of line, so move it back)
mp_hal_move_cursor_back(rl.line->len - (rl.cursor_pos + redraw_step_forward));
mp_hal_move_cursor_back(rl.line->len - (rl.cursor_pos + redraw_step_forward) - cont_chars);
rl.cursor_pos += redraw_step_forward;
} else if (redraw_step_forward > 0) {
// draw over old chars to move cursor forwards

@ -1 +1 @@
Subproject commit 761d6437e8cd6a131d51de96974337121a9c7164
Subproject commit 2a1ba8fa4753b2bcb158c9b17351cf18eade0d2b

@ -1 +1 @@
Subproject commit 22100b252fc2eb8f51ed407949645653c4880fd9
Subproject commit e90cf7a676eddcbd9c35d2d99a0a9cd14686e2ce

View File

@ -113,6 +113,8 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
start = mp_hal_ticks_ms();
mp_call_function_0(module_fun);
mp_hal_set_interrupt_char(-1); // disable interrupt
// Handle any ctrl-c interrupt that arrived just in time
mp_handle_pending();
nlr_pop();
ret = 0;
if (exec_flags & EXEC_FLAG_PRINT_EOF) {

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-30 07:23-0500\n"
"POT-Creation-Date: 2020-09-13 14:21-0500\n"
"PO-Revision-Date: 2020-07-06 18:10+0000\n"
"Last-Translator: oon arfiandwi <oon.arfiandwi@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -34,14 +34,6 @@ msgstr ""
"Harap ajukan masalah dengan konten drive CIRCUITPY Anda di\n"
"https://github.com/adafruit/circuitpython/issues\n"
#: supervisor/shared/safe_mode.c
msgid ""
"\n"
"To exit, please reset the board without "
msgstr ""
"\n"
"Untuk keluar, harap setel ulang papan tanpa"
#: py/obj.c
msgid " File \"%q\""
msgstr " File \"%q\""
@ -72,13 +64,17 @@ msgstr ""
msgid "%q in use"
msgstr "%q sedang digunakan"
#: py/obj.c
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
msgstr "%q indeks di luar batas"
#: py/obj.c
msgid "%q indices must be integers, not %s"
msgstr "indeks %q harus bilangan bulat, bukan %s"
msgid "%q indices must be integers, not %q"
msgstr ""
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@ -116,6 +112,42 @@ msgstr "%q() mengambil posisi argumen %d tapi %d yang diberikan"
msgid "'%q' argument required"
msgstr "'%q' argumen dibutuhkan"
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr ""
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr ""
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr ""
#: py/obj.c
msgid "'%q' object is not subscriptable"
msgstr ""
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a label"
@ -166,48 +198,6 @@ msgstr "'%s' integer %d tidak dalam kisaran %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' integer 0x%x tidak cukup didalam mask 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr "Objek '%s' tidak dapat menetapkan atribut '%q'"
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr "Objek '%s' tidak mendukung '%q'"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item assignment"
msgstr "Objek '%s' tidak mendukung penetapan item"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item deletion"
msgstr "Objek '%s' tidak mendukung penghapusan item"
#: py/runtime.c
msgid "'%s' object has no attribute '%q'"
msgstr "Objek '%s' tidak memiliki atribut '%q'"
#: py/runtime.c
#, c-format
msgid "'%s' object is not an iterator"
msgstr "Objek '%s' bukan iterator"
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
msgstr "Objek '%s' tidak dapat dipanggil"
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
msgstr "'%s' objek tidak dapat diulang"
#: py/obj.c
#, c-format
msgid "'%s' object is not subscriptable"
msgstr "Objek '%s' tidak dapat disubkripsikan"
#: py/objstr.c
msgid "'=' alignment not allowed in string format specifier"
msgstr "'=' perataan tidak diizinkan dalam penentu format string"
@ -281,7 +271,7 @@ msgstr "pow() 3-arg tidak didukung"
msgid "A hardware interrupt channel is already in use"
msgstr "Sebuah channel hardware interrupt sedang digunakan"
#: shared-bindings/_bleio/Address.c
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
msgid "Address must be %d bytes long"
msgstr "Alamat harus sepanjang %d byte"
@ -310,7 +300,7 @@ msgstr "Semua channel event sedang digunakan"
msgid "All sync event channels in use"
msgstr "Semua channel event yang disinkronisasi sedang digunakan"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr "Semua timer untuk pin ini sedang digunakan"
@ -322,7 +312,7 @@ msgstr "Semua timer untuk pin ini sedang digunakan"
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c
#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c
#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c
msgid "All timers in use"
msgstr "Semua timer sedang digunakan"
@ -379,6 +369,10 @@ msgstr ""
msgid "Attempted heap allocation when MicroPython VM not running."
msgstr "Mencoba alokasi heap ketika MicroPython VM tidak berjalan."
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
msgstr ""
#: main.c
msgid "Auto-reload is off.\n"
msgstr "Auto-reload tidak aktif.\n"
@ -457,6 +451,10 @@ msgstr "Panjang buffer %d terlalu besar. Itu harus kurang dari %d"
msgid "Buffer length must be a multiple of 512"
msgstr "Panjang buffer harus kelipatan 512"
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Penyangga harus memiliki panjang setidaknya 1"
@ -496,6 +494,10 @@ msgstr "Panggil super().__init__() sebelum mengakses objek asli."
msgid "Can't set CCCD on local Characteristic"
msgstr "Tidak dapat mengatur CCCD pada Karakteristik lokal"
#: shared-bindings/_bleio/Adapter.c
msgid "Cannot create a new Adapter; use _bleio.adapter;"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
#: shared-bindings/memorymonitor/AllocationSize.c
#: shared-bindings/pulseio/PulseIn.c
@ -564,7 +566,7 @@ msgstr "Tidak dapat transfer tanpa pin MOSI dan MISO."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "tidak dapat mendapatkan ukuran scalar secara tidak ambigu"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
msgstr ""
"Tidak dapat membuat variasi frekuensi pada penghitung waktu yang sudah "
@ -590,6 +592,10 @@ msgstr ""
"CircuitPython dalam mode aman karena Anda menekan tombol reset saat boot. "
"Tekan lagi untuk keluar dari mode aman.\n"
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
msgstr ""
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr "Init pin clock gagal."
@ -638,27 +644,31 @@ msgstr ""
msgid "Could not initialize UART"
msgstr "Tidak dapat menginisialisasi UART"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize channel"
msgstr "Tidak dapat menginisialisasi kanal"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize timer"
msgstr "Tidak dapat menginisialisasi timer"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init channel"
msgstr "Tidak dapat menginisialisasi ulang kanal"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init timer"
msgstr "Tidak dapat menginisialisasi ulang timer"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not restart PWM"
msgstr "Tidak dapat memulai ulang PWM"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
msgstr ""
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
msgstr "Tidak dapat memulai PWM"
@ -756,9 +766,9 @@ msgstr "Channel EXTINT sedang digunakan"
msgid "Error in regex"
msgstr "Error pada regex"
#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c
#: shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
msgid "Expected a %q"
msgstr "Diharapkan %q"
@ -768,10 +778,18 @@ msgstr "Diharapkan %q"
msgid "Expected a Characteristic"
msgstr "Diharapkan sebuah Karakteristik"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr "Diharapkan sebuah Layanan"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
msgid "Expected a UUID"
@ -841,12 +859,17 @@ msgstr "Gagal menulis flash internal."
msgid "File exists"
msgstr "File sudah ada"
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
"Frekuensi yang ditangkap berada di atas kemampuan. Penangkapan Ditunda."
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Frequency must match existing PWMOut using this timer"
msgstr "Frekuensi harus cocok dengan PWMOut yang ada menggunakan timer ini"
@ -866,7 +889,7 @@ msgid "Group full"
msgstr "Grup penuh"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr "Perangkat keras sibuk, coba pin alternatif"
@ -933,6 +956,11 @@ msgstr ""
msgid "Invalid %q pin"
msgstr "%q pada tidak valid"
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr ""
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
msgstr "Nilai Unit ADC tidak valid"
@ -945,24 +973,12 @@ msgstr "File BMP tidak valid"
msgid "Invalid DAC pin supplied"
msgstr "Pin DAC yang diberikan tidak valid"
#: ports/stm/common-hal/busio/I2C.c
msgid "Invalid I2C pin selection"
msgstr "Pilihan pin I2C tidak valid"
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Frekuensi PWM tidak valid"
#: ports/stm/common-hal/busio/SPI.c
msgid "Invalid SPI pin selection"
msgstr "Pilihan pin SPI tidak valid"
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid UART pin selection"
msgstr "Pilihan pin UART tidak valid"
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument"
msgstr "Argumen tidak valid"
@ -999,7 +1015,7 @@ msgstr "File tidak valid"
msgid "Invalid format chunk size"
msgstr "Ukuran potongan format tidak valid"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
msgstr "Frekuensi yang diberikan tidak valid"
@ -1017,8 +1033,8 @@ msgid "Invalid phase"
msgstr "Fase tidak valid"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pin tidak valid"
@ -1042,7 +1058,7 @@ msgstr "Pin untuk channel kanan tidak valid"
msgid "Invalid pins"
msgstr "Pin-pin tidak valid"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr "Pin untuk PWMOut tidak valid"
@ -1224,10 +1240,14 @@ msgstr ""
msgid "No long integer support"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
msgstr ""
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@ -1248,6 +1268,10 @@ msgstr ""
msgid "Nordic Soft Device failure assertion."
msgstr ""
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
#, fuzzy
@ -1259,6 +1283,14 @@ msgstr "Tidak dapat menyambungkan ke AP"
msgid "Not playing"
msgstr ""
#: main.c
msgid "Not running saved code.\n"
msgstr ""
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
msgstr ""
#: shared-bindings/util.c
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
@ -1285,16 +1317,20 @@ msgid ""
"%d bpp given"
msgstr ""
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
@ -1344,8 +1380,13 @@ msgstr "Tambahkan module apapun pada filesystem\n"
msgid "Polygon needs at least 3 points"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c
#: ports/stm/common-hal/pulseio/PulseOut.c
msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
@ -1423,13 +1464,8 @@ msgid "Row entry must be digitalio.DigitalInOut"
msgstr ""
#: main.c
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Berjalan di mode aman(safe mode)! Auto-reload tidak aktif.\n"
#: main.c
msgid "Running in safe mode! Not running saved code.\n"
msgid "Running in safe mode! "
msgstr ""
"Berjalan di mode aman(safe mode)! tidak menjalankan kode yang tersimpan.\n"
#: shared-module/sdcardio/SDCard.c
msgid "SD card CSD format not supported"
@ -1440,6 +1476,16 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr "SDA atau SCL membutuhkan pull up"
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO Init Error %d"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "SPI Init Error"
msgstr ""
@ -1474,6 +1520,10 @@ msgstr ""
msgid "Serializer in use"
msgstr "Serializer sedang digunakan"
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
msgstr ""
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
msgstr ""
@ -1569,11 +1619,15 @@ msgstr ""
msgid "Timeout is too long: Maximum timeout length is %d seconds"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid ""
"Timer was reserved for internal use - declare PWM pins earlier in the program"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
msgstr "Untuk keluar, silahkan reset board tanpa "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
msgstr "Terlalu banyak channel dalam sampel"
@ -1669,6 +1723,10 @@ msgstr ""
msgid "Unexpected nrfx uuid type"
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown gatt error: 0x%04x"
@ -1779,6 +1837,10 @@ msgstr ""
"\n"
"Untuk menampilkan modul built-in silahkan ketik `help(\"modules\")`.\n"
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
msgstr ""
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr ""
@ -1796,8 +1858,7 @@ msgid "__init__() should return None"
msgstr ""
#: py/objtype.c
#, c-format
msgid "__init__() should return None, not '%s'"
msgid "__init__() should return None, not '%q'"
msgstr ""
#: py/objobject.c
@ -1894,7 +1955,7 @@ msgstr ""
msgid "bad format string"
msgstr ""
#: py/binary.c
#: py/binary.c py/objarray.c
msgid "bad typecode"
msgstr "typecode buruk"
@ -1948,11 +2009,15 @@ msgstr ""
msgid "bytes > 8 bits not supported"
msgstr "byte > 8 bit tidak didukung"
#: py/objarray.c
msgid "bytes length not a multiple of item size"
msgstr ""
#: py/objstr.c
msgid "bytes value out of range"
msgstr ""
#: ports/atmel-samd/bindings/samd/Clock.c
#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c
msgid "calibration is out of range"
msgstr "kalibrasi keluar dari jangkauan"
@ -1984,47 +2049,17 @@ msgstr ""
msgid "can't assign to expression"
msgstr "tidak dapat menetapkan ke ekspresi"
#: py/obj.c
#, c-format
msgid "can't convert %s to complex"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to float"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to int"
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert '%q' object to %q implicitly"
msgstr ""
#: py/objint.c
msgid "can't convert NaN to int"
msgstr ""
#: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "can't convert address to int"
msgstr ""
#: py/objint.c
msgid "can't convert inf to int"
msgstr ""
#: py/obj.c
msgid "can't convert to complex"
msgstr ""
#: py/obj.c
msgid "can't convert to float"
msgstr ""
#: py/obj.c
msgid "can't convert to int"
msgid "can't convert to %q"
msgstr ""
#: py/objstr.c
@ -2432,7 +2467,7 @@ msgstr "fungsi kehilangan argumen keyword '%q' yang dibutuhkan"
msgid "function missing required positional argument #%d"
msgstr "fungsi kehilangan argumen posisi #%d yang dibutuhkan"
#: py/argcheck.c py/bc.c py/objnamedtuple.c
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
#, c-format
msgid "function takes %d positional arguments but %d were given"
msgstr "fungsi mengambil posisi argumen %d tapi %d yang diberikan"
@ -2481,10 +2516,7 @@ msgstr "lapisan (padding) tidak benar"
msgid "index is out of bounds"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c
#: py/obj.c
msgid "index out of range"
msgstr "index keluar dari jangkauan"
@ -2500,6 +2532,10 @@ msgstr ""
msgid "initial values must be iterable"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
msgstr ""
#: py/compile.c
msgid "inline assembler must be a function"
msgstr "inline assembler harus sebuah fungsi"
@ -2692,6 +2728,10 @@ msgstr ""
msgid "max_length must be 0-%d when fixed_length is %s"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be > 0"
msgstr ""
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
@ -2840,8 +2880,7 @@ msgid "number of points must be at least 2"
msgstr ""
#: py/obj.c
#, c-format
msgid "object '%s' is not a tuple or list"
msgid "object '%q' is not a tuple or list"
msgstr ""
#: py/obj.c
@ -2877,8 +2916,7 @@ msgid "object not iterable"
msgstr ""
#: py/obj.c
#, c-format
msgid "object of type '%s' has no len()"
msgid "object of type '%q' has no len()"
msgstr ""
#: py/obj.c
@ -2929,10 +2967,23 @@ msgstr ""
msgid "ord() expected a character, but string of length %d found"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
msgstr ""
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
msgstr ""
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
msgstr ""
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
msgstr ""
@ -2972,20 +3023,9 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "Muncul dari PulseIn yang kosong"
#: py/objset.c
msgid "pop from an empty set"
msgstr ""
#: py/objlist.c
msgid "pop from empty list"
msgstr ""
#: py/objdict.c
msgid "popitem(): dictionary is empty"
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
msgstr ""
#: py/objint_mpz.c
@ -3117,6 +3157,10 @@ msgstr ""
msgid "sosfilt requires iterable arguments"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr ""
#: py/objstr.c
msgid "start/end indices"
msgstr ""
@ -3142,12 +3186,7 @@ msgid "stream operation not supported"
msgstr ""
#: py/objstrunicode.c
msgid "string index out of range"
msgstr ""
#: py/objstrunicode.c
#, c-format
msgid "string indices must be integers, not %s"
msgid "string indices must be integers, not %q"
msgstr ""
#: py/stream.c
@ -3158,10 +3197,6 @@ msgstr ""
msgid "struct: cannot index"
msgstr "struct: tidak bisa melakukan index"
#: extmod/moductypes.c
msgid "struct: index out of range"
msgstr "struct: index keluar dari jangkauan"
#: extmod/moductypes.c
msgid "struct: no fields"
msgstr "struct: tidak ada fields"
@ -3232,7 +3267,7 @@ msgstr ""
msgid "trapz is defined for 1D arrays of equal length"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c py/objstr.c
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr ""
@ -3240,10 +3275,6 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"
@ -3299,8 +3330,7 @@ msgid "unknown conversion specifier %c"
msgstr ""
#: py/objstr.c
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgid "unknown format code '%c' for object of type '%q'"
msgstr ""
#: py/compile.c
@ -3340,7 +3370,7 @@ msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr ""
#: py/runtime.c
msgid "unsupported type for %q: '%s'"
msgid "unsupported type for %q: '%q'"
msgstr ""
#: py/runtime.c
@ -3348,7 +3378,7 @@ msgid "unsupported type for operator"
msgstr ""
#: py/runtime.c
msgid "unsupported types for %q: '%s', '%s'"
msgid "unsupported types for %q: '%q', '%q'"
msgstr ""
#: py/objint.c
@ -3428,6 +3458,65 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid ""
#~ "\n"
#~ "To exit, please reset the board without "
#~ msgstr ""
#~ "\n"
#~ "Untuk keluar, harap setel ulang papan tanpa"
#~ msgid "%q indices must be integers, not %s"
#~ msgstr "indeks %q harus bilangan bulat, bukan %s"
#~ msgid "'%s' object cannot assign attribute '%q'"
#~ msgstr "Objek '%s' tidak dapat menetapkan atribut '%q'"
#~ msgid "'%s' object does not support '%q'"
#~ msgstr "Objek '%s' tidak mendukung '%q'"
#~ msgid "'%s' object does not support item assignment"
#~ msgstr "Objek '%s' tidak mendukung penetapan item"
#~ msgid "'%s' object does not support item deletion"
#~ msgstr "Objek '%s' tidak mendukung penghapusan item"
#~ msgid "'%s' object has no attribute '%q'"
#~ msgstr "Objek '%s' tidak memiliki atribut '%q'"
#~ msgid "'%s' object is not an iterator"
#~ msgstr "Objek '%s' bukan iterator"
#~ msgid "'%s' object is not callable"
#~ msgstr "Objek '%s' tidak dapat dipanggil"
#~ msgid "'%s' object is not iterable"
#~ msgstr "'%s' objek tidak dapat diulang"
#~ msgid "'%s' object is not subscriptable"
#~ msgstr "Objek '%s' tidak dapat disubkripsikan"
#~ msgid "Invalid I2C pin selection"
#~ msgstr "Pilihan pin I2C tidak valid"
#~ msgid "Invalid SPI pin selection"
#~ msgstr "Pilihan pin SPI tidak valid"
#~ msgid "Invalid UART pin selection"
#~ msgstr "Pilihan pin UART tidak valid"
#~ msgid "Running in safe mode! Auto-reload is off.\n"
#~ msgstr "Berjalan di mode aman(safe mode)! Auto-reload tidak aktif.\n"
#~ msgid "Running in safe mode! Not running saved code.\n"
#~ msgstr ""
#~ "Berjalan di mode aman(safe mode)! tidak menjalankan kode yang tersimpan.\n"
#~ msgid "pop from an empty PulseIn"
#~ msgstr "Muncul dari PulseIn yang kosong"
#~ msgid "struct: index out of range"
#~ msgstr "struct: index keluar dari jangkauan"
#~ msgid "'async for' or 'async with' outside async function"
#~ msgstr "'async for' atau 'async with' di luar fungsi async"
@ -3635,9 +3724,6 @@ msgstr ""
#~ "Tegangan dari mikrokontroler turun atau mati. Pastikan sumber tegangan "
#~ "memberikan daya\n"
#~ msgid "To exit, please reset the board without "
#~ msgstr "Untuk keluar, silahkan reset board tanpa "
#~ msgid "UART(%d) does not exist"
#~ msgstr "UART(%d) tidak ada"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-30 07:23-0500\n"
"POT-Creation-Date: 2020-09-13 14:21-0500\n"
"PO-Revision-Date: 2020-05-24 03:22+0000\n"
"Last-Translator: dronecz <mzuzelka@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -34,30 +34,22 @@ msgstr ""
"Založte prosím problém s obsahem vaší jednotky CIRCUITPY na adrese\n"
"https://github.com/adafruit/circuitpython/issues\n"
#: supervisor/shared/safe_mode.c
msgid ""
"\n"
"To exit, please reset the board without "
msgstr ""
"\n"
"Pro ukončení, prosím resetujte desku bez "
#: py/obj.c
msgid " File \"%q\""
msgstr "  Soubor \"% q\""
msgstr " Soubor \"%q\""
#: py/obj.c
msgid " File \"%q\", line %d"
msgstr "  Soubor \"% q\", řádek% d"
msgstr " Soubor \"%q\", řádek %d"
#: main.c
msgid " output:\n"
msgstr " výstup:\n"
msgstr " výstup:\n"
#: py/objstr.c
#, c-format
msgid "%%c requires int or char"
msgstr "%% c vyžaduje int nebo char"
msgstr "%%c vyžaduje int nebo char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
@ -72,17 +64,21 @@ msgstr ""
msgid "%q in use"
msgstr "%q se nyní používá"
#: py/obj.c
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
msgstr "%q index je mimo rozsah"
#: py/obj.c
msgid "%q indices must be integers, not %s"
msgstr "Indexy% q musí být celá čísla, nikoli% s"
msgid "%q indices must be integers, not %q"
msgstr ""
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
msgstr "Seznam% q musí být seznam"
msgstr "Seznam %q musí být seznam"
#: shared-bindings/memorymonitor/AllocationAlarm.c
msgid "%q must be >= 0"
@ -94,11 +90,11 @@ msgstr ""
#: shared-bindings/memorymonitor/AllocationAlarm.c
#: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c
msgid "%q must be >= 1"
msgstr "% q musí být > = 1"
msgstr " %q musí být > = 1"
#: shared-module/vectorio/Polygon.c
msgid "%q must be a tuple of length 2"
msgstr "% q musí být n-tice délky 2"
msgstr " %q musí být n-tice délky 2"
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q pin invalid"
@ -106,7 +102,7 @@ msgstr ""
#: shared-bindings/fontio/BuiltinFont.c
msgid "%q should be an int"
msgstr "% q by měl být int"
msgstr " %q by měl být int"
#: py/bc.c py/objnamedtuple.c
msgid "%q() takes %d positional arguments but %d were given"
@ -116,6 +112,42 @@ msgstr ""
msgid "'%q' argument required"
msgstr ""
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr ""
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr ""
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr ""
#: py/obj.c
msgid "'%q' object is not subscriptable"
msgstr ""
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a label"
@ -166,48 +198,6 @@ msgstr ""
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""
#: py/obj.c
#, c-format
msgid "'%s' object does not support item assignment"
msgstr ""
#: py/obj.c
#, c-format
msgid "'%s' object does not support item deletion"
msgstr ""
#: py/runtime.c
msgid "'%s' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
#, c-format
msgid "'%s' object is not an iterator"
msgstr ""
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
msgstr ""
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
msgstr ""
#: py/obj.c
#, c-format
msgid "'%s' object is not subscriptable"
msgstr ""
#: py/objstr.c
msgid "'=' alignment not allowed in string format specifier"
msgstr ""
@ -281,7 +271,7 @@ msgstr ""
msgid "A hardware interrupt channel is already in use"
msgstr ""
#: shared-bindings/_bleio/Address.c
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
msgid "Address must be %d bytes long"
msgstr ""
@ -310,7 +300,7 @@ msgstr ""
msgid "All sync event channels in use"
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr ""
@ -322,7 +312,7 @@ msgstr ""
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c
#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c
#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c
msgid "All timers in use"
msgstr ""
@ -379,6 +369,10 @@ msgstr ""
msgid "Attempted heap allocation when MicroPython VM not running."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
msgstr ""
#: main.c
msgid "Auto-reload is off.\n"
msgstr ""
@ -455,6 +449,10 @@ msgstr ""
msgid "Buffer length must be a multiple of 512"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr ""
@ -494,6 +492,10 @@ msgstr ""
msgid "Can't set CCCD on local Characteristic"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Cannot create a new Adapter; use _bleio.adapter;"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
#: shared-bindings/memorymonitor/AllocationSize.c
#: shared-bindings/pulseio/PulseIn.c
@ -556,7 +558,7 @@ msgstr ""
msgid "Cannot unambiguously get sizeof scalar"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
msgstr ""
@ -578,6 +580,10 @@ msgid ""
"boot. Press again to exit safe mode.\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
msgstr ""
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr ""
@ -625,27 +631,31 @@ msgstr ""
msgid "Could not initialize UART"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not restart PWM"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
msgstr ""
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
msgstr ""
@ -742,9 +752,9 @@ msgstr ""
msgid "Error in regex"
msgstr ""
#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c
#: shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
msgid "Expected a %q"
msgstr ""
@ -754,10 +764,18 @@ msgstr ""
msgid "Expected a Characteristic"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
msgid "Expected a UUID"
@ -827,11 +845,16 @@ msgstr ""
msgid "File exists"
msgstr ""
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Frequency must match existing PWMOut using this timer"
msgstr ""
@ -851,7 +874,7 @@ msgid "Group full"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr ""
@ -916,6 +939,11 @@ msgstr ""
msgid "Invalid %q pin"
msgstr ""
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr ""
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
msgstr ""
@ -928,24 +956,12 @@ msgstr ""
msgid "Invalid DAC pin supplied"
msgstr ""
#: ports/stm/common-hal/busio/I2C.c
msgid "Invalid I2C pin selection"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "Invalid SPI pin selection"
msgstr ""
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid UART pin selection"
msgstr ""
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument"
msgstr ""
@ -982,7 +998,7 @@ msgstr ""
msgid "Invalid format chunk size"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
msgstr ""
@ -1000,8 +1016,8 @@ msgid "Invalid phase"
msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr ""
@ -1025,7 +1041,7 @@ msgstr ""
msgid "Invalid pins"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
@ -1207,10 +1223,14 @@ msgstr ""
msgid "No long integer support"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
msgstr ""
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@ -1231,6 +1251,10 @@ msgstr ""
msgid "Nordic Soft Device failure assertion."
msgstr ""
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
msgid "Not connected"
@ -1241,6 +1265,14 @@ msgstr ""
msgid "Not playing"
msgstr ""
#: main.c
msgid "Not running saved code.\n"
msgstr ""
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
msgstr ""
#: shared-bindings/util.c
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
@ -1267,16 +1299,20 @@ msgid ""
"%d bpp given"
msgstr ""
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
@ -1326,8 +1362,13 @@ msgstr ""
msgid "Polygon needs at least 3 points"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c
#: ports/stm/common-hal/pulseio/PulseOut.c
msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
@ -1402,11 +1443,7 @@ msgid "Row entry must be digitalio.DigitalInOut"
msgstr ""
#: main.c
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr ""
#: main.c
msgid "Running in safe mode! Not running saved code.\n"
msgid "Running in safe mode! "
msgstr ""
#: shared-module/sdcardio/SDCard.c
@ -1418,6 +1455,16 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO Init Error %d"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "SPI Init Error"
msgstr ""
@ -1452,6 +1499,10 @@ msgstr ""
msgid "Serializer in use"
msgstr ""
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
msgstr ""
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
msgstr ""
@ -1547,11 +1598,15 @@ msgstr ""
msgid "Timeout is too long: Maximum timeout length is %d seconds"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid ""
"Timer was reserved for internal use - declare PWM pins earlier in the program"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
msgstr ""
@ -1647,6 +1702,10 @@ msgstr ""
msgid "Unexpected nrfx uuid type"
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown gatt error: 0x%04x"
@ -1750,6 +1809,10 @@ msgid ""
"To list built-in modules please do `help(\"modules\")`.\n"
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
msgstr ""
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr ""
@ -1767,8 +1830,7 @@ msgid "__init__() should return None"
msgstr ""
#: py/objtype.c
#, c-format
msgid "__init__() should return None, not '%s'"
msgid "__init__() should return None, not '%q'"
msgstr ""
#: py/objobject.c
@ -1865,7 +1927,7 @@ msgstr ""
msgid "bad format string"
msgstr ""
#: py/binary.c
#: py/binary.c py/objarray.c
msgid "bad typecode"
msgstr ""
@ -1918,11 +1980,15 @@ msgstr ""
msgid "bytes > 8 bits not supported"
msgstr ""
#: py/objarray.c
msgid "bytes length not a multiple of item size"
msgstr ""
#: py/objstr.c
msgid "bytes value out of range"
msgstr ""
#: ports/atmel-samd/bindings/samd/Clock.c
#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c
msgid "calibration is out of range"
msgstr ""
@ -1954,47 +2020,17 @@ msgstr ""
msgid "can't assign to expression"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to complex"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to float"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to int"
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert '%q' object to %q implicitly"
msgstr ""
#: py/objint.c
msgid "can't convert NaN to int"
msgstr ""
#: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "can't convert address to int"
msgstr ""
#: py/objint.c
msgid "can't convert inf to int"
msgstr ""
#: py/obj.c
msgid "can't convert to complex"
msgstr ""
#: py/obj.c
msgid "can't convert to float"
msgstr ""
#: py/obj.c
msgid "can't convert to int"
msgid "can't convert to %q"
msgstr ""
#: py/objstr.c
@ -2402,7 +2438,7 @@ msgstr ""
msgid "function missing required positional argument #%d"
msgstr ""
#: py/argcheck.c py/bc.c py/objnamedtuple.c
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
#, c-format
msgid "function takes %d positional arguments but %d were given"
msgstr ""
@ -2451,10 +2487,7 @@ msgstr ""
msgid "index is out of bounds"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c
#: py/obj.c
msgid "index out of range"
msgstr ""
@ -2470,6 +2503,10 @@ msgstr ""
msgid "initial values must be iterable"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
msgstr ""
#: py/compile.c
msgid "inline assembler must be a function"
msgstr ""
@ -2662,6 +2699,10 @@ msgstr ""
msgid "max_length must be 0-%d when fixed_length is %s"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be > 0"
msgstr ""
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
@ -2810,8 +2851,7 @@ msgid "number of points must be at least 2"
msgstr ""
#: py/obj.c
#, c-format
msgid "object '%s' is not a tuple or list"
msgid "object '%q' is not a tuple or list"
msgstr ""
#: py/obj.c
@ -2847,8 +2887,7 @@ msgid "object not iterable"
msgstr ""
#: py/obj.c
#, c-format
msgid "object of type '%s' has no len()"
msgid "object of type '%q' has no len()"
msgstr ""
#: py/obj.c
@ -2898,10 +2937,23 @@ msgstr ""
msgid "ord() expected a character, but string of length %d found"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
msgstr ""
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
msgstr ""
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
msgstr ""
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
msgstr ""
@ -2941,20 +2993,9 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr ""
#: py/objset.c
msgid "pop from an empty set"
msgstr ""
#: py/objlist.c
msgid "pop from empty list"
msgstr ""
#: py/objdict.c
msgid "popitem(): dictionary is empty"
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
msgstr ""
#: py/objint_mpz.c
@ -3086,6 +3127,10 @@ msgstr ""
msgid "sosfilt requires iterable arguments"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr ""
#: py/objstr.c
msgid "start/end indices"
msgstr ""
@ -3111,12 +3156,7 @@ msgid "stream operation not supported"
msgstr ""
#: py/objstrunicode.c
msgid "string index out of range"
msgstr ""
#: py/objstrunicode.c
#, c-format
msgid "string indices must be integers, not %s"
msgid "string indices must be integers, not %q"
msgstr ""
#: py/stream.c
@ -3127,10 +3167,6 @@ msgstr ""
msgid "struct: cannot index"
msgstr ""
#: extmod/moductypes.c
msgid "struct: index out of range"
msgstr ""
#: extmod/moductypes.c
msgid "struct: no fields"
msgstr ""
@ -3200,7 +3236,7 @@ msgstr ""
msgid "trapz is defined for 1D arrays of equal length"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c py/objstr.c
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr ""
@ -3208,10 +3244,6 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"
@ -3267,8 +3299,7 @@ msgid "unknown conversion specifier %c"
msgstr ""
#: py/objstr.c
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgid "unknown format code '%c' for object of type '%q'"
msgstr ""
#: py/compile.c
@ -3308,7 +3339,7 @@ msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr ""
#: py/runtime.c
msgid "unsupported type for %q: '%s'"
msgid "unsupported type for %q: '%q'"
msgstr ""
#: py/runtime.c
@ -3316,7 +3347,7 @@ msgid "unsupported type for operator"
msgstr ""
#: py/runtime.c
msgid "unsupported types for %q: '%s', '%s'"
msgid "unsupported types for %q: '%q', '%q'"
msgstr ""
#: py/objint.c
@ -3395,3 +3426,13 @@ msgstr ""
#: extmod/ulab/code/filter/filter.c
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid ""
#~ "\n"
#~ "To exit, please reset the board without "
#~ msgstr ""
#~ "\n"
#~ "Pro ukončení, prosím resetujte desku bez "
#~ msgid "%q indices must be integers, not %s"
#~ msgstr "Indexy %q musí být celá čísla, nikoli %s"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-30 07:23-0500\n"
"POT-Creation-Date: 2020-09-13 14:21-0500\n"
"PO-Revision-Date: 2020-06-16 18:24+0000\n"
"Last-Translator: Andreas Buchen <andreas.buchen@gmail.com>\n"
"Language: de_DE\n"
@ -33,14 +33,6 @@ msgstr ""
"Bitte melden Sie ein Problem mit dem Inhalt Ihres CIRCUITPY-Laufwerks unter\n"
"https://github.com/adafruit/circuitpython/issues\n"
#: supervisor/shared/safe_mode.c
msgid ""
"\n"
"To exit, please reset the board without "
msgstr ""
"\n"
"Zum Beenden, resete bitte das Board ohne "
#: py/obj.c
msgid " File \"%q\""
msgstr " Datei \"%q\""
@ -71,13 +63,17 @@ msgstr ""
msgid "%q in use"
msgstr "%q in Benutzung"
#: py/obj.c
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
msgstr "Der Index %q befindet sich außerhalb des Bereiches"
#: py/obj.c
msgid "%q indices must be integers, not %s"
msgstr "%q Indizes müssen Integer sein, nicht %s"
msgid "%q indices must be integers, not %q"
msgstr ""
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@ -115,6 +111,42 @@ msgstr "%q() nimmt %d Argumente ohne Keyword an, aber es wurden %d angegeben"
msgid "'%q' argument required"
msgstr "'%q' Argument erforderlich"
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr ""
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr ""
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr ""
#: py/obj.c
msgid "'%q' object is not subscriptable"
msgstr ""
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a label"
@ -165,48 +197,6 @@ msgstr "'%s' integer %d ist nicht im Bereich %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' Integer 0x%x passt nicht in Maske 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr "Das Objekt '%s' kann das Attribut '%q' nicht zuweisen"
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr "Das Objekt '%s' unterstützt '%q' nicht"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item assignment"
msgstr "'%s' Objekt unterstützt keine Zuweisung von Elementen"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item deletion"
msgstr "'%s' Objekt unterstützt das Löschen von Elementen nicht"
#: py/runtime.c
msgid "'%s' object has no attribute '%q'"
msgstr "'%s' Objekt hat kein Attribut '%q'"
#: py/runtime.c
#, c-format
msgid "'%s' object is not an iterator"
msgstr "'%s' Objekt ist kein Iterator"
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
msgstr "'%s' object ist nicht aufrufbar"
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
msgstr "'%s' Objekt nicht iterierbar"
#: py/obj.c
#, c-format
msgid "'%s' object is not subscriptable"
msgstr "'%s' Objekt hat keine '__getitem__'-Methode (not subscriptable)"
#: py/objstr.c
msgid "'=' alignment not allowed in string format specifier"
msgstr "'='-Ausrichtung ist im String-Formatbezeichner nicht zulässig"
@ -280,7 +270,7 @@ msgstr "3-arg pow() wird nicht unterstützt"
msgid "A hardware interrupt channel is already in use"
msgstr "Ein Hardware Interrupt Kanal wird schon benutzt"
#: shared-bindings/_bleio/Address.c
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
msgid "Address must be %d bytes long"
msgstr "Die Adresse muss %d Bytes lang sein"
@ -309,7 +299,7 @@ msgstr "Alle event Kanäle werden benutzt"
msgid "All sync event channels in use"
msgstr "Alle sync event Kanäle werden benutzt"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr "Alle timer für diesen Pin werden bereits benutzt"
@ -321,7 +311,7 @@ msgstr "Alle timer für diesen Pin werden bereits benutzt"
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c
#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c
#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c
msgid "All timers in use"
msgstr "Alle timer werden benutzt"
@ -380,6 +370,10 @@ msgstr ""
"Versuch einer Heap Reservierung, wenn die MicroPython-VM nicht ausgeführt "
"wird."
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
msgstr ""
#: main.c
msgid "Auto-reload is off.\n"
msgstr "Automatisches Neuladen ist deaktiviert.\n"
@ -458,6 +452,10 @@ msgstr "Die Pufferlänge %d ist zu groß. Sie muss kleiner als %d sein"
msgid "Buffer length must be a multiple of 512"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Der Puffer muss eine Mindestenslänge von 1 haben"
@ -497,6 +495,10 @@ msgstr "Rufe super().__init__() vor dem Zugriff auf ein natives Objekt auf."
msgid "Can't set CCCD on local Characteristic"
msgstr "CCCD kann nicht auf lokales Merkmal eingestellt werden"
#: shared-bindings/_bleio/Adapter.c
msgid "Cannot create a new Adapter; use _bleio.adapter;"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
#: shared-bindings/memorymonitor/AllocationSize.c
#: shared-bindings/pulseio/PulseIn.c
@ -560,7 +562,7 @@ msgstr "Übertragung ohne MOSI- und MISO-Pins nicht möglich."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "sizeof scalar kann nicht eindeutig bestimmt werden"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
msgstr ""
"Die Frequenz eines bereits verwendeten Timers kann nicht variiert werden"
@ -586,6 +588,10 @@ msgstr ""
"Reset-Taste gedrückt haben. Drücken Sie erneut, um den abgesicherten Modus "
"zu verlassen.\n"
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
msgstr ""
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr "Clock pin init fehlgeschlagen."
@ -635,27 +641,31 @@ msgstr ""
msgid "Could not initialize UART"
msgstr "Konnte UART nicht initialisieren"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize channel"
msgstr "Kanal konnte nicht initialisiert werden"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize timer"
msgstr "Timer konnte nicht initialisiert werden"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init channel"
msgstr "Kanal konnte nicht neu initiiert werden"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init timer"
msgstr "Timer konnte nicht neu gestartet werden"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not restart PWM"
msgstr "PWM konnte nicht neu gestartet werden"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
msgstr ""
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
msgstr "PWM konnte nicht gestartet werden"
@ -752,9 +762,9 @@ msgstr "EXTINT Kanal ist schon in Benutzung"
msgid "Error in regex"
msgstr "Fehler in regex"
#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c
#: shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
msgid "Expected a %q"
msgstr "Erwartet ein(e) %q"
@ -764,10 +774,18 @@ msgstr "Erwartet ein(e) %q"
msgid "Expected a Characteristic"
msgstr "Characteristic wird erwartet"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr "Ein Service wird erwartet"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
msgid "Expected a UUID"
@ -838,13 +856,18 @@ msgstr "Interner Flash konnte nicht geschrieben werden."
msgid "File exists"
msgstr "Datei existiert"
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
"Die aufgezeichnete Frequenz liegt über der Leistungsgrenze. Aufnahme "
"angehalten."
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Frequency must match existing PWMOut using this timer"
msgstr ""
"Die Frequenz muss mit dem vorhandenen PWMOut unter Verwendung dieses Timers "
@ -866,7 +889,7 @@ msgid "Group full"
msgstr "Gruppe voll"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr "Hardware beschäftigt, versuchen Sie alternative Pins"
@ -933,6 +956,11 @@ msgstr ""
msgid "Invalid %q pin"
msgstr "Ungültiger %q pin"
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr ""
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
msgstr "Ungültiger ADC-Einheitenwert"
@ -945,24 +973,12 @@ msgstr "Ungültige BMP-Datei"
msgid "Invalid DAC pin supplied"
msgstr "Ungültiger DAC-Pin angegeben"
#: ports/stm/common-hal/busio/I2C.c
msgid "Invalid I2C pin selection"
msgstr "Ungültige I2C-Pinauswahl"
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Ungültige PWM Frequenz"
#: ports/stm/common-hal/busio/SPI.c
msgid "Invalid SPI pin selection"
msgstr "Ungültige SPI-Pin-Auswahl"
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid UART pin selection"
msgstr "Ungültige UART-Pinauswahl"
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument"
msgstr "Ungültiges Argument"
@ -999,7 +1015,7 @@ msgstr "Ungültige Datei"
msgid "Invalid format chunk size"
msgstr "Ungültige format chunk size"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
msgstr "Ungültige Frequenz geliefert"
@ -1017,8 +1033,8 @@ msgid "Invalid phase"
msgstr "Ungültige Phase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Ungültiger Pin"
@ -1042,7 +1058,7 @@ msgstr "Ungültiger Pin für rechten Kanal"
msgid "Invalid pins"
msgstr "Ungültige Pins"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr "Ungültige Pins für PWMOut"
@ -1226,10 +1242,14 @@ msgstr "Es wurde kein Schlüssel angegeben"
msgid "No long integer support"
msgstr "Keine langen Integer (long) unterstützt"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
msgstr "An diesem Pin sind keine Timer mehr verfügbar."
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
msgstr ""
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr "Kein Pulldown Widerstand am Pin; 1Mohm wird vorgeschlagen"
@ -1250,6 +1270,10 @@ msgstr "Kein Timer verfügbar"
msgid "Nordic Soft Device failure assertion."
msgstr "Fehlerbehauptung für Nordic Soft Device."
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
msgid "Not connected"
@ -1260,6 +1284,14 @@ msgstr "Nicht verbunden"
msgid "Not playing"
msgstr "Spielt nicht ab"
#: main.c
msgid "Not running saved code.\n"
msgstr ""
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
msgstr ""
#: shared-bindings/util.c
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
@ -1292,16 +1324,20 @@ msgstr ""
"Nur monochrome, indizierte 4bpp oder 8bpp, und 16bpp oder größere BMPs "
"unterstützt: %d bpp wurden gegeben"
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
msgstr "Oversample muss ein Vielfaches von 8 sein."
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr "PWM duty_cycle muss zwischen 0 und 65535 (16 Bit Auflösung) liegen"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr "Die PWM-Frequenz ist nicht schreibbar wenn variable_Frequenz = False."
@ -1354,9 +1390,14 @@ msgstr "und alle Module im Dateisystem \n"
msgid "Polygon needs at least 3 points"
msgstr "Polygone brauchen mindestens 3 Punkte"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr "Pop aus einem leeren Ps2-Puffer"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c
#: ports/stm/common-hal/pulseio/PulseOut.c
msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Prefix buffer must be on the heap"
@ -1432,12 +1473,8 @@ msgid "Row entry must be digitalio.DigitalInOut"
msgstr "Zeileneintrag muss ein digitalio.DigitalInOut sein"
#: main.c
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Sicherheitsmodus aktiv! Automatisches Neuladen ist deaktiviert.\n"
#: main.c
msgid "Running in safe mode! Not running saved code.\n"
msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n"
msgid "Running in safe mode! "
msgstr ""
#: shared-module/sdcardio/SDCard.c
msgid "SD card CSD format not supported"
@ -1448,6 +1485,16 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr "SDA oder SCL brauchen pull up"
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO Init Error %d"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "SPI Init Error"
msgstr "SPI-Init-Fehler"
@ -1482,6 +1529,10 @@ msgstr "Ausgewählter RTS-Pin ungültig"
msgid "Serializer in use"
msgstr "Serializer wird benutzt"
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
msgstr ""
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
msgstr "Slice und Wert (value) haben unterschiedliche Längen."
@ -1589,11 +1640,15 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds"
msgstr ""
"Zeitbeschränkung ist zu groß: Maximale Zeitbeschränkung ist %d Sekunden"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid ""
"Timer was reserved for internal use - declare PWM pins earlier in the program"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
msgstr "Zum beenden, resette bitte das board ohne "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
msgstr "Zu viele Kanäle im sample."
@ -1691,6 +1746,10 @@ msgstr "Schreiben in nvm nicht möglich."
msgid "Unexpected nrfx uuid type"
msgstr "Unerwarteter nrfx uuid-Typ"
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown gatt error: 0x%04x"
@ -1805,6 +1864,10 @@ msgstr ""
"Um die integrierten Module aufzulisten, führe bitte `help(\"modules\")` "
"aus.\n"
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
msgstr ""
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr "Schreiben nicht unterstüzt für die Characteristic"
@ -1824,9 +1887,8 @@ msgid "__init__() should return None"
msgstr "__init__() sollte None zurückgeben"
#: py/objtype.c
#, c-format
msgid "__init__() should return None, not '%s'"
msgstr "__init__() sollte None zurückgeben, nicht '%s'"
msgid "__init__() should return None, not '%q'"
msgstr ""
#: py/objobject.c
msgid "__new__ arg must be a user-type"
@ -1922,7 +1984,7 @@ msgstr "schlechter Konvertierungsspezifizierer"
msgid "bad format string"
msgstr "Falscher Formatstring"
#: py/binary.c
#: py/binary.c py/objarray.c
msgid "bad typecode"
msgstr "Falscher Typcode"
@ -1975,11 +2037,15 @@ msgstr "Byteorder ist kein String"
msgid "bytes > 8 bits not supported"
msgstr "bytes mit mehr als 8 bits werden nicht unterstützt"
#: py/objarray.c
msgid "bytes length not a multiple of item size"
msgstr ""
#: py/objstr.c
msgid "bytes value out of range"
msgstr "Byte-Wert außerhalb des Bereichs"
#: ports/atmel-samd/bindings/samd/Clock.c
#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c
msgid "calibration is out of range"
msgstr "Kalibrierung ist außerhalb der Reichweite"
@ -2013,48 +2079,18 @@ msgstr ""
msgid "can't assign to expression"
msgstr "kann keinem Ausdruck zuweisen"
#: py/obj.c
#, c-format
msgid "can't convert %s to complex"
msgstr "kann %s nicht nach complex konvertieren"
#: py/obj.c
#, c-format
msgid "can't convert %s to float"
msgstr "kann %s nicht nach float konvertieren"
#: py/obj.c
#, c-format
msgid "can't convert %s to int"
msgstr "kann %s nicht nach int konvertieren"
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert '%q' object to %q implicitly"
msgstr "Kann '%q' Objekt nicht implizit nach %q konvertieren"
#: py/objint.c
msgid "can't convert NaN to int"
msgstr "kann NaN nicht nach int konvertieren"
#: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "can't convert address to int"
msgstr "kann Adresse nicht in int konvertieren"
#: py/objint.c
msgid "can't convert inf to int"
msgstr "kann inf nicht nach int konvertieren"
#: py/obj.c
msgid "can't convert to complex"
msgstr "kann nicht nach complex konvertieren"
#: py/obj.c
msgid "can't convert to float"
msgstr "kann nicht nach float konvertieren"
#: py/obj.c
msgid "can't convert to int"
msgstr "kann nicht nach int konvertieren"
msgid "can't convert to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert to str implicitly"
@ -2472,7 +2508,7 @@ msgstr "Funktion vermisst benötigtes Keyword-Argumente '%q'"
msgid "function missing required positional argument #%d"
msgstr "Funktion vermisst benötigtes Argumente ohne Keyword #%d"
#: py/argcheck.c py/bc.c py/objnamedtuple.c
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
#, c-format
msgid "function takes %d positional arguments but %d were given"
msgstr ""
@ -2522,10 +2558,7 @@ msgstr "padding ist inkorrekt"
msgid "index is out of bounds"
msgstr "Index ist außerhalb der Grenzen"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c
#: py/obj.c
msgid "index out of range"
msgstr "index außerhalb der Reichweite"
@ -2541,6 +2574,10 @@ msgstr "Indizes müssen Integer, Slices oder Boolesche Listen sein"
msgid "initial values must be iterable"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
msgstr ""
#: py/compile.c
msgid "inline assembler must be a function"
msgstr "inline assembler muss eine function sein"
@ -2739,6 +2776,10 @@ msgstr "Matrix ist nicht positiv definitiv"
msgid "max_length must be 0-%d when fixed_length is %s"
msgstr "max_length muss 0-%d sein, wenn fixed_length %s ist"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be > 0"
msgstr ""
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "maximale Rekursionstiefe überschritten"
@ -2888,9 +2929,8 @@ msgid "number of points must be at least 2"
msgstr "Die Anzahl der Punkte muss mindestens 2 betragen"
#: py/obj.c
#, c-format
msgid "object '%s' is not a tuple or list"
msgstr "Objekt '%s' ist weder tupel noch list"
msgid "object '%q' is not a tuple or list"
msgstr ""
#: py/obj.c
msgid "object does not support item assignment"
@ -2925,9 +2965,8 @@ msgid "object not iterable"
msgstr "Objekt nicht iterierbar"
#: py/obj.c
#, c-format
msgid "object of type '%s' has no len()"
msgstr "Objekt vom Typ '%s' hat keine len()"
msgid "object of type '%q' has no len()"
msgstr ""
#: py/obj.c
msgid "object with buffer protocol required"
@ -2979,10 +3018,23 @@ msgstr ""
"ord() erwartet einen Buchstaben(char) aber es wurde ein String mit Länge %d "
"gefunden"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
msgstr ""
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
msgstr "Überlauf beim konvertieren von long int zu machine word"
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
msgstr ""
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
msgstr "Die Palette muss 32 Byte lang sein"
@ -3022,21 +3074,10 @@ msgstr "Polygon kann nur in einem übergeordneten Element registriert werden"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop von einem leeren PulseIn"
#: py/objset.c
msgid "pop from an empty set"
msgstr "pop von einer leeren Menge (set)"
#: py/objlist.c
msgid "pop from empty list"
msgstr "pop von einer leeren Liste"
#: py/objdict.c
msgid "popitem(): dictionary is empty"
msgstr "popitem(): dictionary ist leer"
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
msgstr ""
#: py/objint_mpz.c
msgid "pow() 3rd argument cannot be 0"
@ -3169,6 +3210,10 @@ msgstr ""
msgid "sosfilt requires iterable arguments"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr ""
#: py/objstr.c
msgid "start/end indices"
msgstr "start/end Indizes"
@ -3194,13 +3239,8 @@ msgid "stream operation not supported"
msgstr "stream operation ist nicht unterstützt"
#: py/objstrunicode.c
msgid "string index out of range"
msgstr "String index außerhalb des Bereiches"
#: py/objstrunicode.c
#, c-format
msgid "string indices must be integers, not %s"
msgstr "String indizes müssen Integer sein, nicht %s"
msgid "string indices must be integers, not %q"
msgstr ""
#: py/stream.c
msgid "string not supported; use bytes or bytearray"
@ -3211,10 +3251,6 @@ msgstr ""
msgid "struct: cannot index"
msgstr "struct: kann nicht indexieren"
#: extmod/moductypes.c
msgid "struct: index out of range"
msgstr "struct: index außerhalb gültigen Bereichs"
#: extmod/moductypes.c
msgid "struct: no fields"
msgstr "struct: keine Felder"
@ -3284,7 +3320,7 @@ msgstr "zu viele Werte zum Auspacken (erwartet %d)"
msgid "trapz is defined for 1D arrays of equal length"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c py/objstr.c
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr "Tupelindex außerhalb des Bereichs"
@ -3292,10 +3328,6 @@ msgstr "Tupelindex außerhalb des Bereichs"
msgid "tuple/list has wrong length"
msgstr "tupel/list hat falsche Länge"
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr "Tupel / Liste auf RHS erforderlich"
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"
@ -3355,9 +3387,8 @@ msgid "unknown conversion specifier %c"
msgstr "unbekannter Konvertierungs specifier %c"
#: py/objstr.c
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgstr "unbekannter Formatcode '%c' für Objekt vom Typ '%s'"
msgid "unknown format code '%c' for object of type '%q'"
msgstr ""
#: py/compile.c
msgid "unknown type"
@ -3396,16 +3427,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr "nicht unterstütztes Formatzeichen '%c' (0x%x) bei Index %d"
#: py/runtime.c
msgid "unsupported type for %q: '%s'"
msgstr "nicht unterstützter Type für %q: '%s'"
msgid "unsupported type for %q: '%q'"
msgstr ""
#: py/runtime.c
msgid "unsupported type for operator"
msgstr "nicht unterstützter Typ für Operator"
#: py/runtime.c
msgid "unsupported types for %q: '%s', '%s'"
msgstr "nicht unterstützte Typen für %q: '%s', '%s'"
msgid "unsupported types for %q: '%q', '%q'"
msgstr ""
#: py/objint.c
#, c-format
@ -3484,15 +3515,139 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid ""
#~ "\n"
#~ "To exit, please reset the board without "
#~ msgstr ""
#~ "\n"
#~ "Zum Beenden, resete bitte das Board ohne "
#~ msgid "PulseOut not supported on this chip"
#~ msgstr "PulseOut wird auf diesem Chip nicht unterstützt"
#~ msgid "tuple/list required on RHS"
#~ msgstr "Tupel / Liste auf RHS erforderlich"
#~ msgid "%q indices must be integers, not %s"
#~ msgstr "%q Indizes müssen Integer sein, nicht %s"
#~ msgid "'%s' object cannot assign attribute '%q'"
#~ msgstr "Das Objekt '%s' kann das Attribut '%q' nicht zuweisen"
#~ msgid "'%s' object does not support '%q'"
#~ msgstr "Das Objekt '%s' unterstützt '%q' nicht"
#~ msgid "'%s' object does not support item assignment"
#~ msgstr "'%s' Objekt unterstützt keine Zuweisung von Elementen"
#~ msgid "'%s' object does not support item deletion"
#~ msgstr "'%s' Objekt unterstützt das Löschen von Elementen nicht"
#~ msgid "'%s' object has no attribute '%q'"
#~ msgstr "'%s' Objekt hat kein Attribut '%q'"
#~ msgid "'%s' object is not an iterator"
#~ msgstr "'%s' Objekt ist kein Iterator"
#~ msgid "'%s' object is not callable"
#~ msgstr "'%s' object ist nicht aufrufbar"
#~ msgid "'%s' object is not iterable"
#~ msgstr "'%s' Objekt nicht iterierbar"
#~ msgid "'%s' object is not subscriptable"
#~ msgstr "'%s' Objekt hat keine '__getitem__'-Methode (not subscriptable)"
#~ msgid "Invalid I2C pin selection"
#~ msgstr "Ungültige I2C-Pinauswahl"
#~ msgid "Invalid SPI pin selection"
#~ msgstr "Ungültige SPI-Pin-Auswahl"
#~ msgid "Invalid UART pin selection"
#~ msgstr "Ungültige UART-Pinauswahl"
#~ msgid "Pop from an empty Ps2 buffer"
#~ msgstr "Pop aus einem leeren Ps2-Puffer"
#~ msgid "Running in safe mode! Auto-reload is off.\n"
#~ msgstr "Sicherheitsmodus aktiv! Automatisches Neuladen ist deaktiviert.\n"
#~ msgid "Running in safe mode! Not running saved code.\n"
#~ msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n"
#~ msgid "__init__() should return None, not '%s'"
#~ msgstr "__init__() sollte None zurückgeben, nicht '%s'"
#~ msgid "can't convert %s to complex"
#~ msgstr "kann %s nicht nach complex konvertieren"
#~ msgid "can't convert %s to float"
#~ msgstr "kann %s nicht nach float konvertieren"
#~ msgid "can't convert %s to int"
#~ msgstr "kann %s nicht nach int konvertieren"
#~ msgid "can't convert NaN to int"
#~ msgstr "kann NaN nicht nach int konvertieren"
#~ msgid "can't convert address to int"
#~ msgstr "kann Adresse nicht in int konvertieren"
#~ msgid "can't convert inf to int"
#~ msgstr "kann inf nicht nach int konvertieren"
#~ msgid "can't convert to complex"
#~ msgstr "kann nicht nach complex konvertieren"
#~ msgid "can't convert to float"
#~ msgstr "kann nicht nach float konvertieren"
#~ msgid "can't convert to int"
#~ msgstr "kann nicht nach int konvertieren"
#~ msgid "object '%s' is not a tuple or list"
#~ msgstr "Objekt '%s' ist weder tupel noch list"
#~ msgid "object of type '%s' has no len()"
#~ msgstr "Objekt vom Typ '%s' hat keine len()"
#~ msgid "pop from an empty PulseIn"
#~ msgstr "pop von einem leeren PulseIn"
#~ msgid "pop from an empty set"
#~ msgstr "pop von einer leeren Menge (set)"
#~ msgid "pop from empty list"
#~ msgstr "pop von einer leeren Liste"
#~ msgid "popitem(): dictionary is empty"
#~ msgstr "popitem(): dictionary ist leer"
#~ msgid "string index out of range"
#~ msgstr "String index außerhalb des Bereiches"
#~ msgid "string indices must be integers, not %s"
#~ msgstr "String indizes müssen Integer sein, nicht %s"
#~ msgid "struct: index out of range"
#~ msgstr "struct: index außerhalb gültigen Bereichs"
#~ msgid "unknown format code '%c' for object of type '%s'"
#~ msgstr "unbekannter Formatcode '%c' für Objekt vom Typ '%s'"
#~ msgid "unsupported type for %q: '%s'"
#~ msgstr "nicht unterstützter Type für %q: '%s'"
#~ msgid "unsupported types for %q: '%s', '%s'"
#~ msgstr "nicht unterstützte Typen für %q: '%s', '%s'"
#~ msgid "'async for' or 'async with' outside async function"
#~ msgstr "'async for' oder 'async with' außerhalb der asynchronen Funktion"
#~ msgid "PulseIn not supported on this chip"
#~ msgstr "PulseIn wird auf diesem Chip nicht unterstützt"
#~ msgid "PulseOut not supported on this chip"
#~ msgstr "PulseOut wird auf diesem Chip nicht unterstützt"
#~ msgid "AP required"
#~ msgstr "AP erforderlich"
@ -3789,9 +3944,6 @@ msgstr ""
#~ "Die Reset-Taste wurde beim Booten von CircuitPython gedrückt. Drücke sie "
#~ "erneut um den abgesicherten Modus zu verlassen. \n"
#~ msgid "To exit, please reset the board without "
#~ msgstr "Zum beenden, resette bitte das board ohne "
#~ msgid "UART(%d) does not exist"
#~ msgstr "UART(%d) existiert nicht"

3423
locale/el.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-30 07:23-0500\n"
"POT-Creation-Date: 2020-09-13 14:21-0500\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@ -28,12 +28,6 @@ msgid ""
"https://github.com/adafruit/circuitpython/issues\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid ""
"\n"
"To exit, please reset the board without "
msgstr ""
#: py/obj.c
msgid " File \"%q\""
msgstr " File \"%q\""
@ -64,13 +58,17 @@ msgstr ""
msgid "%q in use"
msgstr "%q ay ginagamit"
#: py/obj.c
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
msgstr "%q indeks wala sa sakop"
#: py/obj.c
msgid "%q indices must be integers, not %s"
msgstr "%q indeks ay dapat integers, hindi %s"
msgid "%q indices must be integers, not %q"
msgstr ""
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@ -111,6 +109,42 @@ msgstr ""
msgid "'%q' argument required"
msgstr "'%q' argument kailangan"
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr ""
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr ""
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr ""
#: py/obj.c
msgid "'%q' object is not subscriptable"
msgstr ""
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a label"
@ -161,48 +195,6 @@ msgstr "'%s' integer %d ay wala sa sakop ng %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' integer 0x%x ay wala sa mask na sakop ng 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""
#: py/obj.c
#, c-format
msgid "'%s' object does not support item assignment"
msgstr "'%s' object hindi sumusuporta ng item assignment"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item deletion"
msgstr "'%s' object ay hindi sumusuporta sa pagtanggal ng item"
#: py/runtime.c
msgid "'%s' object has no attribute '%q'"
msgstr "'%s' object ay walang attribute '%q'"
#: py/runtime.c
#, c-format
msgid "'%s' object is not an iterator"
msgstr "'%s' object ay hindi iterator"
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
msgstr "'%s' object hindi matatawag"
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
msgstr "'%s' object ay hindi ma i-iterable"
#: py/obj.c
#, c-format
msgid "'%s' object is not subscriptable"
msgstr "'%s' object ay hindi maaaring i-subscript"
#: py/objstr.c
msgid "'=' alignment not allowed in string format specifier"
msgstr "'=' Gindi pinapayagan ang alignment sa pag specify ng string format"
@ -276,7 +268,7 @@ msgstr "3-arg pow() hindi suportado"
msgid "A hardware interrupt channel is already in use"
msgstr "Isang channel ng hardware interrupt ay ginagamit na"
#: shared-bindings/_bleio/Address.c
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, fuzzy, c-format
msgid "Address must be %d bytes long"
msgstr "ang palette ay dapat 32 bytes ang haba"
@ -306,7 +298,7 @@ msgstr "Lahat ng event channels ginagamit"
msgid "All sync event channels in use"
msgstr "Lahat ng sync event channels ay ginagamit"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr "Lahat ng timers para sa pin na ito ay ginagamit"
@ -318,7 +310,7 @@ msgstr "Lahat ng timers para sa pin na ito ay ginagamit"
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c
#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c
#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c
msgid "All timers in use"
msgstr "Lahat ng timer ginagamit"
@ -375,6 +367,10 @@ msgstr ""
msgid "Attempted heap allocation when MicroPython VM not running."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
msgstr ""
#: main.c
msgid "Auto-reload is off.\n"
msgstr "Awtomatikong pag re-reload ay OFF.\n"
@ -453,6 +449,10 @@ msgstr ""
msgid "Buffer length must be a multiple of 512"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Buffer dapat ay hindi baba sa 1 na haba"
@ -493,6 +493,10 @@ msgstr ""
msgid "Can't set CCCD on local Characteristic"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Cannot create a new Adapter; use _bleio.adapter;"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
#: shared-bindings/memorymonitor/AllocationSize.c
#: shared-bindings/pulseio/PulseIn.c
@ -556,7 +560,7 @@ msgstr "Hindi maaaring ilipat kapag walang MOSI at MISO pin."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "Hindi puedeng hindi sigurado ang get sizeof scalar"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
msgstr ""
@ -578,6 +582,10 @@ msgid ""
"boot. Press again to exit safe mode.\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
msgstr ""
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr "Nabigo sa pag init ng Clock pin."
@ -626,27 +634,31 @@ msgstr ""
msgid "Could not initialize UART"
msgstr "Hindi ma-initialize ang UART"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not restart PWM"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
msgstr ""
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
msgstr ""
@ -746,9 +758,9 @@ msgstr "Ginagamit na ang EXTINT channel"
msgid "Error in regex"
msgstr "May pagkakamali sa REGEX"
#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c
#: shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
msgid "Expected a %q"
msgstr "Umasa ng %q"
@ -759,10 +771,18 @@ msgstr "Umasa ng %q"
msgid "Expected a Characteristic"
msgstr "Hindi mabasa and Characteristic."
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
#, fuzzy
@ -833,11 +853,16 @@ msgstr ""
msgid "File exists"
msgstr "Mayroong file"
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Frequency must match existing PWMOut using this timer"
msgstr ""
@ -857,7 +882,7 @@ msgid "Group full"
msgstr "Puno ang group"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr ""
@ -924,6 +949,11 @@ msgstr ""
msgid "Invalid %q pin"
msgstr "Mali ang %q pin"
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr ""
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
msgstr ""
@ -936,24 +966,12 @@ msgstr "Mali ang BMP file"
msgid "Invalid DAC pin supplied"
msgstr ""
#: ports/stm/common-hal/busio/I2C.c
msgid "Invalid I2C pin selection"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Mali ang PWM frequency"
#: ports/stm/common-hal/busio/SPI.c
msgid "Invalid SPI pin selection"
msgstr ""
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid UART pin selection"
msgstr ""
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument"
msgstr "Maling argumento"
@ -990,7 +1008,7 @@ msgstr "Mali ang file"
msgid "Invalid format chunk size"
msgstr "Mali ang format ng chunk size"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
msgstr ""
@ -1008,8 +1026,8 @@ msgid "Invalid phase"
msgstr "Mali ang phase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Mali ang pin"
@ -1033,7 +1051,7 @@ msgstr "Mali ang pin para sa kanang channel"
msgid "Invalid pins"
msgstr "Mali ang pins"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
@ -1215,10 +1233,14 @@ msgstr ""
msgid "No long integer support"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
msgstr ""
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@ -1239,6 +1261,10 @@ msgstr ""
msgid "Nordic Soft Device failure assertion."
msgstr ""
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
#, fuzzy
@ -1250,6 +1276,14 @@ msgstr "Hindi maka connect sa AP"
msgid "Not playing"
msgstr "Hindi playing"
#: main.c
msgid "Not running saved code.\n"
msgstr ""
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
msgstr ""
#: shared-bindings/util.c
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
@ -1278,16 +1312,20 @@ msgid ""
"%d bpp given"
msgstr ""
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
msgstr "Oversample ay dapat multiple ng 8."
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr "PWM duty_cycle ay dapat sa loob ng 0 at 65535 (16 bit resolution)"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
@ -1338,8 +1376,13 @@ msgstr "Kasama ang kung ano pang modules na sa filesystem\n"
msgid "Polygon needs at least 3 points"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c
#: ports/stm/common-hal/pulseio/PulseOut.c
msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
@ -1417,12 +1460,8 @@ msgid "Row entry must be digitalio.DigitalInOut"
msgstr ""
#: main.c
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Tumatakbo sa safe mode! Awtomatikong pag re-reload ay OFF.\n"
#: main.c
msgid "Running in safe mode! Not running saved code.\n"
msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n"
msgid "Running in safe mode! "
msgstr ""
#: shared-module/sdcardio/SDCard.c
msgid "SD card CSD format not supported"
@ -1433,6 +1472,16 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr "Kailangan ng pull up resistors ang SDA o SCL"
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO Init Error %d"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "SPI Init Error"
msgstr ""
@ -1467,6 +1516,10 @@ msgstr ""
msgid "Serializer in use"
msgstr "Serializer ginagamit"
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
msgstr ""
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
msgstr "Slice at value iba't ibang haba."
@ -1562,11 +1615,15 @@ msgstr ""
msgid "Timeout is too long: Maximum timeout length is %d seconds"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid ""
"Timer was reserved for internal use - declare PWM pins earlier in the program"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
msgstr "Para lumabas, paki-reset ang board na wala ang "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
msgstr "Sobra ang channels sa sample."
@ -1663,6 +1720,10 @@ msgstr "Hindi ma i-sulat sa NVM."
msgid "Unexpected nrfx uuid type"
msgstr "hindi inaasahang indent"
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown gatt error: 0x%04x"
@ -1775,6 +1836,10 @@ msgstr ""
"\n"
"Para makita ang listahan ng modules, `help(“modules”)`.\n"
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
msgstr ""
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr ""
@ -1792,9 +1857,8 @@ msgid "__init__() should return None"
msgstr "__init __ () dapat magbalik na None"
#: py/objtype.c
#, c-format
msgid "__init__() should return None, not '%s'"
msgstr "__init__() dapat magbalink na None, hindi '%s'"
msgid "__init__() should return None, not '%q'"
msgstr ""
#: py/objobject.c
msgid "__new__ arg must be a user-type"
@ -1890,7 +1954,7 @@ msgstr "masamang pag convert na specifier"
msgid "bad format string"
msgstr "maling format ang string"
#: py/binary.c
#: py/binary.c py/objarray.c
msgid "bad typecode"
msgstr "masamang typecode"
@ -1944,11 +2008,15 @@ msgstr ""
msgid "bytes > 8 bits not supported"
msgstr "hindi sinusuportahan ang bytes > 8 bits"
#: py/objarray.c
msgid "bytes length not a multiple of item size"
msgstr ""
#: py/objstr.c
msgid "bytes value out of range"
msgstr "bytes value wala sa sakop"
#: ports/atmel-samd/bindings/samd/Clock.c
#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c
msgid "calibration is out of range"
msgstr "kalibrasion ay wala sa sakop"
@ -1981,48 +2049,18 @@ msgstr ""
msgid "can't assign to expression"
msgstr "hindi ma i-assign sa expression"
#: py/obj.c
#, c-format
msgid "can't convert %s to complex"
msgstr "hindi ma-convert %s sa complex"
#: py/obj.c
#, c-format
msgid "can't convert %s to float"
msgstr "hindi ma-convert %s sa int"
#: py/obj.c
#, c-format
msgid "can't convert %s to int"
msgstr "hindi ma-convert %s sa int"
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert '%q' object to %q implicitly"
msgstr "hindi maaaring i-convert ang '%q' na bagay sa %q nang walang pahiwatig"
#: py/objint.c
msgid "can't convert NaN to int"
msgstr "hindi ma i-convert NaN sa int"
#: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "can't convert address to int"
msgstr "hindi ma i-convert ang address sa INT"
#: py/objint.c
msgid "can't convert inf to int"
msgstr "hindi ma i-convert inf sa int"
#: py/obj.c
msgid "can't convert to complex"
msgstr "hindi ma-convert sa complex"
#: py/obj.c
msgid "can't convert to float"
msgstr "hindi ma-convert sa float"
#: py/obj.c
msgid "can't convert to int"
msgstr "hindi ma-convert sa int"
msgid "can't convert to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert to str implicitly"
@ -2055,7 +2093,7 @@ msgstr "hindi puede ang maraming *x"
#: py/emitnative.c
msgid "can't implicitly convert '%q' to 'bool'"
msgstr "hindi maaaring ma-convert ang '% qt' sa 'bool'"
msgstr "hindi maaaring ma-convert ang ' %q' sa 'bool'"
#: py/emitnative.c
msgid "can't load from '%q'"
@ -2439,7 +2477,7 @@ msgstr "function nangangailangan ng keyword argument '%q'"
msgid "function missing required positional argument #%d"
msgstr "function nangangailangan ng positional argument #%d"
#: py/argcheck.c py/bc.c py/objnamedtuple.c
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
#, c-format
msgid "function takes %d positional arguments but %d were given"
msgstr ""
@ -2489,10 +2527,7 @@ msgstr "mali ang padding"
msgid "index is out of bounds"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c
#: py/obj.c
msgid "index out of range"
msgstr "index wala sa sakop"
@ -2508,6 +2543,10 @@ msgstr ""
msgid "initial values must be iterable"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
msgstr ""
#: py/compile.c
msgid "inline assembler must be a function"
msgstr "inline assembler ay dapat na function"
@ -2704,6 +2743,10 @@ msgstr ""
msgid "max_length must be 0-%d when fixed_length is %s"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be > 0"
msgstr ""
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "lumagpas ang maximum recursion depth"
@ -2852,9 +2895,8 @@ msgid "number of points must be at least 2"
msgstr ""
#: py/obj.c
#, c-format
msgid "object '%s' is not a tuple or list"
msgstr "object '%s' ay hindi tuple o list"
msgid "object '%q' is not a tuple or list"
msgstr ""
#: py/obj.c
msgid "object does not support item assignment"
@ -2889,9 +2931,8 @@ msgid "object not iterable"
msgstr "object hindi ma i-iterable"
#: py/obj.c
#, c-format
msgid "object of type '%s' has no len()"
msgstr "object na type '%s' walang len()"
msgid "object of type '%q' has no len()"
msgstr ""
#: py/obj.c
msgid "object with buffer protocol required"
@ -2941,10 +2982,23 @@ msgstr "ord umaasa ng character"
msgid "ord() expected a character, but string of length %d found"
msgstr "ord() umaasa ng character pero string ng %d haba ang nakita"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
msgstr ""
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
msgstr "overflow nagcoconvert ng long int sa machine word"
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
msgstr ""
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
msgstr "ang palette ay dapat 32 bytes ang haba"
@ -2985,21 +3039,10 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop mula sa walang laman na PulseIn"
#: py/objset.c
msgid "pop from an empty set"
msgstr "pop sa walang laman na set"
#: py/objlist.c
msgid "pop from empty list"
msgstr "pop galing sa walang laman na list"
#: py/objdict.c
msgid "popitem(): dictionary is empty"
msgstr "popitem(): dictionary ay walang laman"
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
msgstr ""
#: py/objint_mpz.c
msgid "pow() 3rd argument cannot be 0"
@ -3132,6 +3175,10 @@ msgstr ""
msgid "sosfilt requires iterable arguments"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr ""
#: py/objstr.c
msgid "start/end indices"
msgstr "start/end indeks"
@ -3158,13 +3205,8 @@ msgid "stream operation not supported"
msgstr "stream operation hindi sinusuportahan"
#: py/objstrunicode.c
msgid "string index out of range"
msgstr "indeks ng string wala sa sakop"
#: py/objstrunicode.c
#, c-format
msgid "string indices must be integers, not %s"
msgstr "ang indeks ng string ay dapat na integer, hindi %s"
msgid "string indices must be integers, not %q"
msgstr ""
#: py/stream.c
msgid "string not supported; use bytes or bytearray"
@ -3174,10 +3216,6 @@ msgstr "string hindi supportado; gumamit ng bytes o kaya bytearray"
msgid "struct: cannot index"
msgstr "struct: hindi ma-index"
#: extmod/moductypes.c
msgid "struct: index out of range"
msgstr "struct: index hindi maabot"
#: extmod/moductypes.c
msgid "struct: no fields"
msgstr "struct: walang fields"
@ -3248,7 +3286,7 @@ msgstr "masyadong maraming values para i-unpact (umaasa ng %d)"
msgid "trapz is defined for 1D arrays of equal length"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c py/objstr.c
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr "indeks ng tuple wala sa sakop"
@ -3256,10 +3294,6 @@ msgstr "indeks ng tuple wala sa sakop"
msgid "tuple/list has wrong length"
msgstr "mali ang haba ng tuple/list"
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"
@ -3315,9 +3349,8 @@ msgid "unknown conversion specifier %c"
msgstr "hindi alam ang conversion specifier na %c"
#: py/objstr.c
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgstr "hindi alam ang format code '%c' para sa object na ang type ay '%s'"
msgid "unknown format code '%c' for object of type '%q'"
msgstr ""
#: py/compile.c
msgid "unknown type"
@ -3356,16 +3389,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr "hindi sinusuportahan ang format character na '%c' (0x%x) sa index %d"
#: py/runtime.c
msgid "unsupported type for %q: '%s'"
msgstr "hindi sinusuportahang type para sa %q: '%s'"
msgid "unsupported type for %q: '%q'"
msgstr ""
#: py/runtime.c
msgid "unsupported type for operator"
msgstr "hindi sinusuportahang type para sa operator"
#: py/runtime.c
msgid "unsupported types for %q: '%s', '%s'"
msgstr "hindi sinusuportahang type para sa %q: '%s', '%s'"
msgid "unsupported types for %q: '%q', '%q'"
msgstr ""
#: py/objint.c
#, c-format
@ -3446,6 +3479,102 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "%q indices must be integers, not %s"
#~ msgstr "%q indeks ay dapat integers, hindi %s"
#~ msgid "'%s' object does not support item assignment"
#~ msgstr "'%s' object hindi sumusuporta ng item assignment"
#~ msgid "'%s' object does not support item deletion"
#~ msgstr "'%s' object ay hindi sumusuporta sa pagtanggal ng item"
#~ msgid "'%s' object has no attribute '%q'"
#~ msgstr "'%s' object ay walang attribute '%q'"
#~ msgid "'%s' object is not an iterator"
#~ msgstr "'%s' object ay hindi iterator"
#~ msgid "'%s' object is not callable"
#~ msgstr "'%s' object hindi matatawag"
#~ msgid "'%s' object is not iterable"
#~ msgstr "'%s' object ay hindi ma i-iterable"
#~ msgid "'%s' object is not subscriptable"
#~ msgstr "'%s' object ay hindi maaaring i-subscript"
#~ msgid "Running in safe mode! Auto-reload is off.\n"
#~ msgstr "Tumatakbo sa safe mode! Awtomatikong pag re-reload ay OFF.\n"
#~ msgid "Running in safe mode! Not running saved code.\n"
#~ msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n"
#~ msgid "__init__() should return None, not '%s'"
#~ msgstr "__init__() dapat magbalink na None, hindi '%s'"
#~ msgid "can't convert %s to complex"
#~ msgstr "hindi ma-convert %s sa complex"
#~ msgid "can't convert %s to float"
#~ msgstr "hindi ma-convert %s sa int"
#~ msgid "can't convert %s to int"
#~ msgstr "hindi ma-convert %s sa int"
#~ msgid "can't convert NaN to int"
#~ msgstr "hindi ma i-convert NaN sa int"
#~ msgid "can't convert address to int"
#~ msgstr "hindi ma i-convert ang address sa INT"
#~ msgid "can't convert inf to int"
#~ msgstr "hindi ma i-convert inf sa int"
#~ msgid "can't convert to complex"
#~ msgstr "hindi ma-convert sa complex"
#~ msgid "can't convert to float"
#~ msgstr "hindi ma-convert sa float"
#~ msgid "can't convert to int"
#~ msgstr "hindi ma-convert sa int"
#~ msgid "object '%s' is not a tuple or list"
#~ msgstr "object '%s' ay hindi tuple o list"
#~ msgid "object of type '%s' has no len()"
#~ msgstr "object na type '%s' walang len()"
#~ msgid "pop from an empty PulseIn"
#~ msgstr "pop mula sa walang laman na PulseIn"
#~ msgid "pop from an empty set"
#~ msgstr "pop sa walang laman na set"
#~ msgid "pop from empty list"
#~ msgstr "pop galing sa walang laman na list"
#~ msgid "popitem(): dictionary is empty"
#~ msgstr "popitem(): dictionary ay walang laman"
#~ msgid "string index out of range"
#~ msgstr "indeks ng string wala sa sakop"
#~ msgid "string indices must be integers, not %s"
#~ msgstr "ang indeks ng string ay dapat na integer, hindi %s"
#~ msgid "struct: index out of range"
#~ msgstr "struct: index hindi maabot"
#~ msgid "unknown format code '%c' for object of type '%s'"
#~ msgstr "hindi alam ang format code '%c' para sa object na ang type ay '%s'"
#~ msgid "unsupported type for %q: '%s'"
#~ msgstr "hindi sinusuportahang type para sa %q: '%s'"
#~ msgid "unsupported types for %q: '%s', '%s'"
#~ msgstr "hindi sinusuportahang type para sa %q: '%s', '%s'"
#~ msgid "AP required"
#~ msgstr "AP kailangan"
@ -3720,9 +3849,6 @@ msgstr ""
#~ "Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin "
#~ "ulit para lumabas sa safe mode.\n"
#~ msgid "To exit, please reset the board without "
#~ msgstr "Para lumabas, paki-reset ang board na wala ang "
#~ msgid "UART(%d) does not exist"
#~ msgstr "Walang UART(%d)"

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-30 07:23-0500\n"
"POT-Creation-Date: 2020-09-13 14:21-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@ -29,12 +29,6 @@ msgid ""
"https://github.com/adafruit/circuitpython/issues\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid ""
"\n"
"To exit, please reset the board without "
msgstr ""
#: py/obj.c
msgid " File \"%q\""
msgstr ""
@ -65,12 +59,16 @@ msgstr ""
msgid "%q in use"
msgstr ""
#: py/obj.c
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
msgstr ""
#: py/obj.c
msgid "%q indices must be integers, not %s"
msgid "%q indices must be integers, not %q"
msgstr ""
#: shared-bindings/vectorio/Polygon.c
@ -109,6 +107,42 @@ msgstr ""
msgid "'%q' argument required"
msgstr ""
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr ""
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr ""
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr ""
#: py/obj.c
msgid "'%q' object is not subscriptable"
msgstr ""
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a label"
@ -159,48 +193,6 @@ msgstr ""
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""
#: py/obj.c
#, c-format
msgid "'%s' object does not support item assignment"
msgstr ""
#: py/obj.c
#, c-format
msgid "'%s' object does not support item deletion"
msgstr ""
#: py/runtime.c
msgid "'%s' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
#, c-format
msgid "'%s' object is not an iterator"
msgstr ""
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
msgstr ""
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
msgstr ""
#: py/obj.c
#, c-format
msgid "'%s' object is not subscriptable"
msgstr ""
#: py/objstr.c
msgid "'=' alignment not allowed in string format specifier"
msgstr ""
@ -274,7 +266,7 @@ msgstr ""
msgid "A hardware interrupt channel is already in use"
msgstr ""
#: shared-bindings/_bleio/Address.c
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
msgid "Address must be %d bytes long"
msgstr ""
@ -303,7 +295,7 @@ msgstr ""
msgid "All sync event channels in use"
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr ""
@ -315,7 +307,7 @@ msgstr ""
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c
#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c
#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c
msgid "All timers in use"
msgstr ""
@ -372,6 +364,10 @@ msgstr ""
msgid "Attempted heap allocation when MicroPython VM not running."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
msgstr ""
#: main.c
msgid "Auto-reload is off.\n"
msgstr ""
@ -448,6 +444,10 @@ msgstr ""
msgid "Buffer length must be a multiple of 512"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr ""
@ -487,6 +487,10 @@ msgstr ""
msgid "Can't set CCCD on local Characteristic"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Cannot create a new Adapter; use _bleio.adapter;"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
#: shared-bindings/memorymonitor/AllocationSize.c
#: shared-bindings/pulseio/PulseIn.c
@ -549,7 +553,7 @@ msgstr ""
msgid "Cannot unambiguously get sizeof scalar"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
msgstr ""
@ -571,6 +575,10 @@ msgid ""
"boot. Press again to exit safe mode.\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
msgstr ""
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr ""
@ -618,27 +626,31 @@ msgstr ""
msgid "Could not initialize UART"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not restart PWM"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
msgstr ""
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
msgstr ""
@ -735,9 +747,9 @@ msgstr ""
msgid "Error in regex"
msgstr ""
#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c
#: shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
msgid "Expected a %q"
msgstr ""
@ -747,10 +759,18 @@ msgstr ""
msgid "Expected a Characteristic"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
msgid "Expected a UUID"
@ -820,11 +840,16 @@ msgstr ""
msgid "File exists"
msgstr ""
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Frequency must match existing PWMOut using this timer"
msgstr ""
@ -844,7 +869,7 @@ msgid "Group full"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr ""
@ -909,6 +934,11 @@ msgstr ""
msgid "Invalid %q pin"
msgstr ""
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr ""
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
msgstr ""
@ -921,24 +951,12 @@ msgstr ""
msgid "Invalid DAC pin supplied"
msgstr ""
#: ports/stm/common-hal/busio/I2C.c
msgid "Invalid I2C pin selection"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "Invalid SPI pin selection"
msgstr ""
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid UART pin selection"
msgstr ""
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument"
msgstr ""
@ -975,7 +993,7 @@ msgstr ""
msgid "Invalid format chunk size"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
msgstr ""
@ -993,8 +1011,8 @@ msgid "Invalid phase"
msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr ""
@ -1018,7 +1036,7 @@ msgstr ""
msgid "Invalid pins"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
@ -1200,10 +1218,14 @@ msgstr ""
msgid "No long integer support"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
msgstr ""
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@ -1224,6 +1246,10 @@ msgstr ""
msgid "Nordic Soft Device failure assertion."
msgstr ""
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
msgid "Not connected"
@ -1234,6 +1260,14 @@ msgstr ""
msgid "Not playing"
msgstr ""
#: main.c
msgid "Not running saved code.\n"
msgstr ""
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
msgstr ""
#: shared-bindings/util.c
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
@ -1260,16 +1294,20 @@ msgid ""
"%d bpp given"
msgstr ""
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
@ -1319,8 +1357,13 @@ msgstr ""
msgid "Polygon needs at least 3 points"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c
#: ports/stm/common-hal/pulseio/PulseOut.c
msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
@ -1395,11 +1438,7 @@ msgid "Row entry must be digitalio.DigitalInOut"
msgstr ""
#: main.c
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr ""
#: main.c
msgid "Running in safe mode! Not running saved code.\n"
msgid "Running in safe mode! "
msgstr ""
#: shared-module/sdcardio/SDCard.c
@ -1411,6 +1450,16 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO Init Error %d"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "SPI Init Error"
msgstr ""
@ -1445,6 +1494,10 @@ msgstr ""
msgid "Serializer in use"
msgstr ""
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
msgstr ""
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
msgstr ""
@ -1540,11 +1593,15 @@ msgstr ""
msgid "Timeout is too long: Maximum timeout length is %d seconds"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid ""
"Timer was reserved for internal use - declare PWM pins earlier in the program"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
msgstr ""
@ -1640,6 +1697,10 @@ msgstr ""
msgid "Unexpected nrfx uuid type"
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown gatt error: 0x%04x"
@ -1743,6 +1804,10 @@ msgid ""
"To list built-in modules please do `help(\"modules\")`.\n"
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
msgstr ""
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr ""
@ -1760,8 +1825,7 @@ msgid "__init__() should return None"
msgstr ""
#: py/objtype.c
#, c-format
msgid "__init__() should return None, not '%s'"
msgid "__init__() should return None, not '%q'"
msgstr ""
#: py/objobject.c
@ -1858,7 +1922,7 @@ msgstr ""
msgid "bad format string"
msgstr ""
#: py/binary.c
#: py/binary.c py/objarray.c
msgid "bad typecode"
msgstr ""
@ -1911,11 +1975,15 @@ msgstr ""
msgid "bytes > 8 bits not supported"
msgstr ""
#: py/objarray.c
msgid "bytes length not a multiple of item size"
msgstr ""
#: py/objstr.c
msgid "bytes value out of range"
msgstr ""
#: ports/atmel-samd/bindings/samd/Clock.c
#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c
msgid "calibration is out of range"
msgstr ""
@ -1947,47 +2015,17 @@ msgstr ""
msgid "can't assign to expression"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to complex"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to float"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to int"
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert '%q' object to %q implicitly"
msgstr ""
#: py/objint.c
msgid "can't convert NaN to int"
msgstr ""
#: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "can't convert address to int"
msgstr ""
#: py/objint.c
msgid "can't convert inf to int"
msgstr ""
#: py/obj.c
msgid "can't convert to complex"
msgstr ""
#: py/obj.c
msgid "can't convert to float"
msgstr ""
#: py/obj.c
msgid "can't convert to int"
msgid "can't convert to %q"
msgstr ""
#: py/objstr.c
@ -2395,7 +2433,7 @@ msgstr ""
msgid "function missing required positional argument #%d"
msgstr ""
#: py/argcheck.c py/bc.c py/objnamedtuple.c
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
#, c-format
msgid "function takes %d positional arguments but %d were given"
msgstr ""
@ -2444,10 +2482,7 @@ msgstr ""
msgid "index is out of bounds"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c
#: py/obj.c
msgid "index out of range"
msgstr ""
@ -2463,6 +2498,10 @@ msgstr ""
msgid "initial values must be iterable"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
msgstr ""
#: py/compile.c
msgid "inline assembler must be a function"
msgstr ""
@ -2655,6 +2694,10 @@ msgstr ""
msgid "max_length must be 0-%d when fixed_length is %s"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be > 0"
msgstr ""
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
@ -2803,8 +2846,7 @@ msgid "number of points must be at least 2"
msgstr ""
#: py/obj.c
#, c-format
msgid "object '%s' is not a tuple or list"
msgid "object '%q' is not a tuple or list"
msgstr ""
#: py/obj.c
@ -2840,8 +2882,7 @@ msgid "object not iterable"
msgstr ""
#: py/obj.c
#, c-format
msgid "object of type '%s' has no len()"
msgid "object of type '%q' has no len()"
msgstr ""
#: py/obj.c
@ -2891,10 +2932,23 @@ msgstr ""
msgid "ord() expected a character, but string of length %d found"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
msgstr ""
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
msgstr ""
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
msgstr ""
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
msgstr ""
@ -2934,20 +2988,9 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr ""
#: py/objset.c
msgid "pop from an empty set"
msgstr ""
#: py/objlist.c
msgid "pop from empty list"
msgstr ""
#: py/objdict.c
msgid "popitem(): dictionary is empty"
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
msgstr ""
#: py/objint_mpz.c
@ -3079,6 +3122,10 @@ msgstr ""
msgid "sosfilt requires iterable arguments"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr ""
#: py/objstr.c
msgid "start/end indices"
msgstr ""
@ -3104,12 +3151,7 @@ msgid "stream operation not supported"
msgstr ""
#: py/objstrunicode.c
msgid "string index out of range"
msgstr ""
#: py/objstrunicode.c
#, c-format
msgid "string indices must be integers, not %s"
msgid "string indices must be integers, not %q"
msgstr ""
#: py/stream.c
@ -3120,10 +3162,6 @@ msgstr ""
msgid "struct: cannot index"
msgstr ""
#: extmod/moductypes.c
msgid "struct: index out of range"
msgstr ""
#: extmod/moductypes.c
msgid "struct: no fields"
msgstr ""
@ -3193,7 +3231,7 @@ msgstr ""
msgid "trapz is defined for 1D arrays of equal length"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c py/objstr.c
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr ""
@ -3201,10 +3239,6 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"
@ -3260,8 +3294,7 @@ msgid "unknown conversion specifier %c"
msgstr ""
#: py/objstr.c
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgid "unknown format code '%c' for object of type '%q'"
msgstr ""
#: py/compile.c
@ -3301,7 +3334,7 @@ msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr ""
#: py/runtime.c
msgid "unsupported type for %q: '%s'"
msgid "unsupported type for %q: '%q'"
msgstr ""
#: py/runtime.c
@ -3309,7 +3342,7 @@ msgid "unsupported type for operator"
msgstr ""
#: py/runtime.c
msgid "unsupported types for %q: '%s', '%s'"
msgid "unsupported types for %q: '%q', '%q'"
msgstr ""
#: py/objint.c

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-30 07:23-0500\n"
"POT-Creation-Date: 2020-09-13 14:21-0500\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n"
@ -28,12 +28,6 @@ msgid ""
"https://github.com/adafruit/circuitpython/issues\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid ""
"\n"
"To exit, please reset the board without "
msgstr ""
#: py/obj.c
msgid " File \"%q\""
msgstr " File \"%q\""
@ -64,13 +58,17 @@ msgstr ""
msgid "%q in use"
msgstr "%q in uso"
#: py/obj.c
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
msgstr "indice %q fuori intervallo"
#: py/obj.c
msgid "%q indices must be integers, not %s"
msgstr "gli indici %q devono essere interi, non %s"
msgid "%q indices must be integers, not %q"
msgstr ""
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@ -110,6 +108,42 @@ msgstr "%q() prende %d argomenti posizionali ma ne sono stati forniti %d"
msgid "'%q' argument required"
msgstr "'%q' argomento richiesto"
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr ""
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr ""
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr ""
#: py/obj.c
msgid "'%q' object is not subscriptable"
msgstr ""
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a label"
@ -160,48 +194,6 @@ msgstr "intero '%s' non è nell'intervallo %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "intero '%s' non è nell'intervallo %d..%d"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""
#: py/obj.c
#, c-format
msgid "'%s' object does not support item assignment"
msgstr "oggeto '%s' non supporta assengnamento di item"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item deletion"
msgstr "oggeto '%s' non supporta eliminamento di item"
#: py/runtime.c
msgid "'%s' object has no attribute '%q'"
msgstr "l'oggetto '%s' non ha l'attributo '%q'"
#: py/runtime.c
#, c-format
msgid "'%s' object is not an iterator"
msgstr "l'oggetto '%s' non è un iteratore"
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
msgstr "oggeto '%s' non è chiamabile"
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
msgstr "l'oggetto '%s' non è iterabile"
#: py/obj.c
#, c-format
msgid "'%s' object is not subscriptable"
msgstr "oggeto '%s' non è "
#: py/objstr.c
msgid "'=' alignment not allowed in string format specifier"
msgstr "aligniamento '=' non è permesso per il specificatore formato string"
@ -275,7 +267,7 @@ msgstr "pow() con tre argmomenti non supportata"
msgid "A hardware interrupt channel is already in use"
msgstr "Un canale di interrupt hardware è già in uso"
#: shared-bindings/_bleio/Address.c
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, fuzzy, c-format
msgid "Address must be %d bytes long"
msgstr "la palette deve essere lunga 32 byte"
@ -305,7 +297,7 @@ msgstr "Tutti i canali eventi utilizati"
msgid "All sync event channels in use"
msgstr "Tutti i canali di eventi sincronizzati in uso"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr "Tutti i timer per questo pin sono in uso"
@ -317,7 +309,7 @@ msgstr "Tutti i timer per questo pin sono in uso"
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c
#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c
#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c
msgid "All timers in use"
msgstr "Tutti i timer utilizzati"
@ -374,6 +366,10 @@ msgstr ""
msgid "Attempted heap allocation when MicroPython VM not running."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
msgstr ""
#: main.c
msgid "Auto-reload is off.\n"
msgstr "Auto-reload disattivato.\n"
@ -453,6 +449,10 @@ msgstr ""
msgid "Buffer length must be a multiple of 512"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Il buffer deve essere lungo almeno 1"
@ -493,6 +493,10 @@ msgstr ""
msgid "Can't set CCCD on local Characteristic"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Cannot create a new Adapter; use _bleio.adapter;"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
#: shared-bindings/memorymonitor/AllocationSize.c
#: shared-bindings/pulseio/PulseIn.c
@ -557,7 +561,7 @@ msgstr "Impossibile trasferire senza i pin MOSI e MISO."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "Impossibile ricavare la grandezza scalare di sizeof inequivocabilmente"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
msgstr ""
@ -579,6 +583,10 @@ msgid ""
"boot. Press again to exit safe mode.\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
msgstr ""
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr "Inizializzazione del pin di clock fallita."
@ -627,27 +635,31 @@ msgstr ""
msgid "Could not initialize UART"
msgstr "Impossibile inizializzare l'UART"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not restart PWM"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
msgstr ""
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
msgstr ""
@ -746,9 +758,9 @@ msgstr "Canale EXTINT già in uso"
msgid "Error in regex"
msgstr "Errore nella regex"
#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c
#: shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
msgid "Expected a %q"
msgstr "Atteso un %q"
@ -759,10 +771,18 @@ msgstr "Atteso un %q"
msgid "Expected a Characteristic"
msgstr "Non è possibile aggiungere Characteristic."
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
#, fuzzy
@ -833,11 +853,16 @@ msgstr ""
msgid "File exists"
msgstr "File esistente"
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Frequency must match existing PWMOut using this timer"
msgstr ""
@ -857,7 +882,7 @@ msgid "Group full"
msgstr "Gruppo pieno"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr ""
@ -924,6 +949,11 @@ msgstr ""
msgid "Invalid %q pin"
msgstr "Pin %q non valido"
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr ""
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
msgstr ""
@ -936,24 +966,12 @@ msgstr "File BMP non valido"
msgid "Invalid DAC pin supplied"
msgstr ""
#: ports/stm/common-hal/busio/I2C.c
msgid "Invalid I2C pin selection"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Frequenza PWM non valida"
#: ports/stm/common-hal/busio/SPI.c
msgid "Invalid SPI pin selection"
msgstr ""
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid UART pin selection"
msgstr ""
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument"
msgstr "Argomento non valido"
@ -992,7 +1010,7 @@ msgstr "File non valido"
msgid "Invalid format chunk size"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
msgstr ""
@ -1010,8 +1028,8 @@ msgid "Invalid phase"
msgstr "Fase non valida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pin non valido"
@ -1035,7 +1053,7 @@ msgstr "Pin non valido per il canale destro"
msgid "Invalid pins"
msgstr "Pin non validi"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
@ -1219,10 +1237,14 @@ msgstr ""
msgid "No long integer support"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
msgstr ""
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@ -1243,6 +1265,10 @@ msgstr ""
msgid "Nordic Soft Device failure assertion."
msgstr ""
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
#, fuzzy
@ -1254,6 +1280,14 @@ msgstr "Impossible connettersi all'AP"
msgid "Not playing"
msgstr "In pausa"
#: main.c
msgid "Not running saved code.\n"
msgstr ""
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
msgstr ""
#: shared-bindings/util.c
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
@ -1283,18 +1317,22 @@ msgid ""
"%d bpp given"
msgstr ""
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
msgstr "L'oversampling deve essere multiplo di 8."
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr ""
"duty_cycle del PWM deve essere compresa tra 0 e 65535 inclusiva (risoluzione "
"a 16 bit)"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
#, fuzzy
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
@ -1348,8 +1386,13 @@ msgstr "Imposssibile rimontare il filesystem"
msgid "Polygon needs at least 3 points"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c
#: ports/stm/common-hal/pulseio/PulseOut.c
msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
@ -1426,12 +1469,8 @@ msgid "Row entry must be digitalio.DigitalInOut"
msgstr ""
#: main.c
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Modalità sicura in esecuzione! Auto-reload disattivato.\n"
#: main.c
msgid "Running in safe mode! Not running saved code.\n"
msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n"
msgid "Running in safe mode! "
msgstr ""
#: shared-module/sdcardio/SDCard.c
msgid "SD card CSD format not supported"
@ -1442,6 +1481,16 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr "SDA o SCL necessitano un pull-up"
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO Init Error %d"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "SPI Init Error"
msgstr ""
@ -1478,6 +1527,10 @@ msgstr ""
msgid "Serializer in use"
msgstr "Serializer in uso"
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
msgstr ""
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
msgstr ""
@ -1573,11 +1626,15 @@ msgstr ""
msgid "Timeout is too long: Maximum timeout length is %d seconds"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid ""
"Timer was reserved for internal use - declare PWM pins earlier in the program"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
msgstr "Per uscire resettare la scheda senza "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
msgstr ""
@ -1674,6 +1731,10 @@ msgstr "Imposibile scrivere su nvm."
msgid "Unexpected nrfx uuid type"
msgstr "indentazione inaspettata"
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown gatt error: 0x%04x"
@ -1778,6 +1839,10 @@ msgid ""
"To list built-in modules please do `help(\"modules\")`.\n"
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
msgstr ""
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr ""
@ -1795,9 +1860,8 @@ msgid "__init__() should return None"
msgstr "__init__() deve ritornare None"
#: py/objtype.c
#, c-format
msgid "__init__() should return None, not '%s'"
msgstr "__init__() deve ritornare None, non '%s'"
msgid "__init__() should return None, not '%q'"
msgstr ""
#: py/objobject.c
msgid "__new__ arg must be a user-type"
@ -1893,7 +1957,7 @@ msgstr "specificatore di conversione scorretto"
msgid "bad format string"
msgstr "stringa di formattazione scorretta"
#: py/binary.c
#: py/binary.c py/objarray.c
msgid "bad typecode"
msgstr ""
@ -1949,11 +2013,15 @@ msgstr ""
msgid "bytes > 8 bits not supported"
msgstr "byte > 8 bit non supportati"
#: py/objarray.c
msgid "bytes length not a multiple of item size"
msgstr ""
#: py/objstr.c
msgid "bytes value out of range"
msgstr "valore byte fuori intervallo"
#: ports/atmel-samd/bindings/samd/Clock.c
#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c
msgid "calibration is out of range"
msgstr "la calibrazione è fuori intervallo"
@ -1986,48 +2054,18 @@ msgstr ""
msgid "can't assign to expression"
msgstr "impossibile assegnare all'espressione"
#: py/obj.c
#, fuzzy, c-format
msgid "can't convert %s to complex"
msgstr "non è possibile convertire a complex"
#: py/obj.c
#, c-format
msgid "can't convert %s to float"
msgstr "non è possibile convertire %s a float"
#: py/obj.c
#, c-format
msgid "can't convert %s to int"
msgstr "non è possibile convertire %s a int"
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert '%q' object to %q implicitly"
msgstr "impossibile convertire l'oggetto '%q' implicitamente in %q"
#: py/objint.c
msgid "can't convert NaN to int"
msgstr "impossibile convertire NaN in int"
#: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "can't convert address to int"
msgstr "impossible convertire indirizzo in int"
#: py/objint.c
msgid "can't convert inf to int"
msgstr "impossibile convertire inf in int"
#: py/obj.c
msgid "can't convert to complex"
msgstr "non è possibile convertire a complex"
#: py/obj.c
msgid "can't convert to float"
msgstr "non è possibile convertire a float"
#: py/obj.c
msgid "can't convert to int"
msgstr "non è possibile convertire a int"
msgid "can't convert to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert to str implicitly"
@ -2440,7 +2478,7 @@ msgstr "argomento nominato '%q' mancante alla funzione"
msgid "function missing required positional argument #%d"
msgstr "mancante il #%d argomento posizonale obbligatorio della funzione"
#: py/argcheck.c py/bc.c py/objnamedtuple.c
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
#, c-format
msgid "function takes %d positional arguments but %d were given"
msgstr ""
@ -2490,10 +2528,7 @@ msgstr "padding incorretto"
msgid "index is out of bounds"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c
#: py/obj.c
msgid "index out of range"
msgstr "indice fuori intervallo"
@ -2509,6 +2544,10 @@ msgstr ""
msgid "initial values must be iterable"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
msgstr ""
#: py/compile.c
msgid "inline assembler must be a function"
msgstr "inline assembler deve essere una funzione"
@ -2706,6 +2745,10 @@ msgstr ""
msgid "max_length must be 0-%d when fixed_length is %s"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be > 0"
msgstr ""
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "profondità massima di ricorsione superata"
@ -2857,9 +2900,8 @@ msgid "number of points must be at least 2"
msgstr ""
#: py/obj.c
#, c-format
msgid "object '%s' is not a tuple or list"
msgstr "oggetto '%s' non è una tupla o una lista"
msgid "object '%q' is not a tuple or list"
msgstr ""
#: py/obj.c
msgid "object does not support item assignment"
@ -2894,9 +2936,8 @@ msgid "object not iterable"
msgstr "oggetto non iterabile"
#: py/obj.c
#, c-format
msgid "object of type '%s' has no len()"
msgstr "l'oggetto di tipo '%s' non implementa len()"
msgid "object of type '%q' has no len()"
msgstr ""
#: py/obj.c
msgid "object with buffer protocol required"
@ -2947,10 +2988,23 @@ msgid "ord() expected a character, but string of length %d found"
msgstr ""
"ord() aspettava un carattere, ma ha ricevuto una stringa di lunghezza %d"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
msgstr ""
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
msgstr "overflow convertendo long int in parola"
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
msgstr ""
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
msgstr "la palette deve essere lunga 32 byte"
@ -2992,21 +3046,10 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop sun un PulseIn vuoto"
#: py/objset.c
msgid "pop from an empty set"
msgstr "pop da un set vuoto"
#: py/objlist.c
msgid "pop from empty list"
msgstr "pop da una lista vuota"
#: py/objdict.c
msgid "popitem(): dictionary is empty"
msgstr "popitem(): il dizionario è vuoto"
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
msgstr ""
#: py/objint_mpz.c
msgid "pow() 3rd argument cannot be 0"
@ -3139,6 +3182,10 @@ msgstr ""
msgid "sosfilt requires iterable arguments"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr ""
#: py/objstr.c
msgid "start/end indices"
msgstr ""
@ -3165,13 +3212,8 @@ msgid "stream operation not supported"
msgstr "operazione di stream non supportata"
#: py/objstrunicode.c
msgid "string index out of range"
msgstr "indice della stringa fuori intervallo"
#: py/objstrunicode.c
#, c-format
msgid "string indices must be integers, not %s"
msgstr "indici della stringa devono essere interi, non %s"
msgid "string indices must be integers, not %q"
msgstr ""
#: py/stream.c
msgid "string not supported; use bytes or bytearray"
@ -3181,10 +3223,6 @@ msgstr ""
msgid "struct: cannot index"
msgstr "struct: impossibile indicizzare"
#: extmod/moductypes.c
msgid "struct: index out of range"
msgstr "struct: indice fuori intervallo"
#: extmod/moductypes.c
msgid "struct: no fields"
msgstr "struct: nessun campo"
@ -3255,7 +3293,7 @@ msgstr "troppi valori da scompattare (%d attesi)"
msgid "trapz is defined for 1D arrays of equal length"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c py/objstr.c
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr "indice della tupla fuori intervallo"
@ -3263,10 +3301,6 @@ msgstr "indice della tupla fuori intervallo"
msgid "tuple/list has wrong length"
msgstr "tupla/lista ha la lunghezza sbagliata"
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"
@ -3322,9 +3356,8 @@ msgid "unknown conversion specifier %c"
msgstr "specificatore di conversione %s sconosciuto"
#: py/objstr.c
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgstr "codice di formattaione '%c' sconosciuto per oggetto di tipo '%s'"
msgid "unknown format code '%c' for object of type '%q'"
msgstr ""
#: py/compile.c
msgid "unknown type"
@ -3363,16 +3396,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr "carattere di formattazione '%c' (0x%x) non supportato all indice %d"
#: py/runtime.c
msgid "unsupported type for %q: '%s'"
msgstr "tipo non supportato per %q: '%s'"
msgid "unsupported type for %q: '%q'"
msgstr ""
#: py/runtime.c
msgid "unsupported type for operator"
msgstr "tipo non supportato per l'operando"
#: py/runtime.c
msgid "unsupported types for %q: '%s', '%s'"
msgstr "tipi non supportati per %q: '%s', '%s'"
msgid "unsupported types for %q: '%q', '%q'"
msgstr ""
#: py/objint.c
#, c-format
@ -3453,6 +3486,103 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "%q indices must be integers, not %s"
#~ msgstr "gli indici %q devono essere interi, non %s"
#~ msgid "'%s' object does not support item assignment"
#~ msgstr "oggeto '%s' non supporta assengnamento di item"
#~ msgid "'%s' object does not support item deletion"
#~ msgstr "oggeto '%s' non supporta eliminamento di item"
#~ msgid "'%s' object has no attribute '%q'"
#~ msgstr "l'oggetto '%s' non ha l'attributo '%q'"
#~ msgid "'%s' object is not an iterator"
#~ msgstr "l'oggetto '%s' non è un iteratore"
#~ msgid "'%s' object is not callable"
#~ msgstr "oggeto '%s' non è chiamabile"
#~ msgid "'%s' object is not iterable"
#~ msgstr "l'oggetto '%s' non è iterabile"
#~ msgid "'%s' object is not subscriptable"
#~ msgstr "oggeto '%s' non è "
#~ msgid "Running in safe mode! Auto-reload is off.\n"
#~ msgstr "Modalità sicura in esecuzione! Auto-reload disattivato.\n"
#~ msgid "Running in safe mode! Not running saved code.\n"
#~ msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n"
#~ msgid "__init__() should return None, not '%s'"
#~ msgstr "__init__() deve ritornare None, non '%s'"
#, fuzzy
#~ msgid "can't convert %s to complex"
#~ msgstr "non è possibile convertire a complex"
#~ msgid "can't convert %s to float"
#~ msgstr "non è possibile convertire %s a float"
#~ msgid "can't convert %s to int"
#~ msgstr "non è possibile convertire %s a int"
#~ msgid "can't convert NaN to int"
#~ msgstr "impossibile convertire NaN in int"
#~ msgid "can't convert address to int"
#~ msgstr "impossible convertire indirizzo in int"
#~ msgid "can't convert inf to int"
#~ msgstr "impossibile convertire inf in int"
#~ msgid "can't convert to complex"
#~ msgstr "non è possibile convertire a complex"
#~ msgid "can't convert to float"
#~ msgstr "non è possibile convertire a float"
#~ msgid "can't convert to int"
#~ msgstr "non è possibile convertire a int"
#~ msgid "object '%s' is not a tuple or list"
#~ msgstr "oggetto '%s' non è una tupla o una lista"
#~ msgid "object of type '%s' has no len()"
#~ msgstr "l'oggetto di tipo '%s' non implementa len()"
#~ msgid "pop from an empty PulseIn"
#~ msgstr "pop sun un PulseIn vuoto"
#~ msgid "pop from an empty set"
#~ msgstr "pop da un set vuoto"
#~ msgid "pop from empty list"
#~ msgstr "pop da una lista vuota"
#~ msgid "popitem(): dictionary is empty"
#~ msgstr "popitem(): il dizionario è vuoto"
#~ msgid "string index out of range"
#~ msgstr "indice della stringa fuori intervallo"
#~ msgid "string indices must be integers, not %s"
#~ msgstr "indici della stringa devono essere interi, non %s"
#~ msgid "struct: index out of range"
#~ msgstr "struct: indice fuori intervallo"
#~ msgid "unknown format code '%c' for object of type '%s'"
#~ msgstr "codice di formattaione '%c' sconosciuto per oggetto di tipo '%s'"
#~ msgid "unsupported type for %q: '%s'"
#~ msgstr "tipo non supportato per %q: '%s'"
#~ msgid "unsupported types for %q: '%s', '%s'"
#~ msgstr "tipi non supportati per %q: '%s', '%s'"
#~ msgid "AP required"
#~ msgstr "AP richiesto"
@ -3710,9 +3840,6 @@ msgstr ""
#~ "La potenza del microcontrollore è calata. Assicurati che l'alimentazione "
#~ "sia attaccata correttamente\n"
#~ msgid "To exit, please reset the board without "
#~ msgstr "Per uscire resettare la scheda senza "
#~ msgid "UART(%d) does not exist"
#~ msgstr "UART(%d) non esistente"

3475
locale/ja.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-30 07:23-0500\n"
"POT-Creation-Date: 2020-09-13 14:21-0500\n"
"PO-Revision-Date: 2019-05-06 14:22-0700\n"
"Last-Translator: \n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -30,12 +30,6 @@ msgid ""
"https://github.com/adafruit/circuitpython/issues\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid ""
"\n"
"To exit, please reset the board without "
msgstr ""
#: py/obj.c
msgid " File \"%q\""
msgstr " 파일 \"%q\""
@ -66,13 +60,17 @@ msgstr ""
msgid "%q in use"
msgstr "%q 사용 중입니다"
#: py/obj.c
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
msgstr "%q 인덱스 범위를 벗어났습니다"
#: py/obj.c
msgid "%q indices must be integers, not %s"
msgstr "%q 인덱스는 %s 가 아닌 정수 여야합니다"
msgid "%q indices must be integers, not %q"
msgstr ""
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@ -110,6 +108,42 @@ msgstr ""
msgid "'%q' argument required"
msgstr ""
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr ""
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr ""
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr ""
#: py/obj.c
msgid "'%q' object is not subscriptable"
msgstr ""
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a label"
@ -160,48 +194,6 @@ msgstr ""
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""
#: py/obj.c
#, c-format
msgid "'%s' object does not support item assignment"
msgstr "'%s' 을 지정할 수 없습니다"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item deletion"
msgstr "'%s' 은 삭제할 수 없습니다"
#: py/runtime.c
msgid "'%s' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
#, c-format
msgid "'%s' object is not an iterator"
msgstr "'%s' 은 수정할 수 없습니다"
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
msgstr "'%s' 을 검색 할 수 없습니다"
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
msgstr "'%s' 은 변경할 수 없습니다"
#: py/obj.c
#, c-format
msgid "'%s' object is not subscriptable"
msgstr ""
#: py/objstr.c
msgid "'=' alignment not allowed in string format specifier"
msgstr ""
@ -275,7 +267,7 @@ msgstr ""
msgid "A hardware interrupt channel is already in use"
msgstr ""
#: shared-bindings/_bleio/Address.c
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
msgid "Address must be %d bytes long"
msgstr ""
@ -304,7 +296,7 @@ msgstr ""
msgid "All sync event channels in use"
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr "핀의 모든 타이머가 사용 중입니다"
@ -316,7 +308,7 @@ msgstr "핀의 모든 타이머가 사용 중입니다"
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c
#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c
#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c
msgid "All timers in use"
msgstr "모든 타이머가 사용 중입니다"
@ -373,6 +365,10 @@ msgstr ""
msgid "Attempted heap allocation when MicroPython VM not running."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
msgstr ""
#: main.c
msgid "Auto-reload is off.\n"
msgstr "자동 재 장전이 꺼져 있습니다\n"
@ -451,6 +447,10 @@ msgstr ""
msgid "Buffer length must be a multiple of 512"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "잘못된 크기의 버퍼. >1 여야합니다"
@ -490,6 +490,10 @@ msgstr ""
msgid "Can't set CCCD on local Characteristic"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Cannot create a new Adapter; use _bleio.adapter;"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
#: shared-bindings/memorymonitor/AllocationSize.c
#: shared-bindings/pulseio/PulseIn.c
@ -552,7 +556,7 @@ msgstr ""
msgid "Cannot unambiguously get sizeof scalar"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
msgstr ""
@ -574,6 +578,10 @@ msgid ""
"boot. Press again to exit safe mode.\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
msgstr ""
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr ""
@ -621,27 +629,31 @@ msgstr ""
msgid "Could not initialize UART"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not restart PWM"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
msgstr ""
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
msgstr ""
@ -738,9 +750,9 @@ msgstr ""
msgid "Error in regex"
msgstr "Regex에 오류가 있습니다."
#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c
#: shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
msgid "Expected a %q"
msgstr "%q 이 예상되었습니다."
@ -750,10 +762,18 @@ msgstr "%q 이 예상되었습니다."
msgid "Expected a Characteristic"
msgstr "특성(Characteristic)이 예상되었습니다."
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
msgid "Expected a UUID"
@ -823,11 +843,16 @@ msgstr ""
msgid "File exists"
msgstr ""
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Frequency must match existing PWMOut using this timer"
msgstr ""
@ -847,7 +872,7 @@ msgid "Group full"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr ""
@ -912,6 +937,11 @@ msgstr ""
msgid "Invalid %q pin"
msgstr ""
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr ""
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
msgstr ""
@ -924,24 +954,12 @@ msgstr ""
msgid "Invalid DAC pin supplied"
msgstr ""
#: ports/stm/common-hal/busio/I2C.c
msgid "Invalid I2C pin selection"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "Invalid SPI pin selection"
msgstr ""
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid UART pin selection"
msgstr ""
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument"
msgstr ""
@ -978,7 +996,7 @@ msgstr "파일이 유효하지 않습니다"
msgid "Invalid format chunk size"
msgstr "형식 청크 크기가 잘못되었습니다"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
msgstr ""
@ -996,8 +1014,8 @@ msgid "Invalid phase"
msgstr "단계가 잘못되었습니다"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "핀이 잘못되었습니다"
@ -1021,7 +1039,7 @@ msgstr "오른쪽 채널 핀이 잘못되었습니다"
msgid "Invalid pins"
msgstr "핀이 유효하지 않습니다"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
@ -1203,10 +1221,14 @@ msgstr ""
msgid "No long integer support"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
msgstr ""
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@ -1227,6 +1249,10 @@ msgstr ""
msgid "Nordic Soft Device failure assertion."
msgstr ""
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
msgid "Not connected"
@ -1237,6 +1263,14 @@ msgstr ""
msgid "Not playing"
msgstr ""
#: main.c
msgid "Not running saved code.\n"
msgstr ""
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
msgstr ""
#: shared-bindings/util.c
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
@ -1263,16 +1297,20 @@ msgid ""
"%d bpp given"
msgstr ""
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr ""
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
@ -1322,8 +1360,13 @@ msgstr ""
msgid "Polygon needs at least 3 points"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c
#: ports/stm/common-hal/pulseio/PulseOut.c
msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
@ -1398,11 +1441,7 @@ msgid "Row entry must be digitalio.DigitalInOut"
msgstr ""
#: main.c
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr ""
#: main.c
msgid "Running in safe mode! Not running saved code.\n"
msgid "Running in safe mode! "
msgstr ""
#: shared-module/sdcardio/SDCard.c
@ -1414,6 +1453,16 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO Init Error %d"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "SPI Init Error"
msgstr ""
@ -1448,6 +1497,10 @@ msgstr ""
msgid "Serializer in use"
msgstr ""
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
msgstr ""
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
msgstr ""
@ -1543,11 +1596,15 @@ msgstr ""
msgid "Timeout is too long: Maximum timeout length is %d seconds"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid ""
"Timer was reserved for internal use - declare PWM pins earlier in the program"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
msgstr ""
@ -1644,6 +1701,10 @@ msgstr ""
msgid "Unexpected nrfx uuid type"
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown gatt error: 0x%04x"
@ -1747,6 +1808,10 @@ msgid ""
"To list built-in modules please do `help(\"modules\")`.\n"
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
msgstr ""
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr ""
@ -1764,8 +1829,7 @@ msgid "__init__() should return None"
msgstr ""
#: py/objtype.c
#, c-format
msgid "__init__() should return None, not '%s'"
msgid "__init__() should return None, not '%q'"
msgstr ""
#: py/objobject.c
@ -1862,7 +1926,7 @@ msgstr ""
msgid "bad format string"
msgstr ""
#: py/binary.c
#: py/binary.c py/objarray.c
msgid "bad typecode"
msgstr ""
@ -1915,11 +1979,15 @@ msgstr ""
msgid "bytes > 8 bits not supported"
msgstr ""
#: py/objarray.c
msgid "bytes length not a multiple of item size"
msgstr ""
#: py/objstr.c
msgid "bytes value out of range"
msgstr ""
#: ports/atmel-samd/bindings/samd/Clock.c
#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c
msgid "calibration is out of range"
msgstr ""
@ -1951,47 +2019,17 @@ msgstr ""
msgid "can't assign to expression"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to complex"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to float"
msgstr ""
#: py/obj.c
#, c-format
msgid "can't convert %s to int"
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert '%q' object to %q implicitly"
msgstr ""
#: py/objint.c
msgid "can't convert NaN to int"
msgstr ""
#: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "can't convert address to int"
msgstr ""
#: py/objint.c
msgid "can't convert inf to int"
msgstr ""
#: py/obj.c
msgid "can't convert to complex"
msgstr ""
#: py/obj.c
msgid "can't convert to float"
msgstr ""
#: py/obj.c
msgid "can't convert to int"
msgid "can't convert to %q"
msgstr ""
#: py/objstr.c
@ -2399,7 +2437,7 @@ msgstr ""
msgid "function missing required positional argument #%d"
msgstr ""
#: py/argcheck.c py/bc.c py/objnamedtuple.c
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
#, c-format
msgid "function takes %d positional arguments but %d were given"
msgstr ""
@ -2448,10 +2486,7 @@ msgstr ""
msgid "index is out of bounds"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c
#: py/obj.c
msgid "index out of range"
msgstr ""
@ -2467,6 +2502,10 @@ msgstr ""
msgid "initial values must be iterable"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
msgstr ""
#: py/compile.c
msgid "inline assembler must be a function"
msgstr ""
@ -2659,6 +2698,10 @@ msgstr ""
msgid "max_length must be 0-%d when fixed_length is %s"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be > 0"
msgstr ""
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
@ -2807,8 +2850,7 @@ msgid "number of points must be at least 2"
msgstr ""
#: py/obj.c
#, c-format
msgid "object '%s' is not a tuple or list"
msgid "object '%q' is not a tuple or list"
msgstr ""
#: py/obj.c
@ -2844,8 +2886,7 @@ msgid "object not iterable"
msgstr ""
#: py/obj.c
#, c-format
msgid "object of type '%s' has no len()"
msgid "object of type '%q' has no len()"
msgstr ""
#: py/obj.c
@ -2895,10 +2936,23 @@ msgstr ""
msgid "ord() expected a character, but string of length %d found"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
msgstr ""
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
msgstr ""
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
msgstr ""
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
msgstr ""
@ -2938,20 +2992,9 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr ""
#: py/objset.c
msgid "pop from an empty set"
msgstr ""
#: py/objlist.c
msgid "pop from empty list"
msgstr ""
#: py/objdict.c
msgid "popitem(): dictionary is empty"
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
msgstr ""
#: py/objint_mpz.c
@ -3083,6 +3126,10 @@ msgstr ""
msgid "sosfilt requires iterable arguments"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr ""
#: py/objstr.c
msgid "start/end indices"
msgstr ""
@ -3108,12 +3155,7 @@ msgid "stream operation not supported"
msgstr ""
#: py/objstrunicode.c
msgid "string index out of range"
msgstr ""
#: py/objstrunicode.c
#, c-format
msgid "string indices must be integers, not %s"
msgid "string indices must be integers, not %q"
msgstr ""
#: py/stream.c
@ -3124,10 +3166,6 @@ msgstr ""
msgid "struct: cannot index"
msgstr ""
#: extmod/moductypes.c
msgid "struct: index out of range"
msgstr ""
#: extmod/moductypes.c
msgid "struct: no fields"
msgstr ""
@ -3197,7 +3235,7 @@ msgstr ""
msgid "trapz is defined for 1D arrays of equal length"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c py/objstr.c
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr ""
@ -3205,10 +3243,6 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"
@ -3264,8 +3298,7 @@ msgid "unknown conversion specifier %c"
msgstr ""
#: py/objstr.c
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgid "unknown format code '%c' for object of type '%q'"
msgstr ""
#: py/compile.c
@ -3305,7 +3338,7 @@ msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr ""
#: py/runtime.c
msgid "unsupported type for %q: '%s'"
msgid "unsupported type for %q: '%q'"
msgstr ""
#: py/runtime.c
@ -3313,7 +3346,7 @@ msgid "unsupported type for operator"
msgstr ""
#: py/runtime.c
msgid "unsupported types for %q: '%s', '%s'"
msgid "unsupported types for %q: '%q', '%q'"
msgstr ""
#: py/objint.c
@ -3393,6 +3426,24 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "%q indices must be integers, not %s"
#~ msgstr "%q 인덱스는 %s 가 아닌 정수 여야합니다"
#~ msgid "'%s' object does not support item assignment"
#~ msgstr "'%s' 을 지정할 수 없습니다"
#~ msgid "'%s' object does not support item deletion"
#~ msgstr "'%s' 은 삭제할 수 없습니다"
#~ msgid "'%s' object is not an iterator"
#~ msgstr "'%s' 은 수정할 수 없습니다"
#~ msgid "'%s' object is not callable"
#~ msgstr "'%s' 을 검색 할 수 없습니다"
#~ msgid "'%s' object is not iterable"
#~ msgstr "'%s' 은 변경할 수 없습니다"
#~ msgid "Can't add services in Central mode"
#~ msgstr "센트랄(중앙) 모드에서는 서비스를 추가 할 수 없습니다"

View File

@ -5,16 +5,16 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-30 07:23-0500\n"
"PO-Revision-Date: 2020-08-02 20:41+0000\n"
"Last-Translator: _fonzlate <vooralfred@gmail.com>\n"
"POT-Creation-Date: 2020-09-13 14:21-0500\n"
"PO-Revision-Date: 2020-09-09 16:05+0000\n"
"Last-Translator: Jelle Jager <jell@jjc.id.au>\n"
"Language-Team: none\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.2-dev\n"
"X-Generator: Weblate 4.3-dev\n"
#: main.c
msgid ""
@ -34,14 +34,6 @@ msgstr ""
"Meld een probleem met de inhoud van de CIRCUITPY drive op:\n"
"https://github.com/adafruit/circuitpython/issues\n"
#: supervisor/shared/safe_mode.c
msgid ""
"\n"
"To exit, please reset the board without "
msgstr ""
"\n"
"Om te verlaten, herstart de module zonder "
#: py/obj.c
msgid " File \"%q\""
msgstr " Bestand"
@ -72,13 +64,17 @@ msgstr "%q fout: %d"
msgid "%q in use"
msgstr "%q in gebruik"
#: py/obj.c
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
msgstr "%q index buiten bereik"
#: py/obj.c
msgid "%q indices must be integers, not %s"
msgstr "%q indexen moeten integers zijn, niet %s"
msgid "%q indices must be integers, not %q"
msgstr "%q indices moeten integers zijn, geen %q"
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@ -116,6 +112,42 @@ msgstr "%q() verwacht %d positionele argumenten maar kreeg %d"
msgid "'%q' argument required"
msgstr "'%q' argument vereist"
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
msgstr "'%q' object kan attribuut ' %q' niet toewijzen"
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr "'%q' object ondersteunt geen '%q'"
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr "'%q' object ondersteunt toewijzing van items niet"
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr "'%q' object ondersteunt verwijderen van items niet"
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr "'%q' object heeft geen attribuut '%q'"
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr "'%q' object is geen iterator"
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
msgstr "'%q' object is niet aanroepbaar"
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr "'%q' object is niet itereerbaar"
#: py/obj.c
msgid "'%q' object is not subscriptable"
msgstr "kan niet abonneren op '%q' object"
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a label"
@ -166,48 +198,6 @@ msgstr "'%s' integer %d is niet in bereik %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' integer 0x%x past niet in mask 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr "'%s' object kan niet aan attribuut '%q' toewijzen"
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr "'%s' object ondersteunt '%q' niet"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item assignment"
msgstr "'%s' object ondersteunt item toewijzing niet"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item deletion"
msgstr "'%s' object ondersteunt item verwijdering niet"
#: py/runtime.c
msgid "'%s' object has no attribute '%q'"
msgstr "'%s' object heeft geen attribuut '%q'"
#: py/runtime.c
#, c-format
msgid "'%s' object is not an iterator"
msgstr "'%s' object is geen iterator"
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
msgstr "'%s' object is niet aanroepbaar"
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
msgstr "'%s' object is niet itereerbaar"
#: py/obj.c
#, c-format
msgid "'%s' object is not subscriptable"
msgstr "'%s' object is niet onderschrijfbaar"
#: py/objstr.c
msgid "'=' alignment not allowed in string format specifier"
msgstr "'=' uitlijning niet toegestaan in string format specifier"
@ -281,7 +271,7 @@ msgstr "3-arg pow() niet ondersteund"
msgid "A hardware interrupt channel is already in use"
msgstr "Een hardware interrupt kanaal is al in gebruik"
#: shared-bindings/_bleio/Address.c
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
msgid "Address must be %d bytes long"
msgstr "Adres moet %d bytes lang zijn"
@ -310,7 +300,7 @@ msgstr "Alle event kanalen zijn in gebruik"
msgid "All sync event channels in use"
msgstr "Alle sync event kanalen zijn in gebruik"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr "Alle timers voor deze pin zijn in gebruik"
@ -322,7 +312,7 @@ msgstr "Alle timers voor deze pin zijn in gebruik"
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c
#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c
#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c
msgid "All timers in use"
msgstr "Alle timers zijn in gebruik"
@ -379,6 +369,10 @@ msgstr "Poging om %d blokken toe te wijzen"
msgid "Attempted heap allocation when MicroPython VM not running."
msgstr "heap allocatie geprobeerd terwijl MicroPython VM niet draait."
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
msgstr ""
#: main.c
msgid "Auto-reload is off.\n"
msgstr "Auto-herlaad staat uit.\n"
@ -457,6 +451,10 @@ msgstr "Buffer lengte %d te groot. Het moet kleiner zijn dan %d"
msgid "Buffer length must be a multiple of 512"
msgstr "Buffer lengte moet een veelvoud van 512 zijn"
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
msgstr "Buffer moet een veelvoud van 512 zijn"
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Buffer moet op zijn minst lengte 1 zijn"
@ -496,6 +494,10 @@ msgstr "Roep super().__init__() aan voor toegang native object."
msgid "Can't set CCCD on local Characteristic"
msgstr "Kan CCCD niet toewijzen aan lokaal Characteristic"
#: shared-bindings/_bleio/Adapter.c
msgid "Cannot create a new Adapter; use _bleio.adapter;"
msgstr "Kan geen nieuwe Adapter creëren; gebruik _bleio.adapter;"
#: shared-bindings/displayio/Bitmap.c
#: shared-bindings/memorymonitor/AllocationSize.c
#: shared-bindings/pulseio/PulseIn.c
@ -560,7 +562,7 @@ msgstr "Kan niet overdragen zonder MOSI en MISO pinnen."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "Kan niet ondubbelzinning sizeof scalar verkrijgen"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
msgstr "Kan de frequentie van een timer die al in gebruik is niet variëren"
@ -584,6 +586,10 @@ msgstr ""
"CircuitPython is in veilige modus omdat de rest knop werd ingedrukt tijdens "
"het opstarten. Druk nogmaals om veilige modus te verlaten\n"
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
msgstr ""
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr "Clock pin init mislukt."
@ -633,27 +639,31 @@ msgstr "Kan SDCard niet initialiseren"
msgid "Could not initialize UART"
msgstr "Kan UART niet initialiseren"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize channel"
msgstr "Kan kanaal niet initialiseren"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize timer"
msgstr "Kan timer niet initialiseren"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init channel"
msgstr "Kan kanaal niet her-initialiseren"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init timer"
msgstr "Kan timer niet her-initialiseren"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not restart PWM"
msgstr "Kan PWM niet herstarten"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
msgstr "Kan adres niet zetten"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
msgstr "Kan PWM niet starten"
@ -750,9 +760,9 @@ msgstr "EXTINT kanaal al in gebruik"
msgid "Error in regex"
msgstr "Fout in regex"
#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c
#: shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
msgid "Expected a %q"
msgstr "Verwacht een %q"
@ -762,10 +772,18 @@ msgstr "Verwacht een %q"
msgid "Expected a Characteristic"
msgstr "Verwachtte een Characteristic"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr "Verwachtte een DigitalInOut"
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr "Verwachtte een Service"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr "Verwachtte een UART"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
msgid "Expected a UUID"
@ -835,12 +853,17 @@ msgstr "Schrijven naar interne flash mislukt."
msgid "File exists"
msgstr "Bestand bestaat"
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
msgstr "Framebuffer benodigd %d bytes"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
"De vastgelegde frequentie is boven de capaciteit. Vastleggen gepauzeerd."
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Frequency must match existing PWMOut using this timer"
msgstr ""
"Frequentie moet overeenkomen met bestaande PWMOut bij gebruik van deze timer"
@ -861,7 +884,7 @@ msgid "Group full"
msgstr "Groep is vol"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr "Hardware bezig, probeer alternatieve pinnen"
@ -928,6 +951,11 @@ msgstr "Ongeldige %q"
msgid "Invalid %q pin"
msgstr "Ongeldige %q pin"
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr "Ongeldige %q pin selectie"
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
msgstr "Ongeldige ADC Unit waarde"
@ -940,24 +968,12 @@ msgstr "Ongeldig BMP bestand"
msgid "Invalid DAC pin supplied"
msgstr "Ongeldige DAC pin opgegeven"
#: ports/stm/common-hal/busio/I2C.c
msgid "Invalid I2C pin selection"
msgstr "Ongeldige I2C pin selectie"
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Ongeldige PWM frequentie"
#: ports/stm/common-hal/busio/SPI.c
msgid "Invalid SPI pin selection"
msgstr "Ongeldige SPI pin selectie"
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid UART pin selection"
msgstr "Ongeldige UART pin selectie"
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument"
msgstr "Ongeldig argument"
@ -994,7 +1010,7 @@ msgstr "Ongeldig bestand"
msgid "Invalid format chunk size"
msgstr "Ongeldig formaat stuk grootte"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
msgstr "Ongeldige frequentie opgegeven"
@ -1012,8 +1028,8 @@ msgid "Invalid phase"
msgstr "Ongeldige fase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Ongeldige pin"
@ -1037,7 +1053,7 @@ msgstr "Ongeldige pin voor rechter kanaal"
msgid "Invalid pins"
msgstr "Ongeldige pinnen"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr "Ongeldige pinnen voor PWMOut"
@ -1219,10 +1235,14 @@ msgstr "Een sleutel was niet gespecificeerd"
msgid "No long integer support"
msgstr "Geen lange integer ondersteuning"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
msgstr "Geen timers meer beschikbaar op deze pin."
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
msgstr ""
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr "Geen pulldown op pin; 1MOhm aangeraden"
@ -1243,6 +1263,10 @@ msgstr "Geen timer beschikbaar"
msgid "Nordic Soft Device failure assertion."
msgstr "Nordic Soft Device assertion mislukt."
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
msgid "Not connected"
@ -1253,6 +1277,14 @@ msgstr "Niet verbonden"
msgid "Not playing"
msgstr "Wordt niet afgespeeld"
#: main.c
msgid "Not running saved code.\n"
msgstr "Opgeslagen code wordt niet uitgevoerd.\n"
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
msgstr ""
#: shared-bindings/util.c
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
@ -1285,17 +1317,21 @@ msgstr ""
"Alleen monochrome en 4bpp of 8bpp, en 16bpp of grotere geïndiceerde BMP's "
"zijn ondersteund: %d bpp is gegeven"
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
msgstr "Oversample moet een meervoud van 8 zijn."
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr ""
"PWM duty_cycle moet tussen 0 en 65535 inclusief zijn (16 bit resolutie)"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
@ -1350,9 +1386,14 @@ msgstr "En iedere module in het bestandssysteem\n"
msgid "Polygon needs at least 3 points"
msgstr "Polygon heeft op zijn minst 3 punten nodig"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr "Pop van een lege Ps2 buffer"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c
#: ports/stm/common-hal/pulseio/PulseOut.c
msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Prefix buffer must be on the heap"
@ -1428,12 +1469,8 @@ msgid "Row entry must be digitalio.DigitalInOut"
msgstr "Rij invoeging moet digitalio.DigitalInOut zijn"
#: main.c
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Draaiende in veilige modus! Auto-herlaad is uit.\n"
#: main.c
msgid "Running in safe mode! Not running saved code.\n"
msgstr "Draaiende in veilige modus! Opgeslagen code wordt niet uitgevoerd.\n"
msgid "Running in safe mode! "
msgstr "Veilige modus wordt uitgevoerd! "
#: shared-module/sdcardio/SDCard.c
msgid "SD card CSD format not supported"
@ -1444,6 +1481,16 @@ msgstr "SD kaart CSD formaat niet ondersteund"
msgid "SDA or SCL needs a pull up"
msgstr "SDA of SCL hebben een pullup nodig"
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
msgstr "SDIO GetCardInfo Fout %d"
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO Init Error %d"
msgstr "SDIO Init Fout %d"
#: ports/stm/common-hal/busio/SPI.c
msgid "SPI Init Error"
msgstr "SPI Init Fout"
@ -1478,6 +1525,10 @@ msgstr "Geselecteerde RTS pin niet geldig"
msgid "Serializer in use"
msgstr "Serializer in gebruik"
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
msgstr ""
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
msgstr "Slice en waarde hebben verschillende lengtes."
@ -1581,13 +1632,17 @@ msgstr "Tile breedte moet exact de bitmap breedte verdelen"
msgid "Timeout is too long: Maximum timeout length is %d seconds"
msgstr "Time-out is te lang. Maximale time-out lengte is %d seconden"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid ""
"Timer was reserved for internal use - declare PWM pins earlier in the program"
msgstr ""
"Timer is gereserveerd voor intern gebruik - wijs PWM pins eerder in het "
"programma toe"
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
msgstr "Teveel kanalen in sample."
@ -1683,6 +1738,10 @@ msgstr "Niet in staat om naar nvm te schrijven."
msgid "Unexpected nrfx uuid type"
msgstr "Onverwacht mrfx uuid type"
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown gatt error: 0x%04x"
@ -1797,6 +1856,10 @@ msgstr ""
"\n"
"Voor een lijst van ingebouwde modules, gebruik `help(\"modules\")`.\n"
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
msgstr ""
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr "Schrijven niet ondersteund op Characteristic"
@ -1814,9 +1877,8 @@ msgid "__init__() should return None"
msgstr "__init __ () zou None moeten retourneren"
#: py/objtype.c
#, c-format
msgid "__init__() should return None, not '%s'"
msgstr "__init __ () zou None moeten retouneren, niet '%s'"
msgid "__init__() should return None, not '%q'"
msgstr "__init__() moet None teruggeven, niet '%q'"
#: py/objobject.c
msgid "__new__ arg must be a user-type"
@ -1912,7 +1974,7 @@ msgstr "slechte conversie specificatie"
msgid "bad format string"
msgstr "string met verkeerde indeling"
#: py/binary.c
#: py/binary.c py/objarray.c
msgid "bad typecode"
msgstr "verkeerde typecode"
@ -1965,11 +2027,15 @@ msgstr "byteorder is geen string"
msgid "bytes > 8 bits not supported"
msgstr "butes > 8 niet ondersteund"
#: py/objarray.c
msgid "bytes length not a multiple of item size"
msgstr ""
#: py/objstr.c
msgid "bytes value out of range"
msgstr "bytes waarde buiten bereik"
#: ports/atmel-samd/bindings/samd/Clock.c
#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c
msgid "calibration is out of range"
msgstr "calibration is buiten bereik"
@ -2002,48 +2068,18 @@ msgstr ""
msgid "can't assign to expression"
msgstr "kan niet toewijzen aan expressie"
#: py/obj.c
#, c-format
msgid "can't convert %s to complex"
msgstr "kan %s niet converteren naar een complex"
#: py/obj.c
#, c-format
msgid "can't convert %s to float"
msgstr "kan %s niet omzetten naar een float"
#: py/obj.c
#, c-format
msgid "can't convert %s to int"
msgstr "kan %s niet omzetten naar een int"
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr "kan %q niet naar %q converteren"
#: py/objstr.c
msgid "can't convert '%q' object to %q implicitly"
msgstr "kan '%q' object niet omzetten naar %q impliciet"
#: py/objint.c
msgid "can't convert NaN to int"
msgstr "kan NaN niet omzetten naar int"
#: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "can't convert address to int"
msgstr "kan adres niet omzetten naar int"
#: py/objint.c
msgid "can't convert inf to int"
msgstr "kan inf niet omzetten naar int"
#: py/obj.c
msgid "can't convert to complex"
msgstr "kan niet omzetten naar complex"
#: py/obj.c
msgid "can't convert to float"
msgstr "kan niet omzetten naar float"
#: py/obj.c
msgid "can't convert to int"
msgstr "kan niet omzetten naar int"
msgid "can't convert to %q"
msgstr "kan niet naar %q converteren"
#: py/objstr.c
msgid "can't convert to str implicitly"
@ -2453,7 +2489,7 @@ msgstr "functie mist vereist sleutelwoord argument \"%q"
msgid "function missing required positional argument #%d"
msgstr "functie mist vereist positie-argument #%d"
#: py/argcheck.c py/bc.c py/objnamedtuple.c
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
#, c-format
msgid "function takes %d positional arguments but %d were given"
msgstr ""
@ -2503,10 +2539,7 @@ msgstr "vulling (padding) is onjuist"
msgid "index is out of bounds"
msgstr "index is buiten bereik"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c
#: py/obj.c
msgid "index out of range"
msgstr "index is buiten bereik"
@ -2522,6 +2555,10 @@ msgstr "indices moeten integers, segmenten (slices) of Boolean lijsten zijn"
msgid "initial values must be iterable"
msgstr "oorspronkelijke waarden moeten itereerbaar zijn"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
msgstr ""
#: py/compile.c
msgid "inline assembler must be a function"
msgstr "inline assembler moet een functie zijn"
@ -2717,6 +2754,10 @@ msgstr "matrix is niet positief-definiet"
msgid "max_length must be 0-%d when fixed_length is %s"
msgstr "max_length moet 0-%d zijn als fixed_length %s is"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be > 0"
msgstr "max_length moet >0 zijn"
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "maximale recursiediepte overschreden"
@ -2865,9 +2906,8 @@ msgid "number of points must be at least 2"
msgstr "aantal punten moet minimaal 2 zijn"
#: py/obj.c
#, c-format
msgid "object '%s' is not a tuple or list"
msgstr "object '%s' is geen tuple of lijst"
msgid "object '%q' is not a tuple or list"
msgstr "object '%q' is geen tuple of lijst"
#: py/obj.c
msgid "object does not support item assignment"
@ -2902,9 +2942,8 @@ msgid "object not iterable"
msgstr "object niet itereerbaar"
#: py/obj.c
#, c-format
msgid "object of type '%s' has no len()"
msgstr "object van type '%s' heeft geen len()"
msgid "object of type '%q' has no len()"
msgstr "object van type '%q' heeft geen len()"
#: py/obj.c
msgid "object with buffer protocol required"
@ -2953,10 +2992,23 @@ msgstr "ord verwacht een teken (char)"
msgid "ord() expected a character, but string of length %d found"
msgstr "ord() verwacht een teken (char) maar vond een string van lengte %d"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
msgstr ""
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
msgstr "overloop bij converteren van long int naar machine word"
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
msgstr ""
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
msgstr "palette moet 32 bytes lang zijn"
@ -2997,21 +3049,10 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop van een lege PulseIn"
#: py/objset.c
msgid "pop from an empty set"
msgstr "pop van een lege set"
#: py/objlist.c
msgid "pop from empty list"
msgstr "pop van een lege lijst"
#: py/objdict.c
msgid "popitem(): dictionary is empty"
msgstr "popitem(): dictionary is leeg"
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
msgstr "pop van een lege %q"
#: py/objint_mpz.c
msgid "pow() 3rd argument cannot be 0"
@ -3144,6 +3185,10 @@ msgstr "sos[:, 3] moeten allemaal 1 zijn"
msgid "sosfilt requires iterable arguments"
msgstr "sosfilt vereist itereerbare argumenten"
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr ""
#: py/objstr.c
msgid "start/end indices"
msgstr "start/stop indices"
@ -3169,13 +3214,8 @@ msgid "stream operation not supported"
msgstr "stream operatie niet ondersteund"
#: py/objstrunicode.c
msgid "string index out of range"
msgstr "string index buiten bereik"
#: py/objstrunicode.c
#, c-format
msgid "string indices must be integers, not %s"
msgstr "string indices moeten integer zijn, niet %s"
msgid "string indices must be integers, not %q"
msgstr "string indices moeten integers zijn, geen %q"
#: py/stream.c
msgid "string not supported; use bytes or bytearray"
@ -3185,10 +3225,6 @@ msgstr "string niet ondersteund; gebruik bytes of bytearray"
msgid "struct: cannot index"
msgstr "struct: kan niet indexeren"
#: extmod/moductypes.c
msgid "struct: index out of range"
msgstr "struct: index buiten bereik"
#: extmod/moductypes.c
msgid "struct: no fields"
msgstr "struct: geen velden"
@ -3258,7 +3294,7 @@ msgstr "te veel waarden om uit te pakken (%d verwacht)"
msgid "trapz is defined for 1D arrays of equal length"
msgstr "trapz is gedefinieerd voor eendimensionale arrays van gelijke lengte"
#: extmod/ulab/code/linalg/linalg.c py/objstr.c
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr "tuple index buiten bereik"
@ -3266,10 +3302,6 @@ msgstr "tuple index buiten bereik"
msgid "tuple/list has wrong length"
msgstr "tuple of lijst heeft onjuiste lengte"
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr "tuple of lijst vereist op RHS"
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"
@ -3325,9 +3357,8 @@ msgid "unknown conversion specifier %c"
msgstr "onbekende conversiespecificatie %c"
#: py/objstr.c
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgstr "onbekende formaatcode '%c' voor object van type '%s'"
msgid "unknown format code '%c' for object of type '%q'"
msgstr "onbekende formaatcode '%c' voor object van type '%q'"
#: py/compile.c
msgid "unknown type"
@ -3366,16 +3397,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr "niet ondersteund formaatkarakter '%c' (0x%x) op index %d"
#: py/runtime.c
msgid "unsupported type for %q: '%s'"
msgstr "niet ondersteund type voor %q: '%s'"
msgid "unsupported type for %q: '%q'"
msgstr "niet ondersteund type voor %q: '%q'"
#: py/runtime.c
msgid "unsupported type for operator"
msgstr "niet ondersteund type voor operator"
#: py/runtime.c
msgid "unsupported types for %q: '%s', '%s'"
msgstr "niet ondersteunde types voor %q: '%s', '%s'"
msgid "unsupported types for %q: '%q', '%q'"
msgstr "niet ondersteunde types voor %q: '%q', '%q'"
#: py/objint.c
#, c-format
@ -3454,15 +3485,137 @@ 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 ""
#~ "\n"
#~ "To exit, please reset the board without "
#~ msgstr ""
#~ "\n"
#~ "Om te verlaten, herstart de module zonder "
#~ msgid "PulseOut not supported on this chip"
#~ msgstr "PulseOut niet ondersteund door deze chip"
#~ msgid "tuple/list required on RHS"
#~ msgstr "tuple of lijst vereist op RHS"
#~ msgid "Invalid SPI pin selection"
#~ msgstr "Ongeldige SPI pin selectie"
#~ msgid "Invalid UART pin selection"
#~ msgstr "Ongeldige UART pin selectie"
#~ msgid "%q indices must be integers, not %s"
#~ msgstr "%q indexen moeten integers zijn, niet %s"
#~ msgid "'%s' object cannot assign attribute '%q'"
#~ msgstr "'%s' object kan niet aan attribuut '%q' toewijzen"
#~ msgid "'%s' object does not support '%q'"
#~ msgstr "'%s' object ondersteunt '%q' niet"
#~ msgid "'%s' object does not support item assignment"
#~ msgstr "'%s' object ondersteunt item toewijzing niet"
#~ msgid "'%s' object does not support item deletion"
#~ msgstr "'%s' object ondersteunt item verwijdering niet"
#~ msgid "'%s' object has no attribute '%q'"
#~ msgstr "'%s' object heeft geen attribuut '%q'"
#~ msgid "'%s' object is not an iterator"
#~ msgstr "'%s' object is geen iterator"
#~ msgid "'%s' object is not callable"
#~ msgstr "'%s' object is niet aanroepbaar"
#~ msgid "'%s' object is not iterable"
#~ msgstr "'%s' object is niet itereerbaar"
#~ msgid "'%s' object is not subscriptable"
#~ msgstr "'%s' object is niet onderschrijfbaar"
#~ msgid "Pop from an empty Ps2 buffer"
#~ msgstr "Pop van een lege Ps2 buffer"
#~ msgid "Running in safe mode! Auto-reload is off.\n"
#~ msgstr "Draaiende in veilige modus! Auto-herlaad is uit.\n"
#~ msgid "Running in safe mode! Not running saved code.\n"
#~ msgstr ""
#~ "Draaiende in veilige modus! Opgeslagen code wordt niet uitgevoerd.\n"
#~ msgid "__init__() should return None, not '%s'"
#~ msgstr "__init __ () zou None moeten retouneren, niet '%s'"
#~ msgid "can't convert %s to complex"
#~ msgstr "kan %s niet converteren naar een complex"
#~ msgid "can't convert %s to float"
#~ msgstr "kan %s niet omzetten naar een float"
#~ msgid "can't convert %s to int"
#~ msgstr "kan %s niet omzetten naar een int"
#~ msgid "can't convert NaN to int"
#~ msgstr "kan NaN niet omzetten naar int"
#~ msgid "can't convert address to int"
#~ msgstr "kan adres niet omzetten naar int"
#~ msgid "can't convert inf to int"
#~ msgstr "kan inf niet omzetten naar int"
#~ msgid "can't convert to complex"
#~ msgstr "kan niet omzetten naar complex"
#~ msgid "can't convert to float"
#~ msgstr "kan niet omzetten naar float"
#~ msgid "can't convert to int"
#~ msgstr "kan niet omzetten naar int"
#~ msgid "object '%s' is not a tuple or list"
#~ msgstr "object '%s' is geen tuple of lijst"
#~ msgid "object of type '%s' has no len()"
#~ msgstr "object van type '%s' heeft geen len()"
#~ msgid "pop from an empty PulseIn"
#~ msgstr "pop van een lege PulseIn"
#~ msgid "pop from an empty set"
#~ msgstr "pop van een lege set"
#~ msgid "pop from empty list"
#~ msgstr "pop van een lege lijst"
#~ msgid "popitem(): dictionary is empty"
#~ msgstr "popitem(): dictionary is leeg"
#~ msgid "string index out of range"
#~ msgstr "string index buiten bereik"
#~ msgid "string indices must be integers, not %s"
#~ msgstr "string indices moeten integer zijn, niet %s"
#~ msgid "struct: index out of range"
#~ msgstr "struct: index buiten bereik"
#~ msgid "unknown format code '%c' for object of type '%s'"
#~ msgstr "onbekende formaatcode '%c' voor object van type '%s'"
#~ msgid "unsupported type for %q: '%s'"
#~ msgstr "niet ondersteund type voor %q: '%s'"
#~ msgid "unsupported types for %q: '%s', '%s'"
#~ msgstr "niet ondersteunde types voor %q: '%s', '%s'"
#~ msgid "'async for' or 'async with' outside async function"
#~ msgstr "'async for' of 'async with' buiten async functie"
#~ msgid "PulseIn not supported on this chip"
#~ msgstr "PusleIn niet ondersteund door deze chip"
#~ msgid "PulseOut not supported on this chip"
#~ msgstr "PulseOut niet ondersteund door deze chip"
#~ msgid "I2C operation not supported"
#~ msgstr "I2C actie niet ondersteund"
@ -3486,3 +3639,6 @@ msgstr "zi moet vorm (n_section, 2) hebben"
#~ msgid "must specify all of sck/mosi/miso"
#~ msgstr "sck/mosi/miso moeten alle gespecificeerd worden"
#~ msgid "'%q' object is not bytes-like"
#~ msgstr "'%q' object is niet bytes-achtig"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-30 07:23-0500\n"
"POT-Creation-Date: 2020-09-13 14:21-0500\n"
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
"Language-Team: pl\n"
@ -30,12 +30,6 @@ msgid ""
"https://github.com/adafruit/circuitpython/issues\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid ""
"\n"
"To exit, please reset the board without "
msgstr ""
#: py/obj.c
msgid " File \"%q\""
msgstr " Plik \"%q\""
@ -66,13 +60,17 @@ msgstr ""
msgid "%q in use"
msgstr "%q w użyciu"
#: py/obj.c
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
msgstr "%q poza zakresem"
#: py/obj.c
msgid "%q indices must be integers, not %s"
msgstr "%q indeks musi być liczbą całkowitą, a nie %s"
msgid "%q indices must be integers, not %q"
msgstr ""
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@ -110,6 +108,42 @@ msgstr "%q() bierze %d argumentów pozycyjnych, lecz podano %d"
msgid "'%q' argument required"
msgstr "'%q' wymaga argumentu"
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr ""
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr ""
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr ""
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
msgstr ""
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr ""
#: py/obj.c
msgid "'%q' object is not subscriptable"
msgstr ""
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a label"
@ -160,48 +194,6 @@ msgstr "'%s' liczba %d poza zakresem %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' liczba 0x%x nie pasuje do maski 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""
#: py/obj.c
#, c-format
msgid "'%s' object does not support item assignment"
msgstr "'%s' obiekt nie wspiera przypisania do elementów"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item deletion"
msgstr "'%s' obiekt nie wspiera usuwania elementów"
#: py/runtime.c
msgid "'%s' object has no attribute '%q'"
msgstr "'%s' obiekt nie ma atrybutu '%q'"
#: py/runtime.c
#, c-format
msgid "'%s' object is not an iterator"
msgstr "'%s' obiekt nie jest iteratorem"
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
msgstr "'%s' nie można wywoływać obiektu"
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
msgstr "'%s' nie można iterować po obiekcie"
#: py/obj.c
#, c-format
msgid "'%s' object is not subscriptable"
msgstr "'%s' nie można indeksować obiektu"
#: py/objstr.c
msgid "'=' alignment not allowed in string format specifier"
msgstr "wyrównanie '=' niedozwolone w specyfikacji formatu"
@ -275,7 +267,7 @@ msgstr "3-argumentowy pow() jest niewspierany"
msgid "A hardware interrupt channel is already in use"
msgstr "Kanał przerwań sprzętowych w użyciu"
#: shared-bindings/_bleio/Address.c
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
msgid "Address must be %d bytes long"
msgstr "Adres musi mieć %d bajtów"
@ -304,7 +296,7 @@ msgstr "Wszystkie kanały zdarzeń w użyciu"
msgid "All sync event channels in use"
msgstr "Wszystkie kanały zdarzeń synchronizacji w użyciu"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr "Wszystkie timery tej nóżki w użyciu"
@ -316,7 +308,7 @@ msgstr "Wszystkie timery tej nóżki w użyciu"
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c
#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c
#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c
msgid "All timers in use"
msgstr "Wszystkie timery w użyciu"
@ -373,6 +365,10 @@ msgstr ""
msgid "Attempted heap allocation when MicroPython VM not running."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
msgstr ""
#: main.c
msgid "Auto-reload is off.\n"
msgstr "Samo-przeładowywanie wyłączone.\n"
@ -451,6 +447,10 @@ msgstr ""
msgid "Buffer length must be a multiple of 512"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Bufor musi mieć długość 1 lub więcej"
@ -490,6 +490,10 @@ msgstr ""
msgid "Can't set CCCD on local Characteristic"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Cannot create a new Adapter; use _bleio.adapter;"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
#: shared-bindings/memorymonitor/AllocationSize.c
#: shared-bindings/pulseio/PulseIn.c
@ -552,7 +556,7 @@ msgstr "Nie można przesyłać bez nóżek MOSI i MISO."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "Wielkość skalara jest niejednoznaczna"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
msgstr ""
@ -574,6 +578,10 @@ msgid ""
"boot. Press again to exit safe mode.\n"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
msgstr ""
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr "Nie powiodło się ustawienie nóżki zegara"
@ -621,27 +629,31 @@ msgstr ""
msgid "Could not initialize UART"
msgstr "Ustawienie UART nie powiodło się"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init channel"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init timer"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not restart PWM"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
msgstr ""
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
msgstr ""
@ -738,9 +750,9 @@ msgstr "Kanał EXTINT w użyciu"
msgid "Error in regex"
msgstr "Błąd w regex"
#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c
#: shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
msgid "Expected a %q"
msgstr "Oczekiwano %q"
@ -750,10 +762,18 @@ msgstr "Oczekiwano %q"
msgid "Expected a Characteristic"
msgstr "Oczekiwano charakterystyki"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
msgid "Expected a UUID"
@ -823,11 +843,16 @@ msgstr ""
msgid "File exists"
msgstr "Plik istnieje"
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr "Uzyskana częstotliwość jest niemożliwa. Spauzowano."
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Frequency must match existing PWMOut using this timer"
msgstr ""
@ -847,7 +872,7 @@ msgid "Group full"
msgstr "Grupa pełna"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr ""
@ -914,6 +939,11 @@ msgstr ""
msgid "Invalid %q pin"
msgstr "Zła nóżka %q"
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr ""
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
msgstr ""
@ -926,24 +956,12 @@ msgstr "Zły BMP"
msgid "Invalid DAC pin supplied"
msgstr ""
#: ports/stm/common-hal/busio/I2C.c
msgid "Invalid I2C pin selection"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Zła częstotliwość PWM"
#: ports/stm/common-hal/busio/SPI.c
msgid "Invalid SPI pin selection"
msgstr ""
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid UART pin selection"
msgstr ""
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument"
msgstr "Zły argument"
@ -980,7 +998,7 @@ msgstr "Zły plik"
msgid "Invalid format chunk size"
msgstr "Zła wielkość fragmentu formatu"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
msgstr ""
@ -998,8 +1016,8 @@ msgid "Invalid phase"
msgstr "Zła faza"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Zła nóżka"
@ -1023,7 +1041,7 @@ msgstr "Zła nóżka dla prawego kanału"
msgid "Invalid pins"
msgstr "Złe nóżki"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr ""
@ -1205,10 +1223,14 @@ msgstr ""
msgid "No long integer support"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
msgstr ""
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@ -1229,6 +1251,10 @@ msgstr ""
msgid "Nordic Soft Device failure assertion."
msgstr ""
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
msgid "Not connected"
@ -1239,6 +1265,14 @@ msgstr "Nie podłączono"
msgid "Not playing"
msgstr "Nic nie jest odtwarzane"
#: main.c
msgid "Not running saved code.\n"
msgstr ""
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
msgstr ""
#: shared-bindings/util.c
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
@ -1265,16 +1299,20 @@ msgid ""
"%d bpp given"
msgstr ""
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
msgstr "Nadpróbkowanie musi być wielokrotnością 8."
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr "duty_cycle musi być pomiędzy 0 a 65535 włącznie (rozdzielczość 16 bit)"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr "Nie można zmienić częstotliwości PWM gdy variable_frequency=False."
@ -1324,8 +1362,13 @@ msgstr "Oraz moduły w systemie plików\n"
msgid "Polygon needs at least 3 points"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c
#: ports/stm/common-hal/pulseio/PulseOut.c
msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
#: shared-bindings/_bleio/Adapter.c
@ -1400,12 +1443,8 @@ msgid "Row entry must be digitalio.DigitalInOut"
msgstr "Rzędy muszą być digitalio.DigitalInOut"
#: main.c
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Uruchomiony tryb bezpieczeństwa! Samo-przeładowanie wyłączone.\n"
#: main.c
msgid "Running in safe mode! Not running saved code.\n"
msgstr "Uruchomiony tryb bezpieczeństwa! Zapisany kod nie jest uruchamiany.\n"
msgid "Running in safe mode! "
msgstr ""
#: shared-module/sdcardio/SDCard.c
msgid "SD card CSD format not supported"
@ -1416,6 +1455,16 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr "SDA lub SCL wymagają podciągnięcia"
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
msgstr ""
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO Init Error %d"
msgstr ""
#: ports/stm/common-hal/busio/SPI.c
msgid "SPI Init Error"
msgstr ""
@ -1450,6 +1499,10 @@ msgstr ""
msgid "Serializer in use"
msgstr "Serializator w użyciu"
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
msgstr ""
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
msgstr "Fragment i wartość są różnych długości."
@ -1545,11 +1598,15 @@ msgstr "Szerokość bitmapy musi być wielokrotnością szerokości kafelka"
msgid "Timeout is too long: Maximum timeout length is %d seconds"
msgstr ""
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid ""
"Timer was reserved for internal use - declare PWM pins earlier in the program"
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
msgstr "By wyjść, proszę zresetować płytkę bez "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
msgstr "Zbyt wiele kanałów."
@ -1645,6 +1702,10 @@ msgstr "Błąd zapisu do NVM."
msgid "Unexpected nrfx uuid type"
msgstr "Nieoczekiwany typ nrfx uuid."
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
msgstr ""
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown gatt error: 0x%04x"
@ -1751,6 +1812,10 @@ msgstr ""
"Podręczniki dostępne na learn.adafruit.com/category/circuitpyhon.\n"
"Aby zobaczyć wbudowane moduły, wpisz `help(\"modules\")`.\n"
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
msgstr ""
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr ""
@ -1768,9 +1833,8 @@ msgid "__init__() should return None"
msgstr "__init__() powinien zwracać None"
#: py/objtype.c
#, c-format
msgid "__init__() should return None, not '%s'"
msgstr "__init__() powinien zwracać None, nie '%s'"
msgid "__init__() should return None, not '%q'"
msgstr ""
#: py/objobject.c
msgid "__new__ arg must be a user-type"
@ -1866,7 +1930,7 @@ msgstr "zły specyfikator konwersji"
msgid "bad format string"
msgstr "zła specyfikacja formatu"
#: py/binary.c
#: py/binary.c py/objarray.c
msgid "bad typecode"
msgstr "zły typecode"
@ -1919,11 +1983,15 @@ msgstr ""
msgid "bytes > 8 bits not supported"
msgstr "bajty większe od 8 bitów są niewspierane"
#: py/objarray.c
msgid "bytes length not a multiple of item size"
msgstr ""
#: py/objstr.c
msgid "bytes value out of range"
msgstr "wartość bytes poza zakresem"
#: ports/atmel-samd/bindings/samd/Clock.c
#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c
msgid "calibration is out of range"
msgstr "kalibracja poza zakresem"
@ -1937,7 +2005,7 @@ msgstr "wartość kalibracji poza zakresem +/-127"
#: py/emitinlinethumb.c
msgid "can only have up to 4 parameters to Thumb assembly"
msgstr "asembler Thumb może przyjąć do 4 parameterów"
msgstr "asembler Thumb może przyjąć do 4 parameterów"
#: py/emitinlinextensa.c
msgid "can only have up to 4 parameters to Xtensa assembly"
@ -1955,48 +2023,18 @@ msgstr "nie można dodać specjalnej metody do podklasy"
msgid "can't assign to expression"
msgstr "przypisanie do wyrażenia"
#: py/obj.c
#, c-format
msgid "can't convert %s to complex"
msgstr "nie można skonwertować %s do complex"
#: py/obj.c
#, c-format
msgid "can't convert %s to float"
msgstr "nie można skonwertować %s do float"
#: py/obj.c
#, c-format
msgid "can't convert %s to int"
msgstr "nie można skonwertować %s do int"
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert '%q' object to %q implicitly"
msgstr "nie można automatycznie skonwertować '%q' do '%q'"
#: py/objint.c
msgid "can't convert NaN to int"
msgstr "nie można skonwertować NaN do int"
#: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "can't convert address to int"
msgstr "nie można skonwertować adresu do int"
#: py/objint.c
msgid "can't convert inf to int"
msgstr "nie można skonwertować inf do int"
#: py/obj.c
msgid "can't convert to complex"
msgstr "nie można skonwertować do complex"
#: py/obj.c
msgid "can't convert to float"
msgstr "nie można skonwertować do float"
#: py/obj.c
msgid "can't convert to int"
msgstr "nie można skonwertować do int"
msgid "can't convert to %q"
msgstr ""
#: py/objstr.c
msgid "can't convert to str implicitly"
@ -2404,7 +2442,7 @@ msgstr "brak wymaganego argumentu nazwanego '%q' funkcji"
msgid "function missing required positional argument #%d"
msgstr "brak wymaganego argumentu pozycyjnego #%d funkcji"
#: py/argcheck.c py/bc.c py/objnamedtuple.c
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
#, c-format
msgid "function takes %d positional arguments but %d were given"
msgstr "funkcja wymaga %d argumentów pozycyjnych, ale jest %d"
@ -2453,10 +2491,7 @@ msgstr "złe wypełnienie"
msgid "index is out of bounds"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c
#: py/obj.c
msgid "index out of range"
msgstr "indeks poza zakresem"
@ -2472,6 +2507,10 @@ msgstr ""
msgid "initial values must be iterable"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
msgstr ""
#: py/compile.c
msgid "inline assembler must be a function"
msgstr "wtrącony asembler musi być funkcją"
@ -2664,6 +2703,10 @@ msgstr ""
msgid "max_length must be 0-%d when fixed_length is %s"
msgstr ""
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be > 0"
msgstr ""
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "przekroczono dozwoloną głębokość rekurencji"
@ -2812,9 +2855,8 @@ msgid "number of points must be at least 2"
msgstr ""
#: py/obj.c
#, c-format
msgid "object '%s' is not a tuple or list"
msgstr "obiekt '%s' nie jest krotką ani listą"
msgid "object '%q' is not a tuple or list"
msgstr ""
#: py/obj.c
msgid "object does not support item assignment"
@ -2849,9 +2891,8 @@ msgid "object not iterable"
msgstr "obiekt nie jest iterowalny"
#: py/obj.c
#, c-format
msgid "object of type '%s' has no len()"
msgstr "obiekt typu '%s' nie ma len()"
msgid "object of type '%q' has no len()"
msgstr ""
#: py/obj.c
msgid "object with buffer protocol required"
@ -2900,10 +2941,23 @@ msgstr "ord oczekuje znaku"
msgid "ord() expected a character, but string of length %d found"
msgstr "ord() oczekuje znaku, a jest łańcuch od długości %d"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
msgstr ""
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
msgstr "przepełnienie przy konwersji long in to słowa maszynowego"
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
msgstr ""
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
msgstr "paleta musi mieć 32 bajty długości"
@ -2944,21 +2998,10 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop z pustego PulseIn"
#: py/objset.c
msgid "pop from an empty set"
msgstr "pop z pustego zbioru"
#: py/objlist.c
msgid "pop from empty list"
msgstr "pop z pustej listy"
#: py/objdict.c
msgid "popitem(): dictionary is empty"
msgstr "popitem(): słownik jest pusty"
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
msgstr ""
#: py/objint_mpz.c
msgid "pow() 3rd argument cannot be 0"
@ -3090,6 +3133,10 @@ msgstr ""
msgid "sosfilt requires iterable arguments"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr ""
#: py/objstr.c
msgid "start/end indices"
msgstr "początkowe/końcowe indeksy"
@ -3115,13 +3162,8 @@ msgid "stream operation not supported"
msgstr "operacja na strumieniu nieobsługiwana"
#: py/objstrunicode.c
msgid "string index out of range"
msgstr "indeks łańcucha poza zakresem"
#: py/objstrunicode.c
#, c-format
msgid "string indices must be integers, not %s"
msgstr "indeksy łańcucha muszą być całkowite, nie %s"
msgid "string indices must be integers, not %q"
msgstr ""
#: py/stream.c
msgid "string not supported; use bytes or bytearray"
@ -3131,10 +3173,6 @@ msgstr "łańcuchy nieobsługiwane; użyj bytes lub bytearray"
msgid "struct: cannot index"
msgstr "struct: nie można indeksować"
#: extmod/moductypes.c
msgid "struct: index out of range"
msgstr "struct: indeks poza zakresem"
#: extmod/moductypes.c
msgid "struct: no fields"
msgstr "struct: brak pól"
@ -3204,7 +3242,7 @@ msgstr "zbyt wiele wartości do rozpakowania (oczekiwano %d)"
msgid "trapz is defined for 1D arrays of equal length"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c py/objstr.c
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr "indeks krotki poza zakresem"
@ -3212,10 +3250,6 @@ msgstr "indeks krotki poza zakresem"
msgid "tuple/list has wrong length"
msgstr "krotka/lista ma złą długość"
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr "wymagana krotka/lista po prawej stronie"
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"
@ -3271,9 +3305,8 @@ msgid "unknown conversion specifier %c"
msgstr "zła specyfikacja konwersji %c"
#: py/objstr.c
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgstr "zły kod formatowania '%c' dla obiektu typu '%s'"
msgid "unknown format code '%c' for object of type '%q'"
msgstr ""
#: py/compile.c
msgid "unknown type"
@ -3312,16 +3345,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr "zły znak formatowania '%c' (0x%x) na pozycji %d"
#: py/runtime.c
msgid "unsupported type for %q: '%s'"
msgstr "zły typ dla %q: '%s'"
msgid "unsupported type for %q: '%q'"
msgstr ""
#: py/runtime.c
msgid "unsupported type for operator"
msgstr "zły typ dla operatora"
#: py/runtime.c
msgid "unsupported types for %q: '%s', '%s'"
msgstr "złe typy dla %q: '%s', '%s'"
msgid "unsupported types for %q: '%q', '%q'"
msgstr ""
#: py/objint.c
#, c-format
@ -3400,6 +3433,106 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "tuple/list required on RHS"
#~ msgstr "wymagana krotka/lista po prawej stronie"
#~ msgid "%q indices must be integers, not %s"
#~ msgstr "%q indeks musi być liczbą całkowitą, a nie %s"
#~ msgid "'%s' object does not support item assignment"
#~ msgstr "'%s' obiekt nie wspiera przypisania do elementów"
#~ msgid "'%s' object does not support item deletion"
#~ msgstr "'%s' obiekt nie wspiera usuwania elementów"
#~ msgid "'%s' object has no attribute '%q'"
#~ msgstr "'%s' obiekt nie ma atrybutu '%q'"
#~ msgid "'%s' object is not an iterator"
#~ msgstr "'%s' obiekt nie jest iteratorem"
#~ msgid "'%s' object is not callable"
#~ msgstr "'%s' nie można wywoływać obiektu"
#~ msgid "'%s' object is not iterable"
#~ msgstr "'%s' nie można iterować po obiekcie"
#~ msgid "'%s' object is not subscriptable"
#~ msgstr "'%s' nie można indeksować obiektu"
#~ msgid "Running in safe mode! Auto-reload is off.\n"
#~ msgstr "Uruchomiony tryb bezpieczeństwa! Samo-przeładowanie wyłączone.\n"
#~ msgid "Running in safe mode! Not running saved code.\n"
#~ msgstr ""
#~ "Uruchomiony tryb bezpieczeństwa! Zapisany kod nie jest uruchamiany.\n"
#~ msgid "__init__() should return None, not '%s'"
#~ msgstr "__init__() powinien zwracać None, nie '%s'"
#~ msgid "can't convert %s to complex"
#~ msgstr "nie można skonwertować %s do complex"
#~ msgid "can't convert %s to float"
#~ msgstr "nie można skonwertować %s do float"
#~ msgid "can't convert %s to int"
#~ msgstr "nie można skonwertować %s do int"
#~ msgid "can't convert NaN to int"
#~ msgstr "nie można skonwertować NaN do int"
#~ msgid "can't convert address to int"
#~ msgstr "nie można skonwertować adresu do int"
#~ msgid "can't convert inf to int"
#~ msgstr "nie można skonwertować inf do int"
#~ msgid "can't convert to complex"
#~ msgstr "nie można skonwertować do complex"
#~ msgid "can't convert to float"
#~ msgstr "nie można skonwertować do float"
#~ msgid "can't convert to int"
#~ msgstr "nie można skonwertować do int"
#~ msgid "object '%s' is not a tuple or list"
#~ msgstr "obiekt '%s' nie jest krotką ani listą"
#~ msgid "object of type '%s' has no len()"
#~ msgstr "obiekt typu '%s' nie ma len()"
#~ msgid "pop from an empty PulseIn"
#~ msgstr "pop z pustego PulseIn"
#~ msgid "pop from an empty set"
#~ msgstr "pop z pustego zbioru"
#~ msgid "pop from empty list"
#~ msgstr "pop z pustej listy"
#~ msgid "popitem(): dictionary is empty"
#~ msgstr "popitem(): słownik jest pusty"
#~ msgid "string index out of range"
#~ msgstr "indeks łańcucha poza zakresem"
#~ msgid "string indices must be integers, not %s"
#~ msgstr "indeksy łańcucha muszą być całkowite, nie %s"
#~ msgid "struct: index out of range"
#~ msgstr "struct: indeks poza zakresem"
#~ msgid "unknown format code '%c' for object of type '%s'"
#~ msgstr "zły kod formatowania '%c' dla obiektu typu '%s'"
#~ msgid "unsupported type for %q: '%s'"
#~ msgstr "zły typ dla %q: '%s'"
#~ msgid "unsupported types for %q: '%s', '%s'"
#~ msgstr "złe typy dla %q: '%s', '%s'"
#~ msgid "Address is not %d bytes long or is in wrong format"
#~ msgstr "Adres nie ma długości %d bajtów lub zły format"
@ -3468,7 +3601,7 @@ msgstr ""
#~ msgstr "Nie udało się odkryć serwisów"
#~ msgid "Failed to get local address"
#~ msgstr "Nie udało się uzyskać lokalnego adresu"
#~ msgstr "Nie udało się uzyskać lokalnego adresu"
#~ msgid "Failed to get softdevice state"
#~ msgstr "Nie udało się odczytać stanu softdevice"
@ -3516,7 +3649,7 @@ msgstr ""
#~ msgstr "Nie udało się zapisać gatts, błąd 0x%04x"
#~ msgid "Flash erase failed"
#~ msgstr "Nie udało się skasować flash"
#~ msgstr "Nie udało się skasować flash"
#~ msgid "Flash erase failed to start, err 0x%04x"
#~ msgstr "Nie udało się rozpocząć kasowania flash, błąd 0x%04x"
@ -3609,9 +3742,6 @@ msgstr ""
#~ msgid "Tile indices must be 0 - 255"
#~ msgstr "Indeks kafelka musi być pomiędzy 0 a 255 włącznie"
#~ msgid "To exit, please reset the board without "
#~ msgstr "By wyjść, proszę zresetować płytkę bez "
#~ msgid "UUID integer value not in range 0 to 0xffff"
#~ msgstr "Wartość UUID poza zakresem 0 do 0xffff"

View File

@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-07-30 07:23-0500\n"
"PO-Revision-Date: 2020-07-31 14:41+0000\n"
"POT-Creation-Date: 2020-09-13 14:21-0500\n"
"PO-Revision-Date: 2020-09-14 13:47+0000\n"
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
"Language-Team: \n"
"Language: pt_BR\n"
@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.2-dev\n"
"X-Generator: Weblate 4.3-dev\n"
#: main.c
msgid ""
@ -34,14 +34,6 @@ msgstr ""
"Registre um problema com o conteúdo do seu controlador no CIRCUITPY\n"
"https://github.com/adafruit/circuitpython/issues\n"
#: supervisor/shared/safe_mode.c
msgid ""
"\n"
"To exit, please reset the board without "
msgstr ""
"\n"
"Para encerrar, redefina a placa sem "
#: py/obj.c
msgid " File \"%q\""
msgstr " Arquivo \"%q\""
@ -72,13 +64,17 @@ msgstr "%q falha: %d"
msgid "%q in use"
msgstr "%q em uso"
#: py/obj.c
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
msgstr "O índice %q está fora do intervalo"
#: py/obj.c
msgid "%q indices must be integers, not %s"
msgstr "Os índices %q devem ser inteiros, e não %s"
msgid "%q indices must be integers, not %q"
msgstr "Os indicadores %q devem ser inteiros, não %q"
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@ -116,6 +112,42 @@ msgstr "%q() recebe %d argumentos posicionais, porém %d foram informados"
msgid "'%q' argument required"
msgstr "'%q' argumento(s) requerido(s)"
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
msgstr "O objeto '%q' não pode definir o atributo '%q'"
#: py/proto.c
msgid "'%q' object does not support '%q'"
msgstr "O objeto '%q' não suporta '%q'"
#: py/obj.c
msgid "'%q' object does not support item assignment"
msgstr "O objeto '%q' não suporta a atribuição do item"
#: py/obj.c
msgid "'%q' object does not support item deletion"
msgstr "O objeto '%q' não suporta a exclusão dos itens"
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
msgstr "O objeto '%q' não possui qualquer atributo '%q'"
#: py/runtime.c
msgid "'%q' object is not an iterator"
msgstr "O objeto '%q' não é um iterador"
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
msgstr "O objeto '%s' não é invocável"
#: py/runtime.c
msgid "'%q' object is not iterable"
msgstr "O objeto '%q' não é iterável"
#: py/obj.c
msgid "'%q' object is not subscriptable"
msgstr "O objeto '%q' não é subscritível"
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a label"
@ -166,48 +198,6 @@ msgstr "O número inteiro '%s' %d não está dentro do intervalo %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "O número inteiro '%s' 0x%x não cabe na máscara 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr "O objeto '%s' não pode definir o atributo '%q'"
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr "O objeto '%s' não é compatível com '%q'"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item assignment"
msgstr "O objeto '%s' não compatível com a atribuição dos itens"
#: py/obj.c
#, c-format
msgid "'%s' object does not support item deletion"
msgstr "O objeto '%s' não é compatível com exclusão do item"
#: py/runtime.c
msgid "'%s' object has no attribute '%q'"
msgstr "O objeto '%s' não possui o atributo '%q'"
#: py/runtime.c
#, c-format
msgid "'%s' object is not an iterator"
msgstr "O objeto '%s' não é um iterador"
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
msgstr "O objeto '%s' não é invocável"
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
msgstr "O objeto '%s' não é iterável"
#: py/obj.c
#, c-format
msgid "'%s' object is not subscriptable"
msgstr "O objeto '%s' não é subroteirizável"
#: py/objstr.c
msgid "'=' alignment not allowed in string format specifier"
msgstr ""
@ -285,7 +275,7 @@ msgstr "3-arg pow() não compatível"
msgid "A hardware interrupt channel is already in use"
msgstr "Um canal de interrupção de hardware já está em uso"
#: shared-bindings/_bleio/Address.c
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
msgid "Address must be %d bytes long"
msgstr "O endereço deve ter %d bytes de comprimento"
@ -314,7 +304,7 @@ msgstr "Todos os canais de eventos em uso"
msgid "All sync event channels in use"
msgstr "Todos os canais dos eventos de sincronização em uso"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use"
msgstr "Todos os temporizadores para este pino estão em uso"
@ -326,7 +316,7 @@ msgstr "Todos os temporizadores para este pino estão em uso"
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c
#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c
#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c
msgid "All timers in use"
msgstr "Todos os temporizadores em uso"
@ -385,6 +375,10 @@ msgstr ""
"A tentativa da área de alocação dinâmica de variáveis (heap) quando o "
"MicroPython VM não está em execução."
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
msgstr "Houve um falha na autenticação"
#: main.c
msgid "Auto-reload is off.\n"
msgstr "A atualização automática está desligada.\n"
@ -465,6 +459,10 @@ msgstr "O tamanho do buffer %d é muito grande. Deve ser menor que %d"
msgid "Buffer length must be a multiple of 512"
msgstr "O comprimento do Buffer deve ser um múltiplo de 512"
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
msgstr "O buffer deve ser um múltiplo de 512 bytes"
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "O comprimento do buffer deve ter pelo menos 1"
@ -504,6 +502,10 @@ msgstr "Chame super().__init__() antes de acessar o objeto nativo."
msgid "Can't set CCCD on local Characteristic"
msgstr "Não é possível definir o CCCD com a característica local"
#: shared-bindings/_bleio/Adapter.c
msgid "Cannot create a new Adapter; use _bleio.adapter;"
msgstr "Não é possível criar um novo Adaptador; utilize _bleio.adapter;"
#: shared-bindings/displayio/Bitmap.c
#: shared-bindings/memorymonitor/AllocationSize.c
#: shared-bindings/pulseio/PulseIn.c
@ -569,7 +571,7 @@ msgstr "Não é possível transferir sem os pinos MOSI e MISO."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "Não é possível obter inequivocamente o tamanho do escalar"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Cannot vary frequency on a timer that is already in use"
msgstr "Não é possível variar a frequência em um timer que já esteja em uso"
@ -594,6 +596,10 @@ msgstr ""
"redefinição durante a inicialização. Pressione novamente para sair do modo "
"de segurança.\n"
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
msgstr "O CircuitPython não conseguiu alocar o heap.\n"
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
msgstr "Inicialização do pino de Clock falhou."
@ -642,27 +648,31 @@ msgstr "Não foi possível inicializar o SDCard"
msgid "Could not initialize UART"
msgstr "Não foi possível inicializar o UART"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize channel"
msgstr "Não foi possível inicializar o canal"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not initialize timer"
msgstr "Não foi possível inicializar o temporizador"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init channel"
msgstr "Não foi possível reiniciar o canal"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not re-init timer"
msgstr "Não foi possível reiniciar o temporizador"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not restart PWM"
msgstr "Não foi possível reiniciar o PWM"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
msgstr "Não foi possível definir o endereço"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
msgstr "Não foi possível iniciar o PWM"
@ -759,9 +769,9 @@ msgstr "Canal EXTINT em uso"
msgid "Error in regex"
msgstr "Erro no regex"
#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c
#: shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
msgid "Expected a %q"
msgstr "Esperado um"
@ -771,10 +781,18 @@ msgstr "Esperado um"
msgid "Expected a Characteristic"
msgstr "Uma característica é necessária"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
msgstr "Espera-se um DigitalInOut"
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
msgstr "Esperava um Serviço"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
msgstr "Espera-se uma UART"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
msgid "Expected a UUID"
@ -844,12 +862,17 @@ msgstr "Falha ao gravar o flash interno."
msgid "File exists"
msgstr "Arquivo já existe"
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
msgstr "O Framebuffer requer %d bytes"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
"A frequência capturada está acima da capacidade. A captura está em pausa."
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Frequency must match existing PWMOut using this timer"
msgstr ""
"A frequência deve coincidir com o PWMOut existente usando este temporizador"
@ -870,7 +893,7 @@ msgid "Group full"
msgstr "Grupo cheio"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Hardware busy, try alternative pins"
msgstr "O hardware está ocupado, tente os pinos alternativos"
@ -937,6 +960,11 @@ msgstr "%q Inválido"
msgid "Invalid %q pin"
msgstr "Pino do %q inválido"
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c
msgid "Invalid %q pin selection"
msgstr "Seleção inválida dos pinos %q"
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Invalid ADC Unit value"
msgstr "Valor inválido da unidade ADC"
@ -949,24 +977,12 @@ msgstr "Arquivo BMP inválido"
msgid "Invalid DAC pin supplied"
msgstr "O pino DAC informado é inválido"
#: ports/stm/common-hal/busio/I2C.c
msgid "Invalid I2C pin selection"
msgstr "A seleção dos pinos I2C é inválido"
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Frequência PWM inválida"
#: ports/stm/common-hal/busio/SPI.c
msgid "Invalid SPI pin selection"
msgstr "A seleção do pino SPI é inválido"
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid UART pin selection"
msgstr "A seleção dos pinos UART é inválido"
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument"
msgstr "Argumento inválido"
@ -1003,7 +1019,7 @@ msgstr "Arquivo inválido"
msgid "Invalid format chunk size"
msgstr "Tamanho do pedaço de formato inválido"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
msgstr "A frequência informada é inválida"
@ -1021,8 +1037,8 @@ msgid "Invalid phase"
msgstr "Fase Inválida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pino inválido"
@ -1046,7 +1062,7 @@ msgstr "Pino inválido para canal direito"
msgid "Invalid pins"
msgstr "Pinos inválidos"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid pins for PWMOut"
msgstr "Os pinos para o PWMOut são inválidos"
@ -1228,10 +1244,14 @@ msgstr "Nenhuma chave foi definida"
msgid "No long integer support"
msgstr "Não há compatibilidade com inteiro longo"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
msgstr "Não há mais temporizadores disponíveis neste pino."
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
msgstr "Não há rede com este ssid"
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr "Não há pulldown no pino; É recomendável utilizar um resistor de 1M ohm"
@ -1252,6 +1272,10 @@ msgstr "Não há um temporizador disponível"
msgid "Nordic Soft Device failure assertion."
msgstr "Declaração de falha do dispositivo Nordic Soft."
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
msgstr "Não é uma sequência válida de IP"
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
msgid "Not connected"
@ -1262,6 +1286,14 @@ msgstr "Não Conectado"
msgid "Not playing"
msgstr "Não está jogando"
#: main.c
msgid "Not running saved code.\n"
msgstr "O código salvo não está em execução.\n"
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
msgstr "Não configurável"
#: shared-bindings/util.c
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
@ -1293,18 +1325,22 @@ msgstr ""
"São compatíveis apenas os BMPs monocromáticos, indexados em 4bpp ou 8bpp e "
"16bpp ou superior: determinado %d bpp"
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
msgstr "Apenas o int bruto é compatível para o ip"
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
msgstr "A superamostragem deve ser um múltiplo de 8."
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr ""
"O duty_cycle do PWM deve estar entre 0 e inclusive 65535 (com resolução de "
"16 bits)"
#: shared-bindings/pulseio/PWMOut.c
#: shared-bindings/pwmio/PWMOut.c
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
@ -1359,9 +1395,16 @@ msgstr "Além de quaisquer módulos no sistema de arquivos\n"
msgid "Polygon needs at least 3 points"
msgstr "O Polígono precisa de pelo menos 3 pontos"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr "Buffer Ps2 vazio"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c
#: ports/stm/common-hal/pulseio/PulseOut.c
msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
"A porta não aceita pinos ou frequência. Em vez disso, construa e passe um "
"PWMOut Carrier"
#: shared-bindings/_bleio/Adapter.c
msgid "Prefix buffer must be on the heap"
@ -1438,12 +1481,8 @@ msgid "Row entry must be digitalio.DigitalInOut"
msgstr "A entrada da linha deve ser digitalio.DigitalInOut"
#: main.c
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Rodando em modo seguro! Atualização automática está desligada.\n"
#: main.c
msgid "Running in safe mode! Not running saved code.\n"
msgstr "Rodando em modo seguro! Não está executando o código salvo.\n"
msgid "Running in safe mode! "
msgstr "Executando no modo de segurança! "
#: shared-module/sdcardio/SDCard.c
msgid "SD card CSD format not supported"
@ -1454,6 +1493,16 @@ msgstr "O formato CSD do Cartão SD não é compatível"
msgid "SDA or SCL needs a pull up"
msgstr "SDA ou SCL precisa de um pull up"
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO GetCardInfo Error %d"
msgstr "Erro SDIO GetCardInfo %d"
#: ports/stm/common-hal/sdioio/SDCard.c
#, c-format
msgid "SDIO Init Error %d"
msgstr "Erro SDIO Init %d"
#: ports/stm/common-hal/busio/SPI.c
msgid "SPI Init Error"
msgstr "Houve um erro na inicialização SPI"
@ -1488,6 +1537,10 @@ msgstr "O pino RTS selecionado é inválido"
msgid "Serializer in use"
msgstr "Serializer em uso"
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
msgstr "O contexto do lado do servidor não pode ter nome de host"
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
msgstr "Fatie e avalie os diferentes comprimentos."
@ -1594,13 +1647,17 @@ msgstr ""
"O tempo limite é long demais: O comprimento máximo do tempo limite é de %d "
"segundos"
#: ports/stm/common-hal/pulseio/PWMOut.c
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid ""
"Timer was reserved for internal use - declare PWM pins earlier in the program"
msgstr ""
"O temporizador foi reservado para uso interno - declare os pinos PWM no "
"início do programa"
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
msgstr "Para sair, por favor, reinicie a placa sem "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
msgstr "Muitos canais na amostra."
@ -1697,6 +1754,10 @@ msgstr "Não é possível gravar no nvm."
msgid "Unexpected nrfx uuid type"
msgstr "Tipo uuid nrfx inesperado"
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
msgstr "Falha desconhecida"
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown gatt error: 0x%04x"
@ -1812,6 +1873,10 @@ msgstr ""
"\n"
"Para listar os módulos internos, faça `help(\"modules\")`.\n"
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
msgstr "A senha do Wi-Fi deve ter entre 8 e 63 caracteres"
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr "A escrita não é compatível na Característica"
@ -1829,9 +1894,8 @@ msgid "__init__() should return None"
msgstr "O __init__() deve retornar Nenhum"
#: py/objtype.c
#, c-format
msgid "__init__() should return None, not '%s'"
msgstr "O __init__() deve retornar Nenhum, não '%s'"
msgid "__init__() should return None, not '%q'"
msgstr "O __init__() deve retornar Nenhum, não '%q'"
#: py/objobject.c
msgid "__new__ arg must be a user-type"
@ -1876,7 +1940,7 @@ msgstr "argumento tem tipo errado"
#: extmod/ulab/code/linalg/linalg.c
msgid "argument must be ndarray"
msgstr "o argumento deve ser um ndarray"
msgstr "o argumento deve ser ndarray"
#: py/argcheck.c shared-bindings/_stage/__init__.c
#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c
@ -1927,7 +1991,7 @@ msgstr "especificador de conversão incorreto"
msgid "bad format string"
msgstr "formato da string incorreta"
#: py/binary.c
#: py/binary.c py/objarray.c
msgid "bad typecode"
msgstr "typecode incorreto"
@ -1980,11 +2044,15 @@ msgstr "a ordem dos bytes não é uma cadeia de caracteres"
msgid "bytes > 8 bits not supported"
msgstr "bytes > 8 bits não suportado"
#: py/objarray.c
msgid "bytes length not a multiple of item size"
msgstr "o comprimento dos bytes não é um múltiplo do tamanho do item"
#: py/objstr.c
msgid "bytes value out of range"
msgstr "o valor dos bytes estão fora do alcance"
#: ports/atmel-samd/bindings/samd/Clock.c
#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c
msgid "calibration is out of range"
msgstr "Calibração está fora do intervalo"
@ -2016,48 +2084,18 @@ msgstr "não é possível adicionar o método especial à classe já subclassifi
msgid "can't assign to expression"
msgstr "a expressão não pode ser atribuída"
#: py/obj.c
#, c-format
msgid "can't convert %s to complex"
msgstr "Não é possível converter %s para complex"
#: py/obj.c
#, c-format
msgid "can't convert %s to float"
msgstr "Não é possível converter %s para float"
#: py/obj.c
#, c-format
msgid "can't convert %s to int"
msgstr "Não é possível converter %s para int"
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr "não é possível converter %q para %q"
#: py/objstr.c
msgid "can't convert '%q' object to %q implicitly"
msgstr "não é possível converter implicitamente o objeto '%q' para %q"
#: py/objint.c
msgid "can't convert NaN to int"
msgstr "Não é possível converter NaN para int"
#: shared-bindings/i2cperipheral/I2CPeripheral.c
msgid "can't convert address to int"
msgstr "não é possível converter o endereço para int"
#: py/objint.c
msgid "can't convert inf to int"
msgstr "não é possível converter inf para int"
#: py/obj.c
msgid "can't convert to complex"
msgstr "não é possível converter para complex"
#: py/obj.c
msgid "can't convert to float"
msgstr "não é possível converter para float"
#: py/obj.c
msgid "can't convert to int"
msgstr "não é possível converter para int"
msgid "can't convert to %q"
msgstr "não é possível converter para %q"
#: py/objstr.c
msgid "can't convert to str implicitly"
@ -2474,7 +2512,7 @@ msgstr "falta apenas a palavra chave do argumento '%q' da função"
msgid "function missing required positional argument #%d"
msgstr "falta o argumento #%d da posição necessária da função"
#: py/argcheck.c py/bc.c py/objnamedtuple.c
#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c
#, c-format
msgid "function takes %d positional arguments but %d were given"
msgstr "função leva %d argumentos posicionais, mas apenas %d foram passadas"
@ -2523,10 +2561,7 @@ msgstr "preenchimento incorreto"
msgid "index is out of bounds"
msgstr "o índice está fora dos limites"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c
#: py/obj.c
msgid "index out of range"
msgstr "Índice fora do intervalo"
@ -2542,6 +2577,10 @@ msgstr "os índices devem ser números inteiros, fatias ou listas booleanas"
msgid "initial values must be iterable"
msgstr "os valores iniciais devem ser iteráveis"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
msgstr "O comprimento do initial_value está errado"
#: py/compile.c
msgid "inline assembler must be a function"
msgstr "o assembler em linha deve ser uma função"
@ -2737,6 +2776,10 @@ msgstr "a matriz não é definitiva positiva"
msgid "max_length must be 0-%d when fixed_length is %s"
msgstr "o max_length deve ser 0-%d quando Fixed_length for %s"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be > 0"
msgstr "max_length deve ser > 0"
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "a recursão máxima da profundidade foi excedida"
@ -2887,9 +2930,8 @@ msgid "number of points must be at least 2"
msgstr "a quantidade dos pontos deve ser pelo menos 2"
#: py/obj.c
#, c-format
msgid "object '%s' is not a tuple or list"
msgstr "o objeto '%s' não é uma tupla ou uma lista"
msgid "object '%q' is not a tuple or list"
msgstr "o objeto '%q' não é uma tupla ou uma lista"
#: py/obj.c
msgid "object does not support item assignment"
@ -2924,9 +2966,8 @@ msgid "object not iterable"
msgstr "objeto não iterável"
#: py/obj.c
#, c-format
msgid "object of type '%s' has no len()"
msgstr "O objeto do tipo '%s' não possui len()"
msgid "object of type '%q' has no len()"
msgstr "o objeto do tipo '%q' não tem len()"
#: py/obj.c
msgid "object with buffer protocol required"
@ -2978,12 +3019,25 @@ msgstr ""
"o ord() esperava um caractere, porém a sequência do comprimento %d foi "
"encontrada"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr "fora do alcance da fonte"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
msgstr "fora do alcance do alvo"
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
msgstr ""
"houve um transbordamento durante a conversão int longo para a palavra de "
"máquina"
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
msgstr "o pacote previa %d itens para a empacotamento (obteve %d)"
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
msgstr "a paleta deve ter 32 bytes de comprimento"
@ -3023,21 +3077,10 @@ msgstr "o polígono só pode ser registrado em um pai"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop a partir de um PulseIn vazio"
#: py/objset.c
msgid "pop from an empty set"
msgstr "pop a partir de um conjunto vazio"
#: py/objlist.c
msgid "pop from empty list"
msgstr "pop a partir da lista vazia"
#: py/objdict.c
msgid "popitem(): dictionary is empty"
msgstr "popitem(): o dicionário está vazio"
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
msgstr "pop a partir do %q vazio"
#: py/objint_mpz.c
msgid "pow() 3rd argument cannot be 0"
@ -3074,7 +3117,7 @@ msgstr "a anotação do retorno deve ser um identificador"
#: py/emitnative.c
msgid "return expected '%q' but got '%q'"
msgstr "o retorno esperado era '%q', porém obteve '% q'"
msgstr "o retorno esperado era '%q', porém obteve '%q'"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
@ -3170,6 +3213,10 @@ msgstr "sos[:, 3] deve ser um em todos"
msgid "sosfilt requires iterable arguments"
msgstr "o sosfilt requer que os argumentos sejam iteráveis"
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
msgstr "a paleta de origem é muito grande"
#: py/objstr.c
msgid "start/end indices"
msgstr "os índices de início/fim"
@ -3195,13 +3242,8 @@ msgid "stream operation not supported"
msgstr "a operação do fluxo não é compatível"
#: py/objstrunicode.c
msgid "string index out of range"
msgstr "o índice da string está fora do intervalo"
#: py/objstrunicode.c
#, c-format
msgid "string indices must be integers, not %s"
msgstr "o índices das string devem ser números inteiros, não %s"
msgid "string indices must be integers, not %q"
msgstr "a sequência dos índices devem ser inteiros, não %q"
#: py/stream.c
msgid "string not supported; use bytes or bytearray"
@ -3211,10 +3253,6 @@ msgstr "a string não é compatível; use bytes ou bytearray"
msgid "struct: cannot index"
msgstr "struct: não pode indexar"
#: extmod/moductypes.c
msgid "struct: index out of range"
msgstr "struct: índice fora do intervalo"
#: extmod/moductypes.c
msgid "struct: no fields"
msgstr "struct: sem campos"
@ -3284,7 +3322,7 @@ msgstr "valores demais para descompactar (esperado %d)"
msgid "trapz is defined for 1D arrays of equal length"
msgstr "o trapz está definido para 1D arrays de igual tamanho"
#: extmod/ulab/code/linalg/linalg.c py/objstr.c
#: extmod/ulab/code/linalg/linalg.c
msgid "tuple index out of range"
msgstr "o índice da tupla está fora do intervalo"
@ -3292,10 +3330,6 @@ msgstr "o índice da tupla está fora do intervalo"
msgid "tuple/list has wrong length"
msgstr "a tupla/lista está com tamanho incorreto"
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr "a tupla/lista necessária no RHS"
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"
@ -3351,9 +3385,8 @@ msgid "unknown conversion specifier %c"
msgstr "especificador de conversão desconhecido %c"
#: py/objstr.c
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgstr "código de formato desconhecido '%c' para o objeto do tipo '%s'"
msgid "unknown format code '%c' for object of type '%q'"
msgstr "o formato do código '%c' é desconhecido para o objeto do tipo '%q'"
#: py/compile.c
msgid "unknown type"
@ -3392,16 +3425,16 @@ msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr "o caractere do formato não é compatível '%c' (0x%x) no índice %d"
#: py/runtime.c
msgid "unsupported type for %q: '%s'"
msgstr "tipo não compatível para %q: '%s'"
msgid "unsupported type for %q: '%q'"
msgstr "tipo sem suporte para %q: '%q'"
#: py/runtime.c
msgid "unsupported type for operator"
msgstr "tipo não compatível para o operador"
#: py/runtime.c
msgid "unsupported types for %q: '%s', '%s'"
msgstr "tipos não compatíveis para %q: '%s', '%s'"
msgid "unsupported types for %q: '%q', '%q'"
msgstr "tipo sem suporte para %q: '%q', '%q'"
#: py/objint.c
#, c-format
@ -3480,6 +3513,142 @@ 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 ""
#~ "\n"
#~ "To exit, please reset the board without "
#~ msgstr ""
#~ "\n"
#~ "Para encerrar, redefina a placa sem "
#~ msgid "PulseOut not supported on this chip"
#~ msgstr "O PulseOut não é compatível neste CI"
#~ msgid ""
#~ "Port does not accept pins or "
#~ "frequency. Construct and pass a "
#~ "PWMOut Carrier instead"
#~ msgstr ""
#~ "A porta não aceita pinos ou "
#~ "frequência. Em vez disso, Construa e "
#~ "encaminhe um PWMOut Carrier"
#~ msgid "tuple/list required on RHS"
#~ msgstr "a tupla/lista necessária no RHS"
#~ msgid "%q indices must be integers, not %s"
#~ msgstr "Os índices %q devem ser inteiros, e não %s"
#~ msgid "'%s' object cannot assign attribute '%q'"
#~ msgstr "O objeto '%s' não pode definir o atributo '%q'"
#~ msgid "'%s' object does not support '%q'"
#~ msgstr "O objeto '%s' não é compatível com '%q'"
#~ msgid "'%s' object does not support item assignment"
#~ msgstr "O objeto '%s' não compatível com a atribuição dos itens"
#~ msgid "'%s' object does not support item deletion"
#~ msgstr "O objeto '%s' não é compatível com exclusão do item"
#~ msgid "'%s' object has no attribute '%q'"
#~ msgstr "O objeto '%s' não possui o atributo '%q'"
#~ msgid "'%s' object is not an iterator"
#~ msgstr "O objeto '%s' não é um iterador"
#~ msgid "'%s' object is not callable"
#~ msgstr "O objeto '%s' não é invocável"
#~ msgid "'%s' object is not iterable"
#~ msgstr "O objeto '%s' não é iterável"
#~ msgid "'%s' object is not subscriptable"
#~ msgstr "O objeto '%s' não é subroteirizável"
#~ msgid "Invalid I2C pin selection"
#~ msgstr "A seleção dos pinos I2C é inválido"
#~ msgid "Invalid SPI pin selection"
#~ msgstr "A seleção do pino SPI é inválido"
#~ msgid "Invalid UART pin selection"
#~ msgstr "A seleção dos pinos UART é inválido"
#~ msgid "Pop from an empty Ps2 buffer"
#~ msgstr "Buffer Ps2 vazio"
#~ msgid "Running in safe mode! Auto-reload is off.\n"
#~ msgstr "Rodando em modo seguro! Atualização automática está desligada.\n"
#~ msgid "Running in safe mode! Not running saved code.\n"
#~ msgstr "Rodando em modo seguro! Não está executando o código salvo.\n"
#~ msgid "__init__() should return None, not '%s'"
#~ msgstr "O __init__() deve retornar Nenhum, não '%s'"
#~ msgid "can't convert %s to complex"
#~ msgstr "Não é possível converter %s para complex"
#~ msgid "can't convert %s to float"
#~ msgstr "Não é possível converter %s para float"
#~ msgid "can't convert %s to int"
#~ msgstr "Não é possível converter %s para int"
#~ msgid "can't convert NaN to int"
#~ msgstr "Não é possível converter NaN para int"
#~ msgid "can't convert address to int"
#~ msgstr "não é possível converter o endereço para int"
#~ msgid "can't convert inf to int"
#~ msgstr "não é possível converter inf para int"
#~ msgid "can't convert to complex"
#~ msgstr "não é possível converter para complex"
#~ msgid "can't convert to float"
#~ msgstr "não é possível converter para float"
#~ msgid "can't convert to int"
#~ msgstr "não é possível converter para int"
#~ msgid "object '%s' is not a tuple or list"
#~ msgstr "o objeto '%s' não é uma tupla ou uma lista"
#~ msgid "object of type '%s' has no len()"
#~ msgstr "O objeto do tipo '%s' não possui len()"
#~ msgid "pop from an empty PulseIn"
#~ msgstr "pop a partir de um PulseIn vazio"
#~ msgid "pop from an empty set"
#~ msgstr "pop a partir de um conjunto vazio"
#~ msgid "pop from empty list"
#~ msgstr "pop a partir da lista vazia"
#~ msgid "popitem(): dictionary is empty"
#~ msgstr "popitem(): o dicionário está vazio"
#~ msgid "string index out of range"
#~ msgstr "o índice da string está fora do intervalo"
#~ msgid "string indices must be integers, not %s"
#~ msgstr "o índices das string devem ser números inteiros, não %s"
#~ msgid "struct: index out of range"
#~ msgstr "struct: índice fora do intervalo"
#~ msgid "unknown format code '%c' for object of type '%s'"
#~ msgstr "código de formato desconhecido '%c' para o objeto do tipo '%s'"
#~ msgid "unsupported type for %q: '%s'"
#~ msgstr "tipo não compatível para %q: '%s'"
#~ msgid "unsupported types for %q: '%s', '%s'"
#~ msgstr "tipos não compatíveis para %q: '%s', '%s'"
#~ msgid "'%q' object is not bytes-like"
#~ msgstr "objetos '%q' não são bytes-like"
@ -3489,9 +3658,6 @@ msgstr "zi deve estar na forma (n_section, 2)"
#~ msgid "PulseIn not supported on this chip"
#~ msgstr "O PulseIn não é compatível neste CI"
#~ msgid "PulseOut not supported on this chip"
#~ msgstr "O PulseOut não é compatível neste CI"
#~ msgid "AP required"
#~ msgstr "AP requerido"
@ -3677,9 +3843,6 @@ msgstr "zi deve estar na forma (n_section, 2)"
#~ msgid "STA required"
#~ msgstr "STA requerido"
#~ msgid "To exit, please reset the board without "
#~ msgstr "Para sair, por favor, reinicie a placa sem "
#~ msgid "UART(%d) does not exist"
#~ msgstr "UART(%d) não existe"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

37
main.c
View File

@ -105,6 +105,12 @@ void do_str(const char *src, mp_parse_input_kind_t input_kind) {
static size_t PLACE_IN_DTCM_BSS(_pystack[CIRCUITPY_PYSTACK_SIZE / sizeof(size_t)]);
#endif
static void reset_devices(void) {
#if CIRCUITPY_BLEIO_HCI
bleio_reset();
#endif
}
void start_mp(supervisor_allocation* heap) {
reset_status_led();
autoreload_stop();
@ -181,7 +187,7 @@ void stop_mp(void) {
// Look for the first file that exists in the list of filenames, using mp_import_stat().
// Return its index. If no file found, return -1.
const char* first_existing_file_in_list(const char ** filenames) {
const char* first_existing_file_in_list(const char * const * filenames) {
for (int i = 0; filenames[i] != (char*)""; i++) {
mp_import_stat_t stat = mp_import_stat(filenames[i]);
if (stat == MP_IMPORT_STAT_FILE) {
@ -191,7 +197,7 @@ const char* first_existing_file_in_list(const char ** filenames) {
return NULL;
}
bool maybe_run_list(const char ** filenames, pyexec_result_t* exec_result) {
bool maybe_run_list(const char * const * filenames, pyexec_result_t* exec_result) {
const char* filename = first_existing_file_in_list(filenames);
if (filename == NULL) {
return false;
@ -206,6 +212,8 @@ bool maybe_run_list(const char ** filenames, pyexec_result_t* exec_result) {
}
void cleanup_after_vm(supervisor_allocation* heap) {
// Reset port-independent devices, like CIRCUITPY_BLEIO_HCI.
reset_devices();
// Turn off the display and flush the fileystem before the heap disappears.
#if CIRCUITPY_DISPLAYIO
reset_displays();
@ -234,7 +242,8 @@ bool run_code_py(safe_mode_t safe_mode) {
if (autoreload_is_enabled()) {
serial_write_compressed(translate("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n"));
} else if (safe_mode != NO_SAFE_MODE) {
serial_write_compressed(translate("Running in safe mode! Auto-reload is off.\n"));
serial_write_compressed(translate("Running in safe mode! "));
serial_write_compressed(translate("Auto-reload is off.\n"));
} else if (!autoreload_is_enabled()) {
serial_write_compressed(translate("Auto-reload is off.\n"));
}
@ -250,25 +259,30 @@ bool run_code_py(safe_mode_t safe_mode) {
bool found_main = false;
if (safe_mode != NO_SAFE_MODE) {
serial_write_compressed(translate("Running in safe mode! Not running saved code.\n"));
serial_write_compressed(translate("Running in safe mode! "));
serial_write_compressed(translate("Not running saved code.\n"));
} else {
new_status_color(MAIN_RUNNING);
static const char *supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt");
static const char *double_extension_filenames[] = STRING_LIST("code.txt.py", "code.py.txt", "code.txt.txt","code.py.py",
static const char * const supported_filenames[] = STRING_LIST("code.txt", "code.py", "main.py", "main.txt");
#if CIRCUITPY_FULL_BUILD
static const char * const double_extension_filenames[] = STRING_LIST("code.txt.py", "code.py.txt", "code.txt.txt","code.py.py",
"main.txt.py", "main.py.txt", "main.txt.txt","main.py.py");
#endif
stack_resize();
filesystem_flush();
supervisor_allocation* heap = allocate_remaining_memory();
start_mp(heap);
found_main = maybe_run_list(supported_filenames, &result);
#if CIRCUITPY_FULL_BUILD
if (!found_main){
found_main = maybe_run_list(double_extension_filenames, &result);
if (found_main) {
serial_write_compressed(translate("WARNING: Your code filename has two extensions\n"));
}
}
#endif
cleanup_after_vm(heap);
if (result.return_code & PYEXEC_FORCED_EXIT) {
@ -276,7 +290,7 @@ bool run_code_py(safe_mode_t safe_mode) {
}
}
// Wait for connection or character.
// Display a different completion message if the user has no USB attached (cannot save files)
if (!serial_connected_at_start) {
serial_write_compressed(translate("\nCode done running. Waiting for reload.\n"));
}
@ -337,7 +351,7 @@ void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
// If not in safe mode, run boot before initing USB and capture output in a
// file.
if (filesystem_present() && safe_mode == NO_SAFE_MODE && MP_STATE_VM(vfs_mount_table) != NULL) {
static const char *boot_py_filenames[] = STRING_LIST("settings.txt", "settings.py", "boot.py", "boot.txt");
static const char * const boot_py_filenames[] = STRING_LIST("settings.txt", "settings.py", "boot.py", "boot.txt");
new_status_color(BOOT_RUNNING);
@ -430,11 +444,12 @@ int run_repl(void) {
}
int __attribute__((used)) main(void) {
memory_init();
// initialise the cpu and peripherals
safe_mode_t safe_mode = port_init();
// Init memory after the port in case the port needs to set aside memory.
memory_init();
// Turn on LEDs
init_status_leds();
rgb_led_status_init();
@ -459,6 +474,8 @@ int __attribute__((used)) main(void) {
// Reset everything and prep MicroPython to run boot.py.
reset_port();
// Port-independent devices, like CIRCUITPY_BLEIO_HCI.
reset_devices();
reset_board();
// Turn on autoreload by default but before boot.py in case it wants to change it.

View File

@ -6,7 +6,6 @@ PROG=mpy-cross.static-raspbian
BUILD=build-static-raspbian
STATIC_BUILD=1
$(shell if ! [ -d pitools ]; then echo 1>&2 "Fetching pi build tools. This may take awhile."; git clone -q https://github.com/raspberrypi/tools.git --depth=1 pitools; fi)
CROSS_COMPILE = pitools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-
include mpy-cross.mk
$(shell [ -d pitools ] || git clone --progress --verbose https://github.com/raspberrypi/tools.git --depth=1 pitools)

View File

@ -82,4 +82,6 @@ endif
OBJ = $(PY_O)
OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
$(BUILD)/supervisor/shared/translate.o: $(HEADER_BUILD)/qstrdefs.generated.h
include $(TOP)/py/mkrules.mk

View File

@ -103,16 +103,16 @@ ifeq ($(CHIP_FAMILY), same54)
PERIPHERALS_CHIP_FAMILY=sam_d5x_e5x
OPTIMIZATION_FLAGS ?= -O2
# TinyUSB defines
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAMD51 -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAME5X -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024
endif
# option to override default optimization level, set in boards/$(BOARD)/mpconfigboard.mk
CFLAGS += $(OPTIMIZATION_FLAGS) -DNDEBUG
CFLAGS += $(OPTIMIZATION_FLAGS)
$(echo PERIPHERALS_CHIP_FAMILY=$(PERIPHERALS_CHIP_FAMILY))
#Debugging/Optimization
ifeq ($(DEBUG), 1)
CFLAGS += -ggdb
CFLAGS += -ggdb3 -Og
# You may want to disable -flto if it interferes with debugging.
CFLAGS += -flto -flto-partition=none
# You may want to enable these flags to make setting breakpoints easier.
@ -121,6 +121,7 @@ ifeq ($(DEBUG), 1)
CFLAGS += -DENABLE_MICRO_TRACE_BUFFER
endif
else
CFLAGS += -DNDEBUG
# -finline-limit can shrink the image size.
# -finline-limit=80 or so is similar to not having it on.
# There is no simple default value, though.
@ -254,12 +255,14 @@ SRC_ASF += \
hal/src/hal_mci_sync.c \
hpl/sdhc/hpl_sdhc.c \
$(BUILD)/asf4/$(CHIP_FAMILY)/hpl/sdhc/hpl_sdhc.o: CFLAGS += -Wno-cast-align
$(BUILD)/asf4/$(CHIP_FAMILY)/hpl/sdhc/hpl_sdhc.o: CFLAGS += -Wno-cast-align -Wno-implicit-fallthrough
endif
$(BUILD)/asf4/$(CHIP_FAMILY)/hpl/sercom/hpl_sercom.o: CFLAGS += -Wno-maybe-uninitialized
SRC_ASF := $(addprefix asf4/$(CHIP_FAMILY)/, $(SRC_ASF))
SRC_C = \
SRC_C += \
audio_dma.c \
background.c \
bindings/samd/Clock.c \
@ -361,7 +364,7 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o))
SRC_QSTR += $(HEADER_BUILD)/sdiodata.h
$(HEADER_BUILD)/sdiodata.h: $(TOP)/tools/mksdiodata.py | $(HEADER_BUILD)
$(HEADER_BUILD)/sdiodata.h: tools/mksdiodata.py | $(HEADER_BUILD)
$(Q)$(PYTHON3) $< > $@
SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)

View File

@ -15,5 +15,5 @@ CIRCUITPY_BITBANGIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_VECTORIO = 0
CFLAGS_INLINE_LIMIT = 60
CFLAGS_INLINE_LIMIT = 50
SUPEROPT_GC = 0

View File

@ -39,5 +39,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -16,3 +16,20 @@ CIRCUITPY_COUNTIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_VECTORIO = 0
SUPEROPT_GC = 0
CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), ja)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif

View File

@ -25,7 +25,7 @@
#define CALIBRATE_CRYSTALLESS 1
// Explanation of how a user got into safe mode.
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up.\n"
// Increase stack size slightly due to CPX library import nesting
#define CIRCUITPY_DEFAULT_STACK_SIZE (4248) //divisible by 8

View File

@ -27,7 +27,7 @@
#define USER_NEOPIXELS_PIN (&pin_PB23)
// Explanation of how a user got into safe mode.
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up.\n"
// Increase stack size slightly due to CPX library import nesting
#define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8

View File

@ -25,7 +25,7 @@
#define CALIBRATE_CRYSTALLESS 1
// Explanation of how a user got into safe mode.
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up.\n"
// Increase stack size slightly due to CPX library import nesting.
#define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8

View File

@ -13,9 +13,11 @@ EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C"
# Turn off features and optimizations for Crickit build to make room for additional frozen libs.
LONGINT_IMPL = NONE
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_PIXELBUF = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
# So not all of displayio, sorry!
CIRCUITPY_VECTORIO = 0
@ -29,3 +31,18 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor
CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), ja)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 15
endif
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif

View File

@ -11,7 +11,7 @@
#define CALIBRATE_CRYSTALLESS 1
// Explanation of how a user got into safe mode.
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up.\n"
#define DEFAULT_I2C_BUS_SCL (&pin_PA08)
#define DEFAULT_I2C_BUS_SDA (&pin_PA09)

View File

@ -13,8 +13,24 @@ LONGINT_IMPL = MPZ
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_VECTORIO = 0
CFLAGS_INLINE_LIMIT = 60
SUPEROPT_GC = 0
CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), ja)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif

View File

@ -10,4 +10,21 @@ INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
CIRCUITPY_FULL_BUILD = 0
# A number of modules are removed for RFM69 to make room for frozen libraries.
# Many I/O functions are not available.
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_PULSEIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 1
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_SAMD = 0
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_USB_HID = 0
CIRCUITPY_TOUCHIO = 0
CFLAGS_INLINE_LIMIT = 35
# Make more room.
SUPEROPT_GC = 0
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM69

View File

@ -10,4 +10,22 @@ INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
CIRCUITPY_FULL_BUILD = 0
# A number of modules are removed for RFM9x to make room for frozen libraries.
# Many I/O functions are not available.
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_PULSEIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 1
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_SAMD = 0
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_USB_HID = 0
CIRCUITPY_TOUCHIO = 0
CFLAGS_INLINE_LIMIT = 35
# Make more room.
SUPEROPT_GC = 0
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM9x

View File

@ -13,9 +13,25 @@ LONGINT_IMPL = MPZ
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
# supersized, not ultra-supersized
CIRCUITPY_VECTORIO = 0
CFLAGS_INLINE_LIMIT = 60
SUPEROPT_GC = 0
CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), ja)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif

View File

@ -16,8 +16,6 @@
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
#define EXTERNAL_FLASH_QSPI_DUAL
#define BOARD_HAS_CRYSTAL 1
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)

View File

@ -15,6 +15,25 @@ LONGINT_IMPL = MPZ
CIRCUITPY_AUDIOBUSIO = 0
# No DAC on SAMR21G
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
# Too much flash for Korean translations
CIRCUITPY_VECTORIO = 0
SUPEROPT_GC = 0
CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), ja)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif

View File

@ -9,11 +9,12 @@ CHIP_FAMILY = samd21
SPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 2
EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C"
LONGINT_IMPL = MPZ
LONGINT_IMPL = NONE
# To keep the build small
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_GAMEPAD = 0
CIRCUITPY_I2CPERIPHERAL = 0
@ -29,3 +30,18 @@ SUPEROPT_GC = 0
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), ja)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif

View File

@ -13,7 +13,10 @@ LONGINT_IMPL = MPZ
CIRCUITPY_BITBANG_APA102 = 1
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_GAMEPAD = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_RTC = 0
@ -22,3 +25,18 @@ CIRCUITPY_VECTORIO = 0
CFLAGS_INLINE_LIMIT = 60
SUPEROPT_GC = 0
CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), ja)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif

View File

@ -0,0 +1,39 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "boards/board.h"
#include "mpconfigboard.h"
#include "hal/include/hal_gpio.h"
void board_init(void) {
}
bool board_requests_safe_mode(void) {
return false;
}
void reset_board(void) {
}

View File

@ -0,0 +1,30 @@
#define MICROPY_HW_BOARD_NAME "Adafruit Matrix Portal M4"
#define MICROPY_HW_MCU_NAME "samd51j19"
#define CIRCUITPY_MCU_FAMILY samd51
#define MICROPY_HW_LED_STATUS (&pin_PA14)
#define MICROPY_HW_NEOPIXEL (&pin_PA23)
// These are pins not to reset.
// QSPI Data pins, PA23 is NeoPixel
#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 | PA23)
// QSPI CS, QSPI SCK
#define MICROPY_PORT_B (PORT_PB10 | PORT_PB11)
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
#define DEFAULT_SPI_BUS_SCK (&pin_PA16)
#define DEFAULT_SPI_BUS_MOSI (&pin_PA19)
#define DEFAULT_SPI_BUS_MISO (&pin_PA17)
#define DEFAULT_UART_BUS_RX (&pin_PA01)
#define DEFAULT_UART_BUS_TX (&pin_PA00)
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1

View File

@ -0,0 +1,12 @@
USB_VID = 0x239A
USB_PID = 0x80CA
USB_PRODUCT = "Matrix Portal M4"
USB_MANUFACTURER = "Adafruit Industries LLC"
CHIP_VARIANT = SAMD51J19A
CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 3
EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"
LONGINT_IMPL = MPZ

View File

@ -0,0 +1,61 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA06) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA07) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_TX),MP_ROM_PTR(&pin_PA00) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_RX),MP_ROM_PTR(&pin_PA01) },
// ESP control
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_CS), MP_ROM_PTR(&pin_PB17) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_GPIO0), MP_ROM_PTR(&pin_PA20) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PA22) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_PA21) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RTS), MP_ROM_PTR(&pin_PA18) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_PA12) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_PA13) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_PB30) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_PB31) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL),MP_ROM_PTR(&pin_PA23) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCK),MP_ROM_PTR(&pin_PA16) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_PA19) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_PA17) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_R1),MP_ROM_PTR(&pin_PB00) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_G1),MP_ROM_PTR(&pin_PB01) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_B1),MP_ROM_PTR(&pin_PB02) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_R2),MP_ROM_PTR(&pin_PB03) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_G2),MP_ROM_PTR(&pin_PB04) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_B2),MP_ROM_PTR(&pin_PB05) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRA),MP_ROM_PTR(&pin_PB07) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRB),MP_ROM_PTR(&pin_PB08) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRC),MP_ROM_PTR(&pin_PB09) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRD),MP_ROM_PTR(&pin_PB15) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRE),MP_ROM_PTR(&pin_PB13) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_CLK),MP_ROM_PTR(&pin_PB06) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_LAT),MP_ROM_PTR(&pin_PB14) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_MTX_OE),MP_ROM_PTR(&pin_PB12) },
{ MP_ROM_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), MP_ROM_PTR(&pin_PA27) },
// Grounded when closed.
{ MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_UP),MP_ROM_PTR(&pin_PB22) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_DOWN),MP_ROM_PTR(&pin_PB23) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_L),MP_ROM_PTR(&pin_PA14) },
{ 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);

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