Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
--- 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");
--- /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
