/****************************************************************
 ****************************************************************
 **                                                            **
 **    (C)Copyright 2005-2006, American Megatrends Inc.        **
 **                                                            **
 **            All Rights Reserved.                            **
 **                                                            **
 **        6145-F, Northbelt Parkway, Norcross,                **
 **                                                            **
 **        Georgia - 30071, USA. Phone-(770)-246-8600.         **
 **                                                            **
 ****************************************************************
 ****************************************************************/
/*****************************************************************
 *
 * WDT.h
 * 
 * 
 * Author: Govind Kothandapani <govindk@ami.com> 
 *       : Rama Bisa <ramab@ami.com>
 *       : Basavaraj Astekar <basavaraja@ami.com>
 *       : Bakka Ravinder Reddy <bakkar@ami.com>
 * 
 *****************************************************************/
#ifndef WDTMGR_H
#define WDTMGR_H

#include "com_BmcType.h"
#include "com_IPMIDefs.h"
#include "PMConfig.h"

#pragma pack( 1 )

/*** Type definitions ***/
// Resume ARP Thread 
#define RESUME_ARPS     0x00 
#define WDT_SLEEP_TIME 	100000
#define WDT_COUNT_MS 	100
#define SEC_TO_MS 		1000

/**
 * @struct  WDTTmrMgr_T
 * @brief   Watchdog Timer table
**/
typedef struct
{
    uint8_t       TmrPresent;         /**< Flag to indicate timer is present or not */
    uint16_t      TmrInterval;        /**< Timer interval */
    uint16_t      PreTimeOutInterval; /**< Pre Timeout interval */
    WDTConfig_T   WDTTmr;             /**< Watchdog timer configurations */

}   WDTTmrMgr_T;

#pragma pack( )

/**
 * @var  WDTTmrMgr_T g_WDTTmrMgr
 * @brief   Watchdog Timer table
 * @warning Should not be used from task other than Message Handler
**/
extern  WDTTmrMgr_T g_WDTTmrMgr;

/**
 * @brief Watchdog timer task invoked every second from timer task
 **/
extern void WDTTimerTask (void*Arg);

 /*-----------------------------------------------------------------
 * @fn StopWDTTimer
 *
 * @brief This is provided to stop Watchdog Timer.
 *
 * @return None.
 *-----------------------------------------------------------------*/
extern void StopWDTTimer (void);

#endif /* WDTMGR_H */
