diff gsm-fw/services/dar/dar_env.c @ 309:a7087f91c752

DAR: all C modules compile without RVM_DAR_SWE
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 17 Mar 2014 04:51:36 +0000
parents 4dccc9d3305f
children
line wrap: on
line diff
--- a/gsm-fw/services/dar/dar_env.c	Sun Mar 16 20:46:10 2014 +0000
+++ b/gsm-fw/services/dar/dar_env.c	Mon Mar 17 04:51:36 2014 +0000
@@ -22,21 +22,21 @@
 /* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved*/
 /****************************************************************************/
 
-#include "rv/rv_defined_swe.h"
+#include "../../riviera/rv/rv_defined_swe.h"
 #ifdef RVM_DAR_SWE
-   #include "rv/rv_general.h"
-   #include "rvm/rvm_gen.h"
-   #include "rvm/rvm_priorities.h"
-   #include "rvm/rvm_use_id_list.h"
-   #include "dar/dar_api.h"
-   #include "dar/dar_env.h"
-   #include "dar/dar_macro_i.h"
+   #include "../../riviera/rv/rv_general.h"
+   #include "../../riviera/rvm/rvm_gen.h"
+   #include "../../riviera/rvm/rvm_priorities.h"
+   #include "../../riviera/rvm/rvm_use_id_list.h"
+   #include "dar_api.h"
+   #include "dar_env.h"
+   #include "dar_macro_i.h"
 
    #include <string.h>
 
    extern T_RV_RET dar_core(void);
 
-   /**** Initialisation of the pointer to the Global Environment Control block ****/
+   /* Initialisation of the pointer to the Global Environment Control block */
    T_DAR_ENV_CTRL_BLK *dar_gbl_var_p = NULL;
 
    /**** Define extern variables ****/
@@ -55,21 +55,21 @@
    /* DAR previous status */
    extern UINT8  dar_previous_exception;
 
-   /********************************************************************************/
-   /* Function   : dar_get_info                                                    */
-   /*                                                                              */
-   /* Description : This function is called by the RV Environment to learn         */
-   /*               diagnose requirements in terms of memory, SWEs...              */
-   /*                                                                              */
-   /* Parameters  : T_RVM_INFO_SWE  * swe_info: pointer to the structure to fill   */
-   /*               containing infos related to the diagnose SWE.                  */
-   /*                                                                              */
-   /* Return      :  T_RV_RETURN                                                   */
-   /*                                                                              */
-   /* History      : 0.1 (26-September-2001)                                       */
-   /*                                                                              */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function   : dar_get_info                                               */
+   /*                                                                         */
+   /* Description : This function is called by the RV Environment to learn    */
+   /*               diagnose requirements in terms of memory, SWEs...         */
+   /*                                                                         */
+   /* Parameters  : T_RVM_INFO_SWE  * swe_info: pointer to the structure to   */
+   /*               fill containing infos related to the diagnose SWE.        */
+   /*                                                                         */
+   /* Return      :  T_RV_RETURN                                              */
+   /*                                                                         */
+   /* History      : 0.1 (26-September-2001)                                  */
+   /*                                                                         */
+   /*                                                                         */
+   /***************************************************************************/
    T_RVM_RETURN dar_get_info(T_RVM_INFO_SWE  *infoSWEnt)
    {
       /* SWE info */
@@ -83,15 +83,15 @@
 
 
       /* Set the return path */
-      infoSWEnt->type_info.type4.return_path.callback_func	= NULL;
-      infoSWEnt->type_info.type4.return_path.addr_id	      = 0;
+      infoSWEnt->type_info.type4.return_path.callback_func = NULL;
+      infoSWEnt->type_info.type4.return_path.addr_id       = 0;
 
-  
+
       /* memory bank info */
       infoSWEnt->type_info.type4.nb_mem_bank = 0x01;
  
       /* Memory bank used to receive/send the message to/from the entity */
-      memcpy ((UINT8 *) 	infoSWEnt->type_info.type4.mem_bank[0].bank_name, "DAR_MB", sizeof("DAR_MB"));
+      memcpy ((UINT8 *) infoSWEnt->type_info.type4.mem_bank[0].bank_name, "DAR_MB", sizeof("DAR_MB"));
       infoSWEnt->type_info.type4.mem_bank[0].initial_params.size          = DAR_MB_SIZE;
       infoSWEnt->type_info.type4.mem_bank[0].initial_params.watermark     = DAR_MB_WATERMARK;
 
@@ -111,24 +111,24 @@
       return RVM_OK;
    }
 
-   /**************** End of dar_get_info function ********************************/
+   /**************** End of dar_get_info function *****************************/
 
