Dimax English Dimax French Dimax English Dimax Translations
USB-I2C/SPI/GPIO Interface Adapter - U2C-12
Reference Manual

U2C_GetI2cFreq


U2C_RESULT U2C_GetI2cFreq (
            HANDLE hDevice,
             BYTE* pFrequency
);
 

The U2C_GetI2cFreq function obtains I2C bus frequency.

Parameters:
hDevice Handle to the U2C-12 device.
pFrequency A pointer to byte to be filled with current I2C bus frequency, where:
  • 0 corresponds to I2C bus fast mode (400 kHz).
  • 1 corresponds to I2C bus standard mode (100 kHz).
  • 1+n corresponds to clock period of I2C bus equal to 10 + 2*n uS.
     
    For convenience following constants were introduced:
     
      U2C_I2C_FREQ_FAST    I2C bus fast mode (400 kHz)  
      U2C_I2C_FREQ_STD    I2C bus standard mode (100 kHz)  
      U2C_I2C_FREQ_83KHZ    83 kHz  
      U2C_I2C_FREQ_71KHZ    71 kHz  
      U2C_I2C_FREQ_62KHZ    62 kHz  
      U2C_I2C_FREQ_50KHZ    50 kHz  
      U2C_I2C_FREQ_25KHZ    25 kHz  
      U2C_I2C_FREQ_10KHZ    10 kHz  
      U2C_I2C_FREQ_5KHZ    5 kHz  
      U2C_I2C_FREQ_2KHZ    2 kHz  
Return values:
U2C_SUCCESS The I2C bus frequency value was successfully retrieved.
U2C_HARDWARE_NOT_FOUND U2C-12 device referenced by hDevice handle was not found.
            Copyright DIMAX 2002-2012