You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not quite sure if this is the right place for feature requests, but here we go.
I'd be very cool to have an interface in the WatchdogType classes to see the status of the watchdog reset, given the use case when the reset has occurred and would want to do something with this information at system startup, either log it internally, send information to the serial interface, or do some checks after that.
This is very common on systems that run constantly 24/7, where you may want to know if any watchdog resets have occurred.
I'm using the atmega2560, and it would be as simple as checking the MCUSR register flag, but it would kinda defeat the purpose of having an encapsulated interface such as this.
On the other hand, another useful interface would be access to a callback of the ISR of the watchdog, maybe as a __weak symbol, function pointer or a normal function, to be able to do cleanup tasks before the reset of the system occurs.
I know the real challenge of this would be to generalize across all different boards and architectures supported.
Let me know if this would be a feature of interest, I might be able to help on a pull request, although I only have the atmega2560 to test it on.
Thanks!
Arduino board: Arduino Mega 2560
The text was updated successfully, but these errors were encountered:
Hi,
I'm not quite sure if this is the right place for feature requests, but here we go.
I'd be very cool to have an interface in the WatchdogType classes to see the status of the watchdog reset, given the use case when the reset has occurred and would want to do something with this information at system startup, either log it internally, send information to the serial interface, or do some checks after that.
This is very common on systems that run constantly 24/7, where you may want to know if any watchdog resets have occurred.
I'm using the atmega2560, and it would be as simple as checking the MCUSR register flag, but it would kinda defeat the purpose of having an encapsulated interface such as this.
On the other hand, another useful interface would be access to a callback of the ISR of the watchdog, maybe as a __weak symbol, function pointer or a normal function, to be able to do cleanup tasks before the reset of the system occurs.
I know the real challenge of this would be to generalize across all different boards and architectures supported.
Let me know if this would be a feature of interest, I might be able to help on a pull request, although I only have the atmega2560 to test it on.
Thanks!
The text was updated successfully, but these errors were encountered: