annotate gsm-fw/services/ffs/ffs_env.c @ 502:cff42ff57c60

osx.c: osx_free_mem() done
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 01 Jul 2014 18:34:53 +0000
parents bdfdea886bea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /****************************************************************************/
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 /* */
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
3 /* File Name: ffs_env.c */
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 /* */
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
5 /* Purpose: This file contains definitions for RV manager related */
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
6 /* functions used to get info, start and stop the FFS SWE. */
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 /* */
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
8 /* Version 0.1 */
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
9 /* */
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
10 /* Date Modification */
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
11 /* ------------------------------------ */
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
12 /* 10/24/2000 Create */
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
13 /* */
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
14 /* Author Pascal Puel */
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
15 /* */
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 /* (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved*/
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 /****************************************************************************/
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
19 #include "../../include/config.h"
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
20 #include "ffs.h"
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
21 #include "ffs_env.h"
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
22 #include "../../riviera/rvm/rvm_gen.h"
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
23 #include "../../riviera/rvm/rvm_priorities.h"
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
24 #include "../../riviera/rvm/rvm_use_id_list.h"
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
25 #include "task.h"
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 #include <string.h>
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 extern void ffs_task_init(T_RVF_MB_ID mbid, T_RVF_ADDR_ID addr_id);
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 T_FFS_TASK_INFO ffs_task_info;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 /* global pointer to the error function */
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
32 static T_RVM_RETURN (*ffs_error_ft)(T_RVM_NAME swe_name,
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
33 T_RVM_RETURN error_cause,
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
34 T_RVM_ERROR_TYPE error_type,
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
35 T_RVM_STRING error_msg);
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 /******************************************************************************
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 * Function : ffs_get_info
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 * Description : This function is called by the RV manager to learn
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 * driver requirements in terms of memory, SWEs...
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 * Parameters : T_RVM_INFO_SWE * swe_info: pointer to the structure to fill
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 * containing infos related to the driver SWE.
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 * Return : T_RVM_RETURN
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 * History : 0.1 (20-August-2000)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 ******************************************************************************/
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 T_RVM_RETURN ffs_get_info(T_RVM_INFO_SWE * infoSWE)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 {
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 /* SWE info */
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 infoSWE->swe_type = RVM_SWE_TYPE_4;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 infoSWE->type_info.type4.swe_use_id = FFS_USE_ID;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 memcpy ( (UINT8 *) infoSWE->type_info.type4.swe_name, "FFS", sizeof("FFS") );
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 infoSWE->type_info.type4.version = 0;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 infoSWE->type_info.type4.stack_size = FFS_STACK_SIZE;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 infoSWE->type_info.type4.priority = RVM_FFS_TASK_PRIORITY;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 /* memory bank info */
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 infoSWE->type_info.type4.nb_mem_bank = 1;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 memcpy ((UINT8 *) infoSWE->type_info.type4.mem_bank[0].bank_name, "FFS_PRIM", RVM_NAME_MAX_LEN);
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 infoSWE->type_info.type4.mem_bank[0].initial_params.size = FFS_MB_PRIM_SIZE;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 infoSWE->type_info.type4.mem_bank[0].initial_params.watermark = FFS_MB_PRIM_WATERMARK;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 /* linked SWE info */
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 infoSWE->type_info.type4.nb_linked_swe = 0;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 /* generic functions */
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 infoSWE->type_info.type4.set_info = ffs_set_info;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 infoSWE->type_info.type4.init = ffs_init;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 infoSWE->type_info.type4.core = ffs_start;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 infoSWE->type_info.type4.stop = ffs_stop;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 infoSWE->type_info.type4.kill = ffs_kill;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 /* Set return_path */
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 infoSWE->type_info.type4.return_path.callback_func = NULL;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 infoSWE->type_info.type4.return_path.addr_id = 0;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 return RV_OK;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 }
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 /******************************************************************************
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 * Function : ffs_set_info
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 * Description : This function is called by the RV manager to inform
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
94 * the driver SWE about task_id, mb_id and error function.
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 *
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
96 * Parameters : - T_RVF_ADDR_ID addr_id: unique path to the SWE.
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
97 * - T_RV_RETURN ReturnPath[], array of return path for linked SWE
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
98 * - T_RVF_MB_ID mbId[]: array of memory bank ids.
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
99 * - callback function to call in case of unrecoverable error.
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 * Return : T_RVM_RETURN
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 * History : 0.1 (20-August-2000)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 ******************************************************************************/
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 T_RVM_RETURN ffs_set_info(T_RVF_ADDR_ID addr_id,
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
108 T_RV_RETURN ReturnPath[],
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
109 T_RVF_MB_ID mbId[],
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
110 T_RVM_RETURN (*callBackFct)(T_RVM_NAME SWEntName,
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
111 T_RVM_RETURN errorCause,
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
112 T_RVM_ERROR_TYPE errorType,
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
113 T_RVM_STRING errorMsg))
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 {
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115 /* store the pointer to the error function */
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 ffs_error_ft = callBackFct ;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
118 ffs_task_init(mbId[0], addr_id);
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120 ffs_task_info.addr_id = addr_id;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121 ffs_task_info.mbid = mbId[0];
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 return RV_OK;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124 }
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
127 /******************************************************************************
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 * Function : ffs_init
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
129 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 * Description : This function is called by the RV manager to initialize the
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
131 * ffs SWE before creating the task and calling ffs_start.
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 * Parameters : None
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 * Return : T_RVM_RETURN
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 * History : 0.1 (20-August-2000)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140 ******************************************************************************/
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 T_RVM_RETURN ffs_init(void)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142 {
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 return RV_OK;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
144 }
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147 /******************************************************************************
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 * Function : ffs_start
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 * Description : This function is called by the RV manager to start the ffs
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
151 * SWE, it is the body of the task.
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153 * Parameters : None
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 * Return : T_RVM_RETURN
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 * History : 0.1 (20-August-2000)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 ******************************************************************************/
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 T_RVM_RETURN ffs_start(void)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162 {
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
163 ffs_task();
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
164 return RV_OK;
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165 }
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 /******************************************************************************
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 * Function : ffs_stop
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171 * Description : This function is called by the RV manager to stop the ffs SWE.
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173 * Parameters : None
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 * Return : T_RVM_RETURN
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 * History : 0.1 (20-August-2000)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180 ******************************************************************************/
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181 T_RVM_RETURN ffs_stop(void)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182 {
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 /* other SWEs have not been killed yet, ffs can send messages to other SWEs */
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 return RV_OK;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 }
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
187
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
188
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 /******************************************************************************
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 * Function : ffs_kill
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 * Description : This function is called by the RV manager to kill the ffs
214
bdfdea886bea gsm-fw/services/ffs: ffs_env.c and ffstrace.c compile
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 213
diff changeset
193 * SWE, after the ffs_stop function has been called.
213
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195 * Parameters : None
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 * Return : T_RVM_RETURN
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199 * History : 0.1 (20-August-2000)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201 *
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 ******************************************************************************/
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203 T_RVM_RETURN ffs_kill (void)
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204 {
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205 /* free all memory buffer previously allocated */
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206 return RV_OK;
ef7d7da61c56 FFS code integration: remaining C files imported, but not yet integrated
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
207 }