Add get_eth_has_ip()

This commit is contained in:
2023-01-26 11:59:11 +01:00
parent 002d4d852b
commit 75f8cb1bef
2 changed files with 6 additions and 0 deletions

View File

@@ -999,6 +999,11 @@ bool get_eth_connected()
{
return wifi_get_status_bits() & ETH_CONNECTED_BIT;
}
bool get_eth_has_ip()
{
return wifi_get_status_bits() & ETH_HAS_IP_BIT;
}
#endif
namespace {

View File

@@ -105,5 +105,6 @@ tl::expected<std::string_view, std::string> get_hostname_for_interface(esp_netif
#ifdef CONFIG_ETH_ENABLED
esp_eth_handle_t getEthHandle();
bool get_eth_connected();
bool get_eth_has_ip();
#endif
} // namespace wifi_stack