ISP example program.

Dependencies:   SLCD mbed USBLocalFileSystem

/media/uploads/va009039/lpc81isp-360x240.jpg

FRDM-KL46ZLPC810
UART RXDPTE23p2(P0_4)
UART TXDPTE22p8(P0_0)
nRESETD6p1(P0_5)
nISPD8p5(P0_1)
GNDGNDp7
3.3VP3V3p6

Copy binary image to the disk called LPC81ISP.
Push sw1 or sw3, start write to LPC810 flash.

Revision:
1:cccfc461c61f
Parent:
0:ad2b1fc04955
Child:
2:eafc1c6787c7
--- a/main.cpp	Sat Feb 15 10:15:42 2014 +0000
+++ b/main.cpp	Sun Feb 16 12:56:12 2014 +0000
@@ -1,3 +1,4 @@
+#ifdef TARGET_KL46Z
 #include "RamDisk.h"
 #include "Storage.h"
 #include "BaseLpcIsp.h"
@@ -42,7 +43,7 @@
     sw3.rise(swIRQ);
     
     RamDisk* ramdisk = new RamDisk;
-    USBStorage* usb = new USBStorage(ramdisk);
+    USBStorage2* usb = new USBStorage2(ramdisk);
     LocalStorage* local = NULL;
     slcd.puts("REDY");
     write_start = false;
@@ -63,6 +64,12 @@
             }    
             write_start = false;
         }
+        if (usb->readable()) {
+            lpc.putc(usb->getc());
+        }
+        if (lpc.readable()) {
+            usb->putc(lpc.getc());
+        }
         if (pc.readable()) {
             switch(pc.getc()) {
                 case 'd': ramdisk->dump(0); break;
@@ -72,3 +79,4 @@
         } 
     }
 }
+#endif