Skip to content

Commit f3c294f

Browse files
authored
Update flashz.hpp
arduino-esp32 core 2.x => 3.x migration
1 parent 81d703c commit f3c294f

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/flashz.hpp

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,30 @@
2929

3030

3131
#pragma once
32+
33+
// arduino-esp32 core 2.x => 3.x migration
3234
#if __has_include("miniz.h")
33-
#include "miniz.h"
35+
#include "miniz.h"
3436
#else
35-
#include <rom/miniz.h>
37+
#include <rom/miniz.h>
3638
#endif
39+
3740
#include <Update.h>
3841
#include <functional>
3942

43+
// arduino-esp32 core 2.x => 3.x migration
44+
#if !defined SPI_FLASH_SEC_SIZE
45+
#include "spi_flash_mmap.h"
46+
#endif
47+
48+
// arduino-esp32 core 2.x => 3.x migration
49+
#if __has_include(<NetworkClient.h>)
50+
#include <NetworkClient.h>
51+
#define WiFiClient NetworkClient
52+
#else
53+
#include <WiFiClient.h>
54+
#endif
55+
4056
#ifndef ESP_IMAGE_HEADER_MAGIC
4157
#define ESP_IMAGE_HEADER_MAGIC 0xE9
4258
#endif

0 commit comments

Comments
 (0)