mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01: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:
parent
77bb46ff3b
commit
c60e760ab7
1 changed files with 2 additions and 2 deletions
|
@ -90,8 +90,8 @@ void EthernetComponent::setup() {
|
||||||
|
|
||||||
#ifdef USE_ETHERNET_SPI // Configure SPI interface and Ethernet driver for specific SPI module
|
#ifdef USE_ETHERNET_SPI // Configure SPI interface and Ethernet driver for specific SPI module
|
||||||
spi_device_interface_config_t devcfg = {
|
spi_device_interface_config_t devcfg = {
|
||||||
.command_bits = 16, // Actually it's the address phase in W5500 SPI frame
|
.command_bits = 0,
|
||||||
.address_bits = 8, // Actually it's the control phase in W5500 SPI frame
|
.address_bits = 0,
|
||||||
.dummy_bits = 0,
|
.dummy_bits = 0,
|
||||||
.mode = 0,
|
.mode = 0,
|
||||||
.duty_cycle_pos = 0,
|
.duty_cycle_pos = 0,
|
||||||
|
|
Loading…
Reference in a new issue