diff options
| -rw-r--r-- | locale/circuitpython.pot | 22 | ||||
| -rw-r--r-- | ports/nrf/common-hal/_bleio/Connection.c | 3 | ||||
| -rw-r--r-- | ports/nrf/common-hal/_bleio/Connection.h | 1 | ||||
| -rw-r--r-- | ports/nrf/mpconfigport.h | 1 | ||||
| -rw-r--r-- | ports/nrf/sd.c | 54 | ||||
| -rw-r--r-- | ports/nrf/sd.h | 46 | ||||
| -rwxr-xr-x | tools/preprocess_frozen_modules.py | 1 |
7 files changed, 11 insertions, 117 deletions
diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 085101ff1..a60d95aa2 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-01-07 14:31-0800\n" +"POT-Creation-Date: 2020-01-13 18:15-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -513,21 +513,21 @@ msgstr "" msgid "Could not initialize UART" msgstr "" -#: shared-module/audiomp3/MP3File.c +#: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate decoder" msgstr "" #: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c -#: shared-module/audiomp3/MP3File.c +#: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate first buffer" msgstr "" -#: shared-module/audiomp3/MP3File.c +#: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate input buffer" msgstr "" #: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c -#: shared-module/audiomp3/MP3File.c +#: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate second buffer" msgstr "" @@ -620,7 +620,7 @@ msgstr "" msgid "Failed sending command." msgstr "" -#: ports/nrf/sd_mutex.c +#: ports/nrf/sd.c ports/nrf/sd_mutex.c #, c-format msgid "Failed to acquire mutex, err 0x%04x" msgstr "" @@ -643,11 +643,11 @@ msgstr "" msgid "Failed to connect: timeout" msgstr "" -#: shared-module/audiomp3/MP3File.c +#: shared-module/audiomp3/MP3Decoder.c msgid "Failed to parse MP3 file" msgstr "" -#: ports/nrf/sd_mutex.c +#: ports/nrf/sd.c ports/nrf/sd_mutex.c #, c-format msgid "Failed to release mutex, err 0x%04x" msgstr "" @@ -660,10 +660,6 @@ msgstr "" msgid "File exists" msgstr "" -#: ports/nrf/common-hal/nvm/ByteArray.c -msgid "Flash write failed" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -1776,7 +1772,7 @@ msgstr "" msgid "extra positional arguments given" msgstr "" -#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c +#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/displayio/OnDiskBitmap.c msgid "file must be a file opened in byte mode" msgstr "" diff --git a/ports/nrf/common-hal/_bleio/Connection.c b/ports/nrf/common-hal/_bleio/Connection.c index b8fa77cd3..96e8b8fbe 100644 --- a/ports/nrf/common-hal/_bleio/Connection.c +++ b/ports/nrf/common-hal/_bleio/Connection.c @@ -308,7 +308,6 @@ bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) { } else { if (bonding_load_cccd_info(self->is_central, self->conn_handle, self->ediv)) { // Did an sd_ble_gatts_sys_attr_set() with the stored sys_attr values. - // Not quite paired yet: wait for BLE_GAP_EVT_AUTH_STATUS with BLE_GAP_SEC_STATUS_SUCCESS. } else { // No matching bonding found, so use fresh system attributes. sd_ble_gatts_sys_attr_set(self->conn_handle, NULL, 0, 0); @@ -553,7 +552,7 @@ STATIC void on_desc_discovery_rsp(ble_gattc_evt_desc_disc_rsp_t *response, bleio default: // TODO: sd_ble_gattc_descriptors_discover() can return things that are not descriptors, // so ignore those. - // htts:p//devzone.nordicsemi.com/f/nordic-q-a/49500/sd_ble_gattc_descriptors_discover-is-returning-attributes-that-are-not-descriptors + // https://devzone.nordicsemi.com/f/nordic-q-a/49500/sd_ble_gattc_descriptors_discover-is-returning-attributes-that-are-not-descriptors break; } diff --git a/ports/nrf/common-hal/_bleio/Connection.h b/ports/nrf/common-hal/_bleio/Connection.h index 1f40cc644..282e0c4b5 100644 --- a/ports/nrf/common-hal/_bleio/Connection.h +++ b/ports/nrf/common-hal/_bleio/Connection.h @@ -67,6 +67,7 @@ typedef struct { ble_gap_conn_params_t conn_params; volatile bool conn_params_updating; uint16_t mtu; + // Request that CCCD values for this conenction be saved, using sys_attr values. volatile bool do_bond_cccds; // Request that security key info for this connection be saved. volatile bool do_bond_keys; diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 70b9ab63e..b6635965d 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -29,7 +29,6 @@ #define NRF5_MPCONFIGPORT_H__ #include "ble_drv.h" -#include "common-hal/_bleio/bonding.h" #include "nrf_mbr.h" // for MBR_SIZE #include "nrf_sdm.h" // for SD_FLASH_SIZE diff --git a/ports/nrf/sd.c b/ports/nrf/sd.c deleted file mode 100644 index b3162e6af..000000000 --- a/ports/nrf/sd.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2019 Dan Halbert for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include "py/mpconfig.h" -#include "py/runtime.h" -#include "nrf_soc.h" - -void sd_mutex_acquire_check(nrf_mutex_t* p_mutex) { - uint32_t err_code = sd_mutex_acquire(p_mutex); - if (err_code != NRF_SUCCESS) { - mp_raise_OSError_msg_varg(translate("Failed to acquire mutex, err 0x%04x"), err_code); - } -} - -void sd_mutex_acquire_wait(nrf_mutex_t* p_mutex) { - while (sd_mutex_acquire(p_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) { - RUN_BACKGROUND_TASKS; - } -} - -void sd_mutex_acquire_wait_no_vm(nrf_mutex_t* p_mutex) { - while (sd_mutex_acquire(p_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) { - } -} - -void sd_mutex_release_check(nrf_mutex_t* p_mutex) { - uint32_t err_code = sd_mutex_release(p_mutex); - if (err_code != NRF_SUCCESS) { - mp_raise_OSError_msg_varg(translate("Failed to release mutex, err 0x%04x"), err_code); - } -} diff --git a/ports/nrf/sd.h b/ports/nrf/sd.h deleted file mode 100644 index ca4691720..000000000 --- a/ports/nrf/sd.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2019 Dan Halbert for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_NRF_SD_MUTEX_H -#define MICROPY_INCLUDED_NRF_SD_MUTEX_H - -#include "nrf_soc.h" - -// Helpers for common usage of nrf_mutex. - -// Try to acquire a mutex right now. Raise exception if we can't get it. -void sd_mutex_acquire_check(nrf_mutex_t* p_mutex); - -// Wait for a mutex to become available. Run VM background tasks while waiting. -void sd_mutex_acquire_wait(nrf_mutex_t* p_mutex); - -// Wait for a mutex to become available.. Block VM while waiting. -void sd_mutex_acquire_wait_no_vm(nrf_mutex_t* p_mutex); - -// Release a mutex, and raise exception on error. -void sd_mutex_release_check(nrf_mutex_t* p_mutex); - -#endif // MICROPY_INCLUDED_NRF_SD_MUTEX_H diff --git a/tools/preprocess_frozen_modules.py b/tools/preprocess_frozen_modules.py index 974ccecd1..7ae20c4d6 100755 --- a/tools/preprocess_frozen_modules.py +++ b/tools/preprocess_frozen_modules.py @@ -48,7 +48,6 @@ def copy_and_process(in_dir, out_dir): output_file_path = Path(out_dir, input_file_path.relative_to(in_dir)) if file.endswith(".py"): - print(file) if not output_file_path.parent.exists(): output_file_path.parent.mkdir(parents=True) with input_file_path.open("r") as input, output_file_path.open("w") as output: |
