pub struct Crc<'d> { /* private fields */ }
Expand description
CRC driver.
Implementations§
Source§impl<'d> Crc<'d>
impl<'d> Crc<'d>
Sourcepub fn new(peripheral: impl Peripheral<P = CRC> + 'd, config: Config) -> Self
pub fn new(peripheral: impl Peripheral<P = CRC> + 'd, config: Config) -> Self
Instantiates the CRC32 peripheral and initializes it to default values.
Sourcepub fn feed_byte(&mut self, byte: u8) -> u32
pub fn feed_byte(&mut self, byte: u8) -> u32
Feeds a byte into the CRC peripheral. Returns the computed checksum.
Sourcepub fn feed_bytes(&mut self, bytes: &[u8]) -> u32
pub fn feed_bytes(&mut self, bytes: &[u8]) -> u32
Feeds an slice of bytes into the CRC peripheral. Returns the computed checksum.
Sourcepub fn feed_halfword(&mut self, halfword: u16) -> u32
pub fn feed_halfword(&mut self, halfword: u16) -> u32
Feeds a halfword into the CRC peripheral. Returns the computed checksum.
Sourcepub fn feed_halfwords(&mut self, halfwords: &[u16]) -> u32
pub fn feed_halfwords(&mut self, halfwords: &[u16]) -> u32
Feeds an slice of halfwords into the CRC peripheral. Returns the computed checksum.
Sourcepub fn feed_word(&mut self, word: u32) -> u32
pub fn feed_word(&mut self, word: u32) -> u32
Feeds a words into the CRC peripheral. Returns the computed checksum.
Sourcepub fn feed_words(&mut self, words: &[u32]) -> u32
pub fn feed_words(&mut self, words: &[u32]) -> u32
Feeds an slice of words into the CRC peripheral. Returns the computed checksum.
Auto Trait Implementations§
impl<'d> Freeze for Crc<'d>
impl<'d> RefUnwindSafe for Crc<'d>
impl<'d> Send for Crc<'d>
impl<'d> Sync for Crc<'d>
impl<'d> Unpin for Crc<'d>
impl<'d> !UnwindSafe for Crc<'d>
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