Skip to content

Commit f463bd7

Browse files
committed
re-add default under cplusplus instead
1 parent 235b96d commit f463bd7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

cores/esp8266/Esp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ bool EspClass::checkFlashCRC() {
471471
uint32_t firstPart = (uintptr_t)&__crc_len - 0x40200000; // How many bytes to check before the 1st CRC val
472472

473473
// Start the checksum
474-
uint32_t crc = crc32((const void*)0x40200000, firstPart, 0xffffffff);
474+
uint32_t crc = crc32((const void*)0x40200000, firstPart);
475475
// Pretend the 2 words of crc/len are zero to be idempotent
476476
crc = crc32(z, 8, crc);
477477
// Finish the CRC calculation over the rest of flash

cores/esp8266/core_esp8266_eboot_command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern "C" {
2929

3030
static uint32_t eboot_command_calculate_crc32(const struct eboot_command* cmd)
3131
{
32-
return crc32((const uint8_t*) cmd, offsetof(struct eboot_command, crc32), 0xffffffff);
32+
return crc32((const uint8_t*) cmd, offsetof(struct eboot_command, crc32));
3333
}
3434

3535
int eboot_command_read(struct eboot_command* cmd)

cores/esp8266/coredecls.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ void __disableWiFiAtBootTime (void) __attribute__((noinline));
2828
void __real_system_restart_local() __attribute__((noreturn));
2929

3030
uint32_t sqrt32(uint32_t n);
31-
uint32_t crc32(const void* data, size_t length, uint32_t crc);
3231

3332
#ifdef __cplusplus
3433
}
3534

35+
uint32_t crc32(const void* data, size_t length, uint32_t crc = 0xffffffff);
36+
3637
#include <functional>
3738

3839
using BoolCB = std::function<void(bool)>;

0 commit comments

Comments
 (0)