Simple USBHost MSD(USB flash drive) for Nucleo F401RE/FRDM-KL46Z test program
Dependencies: F401RE-USBHost mbed
Fork of KL46Z-USBHostMSD_HelloWorld by
Nucleo F401REFRDM-KL46ZでUSBフラッシュメモリ(USB flash drive)を読み書きするテストプログラムです。
Revision 3:4238ec88ddcf, committed 2014-06-13
- Comitter:
- va009039
- Date:
- Fri Jun 13 01:57:39 2014 +0000
- Parent:
- 2:982b2bbbeda4
- Commit message:
- first commit
Changed in this revision
diff -r 982b2bbbeda4 -r 4238ec88ddcf F401RE-USBHost.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/F401RE-USBHost.lib Fri Jun 13 01:57:39 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/va009039/code/F401RE-USBHost/#d14c06cc5c07
diff -r 982b2bbbeda4 -r 4238ec88ddcf KL46Z-USBHost.lib --- a/KL46Z-USBHost.lib Fri Jan 31 15:20:34 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://mbed.org/users/va009039/code/KL46Z-USBHost/#6463cd1964c0
diff -r 982b2bbbeda4 -r 4238ec88ddcf main.cpp --- 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);
diff -r 982b2bbbeda4 -r 4238ec88ddcf mbed.bld --- a/mbed.bld Fri Jan 31 15:20:34 2014 +0000 +++ b/mbed.bld Fri Jun 13 01:57:39 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file