FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/ccd/gsm5_tv.c @ 648:970d6199f2c5
gsm-fw/ccd/*.[ch]: initial import from the LoCosto source
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 04 Sep 2014 05:48:57 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
647:a60b375014e3 | 648:970d6199f2c5 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : gsm5_tv.c | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2004 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 GSM5_TV elements | |
18 | GSM5_TV is very similar to GSM3_TV but doesn't support tags with | |
19 | length 4 bits (needed in case of IEI = 0x80 with 8 bit tag) | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 | |
23 | |
24 /* | |
25 * standard definitions like GLOBAL, UCHAR, ERROR etc. | |
26 */ | |
27 #include "typedefs.h" | |
28 #include "header.h" | |
29 | |
30 /* | |
31 * Prototypes of ccd (USE_DRIVER EQ undef) for prototypes only | |
32 * look at ccdapi.h | |
33 */ | |
34 #undef USE_DRIVER | |
35 #include "ccdapi.h" | |
36 | |
37 /* | |
38 * Types and functions for bit access and manipulation | |
39 */ | |
40 #include "ccd_globs.h" | |
41 #include "bitfun.h" | |
42 | |
43 /* | |
44 * Prototypes of ccd internal functions | |
45 */ | |
46 #include "ccd.h" | |
47 | |
48 /* | |
49 * Declaration of coder/decoder tables | |
50 */ | |
51 #include "ccdtable.h" | |
52 #include "ccddata.h" | |
53 | |
54 #ifndef RUN_INT_RAM | |
55 /* | |
56 +--------------------------------------------------------------------+ | |
57 | PROJECT : CCD (6144) MODULE : CDC_GSM | | |
58 | STATE : code ROUTINE : cdc_gsm5tv_decode | | |
59 +--------------------------------------------------------------------+ | |
60 | |
61 PURPOSE : Decoding of the GSM Type 5TV element. This element | |
62 consists of a 8 Bit T component and a V component with | |
63 fixed length. | |
64 */ | |
65 | |
66 SHORT cdc_gsm5tv_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs) | |
67 { | |
68 T_TLV_SORT tlv_inf; | |
69 | |
70 tlv_inf.gotTag = TRUE; | |
71 tlv_inf.gotLen = FALSE; | |
72 | |
73 #ifdef DEBUG_CCD | |
74 #ifndef CCD_SYMBOLS | |
75 TRACE_CCD (globs, "cdc_gsm5tv_decode()"); | |
76 #else | |
77 TRACE_CCD (globs, "cdc_gsm5tv_decode() %s", ccddata_get_alias((USHORT) e_ref, 1)); | |
78 #endif | |
79 #endif | |
80 | |
81 return cdc_tlv_decode (c_ref, e_ref, &tlv_inf, globs); | |
82 } | |
83 #endif /* !RUN_INT_RAM */ | |
84 | |
85 #ifndef RUN_INT_RAM | |
86 /* | |
87 +--------------------------------------------------------------------+ | |
88 | PROJECT : CCD (6144) MODULE : CDC_GSM | | |
89 | STATE : code ROUTINE : cdc_gsm5tv_encode | | |
90 +--------------------------------------------------------------------+ | |
91 | |
92 PURPOSE : Encoding of the GSM Type 5TV element. This element | |
93 consists of a 8 Bit T component and a V component with | |
94 fixed length. | |
95 */ | |
96 | |
97 SHORT cdc_gsm5tv_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs) | |
98 { | |
99 #ifdef DEBUG_CCD | |
100 #ifndef CCD_SYMBOLS | |
101 TRACE_CCD (globs, "cdc_gsm5tv_encode()"); | |
102 #else | |
103 TRACE_CCD (globs, "cdc_gsm5tv_encode() %s", ccddata_get_alias((USHORT) e_ref, 1)); | |
104 #endif | |
105 #endif | |
106 | |
107 cdc_tlv_encode (e_ref, 8, 0, globs); | |
108 | |
109 return 1; | |
110 } | |
111 #endif /* !RUN_INT_RAM */ |