Lines Matching refs:crc
1366 uint16_t crc; in boot_serial_output() local
1370 char buf[BOOT_SERIAL_OUT_MAX + sizeof(*bs_hdr) + sizeof(crc) + sizeof(totlen)]; in boot_serial_output()
1382 crc = crc16_itu_t(CRC16_INITIAL_CRC, (uint8_t *)bs_hdr, sizeof(*bs_hdr)); in boot_serial_output()
1383 crc = crc16_itu_t(crc, data, len); in boot_serial_output()
1386 crc = ~esp_crc16_be(~CRC16_INITIAL_CRC, (uint8_t *)bs_hdr, sizeof(*bs_hdr)); in boot_serial_output()
1387 crc = ~esp_crc16_be(~crc, (uint8_t *)data, len); in boot_serial_output()
1389 crc = crc16_ccitt(CRC16_INITIAL_CRC, bs_hdr, sizeof(*bs_hdr)); in boot_serial_output()
1390 crc = crc16_ccitt(crc, data, len); in boot_serial_output()
1392 crc = htons(crc); in boot_serial_output()
1394 totlen = len + sizeof(*bs_hdr) + sizeof(crc); in boot_serial_output()
1403 memcpy(&buf[totlen], &crc, sizeof(crc)); in boot_serial_output()
1404 totlen += sizeof(crc); in boot_serial_output()
1443 uint16_t crc; in boot_serial_in_dec() local
1480 crc = crc16_itu_t(CRC16_INITIAL_CRC, out, len); in boot_serial_in_dec()
1482 crc = ~esp_crc16_be(~CRC16_INITIAL_CRC, (uint8_t *)out, len); in boot_serial_in_dec()
1484 crc = crc16_ccitt(CRC16_INITIAL_CRC, out, len); in boot_serial_in_dec()
1486 if (crc || len <= sizeof(crc)) { in boot_serial_in_dec()
1489 *out_off -= sizeof(crc); in boot_serial_in_dec()