annotate src/g23m-fad/rlp/rlp_rcvp.c @ 565:96c1d047b3c6

aci2: AT%VBAT and melody play enhancements matching aci3
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 07 Jan 2019 01:06:46 +0000
parents 90eb61ecd093
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
174
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | Project : CSD (8411)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 | Modul : Rlp_rcvp.c
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 +-----------------------------------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | Copyright 2002 Texas Instruments Berlin, AG
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 | All rights reserved.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 |
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 | Instruments Berlin, AG
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 +-----------------------------------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 | Purpose : This Modul defines the functions for processing
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 | of incomming primitives for the component
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 | Radio Link Protocol of the base station
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 +-----------------------------------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #ifndef RLP_RCVP_C
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #define RLP_RCVP_C
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #endif
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #define ENTITY_RLP
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 /*==== INCLUDES ===================================================*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #include <string.h>
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #include "typedefs.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #include "vsi.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #include "macdef.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #include "custom.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #include "gsm.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #include "cus_rlp.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #include "prim.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 #include "tok.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #include "rlp.h"
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 /*==== CONST =======================================================*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 /*==== TYPES =======================================================*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 /*==== VAR EXPORT ==================================================*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 /*==== VAR LOCAL ===================================================*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 /*==== FUNCTIONS ===================================================*/
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 /*
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 +------------------------------------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 | Function : rcv_ra_ready_ind
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 +------------------------------------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 | Description : Process primitive RA_READY_IND received from RA.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 | This function is called if the RA_READY_IND primitive
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 | is received or from the signal processing in rlp_pei.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 |
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 |
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 | Parameters : ra_ready_ind -
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 |
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 |
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 | Return : -
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 +------------------------------------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 #ifdef _SIMULATION_
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 GLOBAL const void rcv_ra_ready_ind(T_RA_READY_IND *ra_ready_ind)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 #else
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 GLOBAL void rcv_ra_ready_ind(void)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 #endif
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 #ifdef _SIMULATION_
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 TRACE_FUNCTION ("rcv_ra_ready_ind()");
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 PACCESS (ra_ready_ind);
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 #endif
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 if (GET_STATE (RCV) EQ RPDU_WAIT_FOR_A_BLOCK)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 sig_rcv_ker_ready_ind ();
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 #ifdef _SIMULATION_
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 PFREE (ra_ready_ind);
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 #endif
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 }
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 /*
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 +------------------------------------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 | Function : rcv_ra_data_ind
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 +------------------------------------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 | Description : Process primitive RA_DATA_IND received from RA.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 | This function is called if the primitive RA_DATA_IND is
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 | received or from the signal processing in rlp_pei.
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 |
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 | Parameters : ra_data_ind -
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 |
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 |
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 | Return : -
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 +------------------------------------------------------------------------------
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 */
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 GLOBAL void rcv_ra_data_ind(T_RA_DATA_IND *ra_data_ind)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 #ifdef _SIMULATION_
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 TRACE_FUNCTION ("rcv_ra_data_ind()");
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 PACCESS (ra_data_ind);
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 #endif
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 if (GET_STATE (RCV) EQ RPDU_WAIT_FOR_A_BLOCK)
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 #ifdef _SIMULATION_
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 sig_rcv_ker_rawdata_ind (ra_data_ind);
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 #else
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 sig_rcv_ker_rawdata_ind ();
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 #endif
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 }
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 #ifdef _SIMULATION_
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 else
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 {
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 PFREE (ra_data_ind);
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 }
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 #endif
90eb61ecd093 src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 }