final

Dependencies:   mbed FATFileSystem

Fork of KL46Z-USBHostMSD_HelloWorld by Norimasa Okamoto

Revision:
3:4238ec88ddcf
Parent:
2:982b2bbbeda4
Child:
4:77d6450f34d7
--- a/main.cpp	Fri Jan 31 15:20:34 2014 +0000
+++ b/main.cpp	Fri Jun 13 01:57:39 2014 +0000
@@ -1,10 +1,6 @@
-// Simple USBHost MSD(USB Flash drive) for FRDM-KL46Z test program
 #include "USBHostMSD.h"
 
-DigitalOut led1(LED_GREEN);
-DigitalOut led2(LED_RED);
-#define LED_OFF 1
-#define LED_ON  0
+DigitalOut led1(LED1);
 
 int main() {
     USBHostMSD msd("usb");
@@ -13,10 +9,10 @@
     }    
     FILE* fp = fopen("/usb/test1.txt", "a");
     if (fp) {
-        fprintf(fp, "Hello from FRDM-KL46Z\n");
+        fprintf(fp, "Hello from mbed.\n");
         for(int i = 0; i < 21; i++) {
             fprintf(fp, " %d", i);
-            led2 = !led2;
+            led1 = !led1;
         }
         fprintf(fp, "\n");
         fclose(fp);
@@ -36,7 +32,7 @@
         fclose(fp);
         printf("%d bytes\n", n);
     }
-    led2 = LED_OFF;
+
     while(1) {
         led1 = !led1;
         wait_ms(200);