Update: orig2001_11_27_05_17 -> orig2001_11_27_22_58
[gnokii.git] / include / devices / unixserial.h
1 /*
2
3   $Id$
4
5   G N O K I I
6
7   A Linux/Unix toolset and driver for Nokia mobile phones.
8
9   Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml.
10
11   Released under the terms of the GNU GPL, see file COPYING for more details.
12
13   $Log$
14   Revision 1.1.1.1.8.1  2001/11/27 23:06:09  short
15   Update: orig2001_11_27_05_17 -> orig2001_11_27_22_58
16
17   Revision 1.1.1.1.2.1  2001/11/27 22:48:37  short
18   Update: orig2001_11_27_05_17 -> orig2001_11_27_22_58
19
20   Revision 1.1.1.2  2001/11/27 22:01:28  short
21   :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Tue Nov 27 22:58 CET 2001
22
23   Revision 1.3  2001/11/27 12:19:01  pkot
24   Cleanup, indentation, ANSI complaint preprocesor symbols (Jan Kratochvil, me)
25
26   Revision 1.2  2001/08/20 23:27:37  pkot
27   Add hardware shakehand to the link layer (Manfred Jonsson)
28
29   Revision 1.1  2001/02/21 19:57:12  chris
30   More fiddling with the directory layout
31
32 */
33
34 #ifndef __devices_unixserial_h
35 #define __devices_unixserial_h
36
37 #ifdef WIN32
38 #  include <stddef.h>
39   /* FIXME: this should be solved in config.h in 0.4.0 */
40 #  define __const const
41         typedef void * __ptr_t;
42 #else
43 #  include <unistd.h>
44 #endif  /* WIN32 */
45
46 #include "misc.h"
47
48 int serial_open(__const char *__file, int __oflag);
49 int serial_close(int __fd);
50
51 int serial_opendevice(__const char *__file, int __with_odd_parity, int __with_async, int __with_hw_handshake);
52
53 void serial_setdtrrts(int __fd, int __dtr, int __rts);
54 void serial_changespeed(int __fd, int __speed);
55
56 size_t serial_read(int __fd, __ptr_t __buf, size_t __nbytes);
57 size_t serial_write(int __fd, __const __ptr_t __buf, size_t __n);
58
59 int serial_select(int fd, struct timeval *timeout);
60
61 #endif  /* __devices_unixserial_h */