1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-14 06:38:17 +00:00

[ethernet] prepare for more SPI devices

The esp-idf SPI ethernet drivers will set command_bits
and address_bits if the fields are 0, allowing this
config to be shared.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
This commit is contained in:
Bjørn Mork 2024-06-04 17:10:07 +02:00
parent 31e90e5544
commit a16c251346
No known key found for this signature in database
GPG Key ID: 22044ECBBFA4615D

View File

@ -90,8 +90,8 @@ void EthernetComponent::setup() {
#ifdef USE_ETHERNET_SPI // Configure SPI interface and Ethernet driver for specific SPI module
spi_device_interface_config_t devcfg = {
.command_bits = 16, // Actually it's the address phase in W5500 SPI frame
.address_bits = 8, // Actually it's the control phase in W5500 SPI frame
.command_bits = 0,
.address_bits = 0,
.dummy_bits = 0,
.mode = 0,
.duty_cycle_pos = 0,