beautypg.com

AAEON AHP-2176 User Manual

Page 69

background image

T o u c h P a n e l P C

A H P - 2 1 7 6

Appendix A Programming the Watchdog Timer A-5

VOID WDTEnableDisable(byte LDN, byte Register, byte BitNum,
byte Value)
{

SIOBitSet(LDN, Register, BitNum, Value);

}

VOID WDTParameterSetting(){

// Watchdog Timer counter setting

SIOByteSet(TimerLDN, TimerReg, TimerVal);

// WDT counting unit setting

SIOBitSet(UnitLDN, UnitReg, UnitBit, UnitVal);

// WDT output mode setting, level / pulse

SIOBitSet(ModeLDN, ModeReg, ModeBit, ModeVal);

// Watchdog timeout output via WDTRST#

SIOBitSet(WDTRstLDN, WDTRstReg, WDTRstBit,

WDTRstVal);
}

VOID WDTClearTimeoutStatus(){
SIOBitSet(StatusLDN, StatusReg, StatusBit, 1);
}
*********************************************************************************
***
*********************************************************************************
***
VOID SIOEnterMBPnPMode(){
IOWriteByte(SIOIndex,

0x87);

IOWriteByte(SIOIndex,

0x87);

}

VOID SIOExitMBPnPMode(){
IOWriteByte(SIOIndex,

0xAA);

}

VOID SIOSelectLDN(byte LDN){

IOWriteByte(SIOIndex, 0x07);

// SIO LDN Register Offset = 0x07

IOWriteByte(SIOData,

LDN);

}