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

👽️ include gptimer headers #255

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Conversation

Vollbrecht
Copy link
Collaborator

ESP-IDF 5 introduced a new timer api and made the old one "deprecated". This change make it available for consumers of esp-idf-sys.

This variant to just expose it for all versions greater > 4 is the simplest of all but comes with the following potential problems:

  • Hard fault when used with "driver/timer.h" at the same time at runtime(esp-idf made sure at runtime that only one of both is used). This is not a problem for compiling or linking, it is only a potential thing for user that uses esp-idf-sys directly.

Unfortunately esp-idf doesn't expose a good kconfig variable, to selectively import the headers based on it. If we are desperate we could hack into the "GPTIMER_SUPPRESS_DEPRECATE_WARN" kconfig, if the user set this in his sdkconfig file we would only compile the new one and if its unset it would use the old api. Since this is really hacky i suppose we should just go with the first option for now.

My driver downstream in (esp-idf-hal) will be feature gated for now, and if activated, will disable the old driver completely. Though it would be nicer if we could get that info from upstream.

@ivmarkov ivmarkov merged commit 627e07e into esp-rs:master Nov 7, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants