System Installation
WADE-8079 User’s Manual
3-6
sleep(1);
data = inportb (EC_DATA);
return
data;
}
int main ()
{
unsigned char d2;
printf("\n\n");
printf("WADE-8079 GPIO TEST Program v1.0\n");
printf("Please short the following pins with 2.54mm-pitched jumper on
JP8\n");
printf("GPIO1 ---- GPIO2\n");
printf("GPIO3 ---- GPIO4\n");
printf("GPIO5 ---- GPIO6\n");
printf("GPIO7 ---- GPIO8\n");
printf("GND xxxx Vcc <==PWR/GND pins, DO NOT short them!\n\n");
printf("LED Test Begins...\n");
/* Set GPIO Port In/Out mode */
Write_EC (GPIO_DIR, 0x00);
sleep
(2);
printf("Write_EC mode 0x00\n");
/* Set Low or High */
Write_EC (GPIO_DATA, 0xFF);
printf("Write_EC data 0xFF\n");
sleep
(2);
/* Set GPIO Port In/Out mode */
Write_EC (GPIO_DIR, 0x00);