Skip to content

Commit 68f3982

Browse files
authored
Merge branch 'master' into msc-unit-ready
2 parents 6fa324f + 707dfe7 commit 68f3982

File tree

9 files changed

+49
-16
lines changed

9 files changed

+49
-16
lines changed

examples/Composite/mouse_external_flash/.feather_rp2040_tinyusb.test.skip

Whitespace-only changes.

examples/Composite/mouse_external_flash/mouse_external_flash.ino

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,29 @@
2323
// MSC External Flash Config
2424
//--------------------------------------------------------------------+
2525

26-
// Uncomment to run example with FRAM
27-
// #define FRAM_CS A5
28-
// #define FRAM_SPI SPI
26+
// Un-comment to run example with custom SPI SPI and SS e.g with FRAM breakout
27+
// #define CUSTOM_CS A5
28+
// #define CUSTOM_SPI SPI
2929

30-
#if defined(FRAM_CS) && defined(FRAM_SPI)
31-
Adafruit_FlashTransport_SPI flashTransport(FRAM_CS, FRAM_SPI);
30+
#if defined(CUSTOM_CS) && defined(CUSTOM_SPI)
31+
Adafruit_FlashTransport_SPI flashTransport(CUSTOM_CS, CUSTOM_SPI);
3232

3333
#elif defined(ARDUINO_ARCH_ESP32)
3434
// ESP32 use same flash device that store code.
3535
// Therefore there is no need to specify the SPI and SS
3636
Adafruit_FlashTransport_ESP32 flashTransport;
3737

38+
#elif defined(ARDUINO_ARCH_RP2040)
39+
// RP2040 use same flash device that store code.
40+
// Therefore there is no need to specify the SPI and SS
41+
// Use default (no-args) constructor to be compatible with CircuitPython partition scheme
42+
Adafruit_FlashTransport_RP2040 flashTransport;
43+
44+
// For generic usage:
45+
// Adafruit_FlashTransport_RP2040 flashTransport(start_address, size)
46+
// If start_address and size are both 0, value that match filesystem setting in
47+
// 'Tools->Flash Size' menu selection will be used
48+
3849
#else
3950
// On-board external flash (QSPI or SPI) macros should already
4051
// defined in your board variant if supported

examples/MassStorage/msc_external_flash/.feather_rp2040_tinyusb.test.skip

Whitespace-only changes.

examples/MassStorage/msc_external_flash/msc_external_flash.ino

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,29 @@
2727
#include "Adafruit_SPIFlash.h"
2828
#include "Adafruit_TinyUSB.h"
2929

30-
// Uncomment to run example with FRAM
31-
// #define FRAM_CS A5
32-
// #define FRAM_SPI SPI
30+
// Un-comment to run example with custom SPI SPI and SS e.g with FRAM breakout
31+
// #define CUSTOM_CS A5
32+
// #define CUSTOM_SPI SPI
3333

34-
#if defined(FRAM_CS) && defined(FRAM_SPI)
35-
Adafruit_FlashTransport_SPI flashTransport(FRAM_CS, FRAM_SPI);
34+
#if defined(CUSTOM_CS) && defined(CUSTOM_SPI)
35+
Adafruit_FlashTransport_SPI flashTransport(CUSTOM_CS, CUSTOM_SPI);
3636

3737
#elif defined(ARDUINO_ARCH_ESP32)
3838
// ESP32 use same flash device that store code.
3939
// Therefore there is no need to specify the SPI and SS
4040
Adafruit_FlashTransport_ESP32 flashTransport;
4141

42+
#elif defined(ARDUINO_ARCH_RP2040)
43+
// RP2040 use same flash device that store code.
44+
// Therefore there is no need to specify the SPI and SS
45+
// Use default (no-args) constructor to be compatible with CircuitPython partition scheme
46+
Adafruit_FlashTransport_RP2040 flashTransport;
47+
48+
// For generic usage:
49+
// Adafruit_FlashTransport_RP2040 flashTransport(start_address, size)
50+
// If start_address and size are both 0, value that match filesystem setting in
51+
// 'Tools->Flash Size' menu selection will be used
52+
4253
#else
4354
// On-board external flash (QSPI or SPI) macros should already
4455
// defined in your board variant if supported

examples/MassStorage/msc_external_flash_sdcard/.feather_rp2040_tinyusb.test.skip

Whitespace-only changes.

examples/MassStorage/msc_external_flash_sdcard/msc_external_flash_sdcard.ino

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,28 @@
2828
// External Flash Config
2929
//--------------------------------------------------------------------+
3030

31-
// Uncomment to run example with FRAM
32-
// #define FRAM_CS A5
33-
// #define FRAM_SPI SPI
31+
// Un-comment to run example with custom SPI SPI and SS e.g with FRAM breakout
32+
// #define CUSTOM_CS A5
33+
// #define CUSTOM_SPI SPI
3434

35-
#if defined(FRAM_CS) && defined(FRAM_SPI)
36-
Adafruit_FlashTransport_SPI flashTransport(FRAM_CS, FRAM_SPI);
35+
#if defined(CUSTOM_CS) && defined(CUSTOM_SPI)
36+
Adafruit_FlashTransport_SPI flashTransport(CUSTOM_CS, CUSTOM_SPI);
3737

3838
#elif defined(ARDUINO_ARCH_ESP32)
3939
// ESP32 use same flash device that store code.
4040
// Therefore there is no need to specify the SPI and SS
4141
Adafruit_FlashTransport_ESP32 flashTransport;
4242

43+
#elif defined(ARDUINO_ARCH_RP2040)
44+
// RP2040 use same flash device that store code.
45+
// Therefore there is no need to specify the SPI and SS
46+
// Use default (no-args) constructor to be compatible with CircuitPython partition scheme
47+
Adafruit_FlashTransport_RP2040 flashTransport;
48+
49+
// For generic usage: Adafruit_FlashTransport_RP2040(start_address, size)
50+
// If start_address and size are both 0, value that match filesystem setting in
51+
// 'Tools->Flash Size' menu selection will be used
52+
4353
#else
4454
// On-board external flash (QSPI or SPI) macros should already
4555
// defined in your board variant if supported

examples/MassStorage/msc_sdfat/.feather_rp2040_tinyusb.test.skip

Whitespace-only changes.

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit TinyUSB Library
2-
version=1.9.0
2+
version=1.9.4
33
author=Adafruit
44
maintainer=Adafruit <info@adafruit.com>
55
sentence=TinyUSB library for Arduino

src/arduino/Adafruit_USBD_CDC.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ void Adafruit_USBD_CDC::end(void) {
9494
// Reset configuration descriptor without Serial as CDC
9595
TinyUSBDevice.clearConfiguration();
9696
_instance_count = 0;
97+
_instance = INVALID_INSTANCE;
9798
}
9899

99100
uint32_t Adafruit_USBD_CDC::baud(void) {

0 commit comments

Comments
 (0)