X-Git-Url: http://git.rot13.org//?a=blobdiff_plain;f=firmware%2Fapps%2Fglitch%2Fglitch.c;h=83fa9d6e3246845ea11039d99817343f0df3c0b7;hb=cb0b62cea38146c2414ccf215626daa8acf9aca5;hp=40e81221f4d1e10bebdb7ede8c2b46e1626f4708;hpb=22d33207598bc14459856cb7fbb084121ff377dc;p=goodfet diff --git a/firmware/apps/glitch/glitch.c b/firmware/apps/glitch/glitch.c index 40e8122..83fa9d6 100644 --- a/firmware/apps/glitch/glitch.c +++ b/firmware/apps/glitch/glitch.c @@ -11,6 +11,8 @@ #include "command.h" #include "glitch.h" +#include + //! Handles a monitor command. void glitch_handle_fn( uint8_t const app, uint8_t const verb, @@ -41,7 +43,8 @@ void glitchprime(){ WDTCTL = WDTPW + WDTHOLD; // Stop WDT glitchsetup(); - _EINT(); + //_EINT(); + __eint(); return; #endif } @@ -69,7 +72,7 @@ void glitchsetup(){ } // Timer A0 interrupt service routine -interrupt(TIMERA0_VECTOR) Timer_A (void){ +void __attribute__((interrupt(TIMERA0_VECTOR))) Timer_A (void){ //This oughtn't be necessary, but glitches repeat without it. TACTL=0; //disable counter. @@ -148,11 +151,11 @@ void glitch_handle_fn( uint8_t const app, break; case GLITCHTIME: debugstr("Measuring start time."); - _DINT();//disable interrupts + __dint();//disable interrupts TACTL=0; //clear dividers TACTL|=TACLR; //clear config TACTL|= - TASSEL_SMCLK //smclk source + TASSEL_2 //smclk source | MC_2; //continuous mode. //perform the function