comparison src/gpf/ccd/csn1_sh.c @ 0:4e78acac3d88

src/{condat,cs,gpf,nucleus}: import from Selenite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:23:26 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4e78acac3d88
1 /*
2 +-----------------------------------------------------------------------------
3 | Project :
4 | Modul : csn1_sh.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_SH 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
53 extern SHORT cdc_csn1_sx_decode (int flag, const ULONG e_ref, T_CCD_Globs *globs);
54 extern SHORT cdc_csn1_sx_encode (int flag, const ULONG e_ref, T_CCD_Globs *globs);
55
56 #ifndef RUN_FLASH
57 /*
58 +--------------------------------------------------------------------+
59 | PROJECT : CCD (6144) MODULE : CDC_GSM |
60 | STATE : code ROUTINE : cdc_csn1_shl_decode |
61 +--------------------------------------------------------------------+
62
63 PURPOSE : Decoding of the GSM Type CSN1 SHL element. This element
64 consists of a 1 bit valid flag and a value part.
65 Only if the valid bit is equal H the value part follows.
66
67 */
68
69 SHORT cdc_csn1_shl_decode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs)
70 {
71
72 #ifdef DEBUG_CCD
73 #ifndef CCD_SYMBOLS
74 TRACE_CCD (globs, "cdc_csn1_shl_decode()");
75 #else
76 TRACE_CCD (globs, "cdc_csn1_shl_decode() %s", ccddata_get_alias((USHORT) e_ref, 1));
77 #endif
78 #endif
79
80 return cdc_csn1_sx_decode (0xFF, e_ref, globs);
81 }
82 #endif /* !RUN_FLASH */
83
84 #ifndef RUN_FLASH
85 /*
86 +--------------------------------------------------------------------+
87 | PROJECT : CCD (6144) MODULE : CDC_GSM |
88 | STATE : code ROUTINE : cdc_csn1_shl_encode |
89 +--------------------------------------------------------------------+
90
91 PURPOSE : Encoding of the GSM Type CSN1 SHL element. This element
92 consists of a 1 bit valid flag and a value part. If the
93 element is valid (the v_xxx components is TRUE in the
94 decoded message) a H bit will be coded followed by the
95 coding of the value part. Otherwise a L bit will be
96 coded.
97
98 */
99
100 SHORT cdc_csn1_shl_encode (const ULONG c_ref, const ULONG e_ref, T_CCD_Globs *globs)
101 {
102 #ifdef DEBUG_CCD
103 #ifndef CCD_SYMBOLS
104 TRACE_CCD (globs, "cdc_csn1_shl_encode()");
105 #else
106 TRACE_CCD (globs, "cdc_csn1_shl_encode() %s", ccddata_get_alias((USHORT) e_ref, 1));
107 #endif
108 #endif
109
110 return cdc_csn1_sx_encode (0xFF, e_ref, globs);
111 }
112 #endif /* !RUN_FLASH */