diff gsm-fw/services/dar/dar_diagnose.c @ 308:3c5a17928fda

DAR: starting to clean and compile .c files
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 16 Mar 2014 20:46:10 +0000
parents 4dccc9d3305f
children
line wrap: on
line diff
--- a/gsm-fw/services/dar/dar_diagnose.c	Sun Mar 16 07:39:29 2014 +0000
+++ b/gsm-fw/services/dar/dar_diagnose.c	Sun Mar 16 20:46:10 2014 +0000
@@ -7,7 +7,7 @@
 /*                                                                          */
 /*  Version   0.1                                                           */
 /*                                                                          */
-/*  Date                 Modification                                       */
+/*  Date               Modification                                         */
 /*  ------------------------------------                                    */
 /*  18 October 2001    Create                                               */
 /*                                                                          */
@@ -16,23 +16,23 @@
 /* (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
    #ifndef _WINDOWS
-     #include "timer/timer.h"
+     #include "../../bsp/timer.h"
    #endif
 
-   #include "rv/rv_general.h"
-   #include "rvm/rvm_gen.h"
-   #include "rvm/rvm_priorities.h"
-   #include "dar/dar_api.h"
-   #include "dar/dar_structs_i.h"
-   #include "dar/dar_env.h"
-   #include "rvf/rvf_target.h"
-   #include "dar/dar_const_i.h"
-   #include "dar/dar_macro_i.h"
-   #include "dar/dar_messages_i.h"
-   #include "dar/dar_error_hdlr_i.h"
+   #include "../../riviera/rv/rv_general.h"
+   #include "../../riviera/rvm/rvm_gen.h"
+   #include "../../riviera/rvm/rvm_priorities.h"
+   #include "dar_api.h"
+   #include "dar_structs_i.h"
+   #include "dar_env.h"
+   #include "../../riviera/rvf/rvf_target.h"
+   #include "dar_const_i.h"
+   #include "dar_macro_i.h"
+   #include "dar_messages_i.h"
+   #include "dar_error_hdlr_i.h"
    //#include "rvf/rvf_i.h"
 
    /**** Global variables ****/
@@ -42,12 +42,12 @@
 
 
 
-   /********************************************************************************/
-   /* Function         dar_search_group                                            */
-   /*                                                                              */
-   /* Description      This function checks if the use_id group_nb exists:         */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function         dar_search_group                                       */
+   /*                                                                         */
+   /* Description      This function checks if the use_id group_nb exists:    */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_search_group(UINT16 group, UINT8 *index_p)
    {
       /* Declare local variables */   
@@ -74,12 +74,12 @@
       }
    }
 
-   /********************************************************************************/
-   /* Function         dar_add_group                                               */
-   /*                                                                              */
-   /* Description      This function research the index of the first free group    */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function         dar_add_group                                          */
+   /*                                                                         */
+   /* Description      This function research the index of the first free     */
+   /*                  group                                                  */
+   /***************************************************************************/
    T_RV_RET dar_add_group(UINT8 *index_p)
    {
       /* Declare local variables */
@@ -105,25 +105,25 @@
    }
 
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_send_write_data  								                     */
-   /*                                                                              */
-   /*    Purpose: This function is called to send write data in the DAR mailbox    */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        Pointer to the message to store                                       */
-   /*        Data Format,                                                          */
-   /*        Data level,                                                           */
-   /*        Data Use Id,                                                          */  
-   /*                                                       											 */                                                      
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.								                 */
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None                                                                  */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_send_write_data				      */
+   /*                                                                         */
+   /*    Purpose: This function is called to send write data in the DAR       */
+   /*             mailbox.                                                    */
+   /*    Input Parameters:                                                    */
+   /*        Pointer to the message to store                                  */
+   /*        Data Format,                                                     */
+   /*        Data level,                                                      */
+   /*        Data Use Id,                                                     */
+   /*									      */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.	                      */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None                                                             */
+   /*                                                                         */
+   /***************************************************************************/
 
    T_RV_RET dar_send_write_data (  T_DAR_INFO    *buffer_p,
                                    T_DAR_FORMAT  format,
@@ -165,11 +165,11 @@
          write_data_p->os_hdr.src_addr_id = dar_gbl_var_p->addrId;
 
          /* fill the message parameters */
-         write_data_p->data_write.char_p              = buffer_p ;
-         write_data_p->data_write.data_format         = format;
-         write_data_p->data_write.level               = diagnose_info_level;
-         write_data_p->data_write.use_id.group_nb     = (dar_use_id>>16)& 0x7FFF;
-         write_data_p->data_write.use_id.mask         = (dar_use_id)&0xFFFF;
+         write_data_p->data_write.char_p             = buffer_p ;
+         write_data_p->data_write.data_format        = format;
+         write_data_p->data_write.level              = diagnose_info_level;
+         write_data_p->data_write.use_id.group_nb    = (dar_use_id>>16)& 0x7FFF;
+         write_data_p->data_write.use_id.mask        = (dar_use_id)&0xFFFF;
 
          /* send the messsage to the DAR entity */
          rvf_send_msg (dar_gbl_var_p->addrId, 
@@ -182,24 +182,24 @@
           return(RV_NOT_READY);
       }
 
-	 
+
    } /* dar_send_write_data */
 
