From 10f8db8ff0a226dd5eb904a8634880838b1c9c9e Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 25 Jun 2021 19:42:17 +0700 Subject: [PATCH] update tinyusb libary to 1.2 fix example warnings bump release to 0.24.0 --- changelog.md | 4 + cores/nRF5/tusb_config.h | 90 ------------------- libraries/Adafruit_TinyUSB_Arduino | 2 +- .../central_pairing/central_pairing.ino | 2 +- platform.txt | 2 +- tools/build_all.py | 6 +- 6 files changed, 10 insertions(+), 96 deletions(-) delete mode 100644 cores/nRF5/tusb_config.h diff --git a/changelog.md b/changelog.md index 027a8b2a..2098ee12 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Adafruit nRF52 Arduino Core Changelog +## 0.24.0 - 2021.06.25 + +- Update included TinyUSB libraries to 1.2.0 + ## 0.23.0 - 2021.06.22 - Fix CryptoCell usage issue that prevent mcu to go to sleep causing high power consumption diff --git a/cores/nRF5/tusb_config.h b/cores/nRF5/tusb_config.h deleted file mode 100644 index d568c29c..00000000 --- a/cores/nRF5/tusb_config.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2018, hathach for Adafruit - * - * 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 _TUSB_CONFIG_H_ -#define _TUSB_CONFIG_H_ - -#ifdef __cplusplus - extern "C" { -#endif - -//-------------------------------------------------------------------- -// COMMON CONFIGURATION -//-------------------------------------------------------------------- -#define CFG_TUSB_MCU OPT_MCU_NRF5X - -#ifdef USE_TINYUSB -#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE -#else -#define CFG_TUSB_RHPORT0_MODE OPT_MODE_NONE -#endif - -#define CFG_TUSB_OS OPT_OS_FREERTOS -#define CFG_TUSB_MEM_SECTION -#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4))) - -#ifndef CFG_TUSB_DEBUG -#define CFG_TUSB_DEBUG 0 -#endif - -//-------------------------------------------------------------------- -// DEVICE CONFIGURATION -//-------------------------------------------------------------------- - -#define CFG_TUD_ENDOINT0_SIZE 64 - -//------------- CLASS -------------// -#define CFG_TUD_CDC 1 -#define CFG_TUD_MSC 1 -#define CFG_TUD_HID 1 -#define CFG_TUD_MIDI 1 -#define CFG_TUD_VENDOR 1 - -// CDC FIFO size of TX and RX -#define CFG_TUD_CDC_RX_BUFSIZE 256 -#define CFG_TUD_CDC_TX_BUFSIZE 256 - -// MSC Buffer size of Device Mass storage -#define CFG_TUD_MSC_BUFSIZE 512 - -// HID buffer size Should be sufficient to hold ID (if any) + Data -#define CFG_TUD_HID_BUFSIZE 64 - -// MIDI FIFO size of TX and RX -#define CFG_TUD_MIDI_RX_BUFSIZE 128 -#define CFG_TUD_MIDI_TX_BUFSIZE 128 - -// Vendor FIFO size of TX and RX -#ifndef CFG_TUD_VENDOR_RX_BUFSIZE -#define CFG_TUD_VENDOR_RX_BUFSIZE 64 -#endif -#ifndef CFG_TUD_VENDOR_TX_BUFSIZE -#define CFG_TUD_VENDOR_TX_BUFSIZE 64 -#endif - -#ifdef __cplusplus - } -#endif - -#endif /* _TUSB_CONFIG_H_ */ diff --git a/libraries/Adafruit_TinyUSB_Arduino b/libraries/Adafruit_TinyUSB_Arduino index 39d61878..a5f8ea06 160000 --- a/libraries/Adafruit_TinyUSB_Arduino +++ b/libraries/Adafruit_TinyUSB_Arduino @@ -1 +1 @@ -Subproject commit 39d61878fa01d70d2f8aaf5d7feff11a3657bf7c +Subproject commit a5f8ea0686bbd844fb36e4a27cf6aa127f3f9711 diff --git a/libraries/Bluefruit52Lib/examples/Central/central_pairing/central_pairing.ino b/libraries/Bluefruit52Lib/examples/Central/central_pairing/central_pairing.ino index 3d77b923..2376d46a 100644 --- a/libraries/Bluefruit52Lib/examples/Central/central_pairing/central_pairing.ino +++ b/libraries/Bluefruit52Lib/examples/Central/central_pairing/central_pairing.ino @@ -267,7 +267,7 @@ bool pairing_passkey_callback(uint16_t conn_handle, uint8_t const passkey[6], bo tft->println(); // wait until either button is pressed (30 seconds timeout) - uint32_t justReleased; + uint32_t justReleased = 0; do { if ( millis() > start_time + 30000 ) break; diff --git a/platform.txt b/platform.txt index 06e45cca..3706de0f 100644 --- a/platform.txt +++ b/platform.txt @@ -17,7 +17,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA name=Adafruit nRF52 Boards -version=0.23.0 +version=0.24.0 # Compile variables # ----------------- diff --git a/tools/build_all.py b/tools/build_all.py index 1158851c..1566507d 100644 --- a/tools/build_all.py +++ b/tools/build_all.py @@ -15,8 +15,8 @@ success_count = 0 fail_count = 0 skip_count = 0 -build_format = '| {:20} | {:35} | {:18} | {:6} |' -build_separator = '-' * 83 +build_format = '| {:25} | {:35} | {:18} | {:6} |' +build_separator = '-' * 88 default_boards = [ 'cluenrf52840', 'cplaynrf52840', 'feather52832', 'feather52840', 'feather52840sense', 'itsybitsy52840' ] build_boards = [] @@ -35,7 +35,7 @@ def build_examples(variant): print('\n') print(build_separator) - print('| {:^79} |'.format('Board ' + variant)) + print('| {:^84} |'.format('Board ' + variant)) print(build_separator) print(build_format.format('Library', 'Example', '\033[39mResult\033[0m', 'Time')) print(build_separator)