Enum stm32_hal2::crc::BitReversal
source · [−]#[repr(u8)]
pub enum BitReversal {
Byte,
HalfWord,
Word,
}
Expand description
How to reverse the input bits.
ST refers to this as both ‘reversal’ and ‘inversion’. If a CRC calls for
‘reflection’ it most likely wants BitReversal::Byte
and output reversal
enabled.
Variants
Byte
Each input byte has its bits reversed. 0x1A2B3C4D
becomes 0x58D43CB2
.
HalfWord
Bits reversed by half-word. 0x1A2B3C4D
becomes 0xD458B23C
.
Word
Bits reversed by word. 0x1A2B3C4D
becomes 0xB23CD458
.
Trait Implementations
sourceimpl Clone for BitReversal
impl Clone for BitReversal
sourcefn clone(&self) -> BitReversal
fn clone(&self) -> BitReversal
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BitReversal
impl Debug for BitReversal
sourceimpl PartialEq<BitReversal> for BitReversal
impl PartialEq<BitReversal> for BitReversal
impl Copy for BitReversal
impl StructuralPartialEq for BitReversal
Auto Trait Implementations
impl RefUnwindSafe for BitReversal
impl Send for BitReversal
impl Sync for BitReversal
impl Unpin for BitReversal
impl UnwindSafe for BitReversal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more