X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Fgoodfet.c;h=4cddc1976e05877388845dd529016f2b5626c530;hp=bf63b1384a5add69f1ef5bd3e5ea3b165f281d81;hb=f4a6b415e762bcdc560f3ea655851d16f483ea5a;hpb=ce0bba3cfbf4844bdce1f6984af24d1f78c347f1 diff --git a/firmware/goodfet.c b/firmware/goodfet.c index bf63b13..4cddc19 100644 --- a/firmware/goodfet.c +++ b/firmware/goodfet.c @@ -1,5 +1,6 @@ /*! \file goodfet.c \author Travis Goodspeed + \brief Main module. This is the main module of the GoodFET, which calls the initialization routines and delegates commands to the various applications. @@ -34,7 +35,8 @@ void init(){ //! Handle a command. void handle(unsigned char app, unsigned char verb, - unsigned char len){ + unsigned long len){ + //debugstr("GoodFET"); switch(app){ case MONITOR: monitorhandle(app,verb,len); @@ -68,7 +70,8 @@ void handle(unsigned char app, int main(void) { volatile unsigned int i; - unsigned char app, verb, len; + unsigned char app, verb; + unsigned long len; init(); @@ -79,13 +82,23 @@ int main(void) //Magic 3 app=serial_rx(); verb=serial_rx(); - len=serial_rx(); + //len=serial_rx(); + len=rxword(); - //Read data, if any - for(i=0;i