micro SD Card module, Normal SPI CS mode. detail : http://wizard.nestegg.jp/sd.html http://wizard.nestegg.jp/spisetting.html
Diff: main.cpp
- Revision:
- 0:e7f811d99fdb
diff -r 000000000000 -r e7f811d99fdb main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Jul 25 08:06:37 2011 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" +#include "SDFileSystem.h" + +SDFileSystem sd(p5, p6, p7, p8, "sd"); + +int main() { + printf("Hello World!\n"); + + FILE *fp = fopen("/sd/sdtest.txt", "w"); + if(fp == NULL) { + error("Could not open file for write\n"); + } + fprintf(fp, "Hello fun SD Card World!"); + fclose(fp); + + printf("Goodbye World!\n"); +}