1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00
Commit Graph

265 Commits

Author SHA1 Message Date
silverbuddy
e48f0ece0f Fix malloc size (Win32) 2014-03-21 21:49:22 +04:00
silverbuddy
904ac164bf Fix compilation (Win32 UNICODE) 2014-03-21 21:43:19 +04:00
Uwe Hermann
524b0e1454 Add runtime version querying functions.
This fixes bug #282.
2014-03-13 12:23:56 +01:00
Martin Ling
3ceb8aecff linux_termios.c: fix check for termios speed fields. 2014-01-03 13:44:14 +01:00
Martin Ling
5cea279a85 linux: Speed fields may not be present in kernel termios structures. 2014-01-03 13:38:06 +01:00
Martin Ling
bd791fe121 Remove need to include linux_termios.h on non-Linux. 2014-01-03 12:16:41 +01:00
Martin Ling
27e231ff35 Only build linux_termios.c on Linux. 2014-01-03 11:52:53 +01:00
Uwe Hermann
8814faa3b6 Makefile.am: Add Doxyfile to the generated tarball. 2013-12-27 02:44:42 +01:00
Uwe Hermann
deaf0a6351 Doxygen: Fix a warning / incorrect parameter name. 2013-12-27 02:39:29 +01:00
Uwe Hermann
104f093dba Makefile.am: Fix 'make doc' for out-of-tree builds. 2013-12-27 02:39:06 +01:00
Uwe Hermann
7c3a1ee32a configure.ac: Cosmetics, fix typo. 2013-12-27 02:28:10 +01:00
Martin Ling
6f1186aa82 Add API for waiting on port events. 2013-12-20 18:24:42 +00:00
Martin Ling
2dcf830888 Remove various unused code in configure.ac. 2013-12-18 15:59:58 +00:00
Uwe Hermann
f15a2349e2 Doxyfile: Update to Doxygen 1.8.5 config file.
This is done via "doxygen -u".
2013-12-17 22:39:19 +01:00
Uwe Hermann
0a1ab8bf8f Minor Doxygen updates/fixes. 2013-12-17 22:39:19 +01:00
Uwe Hermann
1a2a1544d7 win32: Add missing ClearCommError() error handling/reporting. 2013-12-17 22:39:15 +01:00
Martin Ling
537942c9ed Windows: clear errors after port open. 2013-12-17 17:19:55 +00:00
Martin Ling
950faaa94a Remove obsolete comment. 2013-12-08 14:41:53 +00:00
Martin Ling
9af8cff38f Remove stray periods from debug messages. 2013-12-07 20:18:27 +00:00
Martin Ling
64d996216e Windows nonblocking write: Dont't return if async I/O finishes immediately. 2013-12-07 20:16:38 +00:00
Martin Ling
1622ef60b0 Check return value of GetOverlappedResult(). 2013-12-07 17:09:06 +00:00
Martin Ling
7c1eff54fd Make RETURN_VALUE macro side effect safe. 2013-12-07 16:29:18 +00:00
Martin Ling
33fd8804b8 Fix building for Android. 2013-12-05 20:33:06 +00:00
Martin Ling
397d89de3a Make libudev optional. 2013-12-05 20:21:39 +00:00
Uwe Hermann
6c8716e9da TIOCINQ/TIOCOUTQ is not available everywhere.
E.g. on NetBSD TIOCINQ is not available, but FIONREAD seems to
do pretty much the same thing.
2013-12-01 18:04:24 +01:00
Martin Ling
2c827b2188 Handle EINTR from tcdrain() in sp_drain(). 2013-11-27 14:35:36 +00:00
Martin Ling
b87deb7c70 Clarify documentation regarding signals and EINTR. 2013-11-27 14:12:12 +00:00
Martin Ling
859874648e Fix error in documentation. 2013-11-27 14:12:04 +00:00
Martin Ling
2007ce5e14 Document EINTR handling. 2013-11-27 13:18:29 +00:00
Martin Ling
63a17c64ae Handle EINTR by repeating the call. 2013-11-27 12:43:12 +00:00
Martin Ling
1b34204261 Fix conversion of timeout to struct timeval. 2013-11-27 11:11:55 +00:00
Martin Ling
3353c22f32 Add sp_input_waiting() and sp_output_waiting() functions. 2013-11-27 02:55:18 +00:00
Martin Ling
e3dcf9068e New API and implementation for blocking and non-blocking I/O. 2013-11-27 01:45:48 +00:00
Martin Ling
8fbf876dfd Set VMIN = 1, not zero which forces non-blocking reads. 2013-11-27 01:37:35 +00:00
Martin Ling
afb518f04a Return SP_ERR_SUPP on attempt to set mark/space parity without CMSPAR. 2013-11-26 15:26:18 +00:00
Uwe Hermann
00d8c56d91 Minor cosmetics. 2013-11-26 16:12:20 +01:00
Uwe Hermann
dd7742fb15 Use "sp: " as prefix for debug logs (nicer/shorter). 2013-11-26 16:00:53 +01:00
Uwe Hermann
c3e0509275 Fix the build on NetBSD/OpenBSD/FreeBSD, possibly others.
Various termios flags used in sp_open() are Linux-specific (or even
specific to certain architectures / drivers) and not available on all
OSes (and/or versions or kernels thereof).

Thus, #ifdef out flags that we know might not be available everywhere.
2013-11-26 16:00:53 +01:00
Martin Ling
bccc7c9fa0 Set some sane defaults in sp_open() on Windows too. 2013-11-25 18:30:34 +00:00
Martin Ling
3f5c06d067 Apply termios setting changes immediately. 2013-11-25 18:21:49 +00:00
Martin Ling
e432ce6006 Support mark/space parity settings. 2013-11-25 18:05:58 +00:00
Martin Ling
b251be4b26 Turn off all the fancy termios features. 2013-11-25 17:55:37 +00:00
Martin Ling
0765af5644 Windows nonblocking write: 1 byte at a time to know when buffer fills. 2013-11-25 15:23:05 +00:00
Martin Ling
a3cb91f5e1 Implement non-blocking I/O on Windows. 2013-11-25 12:01:13 +00:00
Martin Ling
aac4d7f292 Fix SET_FAIL macro. 2013-11-25 11:34:42 +00:00
Martin Ling
33d5ff47b5 Handle -EAGAIN in non-blocking reads on Unix, and return 0 from sp_read(). 2013-11-25 10:23:13 +00:00
Martin Ling
0ba3e49b45 Fix bug in debug message generation in sp_flush(). 2013-11-23 21:21:18 +00:00
Martin Ling
59131d6028 Initialise structure in sp_new_config(). 2013-11-23 20:55:18 +00:00
Martin Ling
35ff018b49 Add generator program for configuration accessor headers. 2013-11-23 20:45:09 +00:00
Martin Ling
9b1502efce Make configuration structure opaque. 2013-11-23 20:43:13 +00:00