summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Knispel <gknispel@avencall.com>2012-07-05 12:55:04 +0200
committerGuillaume Knispel <gknispel@avencall.com>2012-07-05 12:55:04 +0200
commit4313826dd3fbb0bc7424b7f2abcc383d3fd7688d (patch)
treeda0364cb806cf72478579648a0d25a412dbfc835
parentf7c92bb5d8ff303036696afc36c156aeaeed1868 (diff)
make 'state' local to main
This greatly decrease the binary size.
-rwxr-xr-xmain.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 6b99336..811612d 100755
--- a/main.c
+++ b/main.c
@@ -22,7 +22,6 @@
#include "main.h"
volatile U16 Timer1;
-volatile U16 state;
volatile U16 SW1State, SW2State;
#ifdef CAN_WAIT_TENSION
@@ -46,6 +45,8 @@ volatile U8 bVCC3 = true;
int main(void)
{
+ U16 state;
+
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer to prevent time out reset
__disable_interrupt();
@@ -63,7 +64,7 @@ int main(void)
break;
case WAIT_START + 1: // wait for release SW1 before real Start
if (SW1State == 0) {
- SetBit(P4OUT, CMDPWR); // Set Atx Powedr Supply
+ SetBit(P4OUT, CMDPWR); // Set Atx Power Supply
Timer1 = 2000; // set Timer1 @ 2 seconde
state = WAIT_ATX_OK;
}