comparison src/gpf3/ccd/csn1_choice_2.c @ 2:c41a534f33c6

src/gpf3: preened GPF goo from TCS3.2
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 23:52:50 +0000
parents
children
comparison
equal deleted inserted replaced
1:864b8cc0cf63 2:c41a534f33c6
1 /*
2 +-----------------------------------------------------------------------------
3 | Project :
4 | Modul : csn1_choice_2.c
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : Definition of encoding and decoding functions for CSN1_S1 elements
18 +-----------------------------------------------------------------------------
19 */
20 /*
21 * standard definitions like GLOBAL, UCHAR, ERROR etc.
22 */
23 #include "typedefs.h"
24 #include "header.h"
25
26
27 /*
28 * Prototypes of ccd (USE_DRIVER EQ undef) for prototypes only
29 * look at ccdapi.h
30 */
31 #undef USE_DRIVER
32 #include "ccdapi.h"
33
34 /*
35 * Types and functions for bit access and manipulation
36 */
37 #include "ccd_globs.h"
38 #include "bitfun.h"
39
40 /*
41 * Prototypes of ccd internal functions
42 */
43 #include "ccd.h"
44
45 /*
46 * Declaration of coder/decoder tables
47 */
48 #include "ccdtable.h"
49 #include "ccddata.h"
50
51 extern SHORT cdc_csn1_choice_x_decode (const ULONG c_ref, const ULONG e_ref,
52 ULONG num, T_CCD_Globs *globs);
53 extern SHORT cdc_csn1_choice_x_encode (const ULONG c_ref, const ULONG e_ref,
54 ULONG num, T_CCD_Globs *globs);
55
56 #ifndef RUN_INT_RAM
57 /*
58 +--------------------------------------------------------------------+
59 | PROJECT : CCD (6144) MODULE : CDC_GSM |
60 | STATE : code ROUTINE : cdc_csn1_choice2_decode |
61 +--------------------------------------------------------------------+
62
63 PURPOSE : Decoding of the GSM Type CSN1 CHOICE1 element. This element
64 consists of 2 bits CHOICE index and a value part of an
65 union type. The item of the union type represents the
66 CHOICE alternatives.
67 */
68
69 SHORT cdc_csn1_choice2_decode (const ULONG c_ref, const ULONG e_ref,
70 T_CCD_Globs *globs)
71 {
72 #ifdef DEBUG_CCD
73 #ifndef CCD_SYMBOLS
74 TRACE_CCD (globs, "cdc_csn1_choice2_decode()");
75 #else
76 TRACE_CCD (globs, "cdc_csn1_choice2_decode() %s",
77 ccddata_get_alias((USHORT) e_ref, 1));
78 #endif
79 #endif
80
81 return cdc_csn1_choice_x_decode (c_ref, e_ref, 2, globs);
82 }
83 #endif /* !RUN_INT_RAM */
84
85
86 #ifndef RUN_INT_RAM
87 /*
88 +--------------------------------------------------------------------+
89 | PROJECT : CCD (6144) MODULE : CDC_GSM |
90 | STATE : code ROUTINE : cdc_csn1_choice2_encode |
91 +--------------------------------------------------------------------+
92
93 PURPOSE : Encoding of the GSM Type CSN1 CHOICE1 element. This element
94 consists of 2 bits CHOICE index and a value part of an
95 union type. The item of the union type represents the
96 CHOICE alternatives.
97 */
98
99 SHORT cdc_csn1_choice2_encode (const ULONG c_ref, const ULONG e_ref,
100 T_CCD_Globs *globs)
101 {
102 #ifdef DEBUG_CCD
103 #ifndef CCD_SYMBOLS
104 TRACE_CCD (globs, "cdc_csn1_choice2_encode()");
105 #else
106 TRACE_CCD (globs, "cdc_csn1_choice2_encode() %s",
107 ccddata_get_alias((USHORT) e_ref, 1));
108 #endif
109 #endif
110
111 return cdc_csn1_choice_x_encode (c_ref, e_ref, 2, globs);
112 }
113 #endif /* !RUN_INT_RAM */