FreeCalypso > hg > fc-tourmaline
comparison src/g23m-gprs/sndcp/sndcp_pdap.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_pdap.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 | functions to handles the incoming primitives as described in | |
19 | the SDL-documentation (PDA-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 #include "sndcp.h" /* to get the global entity definitions */ | |
35 #include "sndcp_f.h" /* to get the functions to access the global arrays*/ | |
36 | |
37 #include "sndcp_sdas.h" /* to get the signals to sda. */ | |
38 | |
39 /*==== CONST ================================================================*/ | |
40 | |
41 /*==== LOCAL VARS ===========================================================*/ | |
42 | |
43 /*==== PRIVATE FUNCTIONS ====================================================*/ | |
44 | |
45 /*==== PUBLIC FUNCTIONS =====================================================*/ | |
46 | |
47 | |
48 | |
49 /* | |
50 +------------------------------------------------------------------------------ | |
51 | Function : pda_ll_data_ind | |
52 +------------------------------------------------------------------------------ | |
53 | Description : Handles the primitive LL_DATA_IND | |
54 | | |
55 | Parameters : *ll_data_ind - Ptr to primitive payload | |
56 | | |
57 +------------------------------------------------------------------------------ | |
58 */ | |
59 GLOBAL void pda_ll_data_ind ( T_LL_DATA_IND *ll_data_ind ) | |
60 { | |
61 UBYTE sapi_index = 0; | |
62 | |
63 TRACE_FUNCTION( "pda_ll_data_ind" ); | |
64 | |
65 /* | |
66 * set service instance according to sapi in primitive | |
67 */ | |
68 sndcp_get_sapi_index(ll_data_ind->sapi, &sapi_index); | |
69 sndcp_data->pda = & sndcp_data->pda_base[sapi_index]; | |
70 | |
71 switch( GET_STATE( PDA ) ) | |
72 { | |
73 case PDA_DEFAULT: | |
74 sig_pda_sda_data_ind(ll_data_ind); | |
75 break; | |
76 default: | |
77 if (ll_data_ind != NULL) { | |
78 PFREE(ll_data_ind); | |
79 } | |
80 TRACE_ERROR( "LL_DATA_IND unexpected" ); | |
81 break; | |
82 } | |
83 | |
84 } /* pda_ll_data_ind() */ | |
85 | |
86 |