comparison src/aci2/mfw/mfw_band.c @ 125:d5bbfb9649d5

src/aci2/mfw: file renames to make filename case consistent
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 07 Oct 2016 05:33:56 +0000
parents src/aci2/mfw/Mfw_band.c@93999a60b835
children
comparison
equal deleted inserted replaced
124:61f9999385c0 125:d5bbfb9649d5
1 /*
2 +--------------------------------------------------------------------+
3 | PROJECT: GSM-MFW $Workfile:: Mfw_band.c $|
4 | $Author:: MC/SH $Revision:: 1 $|
5 | STATE : code |
6 +--------------------------------------------------------------------+
7
8 MODULE : MFW_BAND
9
10 PURPOSE : AT%BAND functionality for MFW
11
12
13 $History: Mfw_band.c $
14
15 */
16
17
18 #define ENTITY_MFW
19
20
21 #include <string.h>
22 #include <stdio.h>
23 #include <stdlib.h>
24
25 #include "typedefs.h"
26 #include "vsi.h"
27 #include "pei.h"
28 #include "custom.h"
29 #include "gsm.h"
30
31 #include "prim.h"
32 #ifndef PCM_2_FFS
33 #include "pcm.h"
34 #endif
35
36 /* BEGIN ADD: Sumit : Req ID: : 31-Mar-2005*/
37 #ifndef NEPTUNE_BOARD
38 /* END ADD: Sumit : Req ID: : 31-Mar-2005*/
39 #include "ffs/ffs.h"
40 /* BEGIN ADD: Sumit : Req ID: : 31-Mar-2005*/
41 #else
42 #include "ffs.h"
43 #endif
44 /* END ADD: Sumit : Req ID: : 31-Mar-2005*/
45
46
47 /* SPR#1470 - SH - these includes are now outside of
48 * FAX_AND_DATA switch */
49 #include "message.h"
50 #include "prim.h"
51 #include "aci_cmh.h"
52
53 #if defined (FAX_AND_DATA)
54 /*#include "message.h"
55 #include "prim.h"
56 #include "aci_cmh.h" SPR#1470 - SH */
57 #include "aci_fd.h"
58 #endif
59
60 #ifdef GPRS
61 #include "gprs.h"
62 #endif
63 #include "dti_conn_mng.h"
64
65 #include "phb.h"
66 #include "psa.h"
67 #include "cmh.h"
68 #include "cmh_phb.h"
69 #include "psa.h"
70 #include "psa_sim.h"
71 #include "cus_aci.h"
72 #include "cmh_mm.h"
73 #include "cmh_sim.h"
74
75 #include "Mfw_band.h"
76
77
78 /*
79 +--------------------------------------------------------------------+
80 | PROJECT: GSM-MFW (8417) MODULE: MFW_BAND |
81 | STATE : code ROUTINE: band_radio_mode_switch|
82 +--------------------------------------------------------------------+
83
84
85 PURPOSE : Set radio band and mode
86
87 */
88
89 T_MFW_BAND_RET band_radio_mode_switch(T_MFW_BAND_MODE mode, UBYTE band)
90 {
91 T_ACI_RETURN ret;
92
93 TRACE_FUNCTION("band_radio_mode_switch");
94
95 ret = sAT_PercentBAND(CMD_SRC_LCL, mode, band); /*radio mode set without errors*/
96
97 TRACE_EVENT_P1("Band: %d", band);
98 TRACE_EVENT_P1("Return val: %d", ret);
99
100 switch(ret)
101 {
102 case (AT_BUSY):
103 return MFW_BAND_Busy;
104 // break; // RAVI
105 case (AT_FAIL):
106 return MFW_BAND_Fail;
107 // break; // RAVI
108 case (AT_CMPL):
109 return MFW_BAND_OK;
110 // break; // RAVI
111 case (AT_EXCT):
112 return MFW_BAND_InProgress;
113 // break; // RAVI
114 default:
115 return MFW_BAND_Fail;
116 // break; // RAVI
117 }
118 }
119
120
121 /*
122 +--------------------------------------------------------------------+
123 | PROJECT: GSM-MFW (8417) MODULE: MFW_BAND |
124 | STATE : code ROUTINE: band_get_radio_modes |
125 +--------------------------------------------------------------------+
126
127
128 PURPOSE : Get list of possible bands
129
130 */
131
132 T_MFW_BAND_RET band_get_radio_modes(T_MFW_BAND_MODE* maxMode, UBYTE *band)
133 {
134 T_ACI_RETURN ret;
135
136 ret = tAT_PercentBAND(CMD_SRC_LCL, (T_ACI_BAND_MODE*)maxMode, (UBYTE*)band);
137
138 if (ret == AT_CMPL)
139 return MFW_BAND_OK;
140 else
141 return MFW_BAND_Fail;
142 }
143
144 /*
145 +--------------------------------------------------------------------------+
146 | PROJECT: GSM-MFW (8417) MODULE: MFW_BAND |
147 | STATE : code ROUTINE: band_get_current_radio_mode |
148 +---------------------------------------------------------------------------+
149
150
151 PURPOSE : Get current band setting
152
153 */
154 T_MFW_BAND_RET band_get_current_radio_mode(T_MFW_BAND_MODE* mode, UBYTE* band)
155 {
156 T_ACI_RETURN ret;
157
158 ret = qAT_PercentBAND(CMD_SRC_LCL, (T_ACI_BAND_MODE*)mode, (UBYTE*)band);
159
160 if (ret == AT_CMPL)
161 return MFW_BAND_OK;
162 else
163 return MFW_BAND_Fail;
164
165 }
166
167