]> sigrok.org Git - libserialport.git/log
libserialport.git
9 years agoREADME: Mention that only MinGW-w64 works (but not MinGW).
Uwe Hermann [Sun, 7 Sep 2014 17:27:02 +0000 (19:27 +0200)]
README: Mention that only MinGW-w64 works (but not MinGW).

9 years agowindows: -no-undefined is required to make a DLL.
Michael B. Trausch [Sun, 7 Sep 2014 01:39:40 +0000 (21:39 -0400)]
windows: -no-undefined is required to make a DLL.

9 years agowindows: Add -lsetupapi when building for WIN32.
Michael B. Trausch [Sun, 7 Sep 2014 01:34:03 +0000 (21:34 -0400)]
windows: Add -lsetupapi when building for WIN32.

9 years agowindows: Include proper GUID defining header to fix build.
Michael B. Trausch [Sun, 7 Sep 2014 00:23:16 +0000 (20:23 -0400)]
windows: Include proper GUID defining header to fix build.

The initguid.h header must appear early or it does not have
an effect, at least on cross-build from Linux.

9 years agolinux: remove readlinkat() dependency
Aurelien Jacobs [Thu, 4 Sep 2014 18:13:55 +0000 (20:13 +0200)]
linux: remove readlinkat() dependency

9 years agolinux_termios: fix return types to actually match returned values
Aurelien Jacobs [Thu, 4 Sep 2014 18:13:55 +0000 (20:13 +0200)]
linux_termios: fix return types to actually match returned values

This fixes the following warning :

linux_termios.c: In function 'get_termios_get_ioctl':
linux_termios.c:42:2: warning: overflow in implicit constant conversion [-Woverflow]
  return TCGETS2;
  ^

This fixes bug #396.

9 years agoFix Mac OS X build (untested).
Uwe Hermann [Wed, 27 Aug 2014 12:56:19 +0000 (14:56 +0200)]
Fix Mac OS X build (untested).

9 years agoFix Windows build.
Uwe Hermann [Wed, 27 Aug 2014 12:53:19 +0000 (14:53 +0200)]
Fix Windows build.

9 years agolinux: Fix warning by marking vid, pid variables unsigned.
Martin Ling [Sun, 24 Aug 2014 13:08:00 +0000 (14:08 +0100)]
linux: Fix warning by marking vid, pid variables unsigned.

9 years agoCompile with -pedantic.
Martin Ling [Sun, 24 Aug 2014 13:00:43 +0000 (14:00 +0100)]
Compile with -pedantic.

9 years agolinux: Define feature macros to get required functions.
Martin Ling [Sun, 24 Aug 2014 12:34:33 +0000 (13:34 +0100)]
linux: Define feature macros to get required functions.

This is needed to build with -std=c99.

9 years agoRevise debug macros to work in strict C99.
Martin Ling [Sun, 24 Aug 2014 12:59:32 +0000 (13:59 +0100)]
Revise debug macros to work in strict C99.

9 years agoSpecialise RETURN_VALUE macro into RETURN_{INT,STRING,POINTER}.
Martin Ling [Sun, 24 Aug 2014 12:30:34 +0000 (13:30 +0100)]
Specialise RETURN_VALUE macro into RETURN_{INT,STRING,POINTER}.

This avoids the need to pass the required format string on every
call and also eliminates the need for the non-standard typeof() call.

9 years agolibserialport.h.in: remove trailing commas in enum definitions
Antti Nykanen [Sun, 24 Aug 2014 09:03:15 +0000 (12:03 +0300)]
libserialport.h.in: remove trailing commas in enum definitions

This makes it easier to use libserialport on projects that build with
the GCC -pedantic flag enabled.

9 years agoBump package version to 0.2.0.
Bert Vermeulen [Wed, 20 Aug 2014 21:38:24 +0000 (23:38 +0200)]
Bump package version to 0.2.0.

9 years agoRename sp_get_signals() parameter to avoid name clash with Qt headers.
Aurelien Jacobs [Wed, 20 Aug 2014 15:40:22 +0000 (17:40 +0200)]
Rename sp_get_signals() parameter to avoid name clash with Qt headers.

9 years agoconfigure.ac: We no longer need to set WINVER explicitly.
Uwe Hermann [Tue, 5 Aug 2014 16:34:16 +0000 (18:34 +0200)]
configure.ac: We no longer need to set WINVER explicitly.

