PX4 Firmware
PX4 Autopilot Software http://px4.io
crc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CRC16_INITIAL   0xFFFFu
 
#define CRC16_OUTPUT_XOR   0x0000u
 
#define CRC64_INITIAL   0xFFFFFFFFFFFFFFFFull
 
#define CRC64_OUTPUT_XOR   0xFFFFFFFFFFFFFFFFull
 

Functions

uint16_t crc16_add (uint16_t crc, uint8_t value)
 
uint16_t crc16_signature (uint16_t initial, size_t length, const uint8_t *bytes)
 
uint64_t crc64_add_word (uint64_t crc, uint32_t value)
 

Macro Definition Documentation

◆ CRC16_INITIAL

#define CRC16_INITIAL   0xFFFFu

Definition at line 45 of file crc.h.

◆ CRC16_OUTPUT_XOR

#define CRC16_OUTPUT_XOR   0x0000u

Definition at line 46 of file crc.h.

Referenced by crc16_signature().

◆ CRC64_INITIAL

#define CRC64_INITIAL   0xFFFFFFFFFFFFFFFFull

Definition at line 47 of file crc.h.

Referenced by calulate_signature().

◆ CRC64_OUTPUT_XOR

#define CRC64_OUTPUT_XOR   0xFFFFFFFFFFFFFFFFull

Definition at line 48 of file crc.h.

Referenced by calulate_signature().

Function Documentation

◆ crc16_add()

uint16_t crc16_add ( uint16_t  crc,
uint8_t  value 
)

Definition at line 89 of file crc.c.

Referenced by crc16_signature().

Here is the caller graph for this function:

◆ crc16_signature()

uint16_t crc16_signature ( uint16_t  initial,
size_t  length,
const uint8_t *  bytes 
)

Definition at line 124 of file crc.c.

References crc16_add(), and CRC16_OUTPUT_XOR.

Here is the call graph for this function:

◆ crc64_add_word()

uint64_t crc64_add_word ( uint64_t  crc,
uint32_t  value 
)

Definition at line 152 of file crc.c.

Referenced by calulate_signature().

Here is the caller graph for this function: