Skip to main content

pamoja_hdc1080_new

Function pamoja_hdc1080_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_hdc1080_new( bus: *const PamojaI2cBus, settings: PamojaHdc1080Settings, out_sensor: *mut *mut PamojaHdc1080, ) -> PamojaStatus
Expand description

Creates an HDC1080 driver on a bus; the part has one address. Nothing is sent until pamoja_hdc1080_init or the first pamoja_hdc1080_measure.

§Arguments

  • bus - the bus the part is on; the driver holds its own share.
  • settings - the resolution of each channel.
  • out_sensor - receives the driver.

§Returns

PamojaStatus::Ok with the driver in out_sensor, or PamojaStatus::InvalidArgument for a null argument or a resolution the part does not have.

§Safety

bus must be a live handle or null, and out_sensor a writable pointer or null.