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
Files at revision 6:528036abfb02
Name | Size | Actions |
---|---|---|
[up] | ||
ChaN | ||
FATDirHandle.cpp | 2424 | Revisions Annotate |
FATDirHandle.h | 1631 | Revisions Annotate |
FATFileHandle.cpp | 2727 | Revisions Annotate |
FATFileHandle.h | 1692 | Revisions Annotate |
FATFileSystem.cpp | 4155 | Revisions Annotate |
FATFileSystem.h | 2278 | Revisions Annotate |