]> sigrok.org Git - libserialport.git/log
libserialport.git
10 years agoDoxygen: Fix a warning / incorrect parameter name.
Uwe Hermann [Fri, 27 Dec 2013 01:39:29 +0000 (02:39 +0100)]
Doxygen: Fix a warning / incorrect parameter name.

10 years agoMakefile.am: Fix 'make doc' for out-of-tree builds.
Uwe Hermann [Fri, 27 Dec 2013 01:39:06 +0000 (02:39 +0100)]
Makefile.am: Fix 'make doc' for out-of-tree builds.

10 years agoconfigure.ac: Cosmetics, fix typo.
Uwe Hermann [Fri, 27 Dec 2013 01:28:10 +0000 (02:28 +0100)]
configure.ac: Cosmetics, fix typo.

10 years agoAdd API for waiting on port events.
Martin Ling [Fri, 20 Dec 2013 16:02:57 +0000 (16:02 +0000)]
Add API for waiting on port events.

10 years agoRemove various unused code in configure.ac.
Martin Ling [Wed, 18 Dec 2013 15:59:58 +0000 (15:59 +0000)]
Remove various unused code in configure.ac.

10 years agoDoxyfile: Update to Doxygen 1.8.5 config file.
Uwe Hermann [Tue, 17 Dec 2013 21:36:35 +0000 (22:36 +0100)]
Doxyfile: Update to Doxygen 1.8.5 config file.

This is done via "doxygen -u".

10 years agoMinor Doxygen updates/fixes.
Uwe Hermann [Tue, 17 Dec 2013 21:31:12 +0000 (22:31 +0100)]
Minor Doxygen updates/fixes.

10 years agowin32: Add missing ClearCommError() error handling/reporting.
Uwe Hermann [Tue, 17 Dec 2013 21:17:16 +0000 (22:17 +0100)]
win32: Add missing ClearCommError() error handling/reporting.

10 years agoWindows: clear errors after port open.
Martin Ling [Tue, 17 Dec 2013 17:19:55 +0000 (17:19 +0000)]
Windows: clear errors after port open.

10 years agoRemove obsolete comment.
Martin Ling [Sun, 8 Dec 2013 14:41:53 +0000 (14:41 +0000)]
Remove obsolete comment.

10 years agoRemove stray periods from debug messages.
Martin Ling [Sat, 7 Dec 2013 20:18:27 +0000 (20:18 +0000)]
Remove stray periods from debug messages.

10 years agoWindows nonblocking write: Dont't return if async I/O finishes immediately.
Martin Ling [Sat, 7 Dec 2013 20:16:38 +0000 (20:16 +0000)]
Windows nonblocking write: Dont't return if async I/O finishes immediately.

10 years agoCheck return value of GetOverlappedResult().
Martin Ling [Sat, 7 Dec 2013 16:50:27 +0000 (16:50 +0000)]
Check return value of GetOverlappedResult().

10 years agoMake RETURN_VALUE macro side effect safe.
Martin Ling [Sat, 7 Dec 2013 16:26:48 +0000 (16:26 +0000)]
Make RETURN_VALUE macro side effect safe.

10 years agoFix building for Android.
Martin Ling [Thu, 5 Dec 2013 20:24:05 +0000 (20:24 +0000)]
Fix building for Android.

10 years agoMake libudev optional.
Martin Ling [Thu, 5 Dec 2013 20:18:32 +0000 (20:18 +0000)]
Make libudev optional.

10 years agoTIOCINQ/TIOCOUTQ is not available everywhere.
Uwe Hermann [Sun, 1 Dec 2013 17:04:24 +0000 (18:04 +0100)]
TIOCINQ/TIOCOUTQ is not available everywhere.

E.g. on NetBSD TIOCINQ is not available, but FIONREAD seems to
do pretty much the same thing.

10 years agoHandle EINTR from tcdrain() in sp_drain().
Martin Ling [Wed, 27 Nov 2013 14:31:54 +0000 (14:31 +0000)]
Handle EINTR from tcdrain() in sp_drain().

10 years agoClarify documentation regarding signals and EINTR.
Martin Ling [Wed, 27 Nov 2013 14:12:12 +0000 (14:12 +0000)]
Clarify documentation regarding signals and EINTR.

10 years agoFix error in documentation.
Martin Ling [Wed, 27 Nov 2013 14:12:04 +0000 (14:12 +0000)]
Fix error in documentation.

