/*
 * @file hv_pm51_driver_WDG.h
 * @brief Header file of PM51 watch dog.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 * (+) Use ()
 *
 * @endverbatim
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-03-01
 */
 
#ifndef __HV_PM51_DRIVER_WDG_H__
#define __HV_PM51_DRIVER_WDG_H__

#include "hv_pm51_Base.h"
#include "hv_pm51_Setting.h"

#define DEFAULT_FEED_DOG_TIME  0x20

typedef enum _WdgEn
{
    WDG_DISABLE = 0,
    WDG_ENABLE,
}WdgEn;
    
/**
 * @brief This function set watch dog timer in 100ms.
 * @param [in]  ucVal       watch dog timeout in 100ms,1=100ms,2=200ms....
 * @return None.  
*/
void Hv_PM51_Wdg_SetTimer(UCHAR8 ucVal);

/**
 * @brief This function enable or disable watch dog
 * @param [in]    enEnable            watch dog enable or disable
 * @return None.  
*/
void Hv_PM51_Wdg_SetEnable(WdgEn enEnable);

/**
 * @brief This function feed dog to avoid system reboot
 * @return None. 
*/
void Hv_PM51_Wdg_Feed(void);

#endif
