00001 /*************************************************************************** 00002 BSD License 00003 00004 Copyright (c) 2002, Intel Corporation 00005 All rights reserved. 00006 00007 Redistribution and use in source and binary forms, with or without 00008 modification, are permitted provided that the following conditions are met: 00009 00010 a.. Redistributions of source code must retain the above copyright notice, 00011 this list of conditions and the following disclaimer. 00012 b.. Redistributions in binary form must reproduce the above copyright notice, 00013 this list of conditions and the following disclaimer in the documentation 00014 and/or other materials provided with the distribution. 00015 c.. Neither the name of Intel Corporation nor the names of its contributors 00016 may be used to endorse or promote products derived from this software 00017 without specific prior written permission. 00018 00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00022 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 00023 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00024 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00025 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00026 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00027 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00028 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00029 00030 ****************************************************************************/ 00031 00032 #ifndef __WATCHDOG_H__ 00033 #define __WATCHDOG_H__ 00034 00035 /** This is the interface to write to in order to reset the timer */ 00036 #define WATCHDOG_DEVICE "/dev/watchdog" 00037 00038 /**This is the time between watchdog timer resets */ 00039 #define WATCHDOG_RESET_INTERVAL 60 /* seconds */ 00040 00041 00042 extern gboolean watchdog_enabled; 00043 extern unsigned long watchdog_period; 00044 extern int watchdog_fd; 00045 00046 int reset_watchdog(void); 00047 int setup_watchdog_callback(void); 00048 00049 #endif /* __WATCHDOG_H__ */ 00050