add functions to convert containers directly into packet
This commit is contained in:
parent
1e442012be
commit
baa450b2f7
10 changed files with 178 additions and 20 deletions
|
|
@ -108,6 +108,9 @@ pub unsafe extern "C" fn sp_packet_free(packet: NonNull<Packet>) {
|
|||
unsafe { heap_drop(packet) }
|
||||
}
|
||||
|
||||
/// Converts u16 into [CommandCode].
|
||||
///
|
||||
/// If the provided value is not valid, false is returned and result is not changed.
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn sp_u16_to_command_code(
|
||||
code: u16,
|
||||
|
|
|
|||
Loading…
Reference in a new issue