quickdev16/avr/usbload/watchdog.h
2009-08-01 13:29:52 +02:00

43 lines
1.2 KiB
C

/*
* =====================================================================================
*
* ________ .__ __ ________ ____ ________
* \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/
* / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \
* / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \
* \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ /
* \__> \/ \/ \/ \/ \/
*
* 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