-   /********************************************************************************/
-   /* Function   : dar_set_info                                                    */
-   /*                                                                              */
-   /* Description : This function is called by the RV Environment to inform        */
-   /*               the diagnose SWE about addr_id, mb_id and error function.      */
-   /*                                                                              */
-   /* Parameters  : - T_RVF_ADDR_ID  addrId: address Id                            */
-   /*               - T_RVF_MB_ID mb_id[]: array of memory bank ids.               */
-   /*               - callback function to call in case of unrecoverable error.    */
-   /*                                                                              */
-   /* Return      : T_RVM_RETURN                                                   */
-   /*                                                                              */
-   /* History    : 0.1 (27-September-2001 )                                        */
-   /*                                                                              */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function   : dar_set_info                                               */
+   /*                                                                         */
+   /* Description : This function is called by the RV Environment to inform   */
+   /*               the diagnose SWE about addr_id, mb_id and error function. */
+   /*                                                                         */
+   /* Parameters  : - T_RVF_ADDR_ID  addrId: address Id                       */
+   /*               - T_RVF_MB_ID mb_id[]: array of memory bank ids.          */
+   /*               - callback function to call in case of unrecoverable error*/
+   /*                                                                         */
+   /* Return      : T_RVM_RETURN                                              */
+   /*                                                                         */
+   /* History    : 0.1 (27-September-2001 )                                   */
+   /*                                                                         */
+   /*                                                                         */
+   /***************************************************************************/
    T_RVM_RETURN dar_set_info(T_RVF_ADDR_ID addrId,
                              T_RV_RETURN   return_path[],
                              T_RVF_MB_ID   mbId[],
@@ -141,12 +141,14 @@
       /* Declare local variable.*/
       T_RVF_MB_STATUS mb_status = RVF_GREEN;
 
-      /* Allocate memory required to store the Global Environment control Block. */
+      /* Allocate memory required to store the Global Environment control
+	 Block. */
       mb_status = rvf_get_buf(mbId[0], 
                               sizeof(T_DAR_ENV_CTRL_BLK), 
                               (T_RVF_BUFFER **) & dar_gbl_var_p);
 
-      /* If insufficient resources to properly run the DAR's task, then abort.   */
+      /* If insufficient resources to properly run the DAR's task,
+	 then abort.   */
       switch (mb_status)
       {
          case RVF_GREEN:
@@ -183,24 +185,25 @@
       } /* switch (mb_status) */
 
       return (RV_OK);
-   } /*************** End of dar_set_info function ********************************/
+   } /*************** End of dar_set_info function ****************************/
 
 
 
-   /********************************************************************************/
-   /* Function   : dar_init                                                        */
-   /*                                                                              */
-   /* Description : This function is called by the RV Environment to initialize the*/ 
-   /*               diagnose SWE before creating the task and calling dar_start.   */
-   /*                                                                              */
-   /* Parameters  : None                                                           */
-   /*                                                                              */
-   /* Return      : T_RVM_RETURN                                                   */
-   /*                                                                              */
-   /* History    : 0.1 (27-September-2001)                                         */
-   /*                                                                              */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function   : dar_init                                                   */
+   /*                                                                         */
+   /* Description : This function is called by the RV Environment to init the */
+   /*               diagnose SWE before creating the task and calling         */
+   /*		    dar_start.						      */
+   /*                                                                         */
+   /* Parameters  : None                                                      */
+   /*                                                                         */
+   /* Return      : T_RVM_RETURN                                              */
+   /*                                                                         */
+   /* History    : 0.1 (27-September-2001)                                    */
+   /*                                                                         */
+   /*                                                                         */
+   /***************************************************************************/
    T_RVM_RETURN dar_init(void)
    {
       /*** Declare local variables ***/
@@ -236,42 +239,44 @@
    }
 
 
-   /*************************************************************************************/
-   /* Function    : dar_stop                                                            */
-   /*                                                                                   */
-   /* Description : This function is called by the RV Environment to stop the diagnose  */
-   /*               SWE.                                                                */
-   /*                                                                                   */
-   /* Parameters  : None                                                                */
-   /*                                                                                   */
-   /* Return      : T_RVM_RETURN                                                        */
-   /*                                                                                   */
-   /* History     : 0.1 (27-September-2001)                                             */
-   /*                                                                                   */
-   /*                                                                                   */
-   /*************************************************************************************/
+   /***************************************************************************/
+   /* Function    : dar_stop                                                  */
+   /*                                                                         */
+   /* Description : This function is called by the RV Environment to stop the */
+   /*               diagnose SWE.                                             */
+   /*                                                                         */
+   /* Parameters  : None                                                      */
+   /*                                                                         */
+   /* Return      : T_RVM_RETURN                                              */
+   /*                                                                         */
+   /* History     : 0.1 (27-September-2001)				      */
+   /*                                                                         */
+   /*                                                                         */
+   /***************************************************************************/
    T_RVM_RETURN dar_stop(void)
    {
-      /* other SWEs have not been killed yet, DAR can send messages to other SWEs        */
+      /* other SWEs have not been killed yet, DAR can send messages to other
+	 SWEs        */
 
       return RV_OK;
    }
 
 
-   /*************************************************************************************/
-   /* Function   :  dar_kill                                                            */
-   /*                                                                                   */
-   /* Description : This function is called by the RV Environment to kill the diagnose  */
-   /*               SWE, after the diagnose_stop function has been called.              */
-   /*                                                                                   */
-   /* Parameters  : None                                                                */
-   /*                                                                                   */
-   /* Return      : T_RVM_RETURN                                                        */
-   /*                                                                                   */
-   /* History     : 0.1 (27-September-2001)                                             */
-   /*                                                                                   */
-   /*                                                                                   */
-   /*************************************************************************************/
+   /***************************************************************************/
+   /* Function   :  dar_kill                                                  */
+   /*                                                                         */
+   /* Description : This function is called by the RV Environment to kill the */
+   /*               diagnose  SWE, after the diagnose_stop function has been  */
+   /*		    called.						      */
+   /*                                                                         */
+   /* Parameters  : None                                                      */
+   /*                                                                         */
+   /* Return      : T_RVM_RETURN                                              */
+   /*                                                                         */
+   /* History     : 0.1 (27-September-2001)                                   */
+   /*                                                                         */
+   /*                                                                         */
+   /***************************************************************************/
    T_RVM_RETURN dar_kill (void)
    {
       /* free all memory buffer previously allocated */