#include "DSP2833x_Device.h" // DSP2833x Headerfile Include File #include "DSP2833x_SWPrioritizedIsrLevels.h" #include "RS485.h" #include "message.h" #include "filter_bat2.h" #include "measure.h" #include "package.h" #include "test.h" #include "kanal.h" #include "peripher.h" WORDE PRES; int isMask = 1; int isLamp = 0; int isBrit = 0; int isNumb = 1111; long cownt=0; unsigned int Light = 0xFFFF; int quaLamp = 6; void what_is() { static int numb=0; if(keyTest) { if(keyNext & !preNext) { if(!isBrit) { isBrit=1; isMask=1; isLamp=0; } else { isMask<<=1; if(++isLamp >= quaLamp) { isMask=1; isLamp=0; } } } if(isBrit) { if(keyUp && !preUp) if(Bright[isLamp]<10) Bright[isLamp]++; if(keyDown & !preDown) if(Bright[isLamp]>0) Bright[isLamp]--; } else { if(cownt) cownt--; else { cownt = BLN_FREQ/4; numb++; if(numb==10) numb=1; isNumb = numb*1111; if(!isMask) isMask = 0xFFFF; else isMask = 0; } } } else { if(isBrit) { isBrit=0; Save_params(); } } PRES = KEYS; } interrupt void cpu_timer1_isr_PULT(void) { static int count_bright=0; unsigned int light=0, i; static LONGE Diod1,Diod2; static unsigned int Cownt,cownt; int dig1,dig2; EALLOW; CpuTimer1.InterruptCount++; IER |= MINT13; // Set "global" priority EINT; EDIS; // This is needed to disable write to EALLOW protected registers GpioDataRegs.GPATOGGLE.bit.GPIO0=1; // Ready if(count_bright) count_bright --; else count_bright = 9; for(i=0; i