summaryrefslogtreecommitdiff
path: root/digital/beacon/src/misc.c
diff options
context:
space:
mode:
authorFlorent Duchon2012-05-03 23:54:14 +0200
committerFlorent Duchon2012-05-04 00:06:29 +0200
commit352d48f377ebfdd17dc57a5b04cec5e71e2a452d (patch)
tree5396698f6f5e273d3799efc7dce58b7f9cd7561a /digital/beacon/src/misc.c
parent1ead3b0f14353ea5fcb756d4cc99d10d437be08b (diff)
digital/beacon: add avr reset function
Diffstat (limited to 'digital/beacon/src/misc.c')
-rw-r--r--digital/beacon/src/misc.c7
1 files changed, 7 insertions, 0 deletions
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)
{