![](/media/cache/profiles/Peter.jpg.50x50_q85.jpg)
Seeed Studio SD card V4.0 shield with the Freescale KL25Z platform.
Dependencies: SDFileSystem mbed
Fork of SDFileSystem_HelloWorld by
Revision 1:63277c702117, committed 2013-10-24
- Comitter:
- pampt
- Date:
- Thu Oct 24 08:59:14 2013 +0000
- Parent:
- 0:bdbd3d6fc5d5
- Commit message:
- Seeed Studio SD card V4.0 shield with Freescale KL25Z platform.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r bdbd3d6fc5d5 -r 63277c702117 main.cpp --- a/main.cpp Fri Dec 07 11:25:01 2012 +0000 +++ b/main.cpp Thu Oct 24 08:59:14 2013 +0000 @@ -1,19 +1,32 @@ #include "mbed.h" #include "SDFileSystem.h" -SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board +/* +FRDM KL25Z with Seeed SD Card Shield V4 +Connections have to be added between the SD Card Shield +digital connector pins and the SPI connector pins as follows: +Signal Digital SPI +MOSI D11 4 +MISO D12 1 +SCK D13 3 +/CS D4 +*/ + +//SDFileSystem sd(PTD2, PTD3, PTD1, PTA4, "sd"); // MOSI, MISO, SCK, CS +SDFileSystem sd(D11, D12, D13, D4, "sd"); // MOSI, MISO, SCK, CS +Serial pc(USBTX, USBRX); int main() { - printf("Hello World!\n"); + pc.printf("Hello World!\n"); mkdir("/sd/mydir", 0777); FILE *fp = fopen("/sd/mydir/sdtest.txt", "w"); if(fp == NULL) { - error("Could not open file for write\n"); + pc.printf("Could not open file for write\n"); } fprintf(fp, "Hello fun SD Card World!"); fclose(fp); - printf("Goodbye World!\n"); + pc.printf("Goodbye World!\n"); }
diff -r bdbd3d6fc5d5 -r 63277c702117 mbed.bld --- a/mbed.bld Fri Dec 07 11:25:01 2012 +0000 +++ b/mbed.bld Thu Oct 24 08:59:14 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/63cdd78b2dc1 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f \ No newline at end of file