libosmocore
0.9.6.315-40e62
Osmocom core library
|
This was copied from the linux kernel and adjusted for our types. More...
#include <osmocom/core/crc16.h>
Functions | |
uint16_t | osmo_crc16 (uint16_t crc, uint8_t const *buffer, size_t len) |
compute the CRC-16 for the data buffer More... | |
uint16_t | osmo_crc16_ccitt (uint16_t crc, uint8_t const *buffer, size_t len) |
Variables | |
uint16_t const | osmo_crc16_table [256] |
CRC table for the CRC-16. More... | |
uint16_t const | osmo_crc16_ccitt_table [256] |
This was copied from the linux kernel and adjusted for our types.
uint16_t osmo_crc16 | ( | uint16_t | crc, |
uint8_t const * | buffer, | ||
size_t | len | ||
) |
compute the CRC-16 for the data buffer
crc[in] | previous CRC value |
buffer[in] | data pointer |
len[in] | number of bytes in input buffer |
References osmo_crc16_byte().
uint16_t osmo_crc16_ccitt | ( | uint16_t | crc, |
uint8_t const * | buffer, | ||
size_t | len | ||
) |
References osmo_crc16_ccitt_byte().
uint16_t const osmo_crc16_ccitt_table[256] |
Referenced by osmo_crc16_ccitt_byte().
uint16_t const osmo_crc16_table[256] |
CRC table for the CRC-16.
The poly is 0x8005 (x^16 + x^15 + x^2 + 1)
Referenced by osmo_crc16_byte().