]> rtime.felk.cvut.cz Git - arc.git/blobdiff - include/os_config_funcs.h
Merge branch 'mikulka' of git@rtime.felk.cvut.cz:arc into mikulka
[arc.git] / include / os_config_funcs.h
index e8bccec2f1367b8665fcd00819a9b3825ad101c7..516d1f40cdea1f578d359dd1a0b2819328b32756 100644 (file)
-/* -------------------------------- Arctic Core ------------------------------
- * Arctic Core - the open source AUTOSAR platform http://arccore.com
- *
- * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
- *
- * 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 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
- *
- * 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 ------------------------------*/
-
-
-
-
-
-
-
-
-\r
+/* -------------------------------- Arctic Core ------------------------------\r
+ * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
+ *\r
+ * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
+ *\r
+ * This source code is free software; you can redistribute it and/or modify it\r
+ * under the terms of the GNU General Public License version 2 as published by the\r
+ * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
+ *\r
+ * This program is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
+ * for more details.\r
+ * -------------------------------- Arctic Core ------------------------------*/\r
 /*\r
  * This file only be use with the Os_Cfg.c file and os_config_macros.h\r
  */\r
-#include "kernel.h"\r
+#include "internal.h"\r
 #include "Os_Cfg.h"\r
 \r
-// COUNTER, RESOURCE, TSAK, must be at least 1\r
-#define COUNTER_CNT                            ARRAY_SIZE(counter_list)\r
-#define RESOURCE_CNT                   ARRAY_SIZE(resource_list)\r
-#define TASK_CNT                               ARRAY_SIZE(rom_pcb_list)\r
+#error os_config_funcs.h is deprecated\r
 \r
-#if defined(ALARM_USE)\r
-#define ALARM_CNT                              ARRAY_SIZE(alarm_list)\r
-#else\r
-#define ALARM_CNT                              0\r
+#if 0\r
+/** @req OS327 */\r
+#if (OS_SC3 == STD_ON) || (OS_SC4 == STD_ON)\r
+#if (OS_STATUS_STANDARD == STD_ON )\r
+#error req OS327 not fullfilled\r
 #endif\r
-\r
-#if defined(SCHEDULETABLE_USE)\r
-#define SCHEDULETABLE_CNT              ARRAY_SIZE(sched_list)\r
-#else\r
-#define SCHEDULETABLE_CNT              0\r
 #endif\r
 \r
-#if defined(MESSAGE_CNT)\r
-#undef MESSAGE_CNT\r
-#define MESSAGE_CNT                            ARRAY_SIZE(message_list)\r
-#else\r
-#define MESSAGE_CNT                            0\r
-#endif\r
 \r
-#if defined(EVENT_CNT)\r
-#undef EVENT_CNT\r
-#define EVENT_CNT                              ARRAY_SIZE(event_list)\r
-#else\r
-#define EVENT_CNT                              0\r
-#endif\r
+// COUNTER, RESOURCE, TSAK, must be at least 1\r
 \r
-#if defined(SERVICE_CNT)\r
-#undef SERVICE_CNT\r
-#define SERVICE_CNT                            ARRAY_SIZE(os_cfg_trusted_list)\r
-#else\r
-#define SERVICE_CNT                            0\r
+#if (OS_ALARM_CNT!=0)\r
 #endif\r
 \r
-os_error_t os_error;\r
+OsErrorType os_error;\r
 \r
 //-------------------------------------------------------------------\r
 \r
-\r
-/*\r
- * Accessor functions for os_config.c\r
- */\r
-\r
-#if 0\r
-#if SERVICE_CNT!=0\r
-trusted_func_t oil_trusted_func_list[SERVICE_CNT];\r
-#endif\r
-#endif\r
-\r
 /*-----------------------------------------------------------------*/\r
