summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Knispel <gknispel@avencall.com>2012-09-10 15:45:51 +0200
committerGuillaume Knispel <gknispel@avencall.com>2012-09-10 15:45:51 +0200
commit57113cebfa3e97244d2ed3d247619a5143e2b9be (patch)
tree3805ca9b9d329403274a4ad92794db08fbbb7722
parent038315436032e25c06110c3473c83d7fdffb3e9f (diff)
indentation
-rwxr-xr-xmain.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/main.c b/main.c
index 8f1dc5b..a7179be 100755
--- a/main.c
+++ b/main.c
@@ -138,32 +138,32 @@ int main(void)
state = WAIT_START;
resetState = ON_STATE;
while (1) {
-
- switch (resetState) {
- case ON_STATE:
- if (SW2State > 300) {
- resetState = RST_STATE;
- }
- break;
-
- case RST_STATE:
- ClrBit(P2REN, SYS_RESET_N);
- SetBit(P2DIR, SYS_RESET_N);
- ClrBit(P2OUT, SYS_RESET_N);
- Timer2 = 150;
- resetState = RST_WAIT;
- break;
-
- case RST_WAIT:
- if (Timer2 == 0) {
- SetBit(P2OUT, SYS_RESET_N);
- if (SW2State == 0)
- resetState = ON_STATE;
- }
- break;
- }
-
- switch (state) {
+
+ switch (resetState) { //////////////////////////////////////////////
+ case ON_STATE:
+ if (SW2State > 300) {
+ resetState = RST_STATE;
+ }
+ break;
+
+ case RST_STATE:
+ ClrBit(P2REN, SYS_RESET_N);
+ SetBit(P2DIR, SYS_RESET_N);
+ ClrBit(P2OUT, SYS_RESET_N);
+ Timer2 = 150;
+ resetState = RST_WAIT;
+ break;
+
+ case RST_WAIT:
+ if (Timer2 == 0) {
+ SetBit(P2OUT, SYS_RESET_N);
+ if (SW2State == 0)
+ resetState = ON_STATE;
+ }
+ break;
+ }
+
+ switch (state) { ///////////////////////////////////////////////////
case WAIT_START:
if (SW1State > 30)
state = WAIT_START + 1;
@@ -234,7 +234,7 @@ int main(void)
state = STATE_SYS_PWR_OK;
}
break;
-
+
case STATE_SYS_PWR_OK:
if (Timer1 == 0) {
SetBit(P3OUT, SYS_PWR_OK);
@@ -304,7 +304,7 @@ __interrupt void Timer_A(void)
if (Timer2)
Timer2--;
-
+
TAVector = TAIV;
}