Skip to main content

pamoja_opt3001_word_to_bytes

Function pamoja_opt3001_word_to_bytes 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_opt3001_word_to_bytes( word: u16, out_bytes: *mut u8, ) -> PamojaStatus
Expand description

Builds the two bytes an OPT3001 sends for a register, most significant first.

§Returns

PamojaStatus::Ok on success, with the two bytes written to out_bytes, or PamojaStatus::InvalidArgument if out_bytes is null.

§Safety

out_bytes must point to at least two writable bytes.