Struct stm32_hal2::crc::Polynomial[][src]

pub struct Polynomial(_);
Expand description

A CRC polynomial.

The STM32H7 CRC unit only supports odd polynomials, and the constructors will check to ensure the polynomial is odd unless the _unchecked variants are used.

Even polynomials are essentially never used in CRCs, so you most likely don’t need to worry about this if you aren’t creating your own algorithm.

A polynomial being even means that the least significant bit is 0 in the polynomial’s normal representation.

Implementations

Create a 7-bit polynomial. Returns an error if the polynomial passed has the MSB set or is even.

Create an 8-bit polynomial. Returns an error if the polynomial passed is even.

Create a 16-bit polynomial. Returns an error if the polynomial passed is even.

Create a 32-bit polynomial. Returns an error if the polynomial passed is even.

Create a 7-bit polynomial. If the polynomial passed is even the CRC unit will give incorrect results.

Create an 8-bit polynomial. If the polynomial passed is even the CRC unit will give incorrect results.

Create a 16-bit polynomial. If the polynomial passed is even the CRC unit will give incorrect results.

Create a 32-bit polynomial. If the polynomial passed is even the CRC unit will give incorrect results.

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

Returns the 32-bit polynomial 0x04C1_1DB7.

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.