10 years agoDocument EINTR handling.
Martin Ling [Wed, 27 Nov 2013 13:18:29 +0000 (13:18 +0000)]
Document EINTR handling.

10 years agoHandle EINTR by repeating the call.
Martin Ling [Wed, 27 Nov 2013 12:42:27 +0000 (12:42 +0000)]
Handle EINTR by repeating the call.

10 years agoFix conversion of timeout to struct timeval.
Martin Ling [Wed, 27 Nov 2013 11:11:55 +0000 (11:11 +0000)]
Fix conversion of timeout to struct timeval.

10 years agoAdd sp_input_waiting() and sp_output_waiting() functions.
Martin Ling [Wed, 27 Nov 2013 02:55:18 +0000 (02:55 +0000)]
Add sp_input_waiting() and sp_output_waiting() functions.

10 years agoNew API and implementation for blocking and non-blocking I/O.
Martin Ling [Mon, 25 Nov 2013 22:12:10 +0000 (22:12 +0000)]
New API and implementation for blocking and non-blocking I/O.

10 years agoSet VMIN = 1, not zero which forces non-blocking reads.
Martin Ling [Wed, 27 Nov 2013 01:16:51 +0000 (01:16 +0000)]
Set VMIN = 1, not zero which forces non-blocking reads.

10 years agoReturn SP_ERR_SUPP on attempt to set mark/space parity without CMSPAR.
Martin Ling [Tue, 26 Nov 2013 15:26:18 +0000 (15:26 +0000)]
Return SP_ERR_SUPP on attempt to set mark/space parity without CMSPAR.

10 years agoMinor cosmetics.
Uwe Hermann [Tue, 26 Nov 2013 15:12:20 +0000 (16:12 +0100)]
Minor cosmetics.

10 years agoUse "sp: " as prefix for debug logs (nicer/shorter).
Uwe Hermann [Tue, 26 Nov 2013 07:29:18 +0000 (08:29 +0100)]
Use "sp: " as prefix for debug logs (nicer/shorter).

10 years agoFix the build on NetBSD/OpenBSD/FreeBSD, possibly others.
Uwe Hermann [Tue, 26 Nov 2013 07:12:15 +0000 (08:12 +0100)]
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.

10 years agoSet some sane defaults in sp_open() on Windows too.
Martin Ling [Mon, 25 Nov 2013 18:30:34 +0000 (18:30 +0000)]
Set some sane defaults in sp_open() on Windows too.

10 years agoApply termios setting changes immediately.
Martin Ling [Mon, 25 Nov 2013 18:21:49 +0000 (18:21 +0000)]
Apply termios setting changes immediately.

10 years agoSupport mark/space parity settings.
Martin Ling [Mon, 25 Nov 2013 18:05:58 +0000 (18:05 +0000)]
Support mark/space parity settings.

10 years agoTurn off all the fancy termios features.
Martin Ling [Mon, 25 Nov 2013 17:55:37 +0000 (17:55 +0000)]
Turn off all the fancy termios features.

10 years agoWindows nonblocking write: 1 byte at a time to know when buffer fills.
Martin Ling [Mon, 25 Nov 2013 15:21:19 +0000 (15:21 +0000)]
Windows nonblocking write: 1 byte at a time to know when buffer fills.

10 years agoImplement non-blocking I/O on Windows.
Martin Ling [Mon, 25 Nov 2013 11:47:19 +0000 (11:47 +0000)]
Implement non-blocking I/O on Windows.

10 years agoFix SET_FAIL macro.
Martin Ling [Mon, 25 Nov 2013 11:34:42 +0000 (11:34 +0000)]
Fix SET_FAIL macro.

10 years agoHandle -EAGAIN in non-blocking reads on Unix, and return 0 from sp_read().
Martin Ling [Mon, 25 Nov 2013 10:23:13 +0000 (10:23 +0000)]
Handle -EAGAIN in non-blocking reads on Unix, and return 0 from sp_read().

10 years agoFix bug in debug message generation in sp_flush().
Martin Ling [Sat, 23 Nov 2013 21:21:18 +0000 (21:21 +0000)]
Fix bug in debug message generation in sp_flush().

10 years agoInitialise structure in sp_new_config().
Martin Ling [Sat, 23 Nov 2013 20:55:18 +0000 (20:55 +0000)]
Initialise structure in sp_new_config().

