Skip to content

Add auto_reload functionality to timers #190

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

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

faern
Copy link
Contributor

@faern faern commented Dec 13, 2022

Fixes #187

I did not expose setters or getters for the auto_reload value after creation. Having those would maybe be nicer, but I did not find any *_in_isr version for set_auto_reload and no non-in_isr version of get_auto_reload. So I ignored that for now. Having this in Config at least allows me to do what I want to do with the timers.

@faern
Copy link
Contributor Author

faern commented Dec 13, 2022

I can't build and test this on master myself. I had to backport my commit to the v0.40.1 tag in order to test it. master just throws a bunch of these for me:

error[E0599]: no function or associated item named `from_infallible` found for struct `esp_idf_sys::EspError` in the current scope
   --> /home/faern/src/embedded/thirdparty/esp-idf-hal/src/i2c.rs:138:34
    |
138 |             return Err(EspError::from_infallible::<ESP_ERR_INVALID_ARG>());
    |                                  ^^^^^^^^^^^^^^^ function or associated item not found in `esp_idf_sys::EspError`

EDIT: Ah. from_infallible was added in esp-idf-sys 0.32.1. This crate has to up the lower bound on the dependency.

@ivmarkov ivmarkov merged commit 4339201 into esp-rs:master Dec 14, 2022
@faern faern deleted the add-timer-auto-reload branch December 23, 2022 23:31
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.

Expose possibility to make timers automatically recurring (enable auto reload)
2 participants