IBASE MB899X User Manual
Page 65
APPENDIX
MB899X User’s Manual
61
}
//=======================================================================
void Unlock_W627HF (void)
{
outportb(W627HF_INDEX_PORT,
W627HF_UNLOCK);
outportb(W627HF_INDEX_PORT,
W627HF_UNLOCK);
}
//=======================================================================
void Lock_W627HF (void)
{
outportb(W627HF_INDEX_PORT,
W627HF_LOCK);
}
//=======================================================================
void Set_W627HF_LD( unsigned char LD)
{
Unlock_W627HF();
outportb(W627HF_INDEX_PORT,
W627HF_REG_LD);
outportb(W627HF_DATA_PORT,
LD);
Lock_W627HF();
}
//=======================================================================
void Set_W627HF_Reg( unsigned char REG, unsigned char DATA)
{
Unlock_W627HF();
outportb(W627HF_INDEX_PORT,
REG);
outportb(W627HF_DATA_PORT,
DATA);
Lock_W627HF();
}
//=======================================================================
unsigned char Get_W627HF_Reg(unsigned char REG)
{
unsigned char Result;
Unlock_W627HF();
outportb(W627HF_INDEX_PORT,
REG);
Result = inportb(W627HF_DATA_PORT);
Lock_W627HF();
return
Result;
}
//=======================================================================