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

U2C_SetClockSynch


U2C_RESULT U2C_SetClockSynch (
            HANDLE hDevice,
             BOOL Enable
);
 

The U2C_SetClockSynch function enables I2C bus clock synchronization.

Clock synchronization (clock stretching) is used in situations where an I2C slave is not able to co-operate with the clock speed provided by the U2C-12 I2C master and needs to slow down an I2C bus. I2C slave holds down the SCL line low and in this way signals the I2C master about a wait state. If I2C bus clock synchronization is enabled, U2C-12 device will wait until I2C slave device releases the SCL line.

Parameters:
hDevice Handle to the U2C-12 device.
Enable Clock synchronization (clock streching) enable/disable value:
  • 1 corresponds to I2C bus clock synchronization enabled.
  • 0 corresponds to I2C bus clock synchronization disabled.
Return values:
U2C_SUCCESS The I2C bus clock synchronization value was successfully set.
U2C_HARDWARE_NOT_FOUND U2C-12 device referenced by hDevice handle was not found.
Warning:
I2C bus clock synchronization (clock stretching) is implemented for I2C bus frequences up to 100kHz. See U2C_SetI2cFreq() to learn how to change I2C bus frequency.
            Copyright DIMAX 2002-2012