From a2c8cdf4174097b1045f64c8c03673cd0b2a6ebc Mon Sep 17 00:00:00 2001 From: travisutk Date: Sun, 9 May 2010 22:30:47 +0000 Subject: [PATCH] Reformatting. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@484 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- firmware/goodfet.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/firmware/goodfet.c b/firmware/goodfet.c index 39c8753..97b40c2 100644 --- a/firmware/goodfet.c +++ b/firmware/goodfet.c @@ -124,7 +124,7 @@ int main(void) void (*reboot_function)(void) = (void *) 0xFFFE; init(); - + txstring(MONITOR,OK,"http://goodfet.sf.net/"); @@ -132,25 +132,25 @@ int main(void) while(1){ //Magic 3 app=serial_rx(); + + // If the app is the reset byte (0x80) increment and loop + if (app == RESET) { + reset_count++; - // If the app is the reset byte (0x80) increment and loop - if (app == RESET) { - reset_count++; - - if (reset_count > 4) { - // We could trigger the WDT with either: - // WDTCTL = 0; - // or - // WDTCTL = WDTPW + WDTCNTCL + WDTSSEL + 0x00; - // but instead we'll jump to our reboot function pointer - (*reboot_function)(); - } - - continue; - } else { - reset_count = 0; - } - + if (reset_count > 4) { + // We could trigger the WDT with either: + // WDTCTL = 0; + // or + // WDTCTL = WDTPW + WDTCNTCL + WDTSSEL + 0x00; + // but instead we'll jump to our reboot function pointer + (*reboot_function)(); + } + + continue; + } else { + reset_count = 0; + } + verb=serial_rx(); //len=serial_rx(); len=rxword(); -- 2.20.1