Skip to main content

pamoja_ads1115_sample

Function pamoja_ads1115_sample 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_ads1115_sample( sensor: *mut PamojaAds1115, out_sample: *mut PamojaAds1115Sample, ) -> PamojaStatus
Expand description

Runs one conversion of the configured input, initializing the part first if pamoja_ads1115_init has not run.

§Arguments

  • sensor - the driver.
  • out_sample - receives the conversion, with the range it ran at.

§Returns

As pamoja_ads1115_init, with PamojaStatus::Io also when the part never reports the conversion done.

§Safety

sensor must be a live handle or null, and out_sample a writable pointer or null.