1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\r
6 * This source code is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the GNU General Public License version 2 as published by the
\r
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
\r
10 * This program is distributed in the hope that it will be useful, but
\r
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
14 * -------------------------------- Arctic Core ------------------------------
\r
17 * Created on: 22 feb 2010
\r
21 // 904 PC-Lint MISRA 14.7: OK. Allow VALIDATE_ENTITY_ID, VALIDATE and VALIDATE_NO_RETURNVAL to return value.
\r
22 //lint -emacro(904,VALIDATE,VALIDATE_NO_RETURNVAL)
\r
25 #if defined(USE_DET)
\r
29 #define VALIDATE(_expr, _api, _errorcode) \
\r
31 Det_ReportError(MODULE_ID_WDGIF,0,_api,_errorcode ); \
\r
36 #define VALIDATE_NO_RETURNVAL(_expr, _api, _errorcode) \
\r
38 Det_ReportError(MODULE_ID_WDGIF,0,_api,_errorcode ); \
\r
43 Std_ReturnType WdgIf_SetMode (uint8 DeviceIndex, WdgIf_ModeType Mode)
\r
45 Std_ReturnType ret = E_NOT_OK;
\r
46 VALIDATE((WdgIfConfig.WdgIf_General->WdgIf_NumberOfDevices > DeviceIndex), WDGIF_SETMODE_ID, WDGIF_E_PARAM_DEVICE);
\r
48 return WdgIfConfig.WdgIf_Device[DeviceIndex].WdgRef->Wdg_SetModeLocationPtr(Mode);
\r
51 void WdgIf_Trigger (uint8 DeviceIndex)
\r
53 VALIDATE_NO_RETURNVAL((WdgIfConfig.WdgIf_General->WdgIf_NumberOfDevices > DeviceIndex), WDGIF_TRIGGER_ID, WDGIF_E_PARAM_DEVICE);
\r
54 WdgIfConfig.WdgIf_Device[DeviceIndex].WdgRef->Wdg_TriggerLocationPtr();
\r