XWOS API
4.0
XWOS C/C++ API参考手册
|
XWOS通用库:CRC8 更多...
函数 | |
xwer_t | soc_crc8_cal (xwu8_t *crc8, bool refin, xwu8_t polynomial, const xwu8_t stream[], xwsz_t *size) |
static xwer_t | xwlib_crc8_swcal (xwu8_t *crc8, bool refin, xwu8_t plynml, const xwu8_t stream[], xwsz_t *size) |
软件方式计算数据的CRC8校验值 | |
xwer_t | xwlib_crc8_cal (xwu8_t *crc8, xwu8_t xorout, bool refin, bool refout, xwu8_t plynml, const xwu8_t stream[], xwsz_t *size) |
计算数据的CRC8校验值 | |
xwu8_t | xwlib_crc8_calms (const xwu8_t stream[], xwsz_t *size) |
用主流CRC8参数模型计算数据的CRC8校验值 | |
变量 | |
const xwu8_t | xwlib_crc8tbl_0x07 [256] |
CRC8多项式0x7的查询表 | |
const xwu8_t | xwlib_crc8tbl_0x31 [256] |
CRC8多项式0x31的查询表 | |
const xwu8_t | xwlib_crc8tbl_0x9B [256] |
CRC8多项式0x9B的查询表 | |
XWOS通用库:CRC8
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
在文件 crc8.c 中定义.
xwer_t soc_crc8_cal | ( | xwu8_t * | crc8, |
bool | refin, | ||
xwu8_t | polynomial, | ||
const xwu8_t | stream[], | ||
xwsz_t * | size | ||
) |
|
static |
软件方式计算数据的CRC8校验值
[in,out] | crc8 | 指向缓冲区的指针,此缓冲区:
|
[in] | refin | 是否按位镜像翻转输入的每个字节(xwbop_rbit8) |
[in] | plynml | 多项式 |
[in] | stream | 指向数据的指针 |
[in,out] | size | 指向缓冲区的指针,此缓冲区:
|
XWOK | 没有错误,计算结果有效 |
-EOPNOTSUPP | 不支持的多项式 |
<No error