![background image](http://html1.mh-extra.com/html/icp-das-usa/7188e/7188e_hardware-user-manual_3581912051.webp)
4.3.3 Using the D/I/O 14
SetDio14Dir(int dir) /* select D/I or D/O first */
{
if(dir){
/* set to input */
outport(0xff70,inport(0xff70)&(~(1<<14)));
/* set MODE to 0 */
outport(0xff72,inport(0xff72)|(1<<14));
/* set DIR to 1 */
}
else {
/* set to output */
outport(0xff70,inport(0xff70)|(1<<14));
/* set MODE to 1 */
outport(0xff72,inport(0xff72)&(~(1<<14)));
/* set DIR to 0 */
}
}
OutDio14(int data) /* set the D/O_14 ON or OFF */
{
if(data)
/* set D/O_14 ON */
outport(0xFF74,inport(0xFF74)|(1<<14));
else
/* set D/O_14 OFF */
outport(0xFF74,inport(0xFF74)&~(1<<14));
}
GetDio4(void)
/* read the status of D/I_14 */
{
return inport(0xFF74)&0x4000;
}
7188E Series Hardware User’s Manual, 2004, v2.2, 7MH-016-22 ----- 51