Skip to main content

pamoja_bmp280_sim_reporting

Function pamoja_bmp280_sim_reporting 

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

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

§Arguments

  • address - the address it answers to.
  • celsius - the temperature it reports.
  • hectopascals - the pressure it reports.

§Returns

The part, which the caller releases with crate::hal::pamoja_i2c_part_free. Its readings land within a hundredth of a degree and a hundredth of a hectopascal.