Functions | Variables
CRC
Error Detection and Correction
Collaboration diagram for CRC:

Functions

u16 crc16_ccitt (const u8 *buf, u32 len, u16 crc)
u32 crc24q (const u8 *buf, u32 len, u32 crc)

Variables

static const u16 crc16tab [256]
static const u32 crc24qtab [256]

Detailed Description

Cyclic redundancy checks.


Function Documentation

u16 crc16_ccitt ( const u8 buf,
u32  len,
u16  crc 
)

Calculate CCITT 16-bit Cyclical Redundancy Check (CRC16).

This implementation uses parameters used by XMODEM i.e. polynomial is:

\[ x^{16} + x^{12} + x^5 + 1 \]

Mask 0x11021, not reversed, not XOR'd (there are several slight variants on the CCITT CRC-16).

Parameters:
bufArray of data to calculate CRC for
lenLength of data array
crcInitial CRC value
Returns:
CRC16 value

Definition at line 74 of file edc.c.

u32 crc24q ( const u8 buf,
u32  len,
u32  crc 
)

Calculate Qualcomm 24-bit Cyclical Redundancy Check (CRC-24Q).

The CRC polynomial used is:

\[ x^{24} + x^{23} + x^{18} + x^{17} + x^{14} + x^{11} + x^{10} + x^7 + x^6 + x^5 + x^4 + x^3 + x+1 \]

Mask 0x1864CFB, not reversed, not XOR'd

Parameters:
bufArray of data to calculate CRC for
lenLength of data array
crcInitial CRC value
Returns:
CRC-24Q value

Definition at line 131 of file edc.c.


Variable Documentation

const u16 crc16tab[256] [static]

Definition at line 24 of file edc.c.

const u32 crc24qtab[256] [static]

Definition at line 81 of file edc.c.



swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:57:01