Eli Hughes / Mbed 2 deprecated CHAN_USB

Dependencies:   mbed

Revision:
0:2dbbafe1b1fb
diff -r 000000000000 -r 2dbbafe1b1fb main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jan 23 18:35:43 2011 +0000
@@ -0,0 +1,29 @@
+#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;
+       }
+}