X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=firmware%2Fapps%2Fglitch%2Fglitch.c;h=0ff76f1acda64ce40c55c44837c928ca48f185d8;hb=86e371097237b30f14847f842687ac2a3b0c97bd;hp=9ddcc8c30182695a06e7202a7e34958f5e32e03c;hpb=00737f87325a8f97ce23c32f32e93b082bf5a4d2;p=goodfet diff --git a/firmware/apps/glitch/glitch.c b/firmware/apps/glitch/glitch.c index 9ddcc8c..0ff76f1 100644 --- a/firmware/apps/glitch/glitch.c +++ b/firmware/apps/glitch/glitch.c @@ -23,8 +23,8 @@ void glitchprime(){ TACTL|=TACLR; //Clear TimerA Config TACTL|= TASSEL_SMCLK | //SMCLK source, - MC_1; //Count up to CCR0 - //TAIE; //Enable Interrupt + MC_1 | //Count up to CCR0 + TAIE; //Enable Interrupt CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = glitchcount; @@ -65,29 +65,15 @@ interrupt(TIMERA0_VECTOR) Timer_A (void) { #ifdef DAC12IR //debugstr("Glitching."); - DAC12_0DAT = 0;//glitchL; + DAC12_0DAT = glitchL; + asm("nop"); + asm("nop"); + asm("nop"); + asm("nop"); asm("nop"); DAC12_0DAT = glitchH; - //DAC12_0DAT = glitchL; - /* - switch(glitchstate){ - case 0: - P1OUT|=1; - glitchstate=1; - DAC12_0DAT = glitchH; - break; - case 1: - P1OUT|=1; - glitchstate=0; - DAC12_0DAT = glitchL; - break; - default: - P1OUT&=~1; - //Do nothing. - break; - } - */ #endif + TACTL |= MC0; // Stop Timer_A; }