annotate src/g23m-gprs/upm/upm_aci_output_handler.c @ 610:0cbe7438f974

armio.c: GPIO config for GTM900 and long-standing GPIO 1 fix
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 17 Jun 2019 21:48:54 +0000
parents 2cf312e56ee7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
197
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*----------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 | Project : 3G PS
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | Module : UPM
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 +-----------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 | Copyright 2003 Texas Instruments.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | All rights reserved.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 | This file is confidential and a trade secret of Texas
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 | Instruments .
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 | The receipt of or possession of this file does not convey
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 | any rights to reproduce or disclose its contents or to
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 | manufacture, use, or sell anything it may describe, in
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 | whole, or in part, without the specific written consent of
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 | Texas Instruments.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 +-----------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 | Purpose: Output functions for primitives from UPM to the ACI entity.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 | For design details, see:
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 | 8010.939 UPM Detailed Specification
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 +---------------------------------------------------------------------------*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 /*==== DECLARATION CONTROL =================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 /*==== INCLUDES ============================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #include "upm.h"
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #include "upm_aci_output_handler.h"
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 /*==== CONSTS ===============================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 /*==== TYPES ================================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 /*==== LOCALS ===============================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 /*==== PUBLIC FUNCTIONS =====================================================*/
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 | Function : send_upm_count_cnf
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 | Description : Allocate, pack and send UPM_COUNT_CNF primitive.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 | Parameters : nsapi - NSAPI
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 | ul_bytecount - number of uplink octets transferred
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 | ul_pktcount - number of uplink packets transferred
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 | dl_bytecount - number of downlink octets transferred
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 | dl_pktcount - number of downlink packets transferred
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 void send_upm_count_cnf(U8 nsapi, U32 ul_bytecount, U32 dl_bytecount,
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 U32 ul_pktcount, U32 dl_pktcount)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 (void)TRACE_FUNCTION("send_upm_count_cnf");
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 PALLOC(prim, UPM_COUNT_CNF);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 TRACE_ASSERT(prim != NULL);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 /*lint -e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 prim->nsapi = nsapi;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 prim->octets_uplink = ul_bytecount;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 prim->octets_downlink = dl_bytecount;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 prim->packets_uplink = ul_pktcount;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 prim->packets_downlink = dl_pktcount;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 /*lint +e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 (void)PSEND(hCommACI, prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 /*
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 | Function : send_upm_dti_cnf
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 | Description : Allocate, pack and send UPM_DTI_CNF primitive.
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 |
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 | Parameters : dti_linkid - DTI link ID
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 | dti_conn - connection type
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 +------------------------------------------------------------------------------
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 void send_upm_dti_cnf(U32 dti_linkid, U8 dti_conn)
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 (void)TRACE_FUNCTION("send_upm_dti_cnf");
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 {
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 PALLOC(prim, UPM_DTI_CNF);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 TRACE_ASSERT(prim != NULL);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 /*lint -e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 prim->dti_linkid = dti_linkid;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 prim->dti_conn = dti_conn;
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 /*lint +e613 (Possible use of null pointer 'prim' in left argument to operator '->') */
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 (void)PSEND(hCommACI, prim);
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 }
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97
2cf312e56ee7 src/g23m-gprs/upm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 /*==== END OF FILE ==========================================================*/