CTL_STATUS_t pca9532_set_duty_cycle(PCA9532_DRIVER_t *self, int channel, float ratio);
pca9532_set_duty_cycle sets the duty ratio of channel channel of the LED driver self to ratio. channel is 0 or 1 to select between the two channels and ratio is between 0 and 1 (inclusive) to set the duty ratio.
Note that a duty ratio of 1 will turn the LED on and 0 will turn it off, and at the pins a duty ratio of 1 outputs DC low and a duty ratio of 0 outputs DC high.
pca9532_set_duty_cycle returns a standard status code.
pca9532_set_duty_cycle is thread-safe if a mutex is associated with the I2C bus bus.