HWA
Bare metal programming with style
Class _wda: watchdog timer

This is used by:

Interrupts

Actions



hwa( configure, ... ) - Configure the watchdog

When action is irq_or_reset the watchdog IRQ is enabled. It is disabled by hardware after a first timeout occurs. Then, if you do not re-enable the IRQ, the next timeout resets the device.

hwa( configure, watchdog0,
[ timeout, 16ms
| 32ms
| 64ms
| 125ms
| 250ms
| 500ms
| 1s
| 2s
| 4s
| 8s, ]
action, none
| irq
| reset
| irq_or_reset
);



hw( enable, ... ), hwa( enable, ... ) - Enable the watchdog

hw( enable, watchdog0 );
hwa( enable, watchdog0 );



hw( disable, ... ), hwa( disable, ... ) - Disable the watchdog

hw( disable, watchdog0 );
hwa( disable, watchdog0 );



hw( reset, ... ) - Reset the watchdog timer (issues a wdr):

hw( reset, watchdog0 );
hwa
#define hwa(...)
hwa( action, object [,...] ) stores an action for an object into a HWA context.
Definition: hwa_macros.h:552
hw
#define hw(...)
hw( action, object [,...] ) executes an action immediately on an object.
Definition: hwa_macros.h:523