X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=include%2Fdevices%2Funixserial.h;fp=include%2Fdevices%2Funixserial.h;h=b044d439fdcaa81534209fef54893d4ff221a819;hb=5d49fe8eea4e11457b4f9904eb0d5db435679841;hp=0000000000000000000000000000000000000000;hpb=a51604573a1dfaaad4304ffbf918e91617acf468;p=gnokii.git diff --git a/include/devices/unixserial.h b/include/devices/unixserial.h new file mode 100644 index 0000000..b044d43 --- /dev/null +++ b/include/devices/unixserial.h @@ -0,0 +1,44 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef __devices_unixserial_h +#define __devices_unixserial_h + +#ifdef WIN32 + #include + /* FIXME: this should be solved in config.h in 0.4.0 */ + #define __const const + typedef void * __ptr_t; +#else + #include +#endif /* WIN32 */ + +#include "misc.h" + +int serial_open(__const char *__file, int __oflag); +int serial_close(int __fd); + +int serial_opendevice(__const char *__file, int __with_odd_parity, int __with_async, int __with_hw_handshake); + +void serial_setdtrrts(int __fd, int __dtr, int __rts); +void serial_changespeed(int __fd, int __speed); + +size_t serial_read(int __fd, __ptr_t __buf, size_t __nbytes); +size_t serial_write(int __fd, __const __ptr_t __buf, size_t __n); + +int serial_select(int fd, struct timeval *timeout); + +#endif /* __devices_unixserial_h */ + + + +