]> rtime.felk.cvut.cz Git - arc.git/blobdiff - include/os_config_funcs.h
Again, loads of refactoring and removing and adding files.
[arc.git] / include / os_config_funcs.h
index e8bccec2f1367b8665fcd00819a9b3825ad101c7..2524b0c93a30c403bbd6a37400eccba96dacd8ae 100644 (file)
  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  * for more details.
  * -------------------------------- 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 "Os_Cfg.h"\r
+
+/** @req OS327 */
+#if (OS_SC3 == STD_ON) || (OS_SC4 == STD_ON)
+#if (OS_STATUS_STANDARD == STD_ON )
+#error req OS327 not fullfilled
+#endif
+#endif
+
 \r
 // COUNTER, RESOURCE, TSAK, must be at least 1\r
 #define COUNTER_CNT                            ARRAY_SIZE(counter_list)\r
@@ -80,14 +79,16 @@ trusted_func_t oil_trusted_func_list[SERVICE_CNT];
 #endif\r
 #endif\r
 \r
-/*-----------------------------------------------------------------*/\r
+/*-----------------------------------------------------------------*/
+#if (  OS_SC3 == STD_ON) || (  OS_SC4==STD_ON)\r
 int Oil_GetApplCnt(void) {\r
        return APPLICATION_CNT;\r
 }\r
 \r
-rom_app_t *Oil_GetApplObj( ApplicationType application_id ) {\r
+OsRomApplicationType *Oil_GetApplObj( ApplicationType application_id ) {\r
        return &rom_app_list[application_id];\r
-}\r
+}
+#endif\r
 \r
 /*-----------------------------------------------------------------*/\r
 int Oil_GetTaskCnt(void) {\r
@@ -95,7 +96,7 @@ int Oil_GetTaskCnt(void) {
 }\r
 /*-----------------------------------------------------------------*/\r
 \r
-resource_obj_t *Oil_GetResource( ResourceType resource ) {\r
+OsResourceType *Oil_GetResource( ResourceType resource ) {\r
        return &resource_list[resource];\r
 }\r
 \r
@@ -105,13 +106,13 @@ int Oil_GetResourceCnt() {
 \r
 /*-----------------------------------------------------------------*/\r
 \r
-counter_obj_t *Oil_GetCounter(CounterType count_id) {\r
+OsCounterType *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
+//     return sizeof(counter_list)/sizeof(OsCounterType);\r
 }\r
 /*-----------------------------------------------------------------*/\r
 \r
@@ -119,7 +120,7 @@ uint32 Oil_GetSchedCnt(  void ) {
        return SCHEDULETABLE_CNT;\r
 }\r
 \r
-sched_table_t *Oil_GetSched( ScheduleTableType sched_id ) {\r
+OsSchTblType *Oil_GetSched( ScheduleTableType sched_id ) {\r
 #if defined(SCHEDULETABLE_USE)\r
        if(sched_id < SCHEDULETABLE_CNT) {\r
                return &sched_list[sched_id];\r
@@ -137,7 +138,7 @@ uint32 Oil_GetAlarmCnt(void) {
        return ALARM_CNT;\r
 }\r
 \r
-alarm_obj_t *Oil_GetAlarmObj( AlarmType alarm_id ) {\r
+OsAlarmType *Oil_GetAlarmObj( AlarmType alarm_id ) {\r
 #if defined(ALARM_USE)\r
        if( alarm_id < ALARM_CNT) {\r
          return &alarm_list[alarm_id];\r
@@ -164,8 +165,9 @@ StatusType Oil_GetAlarmBase(AlarmType alarm_id, AlarmBaseRefType info) {
 \r
 \r
 /*-----------------------------------------------------------------*/\r
-\r
-message_obj_t *Oil_GetMessage(MessageType message_id) {\r
+
+#if 0\r
+OsMessageType *Oil_GetMessage(MessageType message_id) {\r
 #if MESSAGE_CNT!=0\r
        return &message_list[message_id];\r
 #else\r
@@ -176,17 +178,20 @@ message_obj_t *Oil_GetMessage(MessageType message_id) {
 uint32 Oil_GetMessageCnt(void ) {\r
        return MESSAGE_CNT;\r
 }\r
+#endif
 \r
 /*-----------------------------------------------------------------*/\r
-\r
+
+#if (  OS_SC3 == STD_ON) || (  OS_SC4 == STD_ON)\r
 uint32 Oil_GetServiceCnt( void ) {\r
        return SERVICE_CNT;\r
 }\r
+#endif
 \r
 \r
 /*-----------------------------------------------------------------*/\r
 \r
-void Oil_GetInterruptStackInfo( stack_t *stack ) {\r
+void Oil_GetInterruptStackInfo( OsStackType *stack ) {\r
        stack->top = os_interrupt_stack;\r
        stack->size = sizeof(os_interrupt_stack);\r
 }\r