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
23 // Structs and types used internal in the module
\r
25 #ifndef _ECUM_INTERNALS_H_
\r
26 #define _ECUM_INTERNALS_H_
\r
28 #if ( ECUM_DEV_ERROR_DETECT == STD_ON )
\r
30 #define VALIDATE(_exp,_api,_err ) \
\r
32 Det_ReportError(MODULE_ID_ECUM, 0, _api, _err); \
\r
35 #define VALIDATE_RV(_exp,_api,_err,_rv ) \
\r
37 Det_ReportError(MODULE_ID_ECUM, 0, _api, _err); \
\r
41 #define VALIDATE_NO_RV(_exp,_api,_err ) \
\r
43 Det_ReportError(MODULE_ID_ECUM, 0, _api, _err); \
\r
46 #define DET_REPORTERROR(_module,_instance,_api,_err) Det_ReportError(_module,_instance,_api,_err)
\r
49 #define VALIDATE(_exp,_api,_err )
\r
50 #define VALIDATE_RV(_exp,_api,_err,_rv )
\r
51 #define VALIDATE_NO_RV(_exp,_api,_err )
\r
52 #define DET_REPORTERROR(_module,_instance,_api,_err)
\r
60 EcuM_ConfigType* config;
\r
61 EcuM_StateType shutdown_target;
\r
63 AppModeType app_mode;
\r
64 EcuM_StateType current_state;
\r
65 #if defined(USE_COMM) || (USE_ECUM_COMM)
\r
66 uint32 run_comm_requests;
\r
68 uint32 run_requests;
\r
69 uint32 postrun_requests;
\r
70 EcuM_WakeupSourceType wakeupEvents;
\r
74 extern EcuM_GlobalType internal_data;
\r
76 void EcuM_enter_run_mode(void);
\r
78 #ifdef CFG_ECUM_USE_SERVICE_COMPONENT
\r
79 void set_current_state(EcuM_StateType state);
\r
81 #define set_current_state(state) internal_data.current_state = (state)
\r
84 void EcuM_AL_DriverInitZero(void);
\r
85 EcuM_ConfigType* EcuM_DeterminePbConfiguration(void);
\r
86 void EcuM_AL_DriverInitOne(const EcuM_ConfigType* ConfigPtr);
\r
87 void EcuM_AL_DriverInitTwo(const EcuM_ConfigType* ConfigPtr);
\r
88 void EcuM_AL_DriverInitThree(const EcuM_ConfigType* ConfigPtr);
\r
91 #endif /*_ECUM_INTERNALS_H_*/
\r