comparison g23m-aci/aci/psa_smss.c @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:75a11d740a02
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : PSA_SMSS
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 module defines the signalling functions of the
18 | protocol stack adapter for the short message service SMS.
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifndef PSA_SMSS_C
23 #define PSA_SMSS_C
24 #endif
25
26 #include "config.h"
27 #include "fixedconf.h"
28 #include "condat-features.h"
29 #include "aci_conf.h"
30
31 #include "aci_all.h"
32
33 /*==== INCLUDES ===================================================*/
34 #include "aci_cmh.h"
35 #include "ati_cmd.h"
36 #include "aci_cmd.h"
37 #include "aci.h"
38 #include "psa.h"
39 #include "psa_sms.h"
40 #include "cmh_sms.h"
41 /*==== CONSTANTS ==================================================*/
42
43 /*==== TYPES ======================================================*/
44
45
46 /*==== EXPORT =====================================================*/
47
48
49 /*==== VARIABLES ==================================================*/
50
51 /*==== FUNCTIONS ==================================================*/
52
53 GLOBAL SHORT psaSMS_ReadReq ( UBYTE mem_type, USHORT rec_num,
54 UBYTE read_mode, T_ACI_SMS_STAT cmh_state )
55 {
56 UBYTE psa_state;
57
58 TRACE_FUNCTION ("psaSMS_ReadReq()");
59
60 /*
61 *-------------------------------------------------------------------
62 * create and send primitive for SMS read
63 *-------------------------------------------------------------------
64 */
65 {
66 PALLOC (mnsms_read_req, MNSMS_READ_REQ);
67
68 mnsms_read_req -> mem_type = mem_type;
69 mnsms_read_req -> rec_num = (UBYTE)rec_num;
70 mnsms_read_req -> read_mode = read_mode;
71 if (cmhSMS_getStatPsa(cmh_state, &psa_state))
72 mnsms_read_req -> status = psa_state;
73 else
74 mnsms_read_req -> status = NOT_PRESENT_8BIT;
75
76 PSENDX (SMS, mnsms_read_req);
77 }
78
79 return 0;
80 }
81
82 #ifdef TI_PS_FF_AT_P_CMD_CPRSM
83 /*
84 +-------------------------------------------------------------------+
85 | PROJECT : GSM-PS (6147) MODULE : PSA_SMSS |
86 | ROUTINE : psaSMS_PauseReq |
87 +-------------------------------------------------------------------+
88
89 ACI-ENH-19450: Added for %CPRMS command (MDF-07.04.2004)
90
91 PURPOSE : build and send MNSMS_PAUSE_REQ to SMS
92
93 */
94
95 GLOBAL void psaSMS_PauseReq ( )
96 {
97
98 TRACE_FUNCTION ("psaSMS_PauseReq()");
99
100 /* build and send MNSMS_PAUSE_REQ */
101 {
102 PALLOC (mnsms_pause_req, MNSMS_PAUSE_REQ);
103 PSENDX (SMS, mnsms_pause_req);
104 }
105
106 }
107
108 /*
109 +-------------------------------------------------------------------+
110 | PROJECT : GSM-PS (6147) MODULE : PSA_SMSS |
111 | ROUTINE : psaSMS_ResumeReq |
112 +-------------------------------------------------------------------+
113
114 ACI-ENH-19450: Added for %CPRMS command (MDF-07.04.2004)
115
116 PURPOSE : build and send MNSMS_RESUME_REQ to SMS
117
118 */
119
120 GLOBAL void psaSMS_ResumeReq ( )
121 {
122
123 TRACE_FUNCTION ("psaSMS_ResumeReq()");
124
125 /* build and send MNSMS_PAUSE_REQ */
126 {
127 PALLOC (mnsms_resume_req, MNSMS_RESUME_REQ);
128 PSENDX (SMS, mnsms_resume_req);
129 }
130
131 }
132
133 /*
134 +-------------------------------------------------------------------+
135 | PROJECT : GSM-PS (6147) MODULE : PSA_SMSS |
136 | ROUTINE : psaSMS_TestReq |
137 +-------------------------------------------------------------------+
138
139 ACI-ENH-19450: Added for %CPRMS command (MDF-07.04.2004)
140
141 PURPOSE : build and send MNSMS_RESUME_REQ to SMS
142
143 */
144
145 GLOBAL void psaSMS_QueryReq (UBYTE query_type)
146 {
147
148 TRACE_FUNCTION ("psaSMS_QueryReq()");
149
150 /* build and send MNSMS_QUERY_REQ */
151 {
152 PALLOC (mnsms_query_req, MNSMS_QUERY_REQ);
153
154 mnsms_query_req->query_type = query_type;
155
156 PSENDX (SMS, mnsms_query_req);
157 }
158
159 }
160 #endif /* TI_PS_FF_AT_P_CMD_CPRSM */
161
162 /*==== EOF ========================================================*/
163