mirror of
https://github.com/esphome/esphome.git
synced 2025-09-22 13:12:22 +01:00
fix nrf52
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
#include "sha256.h"
|
#include "sha256.h"
|
||||||
|
|
||||||
|
// Only compile SHA256 implementation on platforms that support it
|
||||||
|
#if defined(USE_ESP32) || defined(USE_ESP8266) || defined(USE_RP2040) || defined(USE_LIBRETINY)
|
||||||
|
|
||||||
#include "esphome/core/helpers.h"
|
#include "esphome/core/helpers.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@@ -142,3 +146,5 @@ bool SHA256::equals_hex(const char *expected) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace esphome::sha256
|
} // namespace esphome::sha256
|
||||||
|
|
||||||
|
#endif // Platform check
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "esphome/core/defines.h"
|
#include "esphome/core/defines.h"
|
||||||
|
|
||||||
|
// Only define SHA256 on platforms that support it
|
||||||
|
#if defined(USE_ESP32) || defined(USE_ESP8266) || defined(USE_RP2040) || defined(USE_LIBRETINY)
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -59,3 +63,5 @@ class SHA256 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace esphome::sha256
|
} // namespace esphome::sha256
|
||||||
|
|
||||||
|
#endif // Platform check
|
||||||
|
Reference in New Issue
Block a user