1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-12 08:12:22 +01:00

let make new platform implementation in external components (#7615)

Co-authored-by: Tomasz Duda <tomaszduda23@gmai.com>
This commit is contained in:
tomaszduda23
2024-10-29 04:58:36 +01:00
committed by GitHub
parent abbd7faa64
commit 71e1e3b5f8
2 changed files with 39 additions and 22 deletions

View File

@@ -7,6 +7,7 @@
#include <string>
#include <type_traits>
#include <vector>
#include <limits>
#include "esphome/core/optional.h"
@@ -545,6 +546,7 @@ class Mutex {
public:
Mutex();
Mutex(const Mutex &) = delete;
~Mutex();
void lock();
bool try_lock();
void unlock();
@@ -554,6 +556,8 @@ class Mutex {
private:
#if defined(USE_ESP32) || defined(USE_LIBRETINY)
SemaphoreHandle_t handle_;
#else
void *handle_; // d-pointer to store private data on new platforms
#endif
};