cauqleuir madre

Dependencies:   SDFileSystem mbed TFTLCD

main.cpp

Committer:
Danton
Date:
2013-02-01
Revision:
1:d6f6ac480cf1
Parent:
0:a11b3a90c259
Child:
2:e205fa129def

File content as of revision 1:d6f6ac480cf1:

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

 
int main() {
    printf("Hello Stinky World!\c\n");   
    SDFileSystem sd(p11, p12, p13, p8, "sd"); // the pinout on the mbed Cool Components workshop board
 
    mkdir("/sd/mydir", 0777);
    
    FILE *fp = fopen("/sd/mydir/sdtest.txt", "w");
    if(fp == NULL) {
        error("Could not open file for write\c\n");
    }
    fprintf(fp, "Hello fun SD Card World!\c\n");
    fclose(fp); 
 
    printf("Goodbye World!\c\n");
}