SD Card test

Dependencies:   mbed

Committer:
dgwilson
Date:
Fri Apr 23 08:29:01 2010 +0000
Revision:
0:cca5efd78157

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dgwilson 0:cca5efd78157 1 #include "mbed.h"
dgwilson 0:cca5efd78157 2 #include "SDFileSystem.h"
dgwilson 0:cca5efd78157 3
dgwilson 0:cca5efd78157 4 //SDFileSystem sd(p11, p12, p13, p27, "sd");
dgwilson 0:cca5efd78157 5 SDFileSystem sd(p5, p6, p7, p8, "sd");
dgwilson 0:cca5efd78157 6
dgwilson 0:cca5efd78157 7 int main() {
dgwilson 0:cca5efd78157 8 printf("Hello World!\n");
dgwilson 0:cca5efd78157 9
dgwilson 0:cca5efd78157 10 FILE *fp = fopen("/sd/sdtest.txt", "w");
dgwilson 0:cca5efd78157 11 if(fp == NULL) {
dgwilson 0:cca5efd78157 12 error("Could not open file for write\n");
dgwilson 0:cca5efd78157 13 }
dgwilson 0:cca5efd78157 14 fprintf(fp, "Hello fun SD Card World!");
dgwilson 0:cca5efd78157 15 fclose(fp);
dgwilson 0:cca5efd78157 16
dgwilson 0:cca5efd78157 17 printf("Goodbye World!\n");
dgwilson 0:cca5efd78157 18 }