Merge pull request #551 from Links2004/ESP32v4

fix #525 (detect ESP32 version)
This commit is contained in:
Markus
2020-07-11 18:13:13 +02:00
committed by GitHub

View File

@ -39,7 +39,14 @@ extern "C" {
#ifdef ESP8266 #ifdef ESP8266
#include <Hash.h> #include <Hash.h>
#elif defined(ESP32) #elif defined(ESP32)
#include <esp_system.h>
#if ESP_IDF_VERSION_MAJOR >= 4
#include <esp32/sha.h>
#else
#include <hwcrypto/sha.h> #include <hwcrypto/sha.h>
#endif
#else #else
extern "C" { extern "C" {