Struct embassy_stm32::crc::Crc
source · 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> 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