Expand description
CRC calculation unit
This unit is modeled after the corresponding unit in the stm32l4xx-hal.
Usage example:
let crc = dp.RCC.constrain();
// Lets use the CRC-16-CCITT polynomial
let mut crc = crc.polynomial(crc::Polynomial::L16(0x1021)).freeze();
let data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
crc.feed(&data);
let result = crc.result();
assert!(result == 0x78cb);
Structs§
Enums§
- BitReversal
- Bit reversal settings.
- Polynomial
- Polynomial settings.
Traits§
- CrcExt
- Extension trait to constrain the CRC peripheral.