Use `SMALL_CRC` to enable smaller CRC versions.
@xobs created a smaller code size version of the CRC functions. Enable these if someone uses the `SMALL_CRC` define.
This commit is contained in:
parent
083337441a
commit
2a41f0d2a4
|
@ -1,5 +1,6 @@
|
||||||
#include <crc.h>
|
#include <crc.h>
|
||||||
#ifdef CRC16_FAST
|
|
||||||
|
#ifndef SMALL_CRC
|
||||||
static const unsigned int crc16_table[256] = {
|
static const unsigned int crc16_table[256] = {
|
||||||
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
|
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
|
||||||
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
|
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <crc.h>
|
#include <crc.h>
|
||||||
|
|
||||||
#ifdef CRC32_FAST
|
#ifndef SMALL_CRC
|
||||||
static const unsigned int crc_table[256] = {
|
static const unsigned int crc_table[256] = {
|
||||||
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
|
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
|
||||||
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
|
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
|
||||||
|
|
Loading…
Reference in New Issue