ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
pc_crc_detail Namespace Reference

Functions

uint32_t mask (uint8_t width)
 Mask of width low bits (width 32 handled without a 32-bit shift, which is UB).
 
uint8_t clamp_width (uint8_t width)
 Clamp a register width to the supported 8..32 range.
 
uint8_t rev8 (uint8_t b)
 Reverse the 8 bits of b.
 
uint32_t revN (uint32_t v, uint8_t width)
 Reverse the low width bits of v.
 

Function Documentation

◆ mask()

uint32_t pc_crc_detail::mask ( uint8_t  width)
inline

Mask of width low bits (width 32 handled without a 32-bit shift, which is UB).

Definition at line 61 of file crc.h.

Referenced by pc_crc_begin(), pc_crc_final(), and pc_crc_update().

◆ clamp_width()

uint8_t pc_crc_detail::clamp_width ( uint8_t  width)
inline

Clamp a register width to the supported 8..32 range.

Definition at line 67 of file crc.h.

Referenced by pc_crc_final(), and pc_crc_update().

◆ rev8()

uint8_t pc_crc_detail::rev8 ( uint8_t  b)
inline

Reverse the 8 bits of b.

Definition at line 81 of file crc.h.

Referenced by pc_crc_update().

◆ revN()

uint32_t pc_crc_detail::revN ( uint32_t  v,
uint8_t  width 
)
inline

Reverse the low width bits of v.

Definition at line 90 of file crc.h.

Referenced by pc_crc_final().