58
Get Input value
BYTE F75111::InterDigitalInput()
{
BYTE byteGPIO1X = 0;
BYTE byteGPIO3X = 0;
BYTE byteData = 0;
this->Read_Byte(F75111_INTERNAL_ADDR,GPIO1X_INPUT_DATA,&byteGPIO1X) ; // Get value from GPIO1X
this->Read_Byte(F75111_INTERNAL_ADDR,GPIO3X_INPUT_DATA,&byteGPIO3X) ; // Get value from GPIO3X
byteGPIO1X = byteGPIO1X & 0xF0; // Mask unuseful value
byteGPIO3X = byteGPIO3X & 0x0F; // Mask unuseful value
byteData = ( byteGPIO1X & 0x10 )? by 0x01 : byteData;
byteData = ( byteGPIO1X & 0x80 )? by 0x02 : byteData;
byteData = ( byteGPIO1X & 0x40 )? by 0x04 : byteData;
byteData = ( byteGPIO3X & 0x01 )? by 0x08 : byteData;
byteData = ( byteGPIO3X & 0x02 )? by 0x10 : byteData;
byteData = ( byteGPIO3X & 0x04 )? by 0x20 : byteData;
byteData = ( byteGPIO3X & 0x08 )? by 0x40 : byteData;
byteData = ( byteGPIO1X & 0x20 )? by 0x80 : byteData; // Get correct DI value from GPIO1X & GPIO3X
return byteData;
}
Enable WatchDog
Disable WatchDog
void F75111_SetWDTEnable (BYTE byteTimer)
{
WriteByte(F75111_INTERNAL_ADDR,WDT_TIMER_RANGE ,byteTimer); // set WatchDog range and timer
WriteByte(F75111_INTERNAL_ADDR,WDT_CONFIGURATION,WDT_TIMEOUT_FLAG | WDT_ENABLE | WDT_PULSE | WDT_PSWIDTH_100MS);
// Enable WatchDog, Setting WatchDog con
fi
gure
}
void F75111_SetWDTDisable ()
{
WriteByte(F75111_INTERNAL_ADDR,WDT_CONFIGURATION,0x00); // Disable WatchDog
}
Summary of Contents for CI170A
Page 8: ...3 2 1 3 1 2 3 Photo 1 Insert Unplug...
Page 20: ...15 2 3 Dimension CI170A C...