10 years agoAdd generator program for configuration accessor headers.
Martin Ling [Sat, 23 Nov 2013 20:45:09 +0000 (20:45 +0000)]
Add generator program for configuration accessor headers.

10 years agoMake configuration structure opaque.
Martin Ling [Sat, 23 Nov 2013 20:41:01 +0000 (20:41 +0000)]
Make configuration structure opaque.

10 years agoClarify documentation.
Martin Ling [Sat, 23 Nov 2013 18:23:45 +0000 (18:23 +0000)]
Clarify documentation.

10 years agoAdd sp_get_port_handle() function.
Martin Ling [Sat, 23 Nov 2013 17:50:45 +0000 (17:50 +0000)]
Add sp_get_port_handle() function.

10 years agoMake port structure opaque.
Martin Ling [Sat, 23 Nov 2013 17:11:19 +0000 (17:11 +0000)]
Make port structure opaque.

10 years agoAdd back previously deleted sp_get_config function.
Martin Ling [Sat, 23 Nov 2013 12:04:21 +0000 (12:04 +0000)]
Add back previously deleted sp_get_config function.

10 years agoFix swapped DCD & RI signals on Windows.
Martin Ling [Sat, 23 Nov 2013 11:59:42 +0000 (11:59 +0000)]
Fix swapped DCD & RI signals on Windows.

10 years agoReturn SP_ERR_SUPP from sp_list_ports() on unsupported platforms.
Martin Ling [Sat, 23 Nov 2013 11:57:17 +0000 (11:57 +0000)]
Return SP_ERR_SUPP from sp_list_ports() on unsupported platforms.

10 years agoGenerate debug output when returning using TRY() macro.
Martin Ling [Sat, 23 Nov 2013 11:49:35 +0000 (11:49 +0000)]
Generate debug output when returning using TRY() macro.

10 years agoAdditional argument checking.
Martin Ling [Sat, 23 Nov 2013 11:39:59 +0000 (11:39 +0000)]
Additional argument checking.

10 years agoAdd additional debug messages.
Martin Ling [Sat, 23 Nov 2013 01:08:57 +0000 (01:08 +0000)]
Add additional debug messages.

10 years agoAdd debug output for all entry and exit points.
Martin Ling [Sat, 23 Nov 2013 00:26:44 +0000 (00:26 +0000)]
Add debug output for all entry and exit points.

10 years agoAdd debug macros.
Martin Ling [Fri, 22 Nov 2013 22:44:19 +0000 (22:44 +0000)]
Add debug macros.

10 years agoAdd API for and default handler for debug messages.
Martin Ling [Fri, 22 Nov 2013 22:41:03 +0000 (22:41 +0000)]
Add API for and default handler for debug messages.

10 years agoserialport.c: Add missing linux_termios.h #include.
Uwe Hermann [Fri, 22 Nov 2013 21:37:15 +0000 (22:37 +0100)]
serialport.c: Add missing linux_termios.h #include.

This is safe to include (at the moment) on all non-win32 OSes, since it
doesn't contain anything OS-specific.

10 years agoRemove dupliate/redundant return value documentation.
Martin Ling [Fri, 22 Nov 2013 20:27:39 +0000 (20:27 +0000)]
Remove dupliate/redundant return value documentation.

10 years agoUse new SP_ERR_SUPP error to indicate unsupported operations.
Martin Ling [Fri, 22 Nov 2013 20:12:39 +0000 (20:12 +0000)]
Use new SP_ERR_SUPP error to indicate unsupported operations.

10 years agoMakefile.am: Add missing linux_termios.h.
Uwe Hermann [Fri, 22 Nov 2013 19:13:17 +0000 (20:13 +0100)]
Makefile.am: Add missing linux_termios.h.

If the file is not listed in SOURCES, it won't end up in the tarball.

Thanks to Dan HorĂ¡k for the report.

10 years agoCheck for termiox support at runtime.
Martin Ling [Fri, 22 Nov 2013 19:00:24 +0000 (19:00 +0000)]
Check for termiox support at runtime.

10 years agoFix memory leaks.
Martin Ling [Fri, 22 Nov 2013 18:43:41 +0000 (18:43 +0000)]
Fix memory leaks.

