Skip to main content

pamoja_tmp117_temperature_from_bytes

Function pamoja_tmp117_temperature_from_bytes 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_tmp117_temperature_from_bytes( bytes: *const u8, bytes_len: usize, out_raw: *mut i16, ) -> PamojaStatus
Expand description

Reads the two bytes a TMP117 sends for a temperature register.

§Returns

PamojaStatus::Ok on success, with *out_raw set, or PamojaStatus::InvalidArgument if the buffer is not two bytes.

§Safety

bytes must point to at least bytes_len readable bytes, and out_raw must point to a writable int16_t.