Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Header: #include <applibs/i2c.h>
Sets the I2C bus speed for operations on the I2C master interface.
Note
Not all speeds are supported on all Azure Sphere devices. See Using I2C for details.
int I2CMaster_SetBusSpeed(int fd, uint32_t speedInHz);
Parameters
fdThe file descriptor for the I2C interface.speedInHzThe requested bus speed, in Hz.
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.