[ethernet] ESP32-S3 Ethernet compilation fix (#14717)

This commit is contained in:
Keith Burzinski
2026-03-11 23:48:27 -05:00
committed by GitHub
parent bb7d96b954
commit 7f38d95424
4 changed files with 8 additions and 2 deletions
@@ -11,11 +11,14 @@
#include "esp_eth.h"
#include "esp_eth_mac.h"
#include "esp_eth_mac_esp.h"
#include "esp_netif.h"
#include "esp_mac.h"
#include "esp_idf_version.h"
#if CONFIG_ETH_USE_ESP32_EMAC
extern "C" eth_esp32_emac_config_t eth_esp32_emac_default_config(void);
#endif
namespace esphome::ethernet {
@@ -3,6 +3,8 @@
// ETH_ESP32_EMAC_DEFAULT_CONFIG() uses out-of-order designated initializers
// which are valid in C but not in C++. This wrapper allows C++ code to get
// the default config without replicating the macro's contents.
#if CONFIG_ETH_USE_ESP32_EMAC
eth_esp32_emac_config_t eth_esp32_emac_default_config(void) {
return (eth_esp32_emac_config_t) ETH_ESP32_EMAC_DEFAULT_CONFIG();
}
#endif
+2 -2
View File
@@ -2,10 +2,10 @@ ethernet:
type: W5500
clk_pin: 19
mosi_pin: 21
miso_pin: 23
miso_pin: 17
cs_pin: 18
interrupt_pin: 36
reset_pin: 22
reset_pin: 12
clock_speed: 10Mhz
manual_ip:
static_ip: 192.168.178.56
@@ -0,0 +1 @@
<<: !include common-w5500.yaml