17#if defined(XWLIBCFG_CRC32_0X04C11DB7) && (1 == XWLIBCFG_CRC32_0X04C11DB7)
281#if defined(XWLIBCFG_CRC32_0XEDB88320) && (1 == XWLIBCFG_CRC32_0XEDB88320)
545#if defined(SOCCFG_CRC32) && (1 == SOCCFG_CRC32)
551# define soc_crc32_cal(crc32, refin, plynml, direction, stream, size) (-EOPNOTSUPP)
556 bool refin,
const xwu32_t table[],
561 bool refin,
const xwu32_t table[],
583 bool refin,
const xwu32_t table[],
591 for (i = 0; i < *size; i++) {
598 remainder = table[index] ^ (remainder << 8);
618 bool refin,
const xwu32_t table[],
626 for (i = 0; i < *size; i++) {
633 remainder = table[index] ^ (remainder >> 8);
664#if defined(XWLIBCFG_CRC32_0X04C11DB7) && (1 == XWLIBCFG_CRC32_0X04C11DB7)
677#if defined(XWLIBCFG_CRC32_0XEDB88320) && (1 == XWLIBCFG_CRC32_0XEDB88320)
704 bool refin,
bool refout,
720 rc =
soc_crc32_cal(&res, refin, plynml, direction, &stream[0], size);
725 refin, plynml, direction,
xwer_t soc_crc32_cal(xwu32_t *crc32, bool refin, xwu32_t plynml, xwu32_t direction, const xwu8_t stream[], xwsz_t *size)
static xwer_t xwlib_crc32_swcal(xwu32_t *crc32, bool refin, xwu32_t plynml, xwu32_t direction, const xwu8_t stream[], xwsz_t *size)
软件方式计算一段数据的CRC32校验值
static void xwlib_crc32_swcal_rs(xwu32_t *crc32, bool refin, const xwu32_t table[], const xwu8_t stream[], xwsz_t *size)
右移计算一段数据的CRC32校验值(直驱表法)
static void xwlib_crc32_swcal_ls(xwu32_t *crc32, bool refin, const xwu32_t table[], const xwu8_t stream[], xwsz_t *size)
左移计算一段数据的CRC32校验值(直驱表法)
xwu32_t xwlib_crc32_calms(const xwu8_t stream[], xwsz_t *size)
用主流CRC32参数模型计算一段数据的校验值
const xwu32_t xwlib_crc32tbl_0xedb88320[256]
CRC32多项式0XEDB88320的查询表
const xwu32_t xwlib_crc32tbl_0x04c11db7[256]
CRC32多项式0x04C11DB7的查询表
xwer_t xwlib_crc32_cal(xwu32_t *crc32, xwu32_t xorout, bool refin, bool refout, xwu32_t plynml, xwu32_t direction, const xwu8_t stream[], xwsz_t *size)
计算一段数据的CRC32校验值
@ XWLIB_CRC32_RIGHT_SHIFT
#define EFAULT
Bad address
#define EOPNOTSUPP
Operation not supported on socket
xwu8_t xwbop_rbit8(xwu8_t x)
xwu32_t xwbop_rbit32(xwu32_t x)
#define XWOS_VALIDATE(exp, errstr,...)
检查函数参数是否有效