beautypg.com

ADLINK cPCI-6615 User Manual

Page 67

background image

Utilities

53

cPCI-6615

outportb(IT8783_ioPort, 0x02);

outportb(IT8783_ioPort+1, 0x02);

}

//Check chip

void Get_IT8783_ID(unsigned int &ID1, unsigned int &ID2)

{

outportb(IT8783_ioPort, 0x20);

ID1 = inportb(IT8783_ioPort+1);

outportb(IT8783_ioPort, 0x21);

ID2 = inportb(IT8783_ioPort+1);

}

//WDT and LED program

void IT8783_3_WDTRun(unsigned int count_value, unsigned

int PLEDflag) //for cPCI-3610

{

unsigned long tempCount;

unsigned int registerValue;

outportb(IT8783_ioPort, 0x07);

outportb(IT8783_ioPort+1, 0x07);// Device 7

outportb(IT8783_ioPort, 0xf8);

outportb(IT8783_ioPort+1, 0x00);// PLED mapping to

nothing, disable PLED function

if(PLEDflag == 1)

{

outportb(IT8783_ioPort, 0x2D);

registerValue = inportb(IT8783_ioPort + 1);

registerValue |= 0x01; // set Pin109 is GPIO

function GP60

outportb(IT8783_ioPort+1, registerValue);

outportb(IT8783_ioPort, 0xC5);

registerValue = inportb(IT8783_ioPort + 1);