From: mahi Date: Sat, 8 Sep 2012 07:18:00 +0000 (+0200) Subject: SchM: Added more Schm files. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/arc.git/commitdiff_plain/0009f7bfc294607250215c97a1b430bb727661a7 SchM: Added more Schm files. --- diff --git a/system/SchM/SchM.c b/system/SchM/SchM.c index 1bae0464..655b8c74 100644 --- a/system/SchM/SchM.c +++ b/system/SchM/SchM.c @@ -147,8 +147,6 @@ #if defined(USE_PDUR) #include "PduR.h" #include "SchM_PduR.h" -#else -#define SCHM_MAINFUNCTION_PDUR() #endif #if defined(USE_COM) @@ -191,8 +189,6 @@ #if defined(USE_PWM) #include "Pwm.h" #include "SchM_Pwm.h" -#else -#define SCHM_MAINFUNCTION_PWM() #endif @@ -299,6 +295,20 @@ #define SCHM_MAINFUNCTION_WDMG() #endif +SCHM_DECLARE(CAN_WRITE); +SCHM_DECLARE(CAN_READ); +SCHM_DECLARE(CAN_BUSOFF); +SCHM_DECLARE(CAN_WAKEUP); +SCHM_DECLARE(CAN_ERROR); +SCHM_DECLARE(COMRX); +SCHM_DECLARE(COMTX); +SCHM_DECLARE(CANTP); +SCHM_DECLARE(CANNM); +SCHM_DECLARE(DCM); +SCHM_DECLARE(DEM); +SCHM_DECLARE(COMM); +SCHM_DECLARE(NM); +SCHM_DECLARE(CANSM); SCHM_DECLARE(ECUM); SCHM_DECLARE(NVM); SCHM_DECLARE(FEE); @@ -384,7 +394,6 @@ TASK(SchM_BswService) { SCHM_MAINFUNCTION_CAN_ERROR(); SCHM_MAINFUNCTION_CAN_WAKEUP(); - SCHM_MAINFUNCTION_PDUR(); SCHM_MAINFUNCTION_COMRX(); SCHM_MAINFUNCTION_COMTX(); @@ -393,7 +402,7 @@ TASK(SchM_BswService) { SCHM_MAINFUNCTION_J1939TP(); SCHM_MAINFUNCTION_DCM(); SCHM_MAINFUNCTION_DEM(); - SCHM_MAINFUNCTION_PWM(); + SCHM_MAINFUNCTION_IOWHAB(); SCHM_MAINFUNCTION_COMM(); SCHM_MAINFUNCTION_NM(); diff --git a/system/SchM/SchM_Can.h b/system/SchM/SchM_Can.h index 4fda7b5d..f35d039c 100644 --- a/system/SchM/SchM_Can.h +++ b/system/SchM/SchM_Can.h @@ -16,6 +16,10 @@ #ifndef SCHM_CAN_H_ #define SCHM_CAN_H_ - +#define SCHM_MAINFUNCTION_CAN_WRITE() SCHM_MAINFUNCTION(CAN_WRITE,Can_MainFunction_Write()) +#define SCHM_MAINFUNCTION_CAN_READ() SCHM_MAINFUNCTION(CAN_READ,Can_MainFunction_Read()) +#define SCHM_MAINFUNCTION_CAN_BUSOFF() SCHM_MAINFUNCTION(CAN_BUSOFF,Can_MainFunction_BusOff()) +#define SCHM_MAINFUNCTION_CAN_WAKEUP() SCHM_MAINFUNCTION(CAN_WAKEUP,Can_MainFunction_Wakeup()) +#define SCHM_MAINFUNCTION_CAN_ERROR() SCHM_MAINFUNCTION(CAN_ERROR,Can_MainFunction_Error()) #endif /* SCHM_CAN_H_ */ diff --git a/system/SchM/SchM_CanNm.h b/system/SchM/SchM_CanNm.h new file mode 100644 index 00000000..30238d6b --- /dev/null +++ b/system/SchM/SchM_CanNm.h @@ -0,0 +1,22 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + +#ifndef SCHM_CANNM_H_ +#define SCHM_CANNM_H_ + +#define SCHM_MAINFUNCTION_CANNM() SCHM_MAINFUNCTION(CANNM,CanNm_MainFunction()) + + +#endif /* SCHM_CANNM_H_ */ diff --git a/system/SchM/SchM_CanSM.h b/system/SchM/SchM_CanSM.h new file mode 100644 index 00000000..09717d12 --- /dev/null +++ b/system/SchM/SchM_CanSM.h @@ -0,0 +1,22 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + + +#ifndef SCHM_CANSM_H_ +#define SCHM_CANSM_H_ + +#define SCHM_MAINFUNCTION_CANSM() SCHM_MAINFUNCTION(CANSM,CanSM_MainFunction()) + +#endif /* SCHM_CANSM_H_ */ diff --git a/system/SchM/SchM_CanTp.h b/system/SchM/SchM_CanTp.h index 718aa841..3e573481 100644 --- a/system/SchM/SchM_CanTp.h +++ b/system/SchM/SchM_CanTp.h @@ -16,5 +16,6 @@ #ifndef SCHM_CANTP_H_ #define SCHM_CANTP_H_ +#define SCHM_MAINFUNCTION_CANTP() SCHM_MAINFUNCTION(CANTP,CanTp_MainFunction()) #endif /* SCHM_CANTP_H_ */ diff --git a/system/SchM/SchM_Com.h b/system/SchM/SchM_Com.h new file mode 100644 index 00000000..93b9a422 --- /dev/null +++ b/system/SchM/SchM_Com.h @@ -0,0 +1,23 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + + +#ifndef SCHM_COM_H_ +#define SCHM_COM_H_ + +#define SCHM_MAINFUNCTION_COMRX() SCHM_MAINFUNCTION(COMRX,Com_MainFunctionRx()) +#define SCHM_MAINFUNCTION_COMTX() SCHM_MAINFUNCTION(COMTX,Com_MainFunctionTx()) + +#endif /* SCHM_COM_H_ */ diff --git a/system/SchM/SchM_ComM.h b/system/SchM/SchM_ComM.h new file mode 100644 index 00000000..ac38932e --- /dev/null +++ b/system/SchM/SchM_ComM.h @@ -0,0 +1,22 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + + +#ifndef SCHM_COMM_H_ +#define SCHM_COMM_H_ + +#define SCHM_MAINFUNCTION_COMM() SCHM_MAINFUNCTION(COMM,ComM_MainFunction()) + +#endif /* SCHM_COMM_H_ */ diff --git a/system/SchM/SchM_Dcm.h b/system/SchM/SchM_Dcm.h new file mode 100644 index 00000000..48eebb89 --- /dev/null +++ b/system/SchM/SchM_Dcm.h @@ -0,0 +1,22 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + + +#ifndef SCHM_DCM_H_ +#define SCHM_DCM_H_ + +#define SCHM_MAINFUNCTION_DCM() SCHM_MAINFUNCTION(DCM,Dcm_MainFunction()) + +#endif /* SCHM_DCM_H_ */ diff --git a/system/SchM/SchM_Dem.h b/system/SchM/SchM_Dem.h new file mode 100644 index 00000000..23b6aefe --- /dev/null +++ b/system/SchM/SchM_Dem.h @@ -0,0 +1,22 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + + +#ifndef SCHM_DEM_H_ +#define SCHM_DEM_H_ + +#define SCHM_MAINFUNCTION_DEM() SCHM_MAINFUNCTION(DEM,Dem_MainFunction()) + +#endif /* SCHM_DEM_H_ */ diff --git a/system/SchM/SchM_Nm.h b/system/SchM/SchM_Nm.h new file mode 100644 index 00000000..a0f2ed1c --- /dev/null +++ b/system/SchM/SchM_Nm.h @@ -0,0 +1,22 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + + +#ifndef SCHM_NM_H_ +#define SCHM_NM_H_ + +#define SCHM_MAINFUNCTION_NM() SCHM_MAINFUNCTION(NM,Nm_MainFunction()) + +#endif /* SCHM_NM_H_ */ diff --git a/system/SchM/SchM_PduR.h b/system/SchM/SchM_PduR.h new file mode 100644 index 00000000..1f2d105d --- /dev/null +++ b/system/SchM/SchM_PduR.h @@ -0,0 +1,21 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + +#ifndef SCHM_PDUR_H_ +#define SCHM_PDUR_H_ + + + +#endif /* SCHM_PDUR_H_ */ diff --git a/system/SchM/SchM_Pwm.h b/system/SchM/SchM_Pwm.h new file mode 100644 index 00000000..3a58a667 --- /dev/null +++ b/system/SchM/SchM_Pwm.h @@ -0,0 +1,21 @@ +/* -------------------------------- Arctic Core ------------------------------ + * Arctic Core - the open source AUTOSAR platform http://arccore.com + * + * Copyright (C) 2009 ArcCore AB + * + * This source code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation; See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * -------------------------------- Arctic Core ------------------------------*/ + +#ifndef SCHM_PWM_H_ +#define SCHM_PWM_H_ + + + +#endif /* SCHM_PWM_H_ */ diff --git a/system/SchM/SchM_cfg.h b/system/SchM/SchM_cfg.h index 4c418b24..04e80465 100644 --- a/system/SchM/SchM_cfg.h +++ b/system/SchM/SchM_cfg.h @@ -26,12 +26,18 @@ #define SCHM_CYCLE_MAIN (5) #define SCHM_MAINFUNCTION_CYCLE_ADC SCHM_CYCLE_MAIN -#define SCHM_MAINFUNCTION_CYCLE_CAN SCHM_CYCLE_MAIN +#define SCHM_MAINFUNCTION_CYCLE_CAN_WRITE SCHM_CYCLE_MAIN +#define SCHM_MAINFUNCTION_CYCLE_CAN_READ SCHM_CYCLE_MAIN +#define SCHM_MAINFUNCTION_CYCLE_CAN_BUSOFF SCHM_CYCLE_MAIN +#define SCHM_MAINFUNCTION_CYCLE_CAN_WAKEUP SCHM_CYCLE_MAIN +#define SCHM_MAINFUNCTION_CYCLE_CAN_ERROR SCHM_CYCLE_MAIN + #define SCHM_MAINFUNCTION_CYCLE_CANNM SCHM_CYCLE_MAIN #define SCHM_MAINFUNCTION_CYCLE_CANSM SCHM_CYCLE_MAIN #define SCHM_MAINFUNCTION_CYCLE_CANTP SCHM_CYCLE_MAIN #define SCHM_MAINFUNCTION_CYCLE_CANTRCV SCHM_CYCLE_MAIN -#define SCHM_MAINFUNCTION_CYCLE_COM SCHM_CYCLE_MAIN +#define SCHM_MAINFUNCTION_CYCLE_COMRX SCHM_CYCLE_MAIN +#define SCHM_MAINFUNCTION_CYCLE_COMTX SCHM_CYCLE_MAIN #define SCHM_MAINFUNCTION_CYCLE_COMM SCHM_CYCLE_MAIN #define SCHM_MAINFUNCTION_CYCLE_DCM SCHM_CYCLE_MAIN #define SCHM_MAINFUNCTION_CYCLE_DEM SCHM_CYCLE_MAIN