33
void F75111::InitInternalF75111()
{
//set GPIO1X to Input function
this->Write_Byte(F75111_INTERNAL_ADDR,GPIO1X_CONTROL_MODE ,0x00);
//set GPIO3X to Input function
this->Write_Byte(F75111_INTERNAL_ADDR,GPIO3X_CONTROL_MODE ,0x00);
//set GPIO2X to Output function
this->Write_Byte(F75111_INTERNAL_ADDR,GPIO2X_CONTROL_MODE ,0xFF);
//Enable WDT OUT function
this->Write_Byte(F75111_INTERNAL_ADDR,F75111_CONFIGURATION, 0x03);
}
2. Initial internal F75111
void F75111::InterDigitalOutput(BYTE byteValue)
{
BYTE byteData = 0;
byteData = (byteData & 0x01 )? byt 0x01 : byteValue;
byteData = (byteData & 0x02 )? byt 0x02 : byteValue;
byteData = (byteData & 0x04 )? byt 0x04 : byteValue;
byteData = (byteData & 0x80 )? byt 0x08 : byteValue;
byteData = (byteData & 0x40 )? byt 0x10 : byteValue;
byteData = (byteData & 0x20 )? byt 0x20 : byteValue;
byteData = (byteData & 0x10 )? byt 0x40 : byteValue;
byteData = (byteData & 0x08 )? byt 0x80 : byteValue; // get value bit by bit
// write byteData value via GPIO2X output pin
this->Write_Byte(F75111_INTERNAL_ADDR,GPIO2X_OUTPUT_DATA,byteData);
}
3. Set output value
BYTE F75111::InterDigitalInput()
{
BYTE byteGPIO1X = 0;
BYTE byteGPIO3X = 0;
BYTE byteData = 0;
// Get value from GPIO1X
this->Read_Byte(F75111_INTERNAL_ADDR,GPIO1X_INPUT_DATA,&byteGPIO1X) ;
// Get value from GPIO3X
this->Read_Byte(F75111_INTERNAL_ADDR,GPIO3X_INPUT_DATA,&byteGPIO3X) ;
4. Get Input value