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§
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<BitReversal> for BitReversal
impl PartialEq<BitReversal> 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 ==
.