AAEON AEC-6967 User Manual

Page 90

Advertising
background image

E m b e d d e d C o n t r o l l e r

A E C - 6 9 6 7

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);

}

Advertising