fixes for ethernet

This commit is contained in:
2021-09-05 14:11:21 +02:00
parent 6d7e834732
commit 0dbf5833fa
2 changed files with 14 additions and 1 deletions

View File

@@ -630,7 +630,7 @@ void update(const config &config)
}
}
#ifdef XXXX
#ifdef CONFIG_ETH_ENABLED
if (eth_initialized)
{
bool justStarted{};
@@ -803,6 +803,13 @@ tl::expected<tcpip_adapter_ip_info_t, std::string> get_ip_info(tcpip_adapter_if_
}
}
#ifdef CONFIG_ETH_ENABLED
esp_eth_handle_t getEthHandle()
{
return eth_handle;
}
#endif
namespace {
int wifi_set_status_bits(int bits)
{

View File

@@ -1,5 +1,7 @@
#pragma once
#include "sdkconfig.h"
// system includes
#include <string>
#include <vector>
@@ -63,4 +65,8 @@ tl::expected<wifi_stack::mac_t, std::string> get_default_mac_addr();
tl::expected<wifi_stack::mac_t, std::string> get_base_mac_addr();
tl::expected<void, std::string> set_base_mac_addr(wifi_stack::mac_t mac_addr);
tl::expected<tcpip_adapter_ip_info_t, std::string> get_ip_info(tcpip_adapter_if_t tcpip_if);
#ifdef CONFIG_ETH_ENABLED
esp_eth_handle_t getEthHandle();
#endif
} // namespace wifi_stack