Module stm32l0xx_hal::crc
source · [−]Expand description
CRC calculation unit
This unit is modeled after the corresponding unit in the stm32l4xx-hal.
Usage example:
let crc = dp.CRC.constrain(&mut rcc.ahb1);
// 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
Bit reversal settings.
Polynomial settings.
Traits
Extension trait to constrain the CRC peripheral.