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: SDFileSystem mbed
Revision 2:bca1012fb1a6, committed 2016-10-24
- Comitter:
- mikawataru
- Date:
- Mon Oct 24 17:04:46 2016 +0000
- Parent:
- 1:a8cfc313a2ae
- Commit message:
- Sample for MicroSD
Changed in this revision
| SDFileSystem.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/SDFileSystem.lib Tue Jun 28 17:35:17 2016 +0000 +++ b/SDFileSystem.lib Mon Oct 24 17:04:46 2016 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/mbed_official/code/SDFileSystem/#7b35d1709458 +http://mbed.org/users/neilt6/code/SDFileSystem/#e4d2567200db
--- a/main.cpp Tue Jun 28 17:35:17 2016 +0000
+++ b/main.cpp Mon Oct 24 17:04:46 2016 +0000
@@ -9,20 +9,17 @@
D11-----CMD
D12-----DAT0
D13-----CLK
-D1------CD
+D9------CD
*/
-
#include "mbed.h"
#include "SDFileSystem.h"
-
-SDFileSystem sd(D11, D12, D13, D1, "sd");//MOSI, MISO, SCLK, SSEL
-
-DigitalOut myled(LED1);
-
-int main() {
- FILE *fp = fopen("/sd/test.txt", "w");
- fprintf(fp,"HelloWorld\n");
- fclose(fp);
+
+SDFileSystem sd(D11, D12, D13, D9, "sd"); // the pinout on the mbed Cool Components workshop board
+
+int main() {
+ FILE *fp = fopen("/sd/sdtest.txt", "w");
+ fprintf(fp, "HelloWorld!");
+ fclose(fp);
free(fp);
}