Since we now require MinGW-w64, we no longer have to set WINVER manually,
since MinGW-w64 defaults to WINVER=0x0502 (which corresponds to
Windows Server 2003 SP1 / Windows XP SP2 apparently, which is fine for us).

9 years agowindows.c: Remove MinGW workarounds, require MinGW-w64 instead.
Uwe Hermann [Tue, 5 Aug 2014 16:31:40 +0000 (18:31 +0200)]
windows.c: Remove MinGW workarounds, require MinGW-w64 instead.

We're switching from MinGW (i686-pc-mingw32.static in MXE)...

  http://mingw.org/

...to MinGW-w64 (i686-w64-mingw32.static in MXE):

  http://mingw-w64.sourceforge.net/

The latter is a fork which nowadays seems to be more active and also to
have a more complete set of win32 API headers and libs.

History:
http://sourceforge.net/p/mingw-w64/wiki2/History/

This closes bug #393.

9 years agowindows.c: Define a bunch of stuff that's not in MinGW, yet.
Uwe Hermann [Thu, 31 Jul 2014 21:14:35 +0000 (23:14 +0200)]
windows.c: Define a bunch of stuff that's not in MinGW, yet.

Without these defineŃ• the build fails with various (many) compile errors.

9 years agoconfigure.ac: MinGW build fix (setting WINVER=0x0501).
Uwe Hermann [Thu, 31 Jul 2014 21:11:40 +0000 (23:11 +0200)]
configure.ac: MinGW build fix (setting WINVER=0x0501).

Without this the build fails with:

  windows.c:40:43: error: 'WC_NO_BEST_FIT_CHARS' undeclared (first use in
  this function)

9 years agoserialport.c: Fix an 'unused variable' compiler warning.
Uwe Hermann [Thu, 31 Jul 2014 21:09:24 +0000 (23:09 +0200)]
serialport.c: Fix an 'unused variable' compiler warning.

9 years agoAvoid use of struct serial_struct on systems which don't have it (Android)
Marcus Comstedt [Thu, 3 Jul 2014 22:04:31 +0000 (00:04 +0200)]
Avoid use of struct serial_struct on systems which don't have it (Android)

This fixes bug #376.

9 years agoDon't use readlinkat if it does not exist
Marcus Comstedt [Fri, 4 Jul 2014 09:55:04 +0000 (11:55 +0200)]
Don't use readlinkat if it does not exist

This fixes bug #377.

9 years agoIntroduce SP_API/SP_PRIV to mark visibility of functions.
Aurelien Jacobs [Sun, 15 Jun 2014 22:40:37 +0000 (00:40 +0200)]
Introduce SP_API/SP_PRIV to mark visibility of functions.

9 years agoFix build for platforms without enumeration & port metadata support.
Martin Ling [Sat, 14 Jun 2014 11:25:18 +0000 (12:25 +0100)]
Fix build for platforms without enumeration & port metadata support.

9 years agoMove list_ports() implementations to OS-specific files.
Aurelien Jacobs [Fri, 13 Jun 2014 21:52:16 +0000 (23:52 +0200)]
Move list_ports() implementations to OS-specific files.

9 years agoFix missing variable on macosx.
Aurelien Jacobs [Fri, 13 Jun 2014 21:47:45 +0000 (23:47 +0200)]
Fix missing variable on macosx.

9 years agoIgnore build leftovers.
Bert Vermeulen [Wed, 11 Jun 2014 18:39:09 +0000 (20:39 +0200)]
Ignore build leftovers.

9 years agoCheck bus:address and vid:pid validity.
Aurelien Jacobs [Wed, 11 Jun 2014 15:21:51 +0000 (17:21 +0200)]
Check bus:address and vid:pid validity.

9 years agoTidy up and split most OS-specific code to separate files.
Martin Ling [Wed, 11 Jun 2014 14:10:29 +0000 (15:10 +0100)]
Tidy up and split most OS-specific code to separate files.

9 years agoAdd new APIs to get some USB descriptor details for USB serial ports.
Aurelien Jacobs [Fri, 30 May 2014 20:49:04 +0000 (22:49 +0200)]
Add new APIs to get some USB descriptor details for USB serial ports.

