Skip to main content

pamoja_pca9685_set_channel

Function pamoja_pca9685_set_channel 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_pca9685_set_channel( driver: *mut PamojaPca9685, channel: u8, pwm: PamojaPwm, ) -> PamojaStatus
Expand description

Loads one channel’s on and off counts, initializing the part first if it has not been.

§Arguments

  • driver - the driver.
  • channel - the output, 0 to 15.
  • pwm - the four register bytes to load, as the pamoja_pwm_ functions build them.

§Returns

PamojaStatus::Ok, PamojaStatus::InvalidArgument for a channel past 15 or a null driver, or PamojaStatus::Io when the bus failed.

§Safety

driver must be a live handle or null.