quickdev16/avr/usbload/watchdog.h
2009-07-21 15:47:24 +02:00

41 lines
1.1 KiB
C

/*
* =====================================================================================
*
* .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b.
* 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b
* "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888
* X88 888 888 Y8b. X88 888 888 888 888 888 888
* 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888
*
* www.optixx.org
*
*
* Version: 1.0
* Created: 07/21/2009 03:32:16 PM
* Author: david@optixx.org
*
* =====================================================================================
*/
#include <avr/wdt.h>
#ifndef __WATCHDOG_H__
#define __WATCHDOG_H__
void wdt_init(void) __attribute__((naked)) __attribute__((section(".init3")));
#define soft_reset() \
do \
{ \
wdt_enable(WDTO_500MS );\
for(;;) \
{ \
} \
} while(0)
#endif