summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--cc3200/misc/FreeRTOSHooks.c3
-rw-r--r--cc3200/mods/pybwdt.c15
-rw-r--r--cc3200/mods/pybwdt.h1
3 files changed, 5 insertions, 14 deletions
diff --git a/cc3200/misc/FreeRTOSHooks.c b/cc3200/misc/FreeRTOSHooks.c
index 260cd84e07..a31edccf01 100644
--- a/cc3200/misc/FreeRTOSHooks.c
+++ b/cc3200/misc/FreeRTOSHooks.c
@@ -34,7 +34,6 @@
#include "inc/hw_memmap.h"
#include "pybuart.h"
#include "osi.h"
-#include "pybwdt.h"
#include "mperror.h"
@@ -49,8 +48,6 @@
//*****************************************************************************
void vApplicationIdleHook (void)
{
- // kick the watchdog
- pybwdt_kick();
// signal that we are alive and kicking
mperror_heartbeat_signal();
// gate the processor's clock to save power
diff --git a/cc3200/mods/pybwdt.c b/cc3200/mods/pybwdt.c
index b1a6145c20..d213d319de 100644
--- a/cc3200/mods/pybwdt.c
+++ b/cc3200/mods/pybwdt.c
@@ -73,15 +73,6 @@ __attribute__ ((section (".boot")))
void pybwdt_init0 (void) {
}
-void pybwdt_kick (void) {
- // check that the servers and simplelink are running fine
- if ((pybwdt_data.servers || pybwdt_data.servers_sleeping) && pybwdt_data.simplelink && pybwdt_data.running) {
- pybwdt_data.servers = false;
- pybwdt_data.simplelink = false;
- MAP_WatchdogIntClear(WDT_BASE);
- }
-}
-
void pybwdt_srv_alive (void) {
pybwdt_data.servers = true;
}
@@ -139,7 +130,11 @@ STATIC mp_obj_t pyb_wdt_make_new (mp_obj_t type_in, mp_uint_t n_args, mp_uint_t
/// \function wdt_kick()
/// Kicks the watchdog timer
STATIC mp_obj_t pyb_kick_wdt(mp_obj_t self) {
- pybwdt_kick ();
+ if ((pybwdt_data.servers || pybwdt_data.servers_sleeping) && pybwdt_data.simplelink) {
+ pybwdt_data.servers = false;
+ pybwdt_data.simplelink = false;
+ MAP_WatchdogIntClear(WDT_BASE);
+ }
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_kick_wdt_obj, pyb_kick_wdt);
diff --git a/cc3200/mods/pybwdt.h b/cc3200/mods/pybwdt.h
index 9b96e09222..f87f0a7738 100644
--- a/cc3200/mods/pybwdt.h
+++ b/cc3200/mods/pybwdt.h
@@ -32,7 +32,6 @@
extern const mp_obj_type_t pyb_wdt_type;
void pybwdt_init0 (void);
-void pybwdt_kick (void);
void pybwdt_srv_alive (void);
void pybwdt_srv_sleeping (bool state);
void pybwdt_sl_alive (void);