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(peri: Peri<'d, CRC0>, config: Config) -> Self

Instantiates a new CRC peripheral driver in 16-bit mode

Source

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

Instantiates a new CRC peripheral driver for the given Algorithm16.

Source

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

Instantiates a new CRC peripheral for the A algorithm.

Source

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

Instantiates a new CRC peripheral for the AugCcitt algorithm.

Source

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

Instantiates a new CRC peripheral for the Arc algorithm.

Source

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

Instantiates a new CRC peripheral for the Buypass algorithm.

Source

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

Instantiates a new CRC peripheral for the CcittFalse algorithm.

Source

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

Instantiates a new CRC peripheral for the CcittZero algorithm.

Source

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

Instantiates a new CRC peripheral for the Cdma2000 algorithm.

Source

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

Instantiates a new CRC peripheral for the Dds110 algorithm.

Source

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

Instantiates a new CRC peripheral for the DectX algorithm.

Source

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

Instantiates a new CRC peripheral for the Dnp algorithm.

Source

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

Instantiates a new CRC peripheral for the En13757 algorithm.

Source

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

Instantiates a new CRC peripheral for the Genibus algorithm.

Source

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

Instantiates a new CRC peripheral for the Kermit algorithm.

Source

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

Instantiates a new CRC peripheral for the Maxim algorithm.

Source

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

Instantiates a new CRC peripheral for the Mcrf4xx algorithm.

Source

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

Instantiates a new CRC peripheral for the Modbus algorithm.

Source

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

Instantiates a new CRC peripheral for the Riello algorithm.

Source

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

Instantiates a new CRC peripheral for the T10Dif algorithm.

Source

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

Instantiates a new CRC peripheral for the Teledisk algorithm.

Source

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

Instantiates a new CRC peripheral for the Tms37157 algorithm.

Source

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

Instantiates a new CRC peripheral for the Usb algorithm.

Source

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

Instantiates a new CRC peripheral for the X25 algorithm.

Source

pub fn new_xmodem(peri: Peri<'d, CRC0>) -> 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(peri: Peri<'d, CRC0>, config: Config) -> Self

Instantiates a new CRC peripheral driver in 32-bit mode

Source

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

Instantiates a new CRC peripheral driver for the given Algorithm32.

Source

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

Instantiates a new CRC peripheral for the Bzip2 algorithm.

Source

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

Instantiates a new CRC peripheral for the C algorithm.

Source

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

Instantiates a new CRC peripheral for the D algorithm.

Source

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

Instantiates a new CRC peripheral for the IsoHdlc algorithm.

Source

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

Instantiates a new CRC peripheral for the JamCrc algorithm.

Source

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

Instantiates a new CRC peripheral for the Mpeg2 algorithm.

Source

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

Instantiates a new CRC peripheral for the Posix algorithm.

Source

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

Instantiates a new CRC peripheral for the Q algorithm.

Source

pub fn new_xfer(peri: Peri<'d, CRC0>) -> 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>
where M: Unpin,

§

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.