707{
712
715
716 total = *size;
717 res = *crc32;
718 pos = 0;
719
720 rc =
soc_crc32_cal(&res, refin, plynml, direction, &stream[0], size);
721 if (*size > 0) {
722
723 pos = total - *size;
725 refin, plynml, direction,
726 &stream[pos], size);
727 pos = total - *size;
728 }
730 if (0 == *size) {
731 if (refout) {
733 }
734 res = res ^ xorout;
735 }
736 *crc32 = res;
737 }
738 return rc;
739}
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校验值
#define EFAULT
Bad address
xwu32_t xwbop_rbit32(xwu32_t x)
#define XWOS_VALIDATE(exp, errstr,...)
检查函数参数是否有效