|
40 | 40 | #elif __ESPRESSIF__ |
41 | 41 | #include <bootloader_utility.h> |
42 | 42 | #include <esp_rom_sys.h> |
43 | | -#include <rom/crc.h> |
| 43 | +#include <esp_crc.h> |
44 | 44 | #include <endian.h> |
45 | 45 | #include <mbedtls/base64.h> |
46 | 46 | #else |
@@ -732,8 +732,8 @@ boot_serial_output(void) |
732 | 732 | crc = crc16_itu_t(crc, data, len); |
733 | 733 | #elif __ESPRESSIF__ |
734 | 734 | /* For ESP32 it was used the CRC API in rom/crc.h */ |
735 | | - crc = ~crc16_be(~CRC16_INITIAL_CRC, (uint8_t *)bs_hdr, sizeof(*bs_hdr)); |
736 | | - crc = ~crc16_be(~crc, (uint8_t *)data, len); |
| 735 | + crc = ~esp_crc16_be(~CRC16_INITIAL_CRC, (uint8_t *)bs_hdr, sizeof(*bs_hdr)); |
| 736 | + crc = ~esp_crc16_be(~crc, (uint8_t *)data, len); |
737 | 737 | #else |
738 | 738 | crc = crc16_ccitt(CRC16_INITIAL_CRC, bs_hdr, sizeof(*bs_hdr)); |
739 | 739 | crc = crc16_ccitt(crc, data, len); |
@@ -819,7 +819,7 @@ boot_serial_in_dec(char *in, int inlen, char *out, int *out_off, int maxout) |
819 | 819 | #ifdef __ZEPHYR__ |
820 | 820 | crc = crc16_itu_t(CRC16_INITIAL_CRC, out, len); |
821 | 821 | #elif __ESPRESSIF__ |
822 | | - crc = ~crc16_be(~CRC16_INITIAL_CRC, (uint8_t *)out, len); |
| 822 | + crc = ~esp_crc16_be(~CRC16_INITIAL_CRC, (uint8_t *)out, len); |
823 | 823 | #else |
824 | 824 | crc = crc16_ccitt(CRC16_INITIAL_CRC, out, len); |
825 | 825 | #endif |
|
0 commit comments