U2C_RESULT U2C_GetClockSynch (
HANDLE hDevice,
BOOL* pEnable
);
The U2C_GetClockSynch function obtains 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 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. |
| pEnable | 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 obtained. |
| 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.
|