X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Fgoodfet.c;h=b9c500c8ca388f7482f5cd3e7046a2bec7afdaf9;hp=c7563e6f3fb4aecea0a6fc929b1c56a75cfcdec9;hb=5fc093cc2f5f92afc8dcbb9796b131badef04814;hpb=5fb0341d348e101b30794945a6c91546e25e8e7b diff --git a/firmware/goodfet.c b/firmware/goodfet.c index c7563e6..b9c500c 100644 --- a/firmware/goodfet.c +++ b/firmware/goodfet.c @@ -18,10 +18,6 @@ //! Initialize registers and all that jazz. void init() { -#ifdef DAC12IR - int i; -#endif - WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer //LED out and on. @@ -61,7 +57,7 @@ void init() #ifdef DAC12IR //glitchvoltages(0xfff,0xfff); ADC12CTL0 = REF2_5V + REFON; // Internal 2.5V ref on - for(i=0;i!=0xFFFF;i++) asm("nop"); + //for(i=0;i!=0xFFFF;i++) asm("nop"); //DO NOT UNCOMMENT, breaks GCC4 DAC12_0CTL = DAC12IR + DAC12AMP_5 + DAC12ENC; // Int ref gain 1 DAC12_0DAT = 0xFFF; //Max voltage 0xfff DAC12_1CTL = DAC12IR + DAC12AMP_5 + DAC12ENC; // Int ref gain 1 @@ -84,6 +80,10 @@ void init() //Enable Interrupts. //eint(); + +#ifdef INITPLATFORM + INITPLATFORM +#endif }