CTL_STATUS_t ctl_i2c_set_speed(CTL_I2C_BUS_t *self,
                               unsigned long speed);

ctl_i2c_set_speed sets the operating speed of the I2C bus self to speed hertz. If the bus does not support the requested speed, the speed closest to, but not exceeding, speed is selected.

Return Value

ctl_i2c_set_speed returns a standard status code.

Thread Safety

ctl_i2c_set_speed is thread-safe if a mutex is associated with the I2C bus self.