8000 fix #525 (detect ESP32 vesion) · adamczuk-piotr/arduinoWebSockets@ba6275e · GitHub
[go: up one dir, main page]

Skip to content

Commit ba6275e

Browse files
committed
fix Links2004#525 (detect ESP32 vesion)
1 parent 1e271b5 commit ba6275e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/WebSockets.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ extern "C" {
3939
#ifdef ESP8266
4040
#include <Hash.h>
4141
#elif defined(ESP32)
42+
#include <esp_system.h>
43+
44+
#if ESP_IDF_VERSION_MAJOR >= 4
45+
#include <esp32/sha.h>
46+
#else
4247
#include <hwcrypto/sha.h>
48+
#endif
49+
4350
#else
4451

4552
extern "C" {

0 commit comments

Comments
 (0)
0