Revision 891
Moved comments to headers. That was painful.
reset.c | ||
---|---|---|
36 | 36 |
#include <util/delay.h> |
37 | 37 |
#include <reset.h> |
38 | 38 |
|
39 |
/** |
|
40 |
* @defgroup reset Reset |
|
41 |
* Functions for manipulation the ADC on the dragonfly board. |
|
42 |
* All definitions may be found in analog.h. |
|
43 |
* |
|
44 |
* @{ |
|
45 |
**/ |
|
46 |
|
|
47 |
/** |
|
48 |
* Resets the AVR when called. Sets the watchdog timer and lets it overflow |
|
49 |
* to reset the AVR. The reset clears all memory and resets all registers |
|
50 |
* with the exception of the Watchdog Reset Flag (WDRF) in the MCU Control |
|
51 |
* and Status Register (MCUCSR). |
|
52 |
**/ |
|
53 | 39 |
void reset(void) { |
54 | 40 |
WDTCR &= 0xF8; |
55 | 41 |
WDTCR |= 0x08; |
56 | 42 |
_delay_ms(15); |
57 | 43 |
} |
58 | 44 |
|
59 |
/**@}**/ //end defgroup |
|
60 |
|
Also available in: Unified diff