http://marcin-wiacek.fkn.pl/english/zips/mygnokii.tar.gz
[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   Released under the terms of the GNU GPL, see file COPYING for more details.
10
11 */
12
13 #ifndef __devices_unixserial_h
14 #define __devices_unixserial_h
15
16 #ifdef WIN32
17   #include <stddef.h>
18   /* FIXME: this should be solved in config.h in 0.4.0 */
19   #define __const const
20   typedef void * __ptr_t;
21 #else
22   #include <unistd.h>
23 #endif  /* WIN32 */
24
25 #include "misc.h"
26
27 int serial_open(__const char *__file, int __oflag);
28 int serial_close(int __fd);
29
30 int serial_opendevice(__const char *__file, int __with_odd_parity, int __with_async, int __with_hw_handshake);
31
32 void serial_setdtrrts(int __fd, int __dtr, int __rts);
33 void serial_changespeed(int __fd, int __speed);
34
35 size_t serial_read(int __fd, __ptr_t __buf, size_t __nbytes);
36 size_t serial_write(int __fd, __const __ptr_t __buf, size_t __n);
37
38 int serial_select(int fd, struct timeval *timeout);
39
40 #endif  /* __devices_unixserial_h */
41
42
43
44