Winmate IA70 User Manual page 86

Hide thumbs Also See for IA70:
Table of Contents

Advertisement

//
= 1 -> GPIO1.
ucBuf = Get_W83627EHG_Reg(0x29);
Set_W83627EHG_Reg(0x29,ucBuf|0x01);
// Bit0 = 0 -> GPIO1 is inactive.
//
Bit1 = 1 -> Activate GPIO1.
ucBuf = Get_W83627EHG_Reg(0x30);
Set_W83627EHG_Reg(0x30,ucBuf|0x01);//Activate GPIO1
Set_W83627EHG_Reg(0xF0,0x0F);//switch GPIO Input(1)/Output(0) port
Set_W83627EHG_Reg(0xF1, 0x00); //clear
ucDI = Get_W83627EHG_Reg(0xF1) & 0x0F;
ClrKbBuf();
while(1)
{
ucDO++;
Set_W83627EHG_Reg(0xF1, ((ucDO & 0x0F) << 4));
ucBuf = Get_W83627EHG_Reg(0xF1) & 0x0F;
if (ucBuf != ucDI)
{
ucDI = ucBuf;
printf("Digital I/O Input Changed. Current Data is 0x%X \n",ucDI);
}
if (kbhit())
{
getch();
break;
}
delay(500);
}
return 0;
}
//===================================== =======================
void ClrKbBuf(void)
{
while(kbhit())
{ getch(); }
IA70 Motherboard User Manual
77

Advertisement

Table of Contents
loading

Table of Contents