mirror of
https://github.com/eiskasten/wc-beacon.git
synced 2026-09-08 12:25:08 -05:00
Add zero pad function
This commit is contained in:
@@ -134,4 +134,10 @@ fn key(address: &MacAddress, checksum: u16) -> [u8; 8] {
|
||||
hw_high = key[i_high];
|
||||
}
|
||||
key
|
||||
}
|
||||
|
||||
pub fn zero_pad(header: PCDHeader) -> PCDFragment {
|
||||
let mut padded_header: PCDFragment = [0; PCD_FRAGMENT_LENGTH];
|
||||
padded_header.copy_from_slice(&header);
|
||||
padded_header
|
||||
}
|
||||
Reference in New Issue
Block a user