4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Hocheol Seo <hocheol.seo@samsung.com>
7 * Injun Yang <injun.yang@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
25 #include <tapi_common.h>
26 #include <ITapiModem.h>
29 #include "dr-common.h"
33 extern dr_info_t dr_info;
34 extern TapiHandle *tapi_handle;
38 static void __modem_pin_ctrl_cb(TapiHandle *handle, int result, void *data, void *user_data)
40 DBG("__modem_pin_ctrl_cb result : %d \n", result);
44 int _send_dtr_ctrl_signal(int status)
47 tapi_ps_btdun_pincontrol pincontrol;
49 pincontrol.signal = GPRS_DATA_SIGNAL_DTR;
50 if (status == DTR_ON) {
51 pincontrol.status = GPRS_SIGNAL_STATUS_ON;
52 DBG("Send DTR+ to Modem \n");
54 pincontrol.status = GPRS_SIGNAL_STATUS_OFF;
55 DBG("Send DTR- to Modem \n");
58 result = tel_control_modem_dun_pin_ctrl(tapi_handle, &pincontrol, __modem_pin_ctrl_cb, NULL);
59 if (result != TAPI_API_SUCCESS) {
60 ERR("DTR sending failed. [Error : %d]\n", result);