test
Diff: main.cpp
- Revision:
- 1:68378811b1e2
- Parent:
- 0:c1253c12d4bc
--- a/main.cpp Sun Feb 21 02:45:09 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -#include "mbed.h" -#include "ff.h" - -DigitalOut myled(LED1); -Serial pc(USBTX, USBRX); - -FATFS MyFileSystem; -FIL MyFile; - -int main() -{ - unsigned int BytesWritten; - - //mount the SD card (any drive number will map to the SD card) - f_mount(0,&MyFileSystem); - //Open the file for open and write - f_open(&MyFile,"Test1.2.3.4.txt",FA_WRITE|FA_OPEN_ALWAYS); - //Write some junk - f_write(&MyFile,"Testing!\r\nTesting,1,2,3\r\n",27,&BytesWritten); - //Close the file - f_close(&MyFile); - - while(1) - { - pc.printf("all done!!\r\n"); - wait(1); - myled = !myled; - } -}