You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

152 lines
3.6 KiB

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2004-2021. All rights reserved.
* Description:api define for wdg
*/
#include "uapi_wdg.h"
#include "mpi_wdg_ext.h"
/*
* Function: uapi_wdg_init
* Description: Init WDG devide
* Calls: EXT_WDG_Open
* Data Accessed: NA
* Data Updated: NA
* Input: NA
* Output: NA
* Return: ErrorCode(reference to document)
* Others: NA
*/
td_s32 uapi_wdg_init(td_void)
{
return ext_mpi_wdg_init();
}
/*
* Function: uapi_wdg_deinit
* Description: Deinit WDG device
* Calls: EXT_WDG_Close
* Data Accessed: NA
* Data Updated: NA
* Input: NA
* Output: NA
* Return: ErrorCode(reference to document)
* Others: NA
*/
td_s32 uapi_wdg_deinit(td_void)
{
return ext_mpi_wdg_deinit();
}
/*
* Function: uapi_wdg_get_num
* Description: get WDG device capability
* Calls: EXT_WDG_Enable
* Data Accessed: NA
* Data Updated: NA
* Input: NA
* Output: NA
* Return: ErrorCode(reference to document)
* Others: NA
*/
td_s32 uapi_wdg_get_num(td_u32 *wdg_num)
{
return ext_mpi_wdg_get_num(wdg_num);
}
/*
* Function: uapi_wdg_enable
* Description: enable WDG device
* Calls: EXT_WDG_Enable
* Data Accessed: NA
* Data Updated: NA
* Input: NA
* Output: NA
* Return: ErrorCode(reference to document)
* Others: NA
*/
td_s32 uapi_wdg_enable(td_u32 wdg_id)
{
return ext_mpi_wdg_enable(wdg_id);
}
/*
* Function: uapi_wdg_disable
* Description: disable WDG device
* Calls: EXT_WDG_Disable
* Data Accessed: NA
* Data Updated: NA
* Input: NA
* Output: NA
* Return: ErrorCode(reference to document)
* Others: NA
*/
td_s32 uapi_wdg_disable(td_u32 wdg_id)
{
return ext_mpi_wdg_disable(wdg_id);
}
/*
* Function: uapi_wdg_set_timeout
* Description: set the time interval of feeding the WDG
* Calls: EXT_WDG_SetTimeout
* Data Accessed: NA
* Data Updated: NA
* Input: NA
* Output: NA
* Return: ErrorCode(reference to document)
* Others: NA
*/
td_s32 uapi_wdg_set_timeout(td_u32 wdg_id, td_u32 value)
{
return ext_mpi_wdg_set_timeout(wdg_id, value);
}
/*
* Function: uapi_wdg_get_timeout
* Description: get the time interval of feeding the WDG
* Calls: EXT_WDG_GetTimeout
* Data Accessed: NA
* Data Updated: NA
* Input: NA
* Output: NA
* Return: ErrorCode(reference to document)
* Others: NA
*/
td_s32 uapi_wdg_get_timeout(td_u32 wdg_id, td_u32 *value)
{
return ext_mpi_wdg_get_timeout(wdg_id, value);
}
/*
* Function: uapi_wdg_clear
* Description: clear the WDG
* Calls: EXT_WDG_ClearWatchDog
* Data Accessed: NA
* Data Updated: NA
* Input: NA
* Output: NA
* Return: ErrorCode(reference to document)
* Others: NA
*/
td_s32 uapi_wdg_clear(td_u32 wdg_id)
{
return ext_mpi_wdg_clear(wdg_id);
}
/*
* Function: uapi_wdg_reset
* Description: reset WDG
* Calls: EXT_WDG_Reset
* Data Accessed: NA
* Data Updated: NA
* Input: NA
* Output: NA
* Return: ErrorCode(reference to document)
* Others: NA
*/
td_s32 uapi_wdg_reset(td_u32 wdg_id)
{
return ext_mpi_wdg_reset(wdg_id);
}