Skip to main content

pamoja_bmp280_init

Function pamoja_bmp280_init 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_bmp280_init( sensor: *mut PamojaBmp280, ) -> PamojaStatus
Expand description

Resets the part, checks it is a BMP280, reads its trimming coefficients, and writes the settings, leaving the part asleep.

§Arguments

  • sensor - the driver.

§Returns

PamojaStatus::Ok; PamojaStatus::InvalidArgument for a null driver; PamojaStatus::Io when the bus fails or the trimming never finishes loading; or PamojaStatus::Codec when the part at the address is not a BMP280.

§Safety

sensor must be a live handle or null.