Commit Graph

117 Commits

Author SHA1 Message Date
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
Martin Ling 0151b15710 Clarify documentation. 2013-11-23 18:23:45 +00:00
Martin Ling 3c126654b3 Add sp_get_port_handle() function. 2013-11-23 17:50:45 +00:00
Martin Ling 1c5aae9dc5 Make port structure opaque. 2013-11-23 17:11:19 +00:00
Martin Ling 70cd37def2 Add back previously deleted sp_get_config function. 2013-11-23 12:04:21 +00:00
Martin Ling a6cda1e8c7 Fix swapped DCD & RI signals on Windows. 2013-11-23 11:59:42 +00:00
Martin Ling 6b93ede419 Return SP_ERR_SUPP from sp_list_ports() on unsupported platforms. 2013-11-23 11:57:17 +00:00
Martin Ling 64690702cb Generate debug output when returning using TRY() macro. 2013-11-23 11:49:35 +00:00
Martin Ling dec10e31d0 Additional argument checking. 2013-11-23 11:39:59 +00:00
Martin Ling ea667be751 Add additional debug messages. 2013-11-23 01:08:57 +00:00
Martin Ling c33efc482e Add debug output for all entry and exit points. 2013-11-23 00:26:44 +00:00
Martin Ling 92f756f8c1 Add debug macros. 2013-11-23 00:19:38 +00:00
Martin Ling 863b35e69c Add API for and default handler for debug messages. 2013-11-22 22:41:03 +00:00
Uwe Hermann 71c8a9b906 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.
2013-11-22 22:41:23 +01:00
Martin Ling f36c639545 Remove dupliate/redundant return value documentation. 2013-11-22 21:58:51 +01:00
Martin Ling 6aabf62a90 Use new SP_ERR_SUPP error to indicate unsupported operations. 2013-11-22 21:46:26 +01:00
Uwe Hermann 6a1d6318e5 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.
2013-11-22 20:28:20 +01:00
Martin Ling 68ec29db5e Check for termiox support at runtime. 2013-11-22 20:28:20 +01:00
Martin Ling 8d43110ad7 Fix memory leaks. 2013-11-22 20:28:20 +01:00
Uwe Hermann 7de20e3915 Use common 3-digit package version number. 2013-11-22 16:44:29 +01:00
Uwe Hermann 1d5d2a166f 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.
2013-11-22 16:44:19 +01:00
Uwe Hermann 24abdb680f Minor cosmetics. 2013-11-22 16:10:55 +01:00
Uwe Hermann 8645feda60 Add missing #include guards. 2013-11-22 11:59:12 +01:00
Uwe Hermann da21834e42 Fix the build on non-Linux platforms. 2013-11-22 11:56:40 +01:00
Bert Vermeulen d2ac0e3bbe Ignore linux_termios leftovers. 2013-11-22 02:24:04 +01:00
Martin Ling 82f424e6cd Fix to sp_flush() on Unix. 2013-11-22 02:19:12 +01:00
Martin Ling 3f099f4fe8 Add missing @param port entries to documentation. 2013-11-22 02:11:45 +01:00
Martin Ling 8cf7c6978f Add sp_get_signals() function. 2013-11-22 02:11:40 +01:00
Martin Ling 90cc3ee62b Add sp_start_break() and sp_end_break() functions. 2013-11-22 02:11:34 +01:00
Martin Ling 69a3739ca0 Add sp_drain() function. 2013-11-22 02:11:34 +01:00
Martin Ling ea34fba899 Add missing @param port entry to documentation. 2013-11-22 01:53:27 +01:00
Martin Ling fd8fd11a4e Make sp_flush take an option for what to flush. 2013-11-22 01:53:22 +01:00
Martin Ling a036341bdf Use a more logical set of SP_MODE_* flags. 2013-11-22 01:48:02 +01:00
Martin Ling 20e63a77b5 Define SP_PARITY_* more logically. 2013-11-22 01:47:34 +01:00
Martin Ling 70518e4fdd Document this madness. 2013-11-21 11:52:54 +00:00
Martin Ling 40978c2b41 Support non-standard flow control modes on Linux. 2013-11-21 11:52:41 +00:00
Martin Ling 7a6d2196e0 Support custom baudrates on Linux. 2013-11-21 11:51:08 +00:00
Matthias Heidbrink 31b3a8f5b5 Added support for non-standard baud rates for Apple. 2013-11-20 19:18:36 +00:00
Martin Ling e29b93a572 Retrieve XON/XOFF setting on Unix. 2013-11-19 20:46:52 +00:00
Uwe Hermann cf9d365ce0 Doxygen cosmetics. 2013-11-19 20:10:56 +01:00
Uwe Hermann 626d280fd3 Consistently use the "@" notation for Doxygen tags. 2013-11-19 19:37:03 +01:00
Uwe Hermann eac329d26b Cosmetics, whitespace, consistency fixes. 2013-11-19 19:32:01 +01:00
Uwe Hermann 705bdc6947 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.
2013-11-19 19:32:01 +01:00
Uwe Hermann 4b448bc542 .gitignore: Add libserialport.h. 2013-11-19 17:58:48 +01:00
Uwe Hermann 23922313b3 set_config(): Add missing CS5 handling. 2013-11-19 12:32:01 +01:00
Uwe Hermann c85d0a28de Fix minor Doxygen warning. 2013-11-19 12:30:55 +01:00
Martin Ling c200f5c144 Clarify usage of -1 in configuration API. 2013-11-19 03:14:09 +00:00
Martin Ling 091e75fedc Group functions for documentation. 2013-11-19 03:02:45 +00:00
Martin Ling eb6ed20f51 Use named enums instead of ints for clearer documentation. 2013-11-19 02:36:22 +00:00