Struct stm32_hal2::crc::Config[][src]

pub struct Config { /* fields omitted */ }
Expand description

CRC unit configuration.

Implementations

Creates the Config struct with the default configuration of the STM32H7 CRC unit:

  • 0x04C1_1DB7 polynomial
  • 0xFFFF_FFFF initial value
  • Bits not reflected
  • 0 output XOR

This configuration is the MPEG-2 CRC.

Set the polynomial.

Set the initial value of the CRC. The CRC unit will only use the needed bits to match the polynomial; the default initial value 0xFFFF_FFFF will actually write 0x7F in the case of a 7-bit CRC, for example.

Set how to reverse the bits of the input. None means no reversal.

Set whether to reverse the bits of the output.

Set whether to reflect the CRC. When enabled, reflection is BitReversal::Byte and output reversal enabled. This is simply a convenience function as many CRC algorithms call for this.

Set the value to XOR the output with. Automatically masked to the proper size.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Calls Config::new.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.