Project

General

Profile

Statistics
| Revision:

root / trunk / common / reset.c @ 176

History | View | Annotate | Download (446 Bytes)

1
#include <avr/wdt.h>
2

    
3
/**
4
 * This function resets the board, resetting the hardware back to almost the
5
 * same state as a power on reset. Note that you must do the following in
6
 * this order upon reset or the process will fail:
7
 *
8
 * 1. Reset WDRF in MCUSR to 0
9
 * 2. call wdt_diable() to disable the watchdog in the right order
10
 * 3. Set WDTCSR to clear out all traces of the watchdog timer
11
 **/
12
void reset(void) {
13
    wdt_enabled(WDTO_15MS);
14
}