embassy-mcxa

Crates

git

Versions

mcx-a256

Flavors

Crc

Struct Crc 

Source
pub struct Crc<'d, M> { /* private fields */ }
Expand description

CRC driver.

Implementations§

Source§

impl<'d> Crc<'d, Crc16>

Source

pub fn new_crc16<T: Instance>(peri: Peri<'d, T>, config: Config) -> Self

Instantiates a new CRC peripheral driver in 16-bit mode

Source

pub fn new_algorithm16<T: Instance>( peri: Peri<'d, T>, algorithm: Algorithm16, ) -> Self

Instantiates a new CRC peripheral driver for the given Algorithm16.

Source

pub fn new_a<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the A algorithm.

Source

pub fn new_aug_ccitt<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the AugCcitt algorithm.

Source

pub fn new_arc<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Arc algorithm.

Source

pub fn new_buypass<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Buypass algorithm.

Source

pub fn new_ccitt_false<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the CcittFalse algorithm.

Source

pub fn new_ccitt_zero<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the CcittZero algorithm.

Source

pub fn new_cdma_2000<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Cdma2000 algorithm.

Source

pub fn new_dds_110<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Dds110 algorithm.

Source

pub fn new_dect_x<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the DectX algorithm.

Source

pub fn new_dnp<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Dnp algorithm.

Source

pub fn new_en13757<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the En13757 algorithm.

Source

pub fn new_genibus<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Genibus algorithm.

Source

pub fn new_kermit<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Kermit algorithm.

Source

pub fn new_maxim<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Maxim algorithm.

Source

pub fn new_mcrf4xx<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Mcrf4xx algorithm.

Source

pub fn new_modbus<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Modbus algorithm.

Source

pub fn new_riello<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Riello algorithm.

Source

pub fn new_t10_dif<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the T10Dif algorithm.

Source

pub fn new_teledisk<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Teledisk algorithm.

Source

pub fn new_tms_37157<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Tms37157 algorithm.

Source

pub fn new_usb<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Usb algorithm.

Source

pub fn new_x25<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the X25 algorithm.

Source

pub fn new_xmodem<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Xmodem algorithm.

Source

pub fn feed<W: Word>(&mut self, data: &[W])

Feeds a slice of Words into the CRC peripheral.

The input is strided efficiently into as many u32s as possible, falling back to smaller writes for the remainder.

Source

pub fn finalize(self) -> u16

Finalizes the CRC calculation and reads the resulting CRC from the hardware consuming self.

Source§

impl<'d> Crc<'d, Crc32>

Source

pub fn new_crc32<T: Instance>(peri: Peri<'d, T>, config: Config) -> Self

Instantiates a new CRC peripheral driver in 32-bit mode

Source

pub fn new_algorithm32<T: Instance>( peri: Peri<'d, T>, algorithm: Algorithm32, ) -> Self

Instantiates a new CRC peripheral driver for the given Algorithm32.

Source

pub fn new_bzip2<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Bzip2 algorithm.

Source

pub fn new_c<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the C algorithm.

Source

pub fn new_d<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the D algorithm.

Source

pub fn new_iso_hdlc<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the IsoHdlc algorithm.

Source

pub fn new_jam_crc<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the JamCrc algorithm.

Source

pub fn new_mpeg2<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Mpeg2 algorithm.

Source

pub fn new_posix<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Posix algorithm.

Source

pub fn new_q<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Q algorithm.

Source

pub fn new_xfer<T: Instance>(peri: Peri<'d, T>) -> Self

Instantiates a new CRC peripheral for the Xfer algorithm.

Source

pub fn feed<W: Word>(&mut self, data: &[W])

Feeds a slice of Words into the CRC peripheral.

The input is strided efficiently into as many u32s as possible, falling back to smaller writes for the remainder.

Source

pub fn finalize(self) -> u32

Finalizes the CRC calculation and reads the resulting CRC from the hardware consuming self.

Auto Trait Implementations§

§

impl<'d, M> Freeze for Crc<'d, M>

§

impl<'d, M> RefUnwindSafe for Crc<'d, M>
where M: RefUnwindSafe,

§

impl<'d, M> Send for Crc<'d, M>
where M: Send,

§

impl<'d, M> Sync for Crc<'d, M>
where M: Sync,

§

impl<'d, M> Unpin for Crc<'d, M>

§

impl<'d, M> !UnwindSafe for Crc<'d, M>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.