C++11 header-only library to setup a watchdog timer(WDT) using one single line with an expressive and type-safe syntax without any overhead to the generated code.
using namespace avr::wdt; //turn on the WDT to interrupt at each 4s. wdt::on(timeout::at_4s, mode::interrupt); //turn on the WDT to reset at each 16ms. wdt::on(timeout::at_16ms, mode::reset); //turn on the WDT to interrupt and reset at each 250ms. wdt::on(timeout::at_250ms, mode::interrupt_reset); wdt::off(); //turn off the WDT wdt::reset(); /reset the WDT