Merge pull request #1 from adafruit/main

Merge from original repo
This commit is contained in:
ZodiusInfuser 2021-03-16 11:09:06 +00:00 committed by GitHub
commit 361cb1ca11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2041 changed files with 45993 additions and 27838 deletions

56
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,56 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''
---
<!-- Thanks! for testing out CircuitPython. Now that you have got a problem...
you can file a bug report for it. Feel free to modify the below format to better
suit your issue. :) -->
**Firmware**
<!-- Include the version of CircuitPython you're running. You can see it in the
`boot_out.txt` file, as well as in the REPL. -->
```python
Adafruit CircuitPython 6.2.0-beta.2 on 2021-03-01; Raspberry Pi Pico with rp2040
```
**Code/REPL**
<!-- Include your code that reproduces the bug here. Try to distill down to the
minimum possible to reproduce. -->
```python
import busio, bitbangio
i2c = bitbangio.I2C(board.GP1, board.GP0)
```
**Behavior**
<!-- What happens when you run the code above? Include any error messages. -->
```python
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TimeoutError: Clock stretch too long
```
**Description**
<!-- Optionally, describe the issue in more detail. Here are some examples: -->
- Error while using i2c...
- Only happens when...
- might be related to #4291...
**Additional Info**
<!-- Optionally, add any other information like hardware connection, scope output etc.
If you have already done some debugging, mention it here. -->
Removing [this](url) line resolves the issue.

7
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,7 @@
contact_links:
- name: Adafruit Forum
url: https://forums.adafruit.com/
about: Official Adafruit technical support forum. Good for getting help on getting a project working.
- name: Adafruit Discord
url: https://adafru.it/discord
about: Unofficial chat with many helpful folks and normally prompt replies.

View File

@ -0,0 +1,11 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''
---
<!-- We are always adding new features and enhancements to CircuitPython 🚀
and would love ❤ to see what new challenge you have got for us... 🙂 -->

View File

@ -43,8 +43,6 @@ jobs:
run: | run: |
gcc --version gcc --version
python3 --version python3 --version
- name: Translations
run: make check-translate
- name: New boards check - name: New boards check
run: python3 -u ci_new_boards_check.py run: python3 -u ci_new_boards_check.py
working-directory: tools working-directory: tools
@ -81,6 +79,7 @@ jobs:
working-directory: tests working-directory: tests
- name: Print failure info - name: Print failure info
run: | run: |
shopt -s nullglob;
for exp in *.exp; for exp in *.exp;
do testbase=$(basename $exp .exp); do testbase=$(basename $exp .exp);
echo -e "\nFAILURE $testbase"; echo -e "\nFAILURE $testbase";
@ -281,6 +280,9 @@ jobs:
- "pewpew10" - "pewpew10"
- "pewpew_m4" - "pewpew_m4"
- "picoplanet" - "picoplanet"
- "pimoroni_keybow2040"
- "pimoroni_picosystem"
- "pimoroni_tiny2040"
- "pirkey_m0" - "pirkey_m0"
- "pitaya_go" - "pitaya_go"
- "pyb_nano_v2" - "pyb_nano_v2"
@ -310,6 +312,7 @@ jobs:
- "simmel" - "simmel"
- "snekboard" - "snekboard"
- "sparkfun_lumidrive" - "sparkfun_lumidrive"
- "sparkfun_nrf52840_micromod"
- "sparkfun_nrf52840_mini" - "sparkfun_nrf52840_mini"
- "sparkfun_qwiic_micro_no_flash" - "sparkfun_qwiic_micro_no_flash"
- "sparkfun_qwiic_micro_with_flash" - "sparkfun_qwiic_micro_with_flash"
@ -446,6 +449,8 @@ jobs:
- "espressif_kaluga_1" - "espressif_kaluga_1"
- "espressif_saola_1_wroom" - "espressif_saola_1_wroom"
- "espressif_saola_1_wrover" - "espressif_saola_1_wrover"
- "franzininho_wifi_wroom"
- "franzininho_wifi_wrover"
- "lilygo_ttgo_t8_s2_st7789" - "lilygo_ttgo_t8_s2_st7789"
- "microdev_micro_s2" - "microdev_micro_s2"
- "muselab_nanoesp32_s2" - "muselab_nanoesp32_s2"
@ -453,6 +458,7 @@ jobs:
- "targett_module_clip_wrover" - "targett_module_clip_wrover"
- "unexpectedmaker_feathers2" - "unexpectedmaker_feathers2"
- "unexpectedmaker_feathers2_prerelease" - "unexpectedmaker_feathers2_prerelease"
- "unexpectedmaker_tinys2"
steps: steps:
- name: Set up Python 3.8 - name: Set up Python 3.8
@ -471,7 +477,7 @@ jobs:
id: idf-cache id: idf-cache
with: with:
path: ${{ github.workspace }}/.idf_tools path: ${{ github.workspace }}/.idf_tools
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210128 key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210304
- name: Clone IDF submodules - name: Clone IDF submodules
run: | run: |
(cd $IDF_PATH && git submodule update --init) (cd $IDF_PATH && git submodule update --init)

View File

@ -7,7 +7,6 @@ name: pre-commit
on: on:
pull_request: pull_request:
push: push:
branches: [main]
jobs: jobs:
pre-commit: pre-commit:
@ -16,10 +15,13 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions/setup-python@v1 - uses: actions/setup-python@v1
- name: Install deps - name: Install deps
run: sudo apt-get update && sudo apt-get install -y gettext run: |
sudo apt-add-repository -y -u ppa:pybricks/ppa
sudo apt-get install -y black gettext uncrustify
pip3 install polib
- name: Populate selected submodules - name: Populate selected submodules
run: git submodule update --init extmod/ulab run: git submodule update --init extmod/ulab
- name: set PY - name: Set PY
run: echo >>$GITHUB_ENV PY="$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" run: echo >>$GITHUB_ENV PY="$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
- uses: actions/cache@v2 - uses: actions/cache@v2
with: with:

View File

@ -11,3 +11,16 @@ repos:
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/esp32s2/esp-idf-config/.*|ports/esp32s2/boards/.*/sdkconfig)' exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/esp32s2/esp-idf-config/.*|ports/esp32s2/boards/.*/sdkconfig)'
- id: trailing-whitespace - id: trailing-whitespace
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)' exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'
- repo: local
hooks:
- id: translations
name: Translations
entry: sh -c "if ! make check-translate; then make translate; fi"
types: [c]
pass_filenames: false
language: system
- id: formatting
name: Formatting
entry: sh -c "git diff --staged --name-only | xargs python3 tools/codeformat.py"
types_or: [c, python]
language: system

View File

@ -113,10 +113,9 @@ Behavior
- ``code.py`` (or ``main.py``) is run after every reload until it - ``code.py`` (or ``main.py``) is run after every reload until it
finishes or is interrupted. After it is done running, the vm and finishes or is interrupted. After it is done running, the vm and
hardware is reinitialized. **This means you cannot read state from** hardware is reinitialized. **This means you cannot read state from**
``code.py`` **in the REPL anymore.** CircuitPython's goal for this ``code.py`` **in the REPL anymore, as the REPL is a fresh vm.** CircuitPython's goal for this
change includes reducing confusion about pins and memory being used. change includes reducing confusion about pins and memory being used.
- After ``code.py`` the REPL can be entered by pressing any key. It no - After the main code is finished the REPL can be entered by pressing any key.
longer shares state with ``code.py`` so it is a fresh vm.
- Autoreload state will be maintained across reload. - Autoreload state will be maintained across reload.
- Adds a safe mode that does not run user code after a hard crash or - Adds a safe mode that does not run user code after a hard crash or
brown out. The hope is that this will make it easier to fix code that brown out. The hope is that this will make it easier to fix code that
@ -126,8 +125,7 @@ Behavior
- RGB status LED indicating CircuitPython state, and errors through a sequence of colored flashes. - RGB status LED indicating CircuitPython state, and errors through a sequence of colored flashes.
- Re-runs ``code.py`` or other main file after file system writes over USB mass storage. (Disable with - Re-runs ``code.py`` or other main file after file system writes over USB mass storage. (Disable with
``supervisor.disable_autoreload()``) ``supervisor.disable_autoreload()``)
- Entering the REPL after the main code is finished requires a key press which enters the REPL and - Autoreload is disabled while the REPL is active.
disables autoreload.
- Main is one of these: ``code.txt``, ``code.py``, ``main.py``, - Main is one of these: ``code.txt``, ``code.py``, ``main.py``,
``main.txt`` ``main.txt``
- Boot is one of these: ``settings.txt``, ``settings.py``, ``boot.py``, - Boot is one of these: ``settings.txt``, ``settings.py``, ``boot.py``,

View File

@ -150,6 +150,7 @@ version = release = final_version
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
exclude_patterns = ["**/build*", exclude_patterns = ["**/build*",
".git", ".git",
".github",
".env", ".env",
".venv", ".venv",
".direnv", ".direnv",
@ -178,6 +179,7 @@ exclude_patterns = ["**/build*",
"ports/cxd56/spresense-exported-sdk", "ports/cxd56/spresense-exported-sdk",
"ports/esp32s2/certificates", "ports/esp32s2/certificates",
"ports/esp32s2/esp-idf", "ports/esp32s2/esp-idf",
"ports/esp32s2/.idf_tools",
"ports/esp32s2/peripherals", "ports/esp32s2/peripherals",
"ports/litex/hw", "ports/litex/hw",
"ports/minimal", "ports/minimal",

View File

@ -51,7 +51,7 @@
#define MSEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000) / (RESOLUTION)) #define MSEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000) / (RESOLUTION))
#define SEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000000) / (RESOLUTION)) #define SEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000000) / (RESOLUTION))
#define UNITS_TO_SEC(TIME, RESOLUTION) (((TIME) * (RESOLUTION)) / 1000000) #define UNITS_TO_SEC(TIME, RESOLUTION) (((TIME)*(RESOLUTION)) / 1000000)
// 0.625 msecs (625 usecs) // 0.625 msecs (625 usecs)
#define ADV_INTERVAL_UNIT_FLOAT_SECS (0.000625) #define ADV_INTERVAL_UNIT_FLOAT_SECS (0.000625)
// Microseconds is the base unit. The macros above know that. // Microseconds is the base unit. The macros above know that.
@ -63,7 +63,7 @@
// TODO make this settable from Python. // TODO make this settable from Python.
#define DEFAULT_TX_POWER 0 // 0 dBm #define DEFAULT_TX_POWER 0 // 0 dBm
#define MAX_ANONYMOUS_ADV_TIMEOUT_SECS (60*15) #define MAX_ANONYMOUS_ADV_TIMEOUT_SECS (60 * 15)
#define MAX_LIMITED_DISCOVERABLE_ADV_TIMEOUT_SECS (180) #define MAX_LIMITED_DISCOVERABLE_ADV_TIMEOUT_SECS (180)
#define BLE_MIN_CONN_INTERVAL MSEC_TO_UNITS(15, UNIT_0_625_MS) #define BLE_MIN_CONN_INTERVAL MSEC_TO_UNITS(15, UNIT_0_625_MS)
@ -289,7 +289,7 @@ STATIC void bleio_adapter_hci_init(bleio_adapter_obj_t *self) {
// Get version information. // Get version information.
if (hci_read_local_version(&self->hci_version, &self->hci_revision, &self->lmp_version, if (hci_read_local_version(&self->hci_version, &self->hci_revision, &self->lmp_version,
&self->manufacturer, &self->lmp_subversion) != HCI_OK) { &self->manufacturer, &self->lmp_subversion) != HCI_OK) {
mp_raise_bleio_BluetoothError(translate("Could not read HCI version")); mp_raise_bleio_BluetoothError(translate("Could not read HCI version"));
} }
// Get supported features. // Get supported features.
@ -414,11 +414,11 @@ bool common_hal_bleio_adapter_set_address(bleio_adapter_obj_t *self, bleio_addre
return hci_le_set_random_address(bufinfo.buf) == HCI_OK; 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) { mp_obj_str_t *common_hal_bleio_adapter_get_name(bleio_adapter_obj_t *self) {
return self->name; return self->name;
} }
void common_hal_bleio_adapter_set_name(bleio_adapter_obj_t *self, const char* 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)); self->name = mp_obj_new_str(name, strlen(name));
mp_buffer_info_t bufinfo; mp_buffer_info_t bufinfo;
mp_get_buffer_raise(self->name, &bufinfo, MP_BUFFER_READ); mp_get_buffer_raise(self->name, &bufinfo, MP_BUFFER_READ);
@ -459,7 +459,7 @@ void common_hal_bleio_adapter_set_name(bleio_adapter_obj_t *self, const char* na
// return 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) { 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 // TODO
mp_raise_NotImplementedError(NULL); mp_raise_NotImplementedError(NULL);
check_enabled(self); check_enabled(self);
@ -704,7 +704,7 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self,
uint8_t handle[1] = { 0 }; uint8_t handle[1] = { 0 };
uint16_t duration_10msec[1] = { timeout * 100 }; uint16_t duration_10msec[1] = { timeout * 100 };
uint8_t max_ext_adv_evts[1] = { 0 }; uint8_t max_ext_adv_evts[1] = { 0 };
hci_check_error( hci_check_error(
hci_le_set_extended_advertising_enable( hci_le_set_extended_advertising_enable(
BT_HCI_LE_ADV_ENABLE, BT_HCI_LE_ADV_ENABLE,
@ -789,11 +789,11 @@ void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool
} else { } else {
if (timeout > MAX_LIMITED_DISCOVERABLE_ADV_TIMEOUT_SECS) { if (timeout > MAX_LIMITED_DISCOVERABLE_ADV_TIMEOUT_SECS) {
mp_raise_bleio_BluetoothError(translate("Timeout is too long: Maximum timeout length is %d seconds"), mp_raise_bleio_BluetoothError(translate("Timeout is too long: Maximum timeout length is %d seconds"),
MAX_LIMITED_DISCOVERABLE_ADV_TIMEOUT_SECS); MAX_LIMITED_DISCOVERABLE_ADV_TIMEOUT_SECS);
} }
} }
const uint32_t result =_common_hal_bleio_adapter_start_advertising( const uint32_t result = _common_hal_bleio_adapter_start_advertising(
self, connectable, anonymous, timeout, interval, self, connectable, anonymous, timeout, interval,
advertising_data_bufinfo->buf, advertising_data_bufinfo->buf,
advertising_data_bufinfo->len, advertising_data_bufinfo->len,
@ -820,11 +820,11 @@ void common_hal_bleio_adapter_stop_advertising(bleio_adapter_obj_t *self) {
hci_check_error(result); hci_check_error(result);
} }
//TODO startup CircuitPython advertising again. // TODO startup CircuitPython advertising again.
} }
// Note that something stopped advertising, such as a connection happening. // Note that something stopped advertising, such as a connection happening.
//Don't ask the adapter to stop. // Don't ask the adapter to stop.
void bleio_adapter_advertising_was_stopped(bleio_adapter_obj_t *self) { void bleio_adapter_advertising_was_stopped(bleio_adapter_obj_t *self) {
self->now_advertising = false; self->now_advertising = false;
self->extended_advertising = false; self->extended_advertising = false;
@ -876,14 +876,14 @@ void common_hal_bleio_adapter_erase_bonding(bleio_adapter_obj_t *self) {
mp_raise_NotImplementedError(NULL); mp_raise_NotImplementedError(NULL);
check_enabled(self); check_enabled(self);
//FIX bonding_erase_storage(); // FIX bonding_erase_storage();
} }
uint16_t bleio_adapter_add_attribute(bleio_adapter_obj_t *adapter, mp_obj_t *attribute) { uint16_t bleio_adapter_add_attribute(bleio_adapter_obj_t *adapter, mp_obj_t *attribute) {
check_enabled(adapter); check_enabled(adapter);
// The handle is the index of this attribute in the attributes list. // The handle is the index of this attribute in the attributes list.
uint16_t handle = (uint16_t) adapter->attributes->len; uint16_t handle = (uint16_t)adapter->attributes->len;
mp_obj_list_append(adapter->attributes, attribute); mp_obj_list_append(adapter->attributes, attribute);
if (MP_OBJ_IS_TYPE(attribute, &bleio_service_type)) { if (MP_OBJ_IS_TYPE(attribute, &bleio_service_type)) {
@ -896,7 +896,7 @@ uint16_t bleio_adapter_add_attribute(bleio_adapter_obj_t *adapter, mp_obj_t *att
return handle; return handle;
} }
mp_obj_t* bleio_adapter_get_attribute(bleio_adapter_obj_t *adapter, uint16_t handle) { mp_obj_t *bleio_adapter_get_attribute(bleio_adapter_obj_t *adapter, uint16_t handle) {
check_enabled(adapter); check_enabled(adapter);
if (handle == 0 || handle >= adapter->attributes->len) { if (handle == 0 || handle >= adapter->attributes->len) {
@ -912,12 +912,12 @@ uint16_t bleio_adapter_max_attribute_handle(bleio_adapter_obj_t *adapter) {
} }
void bleio_adapter_gc_collect(bleio_adapter_obj_t* adapter) { 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 **)adapter, sizeof(bleio_adapter_obj_t) / sizeof(size_t));
gc_collect_root((void**)bleio_connections, sizeof(bleio_connections) / sizeof(size_t)); gc_collect_root((void **)bleio_connections, sizeof(bleio_connections) / sizeof(size_t));
} }
void bleio_adapter_reset(bleio_adapter_obj_t* adapter) { void bleio_adapter_reset(bleio_adapter_obj_t *adapter) {
if (!common_hal_bleio_adapter_get_enabled(adapter)) { if (!common_hal_bleio_adapter_get_enabled(adapter)) {
return; return;
@ -939,7 +939,7 @@ void bleio_adapter_reset(bleio_adapter_obj_t* adapter) {
} }
void bleio_adapter_background(bleio_adapter_obj_t* adapter) { void bleio_adapter_background(bleio_adapter_obj_t *adapter) {
if (!common_hal_bleio_adapter_get_enabled(adapter)) { if (!common_hal_bleio_adapter_get_enabled(adapter)) {
return; return;
} }

View File

@ -49,7 +49,7 @@ typedef struct _bleio_adapter_obj_t {
bleio_scanresults_obj_t *scan_results; bleio_scanresults_obj_t *scan_results;
mp_obj_t name; mp_obj_t name;
mp_obj_tuple_t *connection_objs; mp_obj_tuple_t *connection_objs;
busio_uart_obj_t* hci_uart; busio_uart_obj_t *hci_uart;
digitalio_digitalinout_obj_t *rts_digitalinout; digitalio_digitalinout_obj_t *rts_digitalinout;
digitalio_digitalinout_obj_t *cts_digitalinout; digitalio_digitalinout_obj_t *cts_digitalinout;
bool allocated; // True when in use. bool allocated; // True when in use.
@ -72,7 +72,7 @@ typedef struct _bleio_adapter_obj_t {
// Generic services characteristics. // Generic services characteristics.
bleio_characteristic_obj_t *device_name_characteristic; bleio_characteristic_obj_t *device_name_characteristic;
bleio_characteristic_obj_t *appearance_characteristic; bleio_characteristic_obj_t *appearance_characteristic;
bleio_characteristic_obj_t * service_changed_characteristic; bleio_characteristic_obj_t *service_changed_characteristic;
uint16_t max_acl_buffer_len; uint16_t max_acl_buffer_len;
uint16_t max_acl_num_buffers; uint16_t max_acl_num_buffers;
@ -90,10 +90,10 @@ typedef struct _bleio_adapter_obj_t {
uint16_t bleio_adapter_add_attribute(bleio_adapter_obj_t *adapter, mp_obj_t *attribute); 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); 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); 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); uint16_t bleio_adapter_max_attribute_handle(bleio_adapter_obj_t *adapter);
void bleio_adapter_background(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_gc_collect(bleio_adapter_obj_t *adapter);
void bleio_adapter_reset(bleio_adapter_obj_t* adapter); void bleio_adapter_reset(bleio_adapter_obj_t *adapter);
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ADAPTER_H #endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ADAPTER_H

View File

@ -78,16 +78,16 @@ bleio_service_obj_t *common_hal_bleio_characteristic_get_service(bleio_character
return self->service; return self->service;
} }
size_t common_hal_bleio_characteristic_get_value(bleio_characteristic_obj_t *self, uint8_t* buf, size_t len) { 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. // Do GATT operations only if this characteristic has been added to a registered service.
if (self->handle != BLE_GATT_HANDLE_INVALID) { if (self->handle != BLE_GATT_HANDLE_INVALID) {
//FIX uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection); // FIX uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection);
if (common_hal_bleio_service_get_is_remote(self->service)) { if (common_hal_bleio_service_get_is_remote(self->service)) {
//FIX read remote chars // FIX read remote chars
//uint8_t rsp[MAX(len, 512)]; // uint8_t rsp[MAX(len, 512)];
//FIX improve att_read_req to write into our requested buffer. // FIX improve att_read_req to write into our requested buffer.
// return att_read_req(conn_handle, self->handle, rsp); // return att_read_req(conn_handle, self->handle, rsp);
return 0; //FIX return 0; // FIX
} else { } else {
mp_buffer_info_t bufinfo; mp_buffer_info_t bufinfo;
if (!mp_get_buffer(self->value, &bufinfo, MP_BUFFER_READ)) { if (!mp_get_buffer(self->value, &bufinfo, MP_BUFFER_READ)) {
@ -113,13 +113,13 @@ void common_hal_bleio_characteristic_set_value(bleio_characteristic_obj_t *self,
// Do GATT operations only if this characteristic has been added to a registered service. // Do GATT operations only if this characteristic has been added to a registered service.
if (self->handle != BLE_GATT_HANDLE_INVALID) { if (self->handle != BLE_GATT_HANDLE_INVALID) {
if (common_hal_bleio_service_get_is_remote(self->service)) { if (common_hal_bleio_service_get_is_remote(self->service)) {
//FIX uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection); // FIX uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection);
if (self->props & CHAR_PROP_WRITE) { if (self->props & CHAR_PROP_WRITE) {
//FIX writing remote chars // FIX writing remote chars
//uint8_t rsp[sizeof(bt_att_error_rsp)]; // uint8_t rsp[sizeof(bt_att_error_rsp)];
//att_write_req(conn_handle, self->handle, bufinfo->buf, bufinfo->len, rsp); // att_write_req(conn_handle, self->handle, bufinfo->buf, bufinfo->len, rsp);
} else if (self->props & CHAR_PROP_WRITE_NO_RESPONSE) { } else if (self->props & CHAR_PROP_WRITE_NO_RESPONSE) {
//att_write_cmd(conn_handle, self->handle, bufinfo->buff, bufinfo->len); // att_write_cmd(conn_handle, self->handle, bufinfo->buff, bufinfo->len);
} else { } else {
mp_raise_bleio_BluetoothError(translate("Characteristic not writable")); mp_raise_bleio_BluetoothError(translate("Characteristic not writable"));
} }
@ -172,7 +172,7 @@ void common_hal_bleio_characteristic_add_descriptor(bleio_characteristic_obj_t *
self->service->end_handle = descriptor->handle; self->service->end_handle = descriptor->handle;
mp_obj_list_append(MP_OBJ_FROM_PTR(self->descriptor_list), mp_obj_list_append(MP_OBJ_FROM_PTR(self->descriptor_list),
MP_OBJ_FROM_PTR(descriptor)); MP_OBJ_FROM_PTR(descriptor));
} }
void common_hal_bleio_characteristic_set_cccd(bleio_characteristic_obj_t *self, bool notify, bool indicate) { void common_hal_bleio_characteristic_set_cccd(bleio_characteristic_obj_t *self, bool notify, bool indicate) {
@ -191,8 +191,8 @@ void common_hal_bleio_characteristic_set_cccd(bleio_characteristic_obj_t *self,
(notify ? CCCD_NOTIFY : 0) | (notify ? CCCD_NOTIFY : 0) |
(indicate ? CCCD_INDICATE : 0); (indicate ? CCCD_INDICATE : 0);
//FIX do remote // FIX do remote
(void) cccd_value; (void)cccd_value;
// uint8_t rsp[sizeof(bt_att_error_rsp)]; // uint8_t rsp[sizeof(bt_att_error_rsp)];
// if (att_write_req(conn_handle, self->cccd->handle, &cccd_value, sizeof(cccd_value)) == 0) { // if (att_write_req(conn_handle, self->cccd->handle, &cccd_value, sizeof(cccd_value)) == 0) {
// mp_raise_bleio_BluetoothError(translate("Could not write CCCD")); // mp_raise_bleio_BluetoothError(translate("Could not write CCCD"));

View File

@ -47,9 +47,9 @@ void bleio_characteristic_buffer_update(bleio_characteristic_buffer_obj_t *self,
// Assumes that timeout and buffer_size have been validated before call. // Assumes that timeout and buffer_size have been validated before call.
void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self, void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffer_obj_t *self,
bleio_characteristic_obj_t *characteristic, bleio_characteristic_obj_t *characteristic,
mp_float_t timeout, mp_float_t timeout,
size_t buffer_size) { size_t buffer_size) {
self->characteristic = characteristic; self->characteristic = characteristic;
self->timeout_ms = timeout * 1000; self->timeout_ms = timeout * 1000;
@ -64,10 +64,10 @@ uint32_t common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer
uint64_t start_ticks = supervisor_ticks_ms64(); uint64_t start_ticks = supervisor_ticks_ms64();
// Wait for all bytes received or timeout // Wait for all bytes received or timeout
while ( (ringbuf_num_filled(&self->ringbuf) < len) && (supervisor_ticks_ms64() - start_ticks < self->timeout_ms) ) { while ((ringbuf_num_filled(&self->ringbuf) < len) && (supervisor_ticks_ms64() - start_ticks < self->timeout_ms)) {
RUN_BACKGROUND_TASKS; RUN_BACKGROUND_TASKS;
// Allow user to break out of a timeout with a KeyboardInterrupt. // Allow user to break out of a timeout with a KeyboardInterrupt.
if ( mp_hal_is_interrupted() ) { if (mp_hal_is_interrupted()) {
return 0; return 0;
} }
} }
@ -97,8 +97,8 @@ void common_hal_bleio_characteristic_buffer_deinit(bleio_characteristic_buffer_o
bool common_hal_bleio_characteristic_buffer_connected(bleio_characteristic_buffer_obj_t *self) { bool common_hal_bleio_characteristic_buffer_connected(bleio_characteristic_buffer_obj_t *self) {
return self->characteristic != NULL && return self->characteristic != NULL &&
self->characteristic->service != NULL && self->characteristic->service != NULL &&
(!self->characteristic->service->is_remote || (!self->characteristic->service->is_remote ||
(self->characteristic->service->connection != MP_OBJ_NULL && (self->characteristic->service->connection != MP_OBJ_NULL &&
common_hal_bleio_connection_get_connected(self->characteristic->service->connection))); common_hal_bleio_connection_get_connected(self->characteristic->service->connection)));
} }

View File

@ -73,8 +73,8 @@
static volatile bool m_discovery_in_process; static volatile bool m_discovery_in_process;
static volatile bool m_discovery_successful; static volatile bool m_discovery_successful;
//FIX static bleio_service_obj_t *m_char_discovery_service; // FIX static bleio_service_obj_t *m_char_discovery_service;
//FIX static bleio_characteristic_obj_t *m_desc_discovery_characteristic; // FIX static bleio_characteristic_obj_t *m_desc_discovery_characteristic;
// bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) { // bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
// bleio_connection_internal_t *self = (bleio_connection_internal_t*)self_in; // bleio_connection_internal_t *self = (bleio_connection_internal_t*)self_in;
@ -326,7 +326,7 @@ void bleio_connection_clear(bleio_connection_internal_t *self) {
self->conn_handle = BLE_CONN_HANDLE_INVALID; self->conn_handle = BLE_CONN_HANDLE_INVALID;
self->pair_status = PAIR_NOT_PAIRED; self->pair_status = PAIR_NOT_PAIRED;
self->is_central = false; self->is_central = false;
//FIX bonding_clear_keys(&self->bonding_keys); // FIX bonding_clear_keys(&self->bonding_keys);
} }
bool common_hal_bleio_connection_get_paired(bleio_connection_obj_t *self) { bool common_hal_bleio_connection_get_paired(bleio_connection_obj_t *self) {
@ -350,7 +350,7 @@ void common_hal_bleio_connection_disconnect(bleio_connection_internal_t *self) {
void common_hal_bleio_connection_pair(bleio_connection_internal_t *self, bool bond) { void common_hal_bleio_connection_pair(bleio_connection_internal_t *self, bool bond) {
self->pair_status = PAIR_WAITING; self->pair_status = PAIR_WAITING;
//FIX check_nrf_error(sd_ble_gap_authenticate(self->conn_handle, &pairing_sec_params)); // FIX check_nrf_error(sd_ble_gap_authenticate(self->conn_handle, &pairing_sec_params));
while (self->pair_status == PAIR_WAITING && !mp_hal_is_interrupted()) { while (self->pair_status == PAIR_WAITING && !mp_hal_is_interrupted()) {
RUN_BACKGROUND_TASKS; RUN_BACKGROUND_TASKS;
@ -358,14 +358,14 @@ void common_hal_bleio_connection_pair(bleio_connection_internal_t *self, bool bo
if (mp_hal_is_interrupted()) { if (mp_hal_is_interrupted()) {
return; return;
} }
//FIX check_sec_status(self->sec_status); // FIX check_sec_status(self->sec_status);
} }
mp_float_t common_hal_bleio_connection_get_connection_interval(bleio_connection_internal_t *self) { mp_float_t common_hal_bleio_connection_get_connection_interval(bleio_connection_internal_t *self) {
while (self->conn_params_updating && !mp_hal_is_interrupted()) { while (self->conn_params_updating && !mp_hal_is_interrupted()) {
RUN_BACKGROUND_TASKS; RUN_BACKGROUND_TASKS;
} }
//FIX return 1.25f * self->conn_params.min_conn_interval; // FIX return 1.25f * self->conn_params.min_conn_interval;
return 0.0f; return 0.0f;
} }
@ -729,14 +729,14 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
// } // }
mp_obj_tuple_t *common_hal_bleio_connection_discover_remote_services(bleio_connection_obj_t *self, mp_obj_t service_uuids_whitelist) { 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); // FIX discover_remote_services(self->connection, service_uuids_whitelist);
bleio_connection_ensure_connected(self); bleio_connection_ensure_connected(self);
// Convert to a tuple and then clear the list so the callee will take ownership. // Convert to a tuple and then clear the list so the callee will take ownership.
mp_obj_tuple_t *services_tuple = mp_obj_tuple_t *services_tuple =
mp_obj_new_tuple(self->connection->remote_service_list->len, mp_obj_new_tuple(self->connection->remote_service_list->len,
self->connection->remote_service_list->items); self->connection->remote_service_list->items);
mp_obj_list_clear(MP_OBJ_FROM_PTR(self->connection->remote_service_list)); mp_obj_list_clear(MP_OBJ_FROM_PTR(self->connection->remote_service_list));
return services_tuple; return services_tuple;
} }
uint16_t bleio_connection_get_conn_handle(bleio_connection_obj_t *self) { uint16_t bleio_connection_get_conn_handle(bleio_connection_obj_t *self) {
@ -746,7 +746,7 @@ uint16_t bleio_connection_get_conn_handle(bleio_connection_obj_t *self) {
return self->connection->conn_handle; return self->connection->conn_handle;
} }
mp_obj_t bleio_connection_new_from_internal(bleio_connection_internal_t* internal) { mp_obj_t bleio_connection_new_from_internal(bleio_connection_internal_t *internal) {
if (internal->connection_obj != mp_const_none) { if (internal->connection_obj != mp_const_none) {
return internal->connection_obj; return internal->connection_obj;
} }

View File

@ -60,7 +60,7 @@ typedef struct {
volatile pair_status_t pair_status; volatile pair_status_t pair_status;
uint8_t sec_status; // Internal security status. uint8_t sec_status; // Internal security status.
mp_obj_t connection_obj; mp_obj_t connection_obj;
//REMOVE ble_gap_conn_params_t conn_params; // REMOVE ble_gap_conn_params_t conn_params;
volatile bool conn_params_updating; volatile bool conn_params_updating;
uint16_t mtu; uint16_t mtu;
// Request that CCCD values for this connection be saved, using sys_attr values. // Request that CCCD values for this connection be saved, using sys_attr values.
@ -70,20 +70,20 @@ typedef struct {
// Time of setting do_bond_ccds: we delay a bit to consolidate multiple CCCD changes // Time of setting do_bond_ccds: we delay a bit to consolidate multiple CCCD changes
// into one write. Time is currently in ticks_ms. // into one write. Time is currently in ticks_ms.
uint64_t do_bond_cccds_request_time; uint64_t do_bond_cccds_request_time;
//FIX from att.c // FIX from att.c
uint8_t role; uint8_t role;
bt_addr_le_t addr; bt_addr_le_t addr;
} bleio_connection_internal_t; } bleio_connection_internal_t;
typedef struct { typedef struct {
mp_obj_base_t base; mp_obj_base_t base;
bleio_connection_internal_t* connection; bleio_connection_internal_t *connection;
// The HCI disconnect reason. // The HCI disconnect reason.
uint8_t disconnect_reason; uint8_t disconnect_reason;
} bleio_connection_obj_t; } bleio_connection_obj_t;
uint16_t bleio_connection_get_conn_handle(bleio_connection_obj_t *self); 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); 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); bleio_connection_internal_t *bleio_conn_handle_to_connection(uint16_t conn_handle);
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CONNECTION_H #endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CONNECTION_H

View File

@ -44,7 +44,7 @@ void common_hal_bleio_descriptor_construct(bleio_descriptor_obj_t *self, bleio_c
const mp_int_t max_length_max = fixed_length ? BLE_GATTS_FIX_ATTR_LEN_MAX : BLE_GATTS_VAR_ATTR_LEN_MAX; 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) { 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"), mp_raise_ValueError_varg(translate("max_length must be 0-%d when fixed_length is %s"),
max_length_max, fixed_length ? "True" : "False"); max_length_max, fixed_length ? "True" : "False");
} }
self->max_length = max_length; self->max_length = max_length;
self->fixed_length = fixed_length; self->fixed_length = fixed_length;
@ -60,14 +60,14 @@ bleio_characteristic_obj_t *common_hal_bleio_descriptor_get_characteristic(bleio
return self->characteristic; return self->characteristic;
} }
size_t common_hal_bleio_descriptor_get_value(bleio_descriptor_obj_t *self, uint8_t* buf, size_t len) { 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 // Do GATT operations only if this descriptor has been registered
if (self->handle != BLE_GATT_HANDLE_INVALID) { if (self->handle != BLE_GATT_HANDLE_INVALID) {
if (common_hal_bleio_service_get_is_remote(self->characteristic->service)) { if (common_hal_bleio_service_get_is_remote(self->characteristic->service)) {
//uint16_t conn_handle = bleio_connection_get_conn_handle(self->characteristic->service->connection); // uint16_t conn_handle = bleio_connection_get_conn_handle(self->characteristic->service->connection);
//FIX have att_read_req fill in a buffer // FIX have att_read_req fill in a buffer
//uint8_t rsp[MAX(len, 512)]; // uint8_t rsp[MAX(len, 512)];
//return att_read_req(conn_handle, self->handle, rsp, len); // return att_read_req(conn_handle, self->handle, rsp, len);
return 0; return 0;
} else { } else {
mp_buffer_info_t bufinfo; mp_buffer_info_t bufinfo;
@ -96,7 +96,7 @@ void common_hal_bleio_descriptor_set_value(bleio_descriptor_obj_t *self, mp_buff
// Do GATT operations only if this descriptor has been registered. // Do GATT operations only if this descriptor has been registered.
if (self->handle != BLE_GATT_HANDLE_INVALID) { if (self->handle != BLE_GATT_HANDLE_INVALID) {
if (common_hal_bleio_service_get_is_remote(self->characteristic->service)) { if (common_hal_bleio_service_get_is_remote(self->characteristic->service)) {
//FIX // FIX
// uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection); // uint16_t conn_handle = bleio_connection_get_conn_handle(self->service->connection);
// att_write_req(conn_handle, self->handle, bufinfo->buf, bufinfo->len, rsp); // att_write_req(conn_handle, self->handle, bufinfo->buf, bufinfo->len, rsp);
} else { } else {

View File

@ -47,7 +47,7 @@ typedef struct _bleio_descriptor_obj {
uint16_t handle; uint16_t handle;
bleio_attribute_security_mode_t read_perm; bleio_attribute_security_mode_t read_perm;
bleio_attribute_security_mode_t write_perm; bleio_attribute_security_mode_t write_perm;
struct _bleio_descriptor_obj* next; struct _bleio_descriptor_obj *next;
} bleio_descriptor_obj_t; } bleio_descriptor_obj_t;
#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_DESCRIPTOR_H #endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_DESCRIPTOR_H

View File

@ -45,13 +45,13 @@ STATIC void write_to_ringbuf(bleio_packet_buffer_obj_t *self, uint8_t *data, uin
// Make room for the new value by dropping the oldest packets first. // 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)) { while (ringbuf_capacity(&self->ringbuf) - ringbuf_num_filled(&self->ringbuf) < len + sizeof(uint16_t)) {
uint16_t packet_length; uint16_t packet_length;
ringbuf_get_n(&self->ringbuf, (uint8_t*) &packet_length, sizeof(uint16_t)); ringbuf_get_n(&self->ringbuf, (uint8_t *)&packet_length, sizeof(uint16_t));
for (uint16_t i = 0; i < packet_length; i++) { for (uint16_t i = 0; i < packet_length; i++) {
ringbuf_get(&self->ringbuf); ringbuf_get(&self->ringbuf);
} }
// set an overflow flag? // set an overflow flag?
} }
ringbuf_put_n(&self->ringbuf, (uint8_t*) &len, sizeof(uint16_t)); ringbuf_put_n(&self->ringbuf, (uint8_t *)&len, sizeof(uint16_t));
ringbuf_put_n(&self->ringbuf, data, len); ringbuf_put_n(&self->ringbuf, data, len);
} }
@ -80,8 +80,8 @@ void bleio_packet_buffer_update(bleio_packet_buffer_obj_t *self, mp_buffer_info_
} }
void common_hal_bleio_packet_buffer_construct( void common_hal_bleio_packet_buffer_construct(
bleio_packet_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic, bleio_packet_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic,
size_t buffer_size) { size_t buffer_size) {
self->characteristic = characteristic; self->characteristic = characteristic;
self->client = self->characteristic->service->is_remote; self->client = self->characteristic->service->is_remote;
@ -128,7 +128,7 @@ mp_int_t common_hal_bleio_packet_buffer_readinto(bleio_packet_buffer_obj_t *self
// Copy received data. // Copy received data.
// Get packet length, which is in first two bytes of packet. // Get packet length, which is in first two bytes of packet.
uint16_t packet_length; uint16_t packet_length;
ringbuf_get_n(&self->ringbuf, (uint8_t*) &packet_length, sizeof(uint16_t)); ringbuf_get_n(&self->ringbuf, (uint8_t *)&packet_length, sizeof(uint16_t));
mp_int_t ret; mp_int_t ret;
if (packet_length > len) { if (packet_length > len) {
@ -136,7 +136,7 @@ mp_int_t common_hal_bleio_packet_buffer_readinto(bleio_packet_buffer_obj_t *self
ret = len - packet_length; ret = len - packet_length;
// Discard the packet if it's too large. Don't fill data. // Discard the packet if it's too large. Don't fill data.
while (packet_length--) { while (packet_length--) {
(void) ringbuf_get(&self->ringbuf); (void)ringbuf_get(&self->ringbuf);
} }
} else { } else {
// Read as much as possible, but might be shorter than len. // Read as much as possible, but might be shorter than len.
@ -147,7 +147,7 @@ mp_int_t common_hal_bleio_packet_buffer_readinto(bleio_packet_buffer_obj_t *self
return ret; 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) { 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) { if (self->outgoing[0] == NULL) {
mp_raise_bleio_BluetoothError(translate("Writes not supported on Characteristic")); mp_raise_bleio_BluetoothError(translate("Writes not supported on Characteristic"));
} }
@ -174,7 +174,7 @@ mp_int_t common_hal_bleio_packet_buffer_write(bleio_packet_buffer_obj_t *self, u
size_t num_bytes_written = 0; size_t num_bytes_written = 0;
uint8_t* pending = self->outgoing[self->pending_index]; uint8_t *pending = self->outgoing[self->pending_index];
if (self->pending_size == 0) { if (self->pending_size == 0) {
memcpy(pending, header, header_len); memcpy(pending, header, header_len);
@ -213,7 +213,7 @@ mp_int_t common_hal_bleio_packet_buffer_get_incoming_packet_length(bleio_packet_
bleio_connection_internal_t *connection = bleio_conn_handle_to_connection(self->conn_handle); bleio_connection_internal_t *connection = bleio_conn_handle_to_connection(self->conn_handle);
if (connection) { if (connection) {
return MIN(common_hal_bleio_connection_get_max_packet_length(connection), return MIN(common_hal_bleio_connection_get_max_packet_length(connection),
self->characteristic->max_length); self->characteristic->max_length);
} }
} }
// There's no current connection, so we don't know the MTU, and // There's no current connection, so we don't know the MTU, and
@ -244,7 +244,7 @@ mp_int_t common_hal_bleio_packet_buffer_get_outgoing_packet_length(bleio_packet_
bleio_connection_internal_t *connection = bleio_conn_handle_to_connection(self->conn_handle); bleio_connection_internal_t *connection = bleio_conn_handle_to_connection(self->conn_handle);
if (connection) { if (connection) {
return MIN(common_hal_bleio_connection_get_max_packet_length(connection), return MIN(common_hal_bleio_connection_get_max_packet_length(connection),
self->characteristic->max_length); self->characteristic->max_length);
} }
} }
// There's no current connection, so we don't know the MTU, and // There's no current connection, so we don't know the MTU, and

View File

@ -37,7 +37,7 @@ typedef struct {
ringbuf_t ringbuf; ringbuf_t ringbuf;
// Two outgoing buffers to alternate between. One will be queued for transmission by the SD and // 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. // the other is waiting to be queued and can be extended.
uint8_t* outgoing[2]; uint8_t *outgoing[2];
volatile uint16_t pending_size; volatile uint16_t pending_size;
// We remember the conn_handle so we can do a NOTIFY/INDICATE to a client. // 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). // We can find out the conn_handle on a Characteristic write or a CCCD write (but not a read).

View File

@ -32,7 +32,7 @@
#include "shared-bindings/_bleio/Service.h" #include "shared-bindings/_bleio/Service.h"
#include "shared-bindings/_bleio/Adapter.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) { 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->uuid = uuid;
self->characteristic_list = characteristic_list; self->characteristic_list = characteristic_list;
self->is_remote = false; self->is_remote = false;
@ -52,7 +52,7 @@ uint32_t _common_hal_bleio_service_construct(bleio_service_obj_t *self, bleio_uu
void common_hal_bleio_service_construct(bleio_service_obj_t *self, bleio_uuid_obj_t *uuid, bool is_secondary) { 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, if (_common_hal_bleio_service_construct(self, uuid, is_secondary,
mp_obj_new_list(0, NULL)) != 0) { mp_obj_new_list(0, NULL)) != 0) {
mp_raise_RuntimeError(translate("Failed to add service")); mp_raise_RuntimeError(translate("Failed to add service"));
} }
} }
@ -83,8 +83,8 @@ bool common_hal_bleio_service_get_is_secondary(bleio_service_obj_t *self) {
} }
void common_hal_bleio_service_add_characteristic(bleio_service_obj_t *self, void common_hal_bleio_service_add_characteristic(bleio_service_obj_t *self,
bleio_characteristic_obj_t *characteristic, bleio_characteristic_obj_t *characteristic,
mp_buffer_info_t *initial_value_bufinfo) { mp_buffer_info_t *initial_value_bufinfo) {
if (self->handle != common_hal_bleio_adapter_obj.last_added_service_handle) { if (self->handle != common_hal_bleio_adapter_obj.last_added_service_handle) {
mp_raise_bleio_BluetoothError( mp_raise_bleio_BluetoothError(

View File

@ -46,7 +46,7 @@ typedef struct bleio_service_obj {
// Range of attribute handles of this service. // Range of attribute handles of this service.
uint16_t start_handle; uint16_t start_handle;
uint16_t end_handle; uint16_t end_handle;
struct bleio_service_obj* next; struct bleio_service_obj *next;
} bleio_service_obj_t; } bleio_service_obj_t;
void bleio_service_from_connection(bleio_service_obj_t *self, mp_obj_t connection); void bleio_service_from_connection(bleio_service_obj_t *self, mp_obj_t connection);

View File

@ -60,7 +60,7 @@ void common_hal_bleio_uuid_get_uuid128(bleio_uuid_obj_t *self, uint8_t uuid128[1
memcpy(uuid128, self->uuid128, 16); memcpy(uuid128, self->uuid128, 16);
} }
void common_hal_bleio_uuid_pack_into(bleio_uuid_obj_t *self, uint8_t* buf) { void common_hal_bleio_uuid_pack_into(bleio_uuid_obj_t *self, uint8_t *buf) {
if (self->size == 16) { if (self->size == 16) {
buf[0] = self->uuid16 & 0xff; buf[0] = self->uuid16 & 0xff;
buf[1] = self->uuid16 >> 8; buf[1] = self->uuid16 >> 8;

View File

@ -33,17 +33,17 @@
// Types returned by attribute table lookups. These are UUIDs. // Types returned by attribute table lookups. These are UUIDs.
typedef enum { typedef enum {
BLE_UUID_UNKNOWN = 0x0000, BLE_UUID_UNKNOWN = 0x0000,
BLE_UUID_SERVICE_PRIMARY = 0x2800, BLE_UUID_SERVICE_PRIMARY = 0x2800,
BLE_UUID_SERVICE_SECONDARY = 0x2801, BLE_UUID_SERVICE_SECONDARY = 0x2801,
BLE_UUID_SERVICE_INCLUDE = 0x2802, // not yet implemented by us BLE_UUID_SERVICE_INCLUDE = 0x2802,// not yet implemented by us
BLE_UUID_CHARACTERISTIC = 0x2803, BLE_UUID_CHARACTERISTIC = 0x2803,
BLE_UUID_CHAR_EXTENDED_PROPS = 0x2900, // not yet implemented by us BLE_UUID_CHAR_EXTENDED_PROPS = 0x2900,// not yet implemented by us
BLE_UUID_CHAR_USER_DESC = 0x2901, // not yet implemented by us BLE_UUID_CHAR_USER_DESC = 0x2901,// not yet implemented by us
BLE_UUID_CCCD = 0x2902, BLE_UUID_CCCD = 0x2902,
BLE_UUID_SCCD = 0x2903, // not yet implemented by us BLE_UUID_SCCD = 0x2903,// not yet implemented by us
BLE_UUID_CHAR_PRESENTATION_FMT = 0x2904, // 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_UUID_CHAR_AGGREGATE_FMT = 0x2905,// not yet implemented by us
} ble_standard_uuid; } ble_standard_uuid;
typedef struct { typedef struct {

View File

@ -78,7 +78,7 @@ void bleio_reset() {
bleio_set_adapter(mp_const_none); bleio_set_adapter(mp_const_none);
//FIX bonding_reset(); // FIX bonding_reset();
supervisor_start_bluetooth(); supervisor_start_bluetooth();
} }

View File

@ -47,7 +47,7 @@ typedef struct {
// 20 bytes max (23 - 3). // 20 bytes max (23 - 3).
#define GATT_MAX_DATA_LENGTH (BT_ATT_DEFAULT_LE_MTU - 3) #define GATT_MAX_DATA_LENGTH (BT_ATT_DEFAULT_LE_MTU - 3)
//FIX // FIX
#define BLE_GATT_HANDLE_INVALID 0x0000 #define BLE_GATT_HANDLE_INVALID 0x0000
#define BLE_CONN_HANDLE_INVALID 0xFFFF #define BLE_CONN_HANDLE_INVALID 0xFFFF
#define BLE_GATTS_FIX_ATTR_LEN_MAX (510) /**< Maximum length for fixed length Attribute Values. */ #define BLE_GATTS_FIX_ATTR_LEN_MAX (510) /**< Maximum length for fixed length Attribute Values. */

View File

@ -24,8 +24,8 @@
#include "att.h" #include "att.h"
// Zephyr include files to define HCI communication values and structs. // Zephyr include files to define HCI communication values and structs.
//#include "hci_include/hci.h" // #include "hci_include/hci.h"
//#include "hci_include/hci_err.h" // #include "hci_include/hci_err.h"
#include "hci_include/l2cap_internal.h" #include "hci_include/l2cap_internal.h"
#include "py/obj.h" #include "py/obj.h"
@ -44,7 +44,7 @@ STATIC unsigned long timeout = 5000;
STATIC volatile bool confirm; STATIC volatile bool confirm;
STATIC uint16_t long_write_handle = BLE_GATT_HANDLE_INVALID; STATIC uint16_t long_write_handle = BLE_GATT_HANDLE_INVALID;
STATIC uint8_t* long_write_value = NULL; STATIC uint8_t *long_write_value = NULL;
STATIC uint16_t long_write_value_length = 0; STATIC uint16_t long_write_value_length = 0;
// When we send a request, fill this struct with info about the expected response. // When we send a request, fill this struct with info about the expected response.
@ -52,7 +52,7 @@ STATIC uint16_t long_write_value_length = 0;
STATIC struct { STATIC struct {
uint16_t conn_handle; // Expected handle. uint16_t conn_handle; // Expected handle.
uint8_t opcode; // Expected RSP opcode. uint8_t opcode; // Expected RSP opcode.
uint8_t* buffer; // Pointer to response packet uint8_t *buffer; // Pointer to response packet
uint8_t length; // Length of response packet. uint8_t length; // Length of response packet.
} expected_rsp; } expected_rsp;
@ -88,7 +88,7 @@ STATIC uint8_t bleio_properties_to_ble_spec_properties(uint8_t bleio_properties)
return ble_spec_properties; return ble_spec_properties;
} }
//FIX not currently used; reenable when used. // FIX not currently used; reenable when used.
#if 0 #if 0
STATIC uint8_t ble_spec_properties_to_bleio_properties(uint8_t ble_spec_properties) { STATIC uint8_t ble_spec_properties_to_bleio_properties(uint8_t ble_spec_properties) {
uint8_t bleio_properties = 0; uint8_t bleio_properties = 0;
@ -120,20 +120,19 @@ STATIC void send_error(uint16_t conn_handle, uint8_t opcode, uint16_t handle, ui
struct bt_att_hdr h; struct bt_att_hdr h;
struct bt_att_error_rsp r; struct bt_att_error_rsp r;
} rsp = { { } rsp = { {
.code = BT_ATT_OP_ERROR_RSP, .code = BT_ATT_OP_ERROR_RSP,
}, { }, {
.request = opcode, .request = opcode,
} }};
};
hci_send_acl_pkt(conn_handle, BT_L2CAP_CID_ATT, sizeof(rsp), (uint8_t *) &rsp); hci_send_acl_pkt(conn_handle, BT_L2CAP_CID_ATT, sizeof(rsp), (uint8_t *)&rsp);
} }
STATIC void send_req(uint16_t conn_handle, size_t request_length, uint8_t* request_buffer) { STATIC void send_req(uint16_t conn_handle, size_t request_length, uint8_t *request_buffer) {
hci_send_acl_pkt(conn_handle, BT_L2CAP_CID_ATT, request_length, request_buffer); hci_send_acl_pkt(conn_handle, BT_L2CAP_CID_ATT, request_length, request_buffer);
} }
STATIC int send_req_wait_for_rsp(uint16_t conn_handle, size_t request_length, uint8_t* request_buffer, uint8_t response_buffer[]) { STATIC int send_req_wait_for_rsp(uint16_t conn_handle, size_t request_length, uint8_t *request_buffer, uint8_t response_buffer[]) {
// We expect a particular kind of response after this request. // We expect a particular kind of response after this request.
expected_rsp.conn_handle = conn_handle; expected_rsp.conn_handle = conn_handle;
// The response opcode is the request opcode + 1. // The response opcode is the request opcode + 1.
@ -192,9 +191,9 @@ void bleio_att_reset(void) {
} }
bool att_connect_to_address(bt_addr_le_t *addr) { bool att_connect_to_address(bt_addr_le_t *addr) {
//FIX // FIX
if (hci_le_create_conn(0x0060, 0x0030, 0x00, addr, 0x00, if (hci_le_create_conn(0x0060, 0x0030, 0x00, addr, 0x00,
0x0006, 0x000c, 0x0000, 0x00c8, 0x0004, 0x0006) != 0) { 0x0006, 0x000c, 0x0000, 0x00c8, 0x0004, 0x0006) != 0) {
return false; return false;
} }
@ -229,7 +228,7 @@ bool att_disconnect(uint16_t conn_handle) {
return !att_handle_is_connected(conn_handle); return !att_handle_is_connected(conn_handle);
} }
//FIX // FIX
// STATIC bool discover_services(uint16_t conn_handle, BLERemoteDevice* device, const char* serviceUuidFilter) { // STATIC bool discover_services(uint16_t conn_handle, BLERemoteDevice* device, const char* serviceUuidFilter) {
// uint16_t reqStart_handle = 0x0001; // uint16_t reqStart_handle = 0x0001;
// uint16_t reqEnd_handle = 0xffff; // uint16_t reqEnd_handle = 0xffff;
@ -406,7 +405,7 @@ bool att_disconnect(uint16_t conn_handle) {
// return true; // return true;
// } // }
bool att_discover_attributes(bt_addr_le_t *addr, const char* service_uuid_filter) { bool att_discover_attributes(bt_addr_le_t *addr, const char *service_uuid_filter) {
uint16_t conn_handle = att_conn_handle(addr); uint16_t conn_handle = att_conn_handle(addr);
if (conn_handle == 0xffff) { if (conn_handle == 0xffff) {
return false; return false;
@ -418,7 +417,7 @@ bool att_discover_attributes(bt_addr_le_t *addr, const char* service_uuid_filter
} }
// find the device entry for the peeer // find the device entry for the peeer
//FIX BLERemoteDevice* device = NULL; // FIX BLERemoteDevice* device = NULL;
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) { for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
// if (bleio_connections[i].conn_handle == conn_handle) { // if (bleio_connections[i].conn_handle == conn_handle) {
@ -454,7 +453,7 @@ bool att_discover_attributes(bt_addr_le_t *addr, const char* service_uuid_filter
} }
// discover services // discover services
//FIX // FIX
// if (!att_discover_services(conn_handle, device, service_uuid_filter)) { // if (!att_discover_services(conn_handle, device, service_uuid_filter)) {
// return false; // return false;
// } // }
@ -481,10 +480,10 @@ void att_set_timeout(unsigned long timeout_in) {
} }
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_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) interval; (void)interval;
(void) latency; (void)latency;
(void) supervision_timeout; (void)supervision_timeout;
(void) master_clock_accuracy; (void)master_clock_accuracy;
int peer_index = -1; int peer_index = -1;
@ -508,7 +507,7 @@ void att_add_connection(uint16_t handle, uint8_t role, bt_addr_le_t *peer_addr,
void att_remove_connection(uint16_t conn_handle, uint8_t reason) { void att_remove_connection(uint16_t conn_handle, uint8_t reason) {
(void) reason; (void)reason;
int peer_index = -1; int peer_index = -1;
int peer_count = 0; int peer_count = 0;
@ -580,7 +579,7 @@ bool att_is_connected(void) {
} }
bool att_address_is_connected(bt_addr_le_t *addr) { bool att_address_is_connected(bt_addr_le_t *addr) {
return (att_conn_handle(addr) != 0xffff); return att_conn_handle(addr) != 0xffff;
} }
bool att_handle_is_connected(uint16_t handle) { bool att_handle_is_connected(uint16_t handle) {
@ -624,10 +623,10 @@ bool att_disconnect_all(void) {
bleio_connections[i].mtu = BT_ATT_DEFAULT_LE_MTU; bleio_connections[i].mtu = BT_ATT_DEFAULT_LE_MTU;
} }
return (num_disconnects > 0); return num_disconnects > 0;
} }
bool att_notify(uint16_t handle, const uint8_t* value, int length) { bool att_notify(uint16_t handle, const uint8_t *value, int length) {
int num_notifications = 0; int num_notifications = 0;
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) { for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
@ -643,20 +642,21 @@ bool att_notify(uint16_t handle, const uint8_t* value, int length) {
size_t allowed_length = MIN((uint16_t)(bleio_connections[i].mtu - sizeof(notify_t)), (uint16_t)length); size_t allowed_length = MIN((uint16_t)(bleio_connections[i].mtu - sizeof(notify_t)), (uint16_t)length);
uint8_t notify_bytes[sizeof(notify_t) + allowed_length]; uint8_t notify_bytes[sizeof(notify_t) + allowed_length];
notify_t *notify = (notify_t *) notify_bytes; notify_t *notify = (notify_t *)notify_bytes;
notify->hdr.code = BT_ATT_OP_NOTIFY;; notify->hdr.code = BT_ATT_OP_NOTIFY;
;
notify->ntf.handle = handle; notify->ntf.handle = handle;
memcpy(notify->ntf.value, value, allowed_length); memcpy(notify->ntf.value, value, allowed_length);
hci_send_acl_pkt(bleio_connections[i].conn_handle, BT_L2CAP_CID_ATT, hci_send_acl_pkt(bleio_connections[i].conn_handle, BT_L2CAP_CID_ATT,
sizeof(notify_bytes), notify_bytes); sizeof(notify_bytes), notify_bytes);
num_notifications++; num_notifications++;
} }
return (num_notifications > 0); return num_notifications > 0;
} }
bool att_indicate(uint16_t handle, const uint8_t* value, int length) { bool att_indicate(uint16_t handle, const uint8_t *value, int length) {
int num_indications = 0; int num_indications = 0;
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) { for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
@ -672,15 +672,16 @@ bool att_indicate(uint16_t handle, const uint8_t* value, int length) {
size_t allowed_length = MIN((uint16_t)(bleio_connections[i].mtu - sizeof(indicate_t)), (uint16_t)length); size_t allowed_length = MIN((uint16_t)(bleio_connections[i].mtu - sizeof(indicate_t)), (uint16_t)length);
uint8_t indicate_bytes[sizeof(indicate_t) + allowed_length]; uint8_t indicate_bytes[sizeof(indicate_t) + allowed_length];
indicate_t *indicate = (indicate_t *) indicate_bytes; indicate_t *indicate = (indicate_t *)indicate_bytes;
indicate->hdr.code = BT_ATT_OP_INDICATE;; indicate->hdr.code = BT_ATT_OP_INDICATE;
;
indicate->ind.handle = handle; indicate->ind.handle = handle;
memcpy(indicate->ind.value, value, allowed_length); memcpy(indicate->ind.value, value, allowed_length);
confirm = false; confirm = false;
hci_send_acl_pkt(bleio_connections[i].conn_handle, BT_L2CAP_CID_ATT, hci_send_acl_pkt(bleio_connections[i].conn_handle, BT_L2CAP_CID_ATT,
sizeof(indicate_bytes), indicate_bytes); sizeof(indicate_bytes), indicate_bytes);
while (!confirm) { while (!confirm) {
// RUN_BACKGROUND_TASKS includes hci_poll_for_incoming_pkt(); // RUN_BACKGROUND_TASKS includes hci_poll_for_incoming_pkt();
@ -694,11 +695,11 @@ bool att_indicate(uint16_t handle, const uint8_t* value, int length) {
num_indications++; num_indications++;
} }
return (num_indications > 0); return num_indications > 0;
} }
STATIC void process_error(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) { STATIC void process_error(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
struct bt_att_error_rsp *rsp = (struct bt_att_error_rsp *) data; struct bt_att_error_rsp *rsp = (struct bt_att_error_rsp *)data;
if (dlen != sizeof(struct bt_att_error_rsp)) { if (dlen != sizeof(struct bt_att_error_rsp)) {
// Incorrect size; ignore. // Incorrect size; ignore.
@ -714,7 +715,7 @@ STATIC void process_error(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
} }
STATIC void process_mtu_req(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) { STATIC void process_mtu_req(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
struct bt_att_exchange_mtu_req *req = (struct bt_att_exchange_mtu_req *) data; struct bt_att_exchange_mtu_req *req = (struct bt_att_exchange_mtu_req *)data;
if (dlen != sizeof(struct bt_att_exchange_mtu_req)) { if (dlen != sizeof(struct bt_att_exchange_mtu_req)) {
send_error(conn_handle, BT_ATT_OP_MTU_REQ, BLE_GATT_HANDLE_INVALID, BT_ATT_ERR_INVALID_PDU); send_error(conn_handle, BT_ATT_OP_MTU_REQ, BLE_GATT_HANDLE_INVALID, BT_ATT_ERR_INVALID_PDU);
@ -738,17 +739,16 @@ STATIC void process_mtu_req(uint16_t conn_handle, uint8_t dlen, uint8_t data[])
struct bt_att_hdr h; struct bt_att_hdr h;
struct bt_att_exchange_mtu_rsp r; struct bt_att_exchange_mtu_rsp r;
} rsp = { { } rsp = { {
.code = BT_ATT_OP_MTU_RSP, .code = BT_ATT_OP_MTU_RSP,
}, { }, {
.mtu = mtu, .mtu = mtu,
} }};
};
hci_send_acl_pkt(conn_handle, BT_L2CAP_CID_ATT, sizeof(rsp), (uint8_t *) &rsp); hci_send_acl_pkt(conn_handle, BT_L2CAP_CID_ATT, sizeof(rsp), (uint8_t *)&rsp);
} }
STATIC void process_mtu_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) { STATIC void process_mtu_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
struct bt_att_exchange_mtu_rsp *rsp = (struct bt_att_exchange_mtu_rsp *) data; struct bt_att_exchange_mtu_rsp *rsp = (struct bt_att_exchange_mtu_rsp *)data;
if (dlen != sizeof(struct bt_att_exchange_mtu_rsp)) { if (dlen != sizeof(struct bt_att_exchange_mtu_rsp)) {
return; return;
@ -765,7 +765,7 @@ STATIC void process_mtu_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[])
} }
STATIC void process_find_info_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) { STATIC void process_find_info_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) {
struct bt_att_find_info_req *req = (struct bt_att_find_info_req *) data; struct bt_att_find_info_req *req = (struct bt_att_find_info_req *)data;
if (dlen != sizeof(struct bt_att_find_info_req)) { if (dlen != sizeof(struct bt_att_find_info_req)) {
send_error(conn_handle, BT_ATT_OP_FIND_INFO_REQ, req->start_handle, BT_ATT_ERR_INVALID_PDU); send_error(conn_handle, BT_ATT_OP_FIND_INFO_REQ, req->start_handle, BT_ATT_ERR_INVALID_PDU);
@ -778,7 +778,7 @@ STATIC void process_find_info_req(uint16_t conn_handle, uint16_t mtu, uint8_t dl
} rsp_t; } rsp_t;
uint8_t rsp_bytes[mtu]; uint8_t rsp_bytes[mtu];
rsp_t *rsp = (rsp_t *) rsp_bytes; rsp_t *rsp = (rsp_t *)rsp_bytes;
rsp->h.code = BT_ATT_OP_FIND_INFO_RSP; rsp->h.code = BT_ATT_OP_FIND_INFO_RSP;
// Keeps track of total length of the response. // Keeps track of total length of the response.
@ -832,20 +832,20 @@ STATIC void process_find_info_req(uint16_t conn_handle, uint16_t mtu, uint8_t dl
} }
if (sizeof_uuid == 2) { if (sizeof_uuid == 2) {
struct bt_att_info_16 *info_16 = (struct bt_att_info_16 *) &rsp_bytes[rsp_length]; struct bt_att_info_16 *info_16 = (struct bt_att_info_16 *)&rsp_bytes[rsp_length];
info_16->handle = handle; info_16->handle = handle;
info_16->uuid = common_hal_bleio_uuid_get_uuid16(uuid); info_16->uuid = common_hal_bleio_uuid_get_uuid16(uuid);
rsp_length += sizeof(struct bt_att_info_16); rsp_length += sizeof(struct bt_att_info_16);
} else { } else {
struct bt_att_info_128 *info_128 = (struct bt_att_info_128 *) &rsp_bytes[rsp_length]; struct bt_att_info_128 *info_128 = (struct bt_att_info_128 *)&rsp_bytes[rsp_length];
info_128->handle = handle; info_128->handle = handle;
common_hal_bleio_uuid_get_uuid128(uuid, info_128->uuid); common_hal_bleio_uuid_get_uuid128(uuid, info_128->uuid);
rsp_length += sizeof(struct bt_att_info_128); rsp_length += sizeof(struct bt_att_info_128);
} }
no_data =false; no_data = false;
} // end for } // end for
@ -861,14 +861,13 @@ int att_find_info_req(uint16_t conn_handle, uint16_t start_handle, uint16_t end_
struct bt_att_hdr h; struct bt_att_hdr h;
struct bt_att_find_info_req r; struct bt_att_find_info_req r;
} req = { { } req = { {
.code = BT_ATT_OP_FIND_INFO_REQ, .code = BT_ATT_OP_FIND_INFO_REQ,
}, { }, {
.start_handle = start_handle, .start_handle = start_handle,
.end_handle = end_handle, .end_handle = end_handle,
} }};
};
return send_req_wait_for_rsp(conn_handle, sizeof(req), (uint8_t *) &req, response_buffer); return send_req_wait_for_rsp(conn_handle, sizeof(req), (uint8_t *)&req, response_buffer);
} }
STATIC void process_find_info_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) { STATIC void process_find_info_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
@ -880,7 +879,7 @@ STATIC void process_find_info_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t da
} }
STATIC void process_find_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) { STATIC void process_find_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) {
struct bt_att_find_type_req *req = (struct bt_att_find_type_req *) data; struct bt_att_find_type_req *req = (struct bt_att_find_type_req *)data;
if (dlen < sizeof(struct bt_att_find_type_req)) { if (dlen < sizeof(struct bt_att_find_type_req)) {
send_error(conn_handle, BT_ATT_OP_FIND_TYPE_RSP, req->start_handle, BT_ATT_ERR_INVALID_PDU); send_error(conn_handle, BT_ATT_OP_FIND_TYPE_RSP, req->start_handle, BT_ATT_ERR_INVALID_PDU);
@ -893,7 +892,7 @@ STATIC void process_find_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dl
response[0] = BT_ATT_OP_FIND_TYPE_RSP; response[0] = BT_ATT_OP_FIND_TYPE_RSP;
response_length = 1; response_length = 1;
//FIX // FIX
// if (find_type_req->type == BLE_UUID_SERVICE_PRIMARY) { // if (find_type_req->type == BLE_UUID_SERVICE_PRIMARY) {
// for (uint16_t i = (find_type_req->start_handle - 1); i < GATT.attributeCount() && i <= (find_type_req->end_handle - 1); i++) { // for (uint16_t i = (find_type_req->start_handle - 1); i < GATT.attributeCount() && i <= (find_type_req->end_handle - 1); i++) {
// BLELocalAttribute* attribute = GATT.attribute(i); // BLELocalAttribute* attribute = GATT.attribute(i);
@ -926,7 +925,7 @@ STATIC void process_find_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dl
} }
void process_read_group_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) { void process_read_group_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) {
struct bt_att_read_group_req *req = (struct bt_att_read_group_req *) data; struct bt_att_read_group_req *req = (struct bt_att_read_group_req *)data;
uint16_t type_uuid = req->uuid[0] | (req->uuid[1] << 8); uint16_t type_uuid = req->uuid[0] | (req->uuid[1] << 8);
// We only support returning services for BT_ATT_OP_READ_GROUP_REQ, which is typically used // We only support returning services for BT_ATT_OP_READ_GROUP_REQ, which is typically used
@ -944,7 +943,7 @@ void process_read_group_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, ui
} rsp_t; } rsp_t;
uint8_t rsp_bytes[mtu]; uint8_t rsp_bytes[mtu];
rsp_t *rsp = (rsp_t *) rsp_bytes; rsp_t *rsp = (rsp_t *)rsp_bytes;
rsp->h.code = BT_ATT_OP_READ_GROUP_RSP; rsp->h.code = BT_ATT_OP_READ_GROUP_RSP;
rsp->r.len = 0; rsp->r.len = 0;
@ -991,7 +990,7 @@ void process_read_group_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, ui
// There may be multiple chunks in this transmission. // There may be multiple chunks in this transmission.
rsp->r.len = data_length; rsp->r.len = data_length;
struct bt_att_group_data *group_data = (struct bt_att_group_data *) &rsp_bytes[rsp_length]; struct bt_att_group_data *group_data = (struct bt_att_group_data *)&rsp_bytes[rsp_length];
group_data->start_handle = service->start_handle; group_data->start_handle = service->start_handle;
group_data->end_handle = service->end_handle; group_data->end_handle = service->end_handle;
@ -1017,7 +1016,7 @@ int att_read_group_req(uint16_t conn_handle, uint16_t start_handle, uint16_t end
} req_t; } req_t;
uint8_t req_bytes[sizeof(req_t) + sizeof(uuid)]; uint8_t req_bytes[sizeof(req_t) + sizeof(uuid)];
req_t *req = (req_t *) req_bytes; req_t *req = (req_t *)req_bytes;
req->h.code = BT_ATT_OP_READ_GROUP_REQ; req->h.code = BT_ATT_OP_READ_GROUP_REQ;
req->r.start_handle = start_handle; req->r.start_handle = start_handle;
@ -1047,7 +1046,7 @@ STATIC void process_read_or_read_blob_req(uint16_t conn_handle, uint16_t mtu, ui
return; return;
} }
struct bt_att_read_req *req = (struct bt_att_read_req *) data; struct bt_att_read_req *req = (struct bt_att_read_req *)data;
handle = req->handle; handle = req->handle;
response_opcode = BT_ATT_OP_READ_RSP; response_opcode = BT_ATT_OP_READ_RSP;
@ -1057,7 +1056,7 @@ STATIC void process_read_or_read_blob_req(uint16_t conn_handle, uint16_t mtu, ui
return; return;
} }
struct bt_att_read_blob_req *req = (struct bt_att_read_blob_req *) data; struct bt_att_read_blob_req *req = (struct bt_att_read_blob_req *)data;
handle = req->handle; handle = req->handle;
offset = req->offset; offset = req->offset;
response_opcode = BT_ATT_OP_READ_BLOB_RSP; response_opcode = BT_ATT_OP_READ_BLOB_RSP;
@ -1077,7 +1076,7 @@ STATIC void process_read_or_read_blob_req(uint16_t conn_handle, uint16_t mtu, ui
} rsp_t; } rsp_t;
uint8_t rsp_bytes[mtu]; uint8_t rsp_bytes[mtu];
rsp_t *rsp = (rsp_t *) rsp_bytes; rsp_t *rsp = (rsp_t *)rsp_bytes;
rsp->h.code = response_opcode; rsp->h.code = response_opcode;
// Keeps track of total length of the response. // Keeps track of total length of the response.
@ -1105,7 +1104,7 @@ STATIC void process_read_or_read_blob_req(uint16_t conn_handle, uint16_t mtu, ui
return; return;
} }
characteristic_declaration_t *char_decl = (characteristic_declaration_t *) rsp->r.value; characteristic_declaration_t *char_decl = (characteristic_declaration_t *)rsp->r.value;
// Convert from the bleio properties bit values to the BLE spec properties bit values. // Convert from the bleio properties bit values to the BLE spec properties bit values.
// They are not the same :(. // They are not the same :(.
@ -1160,7 +1159,7 @@ STATIC void process_read_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[])
} }
STATIC void process_read_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) { STATIC void process_read_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) {
struct bt_att_read_type_req *req = (struct bt_att_read_type_req *) data; struct bt_att_read_type_req *req = (struct bt_att_read_type_req *)data;
uint16_t type_uuid = req->uuid[0] | (req->uuid[1] << 8); uint16_t type_uuid = req->uuid[0] | (req->uuid[1] << 8);
if (dlen != sizeof(struct bt_att_read_type_req) + sizeof(type_uuid)) { if (dlen != sizeof(struct bt_att_read_type_req) + sizeof(type_uuid)) {
@ -1174,7 +1173,7 @@ STATIC void process_read_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dl
} rsp_t; } rsp_t;
uint8_t rsp_bytes[mtu]; uint8_t rsp_bytes[mtu];
rsp_t *rsp = (rsp_t *) rsp_bytes; rsp_t *rsp = (rsp_t *)rsp_bytes;
rsp->h.code = BT_ATT_OP_READ_TYPE_RSP; rsp->h.code = BT_ATT_OP_READ_TYPE_RSP;
rsp->r.len = 0; rsp->r.len = 0;
@ -1233,11 +1232,11 @@ STATIC void process_read_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dl
// There may be multiple chunks in this transmission. // There may be multiple chunks in this transmission.
rsp->r.len = data_length; rsp->r.len = data_length;
struct bt_att_data *att_data = (struct bt_att_data *) &rsp_bytes[rsp_length]; struct bt_att_data *att_data = (struct bt_att_data *)&rsp_bytes[rsp_length];
att_data->handle = characteristic->decl_handle; att_data->handle = characteristic->decl_handle;
characteristic_declaration_t *char_decl = (characteristic_declaration_t *) att_data->value; characteristic_declaration_t *char_decl = (characteristic_declaration_t *)att_data->value;
// Convert from the bleio properties bit values to the BLE spec properties bit values. // Convert from the bleio properties bit values to the BLE spec properties bit values.
// They are not the same :(. // They are not the same :(.
@ -1255,7 +1254,7 @@ STATIC void process_read_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dl
// See if request is for a descriptor value with a 16-bit UUID, such as the CCCD. // See if request is for a descriptor value with a 16-bit UUID, such as the CCCD.
bleio_descriptor_obj_t *descriptor = MP_OBJ_TO_PTR(attribute_obj); bleio_descriptor_obj_t *descriptor = MP_OBJ_TO_PTR(attribute_obj);
if (bleio_uuid_get_uuid16_or_unknown(descriptor->uuid) == type_uuid) { if (bleio_uuid_get_uuid16_or_unknown(descriptor->uuid) == type_uuid) {
struct bt_att_data *att_data = (struct bt_att_data *) &rsp_bytes[rsp_length]; struct bt_att_data *att_data = (struct bt_att_data *)&rsp_bytes[rsp_length];
att_data->handle = handle; att_data->handle = handle;
@ -1277,7 +1276,7 @@ STATIC void process_read_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dl
bleio_characteristic_obj_t *characteristic = MP_OBJ_TO_PTR(attribute_obj); bleio_characteristic_obj_t *characteristic = MP_OBJ_TO_PTR(attribute_obj);
if (bleio_uuid_get_uuid16_or_unknown(characteristic->uuid) == type_uuid) { if (bleio_uuid_get_uuid16_or_unknown(characteristic->uuid) == type_uuid) {
struct bt_att_data *att_data = (struct bt_att_data *) &rsp_bytes[rsp_length]; struct bt_att_data *att_data = (struct bt_att_data *)&rsp_bytes[rsp_length];
att_data->handle = handle; att_data->handle = handle;
@ -1299,7 +1298,7 @@ STATIC void process_read_type_req(uint16_t conn_handle, uint16_t mtu, uint8_t dl
if (no_data) { if (no_data) {
send_error(conn_handle, BT_ATT_OP_READ_TYPE_REQ, send_error(conn_handle, BT_ATT_OP_READ_TYPE_REQ,
req->start_handle, BT_ATT_ERR_ATTRIBUTE_NOT_FOUND); req->start_handle, BT_ATT_ERR_ATTRIBUTE_NOT_FOUND);
} else { } else {
hci_send_acl_pkt(conn_handle, BT_L2CAP_CID_ATT, rsp_length, rsp_bytes); hci_send_acl_pkt(conn_handle, BT_L2CAP_CID_ATT, rsp_length, rsp_bytes);
} }
@ -1312,7 +1311,7 @@ int att_read_type_req(uint16_t conn_handle, uint16_t start_handle, uint16_t end_
} req_t; } req_t;
uint8_t req_bytes[sizeof(req_t) + sizeof(type)]; uint8_t req_bytes[sizeof(req_t) + sizeof(type)];
req_t *req = (req_t *) req_bytes; req_t *req = (req_t *)req_bytes;
req->h.code = BT_ATT_OP_READ_TYPE_REQ; req->h.code = BT_ATT_OP_READ_TYPE_REQ;
req->r.start_handle = start_handle; req->r.start_handle = start_handle;
@ -1334,7 +1333,7 @@ STATIC void process_read_type_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t da
// Handles BT_ATT_OP_WRITE_REQ or BT_ATT_OP_WRITE_ // Handles BT_ATT_OP_WRITE_REQ or BT_ATT_OP_WRITE_
STATIC void process_write_req_or_cmd(uint16_t conn_handle, uint16_t mtu, uint8_t op, uint8_t dlen, uint8_t data[]) { STATIC void process_write_req_or_cmd(uint16_t conn_handle, uint16_t mtu, uint8_t op, uint8_t dlen, uint8_t data[]) {
// struct bt_att_write_cmd is identical, so don't bother to split code paths based on opcode. // struct bt_att_write_cmd is identical, so don't bother to split code paths based on opcode.
struct bt_att_write_req *req = (struct bt_att_write_req *) data; struct bt_att_write_req *req = (struct bt_att_write_req *)data;
bool with_response = (op == BT_ATT_OP_WRITE_REQ); bool with_response = (op == BT_ATT_OP_WRITE_REQ);
@ -1397,7 +1396,7 @@ STATIC void process_write_req_or_cmd(uint16_t conn_handle, uint16_t mtu, uint8_t
.code = BT_ATT_OP_WRITE_RSP, .code = BT_ATT_OP_WRITE_RSP,
}; };
hci_send_acl_pkt(conn_handle, BT_L2CAP_CID_ATT, sizeof(rsp), (uint8_t *) &rsp); hci_send_acl_pkt(conn_handle, BT_L2CAP_CID_ATT, sizeof(rsp), (uint8_t *)&rsp);
} }
} }
@ -1410,7 +1409,7 @@ STATIC void process_write_rsp(uint16_t conn_handle, uint8_t dlen, uint8_t data[]
} }
STATIC void process_prepare_write_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) { STATIC void process_prepare_write_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) {
struct bt_att_prepare_write_req *req = (struct bt_att_prepare_write_req *) data; struct bt_att_prepare_write_req *req = (struct bt_att_prepare_write_req *)data;
if (dlen < sizeof(struct bt_att_prepare_write_req)) { if (dlen < sizeof(struct bt_att_prepare_write_req)) {
send_error(conn_handle, BT_ATT_OP_PREPARE_WRITE_REQ, BLE_GATT_HANDLE_INVALID, BT_ATT_ERR_INVALID_PDU); send_error(conn_handle, BT_ATT_OP_PREPARE_WRITE_REQ, BLE_GATT_HANDLE_INVALID, BT_ATT_ERR_INVALID_PDU);
@ -1419,7 +1418,7 @@ STATIC void process_prepare_write_req(uint16_t conn_handle, uint16_t mtu, uint8_
uint16_t handle = req->handle; uint16_t handle = req->handle;
uint16_t offset = req->offset; uint16_t offset = req->offset;
(void) offset; (void)offset;
if (handle > bleio_adapter_max_attribute_handle(&common_hal_bleio_adapter_obj)) { if (handle > bleio_adapter_max_attribute_handle(&common_hal_bleio_adapter_obj)) {
send_error(conn_handle, BT_ATT_OP_PREPARE_WRITE_REQ, handle, BT_ATT_ERR_ATTRIBUTE_NOT_FOUND); send_error(conn_handle, BT_ATT_OP_PREPARE_WRITE_REQ, handle, BT_ATT_ERR_ATTRIBUTE_NOT_FOUND);
@ -1433,7 +1432,7 @@ STATIC void process_prepare_write_req(uint16_t conn_handle, uint16_t mtu, uint8_
return; return;
} }
bleio_characteristic_obj_t* characteristic = MP_OBJ_TO_PTR(attribute); bleio_characteristic_obj_t *characteristic = MP_OBJ_TO_PTR(attribute);
if (handle != characteristic->handle) { if (handle != characteristic->handle) {
send_error(conn_handle, BT_ATT_OP_PREPARE_WRITE_REQ, handle, BT_ATT_ERR_ATTRIBUTE_NOT_LONG); send_error(conn_handle, BT_ATT_OP_PREPARE_WRITE_REQ, handle, BT_ATT_ERR_ATTRIBUTE_NOT_LONG);
@ -1445,7 +1444,7 @@ STATIC void process_prepare_write_req(uint16_t conn_handle, uint16_t mtu, uint8_
return; return;
} }
//FIX if (long_write_handle == BLE_GATT_HANDLE_INVALID) // FIX if (long_write_handle == BLE_GATT_HANDLE_INVALID)
// int valueSize = characteristic->valueSize(); // int valueSize = characteristic->valueSize();
// long_write_value = (uint8_t*)realloc(long_write_value, valueSize); // long_write_value = (uint8_t*)realloc(long_write_value, valueSize);
@ -1480,7 +1479,7 @@ STATIC void process_prepare_write_req(uint16_t conn_handle, uint16_t mtu, uint8_
} }
STATIC void process_exec_write_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) { STATIC void process_exec_write_req(uint16_t conn_handle, uint16_t mtu, uint8_t dlen, uint8_t data[]) {
struct bt_att_exec_write_req *req = (struct bt_att_exec_write_req *) data; struct bt_att_exec_write_req *req = (struct bt_att_exec_write_req *)data;
if (dlen != sizeof(struct bt_att_exec_write_req)) { if (dlen != sizeof(struct bt_att_exec_write_req)) {
send_error(conn_handle, BT_ATT_OP_EXEC_WRITE_REQ, BLE_GATT_HANDLE_INVALID, BT_ATT_ERR_INVALID_PDU); send_error(conn_handle, BT_ATT_OP_EXEC_WRITE_REQ, BLE_GATT_HANDLE_INVALID, BT_ATT_ERR_INVALID_PDU);
@ -1488,11 +1487,11 @@ STATIC void process_exec_write_req(uint16_t conn_handle, uint16_t mtu, uint8_t d
} }
if (long_write_handle && (req->flags & 0x01)) { if (long_write_handle && (req->flags & 0x01)) {
//FIX BLELocalCharacteristic* characteristic = (BLELocalCharacteristic*)GATT.attribute(long_write_handle - 1); // FIX BLELocalCharacteristic* characteristic = (BLELocalCharacteristic*)GATT.attribute(long_write_handle - 1);
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) { for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
if (bleio_connections[i].conn_handle == conn_handle) { if (bleio_connections[i].conn_handle == conn_handle) {
//FIX characteristic->writeValue(BLEDevice(bleio_connections[i].address_type, bleio_connections[i].address), long_write_value, long_write_value_length); // FIX characteristic->writeValue(BLEDevice(bleio_connections[i].address_type, bleio_connections[i].address), long_write_value, long_write_value_length);
break; break;
} }
} }
@ -1516,16 +1515,16 @@ STATIC void process_notify_or_indicate(uint16_t conn_handle, uint8_t opcode, uin
} }
// struct bt_att_notify and bt_att_indicate are identical. // struct bt_att_notify and bt_att_indicate are identical.
//FIXunused struct bt_att_notify *req = (struct bt_att_notify *) data; // FIXunused struct bt_att_notify *req = (struct bt_att_notify *) data;
//FIXunused uint8_t handle = req->handle; // FIXunused uint8_t handle = req->handle;
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) { for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
if (bleio_connections[i].conn_handle != conn_handle) { if (bleio_connections[i].conn_handle != conn_handle) {
continue; continue;
} }
//FIX BLERemoteDevice* device = bleio_connections[i].device; // FIX BLERemoteDevice* device = bleio_connections[i].device;
// if (!device) { // if (!device) {
// break; // break;
@ -1562,9 +1561,9 @@ STATIC void process_notify_or_indicate(uint16_t conn_handle, uint8_t opcode, uin
} }
STATIC void process_confirm(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) { STATIC void process_confirm(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
(void) conn_handle; (void)conn_handle;
(void) dlen; (void)dlen;
(void) data; (void)data;
confirm = true; confirm = true;
} }
@ -1574,7 +1573,7 @@ bool att_exchange_mtu(uint16_t conn_handle) {
struct bt_att_exchange_mtu_req req = { struct bt_att_exchange_mtu_req req = {
.mtu = max_mtu, .mtu = max_mtu,
}; };
return send_req_wait_for_rsp(conn_handle, sizeof(req), (uint8_t *) &req, response_buffer); return send_req_wait_for_rsp(conn_handle, sizeof(req), (uint8_t *)&req, response_buffer);
} }
int att_read_req(uint16_t conn_handle, uint16_t handle, uint8_t response_buffer[]) { int att_read_req(uint16_t conn_handle, uint16_t handle, uint8_t response_buffer[]) {
@ -1582,23 +1581,22 @@ int att_read_req(uint16_t conn_handle, uint16_t handle, uint8_t response_buffer[
struct bt_att_hdr h; struct bt_att_hdr h;
struct bt_att_read_req r; struct bt_att_read_req r;
} req = { { } req = { {
.code = BT_ATT_OP_READ_REQ, .code = BT_ATT_OP_READ_REQ,
}, { }, {
.handle = handle, .handle = handle,
} }};
};
return send_req_wait_for_rsp(conn_handle, sizeof(req), (uint8_t *) &req, response_buffer); return send_req_wait_for_rsp(conn_handle, sizeof(req), (uint8_t *)&req, 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[]) { int att_write_req(uint16_t conn_handle, uint16_t handle, const uint8_t *data, uint8_t data_len, uint8_t response_buffer[]) {
typedef struct __packed { typedef struct __packed {
struct bt_att_hdr h; struct bt_att_hdr h;
struct bt_att_write_req r; struct bt_att_write_req r;
} req_t; } req_t;
uint8_t req_bytes[sizeof(req_t) + data_len]; uint8_t req_bytes[sizeof(req_t) + data_len];
req_t *req = (req_t *) req_bytes; req_t *req = (req_t *)req_bytes;
req->h.code = BT_ATT_OP_WRITE_REQ; req->h.code = BT_ATT_OP_WRITE_REQ;
req->r.handle = handle; req->r.handle = handle;
memcpy(req->r.value, data, data_len); memcpy(req->r.value, data, data_len);
@ -1606,14 +1604,14 @@ int att_write_req(uint16_t conn_handle, uint16_t handle, const uint8_t* data, ui
return send_req_wait_for_rsp(conn_handle, sizeof(req_bytes), req_bytes, response_buffer); return send_req_wait_for_rsp(conn_handle, sizeof(req_bytes), req_bytes, response_buffer);
} }
void att_write_cmd(uint16_t conn_handle, uint16_t handle, const uint8_t* data, uint8_t data_len) { void att_write_cmd(uint16_t conn_handle, uint16_t handle, const uint8_t *data, uint8_t data_len) {
typedef struct __packed { typedef struct __packed {
struct bt_att_hdr h; struct bt_att_hdr h;
struct bt_att_write_cmd r; struct bt_att_write_cmd r;
} cmd_t; } cmd_t;
uint8_t cmd_bytes[sizeof(cmd_t) + data_len]; uint8_t cmd_bytes[sizeof(cmd_t) + data_len];
cmd_t *cmd = (cmd_t *) cmd_bytes; cmd_t *cmd = (cmd_t *)cmd_bytes;
cmd->h.code = BT_ATT_OP_WRITE_CMD; cmd->h.code = BT_ATT_OP_WRITE_CMD;
cmd->r.handle = handle; cmd->r.handle = handle;
memcpy(cmd->r.value, data, data_len); memcpy(cmd->r.value, data, data_len);
@ -1715,7 +1713,7 @@ void att_process_data(uint16_t conn_handle, uint8_t dlen, uint8_t data[]) {
} }
} }
//FIX Do we need all of these? // FIX Do we need all of these?
void check_att_err(uint8_t err) { void check_att_err(uint8_t err) {
const compressed_string_t *msg = NULL; const compressed_string_t *msg = NULL;
switch (err) { switch (err) {

View File

@ -32,19 +32,19 @@
void bleio_att_reset(void); void bleio_att_reset(void);
//FIX void att_set_event_handler(BLEDeviceEvent event, BLEDeviceEventHandler eventHandler); // FIX void att_set_event_handler(BLEDeviceEvent event, BLEDeviceEventHandler eventHandler);
bool att_address_is_connected(bt_addr_le_t *addr); bool att_address_is_connected(bt_addr_le_t *addr);
bool att_connect_to_address(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(uint16_t conn_handle);
bool att_disconnect_all(void); bool att_disconnect_all(void);
bool att_discover_attributes(bt_addr_le_t *addr, const char* service_uuid_filter); bool att_discover_attributes(bt_addr_le_t *addr, const char *service_uuid_filter);
bool att_exchange_mtu(uint16_t conn_handle); bool att_exchange_mtu(uint16_t conn_handle);
bool att_handle_is_connected(uint16_t handle); bool att_handle_is_connected(uint16_t handle);
bool att_indicate(uint16_t handle, const uint8_t* value, int length); bool att_indicate(uint16_t handle, const uint8_t *value, int length);
bool att_is_connected(void); bool att_is_connected(void);
bool att_notify(uint16_t handle, const uint8_t* value, int length); 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_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[]); 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_conn_handle(bt_addr_le_t *addr);
uint16_t att_mtu(uint16_t handle); 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_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);
@ -52,6 +52,6 @@ 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_remove_connection(uint16_t conn_handle, uint8_t reason);
void att_set_max_mtu(uint16_t max_mtu); void att_set_max_mtu(uint16_t max_mtu);
void att_set_timeout(unsigned long timeout); 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); 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 #endif // MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_ATT_H

View File

@ -27,7 +27,7 @@
#include <string.h> #include <string.h>
#include "py/mphal.h" //***************************** #include "py/mphal.h" // *****************************
#include "supervisor/shared/tick.h" #include "supervisor/shared/tick.h"
#include "shared-bindings/_bleio/__init__.h" #include "shared-bindings/_bleio/__init__.h"
#include "common-hal/_bleio/Adapter.h" #include "common-hal/_bleio/Adapter.h"
@ -63,8 +63,8 @@ typedef struct __attribute__ ((packed)) {
typedef struct __attribute__ ((packed)) { typedef struct __attribute__ ((packed)) {
uint8_t pkt_type; uint8_t pkt_type;
uint16_t handle : 12; uint16_t handle : 12;
uint8_t pb: 2; // Packet boundary flag: ACL_DATA_PB values. uint8_t pb : 2; // Packet boundary flag: ACL_DATA_PB values.
uint8_t bc: 2; // Broadcast flag: always 0b00 for BLE. uint8_t bc : 2; // Broadcast flag: always 0b00 for BLE.
uint16_t data_len; // length of data[] in this packet. uint16_t data_len; // length of data[] in this packet.
uint8_t data[]; uint8_t data[];
} h4_hci_acl_pkt_t; } h4_hci_acl_pkt_t;
@ -89,7 +89,7 @@ typedef struct __attribute__ ((packed)) {
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Static storage: // Static storage:
//FIX size // FIX size
#define RX_BUFFER_SIZE (3 + 255) #define RX_BUFFER_SIZE (3 + 255)
#define ACL_DATA_BUFFER_SIZE (255) #define ACL_DATA_BUFFER_SIZE (255)
@ -107,7 +107,7 @@ STATIC bool cmd_response_received;
STATIC uint16_t cmd_response_opcode; STATIC uint16_t cmd_response_opcode;
STATIC uint8_t cmd_response_status; STATIC uint8_t cmd_response_status;
STATIC size_t cmd_response_len; STATIC size_t cmd_response_len;
STATIC uint8_t* cmd_response_data; STATIC uint8_t *cmd_response_data;
STATIC volatile bool hci_poll_in_progress = false; STATIC volatile bool hci_poll_in_progress = false;
@ -119,7 +119,7 @@ STATIC volatile bool hci_poll_in_progress = false;
#endif // HCI_DEBUG #endif // HCI_DEBUG
STATIC void process_acl_data_pkt(uint8_t pkt_len, uint8_t pkt_data[]) { 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; h4_hci_acl_pkt_t *pkt = (h4_hci_acl_pkt_t *)pkt_data;
if (pkt->pb != ACL_DATA_PB_MIDDLE) { if (pkt->pb != ACL_DATA_PB_MIDDLE) {
// This is the start of a fragmented acl_data packet or is a full packet. // This is the start of a fragmented acl_data packet or is a full packet.
@ -132,7 +132,7 @@ STATIC void process_acl_data_pkt(uint8_t pkt_len, uint8_t pkt_data[]) {
acl_data_len += pkt->data_len; acl_data_len += pkt->data_len;
} }
acl_data_t *acl = (acl_data_t *) &acl_data_buffer; acl_data_t *acl = (acl_data_t *)&acl_data_buffer;
if (acl_data_len != sizeof(acl) + acl->acl_data_len) { if (acl_data_len != sizeof(acl) + acl->acl_data_len) {
// We don't have the full packet yet. // We don't have the full packet yet.
return; return;
@ -167,18 +167,17 @@ STATIC void process_num_comp_pkts(uint16_t handle, uint16_t num_pkts) {
} }
} }
STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[]) 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;
h4_hci_evt_pkt_t *pkt = (h4_hci_evt_pkt_t*) pkt_data;
switch (pkt->evt) { switch (pkt->evt) {
case BT_HCI_EVT_DISCONN_COMPLETE: { case BT_HCI_EVT_DISCONN_COMPLETE: {
struct bt_hci_evt_disconn_complete *disconn_complete = struct bt_hci_evt_disconn_complete *disconn_complete =
(struct bt_hci_evt_disconn_complete*) pkt->params; (struct bt_hci_evt_disconn_complete *)pkt->params;
(void) disconn_complete; (void)disconn_complete;
att_remove_connection(disconn_complete->handle, disconn_complete->reason); att_remove_connection(disconn_complete->handle, disconn_complete->reason);
//FIX L2CAPSignaling.removeConnection(disconn_complete->handle, disconn_complete->reason); // FIX L2CAPSignaling.removeConnection(disconn_complete->handle, disconn_complete->reason);
break; break;
} }
@ -188,7 +187,7 @@ STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[])
struct bt_hci_evt_cc_status cc_status; struct bt_hci_evt_cc_status cc_status;
} __packed; } __packed;
struct cmd_complete_with_status *evt = (struct cmd_complete_with_status *) pkt->params; struct cmd_complete_with_status *evt = (struct cmd_complete_with_status *)pkt->params;
num_command_packets_allowed = evt->cmd_complete.ncmd; num_command_packets_allowed = evt->cmd_complete.ncmd;
@ -197,7 +196,7 @@ STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[])
cmd_response_status = evt->cc_status.status; cmd_response_status = evt->cc_status.status;
// All the bytes following cmd_complete, -including- the status byte, which is // All the bytes following cmd_complete, -including- the status byte, which is
// included in all the _bt_hci_rp_* structs. // included in all the _bt_hci_rp_* structs.
cmd_response_data = (uint8_t *) &evt->cc_status; cmd_response_data = (uint8_t *)&evt->cc_status;
// Includes status byte. // Includes status byte.
cmd_response_len = pkt->param_len - sizeof_field(struct cmd_complete_with_status, cmd_complete); cmd_response_len = pkt->param_len - sizeof_field(struct cmd_complete_with_status, cmd_complete);
@ -205,7 +204,7 @@ STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[])
} }
case BT_HCI_EVT_CMD_STATUS: { case BT_HCI_EVT_CMD_STATUS: {
struct bt_hci_evt_cmd_status *evt = (struct bt_hci_evt_cmd_status *) pkt->params; struct bt_hci_evt_cmd_status *evt = (struct bt_hci_evt_cmd_status *)pkt->params;
num_command_packets_allowed = evt->ncmd; num_command_packets_allowed = evt->ncmd;
@ -220,7 +219,7 @@ STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[])
case BT_HCI_EVT_NUM_COMPLETED_PACKETS: { case BT_HCI_EVT_NUM_COMPLETED_PACKETS: {
struct bt_hci_evt_num_completed_packets *evt = struct bt_hci_evt_num_completed_packets *evt =
(struct bt_hci_evt_num_completed_packets *) pkt->params; (struct bt_hci_evt_num_completed_packets *)pkt->params;
// Start at zero-th pair: (conn handle, num completed packets). // Start at zero-th pair: (conn handle, num completed packets).
struct bt_hci_handle_count *handle_and_count = &(evt->h[0]); struct bt_hci_handle_count *handle_and_count = &(evt->h[0]);
@ -232,8 +231,8 @@ STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[])
} }
case BT_HCI_EVT_LE_META_EVENT: { 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; 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); uint8_t *le_evt = pkt->params + sizeof (struct bt_hci_evt_le_meta_event);
if (meta_evt->subevent == BT_HCI_EVT_LE_CONN_COMPLETE) { if (meta_evt->subevent == BT_HCI_EVT_LE_CONN_COMPLETE) {
// Advertising stops when connection occurs. // Advertising stops when connection occurs.
@ -243,7 +242,7 @@ STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[])
bleio_adapter_advertising_was_stopped(&common_hal_bleio_adapter_obj); 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_conn_complete =
(struct bt_hci_evt_le_conn_complete *) le_evt; (struct bt_hci_evt_le_conn_complete *)le_evt;
if (le_conn_complete->status == BT_HCI_ERR_SUCCESS) { if (le_conn_complete->status == BT_HCI_ERR_SUCCESS) {
att_add_connection( att_add_connection(
@ -258,9 +257,9 @@ STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[])
} }
} else if (meta_evt->subevent == BT_HCI_EVT_LE_ADVERTISING_REPORT) { } 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_advertising_info =
(struct bt_hci_evt_le_advertising_info *) le_evt; (struct bt_hci_evt_le_advertising_info *)le_evt;
if (le_advertising_info->evt_type == BT_HCI_ADV_DIRECT_IND) { if (le_advertising_info->evt_type == BT_HCI_ADV_DIRECT_IND) {
//FIX // FIX
// last byte is RSSI // last byte is RSSI
// GAP.handleLeAdvertisingReport(leAdvertisingReport->type, // GAP.handleLeAdvertisingReport(leAdvertisingReport->type,
// leAdvertisingReport->peerBdaddrType, // leAdvertisingReport->peerBdaddrType,
@ -275,9 +274,9 @@ STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[])
} }
default: default:
#if HCI_DEBUG #if HCI_DEBUG
mp_printf(&mp_plat_print, "process_evt_pkt: Unknown event: %02x\n"); mp_printf(&mp_plat_print, "process_evt_pkt: Unknown event: %02x\n");
#endif #endif
break; break;
} }
} }
@ -333,7 +332,7 @@ hci_result_t hci_poll_for_incoming_pkt(void) {
case H4_ACL: case H4_ACL:
if (rx_idx >= sizeof(h4_hci_acl_pkt_t)) { if (rx_idx >= sizeof(h4_hci_acl_pkt_t)) {
const size_t total_len = const size_t total_len =
sizeof(h4_hci_acl_pkt_t) + ((h4_hci_acl_pkt_t *) rx_buffer)->data_len; sizeof(h4_hci_acl_pkt_t) + ((h4_hci_acl_pkt_t *)rx_buffer)->data_len;
if (rx_idx == total_len) { if (rx_idx == total_len) {
packet_is_complete = true; packet_is_complete = true;
} }
@ -346,7 +345,7 @@ hci_result_t hci_poll_for_incoming_pkt(void) {
case H4_EVT: case H4_EVT:
if (rx_idx >= sizeof(h4_hci_evt_pkt_t)) { if (rx_idx >= sizeof(h4_hci_evt_pkt_t)) {
const size_t total_len = const size_t total_len =
sizeof(h4_hci_evt_pkt_t) + ((h4_hci_evt_pkt_t *) rx_buffer)->param_len; sizeof(h4_hci_evt_pkt_t) + ((h4_hci_evt_pkt_t *)rx_buffer)->param_len;
if (rx_idx == total_len) { if (rx_idx == total_len) {
packet_is_complete = true; packet_is_complete = true;
} }
@ -374,23 +373,23 @@ hci_result_t hci_poll_for_incoming_pkt(void) {
switch (rx_buffer[0]) { switch (rx_buffer[0]) {
case H4_ACL: case H4_ACL:
#if HCI_DEBUG #if HCI_DEBUG
dump_acl_pkt(false, pkt_len, rx_buffer); dump_acl_pkt(false, pkt_len, rx_buffer);
#endif #endif
process_acl_data_pkt(pkt_len, rx_buffer); process_acl_data_pkt(pkt_len, rx_buffer);
break; break;
case H4_EVT: case H4_EVT:
#if HCI_DEBUG #if HCI_DEBUG
dump_evt_pkt(false, pkt_len, rx_buffer); dump_evt_pkt(false, pkt_len, rx_buffer);
#endif #endif
process_evt_pkt(pkt_len, rx_buffer); process_evt_pkt(pkt_len, rx_buffer);
break; break;
default: default:
#if HCI_DEBUG #if HCI_DEBUG
mp_printf(&mp_plat_print, "Unknown HCI packet type: %d\n", rx_buffer[0]); mp_printf(&mp_plat_print, "Unknown HCI packet type: %d\n", rx_buffer[0]);
#endif #endif
break; break;
} }
@ -425,21 +424,21 @@ STATIC hci_result_t write_pkt(uint8_t *buffer, size_t len) {
return HCI_OK; return HCI_OK;
} }
STATIC hci_result_t send_command(uint16_t opcode, uint8_t params_len, void* params) { 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 cmd_pkt_len = sizeof(h4_hci_cmd_pkt_t) + params_len;
uint8_t tx_buffer[cmd_pkt_len]; uint8_t tx_buffer[cmd_pkt_len];
// cmd header is at the beginning of tx_buffer // cmd header is at the beginning of tx_buffer
h4_hci_cmd_pkt_t *cmd_pkt = (h4_hci_cmd_pkt_t *) tx_buffer; h4_hci_cmd_pkt_t *cmd_pkt = (h4_hci_cmd_pkt_t *)tx_buffer;
cmd_pkt->pkt_type = H4_CMD; cmd_pkt->pkt_type = H4_CMD;
cmd_pkt->opcode = opcode; cmd_pkt->opcode = opcode;
cmd_pkt->param_len = params_len; cmd_pkt->param_len = params_len;
memcpy(cmd_pkt->params, params, params_len); memcpy(cmd_pkt->params, params, params_len);
#if HCI_DEBUG #if HCI_DEBUG
dump_cmd_pkt(true, sizeof(tx_buffer), tx_buffer); dump_cmd_pkt(true, sizeof(tx_buffer), tx_buffer);
#endif #endif
int result = write_pkt(tx_buffer, cmd_pkt_len); int result = write_pkt(tx_buffer, cmd_pkt_len);
if (result != HCI_OK) { if (result != HCI_OK) {
@ -478,8 +477,8 @@ hci_result_t hci_send_acl_pkt(uint16_t handle, uint8_t cid, uint16_t data_len, u
const size_t buf_len = sizeof(h4_hci_acl_pkt_t) + sizeof(acl_data_t) + data_len; const size_t buf_len = sizeof(h4_hci_acl_pkt_t) + sizeof(acl_data_t) + data_len;
uint8_t tx_buffer[buf_len]; uint8_t tx_buffer[buf_len];
h4_hci_acl_pkt_t *acl_pkt = (h4_hci_acl_pkt_t *) tx_buffer; 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_data_t *acl_data = (acl_data_t *)acl_pkt->data;
acl_pkt->pkt_type = H4_ACL; acl_pkt->pkt_type = H4_ACL;
acl_pkt->handle = handle; acl_pkt->handle = handle;
acl_pkt->pb = ACL_DATA_PB_FIRST_FLUSH; acl_pkt->pb = ACL_DATA_PB_FIRST_FLUSH;
@ -490,9 +489,9 @@ hci_result_t hci_send_acl_pkt(uint16_t handle, uint8_t cid, uint16_t data_len, u
memcpy(&acl_data->acl_data, data, data_len); memcpy(&acl_data->acl_data, data, data_len);
#if HCI_DEBUG #if HCI_DEBUG
dump_acl_pkt(true, buf_len, tx_buffer); dump_acl_pkt(true, buf_len, tx_buffer);
#endif #endif
pending_pkt++; pending_pkt++;
@ -512,7 +511,7 @@ hci_result_t hci_read_local_version(uint8_t *hci_version, uint16_t *hci_revision
hci_result_t result = send_command(BT_HCI_OP_READ_LOCAL_VERSION_INFO, 0, NULL); hci_result_t result = send_command(BT_HCI_OP_READ_LOCAL_VERSION_INFO, 0, NULL);
if (result == HCI_OK) { if (result == HCI_OK) {
struct bt_hci_rp_read_local_version_info *response = struct bt_hci_rp_read_local_version_info *response =
(struct bt_hci_rp_read_local_version_info *) cmd_response_data; (struct bt_hci_rp_read_local_version_info *)cmd_response_data;
*hci_version = response->hci_version; *hci_version = response->hci_version;
*hci_revision = response->hci_revision; *hci_revision = response->hci_revision;
*lmp_version = response->lmp_version; *lmp_version = response->lmp_version;
@ -526,7 +525,7 @@ hci_result_t hci_read_local_version(uint8_t *hci_version, uint16_t *hci_revision
hci_result_t hci_read_bd_addr(bt_addr_t *addr) { hci_result_t hci_read_bd_addr(bt_addr_t *addr) {
int result = send_command(BT_HCI_OP_READ_BD_ADDR, 0, NULL); int result = send_command(BT_HCI_OP_READ_BD_ADDR, 0, NULL);
if (result == HCI_OK) { if (result == HCI_OK) {
struct bt_hci_rp_read_bd_addr *response = (struct bt_hci_rp_read_bd_addr *) cmd_response_data; 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)); memcpy(addr->val, response->bdaddr.val, sizeof_field(bt_addr_t, val));
} }
@ -536,7 +535,7 @@ hci_result_t hci_read_bd_addr(bt_addr_t *addr) {
hci_result_t hci_read_rssi(uint16_t handle, int *rssi) { hci_result_t hci_read_rssi(uint16_t handle, int *rssi) {
int result = send_command(BT_HCI_OP_READ_RSSI, sizeof(handle), &handle); int result = send_command(BT_HCI_OP_READ_RSSI, sizeof(handle), &handle);
if (result == HCI_OK) { if (result == HCI_OK) {
struct bt_hci_rp_read_rssi *response = (struct bt_hci_rp_read_rssi *) cmd_response_data; struct bt_hci_rp_read_rssi *response = (struct bt_hci_rp_read_rssi *)cmd_response_data;
*rssi = response->rssi; *rssi = response->rssi;
} }
@ -551,7 +550,7 @@ 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); int result = send_command(BT_HCI_OP_LE_READ_BUFFER_SIZE, 0, NULL);
if (result == HCI_OK) { if (result == HCI_OK) {
struct bt_hci_rp_le_read_buffer_size *response = struct bt_hci_rp_le_read_buffer_size *response =
(struct bt_hci_rp_le_read_buffer_size *) cmd_response_data; (struct bt_hci_rp_le_read_buffer_size *)cmd_response_data;
*le_max_len = response->le_max_len; *le_max_len = response->le_max_len;
*le_max_num = response->le_max_num; *le_max_num = response->le_max_num;
} }
@ -563,7 +562,7 @@ hci_result_t hci_read_buffer_size(uint16_t *acl_max_len, uint8_t *sco_max_len, u
int result = send_command(BT_HCI_OP_READ_BUFFER_SIZE, 0, NULL); int result = send_command(BT_HCI_OP_READ_BUFFER_SIZE, 0, NULL);
if (result == HCI_OK) { if (result == HCI_OK) {
struct bt_hci_rp_read_buffer_size *response = struct bt_hci_rp_read_buffer_size *response =
(struct bt_hci_rp_read_buffer_size *) cmd_response_data; (struct bt_hci_rp_read_buffer_size *)cmd_response_data;
*acl_max_len = response->acl_max_len; *acl_max_len = response->acl_max_len;
*sco_max_len = response->sco_max_len; *sco_max_len = response->sco_max_len;
*acl_max_num = response->acl_max_num; *acl_max_num = response->acl_max_num;
@ -608,10 +607,10 @@ hci_result_t hci_le_set_extended_advertising_parameters(uint8_t handle, uint16_t
.scan_req_notify_enable = scan_req_notify_enable, .scan_req_notify_enable = scan_req_notify_enable,
}; };
// Assumes little-endian. // Assumes little-endian.
memcpy(params.prim_min_interval, (void *) &prim_min_interval, memcpy(params.prim_min_interval, (void *)&prim_min_interval,
sizeof_field(struct bt_hci_cp_le_set_ext_adv_param, 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, memcpy(params.prim_max_interval, (void *)&prim_max_interval,
sizeof_field(struct bt_hci_cp_le_set_ext_adv_param, 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)); 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); return send_command(BT_HCI_OP_LE_SET_EXT_ADV_PARAM, sizeof(params), &params);
} }
@ -620,7 +619,7 @@ hci_result_t hci_le_read_maximum_advertising_data_length(uint16_t *max_adv_data_
int result = send_command(BT_HCI_OP_LE_READ_MAX_ADV_DATA_LEN, 0, NULL); int result = send_command(BT_HCI_OP_LE_READ_MAX_ADV_DATA_LEN, 0, NULL);
if (result == HCI_OK) { 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 *response =
(struct bt_hci_rp_le_read_max_adv_data_len *) cmd_response_data; (struct bt_hci_rp_le_read_max_adv_data_len *)cmd_response_data;
*max_adv_data_len = response->max_adv_data_len; *max_adv_data_len = response->max_adv_data_len;
} }
@ -631,9 +630,9 @@ 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); int result = send_command(BT_HCI_OP_LE_READ_LOCAL_FEATURES, 0, NULL);
if (result == HCI_OK) { if (result == HCI_OK) {
struct bt_hci_rp_le_read_local_features *response = struct bt_hci_rp_le_read_local_features *response =
(struct bt_hci_rp_le_read_local_features *) cmd_response_data; (struct bt_hci_rp_le_read_local_features *)cmd_response_data;
memcpy(features, response->features, memcpy(features, response->features,
sizeof_field(struct bt_hci_rp_le_read_local_features, features)); sizeof_field(struct bt_hci_rp_le_read_local_features, features));
} }
return result; return result;
@ -685,7 +684,7 @@ hci_result_t hci_le_set_advertising_enable(uint8_t 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[]) { 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) + uint8_t params[sizeof(struct bt_hci_cp_le_set_ext_adv_enable) +
set_num * (sizeof(struct bt_hci_ext_adv_set))]; 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; 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->enable = enable;
params_p->set_num = set_num; params_p->set_num = set_num;
for (size_t i = 0; i < set_num; i++) { for (size_t i = 0; i < set_num; i++) {

View File

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

View File

@ -29,40 +29,36 @@
/** Bluetooth Device Address */ /** Bluetooth Device Address */
typedef struct { typedef struct {
uint8_t val[6]; uint8_t val[6];
} bt_addr_t; } bt_addr_t;
/** Bluetooth LE Device Address */ /** Bluetooth LE Device Address */
typedef struct { typedef struct {
uint8_t type; uint8_t type;
bt_addr_t a; bt_addr_t a;
} bt_addr_le_t; } bt_addr_le_t;
#define BT_ADDR_ANY ((bt_addr_t[]) { { { 0, 0, 0, 0, 0, 0 } } }) #define BT_ADDR_ANY ((bt_addr_t[]) { { { 0, 0, 0, 0, 0, 0 } } })
#define BT_ADDR_NONE ((bt_addr_t[]) { { \ #define BT_ADDR_NONE ((bt_addr_t[]) { { \
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } }) { 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_ANY ((bt_addr_le_t[]) { { 0, { { 0, 0, 0, 0, 0, 0 } } } })
#define BT_ADDR_LE_NONE ((bt_addr_le_t[]) { { 0, \ #define BT_ADDR_LE_NONE ((bt_addr_le_t[]) { { 0, \
{ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } } }) { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } } })
static inline int bt_addr_cmp(const bt_addr_t *a, const bt_addr_t *b) static inline int bt_addr_cmp(const bt_addr_t *a, const bt_addr_t *b) {
{ return memcmp(a, b, sizeof(*a));
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) 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));
return memcmp(a, b, sizeof(*a));
} }
static inline void bt_addr_copy(bt_addr_t *dst, const bt_addr_t *src) static inline void bt_addr_copy(bt_addr_t *dst, const bt_addr_t *src) {
{ memcpy(dst, src, sizeof(*dst));
memcpy(dst, src, sizeof(*dst));
} }
static inline void bt_addr_le_copy(bt_addr_le_t *dst, const bt_addr_le_t *src) static inline void bt_addr_le_copy(bt_addr_le_t *dst, const bt_addr_le_t *src) {
{ memcpy(dst, src, sizeof(*dst));
memcpy(dst, src, sizeof(*dst));
} }
#define BT_ADDR_IS_RPA(a) (((a)->val[5] & 0xc0) == 0x40) #define BT_ADDR_IS_RPA(a) (((a)->val[5] & 0xc0) == 0x40)
@ -76,22 +72,20 @@ static inline void bt_addr_le_copy(bt_addr_le_t *dst, const bt_addr_le_t *src)
int bt_addr_le_create_nrpa(bt_addr_le_t *addr); int bt_addr_le_create_nrpa(bt_addr_le_t *addr);
int bt_addr_le_create_static(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) static inline bool bt_addr_le_is_rpa(const bt_addr_le_t *addr) {
{ if (addr->type != BT_ADDR_LE_RANDOM) {
if (addr->type != BT_ADDR_LE_RANDOM) { return false;
return false; }
}
return BT_ADDR_IS_RPA(&addr->a); return BT_ADDR_IS_RPA(&addr->a);
} }
static inline bool bt_addr_le_is_identity(const bt_addr_le_t *addr) static inline bool bt_addr_le_is_identity(const bt_addr_le_t *addr) {
{ if (addr->type == BT_ADDR_LE_PUBLIC) {
if (addr->type == BT_ADDR_LE_PUBLIC) { return true;
return true; }
}
return BT_ADDR_IS_STATIC(&addr->a); return BT_ADDR_IS_STATIC(&addr->a);
} }
/** /**

View File

@ -12,30 +12,30 @@
#define ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_ #define ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_
/* Error codes for Error response PDU */ /* Error codes for Error response PDU */
#define BT_ATT_ERR_INVALID_HANDLE 0x01 #define BT_ATT_ERR_INVALID_HANDLE 0x01
#define BT_ATT_ERR_READ_NOT_PERMITTED 0x02 #define BT_ATT_ERR_READ_NOT_PERMITTED 0x02
#define BT_ATT_ERR_WRITE_NOT_PERMITTED 0x03 #define BT_ATT_ERR_WRITE_NOT_PERMITTED 0x03
#define BT_ATT_ERR_INVALID_PDU 0x04 #define BT_ATT_ERR_INVALID_PDU 0x04
#define BT_ATT_ERR_AUTHENTICATION 0x05 #define BT_ATT_ERR_AUTHENTICATION 0x05
#define BT_ATT_ERR_NOT_SUPPORTED 0x06 #define BT_ATT_ERR_NOT_SUPPORTED 0x06
#define BT_ATT_ERR_INVALID_OFFSET 0x07 #define BT_ATT_ERR_INVALID_OFFSET 0x07
#define BT_ATT_ERR_AUTHORIZATION 0x08 #define BT_ATT_ERR_AUTHORIZATION 0x08
#define BT_ATT_ERR_PREPARE_QUEUE_FULL 0x09 #define BT_ATT_ERR_PREPARE_QUEUE_FULL 0x09
#define BT_ATT_ERR_ATTRIBUTE_NOT_FOUND 0x0a #define BT_ATT_ERR_ATTRIBUTE_NOT_FOUND 0x0a
#define BT_ATT_ERR_ATTRIBUTE_NOT_LONG 0x0b #define BT_ATT_ERR_ATTRIBUTE_NOT_LONG 0x0b
#define BT_ATT_ERR_ENCRYPTION_KEY_SIZE 0x0c #define BT_ATT_ERR_ENCRYPTION_KEY_SIZE 0x0c
#define BT_ATT_ERR_INVALID_ATTRIBUTE_LEN 0x0d #define BT_ATT_ERR_INVALID_ATTRIBUTE_LEN 0x0d
#define BT_ATT_ERR_UNLIKELY 0x0e #define BT_ATT_ERR_UNLIKELY 0x0e
#define BT_ATT_ERR_INSUFFICIENT_ENCRYPTION 0x0f #define BT_ATT_ERR_INSUFFICIENT_ENCRYPTION 0x0f
#define BT_ATT_ERR_UNSUPPORTED_GROUP_TYPE 0x10 #define BT_ATT_ERR_UNSUPPORTED_GROUP_TYPE 0x10
#define BT_ATT_ERR_INSUFFICIENT_RESOURCES 0x11 #define BT_ATT_ERR_INSUFFICIENT_RESOURCES 0x11
#define BT_ATT_ERR_DB_OUT_OF_SYNC 0x12 #define BT_ATT_ERR_DB_OUT_OF_SYNC 0x12
#define BT_ATT_ERR_VALUE_NOT_ALLOWED 0x13 #define BT_ATT_ERR_VALUE_NOT_ALLOWED 0x13
/* Common Profile Error Codes (from CSS) */ /* Common Profile Error Codes (from CSS) */
#define BT_ATT_ERR_WRITE_REQ_REJECTED 0xfc #define BT_ATT_ERR_WRITE_REQ_REJECTED 0xfc
#define BT_ATT_ERR_CCC_IMPROPER_CONF 0xfd #define BT_ATT_ERR_CCC_IMPROPER_CONF 0xfd
#define BT_ATT_ERR_PROCEDURE_IN_PROGRESS 0xfe #define BT_ATT_ERR_PROCEDURE_IN_PROGRESS 0xfe
#define BT_ATT_ERR_OUT_OF_RANGE 0xff #define BT_ATT_ERR_OUT_OF_RANGE 0xff
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_ */ #endif /* ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_ */

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -50,20 +50,20 @@ extern "C" {
int bt_send(struct net_buf *buf); int bt_send(struct net_buf *buf);
enum { enum {
/** Passthrough mode /** Passthrough mode
* *
* While in this mode the buffers are passed as is between the stack * While in this mode the buffers are passed as is between the stack
* and the driver. * and the driver.
*/ */
BT_HCI_RAW_MODE_PASSTHROUGH = 0x00, BT_HCI_RAW_MODE_PASSTHROUGH = 0x00,
/** H:4 mode /** H:4 mode
* *
* While in this mode H:4 headers will added into the buffers * 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 * according to the buffer type when coming from the stack and will be
* removed and used to set the buffer type. * removed and used to set the buffer type.
*/ */
BT_HCI_RAW_MODE_H4 = 0x01, BT_HCI_RAW_MODE_H4 = 0x01,
}; };
/** @brief Set Bluetooth RAW channel mode /** @brief Set Bluetooth RAW channel mode
@ -93,31 +93,31 @@ uint8_t bt_hci_raw_get_mode(void);
* @param _func Handler function to be called. * @param _func Handler function to be called.
*/ */
#define BT_HCI_RAW_CMD_EXT(_op, _min_len, _func) \ #define BT_HCI_RAW_CMD_EXT(_op, _min_len, _func) \
{ \ { \
.op = _op, \ .op = _op, \
.min_len = _min_len, \ .min_len = _min_len, \
.func = _func, \ .func = _func, \
} }
struct bt_hci_raw_cmd_ext { struct bt_hci_raw_cmd_ext {
/** Opcode of the command */ /** Opcode of the command */
uint16_t op; uint16_t op;
/** Minimal length of the command */ /** Minimal length of the command */
size_t min_len; size_t min_len;
/** Handler function. /** Handler function.
* *
* Handler function to be called when a command is intercepted. * Handler function to be called when a command is intercepted.
* *
* @param buf Buffer containing the command. * @param buf Buffer containing the command.
* *
* @return HCI Status code or BT_HCI_ERR_EXT_HANDLED if command has * @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 * been handled already and a response has been sent as oppose to
* BT_HCI_ERR_SUCCESS which just indicates that the command can be * BT_HCI_ERR_SUCCESS which just indicates that the command can be
* sent to the controller to be processed. * sent to the controller to be processed.
*/ */
uint8_t (*func)(struct net_buf *buf); uint8_t (*func)(struct net_buf *buf);
}; };
/** @brief Register Bluetooth RAW command extension table /** @brief Register Bluetooth RAW command extension table

View File

@ -32,11 +32,11 @@ extern "C" {
#define BT_VS_CMD_BIT_READ_TX_POWER 14 #define BT_VS_CMD_BIT_READ_TX_POWER 14
#define BT_VS_CMD_SUP_FEAT(cmd) BT_LE_FEAT_TEST(cmd, \ #define BT_VS_CMD_SUP_FEAT(cmd) BT_LE_FEAT_TEST(cmd, \
BT_VS_CMD_BIT_SUP_FEAT) BT_VS_CMD_BIT_SUP_FEAT)
#define BT_VS_CMD_READ_STATIC_ADDRS(cmd) BT_LE_FEAT_TEST(cmd, \ #define BT_VS_CMD_READ_STATIC_ADDRS(cmd) BT_LE_FEAT_TEST(cmd, \
BT_VS_CMD_BIT_READ_STATIC_ADDRS) BT_VS_CMD_BIT_READ_STATIC_ADDRS)
#define BT_VS_CMD_READ_KEY_ROOTS(cmd) BT_LE_FEAT_TEST(cmd, \ #define BT_VS_CMD_READ_KEY_ROOTS(cmd) BT_LE_FEAT_TEST(cmd, \
BT_VS_CMD_BIT_READ_KEY_ROOTS) BT_VS_CMD_BIT_READ_KEY_ROOTS)
#define BT_HCI_VS_HW_PLAT_INTEL 0x0001 #define BT_HCI_VS_HW_PLAT_INTEL 0x0001
#define BT_HCI_VS_HW_PLAT_NORDIC 0x0002 #define BT_HCI_VS_HW_PLAT_NORDIC 0x0002
@ -50,44 +50,44 @@ extern "C" {
#define BT_HCI_VS_FW_VAR_VS_CTLR 0x0002 #define BT_HCI_VS_FW_VAR_VS_CTLR 0x0002
#define BT_HCI_VS_FW_VAR_FW_LOADER 0x0003 #define BT_HCI_VS_FW_VAR_FW_LOADER 0x0003
#define BT_HCI_VS_FW_VAR_RESCUE_IMG 0x0004 #define BT_HCI_VS_FW_VAR_RESCUE_IMG 0x0004
#define BT_HCI_OP_VS_READ_VERSION_INFO BT_OP(BT_OGF_VS, 0x0001) #define BT_HCI_OP_VS_READ_VERSION_INFO BT_OP(BT_OGF_VS, 0x0001)
struct bt_hci_rp_vs_read_version_info { struct bt_hci_rp_vs_read_version_info {
uint8_t status; uint8_t status;
uint16_t hw_platform; uint16_t hw_platform;
uint16_t hw_variant; uint16_t hw_variant;
uint8_t fw_variant; uint8_t fw_variant;
uint8_t fw_version; uint8_t fw_version;
uint16_t fw_revision; uint16_t fw_revision;
uint32_t fw_build; uint32_t fw_build;
} __packed; } __packed;
#define BT_HCI_OP_VS_READ_SUPPORTED_COMMANDS BT_OP(BT_OGF_VS, 0x0002) #define BT_HCI_OP_VS_READ_SUPPORTED_COMMANDS BT_OP(BT_OGF_VS, 0x0002)
struct bt_hci_rp_vs_read_supported_commands { struct bt_hci_rp_vs_read_supported_commands {
uint8_t status; uint8_t status;
uint8_t commands[64]; uint8_t commands[64];
} __packed; } __packed;
#define BT_HCI_OP_VS_READ_SUPPORTED_FEATURES BT_OP(BT_OGF_VS, 0x0003) #define BT_HCI_OP_VS_READ_SUPPORTED_FEATURES BT_OP(BT_OGF_VS, 0x0003)
struct bt_hci_rp_vs_read_supported_features { struct bt_hci_rp_vs_read_supported_features {
uint8_t status; uint8_t status;
uint8_t features[8]; uint8_t features[8];
} __packed; } __packed;
#define BT_HCI_OP_VS_SET_EVENT_MASK BT_OP(BT_OGF_VS, 0x0004) #define BT_HCI_OP_VS_SET_EVENT_MASK BT_OP(BT_OGF_VS, 0x0004)
struct bt_hci_cp_vs_set_event_mask { struct bt_hci_cp_vs_set_event_mask {
uint8_t event_mask[8]; uint8_t event_mask[8];
} __packed; } __packed;
#define BT_HCI_VS_RESET_SOFT 0x00 #define BT_HCI_VS_RESET_SOFT 0x00
#define BT_HCI_VS_RESET_HARD 0x01 #define BT_HCI_VS_RESET_HARD 0x01
#define BT_HCI_OP_VS_RESET BT_OP(BT_OGF_VS, 0x0005) #define BT_HCI_OP_VS_RESET BT_OP(BT_OGF_VS, 0x0005)
struct bt_hci_cp_vs_reset { struct bt_hci_cp_vs_reset {
uint8_t type; uint8_t type;
} __packed; } __packed;
#define BT_HCI_OP_VS_WRITE_BD_ADDR BT_OP(BT_OGF_VS, 0x0006) #define BT_HCI_OP_VS_WRITE_BD_ADDR BT_OP(BT_OGF_VS, 0x0006)
struct bt_hci_cp_vs_write_bd_addr { struct bt_hci_cp_vs_write_bd_addr {
bt_addr_t bdaddr; bt_addr_t bdaddr;
} __packed; } __packed;
#define BT_HCI_VS_TRACE_DISABLED 0x00 #define BT_HCI_VS_TRACE_DISABLED 0x00
@ -97,60 +97,60 @@ struct bt_hci_cp_vs_write_bd_addr {
#define BT_HCI_VS_TRACE_VDC 0x01 #define BT_HCI_VS_TRACE_VDC 0x01
#define BT_HCI_OP_VS_SET_TRACE_ENABLE BT_OP(BT_OGF_VS, 0x0007) #define BT_HCI_OP_VS_SET_TRACE_ENABLE BT_OP(BT_OGF_VS, 0x0007)
struct bt_hci_cp_vs_set_trace_enable { struct bt_hci_cp_vs_set_trace_enable {
uint8_t enable; uint8_t enable;
uint8_t type; uint8_t type;
} __packed; } __packed;
#define BT_HCI_OP_VS_READ_BUILD_INFO BT_OP(BT_OGF_VS, 0x0008) #define BT_HCI_OP_VS_READ_BUILD_INFO BT_OP(BT_OGF_VS, 0x0008)
struct bt_hci_rp_vs_read_build_info { struct bt_hci_rp_vs_read_build_info {
uint8_t status; uint8_t status;
uint8_t info[]; uint8_t info[];
} __packed; } __packed;
struct bt_hci_vs_static_addr { struct bt_hci_vs_static_addr {
bt_addr_t bdaddr; bt_addr_t bdaddr;
uint8_t ir[16]; uint8_t ir[16];
} __packed; } __packed;
#define BT_HCI_OP_VS_READ_STATIC_ADDRS BT_OP(BT_OGF_VS, 0x0009) #define BT_HCI_OP_VS_READ_STATIC_ADDRS BT_OP(BT_OGF_VS, 0x0009)
struct bt_hci_rp_vs_read_static_addrs { struct bt_hci_rp_vs_read_static_addrs {
uint8_t status; uint8_t status;
uint8_t num_addrs; uint8_t num_addrs;
struct bt_hci_vs_static_addr a[]; struct bt_hci_vs_static_addr a[];
} __packed; } __packed;
#define BT_HCI_OP_VS_READ_KEY_HIERARCHY_ROOTS BT_OP(BT_OGF_VS, 0x000a) #define BT_HCI_OP_VS_READ_KEY_HIERARCHY_ROOTS BT_OP(BT_OGF_VS, 0x000a)
struct bt_hci_rp_vs_read_key_hierarchy_roots { struct bt_hci_rp_vs_read_key_hierarchy_roots {
uint8_t status; uint8_t status;
uint8_t ir[16]; uint8_t ir[16];
uint8_t er[16]; uint8_t er[16];
} __packed; } __packed;
#define BT_HCI_OP_VS_READ_CHIP_TEMP BT_OP(BT_OGF_VS, 0x000b) #define BT_HCI_OP_VS_READ_CHIP_TEMP BT_OP(BT_OGF_VS, 0x000b)
struct bt_hci_rp_vs_read_chip_temp { struct bt_hci_rp_vs_read_chip_temp {
uint8_t status; uint8_t status;
int8_t temps; int8_t temps;
} __packed; } __packed;
struct bt_hci_vs_cmd { struct bt_hci_vs_cmd {
uint16_t vendor_id; uint16_t vendor_id;
uint16_t opcode_base; uint16_t opcode_base;
} __packed; } __packed;
#define BT_HCI_VS_VID_ANDROID 0x0001 #define BT_HCI_VS_VID_ANDROID 0x0001
#define BT_HCI_VS_VID_MICROSOFT 0x0002 #define BT_HCI_VS_VID_MICROSOFT 0x0002
#define BT_HCI_OP_VS_READ_HOST_STACK_CMDS BT_OP(BT_OGF_VS, 0x000c) #define BT_HCI_OP_VS_READ_HOST_STACK_CMDS BT_OP(BT_OGF_VS, 0x000c)
struct bt_hci_rp_vs_read_host_stack_cmds { struct bt_hci_rp_vs_read_host_stack_cmds {
uint8_t status; uint8_t status;
uint8_t num_cmds; uint8_t num_cmds;
struct bt_hci_vs_cmd c[]; struct bt_hci_vs_cmd c[];
} __packed; } __packed;
#define BT_HCI_VS_SCAN_REQ_REPORTS_DISABLED 0x00 #define BT_HCI_VS_SCAN_REQ_REPORTS_DISABLED 0x00
#define BT_HCI_VS_SCAN_REQ_REPORTS_ENABLED 0x01 #define BT_HCI_VS_SCAN_REQ_REPORTS_ENABLED 0x01
#define BT_HCI_OP_VS_SET_SCAN_REQ_REPORTS BT_OP(BT_OGF_VS, 0x000d) #define BT_HCI_OP_VS_SET_SCAN_REQ_REPORTS BT_OP(BT_OGF_VS, 0x000d)
struct bt_hci_cp_vs_set_scan_req_reports { struct bt_hci_cp_vs_set_scan_req_reports {
uint8_t enable; uint8_t enable;
} __packed; } __packed;
#define BT_HCI_VS_LL_HANDLE_TYPE_ADV 0x00 #define BT_HCI_VS_LL_HANDLE_TYPE_ADV 0x00
@ -159,37 +159,37 @@ struct bt_hci_cp_vs_set_scan_req_reports {
#define BT_HCI_VS_LL_TX_POWER_LEVEL_NO_PREF 0x7F #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) #define BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL BT_OP(BT_OGF_VS, 0x000e)
struct bt_hci_cp_vs_write_tx_power_level { struct bt_hci_cp_vs_write_tx_power_level {
uint8_t handle_type; uint8_t handle_type;
uint16_t handle; uint16_t handle;
int8_t tx_power_level; int8_t tx_power_level;
} __packed; } __packed;
struct bt_hci_rp_vs_write_tx_power_level { struct bt_hci_rp_vs_write_tx_power_level {
uint8_t status; uint8_t status;
uint8_t handle_type; uint8_t handle_type;
uint16_t handle; uint16_t handle;
int8_t selected_tx_power; int8_t selected_tx_power;
} __packed; } __packed;
#define BT_HCI_OP_VS_READ_TX_POWER_LEVEL BT_OP(BT_OGF_VS, 0x000f) #define BT_HCI_OP_VS_READ_TX_POWER_LEVEL BT_OP(BT_OGF_VS, 0x000f)
struct bt_hci_cp_vs_read_tx_power_level { struct bt_hci_cp_vs_read_tx_power_level {
uint8_t handle_type; uint8_t handle_type;
uint16_t handle; uint16_t handle;
} __packed; } __packed;
struct bt_hci_rp_vs_read_tx_power_level { struct bt_hci_rp_vs_read_tx_power_level {
uint8_t status; uint8_t status;
uint8_t handle_type; uint8_t handle_type;
uint16_t handle; uint16_t handle;
int8_t tx_power_level; int8_t tx_power_level;
} __packed; } __packed;
#define BT_HCI_OP_VS_READ_USB_TRANSPORT_MODE BT_OP(BT_OGF_VS, 0x0010) #define BT_HCI_OP_VS_READ_USB_TRANSPORT_MODE BT_OP(BT_OGF_VS, 0x0010)
struct bt_hci_rp_vs_read_usb_transport_mode { struct bt_hci_rp_vs_read_usb_transport_mode {
uint8_t status; uint8_t status;
uint8_t num_supported_modes; uint8_t num_supported_modes;
uint8_t supported_mode[]; uint8_t supported_mode[];
} __packed; } __packed;
#define BT_HCI_VS_USB_H2_MODE 0x00 #define BT_HCI_VS_USB_H2_MODE 0x00
@ -198,19 +198,19 @@ struct bt_hci_rp_vs_read_usb_transport_mode {
#define BT_HCI_OP_VS_SET_USB_TRANSPORT_MODE BT_OP(BT_OGF_VS, 0x0011) #define BT_HCI_OP_VS_SET_USB_TRANSPORT_MODE BT_OP(BT_OGF_VS, 0x0011)
struct bt_hci_cp_vs_set_usb_transport_mode { struct bt_hci_cp_vs_set_usb_transport_mode {
uint8_t mode; uint8_t mode;
} __packed; } __packed;
/* Events */ /* Events */
struct bt_hci_evt_vs { struct bt_hci_evt_vs {
uint8_t subevent; uint8_t subevent;
} __packed; } __packed;
#define BT_HCI_EVT_VS_FATAL_ERROR 0x02 #define BT_HCI_EVT_VS_FATAL_ERROR 0x02
struct bt_hci_evt_vs_fatal_error { struct bt_hci_evt_vs_fatal_error {
uint64_t pc; uint64_t pc;
uint8_t err_info[]; uint8_t err_info[];
} __packed; } __packed;
#define BT_HCI_VS_TRACE_LMP_TX 0x01 #define BT_HCI_VS_TRACE_LMP_TX 0x01
@ -220,14 +220,14 @@ struct bt_hci_evt_vs_fatal_error {
#define BT_HCI_VS_TRACE_LE_CONN_IND 0x05 #define BT_HCI_VS_TRACE_LE_CONN_IND 0x05
#define BT_HCI_EVT_VS_TRACE_INFO 0x03 #define BT_HCI_EVT_VS_TRACE_INFO 0x03
struct bt_hci_evt_vs_trace_info { struct bt_hci_evt_vs_trace_info {
uint8_t type; uint8_t type;
uint8_t data[]; uint8_t data[];
} __packed; } __packed;
#define BT_HCI_EVT_VS_SCAN_REQ_RX 0x04 #define BT_HCI_EVT_VS_SCAN_REQ_RX 0x04
struct bt_hci_evt_vs_scan_req_rx { struct bt_hci_evt_vs_scan_req_rx {
bt_addr_le_t addr; bt_addr_le_t addr;
int8_t rssi; int8_t rssi;
} __packed; } __packed;
/* Event mask bits */ /* Event mask bits */
@ -243,133 +243,133 @@ struct bt_hci_evt_vs_scan_req_rx {
#define BT_HCI_MESH_EVT_PREFIX 0xF0 #define BT_HCI_MESH_EVT_PREFIX 0xF0
struct bt_hci_cp_mesh { struct bt_hci_cp_mesh {
uint8_t opcode; uint8_t opcode;
} __packed; } __packed;
#define BT_HCI_OC_MESH_GET_OPTS 0x00 #define BT_HCI_OC_MESH_GET_OPTS 0x00
struct bt_hci_rp_mesh_get_opts { struct bt_hci_rp_mesh_get_opts {
uint8_t status; uint8_t status;
uint8_t opcode; uint8_t opcode;
uint8_t revision; uint8_t revision;
uint8_t ch_map; uint8_t ch_map;
int8_t min_tx_power; int8_t min_tx_power;
int8_t max_tx_power; int8_t max_tx_power;
uint8_t max_scan_filter; uint8_t max_scan_filter;
uint8_t max_filter_pattern; uint8_t max_filter_pattern;
uint8_t max_adv_slot; uint8_t max_adv_slot;
uint8_t max_tx_window; uint8_t max_tx_window;
uint8_t evt_prefix_len; uint8_t evt_prefix_len;
uint8_t evt_prefix; uint8_t evt_prefix;
} __packed; } __packed;
#define BT_HCI_MESH_PATTERN_LEN_MAX 0x0f #define BT_HCI_MESH_PATTERN_LEN_MAX 0x0f
#define BT_HCI_OC_MESH_SET_SCAN_FILTER 0x01 #define BT_HCI_OC_MESH_SET_SCAN_FILTER 0x01
struct bt_hci_mesh_pattern { struct bt_hci_mesh_pattern {
uint8_t pattern_len; uint8_t pattern_len;
uint8_t pattern[]; uint8_t pattern[];
} __packed; } __packed;
struct bt_hci_cp_mesh_set_scan_filter { struct bt_hci_cp_mesh_set_scan_filter {
uint8_t scan_filter; uint8_t scan_filter;
uint8_t filter_dup; uint8_t filter_dup;
uint8_t num_patterns; uint8_t num_patterns;
struct bt_hci_mesh_pattern patterns[]; struct bt_hci_mesh_pattern patterns[];
} __packed; } __packed;
struct bt_hci_rp_mesh_set_scan_filter { struct bt_hci_rp_mesh_set_scan_filter {
uint8_t status; uint8_t status;
uint8_t opcode; uint8_t opcode;
uint8_t scan_filter; uint8_t scan_filter;
} __packed; } __packed;
#define BT_HCI_OC_MESH_ADVERTISE 0x02 #define BT_HCI_OC_MESH_ADVERTISE 0x02
struct bt_hci_cp_mesh_advertise { struct bt_hci_cp_mesh_advertise {
uint8_t adv_slot; uint8_t adv_slot;
uint8_t own_addr_type; uint8_t own_addr_type;
bt_addr_t random_addr; bt_addr_t random_addr;
uint8_t ch_map; uint8_t ch_map;
int8_t tx_power; int8_t tx_power;
uint8_t min_tx_delay; uint8_t min_tx_delay;
uint8_t max_tx_delay; uint8_t max_tx_delay;
uint8_t retx_count; uint8_t retx_count;
uint8_t retx_interval; uint8_t retx_interval;
uint8_t scan_delay; uint8_t scan_delay;
uint16_t scan_duration; uint16_t scan_duration;
uint8_t scan_filter; uint8_t scan_filter;
uint8_t data_len; uint8_t data_len;
uint8_t data[31]; uint8_t data[31];
} __packed; } __packed;
struct bt_hci_rp_mesh_advertise { struct bt_hci_rp_mesh_advertise {
uint8_t status; uint8_t status;
uint8_t opcode; uint8_t opcode;
uint8_t adv_slot; uint8_t adv_slot;
} __packed; } __packed;
#define BT_HCI_OC_MESH_ADVERTISE_TIMED 0x03 #define BT_HCI_OC_MESH_ADVERTISE_TIMED 0x03
struct bt_hci_cp_mesh_advertise_timed { struct bt_hci_cp_mesh_advertise_timed {
uint8_t adv_slot; uint8_t adv_slot;
uint8_t own_addr_type; uint8_t own_addr_type;
bt_addr_t random_addr; bt_addr_t random_addr;
uint8_t ch_map; uint8_t ch_map;
int8_t tx_power; int8_t tx_power;
uint8_t retx_count; uint8_t retx_count;
uint8_t retx_interval; uint8_t retx_interval;
uint32_t instant; uint32_t instant;
uint16_t tx_delay; uint16_t tx_delay;
uint16_t tx_window; uint16_t tx_window;
uint8_t data_len; uint8_t data_len;
uint8_t data[31]; uint8_t data[31];
} __packed; } __packed;
struct bt_hci_rp_mesh_advertise_timed { struct bt_hci_rp_mesh_advertise_timed {
uint8_t status; uint8_t status;
uint8_t opcode; uint8_t opcode;
uint8_t adv_slot; uint8_t adv_slot;
} __packed; } __packed;
#define BT_HCI_OC_MESH_ADVERTISE_CANCEL 0x04 #define BT_HCI_OC_MESH_ADVERTISE_CANCEL 0x04
struct bt_hci_cp_mesh_advertise_cancel { struct bt_hci_cp_mesh_advertise_cancel {
uint8_t adv_slot; uint8_t adv_slot;
} __packed; } __packed;
struct bt_hci_rp_mesh_advertise_cancel { struct bt_hci_rp_mesh_advertise_cancel {
uint8_t status; uint8_t status;
uint8_t opcode; uint8_t opcode;
uint8_t adv_slot; uint8_t adv_slot;
} __packed; } __packed;
#define BT_HCI_OC_MESH_SET_SCANNING 0x05 #define BT_HCI_OC_MESH_SET_SCANNING 0x05
struct bt_hci_cp_mesh_set_scanning { struct bt_hci_cp_mesh_set_scanning {
uint8_t enable; uint8_t enable;
uint8_t ch_map; uint8_t ch_map;
uint8_t scan_filter; uint8_t scan_filter;
} __packed; } __packed;
struct bt_hci_rp_mesh_set_scanning { struct bt_hci_rp_mesh_set_scanning {
uint8_t status; uint8_t status;
uint8_t opcode; uint8_t opcode;
} __packed; } __packed;
/* Events */ /* Events */
struct bt_hci_evt_mesh { struct bt_hci_evt_mesh {
uint8_t prefix; uint8_t prefix;
uint8_t subevent; uint8_t subevent;
} __packed; } __packed;
#define BT_HCI_EVT_MESH_ADV_COMPLETE 0x00 #define BT_HCI_EVT_MESH_ADV_COMPLETE 0x00
struct bt_hci_evt_mesh_adv_complete { struct bt_hci_evt_mesh_adv_complete {
uint8_t adv_slot; uint8_t adv_slot;
} __packed; } __packed;
#define BT_HCI_EVT_MESH_SCANNING_REPORT 0x01 #define BT_HCI_EVT_MESH_SCANNING_REPORT 0x01
struct bt_hci_evt_mesh_scan_report { struct bt_hci_evt_mesh_scan_report {
bt_addr_le_t addr; bt_addr_le_t addr;
uint8_t chan; uint8_t chan;
int8_t rssi; int8_t rssi;
uint32_t instant; uint32_t instant;
uint8_t data_len; uint8_t data_len;
uint8_t data[]; uint8_t data[];
} __packed; } __packed;
struct bt_hci_evt_mesh_scanning_report { struct bt_hci_evt_mesh_scanning_report {
uint8_t num_reports; uint8_t num_reports;
struct bt_hci_evt_mesh_scan_report reports[]; struct bt_hci_evt_mesh_scan_report reports[];
} __packed; } __packed;
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -15,8 +15,8 @@
#include <string.h> #include <string.h>
enum l2cap_conn_list_action { enum l2cap_conn_list_action {
BT_L2CAP_CHAN_LOOKUP, BT_L2CAP_CHAN_LOOKUP,
BT_L2CAP_CHAN_DETACH, BT_L2CAP_CHAN_DETACH,
}; };
#define BT_L2CAP_CID_BR_SIG 0x0001 #define BT_L2CAP_CID_BR_SIG 0x0001
@ -28,14 +28,14 @@ enum l2cap_conn_list_action {
#define BT_L2CAP_PSM_RFCOMM 0x0003 #define BT_L2CAP_PSM_RFCOMM 0x0003
struct bt_l2cap_hdr { struct bt_l2cap_hdr {
uint16_t len; uint16_t len;
uint16_t cid; uint16_t cid;
} __packed; } __packed;
struct bt_l2cap_sig_hdr { struct bt_l2cap_sig_hdr {
uint8_t code; uint8_t code;
uint8_t ident; uint8_t ident;
uint16_t len; uint16_t len;
} __packed; } __packed;
#define BT_L2CAP_REJ_NOT_UNDERSTOOD 0x0000 #define BT_L2CAP_REJ_NOT_UNDERSTOOD 0x0000
@ -44,19 +44,19 @@ struct bt_l2cap_sig_hdr {
#define BT_L2CAP_CMD_REJECT 0x01 #define BT_L2CAP_CMD_REJECT 0x01
struct bt_l2cap_cmd_reject { struct bt_l2cap_cmd_reject {
uint16_t reason; uint16_t reason;
uint8_t data[]; uint8_t data[];
} __packed; } __packed;
struct bt_l2cap_cmd_reject_cid_data { struct bt_l2cap_cmd_reject_cid_data {
uint16_t scid; uint16_t scid;
uint16_t dcid; uint16_t dcid;
} __packed; } __packed;
#define BT_L2CAP_CONN_REQ 0x02 #define BT_L2CAP_CONN_REQ 0x02
struct bt_l2cap_conn_req { struct bt_l2cap_conn_req {
uint16_t psm; uint16_t psm;
uint16_t scid; uint16_t scid;
} __packed; } __packed;
/* command statuses in reposnse */ /* command statuses in reposnse */
@ -74,10 +74,10 @@ struct bt_l2cap_conn_req {
#define BT_L2CAP_CONN_RSP 0x03 #define BT_L2CAP_CONN_RSP 0x03
struct bt_l2cap_conn_rsp { struct bt_l2cap_conn_rsp {
uint16_t dcid; uint16_t dcid;
uint16_t scid; uint16_t scid;
uint16_t result; uint16_t result;
uint16_t status; uint16_t status;
} __packed; } __packed;
#define BT_L2CAP_CONF_SUCCESS 0x0000 #define BT_L2CAP_CONF_SUCCESS 0x0000
@ -86,17 +86,17 @@ struct bt_l2cap_conn_rsp {
#define BT_L2CAP_CONF_REQ 0x04 #define BT_L2CAP_CONF_REQ 0x04
struct bt_l2cap_conf_req { struct bt_l2cap_conf_req {
uint16_t dcid; uint16_t dcid;
uint16_t flags; uint16_t flags;
uint8_t data[]; uint8_t data[];
} __packed; } __packed;
#define BT_L2CAP_CONF_RSP 0x05 #define BT_L2CAP_CONF_RSP 0x05
struct bt_l2cap_conf_rsp { struct bt_l2cap_conf_rsp {
uint16_t scid; uint16_t scid;
uint16_t flags; uint16_t flags;
uint16_t result; uint16_t result;
uint8_t data[]; uint8_t data[];
} __packed; } __packed;
/* Option type used by MTU config request data */ /* Option type used by MTU config request data */
@ -106,21 +106,21 @@ struct bt_l2cap_conf_rsp {
#define BT_L2CAP_CONF_MASK 0x7f #define BT_L2CAP_CONF_MASK 0x7f
struct bt_l2cap_conf_opt { struct bt_l2cap_conf_opt {
uint8_t type; uint8_t type;
uint8_t len; uint8_t len;
uint8_t data[]; uint8_t data[];
} __packed; } __packed;
#define BT_L2CAP_DISCONN_REQ 0x06 #define BT_L2CAP_DISCONN_REQ 0x06
struct bt_l2cap_disconn_req { struct bt_l2cap_disconn_req {
uint16_t dcid; uint16_t dcid;
uint16_t scid; uint16_t scid;
} __packed; } __packed;
#define BT_L2CAP_DISCONN_RSP 0x07 #define BT_L2CAP_DISCONN_RSP 0x07
struct bt_l2cap_disconn_rsp { struct bt_l2cap_disconn_rsp {
uint16_t dcid; uint16_t dcid;
uint16_t scid; uint16_t scid;
} __packed; } __packed;
#define BT_L2CAP_INFO_FEAT_MASK 0x0002 #define BT_L2CAP_INFO_FEAT_MASK 0x0002
@ -128,7 +128,7 @@ struct bt_l2cap_disconn_rsp {
#define BT_L2CAP_INFO_REQ 0x0a #define BT_L2CAP_INFO_REQ 0x0a
struct bt_l2cap_info_req { struct bt_l2cap_info_req {
uint16_t type; uint16_t type;
} __packed; } __packed;
/* info result */ /* info result */
@ -137,17 +137,17 @@ struct bt_l2cap_info_req {
#define BT_L2CAP_INFO_RSP 0x0b #define BT_L2CAP_INFO_RSP 0x0b
struct bt_l2cap_info_rsp { struct bt_l2cap_info_rsp {
uint16_t type; uint16_t type;
uint16_t result; uint16_t result;
uint8_t data[]; uint8_t data[];
} __packed; } __packed;
#define BT_L2CAP_CONN_PARAM_REQ 0x12 #define BT_L2CAP_CONN_PARAM_REQ 0x12
struct bt_l2cap_conn_param_req { struct bt_l2cap_conn_param_req {
uint16_t min_interval; uint16_t min_interval;
uint16_t max_interval; uint16_t max_interval;
uint16_t latency; uint16_t latency;
uint16_t timeout; uint16_t timeout;
} __packed; } __packed;
#define BT_L2CAP_CONN_PARAM_ACCEPTED 0x0000 #define BT_L2CAP_CONN_PARAM_ACCEPTED 0x0000
@ -155,16 +155,16 @@ struct bt_l2cap_conn_param_req {
#define BT_L2CAP_CONN_PARAM_RSP 0x13 #define BT_L2CAP_CONN_PARAM_RSP 0x13
struct bt_l2cap_conn_param_rsp { struct bt_l2cap_conn_param_rsp {
uint16_t result; uint16_t result;
} __packed; } __packed;
#define BT_L2CAP_LE_CONN_REQ 0x14 #define BT_L2CAP_LE_CONN_REQ 0x14
struct bt_l2cap_le_conn_req { struct bt_l2cap_le_conn_req {
uint16_t psm; uint16_t psm;
uint16_t scid; uint16_t scid;
uint16_t mtu; uint16_t mtu;
uint16_t mps; uint16_t mps;
uint16_t credits; uint16_t credits;
} __packed; } __packed;
/* valid results in conn response on LE */ /* valid results in conn response on LE */
@ -182,42 +182,42 @@ struct bt_l2cap_le_conn_req {
#define BT_L2CAP_LE_CONN_RSP 0x15 #define BT_L2CAP_LE_CONN_RSP 0x15
struct bt_l2cap_le_conn_rsp { struct bt_l2cap_le_conn_rsp {
uint16_t dcid; uint16_t dcid;
uint16_t mtu; uint16_t mtu;
uint16_t mps; uint16_t mps;
uint16_t credits; uint16_t credits;
uint16_t result; uint16_t result;
} __packed; } __packed;
#define BT_L2CAP_LE_CREDITS 0x16 #define BT_L2CAP_LE_CREDITS 0x16
struct bt_l2cap_le_credits { struct bt_l2cap_le_credits {
uint16_t cid; uint16_t cid;
uint16_t credits; uint16_t credits;
} __packed; } __packed;
#define BT_L2CAP_ECRED_CONN_REQ 0x17 #define BT_L2CAP_ECRED_CONN_REQ 0x17
struct bt_l2cap_ecred_conn_req { struct bt_l2cap_ecred_conn_req {
uint16_t psm; uint16_t psm;
uint16_t mtu; uint16_t mtu;
uint16_t mps; uint16_t mps;
uint16_t credits; uint16_t credits;
uint16_t scid[]; uint16_t scid[];
} __packed; } __packed;
#define BT_L2CAP_ECRED_CONN_RSP 0x18 #define BT_L2CAP_ECRED_CONN_RSP 0x18
struct bt_l2cap_ecred_conn_rsp { struct bt_l2cap_ecred_conn_rsp {
uint16_t mtu; uint16_t mtu;
uint16_t mps; uint16_t mps;
uint16_t credits; uint16_t credits;
uint16_t result; uint16_t result;
uint16_t dcid[]; uint16_t dcid[];
} __packed; } __packed;
#define BT_L2CAP_ECRED_RECONF_REQ 0x19 #define BT_L2CAP_ECRED_RECONF_REQ 0x19
struct bt_l2cap_ecred_reconf_req { struct bt_l2cap_ecred_reconf_req {
uint16_t mtu; uint16_t mtu;
uint16_t mps; uint16_t mps;
uint16_t scid[]; uint16_t scid[];
} __packed; } __packed;
#define BT_L2CAP_RECONF_SUCCESS 0x0000 #define BT_L2CAP_RECONF_SUCCESS 0x0000
@ -226,5 +226,5 @@ struct bt_l2cap_ecred_reconf_req {
#define BT_L2CAP_ECRED_RECONF_RSP 0x1a #define BT_L2CAP_ECRED_RECONF_RSP 0x1a
struct bt_l2cap_ecred_reconf_rsp { struct bt_l2cap_ecred_reconf_rsp {
uint16_t result; uint16_t result;
} __packed; } __packed;

View File

@ -57,7 +57,7 @@ STATIC void nibble_write(mp_soft_qspi_obj_t *self, uint8_t v) {
} }
STATIC int mp_soft_qspi_ioctl(void *self_in, uint32_t cmd) { STATIC int mp_soft_qspi_ioctl(void *self_in, uint32_t cmd) {
mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t*)self_in; mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t *)self_in;
switch (cmd) { switch (cmd) {
case MP_QSPI_IOCTL_INIT: case MP_QSPI_IOCTL_INIT:
@ -67,7 +67,7 @@ STATIC int mp_soft_qspi_ioctl(void *self_in, uint32_t cmd) {
// Configure pins // Configure pins
mp_hal_pin_write(self->clk, 0); mp_hal_pin_write(self->clk, 0);
mp_hal_pin_output(self->clk); mp_hal_pin_output(self->clk);
//mp_hal_pin_write(self->clk, 1); // mp_hal_pin_write(self->clk, 1);
mp_hal_pin_output(self->io0); mp_hal_pin_output(self->io0);
mp_hal_pin_input(self->io1); mp_hal_pin_input(self->io1);
mp_hal_pin_write(self->io2, 1); mp_hal_pin_write(self->io2, 1);
@ -155,19 +155,19 @@ STATIC void mp_soft_qspi_qwrite(mp_soft_qspi_obj_t *self, size_t len, const uint
SCK_LOW(self); SCK_LOW(self);
} }
//mp_hal_pin_input(self->io1); // mp_hal_pin_input(self->io1);
} }
STATIC void mp_soft_qspi_write_cmd_data(void *self_in, uint8_t cmd, size_t len, uint32_t data) { STATIC void mp_soft_qspi_write_cmd_data(void *self_in, uint8_t cmd, size_t len, uint32_t data) {
mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t*)self_in; mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t *)self_in;
uint32_t cmd_buf = cmd | data << 8; uint32_t cmd_buf = cmd | data << 8;
CS_LOW(self); CS_LOW(self);
mp_soft_qspi_transfer(self, 1 + len, (uint8_t*)&cmd_buf, NULL); mp_soft_qspi_transfer(self, 1 + len, (uint8_t *)&cmd_buf, NULL);
CS_HIGH(self); CS_HIGH(self);
} }
STATIC void mp_soft_qspi_write_cmd_addr_data(void *self_in, uint8_t cmd, uint32_t addr, size_t len, const uint8_t *src) { STATIC void mp_soft_qspi_write_cmd_addr_data(void *self_in, uint8_t cmd, uint32_t addr, size_t len, const uint8_t *src) {
mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t*)self_in; mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t *)self_in;
uint8_t cmd_buf[4] = {cmd, addr >> 16, addr >> 8, addr}; uint8_t cmd_buf[4] = {cmd, addr >> 16, addr >> 8, addr};
CS_LOW(self); CS_LOW(self);
mp_soft_qspi_transfer(self, 4, cmd_buf, NULL); mp_soft_qspi_transfer(self, 4, cmd_buf, NULL);
@ -176,16 +176,16 @@ STATIC void mp_soft_qspi_write_cmd_addr_data(void *self_in, uint8_t cmd, uint32_
} }
STATIC uint32_t mp_soft_qspi_read_cmd(void *self_in, uint8_t cmd, size_t len) { STATIC uint32_t mp_soft_qspi_read_cmd(void *self_in, uint8_t cmd, size_t len) {
mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t*)self_in; mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t *)self_in;
uint32_t cmd_buf = cmd; uint32_t cmd_buf = cmd;
CS_LOW(self); CS_LOW(self);
mp_soft_qspi_transfer(self, 1 + len, (uint8_t*)&cmd_buf, (uint8_t*)&cmd_buf); mp_soft_qspi_transfer(self, 1 + len, (uint8_t *)&cmd_buf, (uint8_t *)&cmd_buf);
CS_HIGH(self); CS_HIGH(self);
return cmd_buf >> 8; return cmd_buf >> 8;
} }
STATIC void mp_soft_qspi_read_cmd_qaddr_qdata(void *self_in, uint8_t cmd, uint32_t addr, size_t len, uint8_t *dest) { STATIC void mp_soft_qspi_read_cmd_qaddr_qdata(void *self_in, uint8_t cmd, uint32_t addr, size_t len, uint8_t *dest) {
mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t*)self_in; mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t *)self_in;
uint8_t cmd_buf[7] = {cmd, addr >> 16, addr >> 8, addr}; uint8_t cmd_buf[7] = {cmd, addr >> 16, addr >> 8, addr};
CS_LOW(self); CS_LOW(self);
mp_soft_qspi_transfer(self, 1, cmd_buf, NULL); mp_soft_qspi_transfer(self, 1, cmd_buf, NULL);

View File

@ -27,7 +27,7 @@
#include "drivers/bus/spi.h" #include "drivers/bus/spi.h"
int mp_soft_spi_ioctl(void *self_in, uint32_t cmd) { int mp_soft_spi_ioctl(void *self_in, uint32_t cmd) {
mp_soft_spi_obj_t *self = (mp_soft_spi_obj_t*)self_in; mp_soft_spi_obj_t *self = (mp_soft_spi_obj_t *)self_in;
switch (cmd) { switch (cmd) {
case MP_SPI_IOCTL_INIT: case MP_SPI_IOCTL_INIT:
@ -45,7 +45,7 @@ int mp_soft_spi_ioctl(void *self_in, uint32_t cmd) {
} }
void mp_soft_spi_transfer(void *self_in, size_t len, const uint8_t *src, uint8_t *dest) { void mp_soft_spi_transfer(void *self_in, size_t len, const uint8_t *src, uint8_t *dest) {
mp_soft_spi_obj_t *self = (mp_soft_spi_obj_t*)self_in; mp_soft_spi_obj_t *self = (mp_soft_spi_obj_t *)self_in;
uint32_t delay_half = self->delay_half; uint32_t delay_half = self->delay_half;
// only MSB transfer is implemented // only MSB transfer is implemented

View File

@ -50,9 +50,15 @@ STATIC mp_obj_t machine_mem_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t va
uintptr_t addr = MICROPY_MACHINE_MEM_GET_READ_ADDR(index, self->elem_size); uintptr_t addr = MICROPY_MACHINE_MEM_GET_READ_ADDR(index, self->elem_size);
uint32_t val; uint32_t val;
switch (self->elem_size) { switch (self->elem_size) {
case 1: val = (*(uint8_t*)addr); break; case 1:
case 2: val = (*(uint16_t*)addr); break; val = (*(uint8_t *)addr);
default: val = (*(uint32_t*)addr); break; break;
case 2:
val = (*(uint16_t *)addr);
break;
default:
val = (*(uint32_t *)addr);
break;
} }
return mp_obj_new_int(val); return mp_obj_new_int(val);
} else { } else {
@ -60,9 +66,15 @@ STATIC mp_obj_t machine_mem_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t va
uintptr_t addr = MICROPY_MACHINE_MEM_GET_WRITE_ADDR(index, self->elem_size); uintptr_t addr = MICROPY_MACHINE_MEM_GET_WRITE_ADDR(index, self->elem_size);
uint32_t val = mp_obj_get_int_truncated(value); uint32_t val = mp_obj_get_int_truncated(value);
switch (self->elem_size) { switch (self->elem_size) {
case 1: (*(uint8_t*)addr) = val; break; case 1:
case 2: (*(uint16_t*)addr) = val; break; (*(uint8_t *)addr) = val;
default: (*(uint32_t*)addr) = val; break; break;
case 2:
(*(uint16_t *)addr) = val;
break;
default:
(*(uint32_t *)addr) = val;
break;
} }
return mp_const_none; return mp_const_none;
} }

View File

@ -26,7 +26,7 @@ STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, const
bool invert = false; bool invert = false;
#if defined(MICROPY_PY_MACHINE_PIN_MAKE_NEW) #if defined(MICROPY_PY_MACHINE_PIN_MAKE_NEW)
mp_pin_p_t *pin_p = (mp_pin_t*)mp_proto_get(QSTR_pin_protocol, pin); mp_pin_p_t *pin_p = (mp_pin_t *)mp_proto_get(QSTR_pin_protocol, pin);
if (pin_p == NULL) { if (pin_p == NULL) {
// If first argument isn't a Pin-like object, we filter out "invert" // If first argument isn't a Pin-like object, we filter out "invert"
@ -64,8 +64,7 @@ STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, const
pin = MICROPY_PY_MACHINE_PIN_MAKE_NEW(NULL, n_args, n_kw, pin_args); pin = MICROPY_PY_MACHINE_PIN_MAKE_NEW(NULL, n_args, n_kw, pin_args);
mp_local_free(pin_args); mp_local_free(pin_args);
} } else
else
#endif #endif
// Otherwise there should be 1 or 2 args // Otherwise there should be 1 or 2 args
{ {
@ -154,7 +153,7 @@ const mp_obj_type_t machine_signal_type = {
.make_new = signal_make_new, .make_new = signal_make_new,
.call = signal_call, .call = signal_call,
.protocol = &signal_pin_p, .protocol = &signal_pin_p,
.locals_dict = (void*)&signal_locals_dict, .locals_dict = (void *)&signal_locals_dict,
}; };
#endif // MICROPY_PY_MACHINE #endif // MICROPY_PY_MACHINE

View File

@ -34,9 +34,9 @@ typedef struct _mp_obj_btree_t {
STATIC const mp_obj_type_t btree_type; STATIC const mp_obj_type_t btree_type;
#define CHECK_ERROR(res) \ #define CHECK_ERROR(res) \
if (res == RET_ERROR) { \ if (res == RET_ERROR) { \
mp_raise_OSError(errno); \ mp_raise_OSError(errno); \
} }
void __dbpanic(DB *db) { void __dbpanic(DB *db) {
printf("__dbpanic(%p)\n", db); printf("__dbpanic(%p)\n", db);
@ -74,8 +74,8 @@ STATIC mp_obj_t btree_put(size_t n_args, const mp_obj_t *args) {
(void)n_args; (void)n_args;
mp_obj_btree_t *self = MP_OBJ_TO_PTR(args[0]); mp_obj_btree_t *self = MP_OBJ_TO_PTR(args[0]);
DBT key, val; DBT key, val;
key.data = (void*)mp_obj_str_get_data(args[1], &key.size); key.data = (void *)mp_obj_str_get_data(args[1], &key.size);
val.data = (void*)mp_obj_str_get_data(args[2], &val.size); val.data = (void *)mp_obj_str_get_data(args[2], &val.size);
return MP_OBJ_NEW_SMALL_INT(__bt_put(self->db, &key, &val, 0)); return MP_OBJ_NEW_SMALL_INT(__bt_put(self->db, &key, &val, 0));
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(btree_put_obj, 3, 4, btree_put); STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(btree_put_obj, 3, 4, btree_put);
@ -83,7 +83,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(btree_put_obj, 3, 4, btree_put);
STATIC mp_obj_t btree_get(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t btree_get(size_t n_args, const mp_obj_t *args) {
mp_obj_btree_t *self = MP_OBJ_TO_PTR(args[0]); mp_obj_btree_t *self = MP_OBJ_TO_PTR(args[0]);
DBT key, val; DBT key, val;
key.data = (void*)mp_obj_str_get_data(args[1], &key.size); key.data = (void *)mp_obj_str_get_data(args[1], &key.size);
int res = __bt_get(self->db, &key, &val, 0); int res = __bt_get(self->db, &key, &val, 0);
if (res == RET_SPECIAL) { if (res == RET_SPECIAL) {
if (n_args > 2) { if (n_args > 2) {
@ -102,7 +102,7 @@ STATIC mp_obj_t btree_seq(size_t n_args, const mp_obj_t *args) {
int flags = MP_OBJ_SMALL_INT_VALUE(args[1]); int flags = MP_OBJ_SMALL_INT_VALUE(args[1]);
DBT key, val; DBT key, val;
if (n_args > 2) { if (n_args > 2) {
key.data = (void*)mp_obj_str_get_data(args[2], &key.size); key.data = (void *)mp_obj_str_get_data(args[2], &key.size);
} }
int res = __bt_seq(self->db, &key, &val, flags); int res = __bt_seq(self->db, &key, &val, flags);
@ -177,7 +177,7 @@ STATIC mp_obj_t btree_iternext(mp_obj_t self_in) {
if (self->start_key != MP_OBJ_NULL) { if (self->start_key != MP_OBJ_NULL) {
int flags = R_FIRST; int flags = R_FIRST;
if (self->start_key != mp_const_none) { if (self->start_key != mp_const_none) {
key.data = (void*)mp_obj_str_get_data(self->start_key, &key.size); key.data = (void *)mp_obj_str_get_data(self->start_key, &key.size);
flags = R_CURSOR; flags = R_CURSOR;
} else if (desc) { } else if (desc) {
flags = R_LAST; flags = R_LAST;
@ -195,7 +195,7 @@ STATIC mp_obj_t btree_iternext(mp_obj_t self_in) {
if (self->end_key != mp_const_none) { if (self->end_key != mp_const_none) {
DBT end_key; DBT end_key;
end_key.data = (void*)mp_obj_str_get_data(self->end_key, &end_key.size); end_key.data = (void *)mp_obj_str_get_data(self->end_key, &end_key.size);
BTREE *t = self->db->internal; BTREE *t = self->db->internal;
int cmp = t->bt_cmp(&key, &end_key); int cmp = t->bt_cmp(&key, &end_key);
if (desc) { if (desc) {
@ -230,7 +230,7 @@ STATIC mp_obj_t btree_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
if (value == MP_OBJ_NULL) { if (value == MP_OBJ_NULL) {
// delete // delete
DBT key; DBT key;
key.data = (void*)mp_obj_str_get_data(index, &key.size); key.data = (void *)mp_obj_str_get_data(index, &key.size);
int res = __bt_delete(self->db, &key, 0); int res = __bt_delete(self->db, &key, 0);
if (res == RET_SPECIAL) { if (res == RET_SPECIAL) {
nlr_raise(mp_obj_new_exception(&mp_type_KeyError)); nlr_raise(mp_obj_new_exception(&mp_type_KeyError));
@ -240,7 +240,7 @@ STATIC mp_obj_t btree_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
} else if (value == MP_OBJ_SENTINEL) { } else if (value == MP_OBJ_SENTINEL) {
// load // load
DBT key, val; DBT key, val;
key.data = (void*)mp_obj_str_get_data(index, &key.size); key.data = (void *)mp_obj_str_get_data(index, &key.size);
int res = __bt_get(self->db, &key, &val, 0); int res = __bt_get(self->db, &key, &val, 0);
if (res == RET_SPECIAL) { if (res == RET_SPECIAL) {
nlr_raise(mp_obj_new_exception(&mp_type_KeyError)); nlr_raise(mp_obj_new_exception(&mp_type_KeyError));
@ -250,8 +250,8 @@ STATIC mp_obj_t btree_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
} else { } else {
// store // store
DBT key, val; DBT key, val;
key.data = (void*)mp_obj_str_get_data(index, &key.size); key.data = (void *)mp_obj_str_get_data(index, &key.size);
val.data = (void*)mp_obj_str_get_data(value, &val.size); val.data = (void *)mp_obj_str_get_data(value, &val.size);
int res = __bt_put(self->db, &key, &val, 0); int res = __bt_put(self->db, &key, &val, 0);
CHECK_ERROR(res); CHECK_ERROR(res);
return mp_const_none; return mp_const_none;
@ -263,7 +263,7 @@ STATIC mp_obj_t btree_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs
switch (op) { switch (op) {
case MP_BINARY_OP_CONTAINS: { case MP_BINARY_OP_CONTAINS: {
DBT key, val; DBT key, val;
key.data = (void*)mp_obj_str_get_data(rhs_in, &key.size); key.data = (void *)mp_obj_str_get_data(rhs_in, &key.size);
int res = __bt_get(self->db, &key, &val, 0); int res = __bt_get(self->db, &key, &val, 0);
CHECK_ERROR(res); CHECK_ERROR(res);
return mp_obj_new_bool(res != RET_SPECIAL); return mp_obj_new_bool(res != RET_SPECIAL);
@ -296,7 +296,7 @@ STATIC const mp_obj_type_t btree_type = {
.iternext = btree_iternext, .iternext = btree_iternext,
.binary_op = btree_binary_op, .binary_op = btree_binary_op,
.subscr = btree_subscr, .subscr = btree_subscr,
.locals_dict = (void*)&btree_locals_dict, .locals_dict = (void *)&btree_locals_dict,
}; };
STATIC FILEVTABLE btree_stream_fvtable = { STATIC FILEVTABLE btree_stream_fvtable = {
@ -324,14 +324,14 @@ STATIC mp_obj_t mod_btree_open(size_t n_args, const mp_obj_t *pos_args, mp_map_t
mp_arg_val_t minkeypage; mp_arg_val_t minkeypage;
} args; } args;
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args,
MP_ARRAY_SIZE(allowed_args), allowed_args, (mp_arg_val_t*)&args); MP_ARRAY_SIZE(allowed_args), allowed_args, (mp_arg_val_t *)&args);
BTREEINFO openinfo = {0}; BTREEINFO openinfo = {0};
openinfo.flags = args.flags.u_int; openinfo.flags = args.flags.u_int;
openinfo.cachesize = args.cachesize.u_int; openinfo.cachesize = args.cachesize.u_int;
openinfo.psize = args.pagesize.u_int; openinfo.psize = args.pagesize.u_int;
openinfo.minkeypage = args.minkeypage.u_int; openinfo.minkeypage = args.minkeypage.u_int;
DB *db = __bt_open(pos_args[0], &btree_stream_fvtable, &openinfo, /*dflags*/0); DB *db = __bt_open(pos_args[0], &btree_stream_fvtable, &openinfo, /*dflags*/ 0);
if (db == NULL) { if (db == NULL) {
mp_raise_OSError(errno); mp_raise_OSError(errno);
} }
@ -350,7 +350,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_btree_globals, mp_module_btree_globals_tab
const mp_obj_module_t mp_module_btree = { const mp_obj_module_t mp_module_btree = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_btree_globals, .globals = (mp_obj_dict_t *)&mp_module_btree_globals,
}; };
#endif // MICROPY_PY_BTREE #endif // MICROPY_PY_BTREE

View File

@ -22,8 +22,8 @@ typedef struct _mp_obj_framebuf_t {
uint8_t format; uint8_t format;
} mp_obj_framebuf_t; } mp_obj_framebuf_t;
typedef void (*setpixel_t)(const mp_obj_framebuf_t*, int, int, uint32_t); typedef void (*setpixel_t)(const mp_obj_framebuf_t *, int, int, uint32_t);
typedef uint32_t (*getpixel_t)(const mp_obj_framebuf_t*, int, int); typedef uint32_t (*getpixel_t)(const mp_obj_framebuf_t *, int, int);
typedef void (*fill_rect_t)(const mp_obj_framebuf_t *, int, int, int, int, uint32_t); typedef void (*fill_rect_t)(const mp_obj_framebuf_t *, int, int, int, int, uint32_t);
typedef struct _mp_framebuf_p_t { typedef struct _mp_framebuf_p_t {
@ -47,20 +47,20 @@ typedef struct _mp_framebuf_p_t {
STATIC void mono_horiz_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) { STATIC void mono_horiz_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) {
size_t index = (x + y * fb->stride) >> 3; size_t index = (x + y * fb->stride) >> 3;
int offset = fb->format == FRAMEBUF_MHMSB ? x & 0x07 : 7 - (x & 0x07); int offset = fb->format == FRAMEBUF_MHMSB ? x & 0x07 : 7 - (x & 0x07);
((uint8_t*)fb->buf)[index] = (((uint8_t*)fb->buf)[index] & ~(0x01 << offset)) | ((col != 0) << offset); ((uint8_t *)fb->buf)[index] = (((uint8_t *)fb->buf)[index] & ~(0x01 << offset)) | ((col != 0) << offset);
} }
STATIC uint32_t mono_horiz_getpixel(const mp_obj_framebuf_t *fb, int x, int y) { STATIC uint32_t mono_horiz_getpixel(const mp_obj_framebuf_t *fb, int x, int y) {
size_t index = (x + y * fb->stride) >> 3; size_t index = (x + y * fb->stride) >> 3;
int offset = fb->format == FRAMEBUF_MHMSB ? x & 0x07 : 7 - (x & 0x07); int offset = fb->format == FRAMEBUF_MHMSB ? x & 0x07 : 7 - (x & 0x07);
return (((uint8_t*)fb->buf)[index] >> (offset)) & 0x01; return (((uint8_t *)fb->buf)[index] >> (offset)) & 0x01;
} }
STATIC void mono_horiz_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) { STATIC void mono_horiz_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) {
int reverse = fb->format == FRAMEBUF_MHMSB; int reverse = fb->format == FRAMEBUF_MHMSB;
int advance = fb->stride >> 3; int advance = fb->stride >> 3;
while (w--) { while (w--) {
uint8_t *b = &((uint8_t*)fb->buf)[(x >> 3) + y * advance]; uint8_t *b = &((uint8_t *)fb->buf)[(x >> 3) + y * advance];
int offset = reverse ? x & 7 : 7 - (x & 7); int offset = reverse ? x & 7 : 7 - (x & 7);
for (int hh = h; hh; --hh) { for (int hh = h; hh; --hh) {
*b = (*b & ~(0x01 << offset)) | ((col != 0) << offset); *b = (*b & ~(0x01 << offset)) | ((col != 0) << offset);
@ -75,16 +75,16 @@ STATIC void mono_horiz_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int
STATIC void mvlsb_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) { STATIC void mvlsb_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) {
size_t index = (y >> 3) * fb->stride + x; size_t index = (y >> 3) * fb->stride + x;
uint8_t offset = y & 0x07; uint8_t offset = y & 0x07;
((uint8_t*)fb->buf)[index] = (((uint8_t*)fb->buf)[index] & ~(0x01 << offset)) | ((col != 0) << offset); ((uint8_t *)fb->buf)[index] = (((uint8_t *)fb->buf)[index] & ~(0x01 << offset)) | ((col != 0) << offset);
} }
STATIC uint32_t mvlsb_getpixel(const mp_obj_framebuf_t *fb, int x, int y) { STATIC uint32_t mvlsb_getpixel(const mp_obj_framebuf_t *fb, int x, int y) {
return (((uint8_t*)fb->buf)[(y >> 3) * fb->stride + x] >> (y & 0x07)) & 0x01; return (((uint8_t *)fb->buf)[(y >> 3) * fb->stride + x] >> (y & 0x07)) & 0x01;
} }
STATIC void mvlsb_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) { STATIC void mvlsb_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) {
while (h--) { while (h--) {
uint8_t *b = &((uint8_t*)fb->buf)[(y >> 3) * fb->stride + x]; uint8_t *b = &((uint8_t *)fb->buf)[(y >> 3) * fb->stride + x];
uint8_t offset = y & 0x07; uint8_t offset = y & 0x07;
for (int ww = w; ww; --ww) { for (int ww = w; ww; --ww) {
*b = (*b & ~(0x01 << offset)) | ((col != 0) << offset); *b = (*b & ~(0x01 << offset)) | ((col != 0) << offset);
@ -97,15 +97,15 @@ STATIC void mvlsb_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, in
// Functions for RGB565 format // Functions for RGB565 format
STATIC void rgb565_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) { STATIC void rgb565_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) {
((uint16_t*)fb->buf)[x + y * fb->stride] = col; ((uint16_t *)fb->buf)[x + y * fb->stride] = col;
} }
STATIC uint32_t rgb565_getpixel(const mp_obj_framebuf_t *fb, int x, int y) { STATIC uint32_t rgb565_getpixel(const mp_obj_framebuf_t *fb, int x, int y) {
return ((uint16_t*)fb->buf)[x + y * fb->stride]; return ((uint16_t *)fb->buf)[x + y * fb->stride];
} }
STATIC void rgb565_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) { STATIC void rgb565_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) {
uint16_t *b = &((uint16_t*)fb->buf)[x + y * fb->stride]; uint16_t *b = &((uint16_t *)fb->buf)[x + y * fb->stride];
while (h--) { while (h--) {
for (int ww = w; ww; --ww) { for (int ww = w; ww; --ww) {
*b++ = col; *b++ = col;
@ -117,7 +117,7 @@ STATIC void rgb565_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, i
// Functions for GS2_HMSB format // Functions for GS2_HMSB format
STATIC void gs2_hmsb_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) { STATIC void gs2_hmsb_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) {
uint8_t *pixel = &((uint8_t*)fb->buf)[(x + y * fb->stride) >> 2]; uint8_t *pixel = &((uint8_t *)fb->buf)[(x + y * fb->stride) >> 2];
uint8_t shift = (x & 0x3) << 1; uint8_t shift = (x & 0x3) << 1;
uint8_t mask = 0x3 << shift; uint8_t mask = 0x3 << shift;
uint8_t color = (col & 0x3) << shift; uint8_t color = (col & 0x3) << shift;
@ -125,14 +125,14 @@ STATIC void gs2_hmsb_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_
} }
STATIC uint32_t gs2_hmsb_getpixel(const mp_obj_framebuf_t *fb, int x, int y) { STATIC uint32_t gs2_hmsb_getpixel(const mp_obj_framebuf_t *fb, int x, int y) {
uint8_t pixel = ((uint8_t*)fb->buf)[(x + y * fb->stride) >> 2]; uint8_t pixel = ((uint8_t *)fb->buf)[(x + y * fb->stride) >> 2];
uint8_t shift = (x & 0x3) << 1; uint8_t shift = (x & 0x3) << 1;
return (pixel >> shift) & 0x3; return (pixel >> shift) & 0x3;
} }
STATIC void gs2_hmsb_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) { STATIC void gs2_hmsb_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) {
for (int xx=x; xx < x+w; xx++) { for (int xx = x; xx < x + w; xx++) {
for (int yy=y; yy < y+h; yy++) { for (int yy = y; yy < y + h; yy++) {
gs2_hmsb_setpixel(fb, xx, yy, col); gs2_hmsb_setpixel(fb, xx, yy, col);
} }
} }
@ -141,7 +141,7 @@ STATIC void gs2_hmsb_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w,
// Functions for GS4_HMSB format // Functions for GS4_HMSB format
STATIC void gs4_hmsb_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) { STATIC void gs4_hmsb_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) {
uint8_t *pixel = &((uint8_t*)fb->buf)[(x + y * fb->stride) >> 1]; uint8_t *pixel = &((uint8_t *)fb->buf)[(x + y * fb->stride) >> 1];
if (x % 2) { if (x % 2) {
*pixel = ((uint8_t)col & 0x0f) | (*pixel & 0xf0); *pixel = ((uint8_t)col & 0x0f) | (*pixel & 0xf0);
@ -152,15 +152,15 @@ STATIC void gs4_hmsb_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_
STATIC uint32_t gs4_hmsb_getpixel(const mp_obj_framebuf_t *fb, int x, int y) { STATIC uint32_t gs4_hmsb_getpixel(const mp_obj_framebuf_t *fb, int x, int y) {
if (x % 2) { if (x % 2) {
return ((uint8_t*)fb->buf)[(x + y * fb->stride) >> 1] & 0x0f; return ((uint8_t *)fb->buf)[(x + y * fb->stride) >> 1] & 0x0f;
} }
return ((uint8_t*)fb->buf)[(x + y * fb->stride) >> 1] >> 4; return ((uint8_t *)fb->buf)[(x + y * fb->stride) >> 1] >> 4;
} }
STATIC void gs4_hmsb_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) { STATIC void gs4_hmsb_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) {
col &= 0x0f; col &= 0x0f;
uint8_t *pixel_pair = &((uint8_t*)fb->buf)[(x + y * fb->stride) >> 1]; uint8_t *pixel_pair = &((uint8_t *)fb->buf)[(x + y * fb->stride) >> 1];
uint8_t col_shifted_left = col << 4; uint8_t col_shifted_left = col << 4;
uint8_t col_pixel_pair = col_shifted_left | col; uint8_t col_pixel_pair = col_shifted_left | col;
int pixel_count_till_next_line = (fb->stride - w) >> 1; int pixel_count_till_next_line = (fb->stride - w) >> 1;
@ -192,16 +192,16 @@ STATIC void gs4_hmsb_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w,
// Functions for GS8 format // Functions for GS8 format
STATIC void gs8_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) { STATIC void gs8_setpixel(const mp_obj_framebuf_t *fb, int x, int y, uint32_t col) {
uint8_t *pixel = &((uint8_t*)fb->buf)[(x + y * fb->stride)]; uint8_t *pixel = &((uint8_t *)fb->buf)[(x + y * fb->stride)];
*pixel = col & 0xff; *pixel = col & 0xff;
} }
STATIC uint32_t gs8_getpixel(const mp_obj_framebuf_t *fb, int x, int y) { STATIC uint32_t gs8_getpixel(const mp_obj_framebuf_t *fb, int x, int y) {
return ((uint8_t*)fb->buf)[(x + y * fb->stride)]; return ((uint8_t *)fb->buf)[(x + y * fb->stride)];
} }
STATIC void gs8_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) { STATIC void gs8_fill_rect(const mp_obj_framebuf_t *fb, int x, int y, int w, int h, uint32_t col) {
uint8_t *pixel = &((uint8_t*)fb->buf)[(x + y * fb->stride)]; uint8_t *pixel = &((uint8_t *)fb->buf)[(x + y * fb->stride)];
while (h--) { while (h--) {
memset(pixel, col, w); memset(pixel, col, w);
pixel += fb->stride; pixel += fb->stride;
@ -287,7 +287,7 @@ STATIC mp_obj_t framebuf_make_new(const mp_obj_type_t *type, size_t n_args, cons
STATIC const mp_obj_type_t mp_type_framebuf; STATIC const mp_obj_type_t mp_type_framebuf;
// Helper to ensure we have the native super class instead of a subclass. // Helper to ensure we have the native super class instead of a subclass.
static mp_obj_framebuf_t* native_framebuf(mp_obj_t framebuf_obj) { static mp_obj_framebuf_t *native_framebuf(mp_obj_t framebuf_obj) {
mp_obj_t native_framebuf = mp_instance_cast_to_native_base(framebuf_obj, &mp_type_framebuf); mp_obj_t native_framebuf = mp_instance_cast_to_native_base(framebuf_obj, &mp_type_framebuf);
mp_obj_assert_native_inited(native_framebuf); mp_obj_assert_native_inited(native_framebuf);
return MP_OBJ_TO_PTR(native_framebuf); return MP_OBJ_TO_PTR(native_framebuf);
@ -384,9 +384,9 @@ STATIC mp_obj_t framebuf_rect(size_t n_args, const mp_obj_t *args) {
mp_int_t col = mp_obj_get_int(args[5]); mp_int_t col = mp_obj_get_int(args[5]);
fill_rect(self, x, y, w, 1, col); fill_rect(self, x, y, w, 1, col);
fill_rect(self, x, y + h- 1, w, 1, col); fill_rect(self, x, y + h - 1, w, 1, col);
fill_rect(self, x, y, 1, h, col); fill_rect(self, x, y, 1, h, col);
fill_rect(self, x + w- 1, y, 1, h, col); fill_rect(self, x + w - 1, y, 1, h, col);
return mp_const_none; return mp_const_none;
} }
@ -423,9 +423,15 @@ STATIC mp_obj_t framebuf_line(size_t n_args, const mp_obj_t *args) {
bool steep; bool steep;
if (dy > dx) { if (dy > dx) {
mp_int_t temp; mp_int_t temp;
temp = x1; x1 = y1; y1 = temp; temp = x1;
temp = dx; dx = dy; dy = temp; x1 = y1;
temp = sx; sx = sy; sy = temp; y1 = temp;
temp = dx;
dx = dy;
dy = temp;
temp = sx;
sx = sy;
sy = temp;
steep = true; steep = true;
} else { } else {
steep = false; steep = false;
@ -473,7 +479,7 @@ STATIC mp_obj_t framebuf_blit(size_t n_args, const mp_obj_t *args) {
(y >= self->height) || (y >= self->height) ||
(-x >= source->width) || (-x >= source->width) ||
(-y >= source->height) (-y >= source->height)
) { ) {
// Out of bounds, no-op. // Out of bounds, no-op.
return mp_const_none; return mp_const_none;
} }
@ -547,7 +553,7 @@ STATIC mp_obj_t framebuf_text(size_t n_args, const mp_obj_t *args) {
// loop over chars // loop over chars
for (; *str; ++str) { for (; *str; ++str) {
// get char and make sure its in range of font // get char and make sure its in range of font
int chr = *(uint8_t*)str; int chr = *(uint8_t *)str;
if (chr < 32 || chr > 127) { if (chr < 32 || chr > 127) {
chr = 127; chr = 127;
} }
@ -590,7 +596,7 @@ STATIC const mp_obj_type_t mp_type_framebuf = {
.name = MP_QSTR_FrameBuffer, .name = MP_QSTR_FrameBuffer,
.make_new = framebuf_make_new, .make_new = framebuf_make_new,
.buffer_p = { .get_buffer = framebuf_get_buffer }, .buffer_p = { .get_buffer = framebuf_get_buffer },
.locals_dict = (mp_obj_dict_t*)&framebuf_locals_dict, .locals_dict = (mp_obj_dict_t *)&framebuf_locals_dict,
}; };
// this factory function is provided for backwards compatibility with old FrameBuffer1 class // this factory function is provided for backwards compatibility with old FrameBuffer1 class
@ -633,7 +639,7 @@ STATIC MP_DEFINE_CONST_DICT(framebuf_module_globals, framebuf_module_globals_tab
const mp_obj_module_t mp_module_framebuf = { const mp_obj_module_t mp_module_framebuf = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&framebuf_module_globals, .globals = (mp_obj_dict_t *)&framebuf_module_globals,
}; };
#endif // MICROPY_PY_FRAMEBUF #endif // MICROPY_PY_FRAMEBUF

View File

@ -19,7 +19,7 @@
#include "lwip/init.h" #include "lwip/init.h"
#include "lwip/tcp.h" #include "lwip/tcp.h"
#include "lwip/udp.h" #include "lwip/udp.h"
//#include "lwip/raw.h" // #include "lwip/raw.h"
#include "lwip/dns.h" #include "lwip/dns.h"
#include "lwip/igmp.h" #include "lwip/igmp.h"
#if LWIP_VERSION_MAJOR < 2 #if LWIP_VERSION_MAJOR < 2
@ -71,7 +71,7 @@ void mod_lwip_register_poll(void (*poll)(void *arg), void *poll_arg);
void mod_lwip_deregister_poll(void (*poll)(void *arg), void *poll_arg); void mod_lwip_deregister_poll(void (*poll)(void *arg), void *poll_arg);
STATIC void slip_lwip_poll(void *netif) { STATIC void slip_lwip_poll(void *netif) {
slipif_poll((struct netif*)netif); slipif_poll((struct netif *)netif);
} }
STATIC const mp_obj_type_t lwip_slip_type; STATIC const mp_obj_type_t lwip_slip_type;
@ -120,7 +120,7 @@ STATIC mp_obj_t lwip_slip_make_new(mp_obj_t type_in, size_t n_args, size_t n_kw,
struct netif *n = &lwip_slip_obj.lwip_netif; struct netif *n = &lwip_slip_obj.lwip_netif;
if (netif_add(n, &iplocal, IP_ADDR_BROADCAST, &ipremote, NULL, slipif_init, ip_input) == NULL) { if (netif_add(n, &iplocal, IP_ADDR_BROADCAST, &ipremote, NULL, slipif_init, ip_input) == NULL) {
mp_raise_ValueError("out of memory"); mp_raise_ValueError("out of memory");
} }
netif_set_up(n); netif_set_up(n);
netif_set_default(n); netif_set_default(n);
@ -146,7 +146,7 @@ STATIC const mp_obj_type_t lwip_slip_type = {
{ &mp_type_type }, { &mp_type_type },
.name = MP_QSTR_slip, .name = MP_QSTR_slip,
.make_new = lwip_slip_make_new, .make_new = lwip_slip_make_new,
.locals_dict = (mp_obj_dict_t*)&lwip_slip_locals_dict, .locals_dict = (mp_obj_dict_t *)&lwip_slip_locals_dict,
}; };
#endif // MICROPY_PY_LWIP_SLIP #endif // MICROPY_PY_LWIP_SLIP
@ -158,7 +158,7 @@ STATIC const mp_obj_type_t lwip_slip_type = {
// lwIP 2 changed LWIP_VERSION and it can no longer be used in macros, // lwIP 2 changed LWIP_VERSION and it can no longer be used in macros,
// so we define our own equivalent version that can. // so we define our own equivalent version that can.
#define LWIP_VERSION_MACRO (LWIP_VERSION_MAJOR << 24 | LWIP_VERSION_MINOR << 16 \ #define LWIP_VERSION_MACRO (LWIP_VERSION_MAJOR << 24 | LWIP_VERSION_MINOR << 16 \
| LWIP_VERSION_REVISION << 8 | LWIP_VERSION_RC) | LWIP_VERSION_REVISION << 8 | LWIP_VERSION_RC)
// Extension to lwIP error codes // Extension to lwIP error codes
#define _ERR_BADF -16 #define _ERR_BADF -16
@ -271,11 +271,11 @@ typedef struct _lwip_socket_obj_t {
} lwip_socket_obj_t; } lwip_socket_obj_t;
static inline void poll_sockets(void) { static inline void poll_sockets(void) {
#ifdef MICROPY_EVENT_POLL_HOOK #ifdef MICROPY_EVENT_POLL_HOOK
MICROPY_EVENT_POLL_HOOK; MICROPY_EVENT_POLL_HOOK;
#else #else
mp_hal_delay_ms(1); mp_hal_delay_ms(1);
#endif #endif
} }
/*******************************************************************************/ /*******************************************************************************/
@ -295,7 +295,7 @@ STATIC void _lwip_udp_incoming(void *arg, struct udp_pcb *upcb, struct pbuf *p,
STATIC void _lwip_udp_incoming(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) STATIC void _lwip_udp_incoming(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
#endif #endif
{ {
lwip_socket_obj_t *socket = (lwip_socket_obj_t*)arg; lwip_socket_obj_t *socket = (lwip_socket_obj_t *)arg;
if (socket->incoming.pbuf != NULL) { if (socket->incoming.pbuf != NULL) {
// That's why they call it "unreliable". No room in the inn, drop the packet. // That's why they call it "unreliable". No room in the inn, drop the packet.
@ -309,7 +309,7 @@ STATIC void _lwip_udp_incoming(void *arg, struct udp_pcb *upcb, struct pbuf *p,
// Callback for general tcp errors. // Callback for general tcp errors.
STATIC void _lwip_tcp_error(void *arg, err_t err) { STATIC void _lwip_tcp_error(void *arg, err_t err) {
lwip_socket_obj_t *socket = (lwip_socket_obj_t*)arg; lwip_socket_obj_t *socket = (lwip_socket_obj_t *)arg;
// Pass the error code back via the connection variable. // Pass the error code back via the connection variable.
socket->state = err; socket->state = err;
@ -319,7 +319,7 @@ STATIC void _lwip_tcp_error(void *arg, err_t err) {
// Callback for tcp connection requests. Error code err is unused. (See tcp.h) // Callback for tcp connection requests. Error code err is unused. (See tcp.h)
STATIC err_t _lwip_tcp_connected(void *arg, struct tcp_pcb *tpcb, err_t err) { STATIC err_t _lwip_tcp_connected(void *arg, struct tcp_pcb *tpcb, err_t err) {
lwip_socket_obj_t *socket = (lwip_socket_obj_t*)arg; lwip_socket_obj_t *socket = (lwip_socket_obj_t *)arg;
socket->state = STATE_CONNECTED; socket->state = STATE_CONNECTED;
return ERR_OK; return ERR_OK;
@ -337,9 +337,8 @@ STATIC err_t _lwip_tcp_recv_unaccepted(void *arg, struct tcp_pcb *pcb, struct pb
// "Poll" (idle) callback to be called ASAP after accept callback // "Poll" (idle) callback to be called ASAP after accept callback
// to execute Python callback function, as it can't be executed // to execute Python callback function, as it can't be executed
// from accept callback itself. // from accept callback itself.
STATIC err_t _lwip_tcp_accept_finished(void *arg, struct tcp_pcb *pcb) STATIC err_t _lwip_tcp_accept_finished(void *arg, struct tcp_pcb *pcb) {
{ lwip_socket_obj_t *socket = (lwip_socket_obj_t *)arg;
lwip_socket_obj_t *socket = (lwip_socket_obj_t*)arg;
tcp_poll(pcb, NULL, 0); tcp_poll(pcb, NULL, 0);
exec_user_callback(socket); exec_user_callback(socket);
return ERR_OK; return ERR_OK;
@ -347,7 +346,7 @@ STATIC err_t _lwip_tcp_accept_finished(void *arg, struct tcp_pcb *pcb)
// Callback for incoming tcp connections. // Callback for incoming tcp connections.
STATIC err_t _lwip_tcp_accept(void *arg, struct tcp_pcb *newpcb, err_t err) { STATIC err_t _lwip_tcp_accept(void *arg, struct tcp_pcb *newpcb, err_t err) {
lwip_socket_obj_t *socket = (lwip_socket_obj_t*)arg; lwip_socket_obj_t *socket = (lwip_socket_obj_t *)arg;
tcp_recv(newpcb, _lwip_tcp_recv_unaccepted); tcp_recv(newpcb, _lwip_tcp_recv_unaccepted);
if (socket->incoming.connection != NULL) { if (socket->incoming.connection != NULL) {
@ -369,7 +368,7 @@ STATIC err_t _lwip_tcp_accept(void *arg, struct tcp_pcb *newpcb, err_t err) {
// Callback for inbound tcp packets. // Callback for inbound tcp packets.
STATIC err_t _lwip_tcp_recv(void *arg, struct tcp_pcb *tcpb, struct pbuf *p, err_t err) { STATIC err_t _lwip_tcp_recv(void *arg, struct tcp_pcb *tcpb, struct pbuf *p, err_t err) {
lwip_socket_obj_t *socket = (lwip_socket_obj_t*)arg; lwip_socket_obj_t *socket = (lwip_socket_obj_t *)arg;
if (p == NULL) { if (p == NULL) {
// Other side has closed connection. // Other side has closed connection.
@ -443,7 +442,9 @@ STATIC mp_uint_t lwip_udp_receive(lwip_socket_obj_t *socket, byte *buf, mp_uint_
if (socket->timeout != -1) { if (socket->timeout != -1) {
for (mp_uint_t retries = socket->timeout / 100; retries--;) { for (mp_uint_t retries = socket->timeout / 100; retries--;) {
mp_hal_delay_ms(100); mp_hal_delay_ms(100);
if (socket->incoming.pbuf != NULL) break; if (socket->incoming.pbuf != NULL) {
break;
}
} }
if (socket->incoming.pbuf == NULL) { if (socket->incoming.pbuf == NULL) {
*_errno = MP_ETIMEDOUT; *_errno = MP_ETIMEDOUT;
@ -467,16 +468,16 @@ STATIC mp_uint_t lwip_udp_receive(lwip_socket_obj_t *socket, byte *buf, mp_uint_
pbuf_free(p); pbuf_free(p);
socket->incoming.pbuf = NULL; socket->incoming.pbuf = NULL;
return (mp_uint_t) result; return (mp_uint_t)result;
} }
// For use in stream virtual methods // For use in stream virtual methods
#define STREAM_ERROR_CHECK(socket) \ #define STREAM_ERROR_CHECK(socket) \
if (socket->state < 0) { \ if (socket->state < 0) { \
*_errno = error_lookup_table[-socket->state]; \ *_errno = error_lookup_table[-socket->state]; \
return MP_STREAM_ERROR; \ return MP_STREAM_ERROR; \
} \ } \
assert(socket->pcb.tcp); assert(socket->pcb.tcp);
// Helper function for send/sendto to handle TCP packets // Helper function for send/sendto to handle TCP packets
@ -575,7 +576,7 @@ STATIC mp_uint_t lwip_tcp_receive(lwip_socket_obj_t *socket, byte *buf, mp_uint_
len = remaining; len = remaining;
} }
memcpy(buf, (byte*)p->payload + socket->recv_offset, len); memcpy(buf, (byte *)p->payload + socket->recv_offset, len);
remaining -= len; remaining -= len;
if (remaining == 0) { if (remaining == 0) {
@ -622,10 +623,15 @@ STATIC mp_obj_t lwip_socket_make_new(const mp_obj_type_t *type, size_t n_args, s
} }
switch (socket->type) { switch (socket->type) {
case MOD_NETWORK_SOCK_STREAM: socket->pcb.tcp = tcp_new(); break; case MOD_NETWORK_SOCK_STREAM:
case MOD_NETWORK_SOCK_DGRAM: socket->pcb.udp = udp_new(); break; socket->pcb.tcp = tcp_new();
//case MOD_NETWORK_SOCK_RAW: socket->pcb.raw = raw_new(); break; break;
default: mp_raise_OSError(MP_EINVAL); case MOD_NETWORK_SOCK_DGRAM:
socket->pcb.udp = udp_new();
break;
// case MOD_NETWORK_SOCK_RAW: socket->pcb.raw = raw_new(); break;
default:
mp_raise_OSError(MP_EINVAL);
} }
if (socket->pcb.tcp == NULL) { if (socket->pcb.tcp == NULL) {
@ -635,7 +641,7 @@ STATIC mp_obj_t lwip_socket_make_new(const mp_obj_type_t *type, size_t n_args, s
switch (socket->type) { switch (socket->type) {
case MOD_NETWORK_SOCK_STREAM: { case MOD_NETWORK_SOCK_STREAM: {
// Register the socket object as our callback argument. // Register the socket object as our callback argument.
tcp_arg(socket->pcb.tcp, (void*)socket); tcp_arg(socket->pcb.tcp, (void *)socket);
// Register our error callback. // Register our error callback.
tcp_err(socket->pcb.tcp, _lwip_tcp_error); tcp_err(socket->pcb.tcp, _lwip_tcp_error);
break; break;
@ -643,7 +649,7 @@ STATIC mp_obj_t lwip_socket_make_new(const mp_obj_type_t *type, size_t n_args, s
case MOD_NETWORK_SOCK_DGRAM: { case MOD_NETWORK_SOCK_DGRAM: {
// Register our receive callback now. Since UDP sockets don't require binding or connection // Register our receive callback now. Since UDP sockets don't require binding or connection
// before use, there's no other good time to do it. // before use, there's no other good time to do it.
udp_recv(socket->pcb.udp, _lwip_udp_incoming, (void*)socket); udp_recv(socket->pcb.udp, _lwip_udp_incoming, (void *)socket);
break; break;
} }
} }
@ -731,7 +737,9 @@ STATIC mp_obj_t lwip_socket_accept(mp_obj_t self_in) {
} else if (socket->timeout != -1) { } else if (socket->timeout != -1) {
for (mp_uint_t retries = socket->timeout / 100; retries--;) { for (mp_uint_t retries = socket->timeout / 100; retries--;) {
mp_hal_delay_ms(100); mp_hal_delay_ms(100);
if (socket->incoming.connection != NULL) break; if (socket->incoming.connection != NULL) {
break;
}
} }
if (socket->incoming.connection == NULL) { if (socket->incoming.connection == NULL) {
mp_raise_OSError(MP_ETIMEDOUT); mp_raise_OSError(MP_ETIMEDOUT);
@ -759,7 +767,7 @@ STATIC mp_obj_t lwip_socket_accept(mp_obj_t self_in) {
socket2->state = STATE_CONNECTED; socket2->state = STATE_CONNECTED;
socket2->recv_offset = 0; socket2->recv_offset = 0;
socket2->callback = MP_OBJ_NULL; socket2->callback = MP_OBJ_NULL;
tcp_arg(socket2->pcb.tcp, (void*)socket2); tcp_arg(socket2->pcb.tcp, (void *)socket2);
tcp_err(socket2->pcb.tcp, _lwip_tcp_error); tcp_err(socket2->pcb.tcp, _lwip_tcp_error);
tcp_recv(socket2->pcb.tcp, _lwip_tcp_recv); tcp_recv(socket2->pcb.tcp, _lwip_tcp_recv);
@ -815,7 +823,9 @@ STATIC mp_obj_t lwip_socket_connect(mp_obj_t self_in, mp_obj_t addr_in) {
if (socket->timeout != -1) { if (socket->timeout != -1) {
for (mp_uint_t retries = socket->timeout / 100; retries--;) { for (mp_uint_t retries = socket->timeout / 100; retries--;) {
mp_hal_delay_ms(100); mp_hal_delay_ms(100);
if (socket->state != STATE_CONNECTING) break; if (socket->state != STATE_CONNECTING) {
break;
}
} }
if (socket->state == STATE_CONNECTING) { if (socket->state == STATE_CONNECTING) {
mp_raise_OSError(MP_EINPROGRESS); mp_raise_OSError(MP_EINPROGRESS);
@ -826,9 +836,9 @@ STATIC mp_obj_t lwip_socket_connect(mp_obj_t self_in, mp_obj_t addr_in) {
} }
} }
if (socket->state == STATE_CONNECTED) { if (socket->state == STATE_CONNECTED) {
err = ERR_OK; err = ERR_OK;
} else { } else {
err = socket->state; err = socket->state;
} }
break; break;
} }
@ -896,11 +906,11 @@ STATIC mp_obj_t lwip_socket_recv(mp_obj_t self_in, mp_obj_t len_in) {
mp_uint_t ret = 0; mp_uint_t ret = 0;
switch (socket->type) { switch (socket->type) {
case MOD_NETWORK_SOCK_STREAM: { case MOD_NETWORK_SOCK_STREAM: {
ret = lwip_tcp_receive(socket, (byte*)vstr.buf, len, &_errno); ret = lwip_tcp_receive(socket, (byte *)vstr.buf, len, &_errno);
break; break;
} }
case MOD_NETWORK_SOCK_DGRAM: { case MOD_NETWORK_SOCK_DGRAM: {
ret = lwip_udp_receive(socket, (byte*)vstr.buf, len, NULL, NULL, &_errno); ret = lwip_udp_receive(socket, (byte *)vstr.buf, len, NULL, NULL, &_errno);
break; break;
} }
} }
@ -963,12 +973,12 @@ STATIC mp_obj_t lwip_socket_recvfrom(mp_obj_t self_in, mp_obj_t len_in) {
switch (socket->type) { switch (socket->type) {
case MOD_NETWORK_SOCK_STREAM: { case MOD_NETWORK_SOCK_STREAM: {
memcpy(ip, &socket->peer, sizeof(socket->peer)); memcpy(ip, &socket->peer, sizeof(socket->peer));
port = (mp_uint_t) socket->peer_port; port = (mp_uint_t)socket->peer_port;
ret = lwip_tcp_receive(socket, (byte*)vstr.buf, len, &_errno); ret = lwip_tcp_receive(socket, (byte *)vstr.buf, len, &_errno);
break; break;
} }
case MOD_NETWORK_SOCK_DGRAM: { case MOD_NETWORK_SOCK_DGRAM: {
ret = lwip_udp_receive(socket, (byte*)vstr.buf, len, ip, &port, &_errno); ret = lwip_udp_receive(socket, (byte *)vstr.buf, len, ip, &port, &_errno);
break; break;
} }
} }
@ -1017,7 +1027,7 @@ STATIC mp_obj_t lwip_socket_sendall(mp_obj_t self_in, mp_obj_t buf_in) {
mp_raise_OSError(_errno); mp_raise_OSError(_errno);
} }
bufinfo.len -= ret; bufinfo.len -= ret;
bufinfo.buf = (char*)bufinfo.buf + ret; bufinfo.buf = (char *)bufinfo.buf + ret;
} }
break; break;
} }
@ -1095,7 +1105,7 @@ STATIC mp_obj_t lwip_socket_setsockopt(size_t n_args, const mp_obj_t *args) {
} }
// POSIX setsockopt has order: group addr, if addr, lwIP has it vice-versa // POSIX setsockopt has order: group addr, if addr, lwIP has it vice-versa
err_t err = igmp_joingroup((ip_addr_t*)bufinfo.buf + 1, bufinfo.buf); err_t err = igmp_joingroup((ip_addr_t *)bufinfo.buf + 1, bufinfo.buf);
if (err != ERR_OK) { if (err != ERR_OK) {
mp_raise_OSError(error_lookup_table[-err]); mp_raise_OSError(error_lookup_table[-err]);
} }
@ -1192,8 +1202,10 @@ STATIC mp_uint_t lwip_socket_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_
} }
break; break;
} }
case MOD_NETWORK_SOCK_DGRAM: udp_remove(socket->pcb.udp); break; case MOD_NETWORK_SOCK_DGRAM:
//case MOD_NETWORK_SOCK_RAW: raw_remove(socket->pcb.raw); break; udp_remove(socket->pcb.udp);
break;
// case MOD_NETWORK_SOCK_RAW: raw_remove(socket->pcb.raw); break;
} }
socket->pcb.tcp = NULL; socket->pcb.tcp = NULL;
socket->state = _ERR_BADF; socket->state = _ERR_BADF;
@ -1252,7 +1264,7 @@ STATIC const mp_obj_type_t lwip_socket_type = {
.print = lwip_socket_print, .print = lwip_socket_print,
.make_new = lwip_socket_make_new, .make_new = lwip_socket_make_new,
.protocol = &lwip_socket_stream_p, .protocol = &lwip_socket_stream_p,
.locals_dict = (mp_obj_dict_t*)&lwip_socket_locals_dict, .locals_dict = (mp_obj_dict_t *)&lwip_socket_locals_dict,
}; };
/******************************************************************************/ /******************************************************************************/
@ -1272,18 +1284,18 @@ void sys_arch_unprotect(sys_prot_t state) {
// itself a "list" but isn't; we only support a single interface. // itself a "list" but isn't; we only support a single interface.
typedef struct nic_poll { typedef struct nic_poll {
void (* poll)(void *arg); void (*poll)(void *arg);
void *poll_arg; void *poll_arg;
} nic_poll_t; } nic_poll_t;
STATIC nic_poll_t lwip_poll_list; STATIC nic_poll_t lwip_poll_list;
void mod_lwip_register_poll(void (* poll)(void *arg), void *poll_arg) { void mod_lwip_register_poll(void (*poll)(void *arg), void *poll_arg) {
lwip_poll_list.poll = poll; lwip_poll_list.poll = poll;
lwip_poll_list.poll_arg = poll_arg; lwip_poll_list.poll_arg = poll_arg;
} }
void mod_lwip_deregister_poll(void (* poll)(void *arg), void *poll_arg) { void mod_lwip_deregister_poll(void (*poll)(void *arg), void *poll_arg) {
lwip_poll_list.poll = NULL; lwip_poll_list.poll = NULL;
} }
@ -1350,9 +1362,9 @@ STATIC mp_obj_t lwip_getaddrinfo(size_t n_args, const mp_obj_t *args) {
} }
} }
if (!((family == 0 || family == MOD_NETWORK_AF_INET) if (!((family == 0 || family == MOD_NETWORK_AF_INET)
&& (type == 0 || type == MOD_NETWORK_SOCK_STREAM) && (type == 0 || type == MOD_NETWORK_SOCK_STREAM)
&& proto == 0 && proto == 0
&& flags == 0)) { && flags == 0)) {
mp_warning("unsupported getaddrinfo constraints"); mp_warning("unsupported getaddrinfo constraints");
} }
} }
@ -1360,7 +1372,7 @@ STATIC mp_obj_t lwip_getaddrinfo(size_t n_args, const mp_obj_t *args) {
getaddrinfo_state_t state; getaddrinfo_state_t state;
state.status = 0; state.status = 0;
err_t ret = dns_gethostbyname(host, (ip_addr_t*)&state.ipaddr, lwip_getaddrinfo_cb, &state); err_t ret = dns_gethostbyname(host, (ip_addr_t *)&state.ipaddr, lwip_getaddrinfo_cb, &state);
switch (ret) { switch (ret) {
case ERR_OK: case ERR_OK:
// cached // cached
@ -1386,8 +1398,8 @@ STATIC mp_obj_t lwip_getaddrinfo(size_t n_args, const mp_obj_t *args) {
tuple->items[1] = MP_OBJ_NEW_SMALL_INT(MOD_NETWORK_SOCK_STREAM); tuple->items[1] = MP_OBJ_NEW_SMALL_INT(MOD_NETWORK_SOCK_STREAM);
tuple->items[2] = MP_OBJ_NEW_SMALL_INT(0); tuple->items[2] = MP_OBJ_NEW_SMALL_INT(0);
tuple->items[3] = MP_OBJ_NEW_QSTR(MP_QSTR_); tuple->items[3] = MP_OBJ_NEW_QSTR(MP_QSTR_);
tuple->items[4] = netutils_format_inet_addr((uint8_t*)&state.ipaddr, port, NETUTILS_BIG); tuple->items[4] = netutils_format_inet_addr((uint8_t *)&state.ipaddr, port, NETUTILS_BIG);
return mp_obj_new_list(1, (mp_obj_t*)&tuple); return mp_obj_new_list(1, (mp_obj_t *)&tuple);
} }
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(lwip_getaddrinfo_obj, 2, 6, lwip_getaddrinfo); MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(lwip_getaddrinfo_obj, 2, 6, lwip_getaddrinfo);
@ -1409,9 +1421,9 @@ STATIC const mp_rom_map_elem_t mp_module_lwip_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_print_pcbs), MP_ROM_PTR(&lwip_print_pcbs_obj) }, { MP_ROM_QSTR(MP_QSTR_print_pcbs), MP_ROM_PTR(&lwip_print_pcbs_obj) },
// objects // objects
{ MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&lwip_socket_type) }, { MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&lwip_socket_type) },
#if MICROPY_PY_LWIP_SLIP #if MICROPY_PY_LWIP_SLIP
{ MP_ROM_QSTR(MP_QSTR_slip), MP_ROM_PTR(&lwip_slip_type) }, { MP_ROM_QSTR(MP_QSTR_slip), MP_ROM_PTR(&lwip_slip_type) },
#endif #endif
// class constants // class constants
{ MP_ROM_QSTR(MP_QSTR_AF_INET), MP_ROM_INT(MOD_NETWORK_AF_INET) }, { MP_ROM_QSTR(MP_QSTR_AF_INET), MP_ROM_INT(MOD_NETWORK_AF_INET) },
{ MP_ROM_QSTR(MP_QSTR_AF_INET6), MP_ROM_INT(MOD_NETWORK_AF_INET6) }, { MP_ROM_QSTR(MP_QSTR_AF_INET6), MP_ROM_INT(MOD_NETWORK_AF_INET6) },
@ -1431,7 +1443,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_lwip_globals, mp_module_lwip_globals_table
const mp_obj_module_t mp_module_lwip = { const mp_obj_module_t mp_module_lwip = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_lwip_globals, .globals = (mp_obj_dict_t *)&mp_module_lwip_globals,
}; };
#endif // MICROPY_PY_LWIP #endif // MICROPY_PY_LWIP

View File

@ -105,7 +105,7 @@ STATIC mp_obj_t onewire_crc8(mp_obj_t data) {
mp_get_buffer_raise(data, &bufinfo, MP_BUFFER_READ); mp_get_buffer_raise(data, &bufinfo, MP_BUFFER_READ);
uint8_t crc = 0; uint8_t crc = 0;
for (size_t i = 0; i < bufinfo.len; ++i) { for (size_t i = 0; i < bufinfo.len; ++i) {
uint8_t byte = ((uint8_t*)bufinfo.buf)[i]; uint8_t byte = ((uint8_t *)bufinfo.buf)[i];
for (int b = 0; b < 8; ++b) { for (int b = 0; b < 8; ++b) {
uint8_t fb_bit = (crc ^ byte) & 0x01; uint8_t fb_bit = (crc ^ byte) & 0x01;
if (fb_bit == 0x01) { if (fb_bit == 0x01) {
@ -137,5 +137,5 @@ STATIC MP_DEFINE_CONST_DICT(onewire_module_globals, onewire_module_globals_table
const mp_obj_module_t mp_module_onewire = { const mp_obj_module_t mp_module_onewire = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&onewire_module_globals, .globals = (mp_obj_dict_t *)&onewire_module_globals,
}; };

View File

@ -12,11 +12,11 @@
#include "extmod/modubinascii.h" #include "extmod/modubinascii.h"
static void check_not_unicode(const mp_obj_t arg) { static void check_not_unicode(const mp_obj_t arg) {
#if MICROPY_CPYTHON_COMPAT #if MICROPY_CPYTHON_COMPAT
if (MP_OBJ_IS_STR(arg)) { if (MP_OBJ_IS_STR(arg)) {
mp_raise_TypeError(translate("a bytes-like object is required")); mp_raise_TypeError(translate("a bytes-like object is required"));
} }
#endif #endif
} }
mp_obj_t mod_binascii_hexlify(size_t n_args, const mp_obj_t *args) { mp_obj_t mod_binascii_hexlify(size_t n_args, const mp_obj_t *args) {
@ -41,7 +41,7 @@ mp_obj_t mod_binascii_hexlify(size_t n_args, const mp_obj_t *args) {
sep = mp_obj_str_get_str(args[1]); sep = mp_obj_str_get_str(args[1]);
} }
vstr_init_len(&vstr, out_len); vstr_init_len(&vstr, out_len);
byte *in = bufinfo.buf, *out = (byte*)vstr.buf; byte *in = bufinfo.buf, *out = (byte *)vstr.buf;
for (mp_uint_t i = bufinfo.len; i--;) { for (mp_uint_t i = bufinfo.len; i--;) {
byte d = (*in >> 4); byte d = (*in >> 4);
if (d > 9) { if (d > 9) {
@ -70,7 +70,7 @@ mp_obj_t mod_binascii_unhexlify(mp_obj_t data) {
} }
vstr_t vstr; vstr_t vstr;
vstr_init_len(&vstr, bufinfo.len / 2); vstr_init_len(&vstr, bufinfo.len / 2);
byte *in = bufinfo.buf, *out = (byte*)vstr.buf; byte *in = bufinfo.buf, *out = (byte *)vstr.buf;
byte hex_byte = 0; byte hex_byte = 0;
for (mp_uint_t i = bufinfo.len; i--;) { for (mp_uint_t i = bufinfo.len; i--;) {
byte hex_ch = *in++; byte hex_ch = *in++;
@ -161,7 +161,7 @@ mp_obj_t mod_binascii_b2a_base64(mp_obj_t data) {
vstr_init_len(&vstr, ((bufinfo.len != 0) ? (((bufinfo.len - 1) / 3) + 1) * 4 : 0) + 1); vstr_init_len(&vstr, ((bufinfo.len != 0) ? (((bufinfo.len - 1) / 3) + 1) * 4 : 0) + 1);
// First pass, we convert input buffer to numeric base 64 values // First pass, we convert input buffer to numeric base 64 values
byte *in = bufinfo.buf, *out = (byte*)vstr.buf; byte *in = bufinfo.buf, *out = (byte *)vstr.buf;
mp_uint_t i; mp_uint_t i;
for (i = bufinfo.len; i >= 3; i -= 3) { for (i = bufinfo.len; i >= 3; i -= 3) {
*out++ = (in[0] & 0xFC) >> 2; *out++ = (in[0] & 0xFC) >> 2;
@ -175,8 +175,7 @@ mp_obj_t mod_binascii_b2a_base64(mp_obj_t data) {
if (i == 2) { if (i == 2) {
*out++ = (in[0] & 0x03) << 4 | (in[1] & 0xF0) >> 4; *out++ = (in[0] & 0x03) << 4 | (in[1] & 0xF0) >> 4;
*out++ = (in[1] & 0x0F) << 2; *out++ = (in[1] & 0x0F) << 2;
} } else {
else {
*out++ = (in[0] & 0x03) << 4; *out++ = (in[0] & 0x03) << 4;
*out++ = 64; *out++ = 64;
} }
@ -184,7 +183,7 @@ mp_obj_t mod_binascii_b2a_base64(mp_obj_t data) {
} }
// Second pass, we convert number base 64 values to actual base64 ascii encoding // Second pass, we convert number base 64 values to actual base64 ascii encoding
out = (byte*)vstr.buf; out = (byte *)vstr.buf;
for (mp_uint_t j = vstr.len - 1; j--;) { for (mp_uint_t j = vstr.len - 1; j--;) {
if (*out < 26) { if (*out < 26) {
*out += 'A'; *out += 'A';
@ -193,7 +192,7 @@ mp_obj_t mod_binascii_b2a_base64(mp_obj_t data) {
} else if (*out < 62) { } else if (*out < 62) {
*out += '0' - 52; *out += '0' - 52;
} else if (*out == 62) { } else if (*out == 62) {
*out ='+'; *out = '+';
} else if (*out == 63) { } else if (*out == 63) {
*out = '/'; *out = '/';
} else { } else {
@ -237,7 +236,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_binascii_globals, mp_module_binascii_globa
const mp_obj_module_t mp_module_ubinascii = { const mp_obj_module_t mp_module_ubinascii = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_binascii_globals, .globals = (mp_obj_dict_t *)&mp_module_binascii_globals,
}; };
#endif //MICROPY_PY_UBINASCII #endif // MICROPY_PY_UBINASCII

View File

@ -105,7 +105,7 @@ STATIC mp_obj_t uctypes_struct_make_new(const mp_obj_type_t *type, size_t n_args
mp_arg_check_num(n_args, kw_args, 2, 3, false); mp_arg_check_num(n_args, kw_args, 2, 3, false);
mp_obj_uctypes_struct_t *o = m_new_obj(mp_obj_uctypes_struct_t); mp_obj_uctypes_struct_t *o = m_new_obj(mp_obj_uctypes_struct_t);
o->base.type = type; o->base.type = type;
o->addr = (void*)(uintptr_t)mp_obj_int_get_truncated(args[0]); o->addr = (void *)(uintptr_t)mp_obj_int_get_truncated(args[0]);
o->desc = args[1]; o->desc = args[1];
o->flags = LAYOUT_NATIVE; o->flags = LAYOUT_NATIVE;
if (n_args == 3) { if (n_args == 3) {
@ -125,8 +125,12 @@ STATIC void uctypes_struct_print(const mp_print_t *print, mp_obj_t self_in, mp_p
mp_int_t offset = MP_OBJ_SMALL_INT_VALUE(t->items[0]); mp_int_t offset = MP_OBJ_SMALL_INT_VALUE(t->items[0]);
uint agg_type = GET_TYPE(offset, AGG_TYPE_BITS); uint agg_type = GET_TYPE(offset, AGG_TYPE_BITS);
switch (agg_type) { switch (agg_type) {
case PTR: typen = "PTR"; break; case PTR:
case ARRAY: typen = "ARRAY"; break; typen = "PTR";
break;
case ARRAY:
typen = "ARRAY";
break;
} }
} else { } else {
typen = "ERROR"; typen = "ERROR";
@ -157,10 +161,10 @@ STATIC mp_uint_t uctypes_struct_agg_size(mp_obj_tuple_t *t, int layout_type, mp_
case STRUCT: case STRUCT:
return uctypes_struct_size(t->items[1], layout_type, max_field_size); return uctypes_struct_size(t->items[1], layout_type, max_field_size);
case PTR: case PTR:
if (sizeof(void*) > *max_field_size) { if (sizeof(void *) > *max_field_size) {
*max_field_size = sizeof(void*); *max_field_size = sizeof(void *);
} }
return sizeof(void*); return sizeof(void *);
case ARRAY: { case ARRAY: {
mp_int_t arr_sz = MP_OBJ_SMALL_INT_VALUE(t->items[1]); mp_int_t arr_sz = MP_OBJ_SMALL_INT_VALUE(t->items[1]);
uint val_type = GET_TYPE(arr_sz, VAL_TYPE_BITS); uint val_type = GET_TYPE(arr_sz, VAL_TYPE_BITS);
@ -189,7 +193,7 @@ STATIC mp_uint_t uctypes_struct_agg_size(mp_obj_tuple_t *t, int layout_type, mp_
STATIC mp_uint_t uctypes_struct_size(mp_obj_t desc_in, int layout_type, mp_uint_t *max_field_size) { STATIC mp_uint_t uctypes_struct_size(mp_obj_t desc_in, int layout_type, mp_uint_t *max_field_size) {
if (!MP_OBJ_IS_TYPE(desc_in, &mp_type_dict)) { if (!MP_OBJ_IS_TYPE(desc_in, &mp_type_dict)) {
if (MP_OBJ_IS_TYPE(desc_in, &mp_type_tuple)) { if (MP_OBJ_IS_TYPE(desc_in, &mp_type_tuple)) {
return uctypes_struct_agg_size((mp_obj_tuple_t*)MP_OBJ_TO_PTR(desc_in), layout_type, max_field_size); return uctypes_struct_agg_size((mp_obj_tuple_t *)MP_OBJ_TO_PTR(desc_in), layout_type, max_field_size);
} else if (MP_OBJ_IS_SMALL_INT(desc_in)) { } else if (MP_OBJ_IS_SMALL_INT(desc_in)) {
// We allow sizeof on both type definitions and structures/structure fields, // We allow sizeof on both type definitions and structures/structure fields,
// but scalar structure field is lowered into native Python int, so all // but scalar structure field is lowered into native Python int, so all
@ -276,11 +280,11 @@ static inline void set_unaligned(uint val_type, byte *p, int big_endian, mp_obj_
static inline mp_uint_t get_aligned_basic(uint val_type, void *p) { static inline mp_uint_t get_aligned_basic(uint val_type, void *p) {
switch (val_type) { switch (val_type) {
case UINT8: case UINT8:
return *(uint8_t*)p; return *(uint8_t *)p;
case UINT16: case UINT16:
return *(uint16_t*)p; return *(uint16_t *)p;
case UINT32: case UINT32:
return *(uint32_t*)p; return *(uint32_t *)p;
} }
assert(0); assert(0);
return 0; return 0;
@ -289,11 +293,14 @@ static inline mp_uint_t get_aligned_basic(uint val_type, void *p) {
static inline void set_aligned_basic(uint val_type, void *p, mp_uint_t v) { static inline void set_aligned_basic(uint val_type, void *p, mp_uint_t v) {
switch (val_type) { switch (val_type) {
case UINT8: case UINT8:
*(uint8_t*)p = (uint8_t)v; return; *(uint8_t *)p = (uint8_t)v;
return;
case UINT16: case UINT16:
*(uint16_t*)p = (uint16_t)v; return; *(uint16_t *)p = (uint16_t)v;
return;
case UINT32: case UINT32:
*(uint32_t*)p = (uint32_t)v; return; *(uint32_t *)p = (uint32_t)v;
return;
} }
assert(0); assert(0);
} }
@ -301,26 +308,26 @@ static inline void set_aligned_basic(uint val_type, void *p, mp_uint_t v) {
STATIC mp_obj_t get_aligned(uint val_type, void *p, mp_int_t index) { STATIC mp_obj_t get_aligned(uint val_type, void *p, mp_int_t index) {
switch (val_type) { switch (val_type) {
case UINT8: case UINT8:
return MP_OBJ_NEW_SMALL_INT(((uint8_t*)p)[index]); return MP_OBJ_NEW_SMALL_INT(((uint8_t *)p)[index]);
case INT8: case INT8:
return MP_OBJ_NEW_SMALL_INT(((int8_t*)p)[index]); return MP_OBJ_NEW_SMALL_INT(((int8_t *)p)[index]);
case UINT16: case UINT16:
return MP_OBJ_NEW_SMALL_INT(((uint16_t*)p)[index]); return MP_OBJ_NEW_SMALL_INT(((uint16_t *)p)[index]);
case INT16: case INT16:
return MP_OBJ_NEW_SMALL_INT(((int16_t*)p)[index]); return MP_OBJ_NEW_SMALL_INT(((int16_t *)p)[index]);
case UINT32: case UINT32:
return mp_obj_new_int_from_uint(((uint32_t*)p)[index]); return mp_obj_new_int_from_uint(((uint32_t *)p)[index]);
case INT32: case INT32:
return mp_obj_new_int(((int32_t*)p)[index]); return mp_obj_new_int(((int32_t *)p)[index]);
case UINT64: case UINT64:
return mp_obj_new_int_from_ull(((uint64_t*)p)[index]); return mp_obj_new_int_from_ull(((uint64_t *)p)[index]);
case INT64: case INT64:
return mp_obj_new_int_from_ll(((int64_t*)p)[index]); return mp_obj_new_int_from_ll(((int64_t *)p)[index]);
#if MICROPY_PY_BUILTINS_FLOAT #if MICROPY_PY_BUILTINS_FLOAT
case FLOAT32: case FLOAT32:
return mp_obj_new_float((mp_float_t)((float*)p)[index]); return mp_obj_new_float((mp_float_t)((float *)p)[index]);
case FLOAT64: case FLOAT64:
return mp_obj_new_float(((double*)p)[index]); return mp_obj_new_float(((double *)p)[index]);
#endif #endif
default: default:
assert(0); assert(0);
@ -333,9 +340,9 @@ STATIC void set_aligned(uint val_type, void *p, mp_int_t index, mp_obj_t val) {
if (val_type == FLOAT32 || val_type == FLOAT64) { if (val_type == FLOAT32 || val_type == FLOAT64) {
mp_float_t v = mp_obj_get_float(val); mp_float_t v = mp_obj_get_float(val);
if (val_type == FLOAT32) { if (val_type == FLOAT32) {
((float*)p)[index] = v; ((float *)p)[index] = v;
} else { } else {
((double*)p)[index] = v; ((double *)p)[index] = v;
} }
return; return;
} }
@ -343,21 +350,27 @@ STATIC void set_aligned(uint val_type, void *p, mp_int_t index, mp_obj_t val) {
mp_int_t v = mp_obj_get_int_truncated(val); mp_int_t v = mp_obj_get_int_truncated(val);
switch (val_type) { switch (val_type) {
case UINT8: case UINT8:
((uint8_t*)p)[index] = (uint8_t)v; return; ((uint8_t *)p)[index] = (uint8_t)v;
return;
case INT8: case INT8:
((int8_t*)p)[index] = (int8_t)v; return; ((int8_t *)p)[index] = (int8_t)v;
return;
case UINT16: case UINT16:
((uint16_t*)p)[index] = (uint16_t)v; return; ((uint16_t *)p)[index] = (uint16_t)v;
return;
case INT16: case INT16:
((int16_t*)p)[index] = (int16_t)v; return; ((int16_t *)p)[index] = (int16_t)v;
return;
case UINT32: case UINT32:
((uint32_t*)p)[index] = (uint32_t)v; return; ((uint32_t *)p)[index] = (uint32_t)v;
return;
case INT32: case INT32:
((int32_t*)p)[index] = (int32_t)v; return; ((int32_t *)p)[index] = (int32_t)v;
return;
case INT64: case INT64:
case UINT64: case UINT64:
if (sizeof(mp_int_t) == 8) { if (sizeof(mp_int_t) == 8) {
((uint64_t*)p)[index] = (uint64_t)v; ((uint64_t *)p)[index] = (uint64_t)v;
} else { } else {
// TODO: Doesn't offer atomic store semantics, but should at least try // TODO: Doesn't offer atomic store semantics, but should at least try
set_unaligned(val_type, p, MP_ENDIANNESS_BIG, val); set_unaligned(val_type, p, MP_ENDIANNESS_BIG, val);
@ -373,7 +386,7 @@ STATIC mp_obj_t uctypes_struct_attr_op(mp_obj_t self_in, qstr attr, mp_obj_t set
// TODO: Support at least OrderedDict in addition // TODO: Support at least OrderedDict in addition
if (!MP_OBJ_IS_TYPE(self->desc, &mp_type_dict)) { if (!MP_OBJ_IS_TYPE(self->desc, &mp_type_dict)) {
mp_raise_TypeError(translate("struct: no fields")); mp_raise_TypeError(translate("struct: no fields"));
} }
mp_obj_t deref = mp_obj_dict_get(self->desc, MP_OBJ_NEW_QSTR(attr)); mp_obj_t deref = mp_obj_dict_get(self->desc, MP_OBJ_NEW_QSTR(attr));
@ -381,7 +394,7 @@ STATIC mp_obj_t uctypes_struct_attr_op(mp_obj_t self_in, qstr attr, mp_obj_t set
mp_int_t offset = MP_OBJ_SMALL_INT_VALUE(deref); mp_int_t offset = MP_OBJ_SMALL_INT_VALUE(deref);
mp_uint_t val_type = GET_TYPE(offset, VAL_TYPE_BITS); mp_uint_t val_type = GET_TYPE(offset, VAL_TYPE_BITS);
offset &= VALUE_MASK(VAL_TYPE_BITS); offset &= VALUE_MASK(VAL_TYPE_BITS);
//printf("scalar type=%d offset=%x\n", val_type, offset); // printf("scalar type=%d offset=%x\n", val_type, offset);
if (val_type <= INT64 || val_type == FLOAT32 || val_type == FLOAT64) { if (val_type <= INT64 || val_type == FLOAT32 || val_type == FLOAT64) {
// printf("size=%d\n", GET_SCALAR_SIZE(val_type)); // printf("size=%d\n", GET_SCALAR_SIZE(val_type));
@ -451,7 +464,7 @@ STATIC mp_obj_t uctypes_struct_attr_op(mp_obj_t self_in, qstr attr, mp_obj_t set
mp_int_t offset = MP_OBJ_SMALL_INT_VALUE(sub->items[0]); mp_int_t offset = MP_OBJ_SMALL_INT_VALUE(sub->items[0]);
mp_uint_t agg_type = GET_TYPE(offset, AGG_TYPE_BITS); mp_uint_t agg_type = GET_TYPE(offset, AGG_TYPE_BITS);
offset &= VALUE_MASK(AGG_TYPE_BITS); offset &= VALUE_MASK(AGG_TYPE_BITS);
//printf("agg type=%d offset=%x\n", agg_type, offset); // printf("agg type=%d offset=%x\n", agg_type, offset);
switch (agg_type) { switch (agg_type) {
case STRUCT: { case STRUCT: {
@ -475,7 +488,7 @@ STATIC mp_obj_t uctypes_struct_attr_op(mp_obj_t self_in, qstr attr, mp_obj_t set
o->desc = MP_OBJ_FROM_PTR(sub); o->desc = MP_OBJ_FROM_PTR(sub);
o->addr = self->addr + offset; o->addr = self->addr + offset;
o->flags = self->flags; o->flags = self->flags;
//printf("PTR/ARR base addr=%p\n", o->addr); // printf("PTR/ARR base addr=%p\n", o->addr);
return MP_OBJ_FROM_PTR(o); return MP_OBJ_FROM_PTR(o);
} }
} }
@ -555,7 +568,7 @@ STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t base_in, mp_obj_t index_in, mp_ob
} }
} else if (agg_type == PTR) { } else if (agg_type == PTR) {
byte *p = *(void**)self->addr; byte *p = *(void **)self->addr;
if (MP_OBJ_IS_SMALL_INT(t->items[1])) { if (MP_OBJ_IS_SMALL_INT(t->items[1])) {
uint val_type = GET_TYPE(MP_OBJ_SMALL_INT_VALUE(t->items[1]), VAL_TYPE_BITS); uint val_type = GET_TYPE(MP_OBJ_SMALL_INT_VALUE(t->items[1]), VAL_TYPE_BITS);
return get_aligned(val_type, p, index); return get_aligned(val_type, p, index);
@ -603,7 +616,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(uctypes_struct_addressof_obj, uctypes_struct_addressof
/// captured by reference (and thus memory pointed by bytearray may change /// captured by reference (and thus memory pointed by bytearray may change
/// or become invalid at later time). Use bytes_at() to capture by value. /// or become invalid at later time). Use bytes_at() to capture by value.
STATIC mp_obj_t uctypes_struct_bytearray_at(mp_obj_t ptr, mp_obj_t size) { STATIC mp_obj_t uctypes_struct_bytearray_at(mp_obj_t ptr, mp_obj_t size) {
return mp_obj_new_bytearray_by_ref(mp_obj_int_get_truncated(size), (void*)(uintptr_t)mp_obj_int_get_truncated(ptr)); return mp_obj_new_bytearray_by_ref(mp_obj_int_get_truncated(size), (void *)(uintptr_t)mp_obj_int_get_truncated(ptr));
} }
MP_DEFINE_CONST_FUN_OBJ_2(uctypes_struct_bytearray_at_obj, uctypes_struct_bytearray_at); MP_DEFINE_CONST_FUN_OBJ_2(uctypes_struct_bytearray_at_obj, uctypes_struct_bytearray_at);
@ -612,7 +625,7 @@ MP_DEFINE_CONST_FUN_OBJ_2(uctypes_struct_bytearray_at_obj, uctypes_struct_bytear
/// captured by value, i.e. copied. Use bytearray_at() to capture by reference /// captured by value, i.e. copied. Use bytearray_at() to capture by reference
/// ("zero copy"). /// ("zero copy").
STATIC mp_obj_t uctypes_struct_bytes_at(mp_obj_t ptr, mp_obj_t size) { STATIC mp_obj_t uctypes_struct_bytes_at(mp_obj_t ptr, mp_obj_t size) {
return mp_obj_new_bytes((void*)(uintptr_t)mp_obj_int_get_truncated(ptr), mp_obj_int_get_truncated(size)); return mp_obj_new_bytes((void *)(uintptr_t)mp_obj_int_get_truncated(ptr), mp_obj_int_get_truncated(size));
} }
MP_DEFINE_CONST_FUN_OBJ_2(uctypes_struct_bytes_at_obj, uctypes_struct_bytes_at); MP_DEFINE_CONST_FUN_OBJ_2(uctypes_struct_bytes_at_obj, uctypes_struct_bytes_at);
@ -690,7 +703,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_uctypes_globals, mp_module_uctypes_globals
const mp_obj_module_t mp_module_uctypes = { const mp_obj_module_t mp_module_uctypes = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_uctypes_globals, .globals = (mp_obj_dict_t *)&mp_module_uctypes_globals,
}; };
#endif #endif

View File

@ -49,8 +49,8 @@ STATIC mp_obj_t uhashlib_sha256_make_new(const mp_obj_type_t *type, size_t n_arg
mp_arg_check_num(n_args, kw_args, 0, 1, false); mp_arg_check_num(n_args, kw_args, 0, 1, false);
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(mbedtls_sha256_context)); mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(mbedtls_sha256_context));
o->base.type = type; o->base.type = type;
mbedtls_sha256_init((mbedtls_sha256_context*)&o->state); mbedtls_sha256_init((mbedtls_sha256_context *)&o->state);
mbedtls_sha256_starts((mbedtls_sha256_context*)&o->state, 0); mbedtls_sha256_starts((mbedtls_sha256_context *)&o->state, 0);
if (n_args == 1) { if (n_args == 1) {
uhashlib_sha256_update(MP_OBJ_FROM_PTR(o), args[0]); uhashlib_sha256_update(MP_OBJ_FROM_PTR(o), args[0]);
} }
@ -61,7 +61,7 @@ STATIC mp_obj_t uhashlib_sha256_update(mp_obj_t self_in, mp_obj_t arg) {
mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in);
mp_buffer_info_t bufinfo; mp_buffer_info_t bufinfo;
mp_get_buffer_raise(arg, &bufinfo, MP_BUFFER_READ); mp_get_buffer_raise(arg, &bufinfo, MP_BUFFER_READ);
mbedtls_sha256_update((mbedtls_sha256_context*)&self->state, bufinfo.buf, bufinfo.len); mbedtls_sha256_update((mbedtls_sha256_context *)&self->state, bufinfo.buf, bufinfo.len);
return mp_const_none; return mp_const_none;
} }
@ -69,25 +69,25 @@ STATIC mp_obj_t uhashlib_sha256_digest(mp_obj_t self_in) {
mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in);
vstr_t vstr; vstr_t vstr;
vstr_init_len(&vstr, 32); vstr_init_len(&vstr, 32);
mbedtls_sha256_finish((mbedtls_sha256_context*)&self->state, (unsigned char *)vstr.buf); mbedtls_sha256_finish((mbedtls_sha256_context *)&self->state, (unsigned char *)vstr.buf);
return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr); return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);
} }
#else #else
static void check_not_unicode(const mp_obj_t arg) { static void check_not_unicode(const mp_obj_t arg) {
#if MICROPY_CPYTHON_COMPAT #if MICROPY_CPYTHON_COMPAT
if (MP_OBJ_IS_STR(arg)) { if (MP_OBJ_IS_STR(arg)) {
mp_raise_TypeError(translate("a bytes-like object is required")); mp_raise_TypeError(translate("a bytes-like object is required"));
} }
#endif #endif
} }
STATIC mp_obj_t uhashlib_sha256_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { STATIC mp_obj_t uhashlib_sha256_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
mp_arg_check_num(n_args, kw_args, 0, 1, false); mp_arg_check_num(n_args, kw_args, 0, 1, false);
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(CRYAL_SHA256_CTX)); mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(CRYAL_SHA256_CTX));
o->base.type = type; o->base.type = type;
sha256_init((CRYAL_SHA256_CTX*)o->state); sha256_init((CRYAL_SHA256_CTX *)o->state);
if (n_args == 1) { if (n_args == 1) {
uhashlib_sha256_update(MP_OBJ_FROM_PTR(o), args[0]); uhashlib_sha256_update(MP_OBJ_FROM_PTR(o), args[0]);
} }
@ -99,7 +99,7 @@ STATIC mp_obj_t uhashlib_sha256_update(mp_obj_t self_in, mp_obj_t arg) {
mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in);
mp_buffer_info_t bufinfo; mp_buffer_info_t bufinfo;
mp_get_buffer_raise(arg, &bufinfo, MP_BUFFER_READ); mp_get_buffer_raise(arg, &bufinfo, MP_BUFFER_READ);
sha256_update((CRYAL_SHA256_CTX*)self->state, bufinfo.buf, bufinfo.len); sha256_update((CRYAL_SHA256_CTX *)self->state, bufinfo.buf, bufinfo.len);
return mp_const_none; return mp_const_none;
} }
@ -107,7 +107,7 @@ STATIC mp_obj_t uhashlib_sha256_digest(mp_obj_t self_in) {
mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in);
vstr_t vstr; vstr_t vstr;
vstr_init_len(&vstr, SHA256_BLOCK_SIZE); vstr_init_len(&vstr, SHA256_BLOCK_SIZE);
sha256_final((CRYAL_SHA256_CTX*)self->state, (byte*)vstr.buf); sha256_final((CRYAL_SHA256_CTX *)self->state, (byte *)vstr.buf);
return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr); return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);
} }
#endif #endif
@ -126,7 +126,7 @@ STATIC const mp_obj_type_t uhashlib_sha256_type = {
{ &mp_type_type }, { &mp_type_type },
.name = MP_QSTR_sha256, .name = MP_QSTR_sha256,
.make_new = uhashlib_sha256_make_new, .make_new = uhashlib_sha256_make_new,
.locals_dict = (void*)&uhashlib_sha256_locals_dict, .locals_dict = (void *)&uhashlib_sha256_locals_dict,
}; };
#endif #endif
@ -138,7 +138,7 @@ STATIC mp_obj_t uhashlib_sha1_make_new(const mp_obj_type_t *type, size_t n_args,
mp_arg_check_num(n_args, kw_args, 0, 1, false); mp_arg_check_num(n_args, kw_args, 0, 1, false);
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(SHA1_CTX)); mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(SHA1_CTX));
o->base.type = type; o->base.type = type;
SHA1_Init((SHA1_CTX*)o->state); SHA1_Init((SHA1_CTX *)o->state);
if (n_args == 1) { if (n_args == 1) {
uhashlib_sha1_update(MP_OBJ_FROM_PTR(o), args[0]); uhashlib_sha1_update(MP_OBJ_FROM_PTR(o), args[0]);
} }
@ -150,7 +150,7 @@ STATIC mp_obj_t uhashlib_sha1_update(mp_obj_t self_in, mp_obj_t arg) {
mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in);
mp_buffer_info_t bufinfo; mp_buffer_info_t bufinfo;
mp_get_buffer_raise(arg, &bufinfo, MP_BUFFER_READ); mp_get_buffer_raise(arg, &bufinfo, MP_BUFFER_READ);
SHA1_Update((SHA1_CTX*)self->state, bufinfo.buf, bufinfo.len); SHA1_Update((SHA1_CTX *)self->state, bufinfo.buf, bufinfo.len);
return mp_const_none; return mp_const_none;
} }
@ -158,7 +158,7 @@ STATIC mp_obj_t uhashlib_sha1_digest(mp_obj_t self_in) {
mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in);
vstr_t vstr; vstr_t vstr;
vstr_init_len(&vstr, SHA1_SIZE); vstr_init_len(&vstr, SHA1_SIZE);
SHA1_Final((byte*)vstr.buf, (SHA1_CTX*)self->state); SHA1_Final((byte *)vstr.buf, (SHA1_CTX *)self->state);
return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr); return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);
} }
#endif #endif
@ -168,8 +168,8 @@ STATIC mp_obj_t uhashlib_sha1_make_new(const mp_obj_type_t *type, size_t n_args,
mp_arg_check_num(n_args, n_kw, 0, 1, false); mp_arg_check_num(n_args, n_kw, 0, 1, false);
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(mbedtls_sha1_context)); mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(mbedtls_sha1_context));
o->base.type = type; o->base.type = type;
mbedtls_sha1_init((mbedtls_sha1_context*)o->state); mbedtls_sha1_init((mbedtls_sha1_context *)o->state);
mbedtls_sha1_starts((mbedtls_sha1_context*)o->state); mbedtls_sha1_starts((mbedtls_sha1_context *)o->state);
if (n_args == 1) { if (n_args == 1) {
uhashlib_sha1_update(MP_OBJ_FROM_PTR(o), args[0]); uhashlib_sha1_update(MP_OBJ_FROM_PTR(o), args[0]);
} }
@ -180,7 +180,7 @@ STATIC mp_obj_t uhashlib_sha1_update(mp_obj_t self_in, mp_obj_t arg) {
mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in);
mp_buffer_info_t bufinfo; mp_buffer_info_t bufinfo;
mp_get_buffer_raise(arg, &bufinfo, MP_BUFFER_READ); mp_get_buffer_raise(arg, &bufinfo, MP_BUFFER_READ);
mbedtls_sha1_update((mbedtls_sha1_context*)self->state, bufinfo.buf, bufinfo.len); mbedtls_sha1_update((mbedtls_sha1_context *)self->state, bufinfo.buf, bufinfo.len);
return mp_const_none; return mp_const_none;
} }
@ -188,8 +188,8 @@ STATIC mp_obj_t uhashlib_sha1_digest(mp_obj_t self_in) {
mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_hash_t *self = MP_OBJ_TO_PTR(self_in);
vstr_t vstr; vstr_t vstr;
vstr_init_len(&vstr, 20); vstr_init_len(&vstr, 20);
mbedtls_sha1_finish((mbedtls_sha1_context*)self->state, (byte*)vstr.buf); mbedtls_sha1_finish((mbedtls_sha1_context *)self->state, (byte *)vstr.buf);
mbedtls_sha1_free((mbedtls_sha1_context*)self->state); mbedtls_sha1_free((mbedtls_sha1_context *)self->state);
return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr); return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);
} }
#endif #endif
@ -207,7 +207,7 @@ STATIC const mp_obj_type_t uhashlib_sha1_type = {
{ &mp_type_type }, { &mp_type_type },
.name = MP_QSTR_sha1, .name = MP_QSTR_sha1,
.make_new = uhashlib_sha1_make_new, .make_new = uhashlib_sha1_make_new,
.locals_dict = (void*)&uhashlib_sha1_locals_dict, .locals_dict = (void *)&uhashlib_sha1_locals_dict,
}; };
#endif #endif
@ -225,11 +225,11 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_uhashlib_globals, mp_module_uhashlib_globa
const mp_obj_module_t mp_module_uhashlib = { const mp_obj_module_t mp_module_uhashlib = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_uhashlib_globals, .globals = (mp_obj_dict_t *)&mp_module_uhashlib_globals,
}; };
#if MICROPY_PY_UHASHLIB_SHA256 #if MICROPY_PY_UHASHLIB_SHA256
#include "crypto-algorithms/sha256.c" #include "crypto-algorithms/sha256.c"
#endif #endif
#endif //MICROPY_PY_UHASHLIB #endif // MICROPY_PY_UHASHLIB

View File

@ -95,7 +95,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_uheapq_globals, mp_module_uheapq_globals_t
const mp_obj_module_t mp_module_uheapq = { const mp_obj_module_t mp_module_uheapq = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_uheapq_globals, .globals = (mp_obj_dict_t *)&mp_module_uheapq_globals,
}; };
#endif //MICROPY_PY_UHEAPQ #endif // MICROPY_PY_UHEAPQ

View File

@ -85,8 +85,8 @@ STATIC byte ujson_stream_next(ujson_stream_t *s) {
#define CIRCUITPY_JSON_READ_CHUNK_SIZE 64 #define CIRCUITPY_JSON_READ_CHUNK_SIZE 64
STATIC mp_uint_t ujson_python_readinto(mp_obj_t obj, void *buf, mp_uint_t size, int *errcode) { STATIC mp_uint_t ujson_python_readinto(mp_obj_t obj, void *buf, mp_uint_t size, int *errcode) {
(void) size; // Ignore size because we know it's always 1. (void)size; // Ignore size because we know it's always 1.
ujson_stream_t* s = obj; ujson_stream_t *s = obj;
if (s->start == s->end) { if (s->start == s->end) {
*errcode = 0; *errcode = 0;
@ -99,7 +99,7 @@ STATIC mp_uint_t ujson_python_readinto(mp_obj_t obj, void *buf, mp_uint_t size,
s->end = mp_obj_get_int(ret); s->end = mp_obj_get_int(ret);
} }
*((uint8_t *)buf) = ((uint8_t*) s->bytearray_obj.items)[s->start]; *((uint8_t *)buf) = ((uint8_t *)s->bytearray_obj.items)[s->start];
s->start++; s->start++;
return 1; return 1;
} }
@ -139,7 +139,7 @@ STATIC mp_obj_t _mod_ujson_load(mp_obj_t stream_obj, bool return_first_json) {
mp_obj_t stack_key = MP_OBJ_NULL; mp_obj_t stack_key = MP_OBJ_NULL;
S_NEXT(s); S_NEXT(s);
for (;;) { for (;;) {
cont: cont:
if (S_END(s)) { if (S_END(s)) {
break; break;
} }
@ -186,11 +186,21 @@ STATIC mp_obj_t _mod_ujson_load(mp_obj_t stream_obj, bool return_first_json) {
if (c == '\\') { if (c == '\\') {
c = S_NEXT(s); c = S_NEXT(s);
switch (c) { switch (c) {
case 'b': c = 0x08; break; case 'b':
case 'f': c = 0x0c; break; c = 0x08;
case 'n': c = 0x0a; break; break;
case 'r': c = 0x0d; break; case 'f':
case 't': c = 0x09; break; c = 0x0c;
break;
case 'n':
c = 0x0a;
break;
case 'r':
c = 0x0d;
break;
case 't':
c = 0x09;
break;
case 'u': { case 'u': {
mp_uint_t num = 0; mp_uint_t num = 0;
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
@ -216,7 +226,16 @@ STATIC mp_obj_t _mod_ujson_load(mp_obj_t stream_obj, bool return_first_json) {
next = mp_obj_new_str(vstr.buf, vstr.len); next = mp_obj_new_str(vstr.buf, vstr.len);
break; break;
case '-': case '-':
case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9': {
bool flt = false; bool flt = false;
vstr_reset(&vstr); vstr_reset(&vstr);
for (;;) { for (;;) {
@ -298,7 +317,7 @@ STATIC mp_obj_t _mod_ujson_load(mp_obj_t stream_obj, bool return_first_json) {
} }
} }
} }
success: success:
// It is legal for a stream to have contents after JSON. // It is legal for a stream to have contents after JSON.
// E.g., A UART is not closed after receiving an object; in load() we will // E.g., A UART is not closed after receiving an object; in load() we will
// return the first complete JSON object, while in loads() we will retain // return the first complete JSON object, while in loads() we will retain
@ -319,7 +338,7 @@ STATIC mp_obj_t _mod_ujson_load(mp_obj_t stream_obj, bool return_first_json) {
vstr_clear(&vstr); vstr_clear(&vstr);
return stack_top; return stack_top;
fail: fail:
mp_raise_ValueError(translate("syntax error in JSON")); mp_raise_ValueError(translate("syntax error in JSON"));
} }
@ -331,18 +350,18 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_ujson_load_obj, mod_ujson_load);
STATIC mp_obj_t mod_ujson_loads(mp_obj_t obj) { STATIC mp_obj_t mod_ujson_loads(mp_obj_t obj) {
size_t len; size_t len;
const char *buf = mp_obj_str_get_data(obj, &len); const char *buf = mp_obj_str_get_data(obj, &len);
vstr_t vstr = {len, len, (char*)buf, true}; vstr_t vstr = {len, len, (char *)buf, true};
mp_obj_stringio_t sio = {{&mp_type_stringio}, &vstr, 0, MP_OBJ_NULL}; mp_obj_stringio_t sio = {{&mp_type_stringio}, &vstr, 0, MP_OBJ_NULL};
return _mod_ujson_load(MP_OBJ_FROM_PTR(&sio), false); return _mod_ujson_load(MP_OBJ_FROM_PTR(&sio), false);
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_ujson_loads_obj, mod_ujson_loads); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_ujson_loads_obj, mod_ujson_loads);
STATIC const mp_rom_map_elem_t mp_module_ujson_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module_ujson_globals_table[] = {
#if CIRCUITPY #if CIRCUITPY
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_json) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_json) },
#else #else
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ujson) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ujson) },
#endif #endif
{ MP_ROM_QSTR(MP_QSTR_dump), MP_ROM_PTR(&mod_ujson_dump_obj) }, { MP_ROM_QSTR(MP_QSTR_dump), MP_ROM_PTR(&mod_ujson_dump_obj) },
{ MP_ROM_QSTR(MP_QSTR_dumps), MP_ROM_PTR(&mod_ujson_dumps_obj) }, { MP_ROM_QSTR(MP_QSTR_dumps), MP_ROM_PTR(&mod_ujson_dumps_obj) },
{ MP_ROM_QSTR(MP_QSTR_load), MP_ROM_PTR(&mod_ujson_load_obj) }, { MP_ROM_QSTR(MP_QSTR_load), MP_ROM_PTR(&mod_ujson_load_obj) },
@ -353,7 +372,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_ujson_globals, mp_module_ujson_globals_tab
const mp_obj_module_t mp_module_ujson = { const mp_obj_module_t mp_module_ujson = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_ujson_globals, .globals = (mp_obj_dict_t *)&mp_module_ujson_globals,
}; };
#endif //MICROPY_PY_UJSON #endif // MICROPY_PY_UJSON

View File

@ -18,15 +18,14 @@
STATIC uint32_t yasmarang_pad = 0xeda4baba, yasmarang_n = 69, yasmarang_d = 233; STATIC uint32_t yasmarang_pad = 0xeda4baba, yasmarang_n = 69, yasmarang_d = 233;
STATIC uint8_t yasmarang_dat = 0; STATIC uint8_t yasmarang_dat = 0;
STATIC uint32_t yasmarang(void) STATIC uint32_t yasmarang(void) {
{ yasmarang_pad += yasmarang_dat + yasmarang_d * yasmarang_n;
yasmarang_pad += yasmarang_dat + yasmarang_d * yasmarang_n; yasmarang_pad = (yasmarang_pad << 3) + (yasmarang_pad >> 29);
yasmarang_pad = (yasmarang_pad<<3) + (yasmarang_pad>>29); yasmarang_n = yasmarang_pad | 2;
yasmarang_n = yasmarang_pad | 2; yasmarang_d ^= (yasmarang_pad << 31) + (yasmarang_pad >> 1);
yasmarang_d ^= (yasmarang_pad<<31) + (yasmarang_pad>>1); yasmarang_dat ^= (char)yasmarang_pad ^ (yasmarang_d >> 8) ^ 1;
yasmarang_dat ^= (char) yasmarang_pad ^ (yasmarang_d>>8) ^ 1;
return (yasmarang_pad^(yasmarang_d<<5)^(yasmarang_pad>>18)^(yasmarang_dat<<1)); return yasmarang_pad ^ (yasmarang_d << 5) ^ (yasmarang_pad >> 18) ^ (yasmarang_dat << 1);
} /* yasmarang */ } /* yasmarang */
// End of Yasmarang // End of Yasmarang
@ -148,9 +147,11 @@ STATIC mp_float_t yasmarang_float(void) {
union { union {
mp_float_t f; mp_float_t f;
#if MP_ENDIANNESS_LITTLE #if MP_ENDIANNESS_LITTLE
struct { mp_float_int_t frc:MP_FLOAT_FRAC_BITS, exp:MP_FLOAT_EXP_BITS, sgn:1; } p; struct { mp_float_int_t frc : MP_FLOAT_FRAC_BITS, exp : MP_FLOAT_EXP_BITS, sgn : 1;
} p;
#else #else
struct { mp_float_int_t sgn:1, exp:MP_FLOAT_EXP_BITS, frc:MP_FLOAT_FRAC_BITS; } p; struct { mp_float_int_t sgn : 1, exp : MP_FLOAT_EXP_BITS, frc : MP_FLOAT_FRAC_BITS;
} p;
#endif #endif
} u; } u;
u.p.sgn = 0; u.p.sgn = 0;
@ -198,7 +199,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_urandom_globals, mp_module_urandom_globals
const mp_obj_module_t mp_module_urandom = { const mp_obj_module_t mp_module_urandom = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_urandom_globals, .globals = (mp_obj_dict_t *)&mp_module_urandom_globals,
}; };
#endif //MICROPY_PY_URANDOM #endif // MICROPY_PY_URANDOM

View File

@ -52,7 +52,7 @@ STATIC mp_obj_t match_group(mp_obj_t self_in, mp_obj_t no_in) {
return mp_const_none; return mp_const_none;
} }
return mp_obj_new_str_of_type(mp_obj_get_type(self->str), return mp_obj_new_str_of_type(mp_obj_get_type(self->str),
(const byte*)start, self->caps[no * 2 + 1] - start); (const byte *)start, self->caps[no * 2 + 1] - start);
} }
MP_DEFINE_CONST_FUN_OBJ_2(match_group_obj, match_group); MP_DEFINE_CONST_FUN_OBJ_2(match_group_obj, match_group);
@ -141,7 +141,7 @@ STATIC const mp_obj_type_t match_type = {
{ &mp_type_type }, { &mp_type_type },
.name = MP_QSTR_match, .name = MP_QSTR_match,
.print = match_print, .print = match_print,
.locals_dict = (void*)&match_locals_dict, .locals_dict = (void *)&match_locals_dict,
}; };
STATIC void re_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { STATIC void re_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
@ -157,7 +157,7 @@ STATIC mp_obj_t ure_exec(bool is_anchored, uint n_args, const mp_obj_t *args) {
size_t len; size_t len;
subj.begin = mp_obj_str_get_data(args[1], &len); subj.begin = mp_obj_str_get_data(args[1], &len);
subj.end = subj.begin + len; subj.end = subj.begin + len;
#if MICROPY_PY_URE_MATCH_SPAN_START_END #if MICROPY_PY_URE_MATCH_SPAN_START_END
if (n_args > 2) { if (n_args > 2) {
const mp_obj_type_t *self_type = mp_obj_get_type(args[1]); const mp_obj_type_t *self_type = mp_obj_get_type(args[1]);
mp_int_t str_len = MP_OBJ_SMALL_INT_VALUE(mp_obj_len_maybe(args[1])); mp_int_t str_len = MP_OBJ_SMALL_INT_VALUE(mp_obj_len_maybe(args[1]));
@ -185,14 +185,14 @@ STATIC mp_obj_t ure_exec(bool is_anchored, uint n_args, const mp_obj_t *args) {
subj.begin = (const char *)pos_ptr; subj.begin = (const char *)pos_ptr;
subj.end = (const char *)endpos_ptr; subj.end = (const char *)endpos_ptr;
} }
#endif #endif
int caps_num = (self->re.sub + 1) * 2; int caps_num = (self->re.sub + 1) * 2;
mp_obj_match_t *match = m_new_obj_var(mp_obj_match_t, char*, caps_num); mp_obj_match_t *match = m_new_obj_var(mp_obj_match_t, char *, caps_num);
// cast is a workaround for a bug in msvc: it treats const char** as a const pointer instead of a pointer to pointer to const char // cast is a workaround for a bug in msvc: it treats const char** as a const pointer instead of a pointer to pointer to const char
memset((char*)match->caps, 0, caps_num * sizeof(char*)); memset((char *)match->caps, 0, caps_num * sizeof(char *));
int res = re1_5_recursiveloopprog(&self->re, &subj, match->caps, caps_num, is_anchored); int res = re1_5_recursiveloopprog(&self->re, &subj, match->caps, caps_num, is_anchored);
if (res == 0) { if (res == 0) {
m_del_var(mp_obj_match_t, char*, caps_num, match); m_del_var(mp_obj_match_t, char *, caps_num, match);
return mp_const_none; return mp_const_none;
} }
@ -227,10 +227,10 @@ STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) {
} }
mp_obj_t retval = mp_obj_new_list(0, NULL); mp_obj_t retval = mp_obj_new_list(0, NULL);
const char **caps = mp_local_alloc(caps_num * sizeof(char*)); const char **caps = mp_local_alloc(caps_num * sizeof(char *));
while (true) { while (true) {
// cast is a workaround for a bug in msvc: it treats const char** as a const pointer instead of a pointer to pointer to const char // cast is a workaround for a bug in msvc: it treats const char** as a const pointer instead of a pointer to pointer to const char
memset((char**)caps, 0, caps_num * sizeof(char*)); memset((char **)caps, 0, caps_num * sizeof(char *));
int res = re1_5_recursiveloopprog(&self->re, &subj, caps, caps_num, false); int res = re1_5_recursiveloopprog(&self->re, &subj, caps, caps_num, false);
// if we didn't have a match, or had an empty match, it's time to stop // if we didn't have a match, or had an empty match, it's time to stop
@ -238,7 +238,7 @@ STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) {
break; break;
} }
mp_obj_t s = mp_obj_new_str_of_type(str_type, (const byte*)subj.begin, caps[0] - subj.begin); mp_obj_t s = mp_obj_new_str_of_type(str_type, (const byte *)subj.begin, caps[0] - subj.begin);
mp_obj_list_append(retval, s); mp_obj_list_append(retval, s);
if (self->re.sub > 0) { if (self->re.sub > 0) {
mp_raise_NotImplementedError(translate("Splitting with sub-captures")); mp_raise_NotImplementedError(translate("Splitting with sub-captures"));
@ -249,9 +249,9 @@ STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) {
} }
} }
// cast is a workaround for a bug in msvc (see above) // cast is a workaround for a bug in msvc (see above)
mp_local_free((char**)caps); mp_local_free((char **)caps);
mp_obj_t s = mp_obj_new_str_of_type(str_type, (const byte*)subj.begin, subj.end - subj.begin); mp_obj_t s = mp_obj_new_str_of_type(str_type, (const byte *)subj.begin, subj.end - subj.begin);
mp_obj_list_append(retval, s); mp_obj_list_append(retval, s);
return retval; return retval;
} }
@ -278,14 +278,14 @@ STATIC mp_obj_t re_sub_helper(mp_obj_t self_in, size_t n_args, const mp_obj_t *a
vstr_t vstr_return; vstr_t vstr_return;
vstr_return.buf = NULL; // We'll init the vstr after the first match vstr_return.buf = NULL; // We'll init the vstr after the first match
mp_obj_match_t *match = mp_local_alloc(sizeof(mp_obj_match_t) + caps_num * sizeof(char*)); mp_obj_match_t *match = mp_local_alloc(sizeof(mp_obj_match_t) + caps_num * sizeof(char *));
match->base.type = &match_type; match->base.type = &match_type;
match->num_matches = caps_num / 2; // caps_num counts start and end pointers match->num_matches = caps_num / 2; // caps_num counts start and end pointers
match->str = where; match->str = where;
for (;;) { for (;;) {
// cast is a workaround for a bug in msvc: it treats const char** as a const pointer instead of a pointer to pointer to const char // cast is a workaround for a bug in msvc: it treats const char** as a const pointer instead of a pointer to pointer to const char
memset((char*)match->caps, 0, caps_num * sizeof(char*)); memset((char *)match->caps, 0, caps_num * sizeof(char *));
int res = re1_5_recursiveloopprog(&self->re, &subj, match->caps, caps_num, false); int res = re1_5_recursiveloopprog(&self->re, &subj, match->caps, caps_num, false);
// If we didn't have a match, or had an empty match, it's time to stop // If we didn't have a match, or had an empty match, it's time to stop
@ -302,7 +302,7 @@ STATIC mp_obj_t re_sub_helper(mp_obj_t self_in, size_t n_args, const mp_obj_t *a
vstr_add_strn(&vstr_return, subj.begin, match->caps[0] - subj.begin); vstr_add_strn(&vstr_return, subj.begin, match->caps[0] - subj.begin);
// Get replacement string // Get replacement string
const char* repl = mp_obj_str_get_str((mp_obj_is_callable(replace) ? mp_call_function_1(replace, MP_OBJ_FROM_PTR(match)) : replace)); const char *repl = mp_obj_str_get_str((mp_obj_is_callable(replace) ? mp_call_function_1(replace, MP_OBJ_FROM_PTR(match)) : replace));
// Append replacement string to result, substituting any regex groups // Append replacement string to result, substituting any regex groups
while (*repl != '\0') { while (*repl != '\0') {
@ -384,13 +384,13 @@ STATIC MP_DEFINE_CONST_DICT(re_locals_dict, re_locals_dict_table);
STATIC const mp_obj_type_t re_type = { STATIC const mp_obj_type_t re_type = {
{ &mp_type_type }, { &mp_type_type },
#if CIRCUITPY #if CIRCUITPY
.name = MP_QSTR_re, .name = MP_QSTR_re,
#else #else
.name = MP_QSTR_ure, .name = MP_QSTR_ure,
#endif #endif
.print = re_print, .print = re_print,
.locals_dict = (void*)&re_locals_dict, .locals_dict = (void *)&re_locals_dict,
}; };
STATIC mp_obj_t mod_re_compile(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t mod_re_compile(size_t n_args, const mp_obj_t *args) {
@ -407,7 +407,7 @@ STATIC mp_obj_t mod_re_compile(size_t n_args, const mp_obj_t *args) {
} }
int error = re1_5_compilecode(&o->re, re_str); int error = re1_5_compilecode(&o->re, re_str);
if (error != 0) { if (error != 0) {
error: error:
mp_raise_ValueError(translate("Error in regex")); mp_raise_ValueError(translate("Error in regex"));
} }
if (flags & FLAG_DEBUG) { if (flags & FLAG_DEBUG) {
@ -445,11 +445,11 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_re_sub_obj, 3, 5, mod_re_sub);
#endif #endif
STATIC const mp_rom_map_elem_t mp_module_re_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module_re_globals_table[] = {
#if CIRCUITPY #if CIRCUITPY
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_re) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_re) },
#else #else
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ure) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ure) },
#endif #endif
{ MP_ROM_QSTR(MP_QSTR_compile), MP_ROM_PTR(&mod_re_compile_obj) }, { MP_ROM_QSTR(MP_QSTR_compile), MP_ROM_PTR(&mod_re_compile_obj) },
{ MP_ROM_QSTR(MP_QSTR_match), MP_ROM_PTR(&mod_re_match_obj) }, { MP_ROM_QSTR(MP_QSTR_match), MP_ROM_PTR(&mod_re_match_obj) },
{ MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&mod_re_search_obj) }, { MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&mod_re_search_obj) },
@ -463,7 +463,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_re_globals, mp_module_re_globals_table);
const mp_obj_module_t mp_module_ure = { const mp_obj_module_t mp_module_ure = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_re_globals, .globals = (mp_obj_dict_t *)&mp_module_re_globals,
}; };
// Source files #include'd here to make sure they're compiled in // Source files #include'd here to make sure they're compiled in
@ -475,4 +475,4 @@ const mp_obj_module_t mp_module_ure = {
#include "re1.5/recursiveloop.c" #include "re1.5/recursiveloop.c"
#include "re1.5/charclass.c" #include "re1.5/charclass.c"
#endif //MICROPY_PY_URE #endif // MICROPY_PY_URE

View File

@ -45,9 +45,9 @@ STATIC void poll_map_add(mp_map_t *poll_map, const mp_obj_t *obj, mp_uint_t obj_
} else { } else {
// object exists; update its flags // object exists; update its flags
if (or_flags) { if (or_flags) {
((poll_obj_t*)elem->value)->flags |= flags; ((poll_obj_t *)elem->value)->flags |= flags;
} else { } else {
((poll_obj_t*)elem->value)->flags = flags; ((poll_obj_t *)elem->value)->flags = flags;
} }
} }
} }
@ -61,7 +61,7 @@ STATIC mp_uint_t poll_map_poll(mp_map_t *poll_map, mp_uint_t *rwx_num) {
continue; continue;
} }
poll_obj_t *poll_obj = (poll_obj_t*)poll_map->table[i].value; poll_obj_t *poll_obj = (poll_obj_t *)poll_map->table[i].value;
int errcode; int errcode;
mp_int_t ret = poll_obj->ioctl(poll_obj->obj, MP_STREAM_POLL, poll_obj->flags, &errcode); mp_int_t ret = poll_obj->ioctl(poll_obj->obj, MP_STREAM_POLL, poll_obj->flags, &errcode);
poll_obj->flags_ret = ret; poll_obj->flags_ret = ret;
@ -138,15 +138,15 @@ STATIC mp_obj_t select_select(uint n_args, const mp_obj_t *args) {
if (!MP_MAP_SLOT_IS_FILLED(&poll_map, i)) { if (!MP_MAP_SLOT_IS_FILLED(&poll_map, i)) {
continue; continue;
} }
poll_obj_t *poll_obj = (poll_obj_t*)poll_map.table[i].value; poll_obj_t *poll_obj = (poll_obj_t *)poll_map.table[i].value;
if (poll_obj->flags_ret & MP_STREAM_POLL_RD) { if (poll_obj->flags_ret & MP_STREAM_POLL_RD) {
((mp_obj_list_t*)list_array[0])->items[rwx_len[0]++] = poll_obj->obj; ((mp_obj_list_t *)list_array[0])->items[rwx_len[0]++] = poll_obj->obj;
} }
if (poll_obj->flags_ret & MP_STREAM_POLL_WR) { if (poll_obj->flags_ret & MP_STREAM_POLL_WR) {
((mp_obj_list_t*)list_array[1])->items[rwx_len[1]++] = poll_obj->obj; ((mp_obj_list_t *)list_array[1])->items[rwx_len[1]++] = poll_obj->obj;
} }
if ((poll_obj->flags_ret & ~(MP_STREAM_POLL_RD | MP_STREAM_POLL_WR)) != 0) { if ((poll_obj->flags_ret & ~(MP_STREAM_POLL_RD | MP_STREAM_POLL_WR)) != 0) {
((mp_obj_list_t*)list_array[2])->items[rwx_len[2]++] = poll_obj->obj; ((mp_obj_list_t *)list_array[2])->items[rwx_len[2]++] = poll_obj->obj;
} }
} }
mp_map_deinit(&poll_map); mp_map_deinit(&poll_map);
@ -199,7 +199,7 @@ STATIC mp_obj_t poll_modify(mp_obj_t self_in, mp_obj_t obj_in, mp_obj_t eventmas
if (elem == NULL) { if (elem == NULL) {
mp_raise_OSError(MP_ENOENT); mp_raise_OSError(MP_ENOENT);
} }
((poll_obj_t*)elem->value)->flags = mp_obj_get_int(eventmask_in); ((poll_obj_t *)elem->value)->flags = mp_obj_get_int(eventmask_in);
return mp_const_none; return mp_const_none;
} }
MP_DEFINE_CONST_FUN_OBJ_3(poll_modify_obj, poll_modify); MP_DEFINE_CONST_FUN_OBJ_3(poll_modify_obj, poll_modify);
@ -249,7 +249,7 @@ STATIC mp_obj_t poll_poll(uint n_args, const mp_obj_t *args) {
if (!MP_MAP_SLOT_IS_FILLED(&self->poll_map, i)) { if (!MP_MAP_SLOT_IS_FILLED(&self->poll_map, i)) {
continue; continue;
} }
poll_obj_t *poll_obj = (poll_obj_t*)self->poll_map.table[i].value; poll_obj_t *poll_obj = (poll_obj_t *)self->poll_map.table[i].value;
if (poll_obj->flags_ret != 0) { if (poll_obj->flags_ret != 0) {
mp_obj_t tuple[2] = {poll_obj->obj, MP_OBJ_NEW_SMALL_INT(poll_obj->flags_ret)}; mp_obj_t tuple[2] = {poll_obj->obj, MP_OBJ_NEW_SMALL_INT(poll_obj->flags_ret)};
ret_list->items[n_ready++] = mp_obj_new_tuple(2, tuple); ret_list->items[n_ready++] = mp_obj_new_tuple(2, tuple);
@ -292,7 +292,7 @@ STATIC mp_obj_t poll_iternext(mp_obj_t self_in) {
if (!MP_MAP_SLOT_IS_FILLED(&self->poll_map, i)) { if (!MP_MAP_SLOT_IS_FILLED(&self->poll_map, i)) {
continue; continue;
} }
poll_obj_t *poll_obj = (poll_obj_t*)self->poll_map.table[i].value; poll_obj_t *poll_obj = (poll_obj_t *)self->poll_map.table[i].value;
if (poll_obj->flags_ret != 0) { if (poll_obj->flags_ret != 0) {
mp_obj_tuple_t *t = MP_OBJ_TO_PTR(self->ret_tuple); mp_obj_tuple_t *t = MP_OBJ_TO_PTR(self->ret_tuple);
t->items[0] = poll_obj->obj; t->items[0] = poll_obj->obj;
@ -324,7 +324,7 @@ STATIC const mp_obj_type_t mp_type_poll = {
.name = MP_QSTR_poll, .name = MP_QSTR_poll,
.getiter = mp_identity_getiter, .getiter = mp_identity_getiter,
.iternext = poll_iternext, .iternext = poll_iternext,
.locals_dict = (void*)&poll_locals_dict, .locals_dict = (void *)&poll_locals_dict,
}; };
/// \function poll() /// \function poll()
@ -352,7 +352,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_select_globals, mp_module_select_globals_t
const mp_obj_module_t mp_module_uselect = { const mp_obj_module_t mp_module_uselect = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_select_globals, .globals = (mp_obj_dict_t *)&mp_module_select_globals,
}; };
#endif // MICROPY_PY_USELECT #endif // MICROPY_PY_USELECT

View File

@ -34,11 +34,11 @@ struct ssl_args {
STATIC const mp_obj_type_t ussl_socket_type; STATIC const mp_obj_type_t ussl_socket_type;
STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock, struct ssl_args *args) { STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock, struct ssl_args *args) {
#if MICROPY_PY_USSL_FINALISER #if MICROPY_PY_USSL_FINALISER
mp_obj_ssl_socket_t *o = m_new_obj_with_finaliser(mp_obj_ssl_socket_t); mp_obj_ssl_socket_t *o = m_new_obj_with_finaliser(mp_obj_ssl_socket_t);
#else #else
mp_obj_ssl_socket_t *o = m_new_obj(mp_obj_ssl_socket_t); mp_obj_ssl_socket_t *o = m_new_obj(mp_obj_ssl_socket_t);
#endif #endif
o->base.type = &ussl_socket_type; o->base.type = &ussl_socket_type;
o->buf = NULL; o->buf = NULL;
o->bytes_left = 0; o->bytes_left = 0;
@ -54,13 +54,13 @@ STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock, struct ssl_args *args) {
if (args->key.u_obj != mp_const_none) { if (args->key.u_obj != mp_const_none) {
size_t len; size_t len;
const byte *data = (const byte*)mp_obj_str_get_data(args->key.u_obj, &len); const byte *data = (const byte *)mp_obj_str_get_data(args->key.u_obj, &len);
int res = ssl_obj_memory_load(o->ssl_ctx, SSL_OBJ_RSA_KEY, data, len, NULL); int res = ssl_obj_memory_load(o->ssl_ctx, SSL_OBJ_RSA_KEY, data, len, NULL);
if (res != SSL_OK) { if (res != SSL_OK) {
mp_raise_ValueError(translate("invalid key")); mp_raise_ValueError(translate("invalid key"));
} }
data = (const byte*)mp_obj_str_get_data(args->cert.u_obj, &len); data = (const byte *)mp_obj_str_get_data(args->cert.u_obj, &len);
res = ssl_obj_memory_load(o->ssl_ctx, SSL_OBJ_X509_CERT, data, len, NULL); res = ssl_obj_memory_load(o->ssl_ctx, SSL_OBJ_X509_CERT, data, len, NULL);
if (res != SSL_OK) { if (res != SSL_OK) {
mp_raise_ValueError(translate("invalid cert")); mp_raise_ValueError(translate("invalid cert"));
@ -73,7 +73,7 @@ STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock, struct ssl_args *args) {
SSL_EXTENSIONS *ext = ssl_ext_new(); SSL_EXTENSIONS *ext = ssl_ext_new();
if (args->server_hostname.u_obj != mp_const_none) { if (args->server_hostname.u_obj != mp_const_none) {
ext->host_name = (char*)mp_obj_str_get_str(args->server_hostname.u_obj); ext->host_name = (char *)mp_obj_str_get_str(args->server_hostname.u_obj);
} }
o->ssl_sock = ssl_client_new(o->ssl_ctx, (long)sock, NULL, 0, ext); o->ssl_sock = ssl_client_new(o->ssl_ctx, (long)sock, NULL, 0, ext);
@ -192,9 +192,9 @@ STATIC const mp_rom_map_elem_t ussl_socket_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) }, { MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) },
{ MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&socket_setblocking_obj) }, { MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&socket_setblocking_obj) },
{ MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_stream_close_obj) }, { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_stream_close_obj) },
#if MICROPY_PY_USSL_FINALISER #if MICROPY_PY_USSL_FINALISER
{ MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&mp_stream_close_obj) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&mp_stream_close_obj) },
#endif #endif
}; };
STATIC MP_DEFINE_CONST_DICT(ussl_socket_locals_dict, ussl_socket_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(ussl_socket_locals_dict, ussl_socket_locals_dict_table);
@ -214,7 +214,7 @@ STATIC const mp_obj_type_t ussl_socket_type = {
.getiter = NULL, .getiter = NULL,
.iternext = NULL, .iternext = NULL,
.protocol = &ussl_socket_stream_p, .protocol = &ussl_socket_stream_p,
.locals_dict = (void*)&ussl_socket_locals_dict, .locals_dict = (void *)&ussl_socket_locals_dict,
}; };
STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
@ -231,7 +231,7 @@ STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_
struct ssl_args args; struct ssl_args args;
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args,
MP_ARRAY_SIZE(allowed_args), allowed_args, (mp_arg_val_t*)&args); MP_ARRAY_SIZE(allowed_args), allowed_args, (mp_arg_val_t *)&args);
return MP_OBJ_FROM_PTR(socket_new(sock, &args)); return MP_OBJ_FROM_PTR(socket_new(sock, &args));
} }
@ -246,7 +246,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_ssl_globals, mp_module_ssl_globals_table);
const mp_obj_module_t mp_module_ussl = { const mp_obj_module_t mp_module_ussl = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_ssl_globals, .globals = (mp_obj_dict_t *)&mp_module_ssl_globals,
}; };
#endif // MICROPY_PY_USSL #endif // MICROPY_PY_USSL

View File

@ -53,7 +53,7 @@ STATIC void mbedtls_debug(void *ctx, int level, const char *file, int line, cons
#endif #endif
STATIC int _mbedtls_ssl_send(void *ctx, const byte *buf, size_t len) { STATIC int _mbedtls_ssl_send(void *ctx, const byte *buf, size_t len) {
mp_obj_t sock = *(mp_obj_t*)ctx; mp_obj_t sock = *(mp_obj_t *)ctx;
const mp_stream_p_t *sock_stream = mp_get_stream(sock); const mp_stream_p_t *sock_stream = mp_get_stream(sock);
int err; int err;
@ -70,7 +70,7 @@ STATIC int _mbedtls_ssl_send(void *ctx, const byte *buf, size_t len) {
} }
STATIC int _mbedtls_ssl_recv(void *ctx, byte *buf, size_t len) { STATIC int _mbedtls_ssl_recv(void *ctx, byte *buf, size_t len) {
mp_obj_t sock = *(mp_obj_t*)ctx; mp_obj_t sock = *(mp_obj_t *)ctx;
const mp_stream_p_t *sock_stream = mp_get_stream(sock); const mp_stream_p_t *sock_stream = mp_get_stream(sock);
int err; int err;
@ -91,11 +91,11 @@ STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock, struct ssl_args *args) {
// Verify the socket object has the full stream protocol // Verify the socket object has the full stream protocol
mp_get_stream_raise(sock, MP_STREAM_OP_READ | MP_STREAM_OP_WRITE | MP_STREAM_OP_IOCTL); mp_get_stream_raise(sock, MP_STREAM_OP_READ | MP_STREAM_OP_WRITE | MP_STREAM_OP_IOCTL);
#if MICROPY_PY_USSL_FINALISER #if MICROPY_PY_USSL_FINALISER
mp_obj_ssl_socket_t *o = m_new_obj_with_finaliser(mp_obj_ssl_socket_t); mp_obj_ssl_socket_t *o = m_new_obj_with_finaliser(mp_obj_ssl_socket_t);
#else #else
mp_obj_ssl_socket_t *o = m_new_obj(mp_obj_ssl_socket_t); mp_obj_ssl_socket_t *o = m_new_obj(mp_obj_ssl_socket_t);
#endif #endif
o->base.type = &ussl_socket_type; o->base.type = &ussl_socket_type;
o->sock = sock; o->sock = sock;
@ -119,9 +119,9 @@ STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock, struct ssl_args *args) {
} }
ret = mbedtls_ssl_config_defaults(&o->conf, ret = mbedtls_ssl_config_defaults(&o->conf,
args->server_side.u_bool ? MBEDTLS_SSL_IS_SERVER : MBEDTLS_SSL_IS_CLIENT, args->server_side.u_bool ? MBEDTLS_SSL_IS_SERVER : MBEDTLS_SSL_IS_CLIENT,
MBEDTLS_SSL_TRANSPORT_STREAM, MBEDTLS_SSL_TRANSPORT_STREAM,
MBEDTLS_SSL_PRESET_DEFAULT); MBEDTLS_SSL_PRESET_DEFAULT);
if (ret != 0) { if (ret != 0) {
goto cleanup; goto cleanup;
} }
@ -149,13 +149,13 @@ STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock, struct ssl_args *args) {
if (args->key.u_obj != MP_OBJ_NULL) { if (args->key.u_obj != MP_OBJ_NULL) {
size_t key_len; size_t key_len;
const byte *key = (const byte*)mp_obj_str_get_data(args->key.u_obj, &key_len); const byte *key = (const byte *)mp_obj_str_get_data(args->key.u_obj, &key_len);
// len should include terminating null // len should include terminating null
ret = mbedtls_pk_parse_key(&o->pkey, key, key_len + 1, NULL, 0); ret = mbedtls_pk_parse_key(&o->pkey, key, key_len + 1, NULL, 0);
assert(ret == 0); assert(ret == 0);
size_t cert_len; size_t cert_len;
const byte *cert = (const byte*)mp_obj_str_get_data(args->cert.u_obj, &cert_len); const byte *cert = (const byte *)mp_obj_str_get_data(args->cert.u_obj, &cert_len);
// len should include terminating null // len should include terminating null
ret = mbedtls_x509_crt_parse(&o->cert, cert, cert_len + 1); ret = mbedtls_x509_crt_parse(&o->cert, cert, cert_len + 1);
assert(ret == 0); assert(ret == 0);
@ -194,7 +194,7 @@ STATIC mp_obj_t mod_ssl_getpeercert(mp_obj_t o_in, mp_obj_t binary_form) {
if (!mp_obj_is_true(binary_form)) { if (!mp_obj_is_true(binary_form)) {
mp_raise_NotImplementedError(NULL); mp_raise_NotImplementedError(NULL);
} }
const mbedtls_x509_crt* peer_cert = mbedtls_ssl_get_peer_cert(&o->ssl); const mbedtls_x509_crt *peer_cert = mbedtls_ssl_get_peer_cert(&o->ssl);
return mp_obj_new_bytes(peer_cert->raw.p, peer_cert->raw.len); return mp_obj_new_bytes(peer_cert->raw.p, peer_cert->raw.len);
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_ssl_getpeercert_obj, mod_ssl_getpeercert); STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_ssl_getpeercert_obj, mod_ssl_getpeercert);
@ -275,9 +275,9 @@ STATIC const mp_rom_map_elem_t ussl_socket_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) }, { MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) },
{ MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&socket_setblocking_obj) }, { MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&socket_setblocking_obj) },
{ MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_stream_close_obj) }, { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_stream_close_obj) },
#if MICROPY_PY_USSL_FINALISER #if MICROPY_PY_USSL_FINALISER
{ MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&mp_stream_close_obj) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&mp_stream_close_obj) },
#endif #endif
{ MP_ROM_QSTR(MP_QSTR_getpeercert), MP_ROM_PTR(&mod_ssl_getpeercert_obj) }, { MP_ROM_QSTR(MP_QSTR_getpeercert), MP_ROM_PTR(&mod_ssl_getpeercert_obj) },
}; };
@ -298,7 +298,7 @@ STATIC const mp_obj_type_t ussl_socket_type = {
.getiter = NULL, .getiter = NULL,
.iternext = NULL, .iternext = NULL,
.protocol = &ussl_socket_stream_p, .protocol = &ussl_socket_stream_p,
.locals_dict = (void*)&ussl_socket_locals_dict, .locals_dict = (void *)&ussl_socket_locals_dict,
}; };
STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
@ -315,7 +315,7 @@ STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_
struct ssl_args args; struct ssl_args args;
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args,
MP_ARRAY_SIZE(allowed_args), allowed_args, (mp_arg_val_t*)&args); MP_ARRAY_SIZE(allowed_args), allowed_args, (mp_arg_val_t *)&args);
return MP_OBJ_FROM_PTR(socket_new(sock, &args)); return MP_OBJ_FROM_PTR(socket_new(sock, &args));
} }
@ -330,7 +330,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_ssl_globals, mp_module_ssl_globals_table);
const mp_obj_module_t mp_module_ussl = { const mp_obj_module_t mp_module_ussl = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_ssl_globals, .globals = (mp_obj_dict_t *)&mp_module_ssl_globals,
}; };
#endif // MICROPY_PY_USSL #endif // MICROPY_PY_USSL

View File

@ -171,9 +171,12 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_utimeq_dump_obj, mod_utimeq_dump);
STATIC mp_obj_t utimeq_unary_op(mp_unary_op_t op, mp_obj_t self_in) { STATIC mp_obj_t utimeq_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
mp_obj_utimeq_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_utimeq_t *self = MP_OBJ_TO_PTR(self_in);
switch (op) { switch (op) {
case MP_UNARY_OP_BOOL: return mp_obj_new_bool(self->len != 0); case MP_UNARY_OP_BOOL:
case MP_UNARY_OP_LEN: return MP_OBJ_NEW_SMALL_INT(self->len); return mp_obj_new_bool(self->len != 0);
default: return MP_OBJ_NULL; // op not supported case MP_UNARY_OP_LEN:
return MP_OBJ_NEW_SMALL_INT(self->len);
default:
return MP_OBJ_NULL; // op not supported
} }
} }
@ -193,7 +196,7 @@ STATIC const mp_obj_type_t utimeq_type = {
.name = MP_QSTR_utimeq, .name = MP_QSTR_utimeq,
.make_new = utimeq_make_new, .make_new = utimeq_make_new,
.unary_op = utimeq_unary_op, .unary_op = utimeq_unary_op,
.locals_dict = (void*)&utimeq_locals_dict, .locals_dict = (void *)&utimeq_locals_dict,
}; };
STATIC const mp_rom_map_elem_t mp_module_utimeq_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module_utimeq_globals_table[] = {
@ -205,7 +208,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_utimeq_globals, mp_module_utimeq_globals_t
const mp_obj_module_t mp_module_utimeq = { const mp_obj_module_t mp_module_utimeq = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_utimeq_globals, .globals = (mp_obj_dict_t *)&mp_module_utimeq_globals,
}; };
#endif //MICROPY_PY_UTIMEQ #endif // MICROPY_PY_UTIMEQ

View File

@ -31,9 +31,9 @@ typedef struct _mp_obj_decompio_t {
} mp_obj_decompio_t; } mp_obj_decompio_t;
STATIC int read_src_stream(TINF_DATA *data) { STATIC int read_src_stream(TINF_DATA *data) {
byte *p = (void*)data; byte *p = (void *)data;
p -= offsetof(mp_obj_decompio_t, decomp); p -= offsetof(mp_obj_decompio_t, decomp);
mp_obj_decompio_t *self = (mp_obj_decompio_t*)p; mp_obj_decompio_t *self = (mp_obj_decompio_t *)p;
const mp_stream_p_t *stream = mp_get_stream(self->src_stream); const mp_stream_p_t *stream = mp_get_stream(self->src_stream);
int err; int err;
@ -73,7 +73,7 @@ STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, cons
} else if (dict_opt >= 0) { } else if (dict_opt >= 0) {
dict_opt = uzlib_zlib_parse_header(&o->decomp); dict_opt = uzlib_zlib_parse_header(&o->decomp);
if (dict_opt < 0) { if (dict_opt < 0) {
header_error: header_error:
mp_raise_ValueError(translate("compression header")); mp_raise_ValueError(translate("compression header"));
} }
dict_sz = 1 << dict_opt; dict_sz = 1 << dict_opt;
@ -92,7 +92,7 @@ STATIC mp_uint_t decompio_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *er
} }
o->decomp.dest = buf; o->decomp.dest = buf;
o->decomp.dest_limit = (unsigned char*)buf+size; o->decomp.dest_limit = (unsigned char *)buf + size;
int st = uzlib_uncompress_chksum(&o->decomp); int st = uzlib_uncompress_chksum(&o->decomp);
if (st == TINF_DONE) { if (st == TINF_DONE) {
o->eof = true; o->eof = true;
@ -101,7 +101,7 @@ STATIC mp_uint_t decompio_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *er
*errcode = MP_EINVAL; *errcode = MP_EINVAL;
return MP_STREAM_ERROR; return MP_STREAM_ERROR;
} }
return o->decomp.dest - (byte*)buf; return o->decomp.dest - (byte *)buf;
} }
STATIC const mp_rom_map_elem_t decompio_locals_dict_table[] = { STATIC const mp_rom_map_elem_t decompio_locals_dict_table[] = {
@ -122,7 +122,7 @@ STATIC const mp_obj_type_t decompio_type = {
.name = MP_QSTR_DecompIO, .name = MP_QSTR_DecompIO,
.make_new = decompio_make_new, .make_new = decompio_make_new,
.protocol = &decompio_stream_p, .protocol = &decompio_stream_p,
.locals_dict = (void*)&decompio_locals_dict, .locals_dict = (void *)&decompio_locals_dict,
}; };
STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
@ -138,7 +138,7 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
byte *dest_buf = m_new(byte, dest_buf_size); byte *dest_buf = m_new(byte, dest_buf_size);
decomp->dest = dest_buf; decomp->dest = dest_buf;
decomp->dest_limit = dest_buf+dest_buf_size; decomp->dest_limit = dest_buf + dest_buf_size;
DEBUG_printf("uzlib: Initial out buffer: " UINT_FMT " bytes\n", decomp->destSize); DEBUG_printf("uzlib: Initial out buffer: " UINT_FMT " bytes\n", decomp->destSize);
decomp->source = bufinfo.buf; decomp->source = bufinfo.buf;
decomp->source_limit = (unsigned char *)bufinfo.buf + bufinfo.len; decomp->source_limit = (unsigned char *)bufinfo.buf + bufinfo.len;
@ -173,7 +173,7 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
mp_uint_t final_sz = decomp->dest - dest_buf; mp_uint_t final_sz = decomp->dest - dest_buf;
DEBUG_printf("uzlib: Resizing from " UINT_FMT " to final size: " UINT_FMT " bytes\n", dest_buf_size, final_sz); DEBUG_printf("uzlib: Resizing from " UINT_FMT " to final size: " UINT_FMT " bytes\n", dest_buf_size, final_sz);
dest_buf = (byte*)m_renew(byte, dest_buf, dest_buf_size, final_sz); dest_buf = (byte *)m_renew(byte, dest_buf, dest_buf_size, final_sz);
mp_obj_t res = mp_obj_new_bytearray_by_ref(final_sz, dest_buf); mp_obj_t res = mp_obj_new_bytearray_by_ref(final_sz, dest_buf);
m_del_obj(TINF_DATA, decomp); m_del_obj(TINF_DATA, decomp);
return res; return res;
@ -193,7 +193,7 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_uzlib_globals, mp_module_uzlib_globals_tab
const mp_obj_module_t mp_module_uzlib = { const mp_obj_module_t mp_module_uzlib = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_uzlib_globals, .globals = (mp_obj_dict_t *)&mp_module_uzlib_globals,
}; };
// Source files #include'd here to make sure they're compiled in // Source files #include'd here to make sure they're compiled in

View File

@ -127,7 +127,7 @@ STATIC void handle_op(mp_obj_webrepl_t *self) {
open_args[1] = MP_OBJ_NEW_QSTR(MP_QSTR_wb); open_args[1] = MP_OBJ_NEW_QSTR(MP_QSTR_wb);
} }
self->cur_file = mp_builtin_open(2, open_args, (mp_map_t*)&mp_const_empty_map); self->cur_file = mp_builtin_open(2, open_args, (mp_map_t *)&mp_const_empty_map);
#if 0 #if 0
struct mp_stream_seek_t seek = { .offset = self->hdr.offset, .whence = 0 }; struct mp_stream_seek_t seek = { .offset = self->hdr.offset, .whence = 0 };
@ -161,13 +161,13 @@ STATIC mp_uint_t _webrepl_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
mp_obj_webrepl_t *self = self_in; mp_obj_webrepl_t *self = self_in;
const mp_stream_p_t *sock_stream = mp_get_stream(self->sock); const mp_stream_p_t *sock_stream = mp_get_stream(self->sock);
mp_uint_t out_sz = sock_stream->read(self->sock, buf, size, errcode); mp_uint_t out_sz = sock_stream->read(self->sock, buf, size, errcode);
//DEBUG_printf("webrepl: Read %d initial bytes from websocket\n", out_sz); // DEBUG_printf("webrepl: Read %d initial bytes from websocket\n", out_sz);
if (out_sz == 0 || out_sz == MP_STREAM_ERROR) { if (out_sz == 0 || out_sz == MP_STREAM_ERROR) {
return out_sz; return out_sz;
} }
if (self->state == STATE_PASSWD) { if (self->state == STATE_PASSWD) {
char c = *(char*)buf; char c = *(char *)buf;
if (c == '\r' || c == '\n') { if (c == '\r' || c == '\n') {
self->hdr.fname[self->data_to_recv] = 0; self->hdr.fname[self->data_to_recv] = 0;
DEBUG_printf("webrepl: entered password: %s\n", self->hdr.fname); DEBUG_printf("webrepl: entered password: %s\n", self->hdr.fname);
@ -195,8 +195,8 @@ STATIC mp_uint_t _webrepl_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
DEBUG_printf("webrepl: received bin data, hdr_to_recv: %d, data_to_recv=%d\n", self->hdr_to_recv, self->data_to_recv); DEBUG_printf("webrepl: received bin data, hdr_to_recv: %d, data_to_recv=%d\n", self->hdr_to_recv, self->data_to_recv);
if (self->hdr_to_recv != 0) { if (self->hdr_to_recv != 0) {
char *p = (char*)&self->hdr + sizeof(self->hdr) - self->hdr_to_recv; char *p = (char *)&self->hdr + sizeof(self->hdr) - self->hdr_to_recv;
*p++ = *(char*)buf; *p++ = *(char *)buf;
if (--self->hdr_to_recv != 0) { if (--self->hdr_to_recv != 0) {
mp_uint_t hdr_sz = sock_stream->read(self->sock, p, self->hdr_to_recv, errcode); mp_uint_t hdr_sz = sock_stream->read(self->sock, p, self->hdr_to_recv, errcode);
if (hdr_sz == MP_STREAM_ERROR) { if (hdr_sz == MP_STREAM_ERROR) {
@ -217,7 +217,7 @@ STATIC mp_uint_t _webrepl_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
if (self->data_to_recv != 0) { if (self->data_to_recv != 0) {
static byte filebuf[512]; static byte filebuf[512];
filebuf[0] = *(byte*)buf; filebuf[0] = *(byte *)buf;
mp_uint_t buf_sz = 1; mp_uint_t buf_sz = 1;
if (--self->data_to_recv != 0) { if (--self->data_to_recv != 0) {
size_t to_read = MIN(sizeof(filebuf) - 1, self->data_to_recv); size_t to_read = MIN(sizeof(filebuf) - 1, self->data_to_recv);
@ -321,7 +321,7 @@ STATIC const mp_obj_type_t webrepl_type = {
.name = MP_QSTR__webrepl, .name = MP_QSTR__webrepl,
.make_new = webrepl_make_new, .make_new = webrepl_make_new,
.protocol = &webrepl_stream_p, .protocol = &webrepl_stream_p,
.locals_dict = (mp_obj_dict_t*)&webrepl_locals_dict, .locals_dict = (mp_obj_dict_t *)&webrepl_locals_dict,
}; };
STATIC const mp_rom_map_elem_t webrepl_module_globals_table[] = { STATIC const mp_rom_map_elem_t webrepl_module_globals_table[] = {
@ -334,7 +334,7 @@ STATIC MP_DEFINE_CONST_DICT(webrepl_module_globals, webrepl_module_globals_table
const mp_obj_module_t mp_module_webrepl = { const mp_obj_module_t mp_module_webrepl = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&webrepl_module_globals, .globals = (mp_obj_dict_t *)&webrepl_module_globals,
}; };
#endif // MICROPY_PY_WEBREPL #endif // MICROPY_PY_WEBREPL

View File

@ -50,11 +50,11 @@ STATIC mp_obj_t websocket_make_new(const mp_obj_type_t *type, size_t n_args, con
if (n_args > 1 && args[1] == mp_const_true) { if (n_args > 1 && args[1] == mp_const_true) {
o->opts |= BLOCKING_WRITE; o->opts |= BLOCKING_WRITE;
} }
return MP_OBJ_FROM_PTR(o); return MP_OBJ_FROM_PTR(o);
} }
STATIC mp_uint_t websocket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *errcode) { STATIC mp_uint_t websocket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *errcode) {
mp_obj_websocket_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_websocket_t *self = MP_OBJ_TO_PTR(self_in);
const mp_stream_p_t *stream_p = mp_get_stream(self->sock); const mp_stream_p_t *stream_p = mp_get_stream(self->sock);
while (1) { while (1) {
if (self->to_recv != 0) { if (self->to_recv != 0) {
@ -162,7 +162,7 @@ STATIC mp_uint_t websocket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
self->msg_sz -= out_sz; self->msg_sz -= out_sz;
if (self->msg_sz == 0) { if (self->msg_sz == 0) {
byte last_state; byte last_state;
no_payload: no_payload:
last_state = self->state; last_state = self->state;
self->state = FRAME_HEADER; self->state = FRAME_HEADER;
self->to_recv = 2; self->to_recv = 2;
@ -179,7 +179,7 @@ no_payload:
return 0; return 0;
} }
//DEBUG_printf("Finished receiving ctrl message %x, ignoring\n", self->last_flags); // DEBUG_printf("Finished receiving ctrl message %x, ignoring\n", self->last_flags);
continue; continue;
} }
} }
@ -196,7 +196,7 @@ no_payload:
} }
STATIC mp_uint_t websocket_write(mp_obj_t self_in, const void *buf, mp_uint_t size, int *errcode) { STATIC mp_uint_t websocket_write(mp_obj_t self_in, const void *buf, mp_uint_t size, int *errcode) {
mp_obj_websocket_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_websocket_t *self = MP_OBJ_TO_PTR(self_in);
assert(size < 0x10000); assert(size < 0x10000);
byte header[4] = {0x80 | (self->opts & FRAME_OPCODE_MASK)}; byte header[4] = {0x80 | (self->opts & FRAME_OPCODE_MASK)};
int hdr_sz; int hdr_sz;
@ -276,7 +276,7 @@ STATIC const mp_obj_type_t websocket_type = {
.name = MP_QSTR_websocket, .name = MP_QSTR_websocket,
.make_new = websocket_make_new, .make_new = websocket_make_new,
.protocol = &websocket_stream_p, .protocol = &websocket_stream_p,
.locals_dict = (void*)&websocket_locals_dict, .locals_dict = (void *)&websocket_locals_dict,
}; };
STATIC const mp_rom_map_elem_t websocket_module_globals_table[] = { STATIC const mp_rom_map_elem_t websocket_module_globals_table[] = {
@ -288,7 +288,7 @@ STATIC MP_DEFINE_CONST_DICT(websocket_module_globals, websocket_module_globals_t
const mp_obj_module_t mp_module_websocket = { const mp_obj_module_t mp_module_websocket = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&websocket_module_globals, .globals = (mp_obj_dict_t *)&websocket_module_globals,
}; };
#endif // MICROPY_PY_WEBSOCKET #endif // MICROPY_PY_WEBSOCKET

@ -1 +1 @@
Subproject commit 743d86487c83e42024ed508ed50499ad0a527d5d Subproject commit b64fa6d4c73287edef9ccf09cfd6ec5009f9628b

View File

@ -65,7 +65,7 @@ STATIC mp_obj_t time_ticks_diff(mp_obj_t end_in, mp_obj_t start_in) {
// Optimized formula avoiding if conditions. We adjust difference "forward", // Optimized formula avoiding if conditions. We adjust difference "forward",
// wrap it around and adjust back. // wrap it around and adjust back.
mp_int_t diff = ((end - start + MICROPY_PY_UTIME_TICKS_PERIOD / 2) & (MICROPY_PY_UTIME_TICKS_PERIOD - 1)) mp_int_t diff = ((end - start + MICROPY_PY_UTIME_TICKS_PERIOD / 2) & (MICROPY_PY_UTIME_TICKS_PERIOD - 1))
- MICROPY_PY_UTIME_TICKS_PERIOD / 2; - MICROPY_PY_UTIME_TICKS_PERIOD / 2;
return MP_OBJ_NEW_SMALL_INT(diff); return MP_OBJ_NEW_SMALL_INT(diff);
} }
MP_DEFINE_CONST_FUN_OBJ_2(mp_utime_ticks_diff_obj, time_ticks_diff); MP_DEFINE_CONST_FUN_OBJ_2(mp_utime_ticks_diff_obj, time_ticks_diff);

View File

@ -75,7 +75,7 @@ STATIC mp_vfs_mount_t *lookup_path(mp_obj_t path_in, mp_obj_t *path_out) {
mp_vfs_mount_t *vfs = mp_vfs_lookup_path(path, &p_out); mp_vfs_mount_t *vfs = mp_vfs_lookup_path(path, &p_out);
if (vfs != MP_VFS_NONE && vfs != MP_VFS_ROOT) { if (vfs != MP_VFS_NONE && vfs != MP_VFS_ROOT) {
*path_out = mp_obj_new_str_of_type(mp_obj_get_type(path_in), *path_out = mp_obj_new_str_of_type(mp_obj_get_type(path_in),
(const byte*)p_out, strlen(p_out)); (const byte *)p_out, strlen(p_out));
} }
return vfs; return vfs;
} }
@ -106,7 +106,7 @@ mp_import_stat_t mp_vfs_import_stat(const char *path) {
} }
// If the mounted object has the VFS protocol, call its import_stat helper // If the mounted object has the VFS protocol, call its import_stat helper
const mp_vfs_proto_t *proto = (mp_vfs_proto_t*)mp_proto_get(MP_QSTR_protocol_vfs, vfs->obj); const mp_vfs_proto_t *proto = (mp_vfs_proto_t *)mp_proto_get(MP_QSTR_protocol_vfs, vfs->obj);
if (proto != NULL) { if (proto != NULL) {
return proto->import_stat(MP_OBJ_TO_PTR(vfs->obj), path_out); return proto->import_stat(MP_OBJ_TO_PTR(vfs->obj), path_out);
} }
@ -168,7 +168,7 @@ mp_obj_t mp_vfs_mount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args
vfs->next = NULL; vfs->next = NULL;
// call the underlying object to do any mounting operation // call the underlying object to do any mounting operation
mp_vfs_proxy_call(vfs, MP_QSTR_mount, 2, (mp_obj_t*)&args); mp_vfs_proxy_call(vfs, MP_QSTR_mount, 2, (mp_obj_t *)&args);
// check that the destination mount point is unused // check that the destination mount point is unused
const char *path_out; const char *path_out;
@ -245,7 +245,7 @@ mp_obj_t mp_vfs_open(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args)
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
mp_vfs_mount_t *vfs = lookup_path(args[ARG_file].u_obj, &args[ARG_file].u_obj); mp_vfs_mount_t *vfs = lookup_path(args[ARG_file].u_obj, &args[ARG_file].u_obj);
return mp_vfs_proxy_call(vfs, MP_QSTR_open, 2, (mp_obj_t*)&args); return mp_vfs_proxy_call(vfs, MP_QSTR_open, 2, (mp_obj_t *)&args);
} }
MP_DEFINE_CONST_FUN_OBJ_KW(mp_vfs_open_obj, 0, mp_vfs_open); MP_DEFINE_CONST_FUN_OBJ_KW(mp_vfs_open_obj, 0, mp_vfs_open);
@ -314,7 +314,7 @@ mp_obj_t mp_vfs_ilistdir_it_iternext(mp_obj_t self_in) {
mp_obj_tuple_t *t = MP_OBJ_TO_PTR(mp_obj_new_tuple(3, NULL)); mp_obj_tuple_t *t = MP_OBJ_TO_PTR(mp_obj_new_tuple(3, NULL));
t->items[0] = mp_obj_new_str_of_type( t->items[0] = mp_obj_new_str_of_type(
self->is_str ? &mp_type_str : &mp_type_bytes, self->is_str ? &mp_type_str : &mp_type_bytes,
(const byte*)vfs->str + 1, vfs->len - 1); (const byte *)vfs->str + 1, vfs->len - 1);
t->items[1] = MP_OBJ_NEW_SMALL_INT(MP_S_IFDIR); t->items[1] = MP_OBJ_NEW_SMALL_INT(MP_S_IFDIR);
t->items[2] = MP_OBJ_NEW_SMALL_INT(0); // no inode number t->items[2] = MP_OBJ_NEW_SMALL_INT(0); // no inode number
return MP_OBJ_FROM_PTR(t); return MP_OBJ_FROM_PTR(t);

View File

@ -12,8 +12,8 @@
// return values of mp_vfs_lookup_path // return values of mp_vfs_lookup_path
// ROOT is 0 so that the default current directory is the root directory // ROOT is 0 so that the default current directory is the root directory
#define MP_VFS_NONE ((mp_vfs_mount_t*)1) #define MP_VFS_NONE ((mp_vfs_mount_t *)1)
#define MP_VFS_ROOT ((mp_vfs_mount_t*)0) #define MP_VFS_ROOT ((mp_vfs_mount_t *)0)
// MicroPython's port-standardized versions of stat constants // MicroPython's port-standardized versions of stat constants
#define MP_S_IFDIR (0x4000) #define MP_S_IFDIR (0x4000)

View File

@ -136,7 +136,7 @@ STATIC mp_obj_t mp_vfs_fat_ilistdir_it_iternext(mp_obj_t self_in) {
if (self->is_str) { if (self->is_str) {
t->items[0] = mp_obj_new_str(fn, strlen(fn)); t->items[0] = mp_obj_new_str(fn, strlen(fn));
} else { } else {
t->items[0] = mp_obj_new_bytes((const byte*)fn, strlen(fn)); t->items[0] = mp_obj_new_bytes((const byte *)fn, strlen(fn));
} }
if (fno.fattrib & AM_DIR) { if (fno.fattrib & AM_DIR) {
// dir // dir
@ -234,9 +234,9 @@ STATIC mp_obj_t fat_vfs_rename(mp_obj_t vfs_in, mp_obj_t path_in, mp_obj_t path_
mp_raise_OSError(fresult_to_errno_table[res]); mp_raise_OSError(fresult_to_errno_table[res]);
} }
if ((fno.fattrib & AM_DIR) != 0 && if ((fno.fattrib & AM_DIR) != 0 &&
strlen(new_path) > strlen(old_path) && strlen(new_path) > strlen(old_path) &&
new_path[strlen(old_path)] == '/' && new_path[strlen(old_path)] == '/' &&
strncmp(old_path, new_path, strlen(old_path)) == 0) { strncmp(old_path, new_path, strlen(old_path)) == 0) {
mp_raise_OSError(MP_EINVAL); mp_raise_OSError(MP_EINVAL);
} }
@ -324,11 +324,11 @@ STATIC mp_obj_t fat_vfs_stat(mp_obj_t vfs_in, mp_obj_t path_in) {
} else { } else {
mode |= MP_S_IFREG; mode |= MP_S_IFREG;
} }
#if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_NONE #if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_NONE
// On non-longint builds, the number of seconds since 1970 (epoch) is too // On non-longint builds, the number of seconds since 1970 (epoch) is too
// large to fit in a smallint, so just return 31-DEC-1999 (0). // large to fit in a smallint, so just return 31-DEC-1999 (0).
mp_obj_t seconds = MP_OBJ_NEW_SMALL_INT(946684800); mp_obj_t seconds = MP_OBJ_NEW_SMALL_INT(946684800);
#else #else
mp_obj_t seconds = mp_obj_new_int_from_uint( mp_obj_t seconds = mp_obj_new_int_from_uint(
timeutils_seconds_since_epoch( timeutils_seconds_since_epoch(
1980 + ((fno.fdate >> 9) & 0x7f), 1980 + ((fno.fdate >> 9) & 0x7f),
@ -338,7 +338,7 @@ STATIC mp_obj_t fat_vfs_stat(mp_obj_t vfs_in, mp_obj_t path_in) {
(fno.ftime >> 5) & 0x3f, (fno.ftime >> 5) & 0x3f,
2 * (fno.ftime & 0x1f) 2 * (fno.ftime & 0x1f)
)); ));
#endif #endif
t->items[0] = MP_OBJ_NEW_SMALL_INT(mode); // st_mode t->items[0] = MP_OBJ_NEW_SMALL_INT(mode); // st_mode
t->items[1] = MP_OBJ_NEW_SMALL_INT(0); // st_ino t->items[1] = MP_OBJ_NEW_SMALL_INT(0); // st_ino
t->items[2] = MP_OBJ_NEW_SMALL_INT(0); // st_dev t->items[2] = MP_OBJ_NEW_SMALL_INT(0); // st_dev
@ -434,7 +434,7 @@ STATIC mp_obj_t vfs_fat_setlabel(mp_obj_t self_in, mp_obj_t label_in) {
const char *label_str = mp_obj_str_get_str(label_in); const char *label_str = mp_obj_str_get_str(label_in);
FRESULT res = f_setlabel(&self->fatfs, label_str); FRESULT res = f_setlabel(&self->fatfs, label_str);
if (res != FR_OK) { if (res != FR_OK) {
if(res == FR_WRITE_PROTECTED) { if (res == FR_WRITE_PROTECTED) {
mp_raise_msg(&mp_type_OSError, translate("Read-only filesystem")); mp_raise_msg(&mp_type_OSError, translate("Read-only filesystem"));
} }
mp_raise_OSError(fresult_to_errno_table[res]); mp_raise_OSError(fresult_to_errno_table[res]);
@ -467,9 +467,9 @@ STATIC const mp_rom_map_elem_t fat_vfs_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_statvfs), MP_ROM_PTR(&fat_vfs_statvfs_obj) }, { MP_ROM_QSTR(MP_QSTR_statvfs), MP_ROM_PTR(&fat_vfs_statvfs_obj) },
{ MP_ROM_QSTR(MP_QSTR_mount), MP_ROM_PTR(&vfs_fat_mount_obj) }, { MP_ROM_QSTR(MP_QSTR_mount), MP_ROM_PTR(&vfs_fat_mount_obj) },
{ MP_ROM_QSTR(MP_QSTR_umount), MP_ROM_PTR(&fat_vfs_umount_obj) }, { MP_ROM_QSTR(MP_QSTR_umount), MP_ROM_PTR(&fat_vfs_umount_obj) },
#if MICROPY_FATFS_USE_LABEL #if MICROPY_FATFS_USE_LABEL
{ MP_ROM_QSTR(MP_QSTR_label), MP_ROM_PTR(&fat_vfs_label_obj) }, { MP_ROM_QSTR(MP_QSTR_label), MP_ROM_PTR(&fat_vfs_label_obj) },
#endif #endif
}; };
STATIC MP_DEFINE_CONST_DICT(fat_vfs_locals_dict, fat_vfs_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(fat_vfs_locals_dict, fat_vfs_locals_dict_table);
@ -483,7 +483,7 @@ const mp_obj_type_t mp_fat_vfs_type = {
.name = MP_QSTR_VfsFat, .name = MP_QSTR_VfsFat,
.make_new = fat_vfs_make_new, .make_new = fat_vfs_make_new,
.protocol = &fat_vfs_proto, .protocol = &fat_vfs_proto,
.locals_dict = (mp_obj_dict_t*)&fat_vfs_locals_dict, .locals_dict = (mp_obj_dict_t *)&fat_vfs_locals_dict,
}; };

View File

@ -26,32 +26,31 @@
typedef void *bdev_t; typedef void *bdev_t;
STATIC fs_user_mount_t *disk_get_device(void *bdev) { STATIC fs_user_mount_t *disk_get_device(void *bdev) {
return (fs_user_mount_t*)bdev; return (fs_user_mount_t *)bdev;
} }
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
/* Read Sector(s) */ /* Read Sector(s) */
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
DRESULT disk_read ( DRESULT disk_read(
bdev_t pdrv, /* Physical drive nmuber (0..) */ bdev_t pdrv, /* Physical drive */
BYTE *buff, /* Data buffer to store read data */ BYTE *buff, /* Data buffer to store read data */
DWORD sector, /* Sector address (LBA) */ DWORD sector, /* Sector address (LBA) */
UINT count /* Number of sectors to read (1..128) */ UINT count /* Number of sectors to read (1..128) */
) ) {
{
fs_user_mount_t *vfs = disk_get_device(pdrv); fs_user_mount_t *vfs = disk_get_device(pdrv);
if (vfs == NULL) { if (vfs == NULL) {
return RES_PARERR; return RES_PARERR;
} }
if (vfs->flags & FSUSER_NATIVE) { if (vfs->flags & FSUSER_NATIVE) {
mp_uint_t (*f)(uint8_t*, uint32_t, uint32_t) = (void*)(uintptr_t)vfs->readblocks[2]; mp_uint_t (*f)(uint8_t *, uint32_t, uint32_t) = (void *)(uintptr_t)vfs->readblocks[2];
if (f(buff, sector, count) != 0) { if (f(buff, sector, count) != 0) {
return RES_ERROR; return RES_ERROR;
} }
} else { } else {
mp_obj_array_t ar = {{&mp_type_bytearray}, BYTEARRAY_TYPECODE, 0, count * SECSIZE(&vfs->fatfs), buff}; mp_obj_array_t ar = {{&mp_type_bytearray}, BYTEARRAY_TYPECODE, 0, count *SECSIZE(&vfs->fatfs), buff};
vfs->readblocks[2] = MP_OBJ_NEW_SMALL_INT(sector); vfs->readblocks[2] = MP_OBJ_NEW_SMALL_INT(sector);
vfs->readblocks[3] = MP_OBJ_FROM_PTR(&ar); vfs->readblocks[3] = MP_OBJ_FROM_PTR(&ar);
nlr_buf_t nlr; nlr_buf_t nlr;
@ -74,13 +73,12 @@ DRESULT disk_read (
/* Write Sector(s) */ /* Write Sector(s) */
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
DRESULT disk_write ( DRESULT disk_write(
bdev_t pdrv, /* Physical drive nmuber (0..) */ bdev_t pdrv, /* Physical drive */
const BYTE *buff, /* Data to be written */ const BYTE *buff, /* Data to be written */
DWORD sector, /* Sector address (LBA) */ DWORD sector, /* Sector address (LBA) */
UINT count /* Number of sectors to write (1..128) */ UINT count /* Number of sectors to write (1..128) */
) ) {
{
fs_user_mount_t *vfs = disk_get_device(pdrv); fs_user_mount_t *vfs = disk_get_device(pdrv);
if (vfs == NULL) { if (vfs == NULL) {
return RES_PARERR; return RES_PARERR;
@ -92,12 +90,12 @@ DRESULT disk_write (
} }
if (vfs->flags & FSUSER_NATIVE) { if (vfs->flags & FSUSER_NATIVE) {
mp_uint_t (*f)(const uint8_t*, uint32_t, uint32_t) = (void*)(uintptr_t)vfs->writeblocks[2]; mp_uint_t (*f)(const uint8_t *, uint32_t, uint32_t) = (void *)(uintptr_t)vfs->writeblocks[2];
if (f(buff, sector, count) != 0) { if (f(buff, sector, count) != 0) {
return RES_ERROR; return RES_ERROR;
} }
} else { } else {
mp_obj_array_t ar = {{&mp_type_bytearray}, BYTEARRAY_TYPECODE, 0, count * SECSIZE(&vfs->fatfs), (void*)buff}; mp_obj_array_t ar = {{&mp_type_bytearray}, BYTEARRAY_TYPECODE, 0, count *SECSIZE(&vfs->fatfs), (void *)buff};
vfs->writeblocks[2] = MP_OBJ_NEW_SMALL_INT(sector); vfs->writeblocks[2] = MP_OBJ_NEW_SMALL_INT(sector);
vfs->writeblocks[3] = MP_OBJ_FROM_PTR(&ar); vfs->writeblocks[3] = MP_OBJ_FROM_PTR(&ar);
nlr_buf_t nlr; nlr_buf_t nlr;
@ -121,12 +119,11 @@ DRESULT disk_write (
/* Miscellaneous Functions */ /* Miscellaneous Functions */
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
DRESULT disk_ioctl ( DRESULT disk_ioctl(
bdev_t pdrv, /* Physical drive nmuber (0..) */ bdev_t pdrv, /* Physical drive */
BYTE cmd, /* Control code */ BYTE cmd, /* Control code */
void *buff /* Buffer to send/receive control data */ void *buff /* Buffer to send/receive control data */
) ) {
{
fs_user_mount_t *vfs = disk_get_device(pdrv); fs_user_mount_t *vfs = disk_get_device(pdrv);
if (vfs == NULL) { if (vfs == NULL) {
return RES_PARERR; return RES_PARERR;
@ -145,8 +142,8 @@ DRESULT disk_ioctl (
uint8_t bp_op = op_map[cmd & 7]; uint8_t bp_op = op_map[cmd & 7];
if (bp_op != 0) { if (bp_op != 0) {
if (vfs->flags & FSUSER_NATIVE) { if (vfs->flags & FSUSER_NATIVE) {
bool (*f)(size_t, mp_int_t*) = (void*)(uintptr_t)vfs->u.ioctl[2]; bool (*f)(size_t, mp_int_t *) = (void *)(uintptr_t)vfs->u.ioctl[2];
if (!f(bp_op, (mp_int_t*) &out_value)) { if (!f(bp_op, (mp_int_t *)&out_value)) {
return RES_ERROR; return RES_ERROR;
} }
} else { } else {
@ -190,26 +187,26 @@ DRESULT disk_ioctl (
return RES_OK; return RES_OK;
case GET_SECTOR_COUNT: { case GET_SECTOR_COUNT: {
*((DWORD*)buff) = out_value; *((DWORD *)buff) = out_value;
return RES_OK; return RES_OK;
} }
case GET_SECTOR_SIZE: { case GET_SECTOR_SIZE: {
if (out_value == 0) { if (out_value == 0) {
// Default sector size // Default sector size
*((WORD*)buff) = 512; *((WORD *)buff) = 512;
} else { } else {
*((WORD*)buff) = out_value; *((WORD *)buff) = out_value;
} }
#if _MAX_SS != _MIN_SS #if _MAX_SS != _MIN_SS
// need to store ssize because we use it in disk_read/disk_write // need to store ssize because we use it in disk_read/disk_write
vfs->fatfs.ssize = *((WORD*)buff); vfs->fatfs.ssize = *((WORD *)buff);
#endif #endif
return RES_OK; return RES_OK;
} }
case GET_BLOCK_SIZE: case GET_BLOCK_SIZE:
*((DWORD*)buff) = 1; // erase block size in units of sector size *((DWORD *)buff) = 1; // erase block size in units of sector size
return RES_OK; return RES_OK;
case IOCTL_INIT: case IOCTL_INIT:
@ -223,7 +220,7 @@ DRESULT disk_ioctl (
} else { } else {
stat = 0; stat = 0;
} }
*((DSTATUS*)buff) = stat; *((DSTATUS *)buff) = stat;
return RES_OK; return RES_OK;
} }

View File

@ -83,7 +83,7 @@ STATIC mp_uint_t file_obj_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg,
pyb_file_obj_t *self = MP_OBJ_TO_PTR(o_in); pyb_file_obj_t *self = MP_OBJ_TO_PTR(o_in);
if (request == MP_STREAM_SEEK) { if (request == MP_STREAM_SEEK) {
struct mp_stream_seek_t *s = (struct mp_stream_seek_t*)(uintptr_t)arg; struct mp_stream_seek_t *s = (struct mp_stream_seek_t *)(uintptr_t)arg;
switch (s->whence) { switch (s->whence) {
case 0: // SEEK_SET case 0: // SEEK_SET
@ -248,7 +248,7 @@ const mp_obj_type_t mp_type_vfs_fat_fileio = {
.getiter = mp_identity_getiter, .getiter = mp_identity_getiter,
.iternext = mp_stream_unbuffered_iter, .iternext = mp_stream_unbuffered_iter,
.protocol = &fileio_stream_p, .protocol = &fileio_stream_p,
.locals_dict = (mp_obj_dict_t*)&rawfile_locals_dict, .locals_dict = (mp_obj_dict_t *)&rawfile_locals_dict,
}; };
#endif #endif
@ -268,7 +268,7 @@ const mp_obj_type_t mp_type_vfs_fat_textio = {
.getiter = mp_identity_getiter, .getiter = mp_identity_getiter,
.iternext = mp_stream_unbuffered_iter, .iternext = mp_stream_unbuffered_iter,
.protocol = &textio_stream_p, .protocol = &textio_stream_p,
.locals_dict = (mp_obj_dict_t*)&rawfile_locals_dict, .locals_dict = (mp_obj_dict_t *)&rawfile_locals_dict,
}; };
// Factory function for I/O stream classes // Factory function for I/O stream classes

View File

@ -42,7 +42,7 @@ STATIC mp_obj_t vfs_posix_get_path_obj(mp_obj_vfs_posix_t *self, mp_obj_t path)
} }
} }
STATIC mp_obj_t vfs_posix_fun1_helper(mp_obj_t self_in, mp_obj_t path_in, int (*f)(const char*)) { STATIC mp_obj_t vfs_posix_fun1_helper(mp_obj_t self_in, mp_obj_t path_in, int (*f)(const char *)) {
mp_obj_vfs_posix_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_vfs_posix_t *self = MP_OBJ_TO_PTR(self_in);
int ret = f(vfs_posix_get_path_str(self, path_in)); int ret = f(vfs_posix_get_path_str(self, path_in));
if (ret != 0) { if (ret != 0) {
@ -168,7 +168,7 @@ STATIC mp_obj_t vfs_posix_ilistdir_it_iternext(mp_obj_t self_in) {
if (self->is_str) { if (self->is_str) {
t->items[0] = mp_obj_new_str(fn, strlen(fn)); t->items[0] = mp_obj_new_str(fn, strlen(fn));
} else { } else {
t->items[0] = mp_obj_new_bytes((const byte*)fn, strlen(fn)); t->items[0] = mp_obj_new_bytes((const byte *)fn, strlen(fn));
} }
#ifdef _DIRENT_HAVE_D_TYPE #ifdef _DIRENT_HAVE_D_TYPE
@ -338,7 +338,7 @@ const mp_obj_type_t mp_type_vfs_posix = {
.name = MP_QSTR_VfsPosix, .name = MP_QSTR_VfsPosix,
.make_new = vfs_posix_make_new, .make_new = vfs_posix_make_new,
.protocol = &vfs_posix_proto, .protocol = &vfs_posix_proto,
.locals_dict = (mp_obj_dict_t*)&vfs_posix_locals_dict, .locals_dict = (mp_obj_dict_t *)&vfs_posix_locals_dict,
}; };
#endif // MICROPY_VFS_POSIX #endif // MICROPY_VFS_POSIX

View File

@ -58,7 +58,7 @@ mp_obj_t mp_vfs_posix_file_open(const mp_obj_type_t *type, mp_obj_t file_in, mp_
case '+': case '+':
mode_rw = O_RDWR; mode_rw = O_RDWR;
break; break;
#if MICROPY_PY_IO_FILEIO #if MICROPY_PY_IO_FILEIO
// If we don't have io.FileIO, then files are in text mode implicitly // If we don't have io.FileIO, then files are in text mode implicitly
case 'b': case 'b':
type = &mp_type_vfs_posix_fileio; type = &mp_type_vfs_posix_fileio;
@ -66,7 +66,7 @@ mp_obj_t mp_vfs_posix_file_open(const mp_obj_type_t *type, mp_obj_t file_in, mp_
case 't': case 't':
type = &mp_type_vfs_posix_textio; type = &mp_type_vfs_posix_textio;
break; break;
#endif #endif
} }
} }
@ -159,7 +159,7 @@ STATIC mp_uint_t vfs_posix_file_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_
} }
return 0; return 0;
case MP_STREAM_SEEK: { case MP_STREAM_SEEK: {
struct mp_stream_seek_t *s = (struct mp_stream_seek_t*)arg; struct mp_stream_seek_t *s = (struct mp_stream_seek_t *)arg;
off_t off = lseek(o->fd, s->offset, s->whence); off_t off = lseek(o->fd, s->offset, s->whence);
if (off == (off_t)-1) { if (off == (off_t)-1) {
*errcode = errno; *errcode = errno;
@ -213,7 +213,7 @@ const mp_obj_type_t mp_type_vfs_posix_fileio = {
.getiter = mp_identity_getiter, .getiter = mp_identity_getiter,
.iternext = mp_stream_unbuffered_iter, .iternext = mp_stream_unbuffered_iter,
.protocol = &fileio_stream_p, .protocol = &fileio_stream_p,
.locals_dict = (mp_obj_dict_t*)&rawfile_locals_dict, .locals_dict = (mp_obj_dict_t *)&rawfile_locals_dict,
}; };
#endif #endif
@ -233,10 +233,10 @@ const mp_obj_type_t mp_type_vfs_posix_textio = {
.getiter = mp_identity_getiter, .getiter = mp_identity_getiter,
.iternext = mp_stream_unbuffered_iter, .iternext = mp_stream_unbuffered_iter,
.protocol = &textio_stream_p, .protocol = &textio_stream_p,
.locals_dict = (mp_obj_dict_t*)&rawfile_locals_dict, .locals_dict = (mp_obj_dict_t *)&rawfile_locals_dict,
}; };
const mp_obj_vfs_posix_file_t mp_sys_stdin_obj = {{&mp_type_textio}, STDIN_FILENO}; const mp_obj_vfs_posix_file_t mp_sys_stdin_obj = {{&mp_type_textio}, STDIN_FILENO};
const mp_obj_vfs_posix_file_t mp_sys_stdout_obj = {{&mp_type_textio}, STDOUT_FILENO}; const mp_obj_vfs_posix_file_t mp_sys_stdout_obj = {{&mp_type_textio}, STDOUT_FILENO};
const mp_obj_vfs_posix_file_t mp_sys_stderr_obj = {{&mp_type_textio}, STDERR_FILENO}; const mp_obj_vfs_posix_file_t mp_sys_stderr_obj = {{&mp_type_textio}, STDERR_FILENO};

View File

@ -21,7 +21,7 @@ typedef struct _mp_reader_vfs_t {
} mp_reader_vfs_t; } mp_reader_vfs_t;
STATIC mp_uint_t mp_reader_vfs_readbyte(void *data) { STATIC mp_uint_t mp_reader_vfs_readbyte(void *data) {
mp_reader_vfs_t *reader = (mp_reader_vfs_t*)data; mp_reader_vfs_t *reader = (mp_reader_vfs_t *)data;
if (reader->pos >= reader->len) { if (reader->pos >= reader->len) {
if (reader->len < sizeof(reader->buf)) { if (reader->len < sizeof(reader->buf)) {
return MP_READER_EOF; return MP_READER_EOF;
@ -43,7 +43,7 @@ STATIC mp_uint_t mp_reader_vfs_readbyte(void *data) {
} }
STATIC void mp_reader_vfs_close(void *data) { STATIC void mp_reader_vfs_close(void *data) {
mp_reader_vfs_t *reader = (mp_reader_vfs_t*)data; mp_reader_vfs_t *reader = (mp_reader_vfs_t *)data;
mp_stream_close(reader->file); mp_stream_close(reader->file);
m_del_obj(mp_reader_vfs_t, reader); m_del_obj(mp_reader_vfs_t, reader);
} }
@ -51,7 +51,7 @@ STATIC void mp_reader_vfs_close(void *data) {
void mp_reader_new_file(mp_reader_t *reader, const char *filename) { void mp_reader_new_file(mp_reader_t *reader, const char *filename) {
mp_reader_vfs_t *rf = m_new_obj(mp_reader_vfs_t); mp_reader_vfs_t *rf = m_new_obj(mp_reader_vfs_t);
mp_obj_t arg = mp_obj_new_str(filename, strlen(filename)); mp_obj_t arg = mp_obj_new_str(filename, strlen(filename));
rf->file = mp_vfs_open(1, &arg, (mp_map_t*)&mp_const_empty_map); rf->file = mp_vfs_open(1, &arg, (mp_map_t *)&mp_const_empty_map);
int errcode; int errcode;
rf->len = mp_stream_rw(rf->file, rf->buf, sizeof(rf->buf), &errcode, MP_STREAM_RW_READ | MP_STREAM_RW_ONCE); rf->len = mp_stream_rw(rf->file, rf->buf, sizeof(rf->buf), &errcode, MP_STREAM_RW_READ | MP_STREAM_RW_ONCE);
if (errcode != 0) { if (errcode != 0) {

View File

@ -7,13 +7,13 @@
#include "py/proto.h" #include "py/proto.h"
int mp_virtual_pin_read(mp_obj_t pin) { int mp_virtual_pin_read(mp_obj_t pin) {
mp_obj_base_t* s = (mp_obj_base_t*)MP_OBJ_TO_PTR(pin); mp_obj_base_t *s = (mp_obj_base_t *)MP_OBJ_TO_PTR(pin);
const mp_pin_p_t *pin_p = mp_proto_get(MP_QSTR_protocol_pin, s); const mp_pin_p_t *pin_p = mp_proto_get(MP_QSTR_protocol_pin, s);
return pin_p->ioctl(pin, MP_PIN_READ, 0, NULL); return pin_p->ioctl(pin, MP_PIN_READ, 0, NULL);
} }
void mp_virtual_pin_write(mp_obj_t pin, int value) { void mp_virtual_pin_write(mp_obj_t pin, int value) {
mp_obj_base_t* s = (mp_obj_base_t*)MP_OBJ_TO_PTR(pin); mp_obj_base_t *s = (mp_obj_base_t *)MP_OBJ_TO_PTR(pin);
const mp_pin_p_t *pin_p = mp_proto_get(MP_QSTR_protocol_pin, s); const mp_pin_p_t *pin_p = mp_proto_get(MP_QSTR_protocol_pin, s);
pin_p->ioctl(pin, MP_PIN_WRITE, value, NULL); pin_p->ioctl(pin, MP_PIN_WRITE, value, NULL);
} }

@ -1 +1 @@
Subproject commit 1e3312ab1cba0b1d3bb1f559c52acfdc1a6d57b8 Subproject commit 0cfa671b0c38386ba4da59119d61d399faa9b358

@ -1 +1 @@
Subproject commit dd7cc167c528a94a9feed81f9c52b5d372f68258 Subproject commit 5fee6e0c3878110844bc51e16063eeae7d94c457

@ -1 +1 @@
Subproject commit bc58a654964c799e972719a63ff12694998f3549 Subproject commit 7a5de1ad777e95b0f4fab7bbd35678c7d319b1b5

View File

@ -65,7 +65,7 @@ void netutils_parse_ipv4_addr(mp_obj_t addr_in, uint8_t *out_ip, netutils_endian
} }
const char *s = addr_str; const char *s = addr_str;
const char *s_top = addr_str + addr_len; const char *s_top = addr_str + addr_len;
for (mp_uint_t i = 3 ; ; i--) { for (mp_uint_t i = 3; ; i--) {
mp_uint_t val = 0; mp_uint_t val = 0;
for (; s < s_top && *s != '.'; s++) { for (; s < s_top && *s != '.'; s++) {
val = val * 10 + *s - '0'; val = val * 10 + *s - '0';

@ -1 +1 @@
Subproject commit 5e925cea7a55273e375a6129761cb29b4e750d4f Subproject commit c2c81ded118484f8925bf81e270b416739cd72d9

View File

@ -36,11 +36,11 @@
#define LEAPOCH ((31 + 29) * 86400) #define LEAPOCH ((31 + 29) * 86400)
#define DAYS_PER_400Y (365*400 + 97) #define DAYS_PER_400Y (365 * 400 + 97)
#define DAYS_PER_100Y (365*100 + 24) #define DAYS_PER_100Y (365 * 100 + 24)
#define DAYS_PER_4Y (365*4 + 1) #define DAYS_PER_4Y (365 * 4 + 1)
STATIC const uint16_t days_since_jan1[]= { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; STATIC const uint16_t days_since_jan1[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 };
bool timeutils_is_leap_year(mp_uint_t year) { bool timeutils_is_leap_year(mp_uint_t year) {
return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0; return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0;
@ -164,7 +164,7 @@ void timeutils_seconds_since_epoch_to_struct_time(mp_uint_t t, timeutils_struct_
} }
mp_uint_t timeutils_seconds_since_epoch(mp_uint_t year, mp_uint_t month, mp_uint_t date, mp_uint_t timeutils_seconds_since_epoch(mp_uint_t year, mp_uint_t month, mp_uint_t date,
mp_uint_t hour, mp_uint_t minute, mp_uint_t second) { mp_uint_t hour, mp_uint_t minute, mp_uint_t second) {
mp_uint_t t = timeutils_seconds_since_2000(year, month, date, hour, minute, second); mp_uint_t t = timeutils_seconds_since_2000(year, month, date, hour, minute, second);
return t + EPOCH1970_EPOCH2000_DIFF_SECS; return t + EPOCH1970_EPOCH2000_DIFF_SECS;
} }

View File

@ -30,14 +30,14 @@
#define EPOCH1970_EPOCH2000_DIFF_SECS 946684800 #define EPOCH1970_EPOCH2000_DIFF_SECS 946684800
typedef struct _timeutils_struct_time_t { typedef struct _timeutils_struct_time_t {
uint16_t tm_year; // i.e. 2014 uint16_t tm_year; // i.e. 2014
uint8_t tm_mon; // 1..12 uint8_t tm_mon; // 1..12
uint8_t tm_mday; // 1..31 uint8_t tm_mday; // 1..31
uint8_t tm_hour; // 0..23 uint8_t tm_hour; // 0..23
uint8_t tm_min; // 0..59 uint8_t tm_min; // 0..59
uint8_t tm_sec; // 0..59 uint8_t tm_sec; // 0..59
uint8_t tm_wday; // 0..6 0 = Monday uint8_t tm_wday; // 0..6 0 = Monday
uint16_t tm_yday; // 1..366 uint16_t tm_yday; // 1..366
} timeutils_struct_time_t; } timeutils_struct_time_t;
bool timeutils_is_leap_year(mp_uint_t year); bool timeutils_is_leap_year(mp_uint_t year);
@ -53,7 +53,7 @@ mp_uint_t timeutils_seconds_since_2000(mp_uint_t year, mp_uint_t month,
void timeutils_seconds_since_epoch_to_struct_time(mp_uint_t t, timeutils_struct_time_t *tm); void timeutils_seconds_since_epoch_to_struct_time(mp_uint_t t, timeutils_struct_time_t *tm);
mp_uint_t timeutils_seconds_since_epoch(mp_uint_t year, mp_uint_t month, mp_uint_t date, mp_uint_t timeutils_seconds_since_epoch(mp_uint_t year, mp_uint_t month, mp_uint_t date,
mp_uint_t hour, mp_uint_t minute, mp_uint_t second); mp_uint_t hour, mp_uint_t minute, mp_uint_t second);
mp_uint_t timeutils_mktime(mp_uint_t year, mp_int_t month, mp_int_t mday, mp_uint_t timeutils_mktime(mp_uint_t year, mp_int_t month, mp_int_t mday,
mp_int_t hours, mp_int_t minutes, mp_int_t seconds); mp_int_t hours, mp_int_t minutes, mp_int_t seconds);

@ -1 +1 @@
Subproject commit 045674745afa59028fbeed6dac5cb5a9c4a6033e Subproject commit 2adb7e719316b12c53a907153cfa0056db1abd70

View File

@ -26,10 +26,10 @@
#include "lib/utils/buffer_helper.h" #include "lib/utils/buffer_helper.h"
void normalize_buffer_bounds(int32_t* start, int32_t end, size_t* length) { void normalize_buffer_bounds(int32_t *start, int32_t end, size_t *length) {
if (end < 0) { if (end < 0) {
end += *length; end += *length;
} else if (((size_t) end) > *length) { } else if (((size_t)end) > *length) {
end = *length; end = *length;
} }
if (*start < 0) { if (*start < 0) {

View File

@ -30,6 +30,6 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
void normalize_buffer_bounds(int32_t* start, int32_t end, size_t* length); void normalize_buffer_bounds(int32_t *start, int32_t end, size_t *length);
#endif // MICROPY_INCLUDED_LIB_UTILS_BUFFER_HELPER_H #endif // MICROPY_INCLUDED_LIB_UTILS_BUFFER_HELPER_H

View File

@ -29,6 +29,6 @@
#include "py/obj.h" #include "py/obj.h"
STATIC mp_obj_t default___enter__(mp_obj_t self_in) { STATIC mp_obj_t default___enter__(mp_obj_t self_in) {
return self_in; return self_in;
} }
MP_DEFINE_CONST_FUN_OBJ_1(default___enter___obj, default___enter__); MP_DEFINE_CONST_FUN_OBJ_1(default___enter___obj, default___enter__);

View File

@ -108,7 +108,7 @@ STATIC void strn_print_strn(void *data, const char *str, size_t len) {
// when linkings against it statically. // when linkings against it statically.
// GCC 9 gives a warning about missing attributes so it's excluded until // GCC 9 gives a warning about missing attributes so it's excluded until
// uClibc+GCC9 support is needed. // uClibc+GCC9 support is needed.
int __GI_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) __attribute__((weak, alias ("vsnprintf"))); int __GI_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) __attribute__((weak, alias("vsnprintf")));
#endif #endif
int vsnprintf(char *str, size_t size, const char *fmt, va_list ap) { int vsnprintf(char *str, size_t size, const char *fmt, va_list ap) {
@ -134,4 +134,4 @@ int snprintf(char *str, size_t size, const char *fmt, ...) {
return ret; return ret;
} }
#endif //MICROPY_USE_INTERNAL_PRINTF #endif // MICROPY_USE_INTERNAL_PRINTF

32
lib/utils/pyexec.c Executable file → Normal file
View File

@ -85,7 +85,7 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
} else if (exec_flags & EXEC_FLAG_SOURCE_IS_FILENAME) { } else if (exec_flags & EXEC_FLAG_SOURCE_IS_FILENAME) {
lex = mp_lexer_new_from_file(source); lex = mp_lexer_new_from_file(source);
} else { } else {
lex = (mp_lexer_t*)source; lex = (mp_lexer_t *)source;
} }
// source is a lexer, parse and compile the script // source is a lexer, parse and compile the script
qstr source_name = lex->source_name; qstr source_name = lex->source_name;
@ -95,7 +95,7 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
mp_parse_tree_t parse_tree = mp_parse(lex, input_kind); mp_parse_tree_t parse_tree = mp_parse(lex, input_kind);
module_fun = mp_compile(&parse_tree, source_name, MP_EMIT_OPT_NONE, exec_flags & EXEC_FLAG_IS_REPL); module_fun = mp_compile(&parse_tree, source_name, MP_EMIT_OPT_NONE, exec_flags & EXEC_FLAG_IS_REPL);
// Clear the parse tree because it has a heap pointer we don't need anymore. // Clear the parse tree because it has a heap pointer we don't need anymore.
*((uint32_t volatile*) &parse_tree.chunk) = 0; *((uint32_t volatile *)&parse_tree.chunk) = 0;
#else #else
mp_raise_msg(&mp_type_RuntimeError, translate("script compilation not supported")); mp_raise_msg(&mp_type_RuntimeError, translate("script compilation not supported"));
#endif #endif
@ -132,12 +132,12 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
if (mp_obj_is_subclass_fast(mp_obj_get_type((mp_obj_t)nlr.ret_val), &mp_type_SystemExit)) { if (mp_obj_is_subclass_fast(mp_obj_get_type((mp_obj_t)nlr.ret_val), &mp_type_SystemExit)) {
// at the moment, the value of SystemExit is unused // at the moment, the value of SystemExit is unused
ret = pyexec_system_exit; ret = pyexec_system_exit;
#if CIRCUITPY_ALARM #if CIRCUITPY_ALARM
} else if (mp_obj_is_subclass_fast(mp_obj_get_type((mp_obj_t)nlr.ret_val), &mp_type_DeepSleepRequest)) { } else if (mp_obj_is_subclass_fast(mp_obj_get_type((mp_obj_t)nlr.ret_val), &mp_type_DeepSleepRequest)) {
ret = PYEXEC_DEEP_SLEEP; ret = PYEXEC_DEEP_SLEEP;
#endif #endif
} else { } else {
if ((mp_obj_t) nlr.ret_val != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { if ((mp_obj_t)nlr.ret_val != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) {
mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val); mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val);
} }
ret = PYEXEC_EXCEPTION; ret = PYEXEC_EXCEPTION;
@ -169,8 +169,8 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
size_t n_pool, n_qstr, n_str_data_bytes, n_total_bytes; size_t n_pool, n_qstr, n_str_data_bytes, n_total_bytes;
qstr_pool_info(&n_pool, &n_qstr, &n_str_data_bytes, &n_total_bytes); qstr_pool_info(&n_pool, &n_qstr, &n_str_data_bytes, &n_total_bytes);
printf("qstr:\n n_pool=" UINT_FMT "\n n_qstr=" UINT_FMT "\n " printf("qstr:\n n_pool=" UINT_FMT "\n n_qstr=" UINT_FMT "\n "
"n_str_data_bytes=" UINT_FMT "\n n_total_bytes=" UINT_FMT "\n", "n_str_data_bytes=" UINT_FMT "\n n_total_bytes=" UINT_FMT "\n",
(unsigned)n_pool, (unsigned)n_qstr, (unsigned)n_str_data_bytes, (unsigned)n_total_bytes); (unsigned)n_pool, (unsigned)n_qstr, (unsigned)n_str_data_bytes, (unsigned)n_total_bytes);
} }
#if MICROPY_ENABLE_GC #if MICROPY_ENABLE_GC
@ -195,7 +195,7 @@ typedef struct _repl_t {
// but it was moved to MP_STATE_VM(repl_line) as containing // but it was moved to MP_STATE_VM(repl_line) as containing
// root pointer. Still keep structure in case more state // root pointer. Still keep structure in case more state
// will be added later. // will be added later.
//vstr_t line; // vstr_t line;
bool cont_line; bool cont_line;
} repl_t; } repl_t;
@ -307,10 +307,10 @@ STATIC int pyexec_friendly_repl_process_char(int c) {
} else { } else {
if (ret == CHAR_CTRL_C) { if (ret == CHAR_CTRL_C) {
// cancel everything // cancel everything
mp_hal_stdout_tx_str("\r\n"); mp_hal_stdout_tx_str("\r\n");
repl.cont_line = false; repl.cont_line = false;
goto input_restart; goto input_restart;
} else if (ret == CHAR_CTRL_D) { } else if (ret == CHAR_CTRL_D) {
// stop entering compound statement // stop entering compound statement
goto exec; goto exec;
@ -326,13 +326,13 @@ STATIC int pyexec_friendly_repl_process_char(int c) {
return 0; return 0;
} }
exec: ; exec:;
int ret = parse_compile_execute(MP_STATE_VM(repl_line), MP_PARSE_SINGLE_INPUT, EXEC_FLAG_ALLOW_DEBUGGING | EXEC_FLAG_IS_REPL | EXEC_FLAG_SOURCE_IS_VSTR, NULL); int ret = parse_compile_execute(MP_STATE_VM(repl_line), MP_PARSE_SINGLE_INPUT, EXEC_FLAG_ALLOW_DEBUGGING | EXEC_FLAG_IS_REPL | EXEC_FLAG_SOURCE_IS_VSTR, NULL);
if (ret & PYEXEC_FORCED_EXIT) { if (ret & PYEXEC_FORCED_EXIT) {
return ret; return ret;
} }
input_restart: input_restart:
vstr_reset(MP_STATE_VM(repl_line)); vstr_reset(MP_STATE_VM(repl_line));
repl.cont_line = false; repl.cont_line = false;
readline_init(MP_STATE_VM(repl_line), ">>> "); readline_init(MP_STATE_VM(repl_line), ">>> ");
@ -409,11 +409,11 @@ int pyexec_friendly_repl(void) {
vstr_t line; vstr_t line;
vstr_init(&line, 32); vstr_init(&line, 32);
#if defined(USE_HOST_MODE) && MICROPY_HW_HAS_LCD #if defined(USE_HOST_MODE) && MICROPY_HW_HAS_LCD
// in host mode, we enable the LCD for the repl // in host mode, we enable the LCD for the repl
mp_obj_t lcd_o = mp_call_function_0(mp_load_name(qstr_from_str("LCD"))); mp_obj_t lcd_o = mp_call_function_0(mp_load_name(qstr_from_str("LCD")));
mp_call_function_1(mp_load_attr(lcd_o, qstr_from_str("light")), mp_const_true); mp_call_function_1(mp_load_attr(lcd_o, qstr_from_str("light")), mp_const_true);
#endif #endif
friendly_repl_reset: friendly_repl_reset:
mp_hal_stdout_tx_str("\r\n"); mp_hal_stdout_tx_str("\r\n");

View File

@ -35,7 +35,7 @@ typedef enum {
typedef struct { typedef struct {
int return_code; int return_code;
const mp_obj_type_t * exception_type; const mp_obj_type_t *exception_type;
int exception_line; int exception_line;
} pyexec_result_t; } pyexec_result_t;

View File

@ -20,7 +20,7 @@ void mp_hal_stdout_tx_strn_cooked(const char *str, size_t len) {
i = 1; i = 1;
} }
// Lump all characters on the next line together. // Lump all characters on the next line together.
while((last_cr || str[i] != '\n') && i < len) { while ((last_cr || str[i] != '\n') && i < len) {
last_cr = str[i] == '\r'; last_cr = str[i] == '\r';
i++; i++;
} }

View File

@ -65,7 +65,7 @@ STATIC mp_uint_t stdio_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *er
if (c == '\r') { if (c == '\r') {
c = '\n'; c = '\n';
} }
((byte*)buf)[i] = c; ((byte *)buf)[i] = c;
} }
return size; return size;
} else { } else {
@ -87,7 +87,7 @@ STATIC mp_uint_t stdio_write(mp_obj_t self_in, const void *buf, mp_uint_t size,
STATIC mp_uint_t stdio_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_t arg, int *errcode) { STATIC mp_uint_t stdio_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_t arg, int *errcode) {
sys_stdio_obj_t *self = MP_OBJ_TO_PTR(self_in); sys_stdio_obj_t *self = MP_OBJ_TO_PTR(self_in);
(void) self; (void)self;
// For now, pretend we actually flush the stdio stream. // For now, pretend we actually flush the stdio stream.
if (request == MP_STREAM_FLUSH) { if (request == MP_STREAM_FLUSH) {
@ -106,9 +106,9 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(stdio_obj___exit___obj, 4, 4, stdio_o
// TODO gc hook to close the file if not already closed // TODO gc hook to close the file if not already closed
STATIC const mp_rom_map_elem_t stdio_locals_dict_table[] = { STATIC const mp_rom_map_elem_t stdio_locals_dict_table[] = {
#if MICROPY_PY_SYS_STDIO_BUFFER #if MICROPY_PY_SYS_STDIO_BUFFER
{ MP_ROM_QSTR(MP_QSTR_buffer), MP_ROM_PTR(&stdio_buffer_obj) }, { MP_ROM_QSTR(MP_QSTR_buffer), MP_ROM_PTR(&stdio_buffer_obj) },
#endif #endif
{ MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_stream_read_obj) }, { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_stream_read_obj) },
{ MP_ROM_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&mp_stream_readinto_obj) }, { MP_ROM_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&mp_stream_readinto_obj) },
{ MP_ROM_QSTR(MP_QSTR_readline), MP_ROM_PTR(&mp_stream_unbuffered_readline_obj)}, { MP_ROM_QSTR(MP_QSTR_readline), MP_ROM_PTR(&mp_stream_unbuffered_readline_obj)},
@ -138,7 +138,7 @@ STATIC const mp_obj_type_t stdio_obj_type = {
.getiter = mp_identity_getiter, .getiter = mp_identity_getiter,
.iternext = mp_stream_unbuffered_iter, .iternext = mp_stream_unbuffered_iter,
.protocol = &stdio_obj_stream_p, .protocol = &stdio_obj_stream_p,
.locals_dict = (mp_obj_dict_t*)&stdio_locals_dict, .locals_dict = (mp_obj_dict_t *)&stdio_locals_dict,
}; };
const sys_stdio_obj_t mp_sys_stdin_obj = {{&stdio_obj_type}, .fd = STDIO_FD_IN}; const sys_stdio_obj_t mp_sys_stdin_obj = {{&stdio_obj_type}, .fd = STDIO_FD_IN};
@ -148,7 +148,7 @@ const sys_stdio_obj_t mp_sys_stderr_obj = {{&stdio_obj_type}, .fd = STDIO_FD_ERR
#if MICROPY_PY_SYS_STDIO_BUFFER #if MICROPY_PY_SYS_STDIO_BUFFER
STATIC mp_uint_t stdio_buffer_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *errcode) { STATIC mp_uint_t stdio_buffer_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *errcode) {
for (uint i = 0; i < size; i++) { for (uint i = 0; i < size; i++) {
((byte*)buf)[i] = mp_hal_stdin_rx_chr(); ((byte *)buf)[i] = mp_hal_stdin_rx_chr();
} }
return size; return size;
} }

View File

@ -107,6 +107,7 @@ msgstr "%q harus >= 1"
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "%q harus berupa tuple dengan panjang 2" msgstr "%q harus berupa tuple dengan panjang 2"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "%q di luar jangkauan" msgstr "%q di luar jangkauan"
@ -337,6 +338,7 @@ msgid "All SPI peripherals are in use"
msgstr "Semua perangkat SPI sedang digunakan" msgstr "Semua perangkat SPI sedang digunakan"
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "Semua perangkat UART sedang digunakan" msgstr "Semua perangkat UART sedang digunakan"
@ -460,6 +462,10 @@ msgstr ""
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "Di bawah frame rate minimum" msgstr "Di bawah frame rate minimum"
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock dan word harus memiliki kesamaan pada clock unit" msgstr "Bit clock dan word harus memiliki kesamaan pada clock unit"
@ -501,6 +507,10 @@ msgstr "Brightness tidak bisa disesuaikan"
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "Buffer + offset terlalu kecil %d %d %d" msgstr "Buffer + offset terlalu kecil %d %d %d"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -962,6 +972,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX" msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "Gagal untuk mengalokasikan buffer RX" msgstr "Gagal untuk mengalokasikan buffer RX"
@ -1050,10 +1061,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "Grup sudah digunakan" msgstr "Grup sudah digunakan"
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr "Grup penuh"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: 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/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1093,6 +1100,10 @@ msgstr ""
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "Panjang IV harus %d byte" msgstr "Panjang IV harus %d byte"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1109,10 +1120,23 @@ msgstr "Ukuran penyangga salah"
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "" msgstr ""
@ -1214,7 +1238,8 @@ msgstr "Argumen tidak valid"
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "Bit per nilai tidak valid" msgstr "Bit per nilai tidak valid"
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "Ukuran buffer tidak valid" msgstr "Ukuran buffer tidak valid"
@ -1289,10 +1314,10 @@ msgstr "Pin untuk channel kanan tidak valid"
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "Pin-pin tidak valid" msgstr "Pin-pin tidak valid"
@ -1341,7 +1366,8 @@ msgstr "Hitungan suara tidak valid"
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "File wave tidak valid" msgstr "File wave tidak valid"
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "Panjang kata/bit tidak valid" msgstr "Panjang kata/bit tidak valid"
@ -1468,6 +1494,7 @@ msgstr "Tidak ada DAC (Digital Analog Converter) di dalam chip"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "tidak ada channel DMA ditemukan" msgstr "tidak ada channel DMA ditemukan"
@ -1534,6 +1561,14 @@ msgstr "Tidak ada dukungan perangkat keras pada pin clk"
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "Tidak ada dukungan hardware untuk pin" msgstr "Tidak ada dukungan hardware untuk pin"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "Tidak ada kunci yang ditentukan" msgstr "Tidak ada kunci yang ditentukan"
@ -1622,13 +1657,10 @@ msgid "Odd parity is not supported"
msgstr "Parity ganjil tidak didukung" msgstr "Parity ganjil tidak didukung"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Hanya 8 atau 16 bit mono dengan " msgstr "Hanya 8 atau 16 bit mono dengan "
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1686,6 +1718,15 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "Sampel berlebihan harus kelipatan 8." msgstr "Sampel berlebihan harus kelipatan 8."
@ -1706,6 +1747,14 @@ msgstr ""
"Frekuensi PWM tidak dapat ditulis ketika variabel_frequency Salah pada " "Frekuensi PWM tidak dapat ditulis ketika variabel_frequency Salah pada "
"konstruksi." "konstruksi."
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1743,6 +1792,10 @@ msgstr "Pin tidak mempunya kemampuan untuk ADC (Analog Digital Converter)"
msgid "Pin is input only" msgid "Pin is input only"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "Pin harus mendukung interupsi perangkat keras" msgstr "Pin harus mendukung interupsi perangkat keras"
@ -1762,6 +1815,10 @@ msgstr ""
"ideal. Jika ini tidak dapat dihindari, berikan allow_inefficient=True ke " "ideal. Jika ini tidak dapat dihindari, berikan allow_inefficient=True ke "
"konstruktor" "konstruktor"
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1837,7 +1894,7 @@ msgstr "Kesalahan DeInit RNG"
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "Kesalahan Init RNG" msgstr "Kesalahan Init RNG"
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1874,7 +1931,7 @@ msgstr "Baca-saja"
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "sistem file (filesystem) bersifat Read-only" msgstr "sistem file (filesystem) bersifat Read-only"
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
#, fuzzy #, fuzzy
msgid "Read-only object" msgid "Read-only object"
msgstr "sistem file (filesystem) bersifat Read-only" msgstr "sistem file (filesystem) bersifat Read-only"
@ -2115,6 +2172,7 @@ msgid "To exit, please reset the board without "
msgstr "Untuk keluar, silahkan reset board tanpa " msgstr "Untuk keluar, silahkan reset board tanpa "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Terlalu banyak channel dalam sampel" msgstr "Terlalu banyak channel dalam sampel"
@ -2155,10 +2213,6 @@ msgstr "Kesalahan Init UART"
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "Kesalahan Re-init UART" msgstr "Kesalahan Re-init UART"
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "Kesalahan penulisan UART" msgstr "Kesalahan penulisan UART"
@ -2185,6 +2239,7 @@ msgstr "Nilai UUID bukan str, int atau byte buffer"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Tidak dapat mengalokasikan buffer untuk signed conversion" msgstr "Tidak dapat mengalokasikan buffer untuk signed conversion"
@ -2495,7 +2550,7 @@ msgid "binary op %q not implemented"
msgstr "" msgstr ""
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
@ -2724,6 +2779,10 @@ msgstr ""
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3378,6 +3437,10 @@ msgstr ""
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "" msgstr ""
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "modul tidak ditemukan" msgstr "modul tidak ditemukan"
@ -3632,7 +3695,7 @@ msgstr ""
msgid "out of range of source" msgid "out of range of source"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "" msgstr ""
@ -3720,6 +3783,7 @@ msgstr ""
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3731,6 +3795,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3797,6 +3865,7 @@ msgid ""
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "nilai sampling keluar dari jangkauan" msgstr "nilai sampling keluar dari jangkauan"
@ -3868,7 +3937,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "" msgstr ""
@ -4154,6 +4223,11 @@ msgstr ""
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "" msgstr ""
@ -4226,6 +4300,9 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "Group full"
#~ msgstr "Grup penuh"
#~ msgid "SDA or SCL needs a pull up" #~ msgid "SDA or SCL needs a pull up"
#~ msgstr "SDA atau SCL membutuhkan pull up" #~ msgstr "SDA atau SCL membutuhkan pull up"

View File

@ -73,6 +73,7 @@ msgstr ""
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/raspberrypi/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c #: py/objstrunicode.c
msgid "%q index out of range" msgid "%q index out of range"
@ -102,6 +103,7 @@ msgstr ""
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "" msgstr ""
@ -332,6 +334,7 @@ msgid "All SPI peripherals are in use"
msgstr "" msgstr ""
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "" msgstr ""
@ -453,6 +456,10 @@ msgstr ""
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "" msgstr ""
@ -494,6 +501,10 @@ msgstr ""
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -943,6 +954,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "" msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "" msgstr ""
@ -951,6 +963,7 @@ msgstr ""
#: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c #: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/raspberrypi/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c
#, c-format #, c-format
msgid "Failed to allocate RX buffer of %d bytes" msgid "Failed to allocate RX buffer of %d bytes"
@ -1031,10 +1044,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "" msgstr ""
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1074,6 +1083,10 @@ msgstr ""
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1088,6 +1101,14 @@ msgstr ""
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "" msgstr ""
@ -1198,7 +1219,8 @@ msgstr ""
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "" msgstr ""
@ -1227,7 +1249,7 @@ msgstr ""
msgid "Invalid format chunk size" msgid "Invalid format chunk size"
msgstr "" msgstr ""
#: ports/esp32s2/common-hal/pwmio/PWMOut.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency" msgid "Invalid frequency"
msgstr "" msgstr ""
@ -1273,10 +1295,10 @@ msgstr ""
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "" msgstr ""
@ -1325,7 +1347,8 @@ msgstr ""
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "" msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "" msgstr ""
@ -1452,6 +1475,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "" msgstr ""
@ -1518,6 +1542,14 @@ msgstr ""
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "" msgstr ""
@ -1604,13 +1636,10 @@ msgid "Odd parity is not supported"
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1664,6 +1693,10 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c #: shared-bindings/bitops/__init__.c
#, c-format #, c-format
msgid "Output buffer must be at least %d bytes" msgid "Output buffer must be at least %d bytes"
@ -1687,6 +1720,14 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction." "PWM frequency not writable when variable_frequency is False on construction."
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1724,6 +1765,10 @@ msgstr ""
msgid "Pin is input only" msgid "Pin is input only"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "" msgstr ""
@ -1740,6 +1785,10 @@ msgid ""
"constructor" "constructor"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1815,7 +1864,7 @@ msgstr ""
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1852,7 +1901,7 @@ msgstr ""
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "" msgstr ""
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "" msgstr ""
@ -2085,6 +2134,7 @@ msgid "To exit, please reset the board without "
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "" msgstr ""
@ -2124,10 +2174,6 @@ msgstr ""
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "" msgstr ""
@ -2154,6 +2200,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "" msgstr ""
@ -2246,7 +2293,7 @@ msgstr ""
msgid "Unsupported format" msgid "Unsupported format"
msgstr "" msgstr ""
#: py/moduerrno.c #: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c
msgid "Unsupported operation" msgid "Unsupported operation"
msgstr "" msgstr ""
@ -2455,7 +2502,7 @@ msgid "binary op %q not implemented"
msgstr "" msgstr ""
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
@ -2683,6 +2730,10 @@ msgstr ""
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -2800,6 +2851,10 @@ msgstr ""
msgid "differentiation order out of range" msgid "differentiation order out of range"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c
msgid "dimensions do not match"
msgstr ""
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c #: shared-bindings/math/__init__.c
msgid "division by zero" msgid "division by zero"
@ -3290,10 +3345,6 @@ msgstr ""
msgid "math domain error" msgid "math domain error"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c
msgid "matrix dimensions do not match"
msgstr ""
#: extmod/ulab/code/linalg/linalg.c #: extmod/ulab/code/linalg/linalg.c
msgid "matrix is not positive definite" msgid "matrix is not positive definite"
msgstr "" msgstr ""
@ -3337,6 +3388,10 @@ msgstr ""
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "" msgstr ""
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "" msgstr ""
@ -3590,7 +3645,7 @@ msgstr ""
msgid "out of range of source" msgid "out of range of source"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "" msgstr ""
@ -3646,6 +3701,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/raspberrypi/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c #: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q" msgid "pop from empty %q"
@ -3671,6 +3727,8 @@ msgstr ""
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h
#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h
#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h
#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
#: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h
@ -3678,6 +3736,7 @@ msgstr ""
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3689,6 +3748,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3755,6 +3818,7 @@ msgid ""
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "" msgstr ""
@ -3826,7 +3890,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "" msgstr ""
@ -4095,10 +4159,6 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: extmod/ulab/code/linalg/linalg.c
msgid "vectors must have same lengths"
msgstr ""
#: ports/esp32s2/common-hal/alarm/pin/__init__.c #: ports/esp32s2/common-hal/alarm/pin/__init__.c
msgid "wakeup conflict" msgid "wakeup conflict"
msgstr "" msgstr ""

View File

@ -105,6 +105,7 @@ msgstr "%q musí být > = 1"
msgid "%q must be a tuple of length 2" 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/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "%q je mimo rozsah" msgstr "%q je mimo rozsah"
@ -335,6 +336,7 @@ msgid "All SPI peripherals are in use"
msgstr "" msgstr ""
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "" msgstr ""
@ -456,6 +458,10 @@ msgstr ""
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "" msgstr ""
@ -497,6 +503,10 @@ msgstr ""
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -946,6 +956,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "" msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "" msgstr ""
@ -1034,10 +1045,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "" msgstr ""
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1077,6 +1084,10 @@ msgstr ""
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1091,10 +1102,23 @@ msgstr ""
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "" msgstr ""
@ -1196,7 +1220,8 @@ msgstr ""
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "" msgstr ""
@ -1271,10 +1296,10 @@ msgstr ""
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "" msgstr ""
@ -1323,7 +1348,8 @@ msgstr ""
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "" msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "" msgstr ""
@ -1450,6 +1476,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "" msgstr ""
@ -1516,6 +1543,14 @@ msgstr ""
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "" msgstr ""
@ -1602,13 +1637,10 @@ msgid "Odd parity is not supported"
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1662,6 +1694,15 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "" msgstr ""
@ -1680,6 +1721,14 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction." "PWM frequency not writable when variable_frequency is False on construction."
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1717,6 +1766,10 @@ msgstr ""
msgid "Pin is input only" msgid "Pin is input only"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "" msgstr ""
@ -1733,6 +1786,10 @@ msgid ""
"constructor" "constructor"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1808,7 +1865,7 @@ msgstr ""
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1845,7 +1902,7 @@ msgstr ""
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "" msgstr ""
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "" msgstr ""
@ -2078,6 +2135,7 @@ msgid "To exit, please reset the board without "
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "" msgstr ""
@ -2117,10 +2175,6 @@ msgstr ""
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "" msgstr ""
@ -2147,6 +2201,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "" msgstr ""
@ -2448,7 +2503,7 @@ msgid "binary op %q not implemented"
msgstr "" msgstr ""
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
@ -2676,6 +2731,10 @@ msgstr ""
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3330,6 +3389,10 @@ msgstr ""
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "" msgstr ""
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "" msgstr ""
@ -3583,7 +3646,7 @@ msgstr ""
msgid "out of range of source" msgid "out of range of source"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "" msgstr ""
@ -3671,6 +3734,7 @@ msgstr ""
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3682,6 +3746,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3748,6 +3816,7 @@ msgid ""
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "" msgstr ""
@ -3819,7 +3888,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "" msgstr ""
@ -4104,6 +4173,11 @@ msgstr ""
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "" msgstr ""

View File

@ -6,14 +6,14 @@ msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n" "POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2021-02-05 15:41+0000\n" "PO-Revision-Date: 2021-02-25 00:24+0000\n"
"Last-Translator: Jeff Epler <jepler@gmail.com>\n" "Last-Translator: Daniel Glocker <mystboy666@gmail.com>\n"
"Language: de_DE\n" "Language: de_DE\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n" "Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.5-dev\n" "X-Generator: Weblate 4.5\n"
#: main.c #: main.c
msgid "" msgid ""
@ -28,6 +28,8 @@ msgid ""
"\n" "\n"
"Code stopped by auto-reload.\n" "Code stopped by auto-reload.\n"
msgstr "" msgstr ""
"\n"
"Code durch automatisches neuladen gestoppt\n"
#: supervisor/shared/safe_mode.c #: supervisor/shared/safe_mode.c
msgid "" msgid ""
@ -49,7 +51,7 @@ msgstr " Datei \"%q\", Zeile %d"
#: py/builtinhelp.c #: py/builtinhelp.c
msgid " is of type %q\n" msgid " is of type %q\n"
msgstr "" msgstr " ist vom Type %q\n"
#: main.c #: main.c
msgid " output:\n" msgid " output:\n"
@ -65,6 +67,8 @@ msgstr "%%c erwartet int oder char"
msgid "" msgid ""
"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr "" msgstr ""
"%d Address Pins, %d rgb Pins und %d Tiles indiziert eine Höhe von %d, nicht "
"%d"
#: ports/atmel-samd/common-hal/sdioio/SDCard.c #: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d" msgid "%q failure: %d"
@ -106,6 +110,7 @@ msgstr "%q muss >= 1 sein"
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "%q muss ein Tupel der Länge 2 sein" msgstr "%q muss ein Tupel der Länge 2 sein"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "%q außerhalb des Bereichs" msgstr "%q außerhalb des Bereichs"
@ -126,7 +131,7 @@ msgstr ""
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
#, c-format #, c-format
msgid "%s error 0x%x" msgid "%s error 0x%x"
msgstr "" msgstr "%s Error 0x%x"
#: py/argcheck.c #: py/argcheck.c
msgid "'%q' argument required" msgid "'%q' argument required"
@ -146,7 +151,7 @@ msgstr "'%q' Objekt unterschützt keine Elementzuweisung"
#: py/obj.c #: py/obj.c
msgid "'%q' object does not support item deletion" msgid "'%q' object does not support item deletion"
msgstr "'%q' objekt unterstützt das " msgstr "'%q' Objekt unterstützt löschen von Elementen nicht"
#: py/runtime.c #: py/runtime.c
msgid "'%q' object has no attribute '%q'" msgid "'%q' object has no attribute '%q'"
@ -162,7 +167,7 @@ msgstr "'%q' Objekt ist kein callable"
#: py/runtime.c #: py/runtime.c
msgid "'%q' object is not iterable" msgid "'%q' object is not iterable"
msgstr "" msgstr "'%q' Objekt ist nicht iterierbar"
#: py/obj.c #: py/obj.c
msgid "'%q' object is not subscriptable" msgid "'%q' object is not subscriptable"
@ -292,7 +297,7 @@ msgstr "3-arg pow() wird nicht unterstützt"
#: shared-module/msgpack/__init__.c #: shared-module/msgpack/__init__.c
msgid "64 bit types" msgid "64 bit types"
msgstr "" msgstr "64 bit Typen"
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c
@ -337,6 +342,7 @@ msgid "All SPI peripherals are in use"
msgstr "Alle SPI-Peripheriegeräte sind in Benutzung" msgstr "Alle SPI-Peripheriegeräte sind in Benutzung"
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "Alle UART-Peripheriegeräte sind in Benutzung" msgstr "Alle UART-Peripheriegeräte sind in Benutzung"
@ -346,7 +352,7 @@ msgstr "Alle event Kanäle werden benutzt"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "All state machines in use" msgid "All state machines in use"
msgstr "" msgstr "Alle state machines in verwendung"
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "All sync event channels in use" msgid "All sync event channels in use"
@ -455,13 +461,17 @@ msgstr ""
#: ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/canio/CAN.c
msgid "Baudrate not supported by peripheral" msgid "Baudrate not supported by peripheral"
msgstr "" msgstr "Baudrate wird von der Peripherie nicht unterstützt"
#: shared-module/displayio/Display.c #: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c #: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "Unterhalb der minimalen Frame Rate" msgstr "Unterhalb der minimalen Frame Rate"
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock und word select müssen eine clock unit teilen" msgstr "Bit clock und word select müssen eine clock unit teilen"
@ -469,7 +479,7 @@ msgstr "Bit clock und word select müssen eine clock unit teilen"
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Bit depth must be from 1 to 6 inclusive, not %d" msgid "Bit depth must be from 1 to 6 inclusive, not %d"
msgstr "" msgstr "Bittiefe muss zwischen 1 und 6 liegen, nicht %d"
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8." msgid "Bit depth must be multiple of 8."
@ -503,6 +513,10 @@ msgstr "Die Helligkeit ist nicht einstellbar"
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "Buffer + Offset zu klein %d %d %d" msgstr "Buffer + Offset zu klein %d %d %d"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -566,7 +580,7 @@ msgstr "CBC-Blöcke müssen ein Vielfaches von 16 Bytes sein"
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
msgid "CRC or checksum was invalid" msgid "CRC or checksum was invalid"
msgstr "" msgstr "CRC oder Checksumme ungültig"
#: py/objtype.c #: py/objtype.c
msgid "Call super().__init__() before accessing native object." msgid "Call super().__init__() before accessing native object."
@ -574,7 +588,7 @@ msgstr "Rufe super().__init__() vor dem Zugriff auf ein natives Objekt auf."
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
msgid "Can only alarm on RTC IO from deep sleep." msgid "Can only alarm on RTC IO from deep sleep."
msgstr "" msgstr "Alarm der RTC IO kann nur im deep sleep ausgeführt werden."
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgid "Can only alarm on one low pin while others alarm high from deep sleep."
@ -620,7 +634,7 @@ msgstr "Kann nicht beite Kanäle auf dem gleichen Pin ausgeben"
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
msgid "Cannot pull on input-only pin." msgid "Cannot pull on input-only pin."
msgstr "" msgstr "Kann nicht 'pull' an einem 'input-only' pin."
#: shared-module/bitbangio/SPI.c #: shared-module/bitbangio/SPI.c
msgid "Cannot read without MISO pin." msgid "Cannot read without MISO pin."
@ -642,7 +656,7 @@ msgstr "Reset zum bootloader nicht möglich da bootloader nicht vorhanden."
#: ports/esp32s2/common-hal/socketpool/Socket.c #: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Cannot set socket options" msgid "Cannot set socket options"
msgstr "" msgstr "Socket Optionen können nicht gesetzt werden"
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Cannot set value when direction is input." msgid "Cannot set value when direction is input."
@ -672,7 +686,7 @@ msgstr ""
#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c
msgid "Cannot wake on pin edge. Only level." msgid "Cannot wake on pin edge. Only level."
msgstr "" msgstr "Kann nicht auf Flanke wecken, nur auf Level."
#: shared-module/bitbangio/SPI.c #: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin." msgid "Cannot write without MOSI pin."
@ -830,7 +844,7 @@ msgstr "Data 0 pin muss am Byte ausgerichtet sein"
#: ports/esp32s2/common-hal/displayio/ParallelBus.c #: ports/esp32s2/common-hal/displayio/ParallelBus.c
msgid "Data 0 pin must be byte aligned." msgid "Data 0 pin must be byte aligned."
msgstr "" msgstr "Data 0 Pin muss Byte aligned sein."
#: shared-module/audiocore/WaveFile.c #: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
@ -888,7 +902,7 @@ msgstr "Fehler in regex"
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c #: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
msgid "Error: Failure to bind" msgid "Error: Failure to bind"
msgstr "" msgstr "Error: Bind Fehler"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c py/enum.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c py/enum.c
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c #: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
@ -926,7 +940,7 @@ msgstr "Erwartet eine Adresse"
#: shared-bindings/alarm/__init__.c #: shared-bindings/alarm/__init__.c
msgid "Expected an alarm" msgid "Expected an alarm"
msgstr "" msgstr "Alarm erwartet"
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
@ -960,6 +974,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Mutex konnte nicht akquiriert werden. Status: 0x%04x" msgstr "Mutex konnte nicht akquiriert werden. Status: 0x%04x"
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "Konnte keinen RX Buffer allozieren" msgstr "Konnte keinen RX Buffer allozieren"
@ -1042,7 +1057,7 @@ msgstr "Die Funktion erwartet, dass der 'lock'-Befehl zuvor ausgeführt wurde"
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
msgid "Generic Failure" msgid "Generic Failure"
msgstr "" msgstr "Generischer Fehler"
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/displayio/EPaperDisplay.c
@ -1050,10 +1065,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "Gruppe schon benutzt" msgstr "Gruppe schon benutzt"
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr "Gruppe voll"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: 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/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1078,7 +1089,7 @@ msgstr "I2C-Init-Fehler"
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
msgid "I2C peripheral in use" msgid "I2C peripheral in use"
msgstr "" msgstr "I2C Peripherie in Verwendung"
#: shared-bindings/audiobusio/I2SOut.c #: shared-bindings/audiobusio/I2SOut.c
msgid "I2SOut not available" msgid "I2SOut not available"
@ -1093,6 +1104,10 @@ msgstr "IOs 0, 2 & 4 unterstützen keinen internen Pull up im sleep-Modus"
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "IV muss %d Bytes lang sein" msgstr "IV muss %d Bytes lang sein"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1107,15 +1122,28 @@ msgstr "Inkorrekte Puffergröße"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "Init Programm Größe ungültig"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr "" msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "Initialisierung aufgrund von Speichermangel fehlgeschlagen" msgstr "Initialisierung aufgrund von Speichermangel fehlgeschlagen"
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr "Input buffer länge (%d) muss ein vielfaches vom Strand Count (%d) sein"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "" msgstr "Input benötigt zu lange"
#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c #: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c
msgid "Input/output error" msgid "Input/output error"
@ -1124,7 +1152,7 @@ msgstr "Eingabe-/Ausgabefehler"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Instruction %d jumps on pin" msgid "Instruction %d jumps on pin"
msgstr "" msgstr "Instruktion %d springt auf Pin"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
@ -1203,7 +1231,7 @@ msgstr "Ungültige PWM Frequenz"
#: ports/esp32s2/common-hal/analogio/AnalogIn.c #: ports/esp32s2/common-hal/analogio/AnalogIn.c
msgid "Invalid Pin" msgid "Invalid Pin"
msgstr "" msgstr "Ungültiger Pin"
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
@ -1214,7 +1242,8 @@ msgstr "Ungültiges Argument"
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "Ungültige Bits pro Wert" msgstr "Ungültige Bits pro Wert"
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "Ungültige Puffergröße" msgstr "Ungültige Puffergröße"
@ -1289,10 +1318,10 @@ msgstr "Ungültiger Pin für rechten Kanal"
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "Ungültige Pins" msgstr "Ungültige Pins"
@ -1341,7 +1370,8 @@ msgstr "Ungültige Anzahl von Stimmen"
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "Ungültige wave Datei" msgstr "Ungültige wave Datei"
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "Ungültige Wort- / Bitlänge" msgstr "Ungültige Wort- / Bitlänge"
@ -1470,6 +1500,7 @@ msgstr "Kein DAC im Chip vorhanden"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "Kein DMA Kanal gefunden" msgstr "Kein DMA Kanal gefunden"
@ -1536,6 +1567,14 @@ msgstr "Keine Hardwareunterstützung am clk Pin"
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "Keine Hardwareunterstützung an diesem Pin" msgstr "Keine Hardwareunterstützung an diesem Pin"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "Es wurde kein Schlüssel angegeben" msgstr "Es wurde kein Schlüssel angegeben"
@ -1624,13 +1663,10 @@ msgid "Odd parity is not supported"
msgstr "Eine ungerade Parität wird nicht unterstützt" msgstr "Eine ungerade Parität wird nicht unterstützt"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Nur 8 oder 16 bit mono mit " msgstr "Nur 8 oder 16 bit mono mit "
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1688,6 +1724,15 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "Oversample muss ein Vielfaches von 8 sein." msgstr "Oversample muss ein Vielfaches von 8 sein."
@ -1706,6 +1751,14 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction." "PWM frequency not writable when variable_frequency is False on construction."
msgstr "Die PWM-Frequenz ist nicht schreibbar wenn variable_Frequenz = False." msgstr "Die PWM-Frequenz ist nicht schreibbar wenn variable_Frequenz = False."
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1743,6 +1796,10 @@ msgstr "Pin hat keine ADC Funktionalität"
msgid "Pin is input only" msgid "Pin is input only"
msgstr "Pin kann nur als Eingang verwendet werden" msgstr "Pin kann nur als Eingang verwendet werden"
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "Pin muss Hardware-Interrupts unterstützen" msgstr "Pin muss Hardware-Interrupts unterstützen"
@ -1762,6 +1819,10 @@ msgstr ""
"Bytes verbraucht. Wenn dies nicht vermieden werden kann, übergeben Sie " "Bytes verbraucht. Wenn dies nicht vermieden werden kann, übergeben Sie "
"allow_inefficient = True an den Konstruktor" "allow_inefficient = True an den Konstruktor"
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1837,7 +1898,7 @@ msgstr "RNG DeInit-Fehler"
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "RNG Init Fehler" msgstr "RNG Init Fehler"
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1874,7 +1935,7 @@ msgstr "Nur lesen möglich, da Schreibgeschützt"
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "Schreibgeschützte Dateisystem" msgstr "Schreibgeschützte Dateisystem"
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "Schreibgeschützte Objekt" msgstr "Schreibgeschützte Objekt"
@ -2119,6 +2180,7 @@ msgid "To exit, please reset the board without "
msgstr "Zum beenden, resette bitte das board ohne " msgstr "Zum beenden, resette bitte das board ohne "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Zu viele Kanäle im sample." msgstr "Zu viele Kanäle im sample."
@ -2160,10 +2222,6 @@ msgstr "UART Init Fehler"
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "UART Re-Init-Fehler" msgstr "UART Re-Init-Fehler"
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "UART-Schreibfehler" msgstr "UART-Schreibfehler"
@ -2190,6 +2248,7 @@ msgstr "Der UUID-Wert ist kein str-, int- oder Byte-Puffer"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Konnte keine Buffer für Vorzeichenumwandlung allozieren" msgstr "Konnte keine Buffer für Vorzeichenumwandlung allozieren"
@ -2346,7 +2405,7 @@ msgstr "WatchDogTimer.timeout muss größer als 0 sein"
#: supervisor/shared/safe_mode.c #: supervisor/shared/safe_mode.c
msgid "Watchdog timer expired." msgid "Watchdog timer expired."
msgstr "Watchdog timer abgelaufen " msgstr "Watchdog timer abgelaufen."
#: py/builtinhelp.c #: py/builtinhelp.c
#, c-format #, c-format
@ -2506,8 +2565,8 @@ msgid "binary op %q not implemented"
msgstr "Der binäre Operator %q ist nicht implementiert" msgstr "Der binäre Operator %q ist nicht implementiert"
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "bits muss 7, 8 oder 9 sein" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
msgid "bits_per_sample must be 8 or 16" msgid "bits_per_sample must be 8 or 16"
@ -2742,6 +2801,10 @@ msgstr "chr() arg ist nicht in range(256)"
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "Kreis kann nur in einem Elternteil registriert werden" msgstr "Kreis kann nur in einem Elternteil registriert werden"
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3408,6 +3471,10 @@ msgstr "Speicherzuordnung fehlgeschlagen, Zuweisung von %u Bytes"
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "Speicherzuweisung fehlgeschlagen, der Heap ist gesperrt" msgstr "Speicherzuweisung fehlgeschlagen, der Heap ist gesperrt"
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "Modul nicht gefunden" msgstr "Modul nicht gefunden"
@ -3665,7 +3732,7 @@ msgstr ""
msgid "out of range of source" msgid "out of range of source"
msgstr "Außerhalb des Bereichs der Quelle" msgstr "Außerhalb des Bereichs der Quelle"
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "Außerhalb des Bereichs des Ziels" msgstr "Außerhalb des Bereichs des Ziels"
@ -3753,6 +3820,7 @@ msgstr "pow () mit 3 Argumenten erfordert Integer"
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3764,6 +3832,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3832,6 +3904,7 @@ msgstr ""
"oder 'B' sein" "oder 'B' sein"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "Abtastrate außerhalb der Reichweite" msgstr "Abtastrate außerhalb der Reichweite"
@ -3903,7 +3976,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "Quell-Palette zu groß" msgstr "Quell-Palette zu groß"
@ -4193,6 +4266,11 @@ msgstr ""
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "" msgstr ""
@ -4265,6 +4343,12 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "Group full"
#~ msgstr "Gruppe voll"
#~ msgid "bits must be 7, 8 or 9"
#~ msgstr "bits muss 7, 8 oder 9 sein"
#~ msgid "SDA or SCL needs a pull up" #~ msgid "SDA or SCL needs a pull up"
#~ msgstr "SDA oder SCL brauchen pull up" #~ msgstr "SDA oder SCL brauchen pull up"

View File

@ -102,6 +102,7 @@ msgstr ""
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "" msgstr ""
@ -332,6 +333,7 @@ msgid "All SPI peripherals are in use"
msgstr "" msgstr ""
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "" msgstr ""
@ -453,6 +455,10 @@ msgstr ""
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "" msgstr ""
@ -494,6 +500,10 @@ msgstr ""
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -943,6 +953,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "" msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "" msgstr ""
@ -1031,10 +1042,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "" msgstr ""
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1074,6 +1081,10 @@ msgstr ""
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1088,10 +1099,23 @@ msgstr ""
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "" msgstr ""
@ -1193,7 +1217,8 @@ msgstr ""
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "" msgstr ""
@ -1268,10 +1293,10 @@ msgstr ""
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "" msgstr ""
@ -1320,7 +1345,8 @@ msgstr ""
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "" msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "" msgstr ""
@ -1447,6 +1473,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "" msgstr ""
@ -1513,6 +1540,14 @@ msgstr ""
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "" msgstr ""
@ -1599,13 +1634,10 @@ msgid "Odd parity is not supported"
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1659,6 +1691,15 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "" msgstr ""
@ -1677,6 +1718,14 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction." "PWM frequency not writable when variable_frequency is False on construction."
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1714,6 +1763,10 @@ msgstr ""
msgid "Pin is input only" msgid "Pin is input only"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "" msgstr ""
@ -1730,6 +1783,10 @@ msgid ""
"constructor" "constructor"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1805,7 +1862,7 @@ msgstr ""
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1842,7 +1899,7 @@ msgstr ""
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "" msgstr ""
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "" msgstr ""
@ -2075,6 +2132,7 @@ msgid "To exit, please reset the board without "
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "" msgstr ""
@ -2114,10 +2172,6 @@ msgstr ""
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "" msgstr ""
@ -2144,6 +2198,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "" msgstr ""
@ -2445,7 +2500,7 @@ msgid "binary op %q not implemented"
msgstr "" msgstr ""
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
@ -2673,6 +2728,10 @@ msgstr ""
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3327,6 +3386,10 @@ msgstr ""
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "" msgstr ""
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "" msgstr ""
@ -3580,7 +3643,7 @@ msgstr ""
msgid "out of range of source" msgid "out of range of source"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "" msgstr ""
@ -3668,6 +3731,7 @@ msgstr ""
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3679,6 +3743,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3745,6 +3813,7 @@ msgid ""
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "" msgstr ""
@ -3816,7 +3885,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "" msgstr ""
@ -4101,6 +4170,11 @@ msgstr ""
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "" msgstr ""

4247
locale/en_GB.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

@ -102,6 +102,7 @@ msgstr "aarehas na haba dapat ang buffer slices"
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "" msgstr ""
@ -334,6 +335,7 @@ msgid "All SPI peripherals are in use"
msgstr "Lahat ng SPI peripherals ay ginagamit" msgstr "Lahat ng SPI peripherals ay ginagamit"
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
#, fuzzy #, fuzzy
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "Lahat ng I2C peripherals ginagamit" msgstr "Lahat ng I2C peripherals ginagamit"
@ -458,6 +460,10 @@ msgstr ""
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "Ang bit clock at word select dapat makibahagi sa isang clock unit" msgstr "Ang bit clock at word select dapat makibahagi sa isang clock unit"
@ -499,6 +505,10 @@ msgstr ""
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -956,6 +966,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX" msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX"
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "Nabigong ilaan ang RX buffer" msgstr "Nabigong ilaan ang RX buffer"
@ -1044,10 +1055,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "" msgstr ""
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr "Puno ang group"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: 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/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1087,6 +1094,10 @@ msgstr ""
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1103,10 +1114,23 @@ msgstr ""
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "" msgstr ""
@ -1208,7 +1232,8 @@ msgstr "Maling argumento"
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "Mali ang buffer size" msgstr "Mali ang buffer size"
@ -1283,10 +1308,10 @@ msgstr "Mali ang pin para sa kanang channel"
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "Mali ang pins" msgstr "Mali ang pins"
@ -1335,7 +1360,8 @@ msgstr "Maling bilang ng voice"
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "May hindi tama sa wave file" msgstr "May hindi tama sa wave file"
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "" msgstr ""
@ -1462,6 +1488,7 @@ msgstr "Walang DAC sa chip"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "Walang DMA channel na mahanap" msgstr "Walang DMA channel na mahanap"
@ -1528,6 +1555,14 @@ msgstr ""
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "Walang support sa hardware ang pin" msgstr "Walang support sa hardware ang pin"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "" msgstr ""
@ -1617,13 +1652,10 @@ msgid "Odd parity is not supported"
msgstr "Odd na parity ay hindi supportado" msgstr "Odd na parity ay hindi supportado"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Tanging 8 o 16 na bit mono na may " msgstr "Tanging 8 o 16 na bit mono na may "
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1677,6 +1709,15 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "Oversample ay dapat multiple ng 8." msgstr "Oversample ay dapat multiple ng 8."
@ -1696,6 +1737,14 @@ msgid ""
msgstr "" msgstr ""
"PWM frequency hindi writable kapag variable_frequency ay False sa pag buo." "PWM frequency hindi writable kapag variable_frequency ay False sa pag buo."
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1733,6 +1782,10 @@ msgstr "Ang pin ay walang kakayahan sa ADC"
msgid "Pin is input only" msgid "Pin is input only"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "" msgstr ""
@ -1749,6 +1802,10 @@ msgid ""
"constructor" "constructor"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1824,7 +1881,7 @@ msgstr ""
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1861,7 +1918,7 @@ msgstr "Basahin-lamang"
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "Basahin-lamang mode" msgstr "Basahin-lamang mode"
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
#, fuzzy #, fuzzy
msgid "Read-only object" msgid "Read-only object"
msgstr "Basahin-lamang" msgstr "Basahin-lamang"
@ -2095,6 +2152,7 @@ msgid "To exit, please reset the board without "
msgstr "Para lumabas, paki-reset ang board na wala ang " msgstr "Para lumabas, paki-reset ang board na wala ang "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Sobra ang channels sa sample." msgstr "Sobra ang channels sa sample."
@ -2134,10 +2192,6 @@ msgstr ""
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "" msgstr ""
@ -2164,6 +2218,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Hindi ma-allocate ang buffers para sa naka-sign na conversion" msgstr "Hindi ma-allocate ang buffers para sa naka-sign na conversion"
@ -2475,8 +2530,8 @@ msgid "binary op %q not implemented"
msgstr "binary op %q hindi implemented" msgstr "binary op %q hindi implemented"
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "bits ay dapat 7, 8 o 9" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
msgid "bits_per_sample must be 8 or 16" msgid "bits_per_sample must be 8 or 16"
@ -2710,6 +2765,10 @@ msgstr "chr() arg wala sa sakop ng range(256)"
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3374,6 +3433,10 @@ msgstr "nabigo ang paglalaan ng memorya, paglalaan ng %u bytes"
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "abigo ang paglalaan ng memorya, ang heap ay naka-lock" msgstr "abigo ang paglalaan ng memorya, ang heap ay naka-lock"
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "module hindi nakita" msgstr "module hindi nakita"
@ -3628,7 +3691,7 @@ msgstr "ord() umaasa ng character pero string ng %d haba ang nakita"
msgid "out of range of source" msgid "out of range of source"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "" msgstr ""
@ -3717,6 +3780,7 @@ msgstr "pow() na may 3 argumento kailangan ng integers"
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3728,6 +3792,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3796,6 +3864,7 @@ msgstr ""
"'H', 'b' o'B'" "'H', 'b' o'B'"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "pagpili ng rate wala sa sakop" msgstr "pagpili ng rate wala sa sakop"
@ -3867,7 +3936,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "" msgstr ""
@ -4154,6 +4223,11 @@ msgstr ""
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "" msgstr ""
@ -4228,6 +4302,12 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "Group full"
#~ msgstr "Puno ang group"
#~ msgid "bits must be 7, 8 or 9"
#~ msgstr "bits ay dapat 7, 8 o 9"
#~ msgid "SDA or SCL needs a pull up" #~ msgid "SDA or SCL needs a pull up"
#~ msgstr "Kailangan ng pull up resistors ang SDA o SCL" #~ msgstr "Kailangan ng pull up resistors ang SDA o SCL"

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: 0.1\n" "Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n" "POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2021-01-30 02:32+0000\n" "PO-Revision-Date: 2021-03-14 23:02+0000\n"
"Last-Translator: Antonin ENFRUN <antonin.e@me.com>\n" "Last-Translator: Hugo Dahl <hugo@code-jedi.com>\n"
"Language: fr\n" "Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n" "Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.5-dev\n" "X-Generator: Weblate 4.5.2-dev\n"
#: main.c #: main.c
msgid "" msgid ""
@ -113,6 +113,7 @@ msgstr "%q doit être >= 1"
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "%q doit être un tuple de longueur 2" msgstr "%q doit être un tuple de longueur 2"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "%q est hors de porté" msgstr "%q est hors de porté"
@ -343,6 +344,7 @@ msgid "All SPI peripherals are in use"
msgstr "Tous les périphériques SPI sont utilisés" msgstr "Tous les périphériques SPI sont utilisés"
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "Tous les périphériques UART sont utilisés" msgstr "Tous les périphériques UART sont utilisés"
@ -352,11 +354,11 @@ msgstr "Tous les canaux d'événements sont utilisés"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "All state machines in use" msgid "All state machines in use"
msgstr "" msgstr "Tous les automates finis sont utilisés"
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "All sync event channels in use" msgid "All sync event channels in use"
msgstr "Tous les canaux d'événements sync (sync event channels) sont utilisés" msgstr "Tout canaux d'événements sync (sync event channels) sont utilisés"
#: shared-bindings/pwmio/PWMOut.c #: shared-bindings/pwmio/PWMOut.c
msgid "All timers for this pin are in use" msgid "All timers for this pin are in use"
@ -470,6 +472,10 @@ msgstr "Baudrate non supporté par le périphérique"
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "Au-dessous de la fréquence d'images minimale" msgstr "Au-dessous de la fréquence d'images minimale"
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "'bit clock' et 'word select' doivent partager une horloge" msgstr "'bit clock' et 'word select' doivent partager une horloge"
@ -511,6 +517,10 @@ msgstr "Luminosité non-ajustable"
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "Tampon + décalage trop petit %d %d %d" msgstr "Tampon + décalage trop petit %d %d %d"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -657,7 +667,7 @@ msgstr ""
#: ports/esp32s2/common-hal/socketpool/Socket.c #: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Cannot set socket options" msgid "Cannot set socket options"
msgstr "" msgstr "Ne peut définir les options de socket"
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Cannot set value when direction is input." msgid "Cannot set value when direction is input."
@ -976,6 +986,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Echec de l'obtention de mutex, err 0x%04x" msgstr "Echec de l'obtention de mutex, err 0x%04x"
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "Echec de l'allocation du tampon RX" msgstr "Echec de l'allocation du tampon RX"
@ -1066,10 +1077,6 @@ msgstr "Échec génerique"
msgid "Group already used" msgid "Group already used"
msgstr "Groupe déjà utilisé" msgstr "Groupe déjà utilisé"
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr "Groupe plein"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: 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/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1094,7 +1101,7 @@ msgstr "Erreur d'initialisation I2C"
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
msgid "I2C peripheral in use" msgid "I2C peripheral in use"
msgstr "" msgstr "périphérique I2C utilisé"
#: shared-bindings/audiobusio/I2SOut.c #: shared-bindings/audiobusio/I2SOut.c
msgid "I2SOut not available" msgid "I2SOut not available"
@ -1109,6 +1116,10 @@ msgstr "IOs 0, 2 & 4 ne supportent pas l'éleveuse interne en mode someil"
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "IV doit être de longueur de %d octets" msgstr "IV doit être de longueur de %d octets"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1123,12 +1134,27 @@ msgstr "Taille de tampon incorrecte"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "Taille du programme d'initialisation non valide"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr "" msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "Échec d'initialisation par manque de mémoire" msgstr "Échec d'initialisation par manque de mémoire"
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
"La taille (%d) du tampon d'entrée doit être un multiple du nombre (%d) de "
"brins"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "L'entrée prend trop de temps" msgstr "L'entrée prend trop de temps"
@ -1140,27 +1166,31 @@ msgstr "Erreur d'entrée/sortie"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Instruction %d jumps on pin" msgid "Instruction %d jumps on pin"
msgstr "" msgstr "Instruction %d saute sur la broche"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Instruction %d shifts in more bits than pin count" msgid "Instruction %d shifts in more bits than pin count"
msgstr "" msgstr ""
"Instruction %d décale vers l'intérieur de plus de bits que le nombre de "
"broches"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Instruction %d shifts out more bits than pin count" msgid "Instruction %d shifts out more bits than pin count"
msgstr "" msgstr ""
"instruction %d décale vers l'extérieur de plus de bits que le nombre de "
"broches"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Instruction %d uses extra pin" msgid "Instruction %d uses extra pin"
msgstr "" msgstr "instruction %d utilise des broches supplémentaires"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Instruction %d waits on input outside of count" msgid "Instruction %d waits on input outside of count"
msgstr "" msgstr "instruction %d attend sur une entrée hors du compte"
#: ports/nrf/common-hal/_bleio/__init__.c #: ports/nrf/common-hal/_bleio/__init__.c
msgid "Insufficient authentication" msgid "Insufficient authentication"
@ -1230,7 +1260,8 @@ msgstr "Paramètre invalide"
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "Bits par valeur invalides" msgstr "Bits par valeur invalides"
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "Longueur de tampon invalide" msgstr "Longueur de tampon invalide"
@ -1305,10 +1336,10 @@ msgstr "Broche invalide pour le canal droit"
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "Broches invalides" msgstr "Broches invalides"
@ -1357,7 +1388,8 @@ msgstr "Nombre de voix invalide"
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "Fichier WAVE invalide" msgstr "Fichier WAVE invalide"
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "Longueur de mot / bit invalide" msgstr "Longueur de mot / bit invalide"
@ -1425,32 +1457,34 @@ msgstr "Broche MISO ou MOSI manquante"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Missing first_in_pin. Instruction %d reads pin(s)" msgid "Missing first_in_pin. Instruction %d reads pin(s)"
msgstr "" msgstr "first_in_pin manquant. Instruction %d lit une/des broche(s)"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)" msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)"
msgstr "" msgstr ""
"first_in_pin manquant. Instruction %d est déplacée par la/les broche(s)"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Missing first_in_pin. Instruction %d waits based on pin" msgid "Missing first_in_pin. Instruction %d waits based on pin"
msgstr "" msgstr "first_in_pin manquant. L'instruction %d attends dépends de la broche"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)" msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)"
msgstr "" msgstr ""
"first_out_pin manquant. Instruction %d est déplacée par la/les broche(s)"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Missing first_out_pin. Instruction %d writes pin(s)" msgid "Missing first_out_pin. Instruction %d writes pin(s)"
msgstr "" msgstr "first_out_pin manquant. Instruction %d écrit un/des broche(s)"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#, c-format #, c-format
msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgid "Missing first_set_pin. Instruction %d sets pin(s)"
msgstr "" msgstr "first_set_pin manquant. L'instruction %d règle la/les broche(s)"
#: shared-bindings/displayio/Group.c #: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
@ -1484,13 +1518,14 @@ msgstr "Pas de DAC sur la puce"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "Aucun canal DMA trouvé" msgstr "Aucun canal DMA trouvé"
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA pacing timer found" msgid "No DMA pacing timer found"
msgstr "" msgstr "Aucun minuteur de rythme DMA trouvé"
#: shared-module/adafruit_bus_device/I2CDevice.c #: shared-module/adafruit_bus_device/I2CDevice.c
#, c-format #, c-format
@ -1550,6 +1585,14 @@ msgstr "Pas de support matériel sur la broche clk"
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "Pas de support matériel pour cette broche" msgstr "Pas de support matériel pour cette broche"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "Aucune clé n'a été spécifiée" msgstr "Aucune clé n'a été spécifiée"
@ -1576,13 +1619,13 @@ msgstr "Aucun réseau avec ce ssid"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No out in program" msgid "No out in program"
msgstr "" msgstr "Aucun out dans le programme"
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c #: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
msgid "No pull up found on SDA or SCL; check your wiring" msgid "No pull up found on SDA or SCL; check your wiring"
msgstr "" msgstr "Aucun pull up trouvé sur SDA ou SCL; vérifiez votre cablage"
#: shared-module/touchio/TouchIn.c #: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended" msgid "No pulldown on pin; 1Mohm recommended"
@ -1638,13 +1681,10 @@ msgid "Odd parity is not supported"
msgstr "Parité impaire non supportée" msgstr "Parité impaire non supportée"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Uniquement 8 ou 16 bit mono avec " msgstr "Uniquement 8 ou 16 bit mono avec "
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "Seulement les adresses IPv4 sont supportées" msgstr "Seulement les adresses IPv4 sont supportées"
@ -1702,6 +1742,15 @@ msgstr "Hors de mémoire"
msgid "Out of sockets" msgid "Out of sockets"
msgstr "Plus de sockets" msgstr "Plus de sockets"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr "Tampon de sortie doit être au moins %d octets"
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "Le sur-échantillonage doit être un multiple de 8." msgstr "Le sur-échantillonage doit être un multiple de 8."
@ -1724,6 +1773,14 @@ msgstr ""
"La fréquence de PWM n'est pas modifiable quand variable_frequency est False " "La fréquence de PWM n'est pas modifiable quand variable_frequency est False "
"à la construction." "à la construction."
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1740,11 +1797,11 @@ msgstr "Permission refusée"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Pin count must be at least 1" msgid "Pin count must be at least 1"
msgstr "" msgstr "Nombre de broches doit être au moins 1"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Pin count too large" msgid "Pin count too large"
msgstr "" msgstr "Nombre de broches trop élevé"
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/atmel-samd/common-hal/analogio/AnalogIn.c
#: ports/cxd56/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c
@ -1761,6 +1818,10 @@ msgstr "La broche 'pin' ne supporte pas les capacitées ADC"
msgid "Pin is input only" msgid "Pin is input only"
msgstr "La broche est entrée uniquement" msgstr "La broche est entrée uniquement"
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "La broche doit supporter les interruptions matérielles" msgstr "La broche doit supporter les interruptions matérielles"
@ -1780,9 +1841,13 @@ msgstr ""
"octets idéal. Si cela ne peut pas être évité, transmettez allow_inefficient " "octets idéal. Si cela ne peut pas être évité, transmettez allow_inefficient "
"= True au constructeur" "= True au constructeur"
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr "Les broches doivent partager la tranche PWM"
#: py/builtinhelp.c #: py/builtinhelp.c
msgid "Plus any modules on the filesystem\n" msgid "Plus any modules on the filesystem\n"
@ -1828,23 +1893,23 @@ msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Program does IN without loading ISR" msgid "Program does IN without loading ISR"
msgstr "" msgstr "Le programme fait des entrées sans charger d'ISR"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Program does OUT without loading OSR" msgid "Program does OUT without loading OSR"
msgstr "" msgstr "Le programme fait des sorties sans charger d'OSR"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Program must contain at least one 16-bit instruction." msgid "Program must contain at least one 16-bit instruction."
msgstr "" msgstr "Le programme doit contenir au moins une instruction de 16 bits."
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Program size invalid" msgid "Program size invalid"
msgstr "" msgstr "Taille du programme invalide"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Program too large" msgid "Program too large"
msgstr "" msgstr "Programme trop grand"
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
@ -1852,7 +1917,7 @@ msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'."
#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c
msgid "RAISE mode is not implemented" msgid "RAISE mode is not implemented"
msgstr "" msgstr "Mode RAISE n'est pas implémenté"
#: ports/stm/common-hal/os/__init__.c #: ports/stm/common-hal/os/__init__.c
msgid "RNG DeInit Error" msgid "RNG DeInit Error"
@ -1862,9 +1927,9 @@ msgstr "Erreur de désinitiation du RNG (RNG DeInit)"
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "Erreur d'initialisation du RNG (RNG Init)" msgstr "Erreur d'initialisation du RNG (RNG Init)"
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr "RS485 n'est pas encore supporté sur cet appareil"
#: ports/esp32s2/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c
#: ports/mimxrt10xx/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c
@ -1899,7 +1964,7 @@ msgstr "Lecture seule"
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "Système de fichier en lecture seule" msgstr "Système de fichier en lecture seule"
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "Objet en lecture seule" msgstr "Objet en lecture seule"
@ -1959,7 +2024,7 @@ msgstr "Erreur de réinitialisation SPI"
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
msgid "SPI peripheral in use" msgid "SPI peripheral in use"
msgstr "" msgstr "Périphérique SPI utilisé"
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive" msgid "Sample rate must be positive"
@ -1993,11 +2058,11 @@ msgstr "Un contexte niveau serveur ne peut avoir de hostname"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Set pin count must be between 1 and 5" msgid "Set pin count must be between 1 and 5"
msgstr "" msgstr "Nombre de broches configurées doit être entre 1 et 5"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Side set pin count must be between 1 and 5" msgid "Side set pin count must be between 1 and 5"
msgstr "" msgstr "Nombre de broches Side configurées doit être entre 1 et 5"
#: ports/cxd56/common-hal/camera/Camera.c #: ports/cxd56/common-hal/camera/Camera.c
msgid "Size not supported" msgid "Size not supported"
@ -2032,11 +2097,11 @@ msgstr "La pile doit être au moins de 256"
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Stereo left must be on PWM channel A" msgid "Stereo left must be on PWM channel A"
msgstr "" msgstr "Canal stéréo gauche doit être sur le canal PWM A"
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Stereo right must be on PWM channel B" msgid "Stereo right must be on PWM channel B"
msgstr "" msgstr "Canal stéréo droit doit être sur le canal PWM B"
#: shared-bindings/multiterminal/__init__.c #: shared-bindings/multiterminal/__init__.c
msgid "Stream missing readinto() or write() method." msgid "Stream missing readinto() or write() method."
@ -2143,6 +2208,7 @@ msgid "To exit, please reset the board without "
msgstr "Pour quitter, SVP redémarrez la carte sans " msgstr "Pour quitter, SVP redémarrez la carte sans "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Trop de canaux dans l'échantillon." msgstr "Trop de canaux dans l'échantillon."
@ -2183,10 +2249,6 @@ msgstr "Erreur d'initialisation UART"
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "Erreur de réinitialisation UART" msgstr "Erreur de réinitialisation UART"
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "Erreur d'écriture UART" msgstr "Erreur d'écriture UART"
@ -2216,6 +2278,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Impossible d'allouer des tampons pour une conversion signée" msgstr "Impossible d'allouer des tampons pour une conversion signée"
@ -2530,8 +2593,8 @@ msgid "binary op %q not implemented"
msgstr "opération binaire '%q' non implémentée" msgstr "opération binaire '%q' non implémentée"
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "bits doivent être 7, 8 ou 9" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
msgid "bits_per_sample must be 8 or 16" msgid "bits_per_sample must be 8 or 16"
@ -2767,6 +2830,10 @@ msgstr "paramètre de chr() hors les bornes de range(256)"
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "le cercle ne peut être enregistré que dans un seul parent" msgstr "le cercle ne peut être enregistré que dans un seul parent"
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "code hors bornes 0~127" msgstr "code hors bornes 0~127"
@ -3432,6 +3499,10 @@ msgstr "l'allocation de mémoire a échoué en allouant %u octets"
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "l'allocation de mémoire a échoué, le tas est vérrouillé" msgstr "l'allocation de mémoire a échoué, le tas est vérrouillé"
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr "memoryview: length n'est pas un multiple de itemsize"
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "module introuvable" msgstr "module introuvable"
@ -3689,7 +3760,7 @@ msgstr ""
msgid "out of range of source" msgid "out of range of source"
msgstr "dépassement des bornes de source" msgstr "dépassement des bornes de source"
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "dépassement des bornes de target" msgstr "dépassement des bornes de target"
@ -3753,7 +3824,7 @@ msgstr "pop sur %q vide"
#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c #: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c
msgid "port must be >= 0" msgid "port must be >= 0"
msgstr "" msgstr "port doit être >= 0"
#: py/objint_mpz.c #: py/objint_mpz.c
msgid "pow() 3rd argument cannot be 0" msgid "pow() 3rd argument cannot be 0"
@ -3778,6 +3849,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers"
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "bouton boot appuyé lors du démarrage.\n" msgstr "bouton boot appuyé lors du démarrage.\n"
@ -3789,13 +3861,17 @@ msgstr "bouton boot appuyé lors du démarrage.\n"
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "les deux boutons appuyés lors du démarrage.\n" msgstr "les deux boutons appuyés lors du démarrage.\n"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull masks conflict with direction masks"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32"
msgstr "pull_threshold doit être entre 1 et 32"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "push_threshold must be between 1 and 32" msgid "push_threshold must be between 1 and 32"
msgstr "" msgstr "push_threshold doit être entre 1 et 32"
#: extmod/modutimeq.c #: extmod/modutimeq.c
msgid "queue overflow" msgid "queue overflow"
@ -3857,6 +3933,7 @@ msgstr ""
"'h','H', 'b' ou 'B'" "'h','H', 'b' ou 'B'"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "taux d'échantillonage hors bornes" msgstr "taux d'échantillonage hors bornes"
@ -3928,7 +4005,7 @@ msgstr "sos[:, 3] doivent tous être à un"
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "sosfilt nécessite des argument itératifs" msgstr "sosfilt nécessite des argument itératifs"
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "la palette source est trop grande" msgstr "la palette source est trop grande"
@ -4214,6 +4291,11 @@ msgstr "chien de garde (watchdog) non initialisé"
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "watchdog timeout doit être supérieur à 0" msgstr "watchdog timeout doit être supérieur à 0"
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr "width doit être entre 2 et 8 (inclusivement), non %d"
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "width doit être plus que zero" msgstr "width doit être plus que zero"
@ -4286,6 +4368,18 @@ msgstr "zi doit être de type float"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "zi doit être de forme (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)"
#~ msgid "Group full"
#~ msgstr "Groupe plein"
#~ msgid "UART not yet supported"
#~ msgstr "UART n'est pas encore supporté"
#~ msgid "bits must be 7, 8 or 9"
#~ msgstr "bits doivent être 7, 8 ou 9"
#~ msgid "Only IN/OUT of up to 8 supported"
#~ msgstr "Seulement des IN/OUT jusqu'à 8 est supporté"
#~ msgid "SDA or SCL needs a pull up" #~ msgid "SDA or SCL needs a pull up"
#~ msgstr "SDA ou SCL a besoin d'une résistance de tirage ('pull up')" #~ msgstr "SDA ou SCL a besoin d'une résistance de tirage ('pull up')"

View File

@ -102,6 +102,7 @@ msgstr ""
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "" msgstr ""
@ -332,6 +333,7 @@ msgid "All SPI peripherals are in use"
msgstr "" msgstr ""
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "" msgstr ""
@ -453,6 +455,10 @@ msgstr ""
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "" msgstr ""
@ -494,6 +500,10 @@ msgstr ""
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -943,6 +953,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "" msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "" msgstr ""
@ -1031,10 +1042,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "" msgstr ""
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1074,6 +1081,10 @@ msgstr ""
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1088,10 +1099,23 @@ msgstr ""
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "" msgstr ""
@ -1193,7 +1217,8 @@ msgstr ""
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "" msgstr ""
@ -1268,10 +1293,10 @@ msgstr ""
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "" msgstr ""
@ -1320,7 +1345,8 @@ msgstr ""
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "" msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "" msgstr ""
@ -1447,6 +1473,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "" msgstr ""
@ -1513,6 +1540,14 @@ msgstr ""
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "" msgstr ""
@ -1599,13 +1634,10 @@ msgid "Odd parity is not supported"
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1659,6 +1691,15 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "" msgstr ""
@ -1677,6 +1718,14 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction." "PWM frequency not writable when variable_frequency is False on construction."
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1714,6 +1763,10 @@ msgstr ""
msgid "Pin is input only" msgid "Pin is input only"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "" msgstr ""
@ -1730,6 +1783,10 @@ msgid ""
"constructor" "constructor"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1805,7 +1862,7 @@ msgstr ""
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1842,7 +1899,7 @@ msgstr ""
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "" msgstr ""
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "" msgstr ""
@ -2075,6 +2132,7 @@ msgid "To exit, please reset the board without "
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "" msgstr ""
@ -2114,10 +2172,6 @@ msgstr ""
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "" msgstr ""
@ -2144,6 +2198,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "" msgstr ""
@ -2445,7 +2500,7 @@ msgid "binary op %q not implemented"
msgstr "" msgstr ""
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
@ -2673,6 +2728,10 @@ msgstr ""
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3327,6 +3386,10 @@ msgstr ""
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "" msgstr ""
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "" msgstr ""
@ -3580,7 +3643,7 @@ msgstr ""
msgid "out of range of source" msgid "out of range of source"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "" msgstr ""
@ -3668,6 +3731,7 @@ msgstr ""
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3679,6 +3743,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3745,6 +3813,7 @@ msgid ""
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "" msgstr ""
@ -3816,7 +3885,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "" msgstr ""
@ -4101,6 +4170,11 @@ msgstr ""
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "" msgstr ""

View File

@ -112,6 +112,7 @@ msgstr "slice del buffer devono essere della stessa lunghezza"
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "%q deve essere una tupla di lunghezza 2" msgstr "%q deve essere una tupla di lunghezza 2"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "%q oltre il limite" msgstr "%q oltre il limite"
@ -343,6 +344,7 @@ msgid "All SPI peripherals are in use"
msgstr "Tutte le periferiche SPI sono in uso" msgstr "Tutte le periferiche SPI sono in uso"
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
#, fuzzy #, fuzzy
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "Tutte le periferiche I2C sono in uso" msgstr "Tutte le periferiche I2C sono in uso"
@ -467,6 +469,10 @@ msgstr ""
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "Al di sotto del frame rate minimo" msgstr "Al di sotto del frame rate minimo"
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "" msgstr ""
@ -509,6 +515,10 @@ msgstr "Luminosità non è regolabile"
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "Buffer + offset troppo piccolo %d %d %d" msgstr "Buffer + offset troppo piccolo %d %d %d"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -965,6 +975,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "Impossibile allocare buffer RX" msgstr "Impossibile allocare buffer RX"
@ -1053,10 +1064,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "" msgstr ""
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr "Gruppo pieno"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: 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/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1096,6 +1103,10 @@ msgstr ""
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1112,10 +1123,23 @@ msgstr ""
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "" msgstr ""
@ -1217,7 +1241,8 @@ msgstr "Argomento non valido"
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "bits per valore invalido" msgstr "bits per valore invalido"
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
#, fuzzy #, fuzzy
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "lunghezza del buffer non valida" msgstr "lunghezza del buffer non valida"
@ -1294,10 +1319,10 @@ msgstr "Pin non valido per il canale destro"
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "Pin non validi" msgstr "Pin non validi"
@ -1347,7 +1372,8 @@ msgstr "Tipo di servizio non valido"
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "File wave non valido" msgstr "File wave non valido"
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "" msgstr ""
@ -1475,6 +1501,7 @@ msgstr "Nessun DAC sul chip"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "Nessun canale DMA trovato" msgstr "Nessun canale DMA trovato"
@ -1541,6 +1568,14 @@ msgstr ""
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "Nessun supporto hardware sul pin" msgstr "Nessun supporto hardware sul pin"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "" msgstr ""
@ -1631,13 +1666,10 @@ msgid "Odd parity is not supported"
msgstr "operazione I2C non supportata" msgstr "operazione I2C non supportata"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1691,6 +1723,15 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "L'oversampling deve essere multiplo di 8." msgstr "L'oversampling deve essere multiplo di 8."
@ -1714,6 +1755,14 @@ msgstr ""
"frequenza PWM frequency non è scrivibile quando variable_frequency è " "frequenza PWM frequency non è scrivibile quando variable_frequency è "
"impostato nel costruttore a False." "impostato nel costruttore a False."
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1751,6 +1800,10 @@ msgstr "Il pin non ha capacità di ADC"
msgid "Pin is input only" msgid "Pin is input only"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "" msgstr ""
@ -1767,6 +1820,10 @@ msgid ""
"constructor" "constructor"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1843,7 +1900,7 @@ msgstr ""
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1880,7 +1937,7 @@ msgstr "Sola lettura"
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "Filesystem in sola lettura" msgstr "Filesystem in sola lettura"
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
#, fuzzy #, fuzzy
msgid "Read-only object" msgid "Read-only object"
msgstr "Sola lettura" msgstr "Sola lettura"
@ -2116,6 +2173,7 @@ msgid "To exit, please reset the board without "
msgstr "Per uscire resettare la scheda senza " msgstr "Per uscire resettare la scheda senza "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "" msgstr ""
@ -2155,10 +2213,6 @@ msgstr ""
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "" msgstr ""
@ -2185,6 +2239,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Ipossibilitato ad allocare buffer per la conversione con segno" msgstr "Ipossibilitato ad allocare buffer per la conversione con segno"
@ -2488,8 +2543,8 @@ msgid "binary op %q not implemented"
msgstr "operazione binaria %q non implementata" msgstr "operazione binaria %q non implementata"
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "i bit devono essere 7, 8 o 9" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
#, fuzzy #, fuzzy
@ -2720,6 +2775,10 @@ msgstr "argomento di chr() non è in range(256)"
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3386,6 +3445,10 @@ msgstr "allocazione di memoria fallita, allocando %u byte"
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "allocazione di memoria fallita, l'heap è bloccato" msgstr "allocazione di memoria fallita, l'heap è bloccato"
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "modulo non trovato" msgstr "modulo non trovato"
@ -3644,7 +3707,7 @@ msgstr ""
msgid "out of range of source" msgid "out of range of source"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "" msgstr ""
@ -3734,6 +3797,7 @@ msgstr "pow() con 3 argomenti richiede interi"
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3745,6 +3809,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3813,6 +3881,7 @@ msgstr ""
"'H', 'b' o 'B'" "'H', 'b' o 'B'"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "frequenza di campionamento fuori intervallo" msgstr "frequenza di campionamento fuori intervallo"
@ -3884,7 +3953,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "" msgstr ""
@ -4171,6 +4240,11 @@ msgstr ""
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "" msgstr ""
@ -4245,6 +4319,12 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "Group full"
#~ msgstr "Gruppo pieno"
#~ msgid "bits must be 7, 8 or 9"
#~ msgstr "i bit devono essere 7, 8 o 9"
#~ msgid "SDA or SCL needs a pull up" #~ msgid "SDA or SCL needs a pull up"
#~ msgstr "SDA o SCL necessitano un pull-up" #~ msgstr "SDA o SCL necessitano un pull-up"

View File

@ -107,6 +107,7 @@ msgstr "%qは1以上でなければなりません"
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "%qは長さ2のタプルでなければなりません" msgstr "%qは長さ2のタプルでなければなりません"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "%q が範囲外" msgstr "%q が範囲外"
@ -337,6 +338,7 @@ msgid "All SPI peripherals are in use"
msgstr "全てのSPI周辺機器が使用中" msgstr "全てのSPI周辺機器が使用中"
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "全てのUART周辺機器が使用中" msgstr "全てのUART周辺機器が使用中"
@ -460,6 +462,10 @@ msgstr ""
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "最低のフレームレート未満" msgstr "最低のフレームレート未満"
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "bit clockとword selectはクロックユニットを共有しなければなりません" msgstr "bit clockとword selectはクロックユニットを共有しなければなりません"
@ -501,6 +507,10 @@ msgstr "Brightnessは調整可能ではありません"
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "buffer + offsetが小さすぎます %d %d %d" msgstr "buffer + offsetが小さすぎます %d %d %d"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -954,6 +964,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "ミューテックスの取得に失敗。エラー 0x%04x" msgstr "ミューテックスの取得に失敗。エラー 0x%04x"
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "RXバッファの確保に失敗" msgstr "RXバッファの確保に失敗"
@ -1042,10 +1053,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "グループはすでに使われています" msgstr "グループはすでに使われています"
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr "グループが一杯"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1085,6 +1092,10 @@ msgstr ""
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "IVは%dバイト長でなければなりません" msgstr "IVは%dバイト長でなければなりません"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1101,10 +1112,23 @@ msgstr "バッファサイズが正しくありません"
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "" msgstr ""
@ -1206,7 +1230,8 @@ msgstr "不正な引数"
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "不正なbits per value" msgstr "不正なbits per value"
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "不正なバッファサイズ" msgstr "不正なバッファサイズ"
@ -1281,10 +1306,10 @@ msgstr "右チャネルのピンが不正"
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "ピンが不正" msgstr "ピンが不正"
@ -1333,7 +1358,8 @@ msgstr "不正なボイス数"
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "不正なwaveファイル" msgstr "不正なwaveファイル"
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "不正なワード/ビット長" msgstr "不正なワード/ビット長"
@ -1460,6 +1486,7 @@ msgstr "チップにDACがありません"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "DMAチャネルが見つかりません" msgstr "DMAチャネルが見つかりません"
@ -1526,6 +1553,14 @@ msgstr "clkピンにハードウェア対応がありません"
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "ピンにハードウェア対応がありません" msgstr "ピンにハードウェア対応がありません"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "キーが指定されていません" msgstr "キーが指定されていません"
@ -1614,13 +1649,10 @@ msgid "Odd parity is not supported"
msgstr "奇数パリティには対応していません" msgstr "奇数パリティには対応していません"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "8または16ビットの " msgstr "8または16ビットの "
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1674,6 +1706,15 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "オーバーサンプルは8の倍数でなければなりません" msgstr "オーバーサンプルは8の倍数でなければなりません"
@ -1693,6 +1734,14 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction." "PWM frequency not writable when variable_frequency is False on construction."
msgstr "PWM周波数は生成時のvariable_frequencyがFalseのとき書き換え不可" msgstr "PWM周波数は生成時のvariable_frequencyがFalseのとき書き換え不可"
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1730,6 +1779,10 @@ msgstr "ピンにADCの能力がありません"
msgid "Pin is input only" msgid "Pin is input only"
msgstr "ピンは入力専用" msgstr "ピンは入力専用"
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "ピンはハードウェア割り込みに対応していなければなりません" msgstr "ピンはハードウェア割り込みに対応していなければなりません"
@ -1746,6 +1799,10 @@ msgid ""
"constructor" "constructor"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1821,7 +1878,7 @@ msgstr "RNG解体エラー"
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "乱数生成器の初期化エラー" msgstr "乱数生成器の初期化エラー"
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1858,7 +1915,7 @@ msgstr "読み込み専用"
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "読み込み専用のファイルシステム" msgstr "読み込み専用のファイルシステム"
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "読み込み専用のオブジェクト" msgstr "読み込み専用のオブジェクト"
@ -2097,6 +2154,7 @@ msgid "To exit, please reset the board without "
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "サンプルのチャンネル数が多すぎます" msgstr "サンプルのチャンネル数が多すぎます"
@ -2136,10 +2194,6 @@ msgstr "UARTの初期化エラー"
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "UARTの再初期化エラー" msgstr "UARTの再初期化エラー"
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "UART書き込みエラー" msgstr "UART書き込みエラー"
@ -2167,6 +2221,7 @@ msgstr "UUIDの値がstr, int, bufferのいずれでもありません"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "" msgstr ""
@ -2468,8 +2523,8 @@ msgid "binary op %q not implemented"
msgstr "" msgstr ""
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "bitsは7, 8, 9のいずれかでなければなりません" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
msgid "bits_per_sample must be 8 or 16" msgid "bits_per_sample must be 8 or 16"
@ -2696,6 +2751,10 @@ msgstr ""
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3355,6 +3414,10 @@ msgstr ""
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "メモリ確保に失敗。ヒープがロックされています" msgstr "メモリ確保に失敗。ヒープがロックされています"
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "モジュールが見つかりません" msgstr "モジュールが見つかりません"
@ -3608,7 +3671,7 @@ msgstr "ord()は1文字を要求しますが、長さ %d の文字列が与え
msgid "out of range of source" msgid "out of range of source"
msgstr "ソースが範囲外" msgstr "ソースが範囲外"
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "" msgstr ""
@ -3698,6 +3761,7 @@ msgstr "pow()の第3引数には整数が必要"
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3709,6 +3773,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3776,6 +3844,7 @@ msgstr ""
"sample_source バッファには bytearray または 'h','H','b','B'型のarrayが必要" "sample_source バッファには bytearray または 'h','H','b','B'型のarrayが必要"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "サンプリングレートが範囲外" msgstr "サンプリングレートが範囲外"
@ -3847,7 +3916,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "" msgstr ""
@ -4132,6 +4201,11 @@ msgstr ""
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "watchdogのtimeoutは0以上でなければなりません" msgstr "watchdogのtimeoutは0以上でなければなりません"
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "" msgstr ""
@ -4204,6 +4278,12 @@ msgstr "ziはfloat値でなければなりません"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "Group full"
#~ msgstr "グループが一杯"
#~ msgid "bits must be 7, 8 or 9"
#~ msgstr "bitsは7, 8, 9のいずれかでなければなりません"
#~ msgid "SDA or SCL needs a pull up" #~ msgid "SDA or SCL needs a pull up"
#~ msgstr "SDAとSCLにプルアップが必要" #~ msgstr "SDAとSCLにプルアップが必要"

View File

@ -103,6 +103,7 @@ msgstr "%q 는 >=1이어야합니다"
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "" msgstr ""
@ -333,6 +334,7 @@ msgid "All SPI peripherals are in use"
msgstr "사용중인 모든 SPI주변 기기" msgstr "사용중인 모든 SPI주변 기기"
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "사용중인 모든 UART주변 기기" msgstr "사용중인 모든 UART주변 기기"
@ -456,6 +458,10 @@ msgstr ""
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "" msgstr ""
@ -497,6 +503,10 @@ msgstr "밝기를 조절할 수 없습니다"
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -946,6 +956,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "" msgstr ""
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "" msgstr ""
@ -1034,10 +1045,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "" msgstr ""
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr ""
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1077,6 +1084,10 @@ msgstr ""
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1091,10 +1102,23 @@ msgstr ""
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "" msgstr ""
@ -1196,7 +1220,8 @@ msgstr ""
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "" msgstr ""
@ -1271,10 +1296,10 @@ msgstr "오른쪽 채널 핀이 잘못되었습니다"
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "핀이 유효하지 않습니다" msgstr "핀이 유효하지 않습니다"
@ -1323,7 +1348,8 @@ msgstr ""
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "" msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "" msgstr ""
@ -1450,6 +1476,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "" msgstr ""
@ -1516,6 +1543,14 @@ msgstr ""
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "" msgstr ""
@ -1602,13 +1637,10 @@ msgid "Odd parity is not supported"
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1662,6 +1694,15 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "" msgstr ""
@ -1680,6 +1721,14 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction." "PWM frequency not writable when variable_frequency is False on construction."
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1717,6 +1766,10 @@ msgstr ""
msgid "Pin is input only" msgid "Pin is input only"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "" msgstr ""
@ -1733,6 +1786,10 @@ msgid ""
"constructor" "constructor"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1808,7 +1865,7 @@ msgstr ""
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1845,7 +1902,7 @@ msgstr ""
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "" msgstr ""
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "" msgstr ""
@ -2078,6 +2135,7 @@ msgid "To exit, please reset the board without "
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "" msgstr ""
@ -2117,10 +2175,6 @@ msgstr ""
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "" msgstr ""
@ -2148,6 +2202,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "" msgstr ""
@ -2449,8 +2504,8 @@ msgid "binary op %q not implemented"
msgstr "" msgstr ""
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "비트(bits)는 7, 8 또는 9 여야합니다" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
msgid "bits_per_sample must be 8 or 16" msgid "bits_per_sample must be 8 or 16"
@ -2677,6 +2732,10 @@ msgstr ""
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3331,6 +3390,10 @@ msgstr ""
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "" msgstr ""
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "" msgstr ""
@ -3584,7 +3647,7 @@ msgstr ""
msgid "out of range of source" msgid "out of range of source"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "" msgstr ""
@ -3672,6 +3735,7 @@ msgstr ""
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3683,6 +3747,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3749,6 +3817,7 @@ msgid ""
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "" msgstr ""
@ -3820,7 +3889,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "" msgstr ""
@ -4105,6 +4174,11 @@ msgstr ""
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "" msgstr ""
@ -4177,6 +4251,9 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "bits must be 7, 8 or 9"
#~ msgstr "비트(bits)는 7, 8 또는 9 여야합니다"
#~ msgid "" #~ msgid ""
#~ "\n" #~ "\n"
#~ "Code done running. Waiting for reload.\n" #~ "Code done running. Waiting for reload.\n"

View File

@ -105,6 +105,7 @@ msgstr "%q moet >= 1 zijn"
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "%q moet een tuple van lengte 2 zijn" msgstr "%q moet een tuple van lengte 2 zijn"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "%q buiten bereik" msgstr "%q buiten bereik"
@ -335,6 +336,7 @@ msgid "All SPI peripherals are in use"
msgstr "Alle SPI peripherals zijn in gebruik" msgstr "Alle SPI peripherals zijn in gebruik"
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "Alle UART peripherals zijn in gebruik" msgstr "Alle UART peripherals zijn in gebruik"
@ -458,6 +460,10 @@ msgstr "Baudrate wordt niet ondersteund door randapparatuur"
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "Onder de minimum frame rate" msgstr "Onder de minimum frame rate"
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock en word select moeten een clock eenheid delen" msgstr "Bit clock en word select moeten een clock eenheid delen"
@ -499,6 +505,10 @@ msgstr "Helderheid is niet aanpasbaar"
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "Buffer + offset te klein %d %d %d" msgstr "Buffer + offset te klein %d %d %d"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -954,6 +964,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Fout tijdens verkrijgen mutex, err 0x%04x" msgstr "Fout tijdens verkrijgen mutex, err 0x%04x"
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "RX buffer alloceren mislukt" msgstr "RX buffer alloceren mislukt"
@ -1043,10 +1054,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "Groep al gebruikt" msgstr "Groep al gebruikt"
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr "Groep is vol"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: 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/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1086,6 +1093,10 @@ msgstr "IO's 0, 2 en 4 ondersteunen geen interne pullup in slaapstand"
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "IV %d bytes lang zijn" msgstr "IV %d bytes lang zijn"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1102,10 +1113,23 @@ msgstr "Incorrecte buffer grootte"
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "De initialisatie is mislukt vanwege een gebrek aan geheugen" msgstr "De initialisatie is mislukt vanwege een gebrek aan geheugen"
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "Invoer duurt te lang" msgstr "Invoer duurt te lang"
@ -1207,7 +1231,8 @@ msgstr "Ongeldig argument"
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "Ongeldige bits per waarde" msgstr "Ongeldige bits per waarde"
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "Ongeldige buffer grootte" msgstr "Ongeldige buffer grootte"
@ -1282,10 +1307,10 @@ msgstr "Ongeldige pin voor rechter kanaal"
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "Ongeldige pinnen" msgstr "Ongeldige pinnen"
@ -1334,7 +1359,8 @@ msgstr "Ongeldig stem aantal"
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "Ongeldig wave bestand" msgstr "Ongeldig wave bestand"
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "Ongeldig woord/bit lengte" msgstr "Ongeldig woord/bit lengte"
@ -1461,6 +1487,7 @@ msgstr "Geen DAC op de chip"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "Geen DMA kanaal gevonden" msgstr "Geen DMA kanaal gevonden"
@ -1527,6 +1554,14 @@ msgstr "Geen hardware ondersteuning beschikbaar op clk pin"
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "Geen hardware ondersteuning op pin" msgstr "Geen hardware ondersteuning op pin"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "Een sleutel was niet gespecificeerd" msgstr "Een sleutel was niet gespecificeerd"
@ -1615,13 +1650,10 @@ msgid "Odd parity is not supported"
msgstr "Oneven pariteit is niet ondersteund" msgstr "Oneven pariteit is niet ondersteund"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Alleen 8 of 16 bit mono met " msgstr "Alleen 8 of 16 bit mono met "
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "Alleen IPv4 adressen worden ondersteund" msgstr "Alleen IPv4 adressen worden ondersteund"
@ -1679,6 +1711,15 @@ msgstr ""
msgid "Out of sockets" msgid "Out of sockets"
msgstr "Geen sockets meer beschikbaar" msgstr "Geen sockets meer beschikbaar"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "Oversample moet een meervoud van 8 zijn." msgstr "Oversample moet een meervoud van 8 zijn."
@ -1700,6 +1741,14 @@ msgstr ""
"PWM frequentie is niet schrijfbaar wanneer de variable_frequency False is " "PWM frequentie is niet schrijfbaar wanneer de variable_frequency False is "
"tijdens constructie." "tijdens constructie."
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1737,6 +1786,10 @@ msgstr "Pin heeft geen ADC mogelijkheden"
msgid "Pin is input only" msgid "Pin is input only"
msgstr "Pin kan alleen voor invoer gebruikt worden" msgstr "Pin kan alleen voor invoer gebruikt worden"
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "Pin moet hardware interrupts ondersteunen" msgstr "Pin moet hardware interrupts ondersteunen"
@ -1756,6 +1809,10 @@ msgstr ""
"gebruikt. Als dit niet kan worden vermeden, geef dan het argument " "gebruikt. Als dit niet kan worden vermeden, geef dan het argument "
"allow_inefficient=True aan de constructor" "allow_inefficient=True aan de constructor"
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1837,7 +1894,7 @@ msgstr "RNG DeInit Fout"
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "RNG Init Fout" msgstr "RNG Init Fout"
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1874,7 +1931,7 @@ msgstr "Alleen-lezen"
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "Alleen-lezen bestandssysteem" msgstr "Alleen-lezen bestandssysteem"
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "Alleen-lezen object" msgstr "Alleen-lezen object"
@ -2117,6 +2174,7 @@ msgid "To exit, please reset the board without "
msgstr "Om te beëindigen, reset het bord zonder " msgstr "Om te beëindigen, reset het bord zonder "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Teveel kanalen in sample." msgstr "Teveel kanalen in sample."
@ -2156,10 +2214,6 @@ msgstr "UART Init Fout"
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "UART Re-init Fout" msgstr "UART Re-init Fout"
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "UART schrijf fout" msgstr "UART schrijf fout"
@ -2186,6 +2240,7 @@ msgstr "UUID waarde is geen str, int, of byte buffer"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Niet in staat buffers voor gesigneerde conversie te alloceren" msgstr "Niet in staat buffers voor gesigneerde conversie te alloceren"
@ -2498,8 +2553,8 @@ msgid "binary op %q not implemented"
msgstr "binaire op %q niet geïmplementeerd" msgstr "binaire op %q niet geïmplementeerd"
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "bits moet 7, 8, of 9 zijn" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
msgid "bits_per_sample must be 8 or 16" msgid "bits_per_sample must be 8 or 16"
@ -2728,6 +2783,10 @@ msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
"cirkel kan slechts bij één object van een hoger niveau worden geregistreerd" "cirkel kan slechts bij één object van een hoger niveau worden geregistreerd"
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3388,6 +3447,10 @@ msgstr "geheugentoewijzing mislukt, %u bytes worden toegewezen"
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "geheugentoewijzing mislukt, heap is vergrendeld" msgstr "geheugentoewijzing mislukt, heap is vergrendeld"
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "module niet gevonden" msgstr "module niet gevonden"
@ -3641,7 +3704,7 @@ msgstr "ord() verwacht een teken (char) maar vond een string van lengte %d"
msgid "out of range of source" msgid "out of range of source"
msgstr "buiten bereik van bron" msgstr "buiten bereik van bron"
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "buiten bereik van doel" msgstr "buiten bereik van doel"
@ -3730,6 +3793,7 @@ msgstr "pow() met 3 argumenten vereist integers"
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "druk bootknop in bij opstarten.\n" msgstr "druk bootknop in bij opstarten.\n"
@ -3741,6 +3805,10 @@ msgstr "druk bootknop in bij opstarten.\n"
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "druk beide knoppen in bij opstarten.\n" msgstr "druk beide knoppen in bij opstarten.\n"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3809,6 +3877,7 @@ msgstr ""
"'B' zijn" "'B' zijn"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "bemonsteringssnelheid buiten bereik" msgstr "bemonsteringssnelheid buiten bereik"
@ -3880,7 +3949,7 @@ msgstr "sos[:, 3] moeten allemaal 1 zijn"
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "sosfilt vereist itereerbare argumenten" msgstr "sosfilt vereist itereerbare argumenten"
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "bronpalet te groot" msgstr "bronpalet te groot"
@ -4165,6 +4234,11 @@ msgstr "watchdog niet geïnitialiseerd"
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "watchdog time-out moet groter zijn dan 0" msgstr "watchdog time-out moet groter zijn dan 0"
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "breedte moet groter dan nul zijn" msgstr "breedte moet groter dan nul zijn"
@ -4237,6 +4311,12 @@ msgstr "zi moet van type float zijn"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "zi moet vorm (n_section, 2) hebben" msgstr "zi moet vorm (n_section, 2) hebben"
#~ msgid "Group full"
#~ msgstr "Groep is vol"
#~ msgid "bits must be 7, 8 or 9"
#~ msgstr "bits moet 7, 8, of 9 zijn"
#~ msgid "SDA or SCL needs a pull up" #~ msgid "SDA or SCL needs a pull up"
#~ msgstr "SDA of SCL hebben een pullup nodig" #~ msgstr "SDA of SCL hebben een pullup nodig"

View File

@ -107,6 +107,7 @@ msgstr "%q musi być >= 1"
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "%q musi być krotką o długości 2" msgstr "%q musi być krotką o długości 2"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "%q poza zakresem" msgstr "%q poza zakresem"
@ -337,6 +338,7 @@ msgid "All SPI peripherals are in use"
msgstr "Wszystkie peryferia SPI w użyciu" msgstr "Wszystkie peryferia SPI w użyciu"
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "Wszystkie peryferia UART w użyciu" msgstr "Wszystkie peryferia UART w użyciu"
@ -460,6 +462,10 @@ msgstr ""
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "Zegar bitowy i wybór słowa muszą współdzielić jednostkę zegara" msgstr "Zegar bitowy i wybór słowa muszą współdzielić jednostkę zegara"
@ -501,6 +507,10 @@ msgstr "Jasność nie jest regulowana"
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "Bufor + przesunięcie za małe %d %d %d" msgstr "Bufor + przesunięcie za małe %d %d %d"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr ""
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -954,6 +964,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Nie udało się uzyskać blokady, błąd 0x%04x" msgstr "Nie udało się uzyskać blokady, błąd 0x%04x"
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "Nie udała się alokacja bufora RX" msgstr "Nie udała się alokacja bufora RX"
@ -1042,10 +1053,6 @@ msgstr ""
msgid "Group already used" msgid "Group already used"
msgstr "Grupa już używana" msgstr "Grupa już używana"
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr "Grupa pełna"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: 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/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1085,6 +1092,10 @@ msgstr ""
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "IV musi mieć długość %d bajtów" msgstr "IV musi mieć długość %d bajtów"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1101,10 +1112,23 @@ msgstr "Niewłaściwa wielkość bufora"
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "Inicjalizacja nie powiodła się z powodu braku pamięci" msgstr "Inicjalizacja nie powiodła się z powodu braku pamięci"
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "" msgstr ""
@ -1206,7 +1230,8 @@ msgstr "Zły argument"
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "Zła liczba bitów wartości" msgstr "Zła liczba bitów wartości"
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "Zła wielkość bufora" msgstr "Zła wielkość bufora"
@ -1281,10 +1306,10 @@ msgstr "Zła nóżka dla prawego kanału"
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "Złe nóżki" msgstr "Złe nóżki"
@ -1333,7 +1358,8 @@ msgstr "Zła liczba głosów"
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "Zły plik wave" msgstr "Zły plik wave"
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "Niepoprawna długość słowa/bitu" msgstr "Niepoprawna długość słowa/bitu"
@ -1461,6 +1487,7 @@ msgstr "Brak DAC"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "Nie znaleziono kanału DMA" msgstr "Nie znaleziono kanału DMA"
@ -1527,6 +1554,14 @@ msgstr ""
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "Brak sprzętowej obsługi na nóżce" msgstr "Brak sprzętowej obsługi na nóżce"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr ""
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "Nie określono klucza" msgstr "Nie określono klucza"
@ -1613,13 +1648,10 @@ msgid "Odd parity is not supported"
msgstr "Nieparzysta parzystość nie jest wspierana" msgstr "Nieparzysta parzystość nie jest wspierana"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Tylko 8 lub 16 bitów mono z " msgstr "Tylko 8 lub 16 bitów mono z "
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr ""
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "" msgstr ""
@ -1673,6 +1705,15 @@ msgstr "Brak pamięci"
msgid "Out of sockets" msgid "Out of sockets"
msgstr "" msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "Nadpróbkowanie musi być wielokrotnością 8." msgstr "Nadpróbkowanie musi być wielokrotnością 8."
@ -1691,6 +1732,14 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction." "PWM frequency not writable when variable_frequency is False on construction."
msgstr "Nie można zmienić częstotliwości PWM gdy variable_frequency=False." msgstr "Nie można zmienić częstotliwości PWM gdy variable_frequency=False."
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1728,6 +1777,10 @@ msgstr "Nóżka nie obsługuje ADC"
msgid "Pin is input only" msgid "Pin is input only"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr ""
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "Pin musi obsługiwać przerwania sprzętowe" msgstr "Pin musi obsługiwać przerwania sprzętowe"
@ -1744,6 +1797,10 @@ msgid ""
"constructor" "constructor"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr ""
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "" msgstr ""
@ -1819,7 +1876,7 @@ msgstr ""
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "" msgstr ""
@ -1856,7 +1913,7 @@ msgstr "Tylko do odczytu"
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "System plików tylko do odczytu" msgstr "System plików tylko do odczytu"
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "Obiekt tylko do odczytu" msgstr "Obiekt tylko do odczytu"
@ -2089,6 +2146,7 @@ msgid "To exit, please reset the board without "
msgstr "By wyjść, proszę zresetować płytkę bez " msgstr "By wyjść, proszę zresetować płytkę bez "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Zbyt wiele kanałów." msgstr "Zbyt wiele kanałów."
@ -2128,10 +2186,6 @@ msgstr ""
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr ""
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "Błąd zapisu UART" msgstr "Błąd zapisu UART"
@ -2158,6 +2212,7 @@ msgstr "UUID nie jest typu str, int lub bytes"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Nie udała się alokacja buforów do konwersji ze znakiem" msgstr "Nie udała się alokacja buforów do konwersji ze znakiem"
@ -2465,8 +2520,8 @@ msgid "binary op %q not implemented"
msgstr "brak dwu-argumentowego operatora %q" msgstr "brak dwu-argumentowego operatora %q"
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "bits musi być 7, 8 lub 9" msgstr ""
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
msgid "bits_per_sample must be 8 or 16" msgid "bits_per_sample must be 8 or 16"
@ -2693,6 +2748,10 @@ msgstr "argument chr() poza zakresem range(256)"
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "" msgstr ""
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr ""
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "" msgstr ""
@ -3348,6 +3407,10 @@ msgstr "alokacja pamięci nie powiodła się, alokowano %u bajtów"
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "alokacja pamięci nie powiodła się, sterta zablokowana" msgstr "alokacja pamięci nie powiodła się, sterta zablokowana"
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr ""
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "brak modułu" msgstr "brak modułu"
@ -3601,7 +3664,7 @@ msgstr "ord() oczekuje znaku, a jest łańcuch od długości %d"
msgid "out of range of source" msgid "out of range of source"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "" msgstr ""
@ -3690,6 +3753,7 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych"
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "" msgstr ""
@ -3701,6 +3765,10 @@ msgstr ""
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr ""
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "" msgstr ""
@ -3768,6 +3836,7 @@ msgstr ""
"bufor sample_source musi być bytearray lub tablicą typu 'h', 'H', 'b' lub 'B'" "bufor sample_source musi być bytearray lub tablicą typu 'h', 'H', 'b' lub 'B'"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "częstotliwość próbkowania poza zakresem" msgstr "częstotliwość próbkowania poza zakresem"
@ -3839,7 +3908,7 @@ msgstr ""
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "źródłowa paleta jest zbyt duża" msgstr "źródłowa paleta jest zbyt duża"
@ -4124,6 +4193,11 @@ msgstr ""
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "" msgstr ""
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "szerokość musi być większa niż zero" msgstr "szerokość musi być większa niż zero"
@ -4196,6 +4270,12 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "" msgstr ""
#~ msgid "Group full"
#~ msgstr "Grupa pełna"
#~ msgid "bits must be 7, 8 or 9"
#~ msgstr "bits musi być 7, 8 lub 9"
#~ msgid "SDA or SCL needs a pull up" #~ msgid "SDA or SCL needs a pull up"
#~ msgstr "SDA lub SCL wymagają podciągnięcia" #~ msgstr "SDA lub SCL wymagają podciągnięcia"

View File

@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n" "POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2021-02-12 03:20+0000\n" "PO-Revision-Date: 2021-03-09 16:55+0000\n"
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n" "Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: pt_BR\n" "Language: pt_BR\n"
@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n" "Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.5-dev\n" "X-Generator: Weblate 4.5.2-dev\n"
#: main.c #: main.c
msgid "" msgid ""
@ -111,6 +111,7 @@ msgstr "%q deve ser >= 1"
msgid "%q must be a tuple of length 2" msgid "%q must be a tuple of length 2"
msgstr "%q deve ser uma tupla de comprimento 2" msgstr "%q deve ser uma tupla de comprimento 2"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"
msgstr "%q fora do alcance" msgstr "%q fora do alcance"
@ -345,6 +346,7 @@ msgid "All SPI peripherals are in use"
msgstr "Todos os periféricos SPI estão em uso" msgstr "Todos os periféricos SPI estão em uso"
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "All UART peripherals are in use" msgid "All UART peripherals are in use"
msgstr "Todos os periféricos UART estão em uso" msgstr "Todos os periféricos UART estão em uso"
@ -470,6 +472,10 @@ msgstr "O Baudrate não é suportado pelo periférico"
msgid "Below minimum frame rate" msgid "Below minimum frame rate"
msgstr "Abaixo da taxa mínima de quadros" msgstr "Abaixo da taxa mínima de quadros"
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must be sequential pins"
msgstr "O Bit clock e o word select devem ser pinos sequenciais"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
msgstr "" msgstr ""
@ -513,6 +519,10 @@ msgstr "Brilho não ajustável"
msgid "Buffer + offset too small %d %d %d" msgid "Buffer + offset too small %d %d %d"
msgstr "O buffer + desvio é muito pequeno %d %d %d" msgstr "O buffer + desvio é muito pequeno %d %d %d"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Buffer elements must be 4 bytes long or less"
msgstr "Os elementos do buffer devem ter 4 bytes de comprimento ou menos"
#: shared-module/usb_hid/Device.c #: shared-module/usb_hid/Device.c
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -972,6 +982,7 @@ msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Houve uma falha na aquisição do mutex, err 0x%04x" msgstr "Houve uma falha na aquisição do mutex, err 0x%04x"
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer"
msgstr "Falha ao alocar buffer RX" msgstr "Falha ao alocar buffer RX"
@ -1061,10 +1072,6 @@ msgstr "Falha Genérica"
msgid "Group already used" msgid "Group already used"
msgstr "O grupo já está em uso" msgstr "O grupo já está em uso"
#: shared-module/displayio/Group.c
msgid "Group full"
msgstr "Grupo cheio"
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: 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/canio/CAN.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c
#: ports/stm/common-hal/sdioio/SDCard.c #: ports/stm/common-hal/sdioio/SDCard.c
@ -1104,6 +1111,10 @@ msgstr "IOs 0, 2 e 4 não suportam pullup interno em repouso (sleep)"
msgid "IV must be %d bytes long" msgid "IV must be %d bytes long"
msgstr "O IV deve ter %d bytes de comprimento" msgstr "O IV deve ter %d bytes de comprimento"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In-buffer elements must be <= 4 bytes long"
msgstr "Os elementos In-buffer devem ter um comprimento de <= 4 bytes"
#: py/persistentcode.c #: py/persistentcode.c
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@ -1120,10 +1131,29 @@ msgstr "O tamanho do buffer está incorreto"
msgid "Init program size invalid" msgid "Init program size invalid"
msgstr "O tamanho do programa Init é inválido" msgstr "O tamanho do programa Init é inválido"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin direction conflicts with initial out pin direction"
msgstr ""
"A direção da definição inicial do pino conflita com a direção inicial do "
"pino de saída"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Initial set pin state conflicts with initial out pin state"
msgstr ""
"A definição do estado inicial do pino está em conflito com estado do inicial "
"do pino"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory" msgid "Initialization failed due to lack of memory"
msgstr "A inicialização falhou devido à falta de memória" msgstr "A inicialização falhou devido à falta de memória"
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Input buffer length (%d) must be a multiple of the strand count (%d)"
msgstr ""
"O comprimento do buffer de entrada (%d) deve ser um múltiplo da contagem dos "
"fios (%d)"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long" msgid "Input taking too long"
msgstr "A entrada está demorando demais" msgstr "A entrada está demorando demais"
@ -1225,7 +1255,8 @@ msgstr "Argumento inválido"
msgid "Invalid bits per value" msgid "Invalid bits per value"
msgstr "Os valores por bits são inválidos" msgstr "Os valores por bits são inválidos"
#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
#: ports/stm/common-hal/busio/UART.c
msgid "Invalid buffer size" msgid "Invalid buffer size"
msgstr "O tamanho do buffer é inválido" msgstr "O tamanho do buffer é inválido"
@ -1300,10 +1331,10 @@ msgstr "Pino inválido para canal direito"
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "Pinos inválidos" msgstr "Pinos inválidos"
@ -1352,7 +1383,8 @@ msgstr "A contagem da voz é inválida"
msgid "Invalid wave file" msgid "Invalid wave file"
msgstr "Aqruivo de ondas inválido" msgstr "Aqruivo de ondas inválido"
#: ports/stm/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "Invalid word/bit length" msgid "Invalid word/bit length"
msgstr "O comprimento do bit/palavra são inválidos" msgstr "O comprimento do bit/palavra são inválidos"
@ -1479,6 +1511,7 @@ msgstr "Nenhum DAC no chip"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "No DMA channel found" msgid "No DMA channel found"
msgstr "Nenhum canal DMA foi encontrado" msgstr "Nenhum canal DMA foi encontrado"
@ -1545,6 +1578,14 @@ msgstr "Sem suporte de hardware no pino de clock"
msgid "No hardware support on pin" msgid "No hardware support on pin"
msgstr "Nenhum suporte de hardware no pino" msgstr "Nenhum suporte de hardware no pino"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in in program"
msgstr "Sem entrada no programa"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "No in or out in program"
msgstr "Sem entrada ou saída no programa"
#: shared-bindings/aesio/aes.c #: shared-bindings/aesio/aes.c
msgid "No key was specified" msgid "No key was specified"
msgstr "Nenhuma chave foi definida" msgstr "Nenhuma chave foi definida"
@ -1634,13 +1675,10 @@ msgid "Odd parity is not supported"
msgstr "A paridade ímpar não é compatível" msgstr "A paridade ímpar não é compatível"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Apenas mono com 8 ou 16 bits com " msgstr "Apenas mono com 8 ou 16 bits com "
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "Only IN/OUT of up to 8 supported"
msgstr "Somente IN/OUT de até 8 suportados"
#: ports/esp32s2/common-hal/wifi/__init__.c #: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported" msgid "Only IPv4 addresses supported"
msgstr "Somente os endereços IPv4 são suportados" msgstr "Somente os endereços IPv4 são suportados"
@ -1698,6 +1736,15 @@ msgstr "Sem memória"
msgid "Out of sockets" msgid "Out of sockets"
msgstr "Sem soquetes" msgstr "Sem soquetes"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr "Os elementos Out-buffer devem ter um comprimento de <= 4 bytes"
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
msgstr "O buffer de saída deve ter ao menos %d bytes"
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8." msgid "Oversample must be multiple of 8."
msgstr "A superamostragem deve ser um múltiplo de 8." msgstr "A superamostragem deve ser um múltiplo de 8."
@ -1720,6 +1767,14 @@ msgstr ""
"A frequência do PWM não pode ser gravada quando variable_frequency for False " "A frequência do PWM não pode ser gravada quando variable_frequency for False "
"na construção." "na construção."
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice already in use"
msgstr "A fatia do PWM já está em uso"
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "PWM slice channel A already in use"
msgstr "O canal A da fatia do PWM já está em uso"
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/raspberrypi/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c
@ -1757,6 +1812,10 @@ msgstr "O pino não tem recursos de ADC"
msgid "Pin is input only" msgid "Pin is input only"
msgstr "Apenas o pino de entrada" msgstr "Apenas o pino de entrada"
#: ports/raspberrypi/common-hal/countio/Counter.c
msgid "Pin must be on PWM Channel B"
msgstr "O pino deve estar no canal B do PWM"
#: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts" msgid "Pin must support hardware interrupts"
msgstr "O pino deve ser compatível com as interrupções do hardware" msgstr "O pino deve ser compatível com as interrupções do hardware"
@ -1776,6 +1835,10 @@ msgstr ""
"ideal. Caso isso não possa ser evitado, passe allow_inefficient=True ao " "ideal. Caso isso não possa ser evitado, passe allow_inefficient=True ao "
"construtor" "construtor"
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
msgid "Pins must be sequential"
msgstr "Os pinos devem ser sequenciais"
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Pins must share PWM slice" msgid "Pins must share PWM slice"
msgstr "Os pinos devem compartilhar a fatia do PWM" msgstr "Os pinos devem compartilhar a fatia do PWM"
@ -1860,7 +1923,7 @@ msgstr "Erro DeInit RNG"
msgid "RNG Init Error" msgid "RNG Init Error"
msgstr "Houve um erro na inicialização do RNG" msgstr "Houve um erro na inicialização do RNG"
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c
msgid "RS485 Not yet supported on this device" msgid "RS485 Not yet supported on this device"
msgstr "Ainda não há suporte para o RS485 neste dispositivo" msgstr "Ainda não há suporte para o RS485 neste dispositivo"
@ -1897,7 +1960,7 @@ msgstr "Somente leitura"
msgid "Read-only filesystem" msgid "Read-only filesystem"
msgstr "Sistema de arquivos somente leitura" msgstr "Sistema de arquivos somente leitura"
#: shared-module/displayio/Bitmap.c #: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
msgid "Read-only object" msgid "Read-only object"
msgstr "Objeto de leitura apenas" msgstr "Objeto de leitura apenas"
@ -2144,6 +2207,7 @@ msgid "To exit, please reset the board without "
msgstr "Para sair, por favor, reinicie a placa sem " msgstr "Para sair, por favor, reinicie a placa sem "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Muitos canais na amostra." msgstr "Muitos canais na amostra."
@ -2184,10 +2248,6 @@ msgstr "Houve um erro na inicialização do UART"
msgid "UART Re-init error" msgid "UART Re-init error"
msgstr "Houve um erro na reinicialização do UART" msgstr "Houve um erro na reinicialização do UART"
#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART not yet supported"
msgstr "O UART ainda não é suportado"
#: ports/stm/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c
msgid "UART write error" msgid "UART write error"
msgstr "Houve um erro na gravação UART" msgstr "Houve um erro na gravação UART"
@ -2214,6 +2274,7 @@ msgstr "O valor UUID não é um buffer str, int ou byte"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Não é possível alocar buffers para conversão assinada" msgstr "Não é possível alocar buffers para conversão assinada"
@ -2527,8 +2588,8 @@ msgid "binary op %q not implemented"
msgstr "a operação binário %q não foi implementada" msgstr "a operação binário %q não foi implementada"
#: shared-bindings/busio/UART.c #: shared-bindings/busio/UART.c
msgid "bits must be 7, 8 or 9" msgid "bits must be in range 5 to 9"
msgstr "os bits devem ser 7, 8 ou 9" msgstr "os bits devem estar na faixa entre 5 a 9"
#: shared-bindings/audiomixer/Mixer.c #: shared-bindings/audiomixer/Mixer.c
msgid "bits_per_sample must be 8 or 16" msgid "bits_per_sample must be 8 or 16"
@ -2759,6 +2820,10 @@ msgstr "o arg chr() está fora do intervalo(256)"
msgid "circle can only be registered in one parent" msgid "circle can only be registered in one parent"
msgstr "o círculo só pode ser registrado em um pai" msgstr "o círculo só pode ser registrado em um pai"
#: shared-bindings/bitmaptools/__init__.c
msgid "clip point must be (x,y) tuple"
msgstr "O ponto do clipe deve ser uma tupla (x, y)"
#: shared-bindings/msgpack/ExtType.c #: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127" msgid "code outside range 0~127"
msgstr "código fora do alcance 0~127" msgstr "código fora do alcance 0~127"
@ -3424,6 +3489,10 @@ msgstr ""
"falha na alocação de memória, a área de alocação dinâmica de variáveis " "falha na alocação de memória, a área de alocação dinâmica de variáveis "
"(heap) está bloqueada" "(heap) está bloqueada"
#: py/objarray.c
msgid "memoryview: length is not a multiple of itemsize"
msgstr "memoryview: o comprimento não é um múltiplo do tamanho dos itens"
#: py/builtinimport.c #: py/builtinimport.c
msgid "module not found" msgid "module not found"
msgstr "o módulo não foi encontrado" msgstr "o módulo não foi encontrado"
@ -3680,7 +3749,7 @@ msgstr ""
msgid "out of range of source" msgid "out of range of source"
msgstr "fora do alcance da fonte" msgstr "fora do alcance da fonte"
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "out of range of target" msgid "out of range of target"
msgstr "fora do alcance do alvo" msgstr "fora do alcance do alvo"
@ -3770,6 +3839,7 @@ msgstr "o pow() com 3 argumentos requer números inteiros"
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
msgid "pressing boot button at start up.\n" msgid "pressing boot button at start up.\n"
msgstr "pressionando o botão de boot na inicialização.\n" msgstr "pressionando o botão de boot na inicialização.\n"
@ -3781,6 +3851,10 @@ msgstr "pressionando o botão de boot na inicialização.\n"
msgid "pressing both buttons at start up.\n" msgid "pressing both buttons at start up.\n"
msgstr "pressionando ambos os botões durante a inicialização.\n" msgstr "pressionando ambos os botões durante a inicialização.\n"
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
msgid "pull masks conflict with direction masks"
msgstr "puxe as máscaras em conflito com as máscaras de direção"
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c #: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "pull_threshold must be between 1 and 32" msgid "pull_threshold must be between 1 and 32"
msgstr "O pull_threshold deve ser entre 1 e 32" msgstr "O pull_threshold deve ser entre 1 e 32"
@ -3849,6 +3923,7 @@ msgstr ""
"ou 'B'" "ou 'B'"
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
msgid "sampling rate out of range" msgid "sampling rate out of range"
msgstr "Taxa de amostragem fora do intervalo" msgstr "Taxa de amostragem fora do intervalo"
@ -3920,7 +3995,7 @@ msgstr "sos[:, 3] deve ser um em todos"
msgid "sosfilt requires iterable arguments" msgid "sosfilt requires iterable arguments"
msgstr "o sosfilt requer que os argumentos sejam iteráveis" msgstr "o sosfilt requer que os argumentos sejam iteráveis"
#: shared-bindings/displayio/Bitmap.c #: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
msgid "source palette too large" msgid "source palette too large"
msgstr "a paleta de origem é muito grande" msgstr "a paleta de origem é muito grande"
@ -4205,6 +4280,11 @@ msgstr "o watchdog não foi inicializado"
msgid "watchdog timeout must be greater than 0" msgid "watchdog timeout must be greater than 0"
msgstr "o tempo limite do watchdog deve ser maior que 0" msgstr "o tempo limite do watchdog deve ser maior que 0"
#: shared-bindings/bitops/__init__.c
#, c-format
msgid "width must be from 2 to 8 (inclusive), not %d"
msgstr "a largura deve ser entre 2 a 8 (inclusive), não %d"
#: shared-bindings/rgbmatrix/RGBMatrix.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero" msgid "width must be greater than zero"
msgstr "a largura deve ser maior que zero" msgstr "a largura deve ser maior que zero"
@ -4277,6 +4357,28 @@ msgstr "zi deve ser de um tipo float"
msgid "zi must be of shape (n_section, 2)" msgid "zi must be of shape (n_section, 2)"
msgstr "zi deve estar na forma (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)"
#~ msgid "Group full"
#~ msgstr "Grupo cheio"
#~ msgid "In buffer elements must be 4 bytes long or less"
#~ msgstr "No buffer, os elementos devem ter 4 bytes ou menos"
#~ msgid "Out buffer elements must be 4 bytes long or less"
#~ msgstr "Os elementos da saída do buffer devem ter 4 bytes ou menos"
#~ msgid "Initial set pin direcion conflicts with initial out pin direction"
#~ msgstr ""
#~ "A direção do pino inicial está em conflito com a direção inicial do pino"
#~ msgid "UART not yet supported"
#~ msgstr "O UART ainda não é suportado"
#~ msgid "bits must be 7, 8 or 9"
#~ msgstr "os bits devem ser 7, 8 ou 9"
#~ msgid "Only IN/OUT of up to 8 supported"
#~ msgstr "Somente IN/OUT de até 8 suportados"
#~ msgid "SDA or SCL needs a pull up" #~ msgid "SDA or SCL needs a pull up"
#~ msgstr "SDA ou SCL precisa de um pull up" #~ msgstr "SDA ou SCL precisa de um pull up"

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