1 #include "aos/hal/gpio.h"
2 #include "hal_iomux_haas1000.h"
3 
4 static gpio_dev_t wdg_gpio      = {0, 0, NULL};
5 static int        watchdog_flag = 0;
6 
watchdog_feeddog(void)7 void watchdog_feeddog(void)
8 {
9     if (watchdog_flag == 1) {
10         return;
11     }
12     if (wdg_gpio.port == 0) {
13         wdg_gpio.port   = HAL_IOMUX_PIN_P4_5;
14         wdg_gpio.config = OUTPUT_PUSH_PULL;
15         hal_gpio_init(&wdg_gpio);
16     }
17     hal_gpio_output_toggle(&wdg_gpio);
18 }
19 
watchdog_stopfeed(void)20 void watchdog_stopfeed(void) { watchdog_flag = 1; }
21