micro SD Card module, Normal SPI CS mode. detail : http://wizard.nestegg.jp/sd.html http://wizard.nestegg.jp/spisetting.html

Dependencies:   mbed

main.cpp

Committer:
halfpitch
Date:
2011-07-25
Revision:
0:e7f811d99fdb

File content as of revision 0:e7f811d99fdb:

#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");
}