#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_bmp280_new(
bus: *const PamojaI2cBus,
address: u8,
settings: PamojaBmp280Settings,
out_sensor: *mut *mut PamojaBmp280,
) -> PamojaStatusExpand description
Creates a BMP280 driver on a bus. Nothing is sent until pamoja_bmp280_init or the first
pamoja_bmp280_measure.
§Arguments
bus- the bus the part is on; the driver holds its own share.address-crate::sensors::PAMOJA_BMP280_I2C_ADDRESS_PRIMARYwith SDO low, orcrate::sensors::PAMOJA_BMP280_I2C_ADDRESS_SECONDARYwith SDO high.settings- the oversampling and the filter.out_sensor- receives the driver.
§Returns
PamojaStatus::Ok with the driver in out_sensor, or PamojaStatus::InvalidArgument
for a null argument.
§Safety
bus must be a live handle or null, and out_sensor a writable pointer or null.