Skip to content

Add auto_reload functionality to timers - #190

Merged
ivmarkov merged 1 commit into
esp-rs:masterfrom
faern:add-timer-auto-reload
Dec 14, 2022
Merged

ivmarkov merged 1 commit into
esp-rs:masterfrom
faern:add-timer-auto-reload

Conversation

@faern

@faern faern commented Dec 13, 2022

Copy link
Copy Markdown
Contributor

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

faern commented Dec 13, 2022 •

Copy link
Copy Markdown
Contributor Author

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
ivmarkov pushed a commit that referenced this pull request Sep 19, 2026
* cleanup stop and disconnection calls

* fix conditional checks
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