X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Flib%2Fmsp430.c;h=1684f59db6544702787a54e64076f8a7c64928c7;hp=3a71e1457b99624a6c1775483544ee6968584e1e;hb=69539bb167246135b1bde3c55dca7d19bc3c7aee;hpb=d00eecc9e776316e6ad063d2355161dbbd332c59 diff --git a/firmware/lib/msp430.c b/firmware/lib/msp430.c index 3a71e14..1684f59 100644 --- a/firmware/lib/msp430.c +++ b/firmware/lib/msp430.c @@ -13,14 +13,30 @@ #include "apps.h" #include "glitch.h" +void led_init() +{ + PLEDDIR |= PLEDPIN; +} +void led_on() +{ + PLEDOUT |= PLEDPIN; +} +void led_off() +{ + PLEDOUT&=~PLEDPIN; + +} +void led_toggle() +{ +} //! Initialize MSP430 registers and all that jazz. void msp430_init(){ WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer //LED out and on. - PLEDDIR |= PLEDPIN; - PLEDOUT &= ~PLEDPIN; + led_init(); + led_off(); /* P5.0 out and low; this is chosen for the PIC app (in which P5.0