# 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
    00041 extern bool watchdogActive() ;
    00042
    00043 extern void watchdogSetInterval(u32 feedIntervalMs) ;
    00044
    00045 extern u32 watchdogGetInterval() ;
    00046
    00047 extern bool watchdogStart(u32 feedIntervalMs) ;
    00048
    00049 extern bool watchdogFeed() ;
    00050
    00051 extern bool watchdogGetTimeoutFlag() ;
    00052
    00053 extern void watchdogClearTimeoutFlag() ;
    00054
    00062 extern void watchdogSuicide() __attribute__ ((noreturn)) ;
    00063
    00064 extern bool watchdogItWasSuicide() ;
    00065
    00066 #endif /* SFBWATCHDOG_H */