summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGuillaume Knispel <gknispel@avencall.com>2012-11-08 18:21:20 +0100
committerGuillaume Knispel <gknispel@avencall.com>2012-11-08 18:21:20 +0100
commita873cc8c855f2e32e70f62594613f6ad7a8e6879 (patch)
treee39c9f36b5a7fc7a366ba2a78e455efde61c4192 /main.c
parent17d50c00e377b15b0d2a7dbe60a1c506a28ab82e (diff)
always blink leds to test msp430 stabilityled_blink_test
Diffstat (limited to 'main.c')
-rw-r--r--main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/main.c b/main.c
index e0bc0e1..0cb9541 100644
--- a/main.c
+++ b/main.c
@@ -249,6 +249,9 @@ static void dump_trace(void)
#endif /* TRACE_SERIAL */
+volatile u16 Timer_A_count;
+
+
int main(void)
{
u16 state, resetState;
@@ -311,6 +314,11 @@ int main(void)
}
#endif /* TRACE_SERIAL */
+ if (Timer_A_count & 128)
+ ClrBit(P2OUT, GREEN_LED_N);
+ else
+ SetBit(P2OUT, GREEN_LED_N);
+
////////////////////////////////////////////////////////////////////
switch (state) {
case WAIT_START:
@@ -454,6 +462,12 @@ __interrupt void Timer_A(void)
WDTCTL = WDTPW | WDTCNTCL | WDTSSEL | WDTIS1 | WDTIS0;
#endif /* WATCHDOG */
+ Timer_A_count++;
+ if (Timer_A_count & 256)
+ ClrBit(P2OUT, RED_LED_N);
+ else
+ SetBit(P2OUT, RED_LED_N);
+
if (!(P1IN & START_SW1_N))
SW1State++;
else