claxon::subframe

Function extend_sign_u32

Source
pub fn extend_sign_u32(val: u32, bits: u32) -> i32
Expand description

Given a signed two’s complement integer in the bits least significant bits of val, extends the sign bit to a valid 32-bit signed integer.