JaiaBot  1.19.0
JaiaBot micro-AUV software
crc16.h File Reference
#include <stdlib.h>
Include dependency graph for crc16.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CRC_POLY_16   0xA001
 
#define CRC_START_16   0x0000
 
#define CRC_TABLE_SIZE   64
 

Functions

static void init_crc16_tab (void)
 
uint16_t crc16 (const void *input_str, size_t num_bytes)
 
uint16_t update_crc_16 (uint16_t crc, unsigned char c)
 
uint16_t fletcher16 (const void *input_str, size_t num_bytes)
 

Variables

static bool crc_tab16_init = false
 
static uint16_t crc_tab16 [CRC_TABLE_SIZE]
 

Macro Definition Documentation

◆ CRC_POLY_16

#define CRC_POLY_16   0xA001

Definition at line 3 of file crc16.h.

◆ CRC_START_16

#define CRC_START_16   0x0000

Definition at line 4 of file crc16.h.

◆ CRC_TABLE_SIZE

#define CRC_TABLE_SIZE   64

Definition at line 5 of file crc16.h.

Function Documentation

◆ crc16()

uint16_t crc16 ( const void *  input_str,
size_t  num_bytes 
)

Definition at line 21 of file crc16.h.

◆ fletcher16()

uint16_t fletcher16 ( const void *  input_str,
size_t  num_bytes 
)

Definition at line 98 of file crc16.h.

◆ init_crc16_tab()

static void init_crc16_tab ( void  )
static

Definition at line 69 of file crc16.h.

◆ update_crc_16()

uint16_t update_crc_16 ( uint16_t  crc,
unsigned char  c 
)

Definition at line 51 of file crc16.h.

Variable Documentation

◆ crc_tab16

uint16_t crc_tab16[CRC_TABLE_SIZE]
static

Definition at line 10 of file crc16.h.

◆ crc_tab16_init

bool crc_tab16_init = false
static

Definition at line 9 of file crc16.h.