annotate gsm-fw/ccd/ccd_err.c @ 924:aac4d4b15d2f

gsm-fw: static DSP patch download enabled by default
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Mon, 19 Oct 2015 18:14:23 +0000
parents 970d6199f2c5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
648
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 | Project :
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 | Modul : ccd_err.c
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 +-----------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 | Copyright 2002 Texas Instruments Berlin, AG
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 | All rights reserved.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 | Instruments Berlin, AG
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 +-----------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 | Purpose : CCD - Definition of error handling routines
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 +-----------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 #define CCD_ERR_C
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 #include <stdio.h>
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 #include <stdlib.h>
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 #include <stdarg.h>
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 #include <string.h>
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 #include <setjmp.h>
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 * Standard definitions like UCHAR, ERROR etc.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 #include "typedefs.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 #include "header.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 * Types and constants used by CCD
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 #include "ccd_globs.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 * Type definitions for CCD data tables
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 #include "ccdtable.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 * Function prototypes of CCD-CCDDATA interface
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 #include "ccddata.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 * Prototypes of ccd internal functions
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 #include "ccd.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 * Definition of CCD Error table
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 #include "ccd_err.h"
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 extern T_CCD_TASK_TABLE* ccd_task_list[];
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 #ifdef CCD_TEST
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 #define CCD_ERR_TRC_P1(A,B,C) {printf("\n"); printf(B, C);}
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 #define CCD_ERR_TRC_P2(A,B,C,D) {printf("\n"); printf(B, C, D);}
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 #define CCD_ERR_TRC_P1(A,B,C) vsi_o_ttrace(A, TC_ERROR, B, C);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 #define CCD_ERR_TRC_P2(A,B,C,D) vsi_o_ttrace(A, TC_ERROR, B, C, D);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 * backwards compatibility with the new style for error information container
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 #define errPar para.para_list.err_list
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 #define numErrPar para.para_list.num_para
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 | Function : ccd_err_reset
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 | Description : This function resets the task related error entry in
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 | ccd_task_list with each coding/decoding action.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 | Parameters : eentry - the task related error entry in ccd_task_list
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 | Return : -
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 void ccd_err_reset (T_CCD_ERR_LIST_HEAD* eentry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 eentry->act_error = &(eentry->first_error);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 eentry->num_errors = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99 | Function : ccd_err_alloc
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 | Description : This function allocates a new T_CCD_ERR_LIST and
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 | set its next pointer to 0.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 | Parameters : -
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 | Return : -
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 static T_CCD_ERR_LIST* ccd_err_alloc ()
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 T_CCD_ERR_LIST* entry;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112 #if defined (CCD_TEST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113 entry = malloc (sizeof(T_CCD_ERR_LIST));
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115 entry = D_ALLOC (sizeof(T_CCD_ERR_LIST));
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117 if (entry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119 entry->next = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120 return entry;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122 return 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
127 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
129 | Function : ccd_err_free
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131 | Description : This function frees the task related error list.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 | The freeing starts with the act_error entry, i.e.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 | either it is called at the end of a code/decode action
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 | and concerns only those list entries that were allocated
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 | by a former actions and are now not used anymore, or it
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 | can be called by ccd_free_errors and than the whole list
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 | is freed.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 | Parameters : eentry - the task related error entry in ccd_task_list
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 | Return : -
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
144 void ccd_err_free (T_CCD_ERR_LIST_HEAD* entry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146 T_CCD_ERR_LIST* it = *entry->act_error;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147 T_CCD_ERR_LIST* next;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149 while (it)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 next = it->next;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152 #if defined (CCD_TEST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153 free (it);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 D_FREE (it);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 it = next;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159 *entry->act_error = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
163 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
164 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166 | Function : ccd_err_init
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 | Description : This function initializes the entity's error entry
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 | The members of the entry not set here,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 | are reset with each coding/decoding action.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 | Parameters : eentry - pointing to the entity's error entry
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 | Return : 1 in case of error, 0 otherwise
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 int ccd_err_init (T_CCD_ERR_LIST_HEAD** eentry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 if (!*eentry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181 #if defined (CCD_TEST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182 *eentry = malloc (sizeof(T_CCD_ERR_LIST_HEAD));
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184 *eentry = D_ALLOC (sizeof(T_CCD_ERR_LIST_HEAD));
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
187 else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
188 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 ccd_err_reset(*eentry);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 ccd_err_free(*eentry);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
193 if (*eentry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195 (*eentry)->first_error = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 return 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 return 1;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205 | Function : ccd_err_exit
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
207 | Description : This function frees the task related error entry in
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 | ccd_task_list.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 | Parameters : -
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
211 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
212 | Return : -
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
213 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
214 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
215 void ccd_err_exit (void)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
216 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
217 T_CCD_ERR_LIST_HEAD** entry;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
218 #if defined (CCD_TEST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
219 entry = &ccd_task_list[0]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
220 if (*entry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
221 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
222 ccd_err_reset(*entry);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
223 ccd_err_free(*entry);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
224 free (*entry);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 T_HANDLE me = vsi_e_handle (0, NULL);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 if (me == VSI_ERROR)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 me = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
230 entry = &ccd_task_list[me]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231 if (*entry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233 ccd_err_reset(*entry);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234 ccd_err_free(*entry);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235 D_FREE (*entry);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
236 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
237 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
238 *entry = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
239 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
240 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
242 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
244 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
245 | Function : ccd_trace_err_stk
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
246 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
247 | Description : This function traces the error stack.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
248 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
249 | Parameters : globs - the current variable set
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
250 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
251 | Return : -
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
252 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
253 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
254 #ifdef ERR_TRC_STK_CCD
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
255 static void ccd_trace_err_stk (T_CCD_Globs *globs)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
256 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
257 int i=1;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
258
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
259 if (globs->ccd_recurs_level NEQ 255)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
260 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
261 #ifdef CCD_SYMBOLS
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
262 CCD_ERR_TRC_P1(globs->me, "CCD Error: in message %s",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
263 mcomp[globs->error_stack[0]].name)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
264 if (globs->ccd_recurs_level > 5)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
265 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
266 CCD_ERR_TRC_P1(globs->me, "CCD Error: %s", "... ->");
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
267 i = (int) (globs->ccd_recurs_level - 5);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
268 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
269 while (i <= globs->ccd_recurs_level)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
270 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
271 CCD_ERR_TRC_P1(globs->me, "CCD Error: -> %s",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
272 ccddata_get_alias (globs->error_stack[i], 1))
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
273 i++;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
274 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
275 #else /* CCD_SYMBOLS */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
276
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
277 CCD_ERR_TRC_P1(globs->me, "CCD Error: in message with mcompRef=%d!",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
278 globs->error_stack[0])
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
279 for (i=1; i <= globs->ccd_recurs_level; i++)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
280 CCD_ERR_TRC_P1(globs->me, "CCD Error: -> %d", globs->error_stack[i])
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
281 #endif /* CCD_SYMBOLS */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
282 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
283 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
284 #endif /* ERR_TRC_STK_CCD */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
285 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
286
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
287 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
288 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
289 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
290 | PROJECT : CCD (6144) MODULE : CCD |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
291 | STATE : code ROUTINE : ccd_setError |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
292 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
293
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
294 PURPOSE : Error processing of the CCD.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
295
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
296 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
297
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
298 void ccd_setError (T_CCD_Globs *globs,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
299 UBYTE ErrCode,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
300 UBYTE Action,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
301 USHORT first_par,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
302 ...)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
303 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
304 USHORT par;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
305 UBYTE parnum;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
306 va_list varpars;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
307 T_CCD_ERR_LIST_HEAD* entry = ccd_task_list[globs->me]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
308 T_CCD_ERR_LIST** it = entry->act_error;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
309 char *err_msg = NULL;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
310
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
311 if (globs->errLabel)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
312 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
313 Action = BREAK;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
314 ErrCode = globs->errLabel;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
315 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
316
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
317 #if defined (ERR_TRACE_CCD) || defined (DEBUG_CCD)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
318
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
319 #if defined (DEBUG_CCD)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
320 if (Action EQ BREAK)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
321 CCD_ERR_TRC_P2(globs->me, "CCD Error: %s (errCode %d); stopped processing",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
322 ccdErrCodeTable[ErrCode], ErrCode)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
323 else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
324 CCD_ERR_TRC_P2(globs->me, "CCD Error: %s (errCode %d); yet continued processing",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
325 ccdErrCodeTable[ErrCode], ErrCode)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
326 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
327 if (Action EQ BREAK)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
328 CCD_ERR_TRC_P1(globs->me, "CCD Error: errCode %d; stopped processing",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
329 ErrCode)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
330 else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
331 CCD_ERR_TRC_P1(globs->me, "CCD Error: errCode %d; yet continued processing",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
332 ErrCode)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
333 #endif /* DEBUG_CCD */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
334
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
335 #endif /* (ERR_TRACE_CCD) || defined (DEBUG_CCD) */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
336
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
337 if (!*it)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
338 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
339 *it = ccd_err_alloc ();
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
340 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
341
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
342 if (*it)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
343 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
344 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
345 * Memory allocation from dynamic partitions should not fail.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
346 * Nevertheless, if it fails, this is not particularly handled here
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
347 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
348 (*it)->entry.error = ErrCode;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
349 (*it)->entry.kind = CCD_ERR_KIND_PARA_LIST;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
350
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
351 va_start (varpars, first_par); /* Initialize variable arguments. */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
352 par = first_par;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
353 parnum = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
354 while ((par != 0xffff) AND (parnum < MAX_ERR_PAR))
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
355 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
356 (*it)->entry.errPar[parnum++] = par;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
357 #if defined (ERR_TRACE_CCD) || defined (DEBUG_CCD)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
358 CCD_ERR_TRC_P1(globs->me, "CCD Error: saved parameter %d to errList", par)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
359 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
360 par = (USHORT) va_arg (varpars, int);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
361 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
362 (*it)->entry.numErrPar = parnum;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
363 va_end (varpars); /* Reset variable arguments. */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
364
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
365 entry->act_error = &(*it)->next;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
366 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
367
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
368 entry->num_errors++;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
369
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
370 #ifdef ERR_TRC_STK_CCD
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
371 ccd_trace_err_stk (globs);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
372 #endif /* ERR_TRC_STK_CCD */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
373
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
374 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
375 * if the action say break, perform a longjump to terminate ccd.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
376 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
377 if (Action EQ BREAK)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
378 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
379 globs->CCD_Error = ccdError;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
380 if (globs->jmp_mark_set)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
381 longjmp (globs->jmp_mark, -1);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
382 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
383 else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
384 globs->CCD_Error = ccdWarning;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
385 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
386 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
387
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
388 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
389 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
390 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
391 | Function : ccd_get_error
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
392 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
393 | Description : This function copies the next error information of the
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
394 | classical parameter list kind to the user.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
395 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
396 | Parameters : item - the task's current error entry
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
397 | entry - the returned pointer
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
398 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
399 | Return : the error code if there was still an error, ccdOK otherwise
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
400 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
401 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
402 static ULONG ccd_get_error (T_CCD_ERR_LIST_HEAD* head, USHORT *parlist)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
403 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
404 T_CCD_ERR_LIST** item;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
405 int i;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
406 if (head)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
407 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
408 item = head->act_error;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
409 if (*item)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
410 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
411 if ((*item)->entry.kind == CCD_ERR_KIND_PARA_LIST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
412 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
413 for (i=0; i < (*item)->entry.numErrPar; i++)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
414 *parlist++ = (*item)->entry.errPar[i];
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
415 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
416 head->act_error = &(*item)->next;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
417 return (ULONG) (*item)->entry.error;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
418 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
419 return ccdOK;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
420 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
421 return ccdOK;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
422 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
423 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
424
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
425 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
426 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
427 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
428 | PROJECT : CCD (6144) MODULE : CCD |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
429 | STATE : code ROUTINE : ccd_getNextError |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
430 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
431
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
432 PURPOSE : if an error is stored in the errorlist, this function
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
433 stores the additional stored error parameter
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
434 into the given parlist and returns the errorcode.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
435 If no error occured this function returns 0.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
436
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
437 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
438
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
439 UBYTE CCDDATA_PREF(ccd_getNextError) (UBYTE entity, USHORT *parlist)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
440 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
441 * The parameter entity is not used anymore, but the function interface
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
442 * should remain the same.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
443 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
444 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
445 T_CCD_ERR_LIST_HEAD* head;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
446 #if defined (CCD_TEST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
447 head = ccd_task_list[0]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
448 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
449 T_HANDLE me = vsi_e_handle (0, NULL);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
450 if (me == VSI_ERROR)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
451 me = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
452 head = ccd_task_list[me]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
453 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
454
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
455 return (UBYTE) ccd_get_error (head, parlist);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
456 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
457 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
458
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
459 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
460 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
461 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
462 | PROJECT : CCD (6144) MODULE : CCD |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
463 | STATE : code ROUTINE : ccd_getFirstError |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
464 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
465
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
466 PURPOSE : if an error is stored in the errorlist, this function
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
467 stores the additional stored error parameter
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
468 into the given parlist and returns the errorcode.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
469 If no error occured this function returns 0.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
470
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
471 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
472
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
473 UBYTE CCDDATA_PREF(ccd_getFirstError) (UBYTE entity, USHORT *parlist)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
474 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
475 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
476 * The parameter entity is not used anymore, but the function interface
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
477 * should remain the same.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
478 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
479 T_CCD_ERR_LIST_HEAD* head;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
480 #if defined (CCD_TEST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
481 head = ccd_task_list[0]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
482 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
483 T_HANDLE me = vsi_e_handle (0, NULL);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
484 if (me == VSI_ERROR)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
485 me = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
486 head = ccd_task_list[me]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
487 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
488
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
489 head->act_error = &(head->first_error);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
490
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
491 return (UBYTE) ccd_get_error (head, parlist);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
492
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
493 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
494 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
495
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
496 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
497 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
498 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
499 | Function : ccd_get_numFaults
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
500 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
501 | Description : This function delivers the task related number of
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
502 | errors/faults of the last coding/decoding action.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
503 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
504 | Parameters : -
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
505 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
506 | Return : the number of occurred errors
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
507 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
508 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
509
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
510 int CCDDATA_PREF(ccd_get_numFaults) ()
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
511 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
512 T_CCD_ERR_LIST_HEAD* head;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
513 #if defined (CCD_TEST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
514 head = ccd_task_list[0]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
515 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
516 T_HANDLE me = vsi_e_handle (0, NULL);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
517 if (me == VSI_ERROR)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
518 me = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
519 head = ccd_task_list[me]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
520 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
521
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
522 if (head)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
523 return head->num_errors;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
524 else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
525 return 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
526 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
527 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
528
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
529 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
530 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
531 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
532 | Function : ccd_free_faultlist
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
533 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
534 | Description : This function frees any allocated error/fault inforamtion
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
535 | of the current task.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
536 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
537 | Parameters : -
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
538 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
539 | Return : -
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
540 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
541 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
542
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
543 void CCDDATA_PREF(ccd_free_faultlist) ()
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
544 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
545 #if defined (CCD_TEST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
546 int me = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
547 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
548 T_HANDLE me;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
549 me = vsi_e_handle (0, NULL);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
550 if (me == VSI_ERROR)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
551 me = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
552 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
553 ccd_err_reset (ccd_task_list[me]->ccd_err_list);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
554 ccd_err_free (ccd_task_list[me]->ccd_err_list);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
555 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
556 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
557
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
558 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
559 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
560 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
561 | PROJECT : CCD (6144) MODULE : CCD |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
562 | STATE : code ROUTINE : ccd_recordFault |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
563 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
564
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
565 PURPOSE : Record of information on an detected error to support
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
566 entity fault diagnosis activities.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
567
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
568 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
569
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
570 void ccd_recordFault (T_CCD_Globs *globs,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
571 UBYTE ErrCode,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
572 UBYTE Action,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
573 T_ERR_INFO err_info,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
574 U8 *err_IEaddr)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
575 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
576 char *err_msg = NULL;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
577 T_CCD_ERR_LIST_HEAD* entry = ccd_task_list[globs->me]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
578 T_CCD_ERR_LIST** it = entry->act_error;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
579
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
580 if (globs->errLabel)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
581 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
582 Action = BREAK;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
583 ErrCode = globs->errLabel;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
584 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
585
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
586 if (!*it)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
587 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
588 *it = ccd_err_alloc ();
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
589 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
590
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
591 if (*it)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
592 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
593 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
594 * Memory allocation from dynamic partitions should not fail.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
595 * Nevertheless, if it fails, this is not particularly handled here
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
596 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
597 (*it)->entry.error = ErrCode;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
598 (*it)->entry.kind = CCD_ERR_KIND_IE_TYPE;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
599 (*it)->entry.para.err_type.err_info = err_info;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
600 (*it)->entry.para.err_type.err_IEaddr = (U32)err_IEaddr;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
601 entry->act_error = &(*it)->next;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
602 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
603
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
604 entry->num_errors++;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
605
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
606 #if defined (ERR_TRACE_CCD) || defined (DEBUG_CCD)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
607
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
608 #if defined (DEBUG_CCD)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
609 if (Action EQ BREAK)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
610 CCD_ERR_TRC_P2(globs->me, "CCD Error: %s (errCode %d); stopped processing",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
611 ccdErrCodeTable[ErrCode], ErrCode)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
612 else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
613 CCD_ERR_TRC_P2(globs->me, "CCD Error: %s (errCode %d); yet continued processing",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
614 ccdErrCodeTable[ErrCode], ErrCode)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
615 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
616 if (Action EQ BREAK)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
617 CCD_ERR_TRC_P1(globs->me, "CCD Error: errCode %d; stopped processing",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
618 ErrCode)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
619 else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
620 CCD_ERR_TRC_P1(globs->me, "CCD Error: errCode %d; yet continued processing",
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
621 ErrCode)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
622 #endif /* DEBUG_CCD */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
623
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
624 #endif /* (ERR_TRACE_CCD) || defined (DEBUG_CCD) */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
625
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
626 #ifdef ERR_TRC_STK_CCD
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
627 ccd_trace_err_stk (globs);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
628 #endif /* ERR_TRC_STK_CCD */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
629
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
630 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
631 * if the action say break, perform a longjump to terminate ccd.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
632 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
633 if (Action EQ BREAK)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
634 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
635 globs->CCD_Error = ccdError;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
636 if (globs->jmp_mark_set)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
637 longjmp (globs->jmp_mark, -1);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
638 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
639 else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
640 globs->CCD_Error = ccdWarning;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
641 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
642 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
643
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
644 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
645 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
646 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
647 | Function : ccd_get_fault
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
648 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
649 | Description : This function copies the next error information to
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
650 | the user (no matter which kind).
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
651 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
652 | Parameters : item - the task's current error entry
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
653 | entry - the returned pointer
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
654 |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
655 | Return : the error code if there was still an error, ccdOK otherwise
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
656 +------------------------------------------------------------------------------
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
657 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
658 static ULONG ccd_get_fault (T_CCD_ERR_LIST_HEAD* head, T_CCD_ERR_ENTRY **entry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
659 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
660 T_CCD_ERR_LIST** item;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
661 if (head)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
662 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
663 item = head->act_error;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
664 if (*item)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
665 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
666 *entry = &(*item)->entry;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
667 head->act_error = &(*item)->next;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
668 return (ULONG) (*entry)->error;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
669 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
670 return ccdOK;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
671 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
672 return ccdOK;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
673 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
674 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
675
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
676 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
677 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
678 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
679 | PROJECT : CCD (6144) MODULE : CCD |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
680 | STATE : code ROUTINE : ccd_getNextFault |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
681 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
682
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
683 PURPOSE : If an error is stored in the errorlist, this function
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
684 copies information on the error into the function parameter.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
685 This information is made of error number, error-union type,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
686 ccd_id for the faulty element and the address of this
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
687 element in the C-structure of the decoded message.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
688 If no error occured this function returns 0.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
689
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
690 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
691
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
692 ULONG CCDDATA_PREF(ccd_getNextFault) (T_CCD_ERR_ENTRY **ccd_err_entry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
693 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
694 T_CCD_ERR_LIST_HEAD* head;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
695 #if defined (CCD_TEST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
696 head = ccd_task_list[0]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
697 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
698 T_HANDLE me = vsi_e_handle (0, NULL);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
699 if (me == VSI_ERROR)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
700 me = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
701 head = ccd_task_list[me]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
702 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
703
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
704 return ccd_get_fault (head, ccd_err_entry);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
705 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
706 #endif /* !RUN_INT_RAM */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
707
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
708 #ifndef RUN_INT_RAM
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
709 /*
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
710 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
711 | PROJECT : CCD (6144) MODULE : CCD |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
712 | STATE : code ROUTINE : ccd_getFirstFault |
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
713 +--------------------------------------------------------------------+
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
714
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
715 PURPOSE : If an error is stored in the errorlist, this function
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
716 copies information on the error into the function parameter.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
717 This information is made of error number, error-union type,
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
718 ccd_id for the faulty element and the address of this
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
719 element in the C-structure of the decoded message.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
720 If no error occured this function returns 0.
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
721 */
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
722
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
723 ULONG CCDDATA_PREF(ccd_getFirstFault) (T_CCD_ERR_ENTRY **ccd_err_entry)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
724 {
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
725 T_CCD_ERR_LIST_HEAD* head;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
726 #if defined (CCD_TEST)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
727 head = ccd_task_list[0]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
728 #else
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
729 T_HANDLE me = vsi_e_handle (0, NULL);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
730 if (me == VSI_ERROR)
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
731 me = 0;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
732 head = ccd_task_list[me]->ccd_err_list;
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
733 #endif
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
734
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
735 head->act_error = &(head->first_error);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
736
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
737 return ccd_get_fault (head, ccd_err_entry);
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
738 }
970d6199f2c5 gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
739 #endif /* !RUN_INT_RAM */