/** * \file * * * \brief Watchdog interface for AVR architecture. * * \note The avr-libc already provide an api to manage the watchdog on AVR architecture. * In avr-libc are also available several constants used to set the timeout value * (see documentation for more detail). * * * \author Daniele Basile * */ #ifndef DRV_WDT_AVR_H #define DRV_WDT_AVR_H #include "cfg/cfg_wdt.h" #include // INLINE #include #include /** * Reset the watchdog timer. * * This functions is already defind in avr-libc. */ // void wdt_reset(void) /** * Start the watchdog timer that fire at the select * timeout. * * \param _timeout you can use the macro that are defineded in * avr/wdt.h. * * (from avr libc documentation) * WDTO_15MS * WDTO_30MS * WDTO_60MS * WDTO_120MS * WDTO_250MS * WDTO_500MS * WDTO_1S * WDTO_2S * WDTO_4S * WDTO_8S */ INLINE void wdt_start(uint32_t _timeout) { uint8_t timeout = _timeout; wdt_enable(timeout); } /** * Stop watchdog timer. */ INLINE void wdt_stop(void) { wdt_disable(); } #endif /* DRV_WDT_AVR_H */