-int Oil_GetApplCnt(void) {\r
-       return APPLICATION_CNT;\r
-}\r
-\r
-rom_app_t *Oil_GetApplObj( ApplicationType application_id ) {\r
-       return &rom_app_list[application_id];\r
-}\r
-\r
-/*-----------------------------------------------------------------*/\r
-int Oil_GetTaskCnt(void) {\r
-       return TASK_CNT;\r
-}\r
-/*-----------------------------------------------------------------*/\r
-\r
-resource_obj_t *Oil_GetResource( ResourceType resource ) {\r
-       return &resource_list[resource];\r
-}\r
-\r
-int Oil_GetResourceCnt() {\r
-       return RESOURCE_CNT;\r
-}\r
+       (void)resource;\r
 \r
 /*-----------------------------------------------------------------*/\r
 \r
-counter_obj_t *Oil_GetCounter(CounterType count_id) {\r
-       return &counter_list[count_id];\r
-}\r
-\r
-uint32 Oil_GetCounterCnt(void ) {\r
-       return COUNTER_CNT;\r
-//     return sizeof(counter_list)/sizeof(counter_obj_t);\r
-}\r
 /*-----------------------------------------------------------------*/\r
 \r
-uint32 Oil_GetSchedCnt(  void ) {\r
-       return SCHEDULETABLE_CNT;\r
-}\r
-\r
-sched_table_t *Oil_GetSched( ScheduleTableType sched_id ) {\r
-#if defined(SCHEDULETABLE_USE)\r
-       if(sched_id < SCHEDULETABLE_CNT) {\r
-               return &sched_list[sched_id];\r
-       } else {\r
-               return NULL;\r
-       }\r
-#else\r
-       return NULL;\r
-#endif\r
-}\r
+       (void)sched_id;\r
 \r
 /*-----------------------------------------------------------------*/\r
 \r
-uint32 Oil_GetAlarmCnt(void) {\r
-       return ALARM_CNT;\r
-}\r
-\r
-alarm_obj_t *Oil_GetAlarmObj( AlarmType alarm_id ) {\r
-#if defined(ALARM_USE)\r
-       if( alarm_id < ALARM_CNT) {\r
-         return &alarm_list[alarm_id];\r
-       } else {\r
-               return NULL;\r
-       }\r
-#else\r
-       return NULL;\r
-#endif\r
-}\r
-\r
-StatusType Oil_GetAlarmBase(AlarmType alarm_id, AlarmBaseRefType info) {\r
-\r
-       StatusType rv = E_OK;\r
-\r
-       if( alarm_id >= Oil_GetAlarmCnt() ) {\r
-               rv = E_OS_ID;\r
-       }\r
-#if defined(ALARM_USE)\r
-       *info = alarm_list[alarm_id].counter->alarm_base;\r
-#endif\r
-       return rv;\r
-}\r
-\r
 \r
 /*-----------------------------------------------------------------*/\r
 \r
-message_obj_t *Oil_GetMessage(MessageType message_id) {\r
-#if MESSAGE_CNT!=0\r
+#if 0\r
+OsMessageType *Os_CfgGetMessage(MessageType message_id) {\r
+#if (OS_MESSAGE_CNT!=0)\r
        return &message_list[message_id];\r
 #else\r
        return NULL;\r
 #endif\r
 }\r
 \r
-uint32 Oil_GetMessageCnt(void ) {\r
-       return MESSAGE_CNT;\r
+uint32 Os_CfgGetMessageCnt(void ) {\r
+       return OS_MESSAGE_CNT;\r
 }\r
+#endif\r
 \r
 /*-----------------------------------------------------------------*/\r
 \r
-uint32 Oil_GetServiceCnt( void ) {\r
-       return SERVICE_CNT;\r
-}\r
-\r
-\r
-/*-----------------------------------------------------------------*/\r
-\r
-void Oil_GetInterruptStackInfo( stack_t *stack ) {\r
-       stack->top = os_interrupt_stack;\r
-       stack->size = sizeof(os_interrupt_stack);\r
+#if (OS_USE_APPLICATIONS == STD_ON)\r
+uint32 Os_CfgGetServiceCnt( void ) {\r
+       return OS_SERVICE_CNT;\r
 }\r
-\r
+#endif\r
+#endif\r
 \r
 \r
 \r