10 years agoUse common 3-digit package version number.
Uwe Hermann [Fri, 22 Nov 2013 15:18:46 +0000 (16:18 +0100)]
Use common 3-digit package version number.

10 years agoTemporarily disable USE_TERMIOX code (breaks the lib).
Uwe Hermann [Fri, 22 Nov 2013 15:07:32 +0000 (16:07 +0100)]
Temporarily disable USE_TERMIOX code (breaks the lib).

On some systems the use of the code enabled by USE_TERMIOX leads to a
non-working sp_open() which breaks all functionality provided by the lib.

Thus, temporarily disable that code until the details are investigated.

This has been tested with a serial port DMM and the OLS logic analyzer
on an x86 64bit Linux system with kernel version 3.11. The code compiles
fine but doesn't work at runtime. The configure output included:

checking for struct termios2... yes
checking for struct termiox... yes

The root cause for the problem is that the ioctl(fd, TCGETX, data) call in
get_flow() returns -1 ("Invalid argument"), which in turn lets sp_open()
return SP_ERR_FAIL.

10 years agoMinor cosmetics.
Uwe Hermann [Fri, 22 Nov 2013 14:53:34 +0000 (15:53 +0100)]
Minor cosmetics.

10 years agoAdd missing #include guards.
Uwe Hermann [Fri, 22 Nov 2013 10:59:12 +0000 (11:59 +0100)]
Add missing #include guards.

10 years agoFix the build on non-Linux platforms.
Uwe Hermann [Fri, 22 Nov 2013 10:56:40 +0000 (11:56 +0100)]
Fix the build on non-Linux platforms.

10 years agoIgnore linux_termios leftovers.
Bert Vermeulen [Fri, 22 Nov 2013 01:23:17 +0000 (02:23 +0100)]
Ignore linux_termios leftovers.

10 years agoFix to sp_flush() on Unix.
Martin Ling [Thu, 21 Nov 2013 17:22:16 +0000 (17:22 +0000)]
Fix to sp_flush() on Unix.

10 years agoAdd missing @param port entries to documentation.
Martin Ling [Wed, 20 Nov 2013 19:11:39 +0000 (19:11 +0000)]
Add missing @param port entries to documentation.

10 years agoAdd sp_get_signals() function.
Martin Ling [Wed, 20 Nov 2013 18:56:35 +0000 (18:56 +0000)]
Add sp_get_signals() function.

10 years agoAdd sp_start_break() and sp_end_break() functions.
Martin Ling [Wed, 20 Nov 2013 18:11:17 +0000 (18:11 +0000)]
Add sp_start_break() and sp_end_break() functions.

10 years agoAdd sp_drain() function.
Martin Ling [Wed, 20 Nov 2013 17:30:50 +0000 (17:30 +0000)]
Add sp_drain() function.

10 years agoAdd missing @param port entry to documentation.
Martin Ling [Wed, 20 Nov 2013 19:13:12 +0000 (19:13 +0000)]
Add missing @param port entry to documentation.

10 years agoMake sp_flush take an option for what to flush.
Martin Ling [Wed, 20 Nov 2013 17:22:50 +0000 (17:22 +0000)]
Make sp_flush take an option for what to flush.

10 years agoUse a more logical set of SP_MODE_* flags.
Martin Ling [Wed, 20 Nov 2013 15:54:10 +0000 (15:54 +0000)]
Use a more logical set of SP_MODE_* flags.

10 years agoDefine SP_PARITY_* more logically.
Martin Ling [Wed, 20 Nov 2013 19:56:11 +0000 (19:56 +0000)]
Define SP_PARITY_* more logically.

10 years agoDocument this madness.
Martin Ling [Thu, 21 Nov 2013 11:52:54 +0000 (11:52 +0000)]
Document this madness.

10 years agoSupport non-standard flow control modes on Linux.
Martin Ling [Thu, 21 Nov 2013 11:52:41 +0000 (11:52 +0000)]
Support non-standard flow control modes on Linux.

10 years agoSupport custom baudrates on Linux.
Martin Ling [Thu, 21 Nov 2013 00:35:51 +0000 (00:35 +0000)]
Support custom baudrates on Linux.

10 years agoAdded support for non-standard baud rates for Apple.
Matthias Heidbrink [Wed, 20 Nov 2013 13:21:07 +0000 (14:21 +0100)]
Added support for non-standard baud rates for Apple.

