Custom Embedded Solutions
WIN Enterprises, Inc MB-80510 User Manual
48
else if(strcmp(argv[1], "-hhh") == 0){
val = 0xFF;
outportb(index_port, 0x89);
data_rw8 = inportb(data_port);
data_rw8 |= val;
outportb(data_port, data_rw8);
printf("(Set GP80~87 to high)\n");
}
else if(strcmp(argv[1], "-lll") == 0){
val = 0x00;
outportb(index_port, 0x89);
data_rw8 = inportb(data_port);
data_rw8 &= val;
outportb(data_port, data_rw8);
printf("(Set GP80~87 to low)\n");
}
else if(strcmp(argv[1], "-lte") == 0){
val = 0x0F;
outportb(index_port, 0x89);
data_rw8 = inportb(data_port)&0x00;
data_rw8 |= val;
outportb(data_port, data_rw8);
printf("(Set GP80~83 to high, GP84~87 to low)\n");
}
else if(strcmp(argv[1], "-ltd") == 0){
val = 0xF0;
outportb(index_port, 0x89);
data_rw8 = inportb(data_port)&0x00;
data_rw8 |= val;
outportb(data_port, data_rw8);
printf("(Set GP80~83 to low, GP84~87 to high)\n");
}
else if(strcmp(argv[1], "-gpr") == 0){
outportb(index_port, 0x8A);
val = 0x01;
data_rw8 = inportb(data_port)&(val);