9 years agoRemove the udev dependency and parse the /sys hierarchy instead.
Aurelien Jacobs [Fri, 30 May 2014 22:48:54 +0000 (00:48 +0200)]
Remove the udev dependency and parse the /sys hierarchy instead.

9 years agoSimplify Mac OS implementation of sp_list_ports().
Aurelien Jacobs [Fri, 30 May 2014 21:40:45 +0000 (23:40 +0200)]
Simplify Mac OS implementation of sp_list_ports().

9 years agoRemove useless declaration.
Aurelien Jacobs [Tue, 10 Jun 2014 20:16:16 +0000 (22:16 +0200)]
Remove useless declaration.

9 years agoRemove duplicated include.
Aurelien Jacobs [Tue, 10 Jun 2014 20:12:21 +0000 (22:12 +0200)]
Remove duplicated include.

9 years agoAdd format string support to RETURN_ERROR() and RETURN_FAIL().
Aurelien Jacobs [Mon, 2 Jun 2014 10:07:50 +0000 (12:07 +0200)]
Add format string support to RETURN_ERROR() and RETURN_FAIL().

9 years agoNEWS: Bump date.
Uwe Hermann [Tue, 6 May 2014 18:49:11 +0000 (20:49 +0200)]
NEWS: Bump date.

9 years agoNEWS: Update for upcoming 0.1.0 release.
Uwe Hermann [Sun, 13 Apr 2014 17:51:01 +0000 (19:51 +0200)]
NEWS: Update for upcoming 0.1.0 release.

9 years agoconfigure.ac: Add 'check-news' automake option.
Uwe Hermann [Mon, 5 May 2014 00:01:22 +0000 (02:01 +0200)]
configure.ac: Add 'check-news' automake option.

This warns if the NEWS file hasn't been updated before a release.

9 years agoAdd Doxygen @since tags to all public API functions.
Uwe Hermann [Sun, 4 May 2014 19:06:31 +0000 (21:06 +0200)]
Add Doxygen @since tags to all public API functions.

9 years agodoxygen: Updated Doxyfile to doxygen 1.8.6.
Uwe Hermann [Sun, 4 May 2014 15:56:49 +0000 (17:56 +0200)]
doxygen: Updated Doxyfile to doxygen 1.8.6.

10 years agoAdd the usual AUTHORS file.
Uwe Hermann [Sun, 13 Apr 2014 17:50:38 +0000 (19:50 +0200)]
Add the usual AUTHORS file.

10 years agoMerge pull request #1 from silverbuddy/master
Martin Ling [Sat, 22 Mar 2014 07:14:49 +0000 (07:14 +0000)]
Merge pull request #1 from silverbuddy/master

Win32 issues

10 years agoFix malloc size (Win32)
silverbuddy [Fri, 21 Mar 2014 17:49:22 +0000 (21:49 +0400)]
Fix malloc size (Win32)

10 years agoFix compilation (Win32 UNICODE)
silverbuddy [Fri, 21 Mar 2014 17:43:19 +0000 (21:43 +0400)]
Fix compilation (Win32 UNICODE)

10 years agoAdd runtime version querying functions.
Uwe Hermann [Wed, 12 Mar 2014 18:30:55 +0000 (19:30 +0100)]
Add runtime version querying functions.

This fixes bug #282.

10 years agolinux_termios.c: fix check for termios speed fields.
Martin Ling [Fri, 3 Jan 2014 12:44:14 +0000 (13:44 +0100)]
linux_termios.c: fix check for termios speed fields.

10 years agolinux: Speed fields may not be present in kernel termios structures.
Martin Ling [Fri, 3 Jan 2014 12:38:06 +0000 (13:38 +0100)]
linux: Speed fields may not be present in kernel termios structures.

10 years agoRemove need to include linux_termios.h on non-Linux.
Martin Ling [Fri, 3 Jan 2014 11:16:41 +0000 (12:16 +0100)]
Remove need to include linux_termios.h on non-Linux.

10 years agoOnly build linux_termios.c on Linux.
Martin Ling [Fri, 3 Jan 2014 10:52:53 +0000 (11:52 +0100)]
Only build linux_termios.c on Linux.

10 years agoMakefile.am: Add Doxyfile to the generated tarball.
Uwe Hermann [Fri, 27 Dec 2013 01:44:42 +0000 (02:44 +0100)]
Makefile.am: Add Doxyfile to the generated tarball.

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.