System Installation
PEB-2738I User’s Manual
3-6
return;
}
// time<255 , mode 0 =sec, 1 =min
void WDT_Enable(int time,int mode){
outp
(0x2e,0x2d);
outp (0x2f,inp(0x2f)&0xfe);//Enable WDT function
outp
(0x2e,0x07);
outp (0x2f,0x08); //entry device 8
outp
(0x2e,0xF5);
outp (0x2f,inp(0x2f)|(mode*0x08)); //bit3 0:second,1 Minute
outp
(0x2e,0xf6);
outp (0x2f,time);// Set time (sec/min)
outp
(0x2e,0xf7);
outp (0x2f,inp(0x2f)|0xc0);//enable reset time by mouse/keyboard
interrupt
}
void WDT_Disable(){
outp
(0x2e,0x2d);
outp (0x2f,inp(0x2f)|0x01);//Disable WDT function
}
//bit 0~7=GPIO 30~37, mode 0=output 1=input
void GPIO_Set_Mode(int bit,int mode){
int
tmp=1<<bit;
outp
(0x2e,0x07);
outp (0x2f,0x09);// entry device 9