AAEON EPIC-CV07 User Manual

Page 105

Advertising
background image

E P I C B o a r d

E P I C - C V 0 7

Appendix A Programming the Watchdog Timer A-6

************************************************************************************
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

); 

} 

 

VOID   

SIOBitSet(byte LDN, byte Register, byte BitNum, byte Value)

{ 

 

Byte TmpValue; 

 

 

SIOEnterMBPnPMode(); 

SIOSelectLDN(byte 

LDN

); 

 

IOWriteByte(SIOIndex, Register); 

 

TmpValue = IOReadByte(SIOData); 

 

TmpValue &= ~(1 << BitNum); 

 

TmpValue |= (Value << BitNum); 

 

IOWriteByte(SIOData, TmpValue); 

 

SIOExitMBPnPMode(); 

} 

 

VOID   

SIOByteSet(byte LDN, byte Register, byte Value)

{ 

 

SIOEnterMBPnPMode(); 

SIOSelectLDN(LDN); 

 

IOWriteByte(SIOIndex, Register); 

IOWriteByte(SIOData, 

Value

); 

SIOExitMBPnPMode(); 

} 
************************************************************************************

Advertising