Fixed typo in error message.
[gsmd2.git] / serial / generic.c
blob88c232beffffdad63f45b1be7a4953eaa8c7aa1b
1 /*
2 * generic.c
4 * Copyright(C) 2008 Ixonos Plc
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Boston, MA 02111.
22 * Written by
23 * Heikki Paajanen
26 #include <termios.h>
27 #include <fcntl.h>
28 #include <unistd.h>
29 #include <string.h>
31 #include <glib.h>
32 #include <glib/gstdio.h>
34 #include "../src/modem.h"
35 #include "../src/utils.h"
38 static gint generic_open_serial (SerialInterface *serial_if, const gchar *device)
40 g_debug("%s",__func__);
41 return gsmd_utils_default_serial_init(device,
42 CS8 | CLOCAL | CREAD | B115200,
43 B115200);
46 static void generic_close_serial (SerialInterface *serial_if, gint fd)
48 g_debug("%s",__func__);
49 return;
52 gboolean serial_plugin_init ( SerialInterface *serial_if, ModemInterface *modem )
54 g_debug("%s",__func__);
55 serial_if->priv = modem;
56 serial_if->open_serial = &generic_open_serial;
57 serial_if->close_serial = &generic_close_serial;
58 return TRUE;