comparison gsm-fw/services/ffs/ffs_env.c @ 214:bdfdea886bea

gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 06 Jan 2014 04:43:21 +0000
parents ef7d7da61c56
children
comparison
equal deleted inserted replaced
213:ef7d7da61c56 214:bdfdea886bea
1 /****************************************************************************/ 1 /****************************************************************************/
2 /* */ 2 /* */
3 /* File Name: ffs_env.c */ 3 /* File Name: ffs_env.c */
4 /* */ 4 /* */
5 /* Purpose: This file contains definitions for RV manager related */ 5 /* Purpose: This file contains definitions for RV manager related */
6 /* functions used to get info, start and stop the FFS SWE. */ 6 /* functions used to get info, start and stop the FFS SWE. */
7 /* */ 7 /* */
8 /* Version 0.1 */ 8 /* Version 0.1 */
9 /* */ 9 /* */
10 /* Date Modification */ 10 /* Date Modification */
11 /* ------------------------------------ */ 11 /* ------------------------------------ */
12 /* 10/24/2000 Create */ 12 /* 10/24/2000 Create */
13 /* */ 13 /* */
14 /* Author Pascal Puel */ 14 /* Author Pascal Puel */
15 /* */ 15 /* */
16 /* (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved*/ 16 /* (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved*/
17 /****************************************************************************/ 17 /****************************************************************************/
18 18
19 #include "board.cfg" 19 #include "../../include/config.h"
20 #include "ffs.cfg" 20 #include "ffs.h"
21 #include "ffs/ffs_env.h" 21 #include "ffs_env.h"
22 #include "rvm/rvm_gen.h" 22 #include "../../riviera/rvm/rvm_gen.h"
23 #include "rvm/rvm_priorities.h" 23 #include "../../riviera/rvm/rvm_priorities.h"
24 #include "rvm/rvm_use_id_list.h" 24 #include "../../riviera/rvm/rvm_use_id_list.h"
25 #include "ffs/board/task.h" 25 #include "task.h"
26 #include <string.h> 26 #include <string.h>
27 27
28 extern void ffs_task_init(T_RVF_MB_ID mbid, T_RVF_ADDR_ID addr_id); 28 extern void ffs_task_init(T_RVF_MB_ID mbid, T_RVF_ADDR_ID addr_id);
29 T_FFS_TASK_INFO ffs_task_info; 29 T_FFS_TASK_INFO ffs_task_info;
30 30
31 /* global pointer to the error function */ 31 /* global pointer to the error function */
32 static T_RVM_RETURN (*ffs_error_ft)(T_RVM_NAME swe_name, T_RVM_RETURN error_cause, 32 static T_RVM_RETURN (*ffs_error_ft)(T_RVM_NAME swe_name,
33 T_RVM_ERROR_TYPE error_type,T_RVM_STRING error_msg); 33 T_RVM_RETURN error_cause,
34 T_RVM_ERROR_TYPE error_type,
35 T_RVM_STRING error_msg);
34 36
35 /****************************************************************************** 37 /******************************************************************************
36 * Function : ffs_get_info 38 * Function : ffs_get_info
37 * 39 *
38 * Description : This function is called by the RV manager to learn 40 * Description : This function is called by the RV manager to learn
87 89
88 /****************************************************************************** 90 /******************************************************************************
89 * Function : ffs_set_info 91 * Function : ffs_set_info
90 * 92 *
91 * Description : This function is called by the RV manager to inform 93 * Description : This function is called by the RV manager to inform
92 * the driver SWE about task_id, mb_id and error function. 94 * the driver SWE about task_id, mb_id and error function.
93 * 95 *
94 * Parameters : - T_RVF_ADDR_ID addr_id: unique path to the SWE. 96 * Parameters : - T_RVF_ADDR_ID addr_id: unique path to the SWE.
95 * - T_RV_RETURN ReturnPath[], array of return path for linked SWE 97 * - T_RV_RETURN ReturnPath[], array of return path for linked SWE
96 * - T_RVF_MB_ID mbId[]: array of memory bank ids. 98 * - T_RVF_MB_ID mbId[]: array of memory bank ids.
97 * - callback function to call in case of unrecoverable error. 99 * - callback function to call in case of unrecoverable error.
98 * 100 *
99 * Return : T_RVM_RETURN 101 * Return : T_RVM_RETURN
100 * 102 *
101 * History : 0.1 (20-August-2000) 103 * History : 0.1 (20-August-2000)
102 * 104 *
103 * 105 *
104 ******************************************************************************/ 106 ******************************************************************************/
105 T_RVM_RETURN ffs_set_info(T_RVF_ADDR_ID addr_id, 107 T_RVM_RETURN ffs_set_info(T_RVF_ADDR_ID addr_id,
106 T_RV_RETURN ReturnPath[], 108 T_RV_RETURN ReturnPath[],
107 T_RVF_MB_ID mbId[], 109 T_RVF_MB_ID mbId[],
108 T_RVM_RETURN (*callBackFct)(T_RVM_NAME SWEntName, 110 T_RVM_RETURN (*callBackFct)(T_RVM_NAME SWEntName,
109 T_RVM_RETURN errorCause, 111 T_RVM_RETURN errorCause,
110 T_RVM_ERROR_TYPE errorType, 112 T_RVM_ERROR_TYPE errorType,
111 T_RVM_STRING errorMsg)) 113 T_RVM_STRING errorMsg))
112 { 114 {
113 /* store the pointer to the error function */ 115 /* store the pointer to the error function */
114 ffs_error_ft = callBackFct ; 116 ffs_error_ft = callBackFct ;
115 117
116 ffs_task_init(mbId[0], addr_id); 118 ffs_task_init(mbId[0], addr_id);
117 119
118 ffs_task_info.addr_id = addr_id; 120 ffs_task_info.addr_id = addr_id;
119 ffs_task_info.mbid = mbId[0]; 121 ffs_task_info.mbid = mbId[0];
120 122
121 return RV_OK; 123 return RV_OK;
124 126
125 /****************************************************************************** 127 /******************************************************************************
126 * Function : ffs_init 128 * Function : ffs_init
127 * 129 *
128 * Description : This function is called by the RV manager to initialize the 130 * Description : This function is called by the RV manager to initialize the
129 * ffs SWE before creating the task and calling ffs_start. 131 * ffs SWE before creating the task and calling ffs_start.
130 * 132 *
131 * Parameters : None 133 * Parameters : None
132 * 134 *
133 * Return : T_RVM_RETURN 135 * Return : T_RVM_RETURN
134 * 136 *
144 146
145 /****************************************************************************** 147 /******************************************************************************
146 * Function : ffs_start 148 * Function : ffs_start
147 * 149 *
148 * Description : This function is called by the RV manager to start the ffs 150 * Description : This function is called by the RV manager to start the ffs
149 * SWE, it is the body of the task. 151 * SWE, it is the body of the task.
150 * 152 *
151 * Parameters : None 153 * Parameters : None
152 * 154 *
153 * Return : T_RVM_RETURN 155 * Return : T_RVM_RETURN
154 * 156 *
157 * 159 *
158 ******************************************************************************/ 160 ******************************************************************************/
159 T_RVM_RETURN ffs_start(void) 161 T_RVM_RETURN ffs_start(void)
160 { 162 {
161 ffs_task(); 163 ffs_task();
162 return RV_OK; 164 return RV_OK;
163 } 165 }
164 166
165 167
166 /****************************************************************************** 168 /******************************************************************************
167 * Function : ffs_stop 169 * Function : ffs_stop
186 188
187 /****************************************************************************** 189 /******************************************************************************
188 * Function : ffs_kill 190 * Function : ffs_kill
189 * 191 *
190 * Description : This function is called by the RV manager to kill the ffs 192 * Description : This function is called by the RV manager to kill the ffs
191 * SWE, after the ffs_stop function has been called. 193 * SWE, after the ffs_stop function has been called.
192 * 194 *
193 * Parameters : None 195 * Parameters : None
194 * 196 *
195 * Return : T_RVM_RETURN 197 * Return : T_RVM_RETURN
196 * 198 *