Skip to main content

pamoja_hdc1080_sim_reporting

Function pamoja_hdc1080_sim_reporting 

Source
#[unsafe(no_mangle)]
pub extern "C" fn pamoja_hdc1080_sim_reporting( celsius: f32, relative_humidity: f32, ) -> *mut PamojaI2cPart
Expand description

Creates a simulated HDC1080 that reads what it is asked to.

§Arguments

  • celsius - the temperature it reports.
  • relative_humidity - the humidity it reports, as a percentage.

§Returns

The part, which the caller releases with crate::hal::pamoja_i2c_part_free. Its readings land within three thousandths of a degree and two thousandths of a percent.