USB Mass Storage Device demo with SD card
Dependencies: USBDevice USBMSD_SD max32630fthr
Fork of FTHR_USBMSD_Demo by
This example implements a micro SD card reader allowing access to a card inserted into the micro SD connector through the micro USB connector using the standard USB-MSD interface so that it appears just like a USB drive to your system.
Revision 10:404433ce329d, committed 2018-02-24
- Comitter:
- switches
- Date:
- Sat Feb 24 18:20:03 2018 +0000
- Parent:
- 9:6ada4f89915c
- Commit message:
- Added SD card option for block device.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
sd-driver.lib | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6ada4f89915c -r 404433ce329d main.cpp --- a/main.cpp Sat Feb 24 18:05:12 2018 +0000 +++ b/main.cpp Sat Feb 24 18:20:03 2018 +0000 @@ -1,6 +1,7 @@ #include "mbed.h" #include "max32630fthr.h" #include "USBMSD_BD.h" +#include "SDBlockDevice.h" #include "HeapBlockDevice.h" #include "FATFileSystem.h" @@ -13,7 +14,8 @@ DigitalOut bLED(LED3); // Physical block device, can be any device that supports the BlockDevice API -HeapBlockDevice bd(512*BLOCK_SIZE, BLOCK_SIZE); +// HeapBlockDevice bd(512*BLOCK_SIZE, BLOCK_SIZE); +SDBlockDevice bd(P0_5, P0_6, P0_4, P0_7); // File system declaration FATFileSystem fs("fs");
diff -r 6ada4f89915c -r 404433ce329d sd-driver.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sd-driver.lib Sat Feb 24 18:20:03 2018 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/sd-driver/#f4ab55df7768cfcb049b522bebd30218ee729c81