Appendix A
70
BEM-100F series User’s Manual
outportb(INDEX_PORT,
0x55);
}
void Lock_SIO (void)
{
outportb(INDEX_PORT,
0x02);
outportb(DATA_PORT,
0x02);
}
//---------------------------------------------------------------------------
void Set_SIO_LD( int LD)
{
Unlock_SIO();
outportb(INDEX_PORT,
REG_LD);
outportb(DATA_PORT,
LD);
Lock_SIO();
}
//---------------------------------------------------------------------------
void Set_SIO_Reg( int REG, int DATA)
{
Unlock_SIO();
outportb(INDEX_PORT,
REG);
outportb(DATA_PORT,
DATA);
Lock_SIO();
}
//---------------------------------------------------------------------------
int Get_SIO_Reg(int REG)
{
int
Result;
Unlock_SIO();
outportb(INDEX_PORT,
REG);
Result = inportb(DATA_PORT);
Lock_SIO();
return
Result;
}
int main()