Skip to content

Commit

Permalink
Merge pull request #15 from adafruit/develop
Browse files Browse the repository at this point in the history
clean up
  • Loading branch information
hathach committed Jul 17, 2019
2 parents aa629b9 + 129444f commit 86105ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
10 changes: 5 additions & 5 deletions examples/MassStorage/msc_external_flash/msc_external_flash.ino
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,25 @@ 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

Serial.println("Adafruit TinyUSB Mass Storage External Flash example");
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
}

void loop()
{
if ( changed )
{
changed = false;

if ( !root.open("/") )
{
Serial.println("open root failed");
Expand Down Expand Up @@ -114,8 +116,6 @@ void loop()
root.close();

Serial.println();

changed = false;
delay(1000); // refresh every 0.5 second
}
}
Expand Down

0 comments on commit 86105ee

Please sign in to comment.