47 const ubit_t *in,
int len);
Osmocom bit level support code.
uint8_t ubit_t
unpacked bit (0 or 1)
Definition bits.h:23
uint8_t osmo_crc8gen_compute_bits(const struct osmo_crc8gen_code *code, const ubit_t *in, int len)
Compute the CRC value of a given array of hard-bits.
Definition crc8gen.c:46
int osmo_crc8gen_check_bits(const struct osmo_crc8gen_code *code, const ubit_t *in, int len, const ubit_t *crc_bits)
Checks the CRC value of a given array of hard-bits.
Definition crc8gen.c:81
void osmo_crc8gen_set_bits(const struct osmo_crc8gen_code *code, const ubit_t *in, int len, ubit_t *crc_bits)
Computes and writes the CRC value of a given array of bits.
Definition crc8gen.c:106
structure describing a given CRC code of max 8 bits
Definition crc8gen.h:39
uint8_t poly
Polynom (normal representation, MSB omitted.
Definition crc8gen.h:41
int bits
Actual number of bits of the CRC.
Definition crc8gen.h:40
uint8_t init
Initialization value of the CRC state.
Definition crc8gen.h:42
uint8_t remainder
Remainder of the CRC (final XOR)
Definition crc8gen.h:43