This is a block device implementation of the USB MSD driver. It will allow you to easily change between different storage devices that implement the block device API.

Dependencies:   USBDevice USBMSD_BD max32630fthr

Fork of FTHR_USBMSD_Demo by Maxim Integrated

Files at this revision

API Documentation at this revision

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