-   /********************************************************************************/
-   /* Function         dar_reset                                                   */
-   /*                                                                              */
-   /* Description      This function is used to reset the system                   */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        None                                                                  */  
-   /*                                                       											 */                                                      
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.							                   */
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None                                                                  */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function         dar_reset                                              */
+   /*                                                                         */
+   /* Description      This function is used to reset the system              */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        None                                                             */
+   /*									      */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.			      */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None                                                             */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_reset(void)
    {
       #ifndef _WINDOWS
@@ -215,16 +215,22 @@
          /* initialize the adress of the watchdog timer pointer */
          register_p = (volatile UINT16 *)WATCHDOG_TIM_MODE;
 
-         /* Write the 0xF5 value to the Watchdog timer mode register to disable the Watchdog*/
+         /* Write the 0xF5 value to the Watchdog timer mode register to disable
+	    the Watchdog */
          /* Note the bit 15 must be unchanged ( bit 15 = 1 -> 0x8000)*/
          *register_p =0x80F5;
 
-         /* Wait a couple of time to be sure that this register has a new value */
+         /* Wait a couple of time to be sure that this register has a new
+	    value */
          for (i=0;i<100;i++);
 
-         /* After having received 0xF5 in the Watchdog timer mode register, if the */
-         /* second write access is differennt from 0xA0, ARM core is reset         */
-         /*   The ARM HW core is reset + branch to adress 0x0000 ( SW reset)       */
+	 /*
+          * After having received 0xF5 in the Watchdog timer mode register,
+	  * if the second write access is differennt from 0xA0, ARM core is
+	  * reset.
+	  *
+          * The ARM HW core is reset + branch to adress 0x0000 ( SW reset)
+          */
          *register_p=0x80F5;
 
          /* Wait until the ARM reset */
@@ -235,19 +241,19 @@
    } /* dar_reset */
 
 
-   /********************************************************************************/
-   /*                                                                              */     
-   /* Function         dar_read_mbox                                               */
-   /*                                                                              */
-   /* Description      Called by the dar to read a buffer from its mailboxes.      */
-   /*                  when the Operating System is out                            */
-   /* Input Parameters:                                                            */
-   /*        None                                                                  */  
-   /*                                                       							  */                                                      
-   /* Output Parameters:                                                           */
-   /*        NULL if the mailbox was empty, else the address of a buffer           */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /* Function         dar_read_mbox                                          */
+   /*                                                                         */
+   /* Description      Called by the dar to read a buffer from its mailboxes. */
+   /*                  when the Operating System is out                       */
+   /* Input Parameters:                                                       */
+   /*        None                                                             */
+   /*									      */
+   /* Output Parameters:                                                      */
+   /*        NULL if the mailbox was empty, else the address of a buffer      */
+   /*                                                                         */
+   /***************************************************************************/
 
    void * dar_read_mbox (UINT8 mbox)
    {   
@@ -287,37 +293,34 @@
    /*            THE DAR ENTITY IS DISABLED                   */
    /* ******************************************************* */
    #ifndef _WINDOWS
-	   #include "config/swconfig.cfg"
-	   #include "config/sys.cfg"
-       #include "config/chipset.cfg"
-       #include "timer/timer.h"
+       #include "../../bsp/timer.h"
    #endif
 
-   #include "rv/rv_general.h"
-   #include "rvm/rvm_gen.h"
-   #include "rvm/rvm_priorities.h"
-   #include "rvf/rvf_target.h"
+   #include "../../riviera/rv/rv_general.h"
+   #include "../../riviera/rvm/rvm_gen.h"
+   #include "../../riviera/rvm/rvm_priorities.h"
+   #include "../../riviera/rvf/rvf_target.h"
    //#include "rvf/rvf_i.h"
 
    /* Define the Watchdog timer register mode */
    #define WATCHDOG_TIM_MODE                           (0xFFFFF804)
 
 
-   /********************************************************************************/
-   /* Function         dar_reset                                                   */
-   /*                                                                              */
-   /* Description      This function is used to reset the system                   */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        None                                                                  */  
-   /*                                                       	 				   */                                                      
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.							       */
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None                                                                  */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function         dar_reset                                              */
+   /*                                                                         */
+   /* Description      This function is used to reset the system              */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        None                                                             */
+   /*									      */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.			      */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None                                                             */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_reset(void)
    {
       #ifndef _WINDOWS
@@ -333,16 +336,22 @@
          /* initialize the adress of the watchdog timer pointer */
          register_p = (volatile UINT16 *)WATCHDOG_TIM_MODE;
 
-         /* Write the 0xF5 value to the Watchdog timer mode register to disable the Watchdog*/
+         /* Write the 0xF5 value to the Watchdog timer mode register to disable
+	    the Watchdog */
          /* Note the bit 15 must be unchanged ( bit 15 = 1 -> 0x8000)*/
          *register_p =0x80F5;
 
-         /* Wait a couple of time to be sure that this register has a new value */
+         /* Wait a couple of time to be sure that this register has a new
+	    value */
          for (i=0;i<100;i++);
 
-         /* After having received 0xF5 in the Watchdog timer mode register, if the */
-         /* second write access is differennt from 0xA0, ARM core is reset         */
-         /*   The ARM HW core is reset + branch to adress 0x0000 ( SW reset)       */
+	 /*
+          * After having received 0xF5 in the Watchdog timer mode register,
+	  * if the second write access is differennt from 0xA0, ARM core is
+	  * reset.
+	  *
+          * The ARM HW core is reset + branch to adress 0x0000 ( SW reset)
+          */
          *register_p=0x80F5;
 
          /* Wait until the ARM reset */