libosmocore
0.9.6-13.20170220git32ee5af8.fc33
Osmocom core library
|
void osmo_crc16gen_set_bits(const struct osmo_crc16gen_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: crc16gen.c:106
uint16_t poly
Polynom (normal representation, MSB omitted.
Definition: crc16gen.h:41
Osmocom bit level support code.
int bits
Actual number of bits of the CRC.
Definition: crc16gen.h:40
uint16_t osmo_crc16gen_compute_bits(const struct osmo_crc16gen_code *code, const ubit_t *in, int len)
Compute the CRC value of a given array of hard-bits.
Definition: crc16gen.c:46
uint8_t ubit_t
unpacked bit (0 or 1)
Definition: bits.h:23
uint16_t remainder
Remainder of the CRC (final XOR)
Definition: crc16gen.h:43
structure describing a given CRC code of max 16 bits
Definition: crc16gen.h:39
int osmo_crc16gen_check_bits(const struct osmo_crc16gen_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: crc16gen.c:81
uint16_t init
Initialization value of the CRC state.
Definition: crc16gen.h:42