#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_ads1115_new(
bus: *const PamojaI2cBus,
address: u8,
settings: PamojaAds1115Settings,
out_sensor: *mut *mut PamojaAds1115,
) -> PamojaStatusExpand description
Creates an ADS1115 driver on a bus. Nothing is sent until pamoja_ads1115_init or the
first pamoja_ads1115_sample.
§Arguments
bus- the bus the part is on; the driver holds its own share.address- one of thePAMOJA_ADS1115_ADDRESS_constants, by where ADDR is tied.settings- the input, the range, and the data rate.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.