Emulation of LocalFileSystem with virtual COM.
Dependents: KL46Z-lpc81isp lpcterm2
#include "USBLocalFileSystem.h" int main() { USBLocalFileSystem* usb_local = new USBLocalFileSystem(); // RamDisk(64KB) while(1) { usb_local->lock(true); usb_local->remount(); char filename[32]; if (usb_local->find(filename, sizeof(filename), "*.TXT")) { FILE* fp = fopen(filename, "r"); if (fp) { int c; while((c = fgetc(fp)) != EOF) { usb_local->putc(c); } fclose(fp); } } usb_local->lock(false); wait_ms(1000*5); } }
Sample application:
Import programKL46Z-lpc81isp
ISP example program.
Import programlpcterm2
semihost server example program
Changes
Revision | Date | Who | Commit message |
---|---|---|---|
6:528036abfb02 | 2014-06-21 | va009039 | add LPC11U68 |
5:7e478063c6ee | 2014-06-21 | va009039 |
update USBDevice. |
4:8f6857784854 | 2014-05-08 | va009039 |
remove disk access callback. add virtual com sendBreak callback. |
3:09b562c87f89 | 2014-05-06 | va009039 |
merge |
2:97c314eae8b8 | 2014-05-06 | va009039 |
add USB MSD block operation. |
1:00c9eb8af5c2 | 2014-05-04 | va009039 | add virtual com interface. |
0:39eb4d5b97df | 2014-05-03 | va009039 | first commit |