Вы здесь

U2C_GetClockSynch()

U2C_RESULT U2C_SetClockSynch(
      HANDLE hDevice,
      BOOL* pEnable
);

The U2C_GetClockSynch() function retrieves I2C bus clock synchronization settings.

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 the 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.

[Warning]Warning
I 2 C bus clock synchronization (clock stretching) is implemented for I 2 C bus frequencies up to 100kHz. See U2C_SetI2cFreq() to learn how to change I 2 C bus frequency.

Parameters:

hDevice

Handle to the U2C-12 device.

pEnable

Clock synchronization (clock stretching) enable/disable value:

  • 1 corresponds to I 2 C bus clock synchronization enabled.
  • 0 corresponds to I 2 C bus clock synchronization disabled.

Return values:

U2C_SUCCESS

The I2C bus clock synchronization value was successfully retrieved.

U2C_HARDWARE_NOT_FOUND

U2C-12 device referenced by hDevice handle was not found.

Rating: 
Голосов пока нет

Языки

Вход на сайт