pub struct Crc { /* private fields */ }
Expand description

The hardware CRC unit.

Implementations

Set the unit’s configuration, discarding previous state.

Write data to the CRC unit. Note that CRC calculation works faster if more data is given at once.

Write data to the CRC unit, return CRC so far. This function should only be used if you need its result, as retrieving the CRC takes time.

Read the CRC and reset DR to initial value in preparation for a new CRC. This does not reset the configuration options.

Read the CRC without resetting the unit.

Read the state of the CRC calculation. When used as the initial value of an otherwise identical CRC config, this allows resuming calculation from the current state.

This is equivalent to read_crc() in the case of an algorithm that does not apply an output XOR or reverse the output bits.

Write the independent data register. The IDR can be used as temporary storage. It is not cleared on CRC hash reset.

The IDR is not involved with CRC calculation.

Get the current value of the independent data register.

The IDR is not involved with CRC calculation.

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

Returns the argument unchanged.

Calls U::from(self).

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

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.