Skip to main content

pamoja_pca9685_channel

Function pamoja_pca9685_channel 

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

Reads one channel’s counts back from the part, one register a transfer, so the read works whatever MODE1 holds and changes nothing on the part.

§Arguments

  • driver - the driver.
  • channel - the output, 0 to 15.
  • out_pwm - receives the four register bytes the channel holds.

§Returns

As pamoja_pca9685_set_channel, and PamojaStatus::InvalidArgument for a null out_pwm.

§Safety

driver must be a live handle or null, and out_pwm a writable pointer or null.