Struct stm32h7xx_hal::crc::Crc [−][src]
The hardware CRC unit.
Implementations
impl Crc
[src]
pub fn set_config(&mut self, config: &Config)
[src]
Set the unit’s configuration, discarding previous state.
pub fn update(&mut self, data: &[u8])
[src]
Write data to the CRC unit. Note that CRC calculation works faster if more data is given at once.
#[must_use = "retrieving the CRC takes time, use update() if not needed"]pub fn update_and_read(&mut self, data: &[u8]) -> u32
[src]
Write data to the CRC unit, return CRC so far. This function should only be used if you need its result, as retrieving the CRC takes time.
pub fn finish(&mut self) -> u32
[src]
Read the CRC and reset DR to initial value in preparation for a new CRC. This does not reset the configuration options.
pub fn read_crc(&self) -> u32
[src]
Read the CRC without resetting the unit.
pub fn read_state(&self) -> u32
[src]
Read the state of the CRC calculation. When used as the initial value of an otherwise identical CRC config, this allows resuming calculation from the current state.
This is equivalent to read_crc()
in the case of an
algorithm that does not apply an output XOR or reverse the output bits.
pub fn set_idr(&mut self, value: u32)
[src]
Write the independent data register. The IDR can be used as temporary storage. It is not cleared on CRC hash reset.
The IDR is not involved with CRC calculation.
pub fn get_idr(&self) -> u32
[src]
Get the current value of the independent data register.
The IDR is not involved with CRC calculation.
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,