Struct stm32g0xx_hal::crc::Crc[][src]

pub struct Crc {}

Constrained CRC peripheral.

Implementations

impl Crc[src]

pub fn reset(&mut self)[src]

This will reset the CRC to its initial condition.

pub fn reset_with_inital_value(&mut self, initial_value: u32)[src]

This will reset the CRC to its initial condition, however with a specific initial value. This is very useful if many task are sharing the CRC peripheral, as one can read out the intermediate result, store it until the next time a task runs, and initialize with the intermediate result to continue where the task left off.

pub fn feed(&mut self, data: &[u8])[src]

Feed the CRC with data

pub fn result(&mut self) -> u32[src]

Get the result of the CRC, depending on the polynomial chosen only a certain amount of the bits are the result. This will reset the CRC peripheral after use.

pub fn peek_result(&self) -> u32[src]

Get a peed at the result of the CRC, depending on the polynomial chosen only a certain amount of the bits are the result.

Trait Implementations

impl Hasher for Crc[src]

Auto Trait Implementations

impl Send for Crc

impl Sync for Crc

impl Unpin for Crc

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.