Skip to main content

pamoja_can_frame_new

Function pamoja_can_frame_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_can_frame_new( id: u32, extended: bool, data: *const u8, data_len: usize, out_frame: *mut *mut PamojaCanFrame, ) -> PamojaStatus
Expand description

Builds a classic CAN 2.0 frame.

§Returns

PamojaStatus::Ok on success, with *out_frame set to a new handle the caller must release with pamoja_can_frame_free, or PamojaStatus::InvalidArgument if the data is longer than the eight bytes a classic frame carries.

§Safety

data must point to at least data_len readable bytes, or be null when data_len is 0, and out_frame must point to a writable *mut PamojaCanFrame.