Skip to main content

pamoja_can_frame_fd

Function pamoja_can_frame_fd 

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

Builds a CAN-FD 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 64 bytes or is not one of the discrete lengths CAN-FD can carry.

§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.