SD Card test

Dependencies:   mbed

main.cpp

Committer:
dgwilson
Date:
2010-04-23
Revision:
0:cca5efd78157

File content as of revision 0:cca5efd78157:

#include "mbed.h"
#include "SDFileSystem.h"

//SDFileSystem sd(p11, p12, p13, p27, "sd");
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");
}