/device/soc/esp/esp32/components/esp_rom/patches/ |
D | esp_rom_crc.c | 92 uint8_t esp_rom_crc8_be(uint8_t crc, uint8_t const *buf, uint32_t len) in esp_rom_crc8_be() argument 95 crc = ~crc; in esp_rom_crc8_be() 97 crc = crc8_be_table[crc ^ buf[i]]; in esp_rom_crc8_be() 99 return ~crc; in esp_rom_crc8_be() 102 uint16_t esp_rom_crc16_be(uint16_t crc, uint8_t const *buf, uint32_t len) in esp_rom_crc16_be() argument 105 crc = ~crc; in esp_rom_crc16_be() 107 crc = crc16_be_table[(crc >> 8)^buf[i]] ^ (crc << 8); in esp_rom_crc16_be() 109 return ~crc; in esp_rom_crc16_be() 112 uint32_t esp_rom_crc32_be(uint32_t crc, uint8_t const *buf, uint32_t len) in esp_rom_crc32_be() argument 115 crc = ~crc; in esp_rom_crc32_be() [all …]
|
/device/soc/esp/esp32/components/bt/host/bluedroid/external/sbc/decoder/srce/ |
D | framing.c | 115 OI_UINT crc; in crc_iterate() local 118 crc = crc8_wide[idx >> 1]; in crc_iterate() 120 crc &= 0xff; in crc_iterate() 122 crc >>= 8; in crc_iterate() 125 return crc; in crc_iterate() 130 OI_UINT crc; in crc_iterate_top4() local 133 crc = crc8_wide[idx >> 1]; in crc_iterate_top4() 135 crc &= 0xff; in crc_iterate_top4() 137 crc >>= 8; in crc_iterate_top4() 140 return (oldcrc << 4) ^ crc; in crc_iterate_top4() [all …]
|
D | decoder-sbc.c | 247 OI_UINT8 crc; in OI_CODEC_SBC_DecodeFrame() local 301 crc = OI_SBC_CalculateChecksum(&context->common.frameInfo, *frameData); in OI_CODEC_SBC_DecodeFrame() 302 if (crc != context->common.frameInfo.crc) { in OI_CODEC_SBC_DecodeFrame() 303 TRACE(("CRC Mismatch: calc=%02x read=%02x\n", crc, context->common.frameInfo.crc)); in OI_CODEC_SBC_DecodeFrame() 344 OI_UINT8 crc; in OI_CODEC_SBC_SkipFrame() local 358 crc = OI_SBC_CalculateChecksum(&context->common.frameInfo, *frameData); in OI_CODEC_SBC_SkipFrame() 359 if (crc != context->common.frameInfo.crc) { in OI_CODEC_SBC_SkipFrame()
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/build/scripts/ |
D | packet_create.py | 32 crc = 0 35 if (crc ^ c) & 0x8000: 36 crc = (crc << 1) ^ self.POLYNOMIAL 38 crc = crc << 1 40 return crc 42 def _update_crc(self, crc, c): argument 45 tmp = (crc >> 8) ^ cc 46 crc = (crc << 8) ^ self._tab[tmp & 0xff] 47 crc = crc & 0xffff 49 return crc [all …]
|
/device/soc/esp/esp32/components/esp_common/include/ |
D | esp_crc.h | 33 static inline uint32_t esp_crc32_le(uint32_t crc, uint8_t const *buf, uint32_t len) in esp_crc32_le() argument 35 return esp_rom_crc32_le(crc, buf, len); in esp_crc32_le() 46 static inline uint32_t esp_crc32_be(uint32_t crc, uint8_t const *buf, uint32_t len) in esp_crc32_be() argument 48 return esp_rom_crc32_be(crc, buf, len); in esp_crc32_be() 59 static inline uint16_t esp_crc16_le(uint16_t crc, uint8_t const *buf, uint32_t len) in esp_crc16_le() argument 61 return esp_rom_crc16_le(crc, buf, len); in esp_crc16_le() 72 static inline uint16_t esp_crc16_be(uint16_t crc, uint8_t const *buf, uint32_t len) in esp_crc16_be() argument 74 return esp_rom_crc16_be(crc, buf, len); in esp_crc16_be() 85 static inline uint8_t esp_crc8_le(uint8_t crc, uint8_t const *buf, uint32_t len) in esp_crc8_le() argument 87 return esp_rom_crc8_le(crc, buf, len); in esp_crc8_le() [all …]
|
/device/soc/chipsea/cst85/liteos_m/sdk/modules/common/src/ |
D | wb_co_math.c | 124 uint32_t co_crc32(uint32_t addr, uint32_t len, uint32_t crc) in co_crc32() argument 128 crc = (crc << 8) ^ crc_tab[(crc >> 24) ^ co_read8p(addr++)]; in co_crc32() 131 return crc; in co_crc32() 134 uint8_t co_crc8(uint8_t *pdata, uint32_t len, uint8_t crc) in co_crc8() argument 138 crc = crc8_tab[(crc ^ *pdata++) & 0xFF]; in co_crc8() 141 return crc; in co_crc8()
|
/device/soc/esp/esp32/components/spi_flash/sim/stubs/esp32/ |
D | crc.cpp | 55 extern "C" unsigned int crc32_le(unsigned int crc, unsigned char const * buf,unsigned int len) in crc32_le() argument 58 crc = ~crc; in crc32_le() 60 crc = crc32_le_table[(crc^buf[i])&0xff]^(crc>>8); in crc32_le() 62 return ~crc; in crc32_le()
|
/device/soc/beken/bk7235/liteos_m/bk_sdk_armino/components/easy_flash/src/ |
D | ef_utils.c | 84 uint32_t ef_calc_crc32(uint32_t crc, const void *buf, size_t size) in ef_calc_crc32() argument 89 crc = crc ^ ~0U; in ef_calc_crc32() 92 crc = crc32_table[(crc ^ *p++) & 0xFF] ^ (crc >> 8); in ef_calc_crc32() 94 return crc ^ ~0U; in ef_calc_crc32()
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/packet_tool/ |
D | packet_tool.py | 33 crc = 0 36 if (crc ^ c) & 0x8000: 37 crc = (crc << 1) ^ self.POLYNOMIAL 39 crc = crc << 1 41 return crc 43 def _update_crc(self, crc, c): argument 46 tmp = (crc >> 8) ^ cc 47 crc = (crc << 8) ^ self._tab[tmp & 0xff] 48 crc = crc & 0xffff 50 return crc [all …]
|
/device/soc/esp/esp32/components/esp_rom/include/ |
D | esp_rom_crc.h | 70 uint32_t esp_rom_crc32_le(uint32_t crc, uint8_t const *buf, uint32_t len); 80 uint32_t esp_rom_crc32_be(uint32_t crc, uint8_t const *buf, uint32_t len); 90 uint16_t esp_rom_crc16_le(uint16_t crc, uint8_t const *buf, uint32_t len); 100 uint16_t esp_rom_crc16_be(uint16_t crc, uint8_t const *buf, uint32_t len); 110 uint8_t esp_rom_crc8_le(uint8_t crc, uint8_t const *buf, uint32_t len); 120 uint8_t esp_rom_crc8_be(uint8_t crc, uint8_t const *buf, uint32_t len);
|
/device/soc/esp/esp32/components/esp_rom/include/esp32/rom/ |
D | crc.h | 84 uint32_t crc32_le(uint32_t crc, uint8_t const *buf, uint32_t len); 97 uint32_t crc32_be(uint32_t crc, uint8_t const *buf, uint32_t len); 110 uint16_t crc16_le(uint16_t crc, uint8_t const *buf, uint32_t len); 123 uint16_t crc16_be(uint16_t crc, uint8_t const *buf, uint32_t len); 136 uint8_t crc8_le(uint8_t crc, uint8_t const *buf, uint32_t len); 149 uint8_t crc8_be(uint8_t crc, uint8_t const *buf, uint32_t len);
|
/device/soc/bestechnic/bes2600/liteos_m/sdk/bsp/utils/crc16/ |
D | crc16_c.h | 24 unsigned short _crc16(unsigned short crc, const unsigned char *buffer, unsigned int len); 25 int crc16ccitt(int crc, unsigned char * bytes, int start, int len); 30 static inline unsigned short crc16_byte(unsigned short crc, const unsigned char data) in crc16_byte() argument 32 return (crc >> 8) ^ crc16_table[(crc ^ data) & 0xff]; in crc16_byte()
|
/device/soc/rockchip/rk3588/hardware/mpp/include/ |
D | utils_mpp.h | 60 void calc_data_crc(RK_U8 *dat, RK_U32 len, DataCrc *crc); 61 void write_data_crc(FILE *fp, DataCrc *crc); 62 void read_data_crc(FILE *fp, DataCrc *crc); 64 void calc_frm_crc(MppFrame frame, FrmCrc *crc); 65 void write_frm_crc(FILE *fp, FrmCrc *crc); 66 void read_frm_crc(FILE *fp, FrmCrc *crc);
|
/device/board/bearpi/bearpi_hm_nano/app/D6_iot_cloud_oc/src/ |
D | E53_IA1.c | 134 uint8_t crc = 0xFF; in SHT3xCheckCrc() local 140 crc ^= (data[byteCtr]); in SHT3xCheckCrc() 142 if (crc & 0x80) in SHT3xCheckCrc() 143 crc = (crc << 1) ^ POLYNOMIAL; in SHT3xCheckCrc() 145 crc = (crc << 1); in SHT3xCheckCrc() 149 if (crc != checksum) in SHT3xCheckCrc()
|
/device/board/bearpi/bearpi_hm_nano/app/C2_e53_ia1_temp_humi_pls/src/ |
D | E53_IA1.c | 134 uint8_t crc = 0xFF; in SHT3xCheckCrc() local 140 crc ^= (data[byteCtr]); in SHT3xCheckCrc() 142 if (crc & 0x80) in SHT3xCheckCrc() 143 crc = (crc << 1) ^ POLYNOMIAL; in SHT3xCheckCrc() 145 crc = (crc << 1); in SHT3xCheckCrc() 149 if (crc != checksum) in SHT3xCheckCrc()
|
/device/board/bearpi/bearpi_hm_nano/app/D11_iot_cloud_oc_agriculture/src/ |
D | E53_IA1.c | 134 uint8_t crc = 0xFF; in SHT3xCheckCrc() local 140 crc ^= (data[byteCtr]); in SHT3xCheckCrc() 142 if (crc & 0x80) in SHT3xCheckCrc() 143 crc = (crc << 1) ^ POLYNOMIAL; in SHT3xCheckCrc() 145 crc = (crc << 1); in SHT3xCheckCrc() 149 if (crc != checksum) in SHT3xCheckCrc()
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/common/ |
D | transfer.c | 237 hi_u16 crc; in upload_send_file_info() local 274 crc = crc16_ccitt(0, ctx->buffer + MSG_START_LEN, SOH_MSG_LEN, check_sum); in upload_send_file_info() 275 ctx->buffer[131] = (hi_u8)(crc >> 8); /* buffer[131] is crc high 8 bit */ in upload_send_file_info() 276 ctx->buffer[132] = (hi_u8)crc; /* buffer[132] is crc low 8 bit */ in upload_send_file_info() 286 hi_u16 crc; in upload_send_null_info() local 294 crc = crc16_ccitt(0, ctx->buffer + MSG_START_LEN, SOH_MSG_LEN, check_sum); in upload_send_null_info() 295 ctx->buffer[131] = (hi_u8)(crc >> 8); /* buffer[131] is crc high 8 bit */ in upload_send_null_info() 296 ctx->buffer[132] = (hi_u8)crc; /* buffer[132] is crc low 8 bit */ in upload_send_null_info() 306 hi_u16 crc; in upload_send_data() local 334 crc = crc16_ccitt(0, ctx->buffer + MSG_START_LEN, SOH_MSG_LEN, check_sum); in upload_send_data() [all …]
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/common/nvm/ |
D | hi_nvm.c | 95 if (nv_head->crc != crc_val) { in nv_check_file() 242 hi_u32 crc = 0; in nv_read_common() local 271 ret = nv_read_flash(flash_addr + item_len, sizeof(crc), (hi_u8*)&crc); in nv_read_common() 276 if (crc != crc_val) { in nv_read_common() 305 hi_crc32_nv(0, p_nv_file + 8, nv_ctrl->block_size - 8, &(nv_head->crc)); // 8 in nv_block_write() 319 hi_u32 ret, crc, cs; in nv_common_write() local 345 hi_crc32_nv(0, data, item_len, &crc); in nv_common_write() 350 …ntptr_t)(nv_file + nv_index->nv_offset + item_len) ^ sizeof(crc) ^ ((uintptr_t)&crc) ^ sizeof(crc); in nv_common_write() 351 …if (memcpy_s(nv_file + nv_index->nv_offset + item_len, sizeof(crc), &crc, sizeof(crc), cs) != EOK)… in nv_common_write()
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/common/nvm/ |
D | hi_nvm.c | 95 if (nv_head->crc != crc_val) { in nv_check_file() 244 hi_u32 crc = 0; in nv_read_common() local 273 ret = nv_read_flash(flash_addr + item_len, sizeof(crc), (hi_u8*)&crc); in nv_read_common() 278 if (crc != crc_val) { in nv_read_common() 307 hi_crc32_nv(0, p_nv_file + 8, nv_ctrl->block_size - 8, &(nv_head->crc)); // 8 in nv_block_write() 322 hi_u32 ret, crc, cs; in nv_common_write() local 348 hi_crc32_nv(0, data, item_len, &crc); in nv_common_write() 353 …ntptr_t)(nv_file + nv_index->nv_offset + item_len) ^ sizeof(crc) ^ ((uintptr_t)&crc) ^ sizeof(crc); in nv_common_write() 354 …if (memcpy_s(nv_file + nv_index->nv_offset + item_len, sizeof(crc), &crc, sizeof(crc), cs) != EOK)… in nv_common_write()
|
/device/soc/esp/esp32/components/bootloader_support/src/ |
D | bootloader_common_loader.c | 56 …return bootloader_common_ota_select_invalid(s) == false && s->crc == bootloader_common_ota_select_… in bootloader_common_ota_select_valid() 159 … sizeof(rtc_retain_mem_t) - sizeof(rtc_retain_mem->crc)) == rtc_retain_mem->crc && rtc_retain_mem-… in check_rtc_retain_mem() 164 …rtc_retain_mem->crc = esp_rom_crc32_le(UINT32_MAX, (uint8_t*)rtc_retain_mem, sizeof(rtc_retain_mem… in update_rtc_retain_mem_crc()
|
/device/soc/hisilicon/hi3516dv300/sdk_linux/drv/interdrv/common/cipher/src/drv/cipher_v1.0/drivers/core/ |
D | drv_ifep_rsa_v100.c | 80 static hi_u16 drv_rsa_crc16_block(hi_u16 crc, in drv_rsa_crc16_block() argument 89 crc = (crc << BITS_IN_BYTE) ^ g_crc_table[((crc >> BITS_IN_BYTE) ^ val) & BYTE_MASK]; in drv_rsa_crc16_block() 92 return crc; in drv_rsa_crc16_block() 98 hi_u16 crc = 0; in drv_rsa_key_crc() local 101 crc = drv_rsa_crc16_block(crc, n + i, (hi_u8 *)randnum); in drv_rsa_key_crc() 104 crc = drv_rsa_crc16_block(crc, k + i, (hi_u8 *)randnum); in drv_rsa_key_crc() 106 return crc; in drv_rsa_key_crc()
|
/device/soc/esp/esp32/components/app_update/ |
D | otatool.py | 86 crc = bytearray(self.otadata[start + 28:start + 32]) 89 crc = struct.unpack('I', crc) 90 info.append(otadata_info(seq[0], crc[0])) 107 crc = binascii.crc32(struct.pack('I', seq), 0xFFFFFFFF) % (1 << 32) 108 return seq < (int('0xFFFFFFFF', 16) % (1 << 32)) and status.crc == crc 219 …re: 0x{:08x} \t0x{:08x} | \t0x{:08x} \t 0x{:08x}'.format(otadata_info[0].seq, otadata_info[0].crc, 220 otadata_info[1].seq, otadata_info[1].crc))
|
/device/board/unionman/unionpi_tiger/kernel/drivers/rtl88x2cs/core/ |
D | rtw_security.c | 263 u32 crc; in getcrc32() local 267 crc = 0xffffffff; /* preload shift register, per CRC-32 spec */ in getcrc32() 270 crc = crc32_table[(crc ^ *p) & 0xff] ^ (crc >> 8); in getcrc32() 271 return ~crc; /* transmit complement, per CRC-32 spec */ in getcrc32() 282 unsigned char crc[4]; in rtw_wep_encrypt() local 328 *((u32 *)crc) = cpu_to_le32(getcrc32(payload, length)); in rtw_wep_encrypt() 332 arcfour_encrypt(&mycontext, payload + length, crc, 4); in rtw_wep_encrypt() 336 *((u32 *)crc) = cpu_to_le32(getcrc32(payload, length)); in rtw_wep_encrypt() 339 arcfour_encrypt(&mycontext, payload + length, crc, 4); in rtw_wep_encrypt() 357 u8 crc[4]; in rtw_wep_decrypt() local [all …]
|
/device/soc/esp/esp32/components/esp32/include/rom/ |
D | crc.h | 1 #warning rom/crc.h is deprecated, please use esp32/rom/crc.h instead
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/third_party/u-boot-v2019.07/hisilicon_patch/ |
D | hisilicon-u-boot-v2019.07.patch | 15 -#include <u-boot/crc.h> 75 - /* terms of polynomial defining this crc (except x^32): */ 246 -# define DO_CRC(x) crc = tab[(crc ^ (x)) & 255] ^ (crc >> 8) 248 -# define DO_CRC(x) crc = tab[((crc >> 24) ^ (x)) & 255] ^ (crc << 8) 251 +#define do_crc(x) (crc = tab[(crc ^ (x)) & 255] ^ (crc >> 8)) /* 255 8 */ 257 -uint32_t __efi_runtime crc32_no_comp(uint32_t crc, const Bytef *buf, uInt len) 258 +unsigned int crc32_no_comp(unsigned int crc, const bytef *buf, uint len) 269 - crc = cpu_to_le32(crc); 292 - crc ^= *++b; /* use pre increment for speed */ 298 + crc ^= *++b; /* use pre increment for speed */ [all …]
|