mirror of
https://github.com/esphome/esphome.git
synced 2026-05-24 01:37:15 +08:00
[ethernet] ESP32-S3 Ethernet compilation fix (#14717)
This commit is contained in:
@@ -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,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
|
||||
Reference in New Issue
Block a user