Keep legacy support

This commit is contained in:
Theo Arends 2020-01-26 14:16:44 +01:00
parent 567c40675a
commit 5b0259e7c3
2 changed files with 10 additions and 2 deletions

View File

@ -700,7 +700,11 @@ void EspErase(uint32_t start_sector, uint32_t end_sector)
// bool result = EsptoolEraseSector(sector); // Esptool - erases flash completely (slow) // bool result = EsptoolEraseSector(sector); // Esptool - erases flash completely (slow)
if (serial_output) { if (serial_output) {
#ifdef ARDUINO_ESP8266_RELEASE_2_3_0
Serial.printf(D_LOG_APPLICATION D_ERASED_SECTOR " %d %s\n", sector, (result) ? D_OK : D_ERROR);
#else
Serial.printf_P(PSTR(D_LOG_APPLICATION D_ERASED_SECTOR " %d %s\n"), sector, (result) ? D_OK : D_ERROR); Serial.printf_P(PSTR(D_LOG_APPLICATION D_ERASED_SECTOR " %d %s\n"), sector, (result) ? D_OK : D_ERROR);
#endif
delay(10); delay(10);
} else { } else {
yield(); yield();

View File

@ -1118,8 +1118,12 @@ void CmndTlsDump(void) {
uint32_t start = (uint32_t)tls_spi_start + tls_block_offset; uint32_t start = (uint32_t)tls_spi_start + tls_block_offset;
uint32_t end = start + tls_block_len -1; uint32_t end = start + tls_block_len -1;
for (uint32_t pos = start; pos < end; pos += 0x10) { for (uint32_t pos = start; pos < end; pos += 0x10) {
uint32_t* values = (uint32_t*)(pos); uint32_t* values = (uint32_t*)(pos);
Serial.printf_P(PSTR("%08x: %08x %08x %08x %08x\n"), pos, bswap32(values[0]), bswap32(values[1]), bswap32(values[2]), bswap32(values[3])); #ifdef ARDUINO_ESP8266_RELEASE_2_3_0
Serial.printf("%08x: %08x %08x %08x %08x\n", pos, bswap32(values[0]), bswap32(values[1]), bswap32(values[2]), bswap32(values[3]));
#else
Serial.printf_P(PSTR("%08x: %08x %08x %08x %08x\n"), pos, bswap32(values[0]), bswap32(values[1]), bswap32(values[2]), bswap32(values[3]));
#endif
} }
} }
#endif // DEBUG_DUMP_TLS #endif // DEBUG_DUMP_TLS