# SFBWatchdog.h

Go to the documentation of this file.

    00001 /*
    00002   SFBWatchdog.h - 'Platform independent' watchdog reset declarations
    00003   Copyright (C) 2009 The Regents of the University of New Mexico.  All rights reserved.
    00004
    00005   This library is free software; you can redistribute it and/or
    00006   modify it under the terms of the GNU Lesser General Public
    00007   License as published by the Free Software Foundation; either
    00008   version 2.1 of the License, or (at your option) any later version.
    00009
    00010   This library is distributed in the hope that it will be useful,
    00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013   Lesser General Public License for more details.
    00014
    00015   You should have received a copy of the GNU General Public License
    00016   along with this library; if not, write to the Free Software
    00017   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
    00018   USA
    00019
    00020   $Id$
    00021 */
    00022
    00029 /*
    00030  * WATCH OUT!  These declarations may be defined either in
    00031  * board/SFBWatchdog.cpp or host/SFBWatchdog.cpp, depending on what we
    00032  * are compiling!
    00033  *
    00034  */
    00035
    00036 #ifndef SFBWATCHDOG_H
    00037 #define SFBWATCHDOG_H
    00038
    00039 #include "SFBTypes.h"     /* For u32 */
    00040
    00043 extern bool watchdogActive() ;
    00044
    00053 extern void watchdogSetInterval(u32 feedIntervalMs) ;
    00054
    00058 extern u32 watchdogGetInterval() ;
    00059
    00074 extern bool watchdogStart(u32 feedIntervalMs) ;
    00075
    00088 extern bool watchdogFeed() ;
    00089
    00094 extern bool watchdogGetTimeoutFlag() ;
    00095
    00098 extern void watchdogClearTimeoutFlag() ;
    00099
    00107 extern void watchdogSuicide() __attribute__ ((noreturn)) ;
    00108
    00109 extern bool watchdogItWasSuicide() ;
    00110
    00111 #endif /* SFBWATCHDOG_H */