FreeCalypso > hg > freecalypso-sw
changeset 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 | 3c5a17928fda |
children | 083f262b7bbe |
files | gsm-fw/services/dar/Makefile gsm-fw/services/dar/dar_env.c gsm-fw/services/dar/dar_error_hdlr.c gsm-fw/services/dar/dar_gbl_var.c gsm-fw/services/dar/dar_handle_message.c gsm-fw/services/dar/dar_msg_ft.c gsm-fw/services/dar/dar_task.c gsm-fw/services/dar/dar_watchdog.c |
diffstat | 8 files changed, 355 insertions(+), 343 deletions(-) [+] |
line wrap: on
line diff
--- a/gsm-fw/services/dar/Makefile Sun Mar 16 20:46:10 2014 +0000 +++ b/gsm-fw/services/dar/Makefile Mon Mar 17 04:51:36 2014 +0000 @@ -2,7 +2,9 @@ CFLAGS= -O2 -fno-builtin -mthumb-interwork -mthumb LD= arm-elf-ld -OBJS= dar_api.o dar_diagnose.o dar_emergency.o +OBJS= dar_api.o dar_diagnose.o dar_emergency.o dar_env.o dar_error_hdlr.o \ + dar_gbl_var.o dar_handle_message.o dar_msg_ft.o dar_task.o \ + dar_watchdog.o HDRS= dar_api.h dar_const_i.h dar_diagnose_i.h dar_emergency.h dar_env.h \ dar_error_hdlr_i.h dar_gen.h dar_handle_message.h dar_macro_i.h \
--- 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 */
--- a/gsm-fw/services/dar/dar_error_hdlr.c Sun Mar 16 20:46:10 2014 +0000 +++ b/gsm-fw/services/dar/dar_error_hdlr.c Mon Mar 17 04:51:36 2014 +0000 @@ -16,37 +16,37 @@ /* (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 "rvf/rvf_api.h" - #include "dar/dar_error_hdlr_i.h" - #include "dar/dar_macro_i.h" + #include "../../riviera/rv/rv_general.h" + #include "../../riviera/rvf/rvf_api.h" + #include "dar_error_hdlr_i.h" + #include "dar_macro_i.h" - /********************************************************************************/ - /* */ - /* Function Name: dar_error_trace */ - /* */ - /* Purpose: This function is used to report error occured during the */ - /* diagnose entity execution */ - /* */ - /* Input Parameters: */ - /* status - Contains the error code to be reported. */ - /* */ - /* Output Parameters: */ - /* None. */ - /* */ - /* Global Parameters: */ - /* None. */ - /* */ - /* Note: */ - /* None. */ - /* */ - /* Revision History: */ - /* 27 September 01 Create */ - /* */ - /********************************************************************************/ + /***************************************************************************/ + /* */ + /* Function Name: dar_error_trace */ + /* */ + /* Purpose: This function is used to report error occured during*/ + /* the diagnose entity execution */ + /* */ + /* Input Parameters: */ + /* status - Contains the error code to be reported. */ + /* */ + /* Output Parameters: */ + /* None. */ + /* */ + /* Global Parameters: */ + /* None. */ + /* */ + /* Note: */ + /* None. */ + /* */ + /* Revision History: */ + /* 27 September 01 Create */ + /* */ + /***************************************************************************/ void dar_error_trace(UINT8 error_id) { switch(error_id) @@ -59,67 +59,73 @@ case DAR_ENTITY_NO_MEMORY: { - DAR_SEND_TRACE("DAR entity has not enough memory",RV_TRACE_LEVEL_ERROR); + DAR_SEND_TRACE("DAR entity has not enough memory", + RV_TRACE_LEVEL_ERROR); break; } case DAR_ENTITY_BAD_PARAMETER: { - DAR_SEND_TRACE("DAR entity has bad parameters",RV_TRACE_LEVEL_ERROR); + DAR_SEND_TRACE("DAR entity has bad parameters", + RV_TRACE_LEVEL_ERROR); break; } case DAR_ERROR_STOP_EVENT: { - DAR_SEND_TRACE("DAR entity has received a stop error event",RV_TRACE_LEVEL_ERROR); + DAR_SEND_TRACE("DAR entity has received a stop error event", + RV_TRACE_LEVEL_ERROR); break; } case DAR_ERROR_START_EVENT: { - DAR_SEND_TRACE("DAR entity has received a start error event",RV_TRACE_LEVEL_ERROR); + DAR_SEND_TRACE("DAR entity has received a start error event", + RV_TRACE_LEVEL_ERROR); break; } case DAR_ENTITY_BAD_MESSAGE: { - DAR_SEND_TRACE("DAR entity has received a bad message",RV_TRACE_LEVEL_ERROR); + DAR_SEND_TRACE("DAR entity has received a bad message", + RV_TRACE_LEVEL_ERROR); break; } } } - /************************* End of dar_error_trace function **********************/ + /*********************** End of dar_error_trace function *******************/ - /********************************************************************************/ - /* */ - /* Function Name: dar_ffs_error_trace */ - /* */ - /* Purpose: This function is used to report error occured during the */ - /* dar entity execution */ - /* */ - /* Input Parameters: */ - /* status - Contains the error code to be reported. */ - /* */ - /* Output Parameters: */ - /* None. */ - /* */ - /* Global Parameters: */ - /* None. */ - /* */ - /* Note: */ - /* None. */ - /* */ - /* Revision History: */ - /* 29 october 01 Create */ - /* */ - /********************************************************************************/ + /***************************************************************************/ + /* */ + /* Function Name: dar_ffs_error_trace */ + /* */ + /* Purpose: This function is used to report error occured during*/ + /* the dar entity execution */ + /* */ + /* Input Parameters: */ + /* status - Contains the error code to be reported. */ + /* */ + /* Output Parameters: */ + /* None. */ + /* */ + /* Global Parameters: */ + /* None. */ + /* */ + /* Note: */ + /* None. */ + /* */ + /* Revision History: */ + /* 29 october 01 Create */ + /* */ + /***************************************************************************/ void dar_ffs_error_trace(UINT8 error_id) { switch(error_id) { case DAR_ENTITY_NO_MEMORY: { - DAR_SEND_TRACE("DAR FFS entity has not enough memory",RV_TRACE_LEVEL_ERROR); + DAR_SEND_TRACE("DAR FFS entity has not enough memory", + RV_TRACE_LEVEL_ERROR); break; } case DAR_ENTITY_FILE_ERROR: @@ -130,17 +136,19 @@ case DAR_ENTITY_FILE_NO_SAVED: { - DAR_SEND_TRACE("DAR FFS entity has not saved the file",RV_TRACE_LEVEL_ERROR); + DAR_SEND_TRACE("DAR FFS entity has not saved the file", + RV_TRACE_LEVEL_ERROR); break; } case DAR_ENTITY_FILE_NO_CLOSE: { - DAR_SEND_TRACE("DAR FFS entity has not closed the file",RV_TRACE_LEVEL_ERROR); + DAR_SEND_TRACE("DAR FFS entity has not closed the file", + RV_TRACE_LEVEL_ERROR); break; } } /* switch(error_id) */ } /* dar_ffs_error_trace */ - /************************* End of dar_ffs_error_trace function **********************/ + /******************** End of dar_ffs_error_trace function *****************/ #endif /* #ifdef RVM_DAR_SWE */
--- a/gsm-fw/services/dar/dar_gbl_var.c Sun Mar 16 20:46:10 2014 +0000 +++ b/gsm-fw/services/dar/dar_gbl_var.c Mon Mar 17 04:51:36 2014 +0000 @@ -9,7 +9,7 @@ /* */ /* Version 0.1 */ /* */ -/* Date Modification */ +/* Date Modification */ /* ------------------------------------ */ /* 29 October 2001 Create */ /* */ @@ -18,13 +18,13 @@ /* (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/general.h" - #include "rv/rv_general.h" - #include "dar/dar_api.h" - #include "dar/dar_const_i.h" + #include "../../riviera/rv/general.h" + #include "../../riviera/rv/rv_general.h" + #include "dar_api.h" + #include "dar_const_i.h" /**** Global variables ****/ /* Buffer used to save some parameters before a reset */ @@ -43,4 +43,3 @@ UINT32 debug_RAM[DEBUG_UNIT_WORD_SIZE]; #endif /* #ifdef RVM_DAR_SWE */ -
--- a/gsm-fw/services/dar/dar_handle_message.c Sun Mar 16 20:46:10 2014 +0000 +++ b/gsm-fw/services/dar/dar_handle_message.c Mon Mar 17 04:51:36 2014 +0000 @@ -8,7 +8,7 @@ /* */ /* Version 0.1 */ /* */ -/* Date Modification */ +/* Date Modification */ /* ------------------------------------ */ /* 17 October 2001 Create */ /* */ @@ -17,27 +17,27 @@ /* (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 "dar/dar_api.h" - #include "dar/dar_env.h" - #include "dar/dar_macro_i.h" - #include "dar/dar_messages_i.h" - #include "dar/dar_msg_ft.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_env.h" + #include "dar_macro_i.h" + #include "dar_messages_i.h" + #include "dar_msg_ft.h" - /********************************************************************************/ - /* Function dar_handle_message */ - /* */ - /* Description This function is called every time the DAR entity received */ - /* a new message in its mailbox */ - /* */ - /********************************************************************************/ + /***************************************************************************/ + /* Function dar_handle_message */ + /* */ + /* Description This function is called every time the DAR entity */ + /* received a new message in its mailbox */ + /* */ + /***************************************************************************/ - T_RV_RET dar_handle_msg(T_RV_HDR *msg_p) + T_RV_RET dar_handle_msg(T_RV_HDR *msg_p) { /* Declare local variables */ T_RV_RET status = RVF_GREEN;
--- a/gsm-fw/services/dar/dar_msg_ft.c Sun Mar 16 20:46:10 2014 +0000 +++ b/gsm-fw/services/dar/dar_msg_ft.c Mon Mar 17 04:51:36 2014 +0000 @@ -17,25 +17,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 "config/swconfig.cfg" - #include "config/sys.cfg" - #include "config/chipset.cfg" + #include "../../include/config.h" #endif #include <string.h> - #include "rvm/rvm_gen.h" - #include "dar/dar_api.h" - #include "dar/dar_macro_i.h" - #include "dar/dar_messages_i.h" - #include "dar/dar_const_i.h" - #include "dar/dar_diagnose_i.h" - #include "dar/dar_error_hdlr_i.h" - + #include "../../riviera/rvm/rvm_gen.h" + #include "dar_api.h" + #include "dar_macro_i.h" + #include "dar_messages_i.h" + #include "dar_const_i.h" + #include "dar_diagnose_i.h" + #include "dar_error_hdlr_i.h" + #ifndef _WINDOWS - #include "timer/timer.h" + #include "../../bsp/timer.h" #endif /**** Global variable ****/ @@ -58,16 +56,16 @@ extern void exception(void); - /********************************************************************************/ - /* Function dar_filter_request */ - /* */ - /* Description This function checks if the use_id group_nb exists: */ - /* - if the group_nb exists, it adds the warning and debug */ - /* masks in the dar_array_filter */ - /* - otherwise, this function add the new group_nb and the */ - /* masks in the dar_array_filter */ - /* */ - /********************************************************************************/ + /***************************************************************************/ + /* Function dar_filter_request */ + /* */ + /* Description This function checks if the use_id group_nb exists: */ + /* - if the group_nb exists, it adds the warning and */ + /* debug masks in the dar_array_filter */ + /* - otherwise, this function add the new group_nb and*/ + /* the masks in the dar_array_filter */ + /* */ + /***************************************************************************/ T_RV_RET dar_filter_request (T_DAR_FILTER_START *msg_p) { @@ -92,7 +90,7 @@ { /* The DAR entity wants to process Warning messages */ /* add the mask_warning in the dar_filter array */ dar_gbl_var_p ->dar_filter_array[index].mask_warning |= - msg_p->use_msg_parameter.mask; + msg_p->use_msg_parameter.mask; dar_gbl_var_p ->dar_filter_array[index].mask_debug = 0x00; break; @@ -100,24 +98,24 @@ case DAR_DEBUG: { - /* The DAR entity wants to process Debug messages */ - /* As the Warning messages are more important than debug messages, */ - /* it processes warning message too */ - + /* The DAR entity wants to process Debug messages */ + /* As the Warning messages are more important than debug */ + /* messages, it processes warning message too */ + /* add the mask_debug in the dar_filter array */ dar_gbl_var_p ->dar_filter_array[index].mask_debug |= - msg_p->use_msg_parameter.mask; + msg_p->use_msg_parameter.mask; /* add the mask_warning in the dar_filter array */ dar_gbl_var_p ->dar_filter_array[index].mask_warning |= - msg_p->use_msg_parameter.mask; + msg_p->use_msg_parameter.mask; break; } - + case DAR_NO_DIAGNOSE: { - /* The DAR entity doesn't want to process Diagnose messages */ - + /* The DAR entity doesn't want to process Diagnose messages */ + /* delete the mask_debug in the dar_filter array */ dar_gbl_var_p ->dar_filter_array[index].mask_debug = 0x00; @@ -137,11 +135,13 @@ else { - /* if the group doesn't exist and if there is enough space in the dar_filter_array */ + /* if the group doesn't exist and if there is enough space in the + dar_filter_array */ if ( dar_add_group(&index)== RV_OK) { /* ... add the group in the dar_array_filter */ - dar_gbl_var_p ->dar_filter_array[index].group_nb |= msg_p->use_msg_parameter.group_nb; + dar_gbl_var_p ->dar_filter_array[index].group_nb |= + msg_p->use_msg_parameter.group_nb; /* Check the Dar level */ switch(msg_p->use_msg_parameter.level) { @@ -149,23 +149,23 @@ { /* The DAR entity wants to process Warning messages */ /* add the mask_warning in the dar_filter array */ dar_gbl_var_p ->dar_filter_array[index].mask_warning |= - msg_p->use_msg_parameter.mask; + msg_p->use_msg_parameter.mask; break; } case DAR_DEBUG: { - /* The DAR entity wants to process Debug messages */ - /* As the Warning messages are more important than debug messages, */ - /* it processes warning message too */ - + /* The DAR entity wants to process Debug messages */ + /* As the Warning messages are more important than debug */ + /* messages, it processes warning message too */ + /* add the mask_debug in the dar_filter array */ dar_gbl_var_p ->dar_filter_array[index].mask_debug |= - msg_p->use_msg_parameter.mask; + msg_p->use_msg_parameter.mask; /* add the mask_warning in the dar_filter array */ dar_gbl_var_p ->dar_filter_array[index].mask_warning |= - msg_p->use_msg_parameter.mask; + msg_p->use_msg_parameter.mask; break; } @@ -188,30 +188,31 @@ }/* dar_filter_request */ - /********************************************************************************/ - /* */ - /* Function Name: dar_write_data_in_buffer */ - /* */ - /* Purpose: This function is called to store diagnose data in RAM buffer */ - /* */ - /* note: In order to separate the different string, the data are */ - /* ---- stored as follows: */ - /* */ - /* Input Parameters: */ - /* Pointer to the message to store */ - /* Data Format, */ - /* Data level, */ - /* Data Use Id, */ - /* */ - /* Output Parameters: */ - /* Validation of the diagnose execution. */ - /* */ - /* */ - /* */ - /* Revision History: */ - /* None. */ - /* */ - /********************************************************************************/ + /***************************************************************************/ + /* */ + /* Function Name: dar_write_data_in_buffer */ + /* */ + /* Purpose: This function is called to store diagnose data in RAM */ + /* buffer. */ + /* */ + /* note: In order to separate the different string, the data */ + /* are stored as follows: */ + /* */ + /* Input Parameters: */ + /* Pointer to the message to store */ + /* Data Format, */ + /* Data level, */ + /* Data Use Id, */ + /* */ + /* Output Parameters: */ + /* Validation of the diagnose execution. */ + /* */ + /* */ + /* */ + /* Revision History: */ + /* None. */ + /* */ + /***************************************************************************/ T_RV_RET dar_write_data_in_buffer( T_DAR_WRITE_START *msg_p) { /* Local variables */ @@ -224,26 +225,27 @@ /*** Circular buffer to store data ***/ /* Add 0xFF to separate 2 strings */ dar_write_buffer[dar_current_index] = 0xF; - DAR_PLUS_PLUS(dar_current_index); /* to detected if it is the end of the buffer */ + DAR_PLUS_PLUS(dar_current_index); /* increment with wraparound */ dar_write_buffer[dar_current_index] = 0xF; - DAR_PLUS_PLUS(dar_current_index); /* to detected if it is the end of the buffer */ + DAR_PLUS_PLUS(dar_current_index); /* increment with wraparound */ /* The group_nb is 16 bit length, and the buffer is an UINT8 length */ /* So the group_nb must be stocked by dividing it in 2 parts */ - dar_write_buffer[dar_current_index] = (msg_p->data_write.use_id.group_nb)>>8; - /*add the 8 first bits of the Use id group*/ + dar_write_buffer[dar_current_index] = + (msg_p->data_write.use_id.group_nb)>>8; + /*add the 8 first bits of the Use id group*/ DAR_PLUS_PLUS(dar_current_index); dar_write_buffer[dar_current_index] = msg_p->data_write.use_id.group_nb; - /*add the 8 last bits of the Use id group*/ + /*add the 8 last bits of the Use id group*/ DAR_PLUS_PLUS(dar_current_index); /* The mask is 16 bit length, and the buffer is an UINT8 length */ /* So the mask must be stocked by dividing it in 2 parts */ dar_write_buffer[dar_current_index] = (msg_p->data_write.use_id.mask)>>8; - /* add the 8 first bits of the Use id mask */ + /* add the 8 first bits of the Use id mask */ DAR_PLUS_PLUS(dar_current_index); dar_write_buffer[dar_current_index] = msg_p->data_write.use_id.mask; - /* add the 8 last bits of the Use id mask */ + /* add the 8 last bits of the Use id mask */ DAR_PLUS_PLUS(dar_current_index); /* Add the dar_level data */ @@ -269,22 +271,22 @@ } /* dar_send_write_data */ - /********************************************************************************/ - /* Function dar_empty_mb_and_save_data */ - /* */ - /* Description This function is used to empty the mailbox and save data in */ - /* the RAM buffer */ - /* */ - /* Input Parameters: */ - /* Pointer to the message to store */ - /* */ - /* Output Parameters: */ - /* Validation of the function execution. */ - /* */ - /* Note: */ - /* None */ - /* */ - /********************************************************************************/ + /***************************************************************************/ + /* Function dar_empty_mb_and_save_data */ + /* */ + /* Description This function is used to empty the mailbox and save */ + /* data in the RAM buffer. */ + /* */ + /* Input Parameters: */ + /* Pointer to the message to store */ + /* */ + /* Output Parameters: */ + /* Validation of the function execution. */ + /* */ + /* Note: */ + /* None */ + /* */ + /***************************************************************************/ T_RV_RET dar_empty_mb_and_save_data( T_DAR_INFO *buffer_p) { /* Declare local variables */ @@ -312,13 +314,13 @@ /**** Store data in RAM buffer ****/ /* Diagnose string length */ length = (UINT16) strlen(buffer_p); - + /** Circular buffer to store data **/ /* Add 0xFF to separate 2 strings */ dar_write_buffer[dar_current_index] = 0xF; - DAR_PLUS_PLUS(dar_current_index); /* to detected if it is the end of the buffer */ + DAR_PLUS_PLUS(dar_current_index); /* increment with wraparound */ dar_write_buffer[dar_current_index] = 0xF; - DAR_PLUS_PLUS(dar_current_index); /* to detected if it is the end of the buffer */ + DAR_PLUS_PLUS(dar_current_index); /* increment with wraparound */ /* Add the dar_level data */ dar_write_buffer[dar_current_index] = DAR_EXCEPTION; @@ -343,25 +345,25 @@ -/********************************************************************************/ -/* */ -/* ------------------------------------------------ */ -/* | WARNING - IMPORTANT | */ -/* ------------------------------------------------ */ -/* */ -/* */ -/* Function Name: dar_lib */ -/* */ -/* Purpose: This function is only used in order to have a function in the */ -/* dar_lib when the DAR is NOT_COMPILED */ -/* */ -/* Input Parameters: */ -/* None */ -/* */ -/* Output Parameters: */ -/* NONE */ -/* */ -/********************************************************************************/ +/******************************************************************************/ +/* */ +/* ------------------------------------------------ */ +/* | WARNING - IMPORTANT | */ +/* ------------------------------------------------ */ +/* */ +/* */ +/* Function Name: dar_lib */ +/* */ +/* Purpose: This function is only used in order to have a function in the */ +/* dar_lib when the DAR is NOT_COMPILED */ +/* */ +/* Input Parameters: */ +/* None */ +/* */ +/* Output Parameters: */ +/* NONE */ +/* */ +/******************************************************************************/ void dar_lib(void) { }
--- a/gsm-fw/services/dar/dar_task.c Sun Mar 16 20:46:10 2014 +0000 +++ b/gsm-fw/services/dar/dar_task.c Mon Mar 17 04:51:36 2014 +0000 @@ -8,7 +8,7 @@ /* */ /* Version 0.1 */ /* */ -/* Date Modification */ +/* Date Modification */ /* ------------------------------------ */ /* 16 October 2001 Create */ /* */ @@ -17,26 +17,24 @@ /* (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 "config/swconfig.cfg" - #include "config/sys.cfg" - #include "config/chipset.cfg" + #include "../../include/config.h" #endif #include <string.h> - #include "rvm/rvm_gen.h" - #include "rvm/rvm_use_id_list.h" - #include "dar/dar_api.h" - #include "dar/dar_macro_i.h" - #include "dar/dar_handle_message.h" - #include "dar/dar_structs_i.h" - #include "dar/dar_error_hdlr_i.h" - #include "dar/dar_const_i.h" + #include "../../riviera/rvm/rvm_gen.h" + #include "../../riviera/rvm/rvm_use_id_list.h" + #include "dar_api.h" + #include "dar_macro_i.h" + #include "dar_handle_message.h" + #include "dar_structs_i.h" + #include "dar_error_hdlr_i.h" + #include "dar_const_i.h" - #include "ffs/ffs_api.h" - + #include "../ffs/ffs_api.h" + /* Variables definitions */ T_DAR_RECOVERY_STATUS status=0; @@ -63,15 +61,15 @@ #endif - /********************************************************************************/ - /* Function dar_core */ - /* */ - /* Description Core of the dar task, which scans the dar mailbox and */ - /* waits for messages. When a message arrives, it sends it to */ - /* proper functions */ - /* */ - /* */ - /********************************************************************************/ + /***************************************************************************/ + /* Function dar_core */ + /* */ + /* Description Core of the dar task, which scans the dar mailbox and */ + /* waits for messages. When a message arrives, it sends it*/ + /* to proper functions */ + /* */ + /* */ + /***************************************************************************/ T_RV_RET dar_core(void) {
--- a/gsm-fw/services/dar/dar_watchdog.c Sun Mar 16 20:46:10 2014 +0000 +++ b/gsm-fw/services/dar/dar_watchdog.c Mon Mar 17 04:51:36 2014 +0000 @@ -16,46 +16,44 @@ /* (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 "config/swconfig.cfg" - #include "config/sys.cfg" - #include "config/chipset.cfg" + #include "../../include/config.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_gen.h" - #include "dar/dar_diagnose_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_gen.h" + #include "dar_diagnose_i.h" /**** Global variable ****/ /* Get the dar_current status */ extern T_DAR_RECOVERY_STATUS dar_current_status; - /********************************************************************************/ - /* */ - /* Function Name: dar_watchdog_reset */ - /* */ - /* Purpose: This function is called to reset the system when the general */ - /* general purpose timer expires */ - /* */ - /* 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_watchdog_reset */ + /* */ + /* Purpose: This function is called to reset the system when the general*/ + /* general purpose timer expires */ + /* */ + /* Input Parameters: */ + /* Pointer to the message to store */ + /* Data Format, */ + /* Data level, */ + /* Data Use Id, */ + /* */ + /* Output Parameters: */ + /* Validation of the function execution. */ + /* */ + /* Note: */ + /* None */ + /* */ + /***************************************************************************/ void dar_watchdog_reset(void) {