STC15W408AS library 0.9.0
wdt.h File Reference
#include <sys.h>
#include <bits.h>
Include dependency graph for wdt.h:

Go to the source code of this file.

Macros

watchdog timer

Watchdog timer functions

#define wdt_init(wdt_scale)
 Init WDT. More...
 
#define wdt_start()   (bit_set(WDT_CONTR, SBIT5))
 Start WDT. More...
 
#define wdt_stop()   (bit_clr(WDT_CONTR, CBIT5))
 Stop WDT. More...
 
#define is_wdt_started()   (test_if_bit_set(WDT_CONTR, SBIT5))
 Get WDT start status. More...
 
#define wdt_clear()   (bit_set(WDT_CONTR, SBIT4))
 clear WDT to prevent restart More...
 
#define is_wdt_flag_on()   (test_if_bit_set(WDT_CONTR, SBIT7))
 Get reset by WDT flag. More...
 
#define wdt_flag_reset()   (bit_clr(WDT_CONTR, CBIT7))
 Reset WDT flag. More...
 
#define wdt_enable_in_idle()   (bit_set(WDT_CONTR, SBIT3))
 Enable WDT in MCU idle mode. More...
 
#define wdt_disable_in_idle()   (bit_clr(WDT_CONTR, CBIT3))
 Disable WDT in MCU idle mode. More...