Skip to main content

pamoja_serial_slip_encode

Function pamoja_serial_slip_encode 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_serial_slip_encode( payload: *const u8, payload_len: usize, out_buffer: *mut *mut PamojaBuffer, ) -> PamojaStatus
Expand description

Frames a payload as a SLIP packet (RFC 1055).

§Returns

PamojaStatus::Ok on success, with *out_buffer set to a new buffer handle the caller must release with pamoja_buffer_free.

§Safety

payload must point to at least payload_len readable bytes, or be null when payload_len is 0, and out_buffer must point to a writable *mut PamojaBuffer.