Skip to content

Commit 86105ee

Browse files
authored
Merge pull request #15 from adafruit/develop
clean up
2 parents aa629b9 + 129444f commit 86105ee

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
- [Adafruit_nRF52_Arduino](https://github.com/adafruit/Adafruit_nRF52_Arduino)
88
- [Adafruit ArduinoCore-samd](https://github.com/adafruit/ArduinoCore-samd) **TinyUSB** must be selected in menu `Tools->USB Stack`
99

10-
In addition to CDC that provided by the platform core, this library provide platform-independent MSC, HID
10+
In addition to CDC that provided by the platform core, this library provide platform-independent for
11+
12+
- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ...
13+
- Mass Storage Class (MSC): with multiple LUNs
14+
- Musical Instrument Digital Interface (MIDI)
1115

1216
More document to write ...

examples/MassStorage/msc_external_flash/msc_external_flash.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,25 @@ void setup()
6969

7070
usb_msc.begin();
7171

72+
// Init file system on the flash
73+
fatfs.begin(&flash);
74+
7275
Serial.begin(115200);
7376
while ( !Serial ) delay(10); // wait for native usb
7477

7578
Serial.println("Adafruit TinyUSB Mass Storage External Flash example");
7679
Serial.print("JEDEC ID: "); Serial.println(flash.getJEDECID(), HEX);
7780
Serial.print("Flash size: "); Serial.println(flash.size());
7881

79-
// Init file system on the flash
80-
fatfs.begin(&flash);
81-
8282
changed = true; // to print contents initially
8383
}
8484

8585
void loop()
8686
{
8787
if ( changed )
8888
{
89+
changed = false;
90+
8991
if ( !root.open("/") )
9092
{
9193
Serial.println("open root failed");
@@ -114,8 +116,6 @@ void loop()
114116
root.close();
115117

116118
Serial.println();
117-
118-
changed = false;
119119
delay(1000); // refresh every 0.5 second
120120
}
121121
}

0 commit comments

Comments
 (0)