Search Code
About SDCardTest

First published 19 Nov 2009, with 4 revisions since.
Last update: 14 Dec 2009.
View history

Last change message: N/A

Import this program

SDCardTest

Published 14 Dec 2009, by   user Simon Ford   tag No tags
Embed: (wiki syntax)

« Back to documentation index

You are viewing an out of date revision of SDCardTest! View latest revision

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "SDFileSystem.h"
00003 
00004 SDFileSystem sd(p11, p12, p13, p27, "sd");
00005 
00006 int main() {
00007     printf("Hello World!\n");   
00008 
00009     FILE *fp = fopen("/sd/sdtest.txt", "w");
00010     if(fp == NULL) {
00011         error("Could not open file for write\n");
00012     }
00013     fprintf(fp, "Hello SD Card World!");
00014     fclose(fp); 
00015 
00016     printf("Goodbye World!\n");
00017 }