Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP-IDF 5.2 #416

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,11 @@ where
),
)))]
custom_spi_driver: eth_spi_custom_driver_config_t::default(),
#[cfg(all(
Copy link
Collaborator

@ivmarkov ivmarkov Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition is not well done (and ditto for all conditions below), in that - once ESP IDF 6.X is out - this will stop working. You probably want to express instead something equivalent to cfg(esp_idf_version >= 5.2).

esp_idf_version_major = "5",
not(any(esp_idf_version_minor = "0", esp_idf_version_major = "1"))
))]
poll_period_ms: 0,
};

let mac = unsafe { esp_eth_mac_new_dm9051(&dm9051_cfg, &mac_cfg) };
Expand Down Expand Up @@ -506,6 +511,11 @@ where
),
)))]
custom_spi_driver: eth_spi_custom_driver_config_t::default(),
#[cfg(all(
esp_idf_version_major = "5",
not(any(esp_idf_version_minor = "0", esp_idf_version_major = "1"))
))]
poll_period_ms: 0,
};

let mac = unsafe { esp_eth_mac_new_w5500(&w5500_cfg, &mac_cfg) };
Expand Down Expand Up @@ -542,6 +552,11 @@ where
),
)))]
custom_spi_driver: eth_spi_custom_driver_config_t::default(),
#[cfg(all(
esp_idf_version_major = "5",
not(any(esp_idf_version_minor = "0", esp_idf_version_major = "1"))
))]
poll_period_ms: 0,
};

let mac = unsafe { esp_eth_mac_new_ksz8851snl(&ksz8851snl_cfg, &mac_cfg) };
Expand Down
Loading