/* * * pal_sysWdTimer.h * Description: * see below * * * Copyright (C) 2008, Texas Instruments, Incorporated * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * */ /****************************************************************************** * FILE PURPOSE: Watchdog Timer Module Header ******************************************************************************** * FILE NAME: wdtimer.h * * DESCRIPTION: Platform and OS independent API for watchdog timer module * * REVISION HISTORY: * 27 Nov 02 - PSP TII * *******************************************************************************/ #ifndef __WDTIMER_H__ #define __WDTIMER_H__ #include #include #include /* Return Codes */ #define WDTIMER_RET_OK 0 #define WDTIMER_RET_ERR -1 #define WDTIMER_ERR_INVAL -2 /**************************************************************************** * Type: PLA_SYS_WDTIMER_STRUCT_T **************************************************************************** * Description: This type defines the hardware configuration of the * watchdog timer ***************************************************************************/ typedef struct PAL_SYS_WDTIMER_STRUCT_tag { unsigned int kick_lock; unsigned int kick; unsigned int change_lock; unsigned int change ; unsigned int disable_lock; unsigned int disable; unsigned int prescale_lock; unsigned int prescale; } PAL_SYS_WDTIMER_STRUCT_T; /**************************************************************************** * Type: PAL_SYS_WDTIMER_CTRL_T **************************************************************************** * Description: This type defines start and stop values for the timer. * ***************************************************************************/ typedef enum PAL_SYS_WDTIMER_CTRL_tag { WDTIMER_CTRL_DISABLE = 0, WDTIMER_CTRL_ENABLE } PAL_SYS_WDTIMER_CTRL_T ; void PAL_sysWdtimerInit(unsigned int base_addr, unsigned int clk_freq); int PAL_sysWdtimerSetPeriod( unsigned int msec ); int PAL_sysWdtimerCtrl(PAL_SYS_WDTIMER_CTRL_T wd_ctrl); int PAL_sysWdtimerKick(void); #endif /* __WDTIMER_H__ */