Enum stm32_hal2::crc::BitReversal
source · #[repr(u8)]pub enum BitReversal {
Byte = 1,
HalfWord = 2,
Word = 3,
}
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 = 1
Each input byte has its bits reversed. 0x1A2B3C4D
becomes 0x58D43CB2
.
HalfWord = 2
Bits reversed by half-word. 0x1A2B3C4D
becomes 0xD458B23C
.
Word = 3
Bits reversed by word. 0x1A2B3C4D
becomes 0xB23CD458
.
Trait Implementations§
source§impl Clone for BitReversal
impl Clone for BitReversal
source§fn clone(&self) -> BitReversal
fn clone(&self) -> BitReversal
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BitReversal
impl Debug for BitReversal
source§impl PartialEq for BitReversal
impl PartialEq for BitReversal
source§fn eq(&self, other: &BitReversal) -> bool
fn eq(&self, other: &BitReversal) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for BitReversal
impl StructuralPartialEq for BitReversal
Auto Trait Implementations§
impl Freeze for BitReversal
impl RefUnwindSafe for BitReversal
impl Send for BitReversal
impl Sync for BitReversal
impl Unpin for BitReversal
impl UnwindSafe for BitReversal
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more