10 years agoRetrieve XON/XOFF setting on Unix.
Martin Ling [Tue, 19 Nov 2013 20:46:52 +0000 (20:46 +0000)]
Retrieve XON/XOFF setting on Unix.

10 years agoDoxygen cosmetics.
Uwe Hermann [Tue, 19 Nov 2013 18:55:02 +0000 (19:55 +0100)]
Doxygen cosmetics.

10 years agoConsistently use the "@" notation for Doxygen tags.
Uwe Hermann [Tue, 19 Nov 2013 18:37:03 +0000 (19:37 +0100)]
Consistently use the "@" notation for Doxygen tags.

10 years agoCosmetics, whitespace, consistency fixes.
Uwe Hermann [Tue, 19 Nov 2013 18:31:23 +0000 (19:31 +0100)]
Cosmetics, whitespace, consistency fixes.

10 years agoget_config(): Add a quickfix for xon_xoff.
Uwe Hermann [Tue, 19 Nov 2013 18:20:50 +0000 (19:20 +0100)]
get_config(): Add a quickfix for xon_xoff.

The config->xon_xoff variable is not filled correctly with data read
from the current serial port config. Without this, the value of the
variable will be bogus and some code that depends on the variable will fail.

Note: This is just a temporary quickfix, not a proper final solution.

10 years ago.gitignore: Add libserialport.h.
Uwe Hermann [Tue, 19 Nov 2013 16:58:48 +0000 (17:58 +0100)]
.gitignore: Add libserialport.h.

10 years agoset_config(): Add missing CS5 handling.
Uwe Hermann [Tue, 19 Nov 2013 11:32:01 +0000 (12:32 +0100)]
set_config(): Add missing CS5 handling.

10 years agoFix minor Doxygen warning.
Uwe Hermann [Tue, 19 Nov 2013 11:30:55 +0000 (12:30 +0100)]
Fix minor Doxygen warning.

10 years agoClarify usage of -1 in configuration API.
Martin Ling [Tue, 19 Nov 2013 03:14:09 +0000 (03:14 +0000)]
Clarify usage of -1 in configuration API.

10 years agoGroup functions for documentation.
Martin Ling [Tue, 19 Nov 2013 03:02:45 +0000 (03:02 +0000)]
Group functions for documentation.

10 years agoUse named enums instead of ints for clearer documentation.
Martin Ling [Tue, 19 Nov 2013 02:36:22 +0000 (02:36 +0000)]
Use named enums instead of ints for clearer documentation.

10 years agoAdd doxygen documentation.
Martin Ling [Tue, 19 Nov 2013 02:11:34 +0000 (02:11 +0000)]
Add doxygen documentation.

10 years agoMark config argument to sp_set_config as const.
Martin Ling [Mon, 18 Nov 2013 22:07:09 +0000 (22:07 +0000)]
Mark config argument to sp_set_config as const.

10 years agoAdditional argument checking for config functions.
Martin Ling [Mon, 18 Nov 2013 20:08:25 +0000 (20:08 +0000)]
Additional argument checking for config functions.

10 years agoRemove sp_ prefix from private port data structure.
Martin Ling [Mon, 18 Nov 2013 20:04:54 +0000 (20:04 +0000)]
Remove sp_ prefix from private port data structure.

10 years agoTidy up static functions.
Martin Ling [Mon, 18 Nov 2013 20:02:30 +0000 (20:02 +0000)]
Tidy up static functions.

10 years agoMake sure OS handles are set correctly for unopened / closed ports.
Martin Ling [Mon, 18 Nov 2013 20:00:15 +0000 (20:00 +0000)]
Make sure OS handles are set correctly for unopened / closed ports.

10 years agoGet Xon/Xoff status on Windows.
Martin Ling [Mon, 18 Nov 2013 19:55:43 +0000 (19:55 +0000)]
Get Xon/Xoff status on Windows.

10 years agoRefactor port configuration code.
Martin Ling [Mon, 18 Nov 2013 19:52:37 +0000 (19:52 +0000)]
Refactor port configuration code.

10 years agoAdd sp_get_config() function.
Martin Ling [Sat, 16 Nov 2013 20:55:53 +0000 (20:55 +0000)]
Add sp_get_config() function.

10 years agoUpdate documentation.
Martin Ling [Fri, 15 Nov 2013 00:20:01 +0000 (00:20 +0000)]
Update documentation.