[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 77bb46ff3b
commit c60e760ab7
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,