X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=firmware%2Flib%2Fmsp430.c;h=19bca37df3aadaedc45ccaf1538fe8533a179f57;hb=e102bade71fcd70ed707339ec1481f5a12587416;hp=1684f59db6544702787a54e64076f8a7c64928c7;hpb=69539bb167246135b1bde3c55dca7d19bc3c7aee;p=goodfet diff --git a/firmware/lib/msp430.c b/firmware/lib/msp430.c index 1684f59..19bca37 100644 --- a/firmware/lib/msp430.c +++ b/firmware/lib/msp430.c @@ -17,6 +17,7 @@ void led_init() { PLEDDIR |= PLEDPIN; } + void led_on() { PLEDOUT |= PLEDPIN; @@ -24,10 +25,10 @@ void led_on() void led_off() { PLEDOUT&=~PLEDPIN; - } void led_toggle() { + PLEDOUT ^= PLEDPIN; } //! Initialize MSP430 registers and all that jazz. @@ -79,13 +80,13 @@ void msp430_init(){ #endif /** FIXME - + This part is really ugly. GSEL (P5.7) must be high to select normal voltage, but a lot of applications light to swing it low to be a nuissance. To get around this, we assume that anyone with a glitching FET will also have a DAC, then we set that DAC to a high voltage. - + At some point, each target must be sanitized to show that it doesn't clear P5OUT or P5DIR. */