APPENDIX IB940 User’s Manual 63
unsigned char result;
Set_W627HF_LD(0x07); //switch to logic device 7
Set_W627HF_Reg(0xF0, Mask); //set the DIO direction
result = Get_W627HF_Reg(0xF1) & Mask;
return (result);
}
//---------------------------------------------------------------------------
void SetDo(unsigned char NewData, unsigned char Mask)
{
Set_W627HF_LD(0x07); //switch to logic device 7
Set_W627HF_Reg(0xF0, ~Mask); //set the DIO direction
Set_W627HF_Reg(0xF1, NewData & Mask);
}
//---------------------------------------------------------------------------
void ClrKbBuf(void)
{
while(kbhit())
{ getch(); }
}
//---------------------------------------------------------------------------