annotate g23m/condat/ms/src/aci/ati_src_rvt.c @ 303:5408ac162f16

l1p_cmpl.c: l1ps_read_nb_dl() reconstructed
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 02 Oct 2017 07:49:35 +0000
parents 91fb52ecb228
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2 * This module is a FreeCalypso addition. Here we are going to implement
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
3 * a mechanism for passing AT commands and responses over RVTMUX.
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4 */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
6 #if 0
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7 #include "config.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
8 #include "fixedconf.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
9 #include "condat-features.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 #include "aci_conf.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 #endif
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
12
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
13 /* includes copied from ati_cmd.c */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
14
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
15 #undef DUMMY_ATI_STRINGS
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
16
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
17 #include "aci_all.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
18
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19 #include "dti.h" /* functionality of the dti library */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 #include "line_edit.h" /* SKA 2002-09-05 */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
21 #include "aci_cmh.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
22 #include "ati_cmd.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
23 #include "aci_io.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
24 #include "aci_cmd.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
25 #include "l4_tim.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
26
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
27 #include <string.h>
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
28 #include <stdarg.h>
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
29 #include <stdio.h>
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
30
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
31 #include "psa.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
32 #include "cmh.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
33
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
34 #include "aci_lst.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
35 #include "dti_conn_mng.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
36 #ifdef UART
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
37 #include "psa_uart.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
38 #endif
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
39 #include "ati_io.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
40 #include "aci_mem.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
41
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
42 #ifdef SIM_TOOLKIT
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
43 #include "ati_src_sat.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
44 #include "psa_cc.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
45 #include "psa_sat.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
46 #endif /* SIM_TOOLKIT */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
47
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
48 #ifdef GPRS
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
49 #include "gaci_cmh.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
50 #include "gaci_cmd.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
51 #endif /* GPRS */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
52
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
53 #include "aci_prs.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
54
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
55
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
56 #ifndef _SIMULATION_
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
57 #ifdef UART
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
58 #include "cmh_uart.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
59 #endif
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
60 #endif
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
61
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
62 #include "psa_sms.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
63 #include "aci.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
64 #include "ati_ext_mech.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
65
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
66 #ifdef FF_ATI_BAT
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
67 #include "ati_bat.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
68 #include "aci_bat.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
69 #endif
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
70
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
71 EXTERN T_ACI_LIST *ati_src_list;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
72
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
73 #include "rvt/rvt_gen.h"
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
74
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
75 static UBYTE rvt_src_id;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
76 static T_RVT_USER_ID rvt_user_id;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
77
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
78 /*
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
79 * The following function is the callback registered with RVT; it gets
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
80 * called in RVT HISR context. We allocate an ACI_CMD_REQ primitive,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
81 * copy the received string into it and post it to ACI to be processed
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
82 * in our own task context.
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
83 */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
84 GLOBAL void ati_src_rvt_input_callback (T_RVT_BUFFER in_str, UINT16 in_str_len)
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
85 {
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
86 PALLOC (aci_cmd_req, ACI_CMD_REQ);
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
87
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
88 aci_cmd_req->cmd_src = rvt_src_id;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
89 aci_cmd_req->cmd_len = in_str_len;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
90 memcpy(aci_cmd_req->cmd_seq, in_str, in_str_len);
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
91
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
92 PSENDX (ACI, aci_cmd_req);
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
93 }
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
94
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
95 /*
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
96 * The following function is called from aci_aci.c when an ACI_CMD_REQ
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
97 * primitive (sent by the previous function) has been received.
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
98 */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
99 GLOBAL BOOL ati_src_rvt_proc_cmd (T_ACI_CMD_REQ *aci_cmd_req)
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
100 {
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
101 T_ATI_SRC_PARAMS *src_params = find_element (ati_src_list, rvt_src_id,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
102 search_ati_src_id);
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
103
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
104 ati_user_output_cfg[rvt_src_id].atE = 0;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
105
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
106 if (src_params->text_mode EQ CMD_MODE)
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
107 {
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
108 TRACE_FUNCTION ("ati_src_rvt_proc_cmd () CMD MODE");
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
109
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
110 aci_cmd_req->cmd_seq[aci_cmd_req->cmd_len] = '\r'; /* make it V.25 ter compatible */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
111 aci_cmd_req->cmd_seq[(aci_cmd_req->cmd_len) + 1] = '\0';
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
112 aci_cmd_req->cmd_len++;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
113 }
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
114 else /* text has to be terminated by Ctrl-Z */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
115 {
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
116 TRACE_FUNCTION ("ati_src_rvt_proc_cmd () TEXT MODE");
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
117
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
118 aci_cmd_req->cmd_seq[aci_cmd_req->cmd_len] = 0x1a; /* make it V.25 ter compatible */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
119 aci_cmd_req->cmd_seq[(aci_cmd_req->cmd_len) + 1] = '\0';
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
120 aci_cmd_req->cmd_len++;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
121 }
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
122
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
123 return (ati_execute (rvt_src_id,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
124 aci_cmd_req->cmd_seq,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
125 aci_cmd_req->cmd_len));
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
126 }
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
127
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
128 /*
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
129 * The following function is the callback registered with ATI; it gets
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
130 * called when ATI has something to send to the user.
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
131 */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
132 GLOBAL void ati_src_rvt_result_cb (UBYTE src_id,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
133 T_ATI_OUTPUT_TYPE output_type,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
134 UBYTE *output,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
135 USHORT output_len)
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
136 {
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
137 TRACE_FUNCTION ("ati_src_rvt_result_cb ()");
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
138 rvt_send_trace_cpy (output, rvt_user_id, output_len, RVT_ASCII_FORMAT);
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
139 }
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
140
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
141 /*
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
142 * The following function is the other callback registered with ATI.
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
143 */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
144 GLOBAL void ati_src_rvt_line_state_cb (UBYTE src_id,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
145 T_ATI_LINE_STATE_TYPE line_state_type,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
146 ULONG line_state_param)
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
147 {
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
148 TRACE_FUNCTION ("ati_src_rvt_line_state_cb ()");
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
149
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
150 switch (line_state_type)
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
151 {
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
152 case ATI_LINE_STATE_OUTPUT_TYPE:
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
153 TRACE_EVENT_P1 ("[DBG] ati_src_rvt_line_state_cb (): ATI_LINE_STATE_OUTPUT_TYPE = %d", line_state_param);
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
154 break;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
155
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
156 case ATI_LINE_STATE_DCD:
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
157 TRACE_EVENT_P1 ("[DBG] ati_src_rvt_line_state_cb (): ATI_LINE_STATE_DCD = %d", line_state_param);
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
158 break;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
159
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
160 case ATI_LINE_STATE_RNG: /* TODO */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
161 {
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
162 T_IO_RING_PARAMS rng_params;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
163
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
164 memcpy (&rng_params, (T_IO_RING_PARAMS*)line_state_param,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
165 sizeof(T_IO_RING_PARAMS));
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
166
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
167 TRACE_EVENT_P1 ("[DBG] ati_src_rvt_line_state_cb (): ATI_LINE_STATE_RNG = %d", rng_params.ring_stat);
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
168
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
169 break;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
170 }
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
171
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
172 default:
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
173 TRACE_EVENT_P1 ("[WRN] ati_src_rvt_line_state_cb (): UNKNOWN line_state_type = %d", line_state_type);
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
174 break;
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
175 }
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
176 }
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
177
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
178 /*
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
179 * The following function is called from ati_cmd_init() in ati_cmd.c
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
180 * to register our mechanism.
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
181 */
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
182 GLOBAL void ati_src_rvt_register (void)
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
183 {
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
184 rvt_register_id ("AT", &rvt_user_id, ati_src_rvt_input_callback);
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
185 rvt_src_id = ati_init (ATI_SRC_TYPE_TST,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
186 ati_src_rvt_result_cb,
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
187 ati_src_rvt_line_state_cb);
14
91fb52ecb228 ati_src_rvt.c: set ATI_CMD_MODE to make SMS notifications work
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 4
diff changeset
188 ati_switch_mode(rvt_src_id, ATI_CMD_MODE);
4
34779e224b32 ati_src_rvt.c added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
189 }