I2CMaster_SetTimeout Function

Header: #include <applibs/i2c.h>

Sets the timeout for operations on an I2C master interface.

int I2CMaster_SetTimeout(int fd, uint32_t timeoutInMs);

Parameters

  • fd The file descriptor for the I2C interface.

  • timeoutInMs The requested timeout, in milliseconds. This value may be rounded to the nearest supported value.

Return value

Returns 0 for success, or -1 for failure, in which case errno will be set to the error value.

Application manifest requirements

To access an I2c interface, your application must identify it in the I2cMaster field of the application manifest.