1 /******************************************************************************
2 ** File Name: watchdog_phy.h *
5 ** Copyright: 2010 Spreatrum, Incoporated. All Rights Reserved. *
6 ** Description: This file define the physical layer of I2C device. *
7 ******************************************************************************
9 ******************************************************************************
11 ** ------------------------------------------------------------------------- *
12 ** DATE NAME DESCRIPTION *
13 ** 08/02/2010 Jie Dai Create. *
14 ******************************************************************************/
16 #ifndef __WATCHDOG_PHY_H__
17 #define __WATCHDOG_PHY_H__
19 /*----------------------------------------------------------------------------*
21 **------------------------------------------------------------------------- */
24 /**---------------------------------------------------------------------------*
26 **--------------------------------------------------------------------------*/
32 /**---------------------------------------------------------------------------*
34 **---------------------------------------------------------------------------*/
35 #define WDG_RESULT_OK (int32)(0x00000000)
36 #define WDG_RESULT_ERR (int32)(0xFFFFFFFF)
40 WDG_TIMER_STATE_STOP = 0, //Stop Watch Dog Timer
41 WDG_TIMER_STATE_START, //Start Watch Dog Timer
42 WDG_TIMER_STATE_KEEP //Don't change Watch Dog Timer State
48 WDG_TIMEOUT_MODE_RESET = 0, //Set Watch Dog to Reset Mode
49 WDG_TIMEOUT_MODE_INT, //Set Watch Dog to Interrupt Mode
50 WDG_TIMEOUT_MODE_KEEP //Don't change Watch Dog Mode
55 WDG_TIMER_STATE state;
56 WDG_TIMEOUT_MODE mode;
57 uint32 val; //Set the Timer start val
60 /**----------------------------------------------------------------------------*
61 ** Function Prototype **
62 **----------------------------------------------------------------------------*/
63 /*****************************************************************************/
64 // Description: This function config the watch dog module.
68 /*****************************************************************************/
69 PUBLIC int32 WDG_PHY_CONFIG (WDG_CONFIG_T *cfg);
72 /*****************************************************************************/
73 // Description: This function clear the watch dog interrupt
77 /*****************************************************************************/
78 PUBLIC int32 WDG_PHY_INT_CLR (void);
79 PUBLIC uint32 WDG_PHY_RST_RAW_INT(void);
81 /**----------------------------------------------------------------------------*
83 **----------------------------------------------------------------------------*/
87 /**---------------------------------------------------------------------------*/