Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: KL46Z-USBHost mbed
Revision 0:f74635c5c5f2, committed 2015-06-09
- Comitter:
- Zuni
- Date:
- Tue Jun 09 13:11:51 2015 +0000
- Commit message:
- PROJEKT_PLIK_NA_USB
Changed in this revision
diff -r 000000000000 -r f74635c5c5f2 KL46Z-USBHost.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/KL46Z-USBHost.lib Tue Jun 09 13:11:51 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/va009039/code/KL46Z-USBHost/#9827f135ccb6
diff -r 000000000000 -r f74635c5c5f2 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jun 09 13:11:51 2015 +0000 @@ -0,0 +1,76 @@ +#include "mbed.h" +#include "USBHostMSD.h" +#include "FATFileSystem.h" +#include "USBHost.h" + +DigitalOut ledR(LED1, 1); +DigitalOut ledG(LED2, 1); +DigitalOut ledB(LED3, 1); + + +int main() { +//FILE *fp; +ledR = !ledR; +USBHostMSD msd("usb"); +//int i; + +//if (!msd.connect()) { +//ledR = !ledR; +//} +if (msd.connect()) { +ledR = !ledR; +ledB = !ledB; +if (msd.open("test.txt", 0)) { +ledB = !ledB; +ledG = !ledG; +} +} +} + + + + +/* +if (!msd.connect()) { +ledR = !ledR; +} + +if (msd.connect()) { +ledB = !ledB; +fp = fopen("/usb/test.txt", "a"); +} + +if (fp==NULL){ +ledR = !ledR; +} + +if (fp!=NULL) { +fprintf(fp, "ale jaja dziala \n"); +for(i = 0; i < 21; i++) { +fprintf(fp, "%d", i); +ledB = !ledB; +wait_ms(200); +} +fprintf(fp, "\n"); +fclose(fp); +} + + +ledB = 1; +while(1) { +ledG = !ledG; +wait_ms(200); +} +} +*/ + + + + +//LED1 = LED_RED +//LED2 = LED_GREEN +//LED3 = LED_BLUE +//LED4 = LED_BLUE + +//USBTX = PTA2 +//USBRX = PTA1 \ No newline at end of file
diff -r 000000000000 -r f74635c5c5f2 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Jun 09 13:11:51 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/cbbeb26dbd92 \ No newline at end of file