From 352d48f377ebfdd17dc57a5b04cec5e71e2a452d Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Thu, 3 May 2012 23:54:14 +0200 Subject: digital/beacon: add avr reset function --- digital/beacon/src/misc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'digital/beacon/src/misc.c') diff --git a/digital/beacon/src/misc.c b/digital/beacon/src/misc.c index 616df71d..04db1de5 100644 --- a/digital/beacon/src/misc.c +++ b/digital/beacon/src/misc.c @@ -26,6 +26,13 @@ #include "misc.h" #include "network.h" +/* This function resets the avr using the embedded watchdog */ +void reset_avr(void) +{ + wdt_enable (WDTO_15MS); + while (1); +} + /* This function simulates the jack's state and send it over the air */ void jack_on_off(void) { -- cgit v1.2.3