-
Notifications
You must be signed in to change notification settings - Fork 346
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
Feature Request: Custom WDT handler #21
Comments
I would have to say no to this as not that many people would want to murk around with WDT unless they know what they are doing. And the only thing I would suggest in an ISR routine is setting or clearing a flag/semaphore, not more than that. |
Well, so now we are two of us who would like to have this possibility. And as @rocketscream was saying I needed it for setting or clearing one flag. I "solved" it by copying the powerDown() code (and the dependecies) into my own library. Btw, as I'm thinking about it I needed to have a flag inside WDT ISR only to recognize whether Arduino was woken by WDT or eg. serial line. Maybe I wouldn't need having my own WDT ISR if powerDown() had been returning true or false, whether it slept all the requested time (ie. WDT ISR was executed) or no. |
Draft of my idea: LowPower:
User code:
|
I am also interested in a "special WDT_vect". I have finally delete the library's definition of ISR(WDT_vect) and defined my own in my sketch @rocketscream may be you know how to define "wake" your ISR(DWT_vect) in your library, so anyone than wants to override your function could do it in his sketch This way, there vill be no problem with your library and also we could change the behaviour of the ISR(WDT_vect). is it possible? regards, |
Hello,
I need to do some more stuff inside the WDT ISR handler, but want to avoid modifying the library directly.
Can you please add and ifdef for CustomWDThandler or some other way to allow external function to be called. Something like below?
The text was updated successfully, but these errors were encountered: