X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Fgoodfet.c;h=a3f3587624c41e2690980ef61a0ed0b2ef6b76d9;hp=c7563e6f3fb4aecea0a6fc929b1c56a75cfcdec9;hb=854dba571fe62948dfb23a396be3299225fcbb05;hpb=1afd03f424ab5da0a4c172d7c48814db3660a2f0 diff --git a/firmware/goodfet.c b/firmware/goodfet.c index c7563e6..a3f3587 100644 --- a/firmware/goodfet.c +++ b/firmware/goodfet.c @@ -84,37 +84,38 @@ void init() //Enable Interrupts. //eint(); + + #ifdef INITPLATFORM + INITPLATFORM; + #endif } //! Handle a command. void handle(uint8_t const app, - uint8_t const verb, - uint32_t const len) -{ - int i; - - //debugstr("GoodFET"); - PLEDOUT&=~PLEDPIN; - - // find the app and call the handle fn - for(i = 0; i < num_apps; i++) - { - if(apps[i]->app == app) - { - // call the app's handle fn - (*(apps[i]->handle))(app, verb, len); - - // exit early - return; - } - } - - // if we get here, then the desired app is not copiled in - // this firmware - debugstr("App missing."); - debughex(app); - txdata(app, NOK, 0); + uint8_t const verb, + uint32_t const len){ + int i; + + //debugstr("GoodFET"); + PLEDOUT&=~PLEDPIN; + + // find the app and call the handle fn + for(i = 0; i < num_apps; i++){ + if(apps[i]->app == app){ + // call the app's handle fn + (*(apps[i]->handle))(app, verb, len); + + // exit early + return; + } + } + + // if we get here, then the desired app is not copiled in + // this firmware + debugstr("App missing."); + debughex(app); + txdata(app, NOK, 0); }