added further exit function, so the board restarts after reset
[pyfrprog.git] / pkernel / main.c
index ac9c20b9cfdc98eac7c531d4061d731700cde817..8852877433a882dc458d29d55851a5aea253f1d2 100644 (file)
@@ -1,7 +1,7 @@
 #include "mb91465k.h"
 #include "flash.h"
 
-#define BUFSIZE 0x10
+#define BUFSIZE 0x20
 #define cleardata() memset(data,0,BUFSIZE)
 
 static void increaseled(void)
@@ -67,7 +67,6 @@ void main(void)
        while(running) {
                cleardata();
                increaseled();
-
                switch(recvbyte()) {
                        case 0x15: //chip erase
                                Putch4(0x45);
@@ -120,13 +119,10 @@ void main(void)
                                                panic();
                                        }
                                }
+                               Putch4(0x28); //Flashing done.
                                break;
 
-                       case 0x23: //ack it
-                               Putch4(0xaa);
-                               break;
-
-                       case 0x97: /* exit and restart (let do this by the watchdog)! */
+                       case 0x97: /* exit and restart (let do this by the watchdog!) */
                                while(1) {
                                        increaseled();
                                }