knxdisplay/main/Hardware/Eth.hpp
2026-01-22 21:32:21 +01:00

28 lines
690 B
C++

#pragma once
#include <string>
#include <vector>
#include <functional>
#include "esp_event.h"
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
class Eth {
public:
static Eth& instance();
void init();
private:
Eth() = default;
Eth(const Eth&) = delete;
Eth& operator=(const Eth&) = delete;
static void eventHandler(void* arg, esp_event_base_t event_base,
int32_t event_id, void* event_data);
static void got_ip_event_handler(void* arg, esp_event_base_t event_base,
int32_t event_id, void* event_data);
bool initialized_ = false;
EventGroupHandle_t ethEventGroup_ = nullptr;
};