diff --git a/README.md b/README.md index 29cbd0cc..1d4050f2 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ - [Adafruit_nRF52_Arduino](https://github.com/adafruit/Adafruit_nRF52_Arduino) - [Adafruit ArduinoCore-samd](https://github.com/adafruit/ArduinoCore-samd) **TinyUSB** must be selected in menu `Tools->USB Stack` -In addition to CDC that provided by the platform core, this library provide platform-independent MSC, HID +In addition to CDC that provided by the platform core, this library provide platform-independent for + +- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ... +- Mass Storage Class (MSC): with multiple LUNs +- Musical Instrument Digital Interface (MIDI) More document to write ... diff --git a/examples/MassStorage/msc_external_flash/msc_external_flash.ino b/examples/MassStorage/msc_external_flash/msc_external_flash.ino index e4d9186a..e90239c2 100644 --- a/examples/MassStorage/msc_external_flash/msc_external_flash.ino +++ b/examples/MassStorage/msc_external_flash/msc_external_flash.ino @@ -69,6 +69,9 @@ void setup() usb_msc.begin(); + // Init file system on the flash + fatfs.begin(&flash); + Serial.begin(115200); while ( !Serial ) delay(10); // wait for native usb @@ -76,9 +79,6 @@ void setup() Serial.print("JEDEC ID: "); Serial.println(flash.getJEDECID(), HEX); Serial.print("Flash size: "); Serial.println(flash.size()); - // Init file system on the flash - fatfs.begin(&flash); - changed = true; // to print contents initially } @@ -86,6 +86,8 @@ void loop() { if ( changed ) { + changed = false; + if ( !root.open("/") ) { Serial.println("open root failed"); @@ -114,8 +116,6 @@ void loop() root.close(); Serial.println(); - - changed = false; delay(1000); // refresh every 0.5 second } }