pub struct Crc { /* private fields */ }Expand description
CRC.
Implementations§
Source§impl Crc
impl Crc
pub const unsafe fn from_ptr(ptr: *mut ()) -> Self
pub const fn as_ptr(&self) -> *mut ()
Sourcepub const fn data16(self) -> Reg<u16, W>
pub const fn data16(self) -> Reg<u16, W>
Data programming write. Write contiguous bytes in big endian order; see data32 for seed and result semantics.
Sourcepub const fn data32(self) -> Reg<u32, RW>
pub const fn data32(self) -> Reg<u32, RW>
Seed, data, and checksum. WAS=1 selects seed writes; WAS=0 selects data writes. Program contiguous data bytes in big endian order. Wait at least two clock cycles after writing all data before reading the result. In 16-bit CRC mode, read results occupy bits 15:0 for TOTR=0/1 and bits 31:16 for TOTR=2/3. The other halfword is indeterminate. Seed programming is separate: in 16-bit CRC mode only bits 15:0 are used for the seed; bits 31:16 are not used. In 32-bit CRC mode all bits are used for the seed and read result. The documented hardware reset value is 0xFFFFFFFF. The raw u32 write payload default is not the hardware reset or a seed initialization. Both N manuals have conflicting DATA[HL]/DATA[LL] WAS prose; this view follows the DATA function and CTRL[WAS] definitions without resolving that source inconsistency.
Sourcepub const fn data8(self) -> Reg<u8, W>
pub const fn data8(self) -> Reg<u8, W>
Data programming write. Write contiguous bytes in big endian order; see data32 for seed and result semantics.
Sourcepub const fn gpoly32(self) -> Reg<u32, RW>
pub const fn gpoly32(self) -> Reg<u32, RW>
CRC polynomial. Bits 15:0 are used in both CRC modes. Bits 31:16 are readable and writable in 32-bit CRC mode; writes are ignored in 16-bit CRC mode. The documented hardware reset value is 0x00001021. The raw u32 write payload default does not initialize the hardware polynomial.