comparison src/g23m-gprs/sndcp/sndcp_pdf.c @ 1:fa8dc04885d8

src/g23m-*: import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:25:50 +0000
parents
children
comparison
equal deleted inserted replaced
0:4e78acac3d88 1:fa8dc04885d8
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GPRS (8441)
4 | Modul : sndcp_pdf.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 : This modul is part of the entity SNDCP and implements all
18 | procedures and functions as described in the
19 | SDL-documentation (PD-statemachine)
20 +-----------------------------------------------------------------------------
21 */
22
23
24 #define ENTITY_SNDCP
25
26 /*==== INCLUDES =============================================================*/
27
28 #include "typedefs.h" /* to get Condat data types */
29 #include "vsi.h" /* to get a lot of macros */
30 #include "macdef.h"
31 #include "prim.h" /* to get the definitions of used SAP and directions */
32
33 #include "dti.h"
34
35 #include "sndcp.h" /* to get the global entity definitions */
36
37
38 /*==== CONST ================================================================*/
39
40 /*==== LOCAL VARS ===========================================================*/
41
42 /*==== PRIVATE FUNCTIONS ====================================================*/
43
44 /*==== PUBLIC FUNCTIONS =====================================================*/
45
46
47
48 /*
49 +------------------------------------------------------------------------------
50 | Function : pd_init
51 +------------------------------------------------------------------------------
52 | Description : Initializes the pda service.
53 |
54 | Parameters :
55 |
56 +------------------------------------------------------------------------------
57 */
58 GLOBAL void pd_init (void)
59 {
60 TRACE_FUNCTION( "pd_init" );
61 sndcp_data->pd = & sndcp_data->pd_base[0];
62 INIT_STATE(PD_0, PD_DEFAULT);
63 #ifdef SNDCP_2to1
64 sndcp_data->pd->sapi = PS_SAPI_3;
65 #else
66 sndcp_data->pd->sapi = LL_SAPI_3;
67 #endif /*SNDCP_2to1*/
68 sndcp_data->pd = & sndcp_data->pd_base[1];
69 INIT_STATE(PD_1, PD_DEFAULT);
70 #ifdef SNDCP_2to1
71 sndcp_data->pd->sapi = PS_SAPI_5;
72 #else
73 sndcp_data->pd->sapi = LL_SAPI_5;
74 #endif /*SNDCP_2to1*/
75
76
77 sndcp_data->pd = & sndcp_data->pd_base[2];
78 INIT_STATE(PD_2, PD_DEFAULT);
79 #ifdef SNDCP_2to1
80 sndcp_data->pd->sapi = PS_SAPI_9;
81 #else
82 sndcp_data->pd->sapi = LL_SAPI_9;
83 #endif /*SNDCP_2to1*/
84
85
86 sndcp_data->pd = & sndcp_data->pd_base[3];
87 INIT_STATE(PD_3, PD_DEFAULT);
88 #ifdef SNDCP_2to1
89 sndcp_data->pd->sapi = PS_SAPI_11;
90 #else
91 sndcp_data->pd->sapi = LL_SAPI_11;
92 #endif /*SNDCP_2to1*/
93
94
95 } /* pd_init() */
96