
附录
104-1816CL2NA
- 39 -
outportb(INDEX_PORT, 0x07);
outportb(DATA_PORT, 0x07);
//GPIO1,3,4
outportb(INDEX_PORT, 0xec);
temp = inportb(DATA_PORT) | bit2 | bit3| bit1;
outportb(DATA_PORT, temp );
//GPIO2
outportb(INDEX_PORT, 0xe8);
temp = inportb(DATA_PORT);
temp = temp | bit3;
outportb(DATA_PORT, temp );
//GPIO5,6,7,8 配置为 GPO(输出)
outportb(INDEX_PORT, 0x07);
outportb(DATA_PORT, 0x07);
//GPIO5,6,7
outportb(INDEX_PORT, 0xec);
temp = inportb(DATA_PORT)& ~(bit6 | bit5| bit4)
;
outportb(DATA_PORT, temp );
//GPIO8
outportb(INDEX_PORT, 0xf0);
temp = inportb(DATA_PORT);
temp = temp & ~ bit0;
outportb(DATA_PORT, temp );
//GPIO5,6,7,8 输出低电平
outportb(INDEX_PORT, 0x07);
outportb(DATA_PORT, 0x07);
//GPIO5,6,7
outportb(INDEX_PORT, 0xed);
temp = inportb(DATA_PORT)& ~(bit6 | bit5| bit4)
;
outportb(DATA_PORT, temp );
//GPIO8