cc1200: call watchdog_periodic while in busy-wait

This commit is contained in:
Simon Duquennoy 2016-09-23 09:07:58 +02:00
parent 086499a864
commit 5dd3d03699

View File

@ -40,6 +40,7 @@
#include "net/netstack.h"
#include "net/packetbuf.h"
#include "net/rime/rimestats.h"
#include "dev/watchdog.h"
#include "dev/leds.h"
@ -289,7 +290,9 @@ extern const cc1200_rf_cfg_t CC1200_RF_CFG;
do { \
rtimer_clock_t t0; \
t0 = RTIMER_NOW(); \
while(!(cond) && RTIMER_CLOCK_LT(RTIMER_NOW(), t0 + (max_time))) {} \
while(!(cond) && RTIMER_CLOCK_LT(RTIMER_NOW(), t0 + (max_time))) { \
watchdog_periodic(); \
} \
} while(0)
/*---------------------------------------------------------------------------*/
#if CC1200_USE_GPIO2