FreeCalypso > hg > fc-selenite
comparison src/gpf/ccd/gsm3_tv.c @ 5:1ea54a97e831
src/gpf: import of Magnetite src/gpf3
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 15 Jul 2018 08:11:07 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4:6e457872f745 | 5:1ea54a97e831 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : gsm3_tv.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 GSM3_TV elements | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 | |
21 | |
22 /* | |
23 * standard definitions like GLOBAL, UCHAR, ERROR etc. | |
24 */ | |
25 #include "typedefs.h" | |
26 #include "header.h" | |
27 | |
28 /* | |
29 * Prototypes of ccd (USE_DRIVER EQ undef) for prototypes only | |
30 * look at ccdapi.h | |
31 */ | |
32 #undef USE_DRIVER | |
33 #include "ccdapi.h" | |
34 | |
35 /* | |
36 * Types and functions for bit access and manipulation | |
37 */ | |
38 #include "ccd_globs.h" | |
39 #include "bitfun.h" | |
40 | |
41 /* | |
42 * Prototypes of ccd internal functions | |
43 */ | |
44 #include "ccd.h" | |
45 | |
46 /* | |
47 * Declaration of coder/decoder tables | |
48 */ | |
49 #include "ccdtable.h" | |
50 #include "ccddata.h" | |
51 | |
52 #ifndef RUN_INT_RAM | |
53 /* | |
54 +--------------------------------------------------------------------+ | |
55 | PROJECT : CCD (6144) MODULE : CDC_GSM | | |
56 | STATE : code ROUTINE : cdc_gsm3tv_decode | | |
57 +--------------------------------------------------------------------+ | |
58 | |
59 PURPOSE : Decoding of the GSM Type 3TV element. This element | |
60 consists of a 8 Bit T component and a V component with | |
61 variable length. | |
62 */ | |
63 | |
64 SHORT cdc_gsm3tv_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs) | |
65 { | |
66 T_TLV_SORT tlv_inf; | |
67 | |
68 tlv_inf.gotTag = TRUE; | |
69 tlv_inf.gotLen = FALSE; | |
70 | |
71 #ifdef DEBUG_CCD | |
72 #ifndef CCD_SYMBOLS | |
73 TRACE_CCD (globs, "cdc_gsm3tv_decode()"); | |
74 #else | |
75 TRACE_CCD (globs, "cdc_gsm3tv_decode() %s", ccddata_get_alias((USHORT) e_ref, 1)); | |
76 #endif | |
77 #endif | |
78 | |
79 return cdc_tlv_decode (c_ref, e_ref, &tlv_inf, globs); | |
80 } | |
81 #endif /* !RUN_INT_RAM */ | |
82 | |
83 #ifndef RUN_INT_RAM | |
84 /* | |
85 +--------------------------------------------------------------------+ | |
86 | PROJECT : CCD (6144) MODULE : CDC_GSM | | |
87 | STATE : code ROUTINE : cdc_gsm3tv_encode | | |
88 +--------------------------------------------------------------------+ | |
89 | |
90 PURPOSE : Encoding of the GSM Type 3TV element. This element | |
91 consists of a 8 Bit T component and a V component with | |
92 variable length. | |
93 */ | |
94 | |
95 SHORT cdc_gsm3tv_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs) | |
96 { | |
97 #ifdef DEBUG_CCD | |
98 #ifndef CCD_SYMBOLS | |
99 TRACE_CCD (globs, "cdc_gsm3tv_encode()"); | |
100 #else | |
101 TRACE_CCD (globs, "cdc_gsm3tv_encode() %s", ccddata_get_alias((USHORT) e_ref, 1)); | |
102 #endif | |
103 #endif | |
104 | |
105 cdc_tlv_encode (e_ref, 8, 0, globs); | |
106 | |
107 return 1; | |
108 } | |
109 #endif /* !RUN_INT_RAM */ |