Acrosser AR-ES6050FLD-W User Manual
Page 39

Revision: 1.0
outportb(IO_PORT_BASE,0x07);
outportb(IO_PORT_BASE+1,0x07);
// Set GPIO Port Active
outportb(IO_PORT_BASE,0x30);
outportb(IO_PORT_BASE+1,0x01);
// Set GPIO I/O Register to 00h
outportb(IO_PORT_BASE,0xF3);
outportb(IO_PORT_BASE+1,0x00);
// Set W83627EHF GPIO10~13 to Output, GPIO14~GPIO17 to Input
outportb(IO_PORT_BASE,0xF0);
outportb(IO_PORT_BASE+1,0xF0);
// Set W83627EHF GPIO10~13 to High
outportb(IO_PORT_BASE,0xF1);
outportb(IO_PORT_BASE+1,0x0F);
// Read W83627EHF GPIO14~17 Status, if not High error.
data=inportb(IO_PORT_BASE+1)&0xF0;
if(data!=0xF0)
result=1;
// Set W83627EHF GPIO10~13 to Low
outportb(IO_PORT_BASE,0xF1);
outportb(IO_PORT_BASE+1,0x00);
// Read W83627EHF GPIO14~17 Status, if not Low error.
data=inportb(IO_PORT_BASE+1)&0xF0;
if(data!=0x00)
result=1;
// Set W83627EHF GPIO10~13 to input, GPIO14~GPIO17 to Output
outportb(IO_PORT_BASE,0xF0);
outportb(IO_PORT_BASE+1,0x0F);
// Set W83627EHF GPIO14~17 to High
outportb(IO_PORT_BASE,0xF1);
outportb(IO_PORT_BASE+1,0xF0);
// Read W83627EHF GPIO10~13 Status, if not High error.
data=inportb(IO_PORT_BASE+1)&0x0F;
if(data!=0x0F)
result=1;
// Set W83627EHF GPIO14~17 to Low
outportb(IO_PORT_BASE,0xF1);
outportb(IO_PORT_BASE+1,0x00);
// Read W83627EHF GPIO14~17 Status, if not Low error.
data=inportb(IO_PORT_BASE+1)&0x0F;
if(data!=0x00)
result=1;
// Exit W83627EHF Config
outportb(IO_PORT_BASE,0xAA);
39