[ethernet] Use C++17 nested namespace syntax (#14246)

This commit is contained in:
J. Nick Koston
2026-02-23 19:50:11 -06:00
committed by GitHub
parent 1614eb9c9c
commit 70e47f301d
2 changed files with 4 additions and 8 deletions

View File

@@ -19,8 +19,7 @@
#include <driver/spi_master.h>
#endif
namespace esphome {
namespace ethernet {
namespace esphome::ethernet {
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 4, 2)
// work around IDF compile issue on P4 https://github.com/espressif/esp-idf/pull/15637
@@ -881,7 +880,6 @@ void EthernetComponent::write_phy_register_(esp_eth_mac_t *mac, PHYRegister regi
#endif
} // namespace ethernet
} // namespace esphome
} // namespace esphome::ethernet
#endif // USE_ESP32

View File

@@ -15,8 +15,7 @@
#include "esp_mac.h"
#include "esp_idf_version.h"
namespace esphome {
namespace ethernet {
namespace esphome::ethernet {
#ifdef USE_ETHERNET_IP_STATE_LISTENERS
/** Listener interface for Ethernet IP state changes.
@@ -218,7 +217,6 @@ extern EthernetComponent *global_eth_component;
extern "C" esp_eth_phy_t *esp_eth_phy_new_jl1101(const eth_phy_config_t *config);
#endif
} // namespace ethernet
} // namespace esphome
} // namespace esphome::ethernet
#endif // USE_ESP32