rwmingis / InterruptButton

This is an interrupt based button event library for the ESP32. It enables binding user defined actions to button events including 'Key Down', Key Up' , 'Key Press', 'Long Key Press' 'AutoRepeat Press' and 'Double-Click'. The actions associated it these events may be executed Asynchronously, Synchronously, or a Hybrid between the two.
MIT License
30 stars 8 forks source link

replacing Arduino methods with IDF's #8

Closed vortigont closed 2 years ago

vortigont commented 2 years ago

Hi @rwmingis I've made the changes required to build the lib without any dependency to Arduino.h. Also it could be build solely as an IDF component via provided CMake file.

Pls, check commits one by one, I've tried to make it as granular as possible. Had to change constructor a little bit. You may wanna merge this into some separate branch and make you corrections there on top of my changes. That way it would be easier for me to rebase further changes if any. Having this as a milestone next thing I'll try to do some more drastic changes and introduce RTOS queue or event to ISR handling. This way I suppose it would be possible to fix the issue with dynamic button objects.

Let me know if you have any questions or concerns. Cheers!

rwmingis commented 2 years ago

Hi @vortigont,

Wow, thanks for all that suggested code. It all looks great, and the one bit I was going to question, you have already fixed in the clean up commit.

I pretty much agree with all your suggestions, so will plan on implementing them in the next few days as free time comes available.

I think this is going to be great. really hope this gets picked up by the community and finally have a chance to give back. 👍

Cheers,

Rob

vortigont commented 2 years ago

Thanks for your feedback, Rob! This should become a pretty nice button lib for all esp32 family chips. I already use it to control light switches and dimming in my house :) The project is still under development, but works pretty fine so far :+1: