Closed nmarks99 closed 1 year ago
In backwards order:
esp32-hal
is unsupported; you probably meant the newer baremetal esp-hal
crates. In any case, I would recommend against mixing these. You either go with ESP IDF, or withoutThanks, I'll check those out. Is there an example anywhere on how to use the callbacks?
Not really sure what exactly you anticipate from an example (calling subscribe
should be pretty trivial), but here's one.
What I would suggest (again) is to join the Matrix channel, and ask your questions there. GitHub issue tracker is not the most ergonomic medium for this type of interaction.
will do thank you!
I've spent a while trying to figure out the easiest way to use interrupts in my esp-idf-hal project however I have not found a good solution and there are no examples on how to do this. I've seen #144 and #177 but neither of these arrive at a great solution. I'm about to do what was done in #177 and use the lower level esp_idf_sys calls to implement gpio interrupts however I would like to know is a better solution exists or what the idiomatic way to go about this would be.
The only example I have been able to find on using a gpio interrupt in a std environment is the button-interrupt example in the std-training repo, which builds when using a RISCV target, however for my esp32 (non-riscv) chip as target, I get the following linker error I have not been able to resolve
dangerous relocation: l32r: literal target out of range (try using text-section-literals)
Finally, one more semi related question I have is, is it possible to use esp32-hal as a dependency in a std build (with esp-idf-hal)? I was having a look at the gpio interrupt example for a no_std build and it seems very straightforward, however I tried (perhaps naively) to simply include the esp32-hal crate in my Cargo.toml and I get the following linker error:
note: some 'extern' functions couldn't be found; some native libraries may need to be installed or have their path specified
Any idea on how to fix this or if this is even a reasonable approach?Any help/suggestions would be greatly appreciated.