]>
sigrok.org Git - libserialport.git/log
Uwe Hermann [Wed, 15 Apr 2015 23:05:04 +0000 (01:05 +0200)]
libserialport.h.in: Drop unneeded <windows.h> #include.
This is not needed and would pollute the namespace of every
libserialport user on Windows.
Uwe Hermann [Wed, 15 Apr 2015 22:53:50 +0000 (00:53 +0200)]
libserialport.h.in: Add @since tags for new enums.
Uwe Hermann [Wed, 15 Apr 2015 22:47:21 +0000 (00:47 +0200)]
Set package version to 0.1.1, use "@since 0.1.1" Doxygen tags.
The next release will not contain any backwards-incompatible
API or ABI changes, thus changing the package version to 0.1.1.
Uwe Hermann [Wed, 15 Apr 2015 22:40:49 +0000 (00:40 +0200)]
windows: Drop no longer needed -luuid.
Also, use SP_LIBS in Makefile.am.
This is build-tested using a native MinGW-w64 based toolchain
as well as a MinGW-w64 based cross-compile setup.
Uwe Hermann [Wed, 15 Apr 2015 19:40:32 +0000 (21:40 +0200)]
configure.ac: Minor whitespace cosmetics.
Uwe Hermann [Wed, 15 Apr 2015 19:20:18 +0000 (21:20 +0200)]
Doxyfile: Update to Doxygen 1.8.8 template.
(by running 'doxygen -u')
Uwe Hermann [Wed, 15 Apr 2015 19:15:04 +0000 (21:15 +0200)]
configure.ac: Add #include guard to config.h.
Uwe Hermann [Sat, 11 Apr 2015 19:03:53 +0000 (21:03 +0200)]
Fix a compiler warning when -Wshadow is used.
CC serialport.lo
In file included from ../serialport.c:25:0:
../serialport.c: In function 'get_config':
../libserialport_internal.h:227:25: warning: declaration of 'ret' shadows a previous local [-Wshadow]
#define TRY(x) do { int ret = x; if (ret != SP_OK) RETURN_CODEVAL(ret); } while (0)
^
../serialport.c:1566:3: note: in expansion of macro 'TRY'
TRY(get_baudrate(port->fd, &config->baudrate));
^
../serialport.c:1543:6: warning: shadowed declaration is here [-Wshadow]
int ret = get_flow(port->fd, data);
^
Also, add -Wshadow to the list of default compiler options.
Uwe Hermann [Mon, 6 Apr 2015 22:04:43 +0000 (00:04 +0200)]
autogen.sh: Drop obsolete MinGW/MSYS items.
For Windows builds (which require MinGW-w64) we currently support:
- cross-builds using MXE (mxe.cc) and possibly other cross-compile setups
- native builds using MSYS2 (sf.net/projects/msys2/)
Neither of those require explicitly specifying ACLOCAL_DIR.
Uwe Hermann [Mon, 6 Apr 2015 18:25:42 +0000 (20:25 +0200)]
README: Refer to MSYS2 only.
The "old" MSYS related to the "old" and unsupported MinGW (from
mingw.org) may or may not work properly, so only refer to MSYS2 which
we currently recommend and which has been tested.
Uwe Hermann [Mon, 6 Apr 2015 16:51:17 +0000 (18:51 +0200)]
Minor Doxygen improvements and fixes.
Uwe Hermann [Sat, 4 Apr 2015 16:10:18 +0000 (18:10 +0200)]
configure.ac: Use $host_os instead of $target_os.
$build and $build_os refer to the machine on which the software is
built, $host and $host_os refer to the machine for which the software
is (cross-)built.
The variables $target and $target_os (despite the confusing names)
are only relevant in the context of building cross-compilers.
Uwe Hermann [Fri, 3 Apr 2015 20:18:56 +0000 (22:18 +0200)]
README: Add link to online API docs.
Uwe Hermann [Fri, 3 Apr 2015 20:17:57 +0000 (22:17 +0200)]
README: Mention FreeBSD port enumeration support.
Uwe Hermann [Fri, 3 Apr 2015 20:04:20 +0000 (22:04 +0200)]
configure.ac: Add -Wmissing-prototypes.
Uwe Hermann [Fri, 3 Apr 2015 20:03:26 +0000 (22:03 +0200)]
Fix two compiler warnings on platforms without enumeration support.
serialport.c: In function 'sp_list_ports':
serialport.c:326:6: warning: unused variable 'ret' [-Wunused-variable]
int ret;
^
serialport.c:325:19: warning: unused variable 'list' [-Wunused-variable]
struct sp_port **list;
^
Uwe Hermann [Fri, 3 Apr 2015 20:02:00 +0000 (22:02 +0200)]
add_handle(): Fix a realloc() related issue.
Uwe Hermann [Fri, 3 Apr 2015 15:45:04 +0000 (17:45 +0200)]
Fix a compiler warning.
This fixes the following scan-build warning:
serialport.c: In function 'sp_list_ports':
serialport.c:354:1: warning: control reaches end of non-void function [-Wreturn-type]
Uwe Hermann [Fri, 3 Apr 2015 15:29:52 +0000 (17:29 +0200)]
Fix indentation of a switch().
Uwe Hermann [Fri, 3 Apr 2015 15:17:49 +0000 (17:17 +0200)]
add_handle(): Fix a memory leak.
This fixes the following scan-build warning:
serialport.c:1170:3: warning: Potential leak of memory pointed to by 'new_handles'
RETURN_ERROR(SP_ERR_MEM, "Mask array realloc() failed");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Uwe Hermann [Fri, 3 Apr 2015 14:58:43 +0000 (16:58 +0200)]
Use libtool's -no-undefined option on all platforms.
Martin Ling [Tue, 31 Mar 2015 23:24:27 +0000 (00:24 +0100)]
Clarify sp_list_ports() code.
This also fixes the following scan-build warning:
serialport.c:335:15: warning: Result of 'malloc' is converted to a
pointer of type 'struct sp_port *', which is incompatible with sizeof
operand type 'struct sp_port **'
if (!(list = malloc(sizeof(struct sp_port **))))
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Ling [Fri, 27 Mar 2015 22:43:14 +0000 (22:43 +0000)]
windows: Set fAbortOnError=FALSE.
Since we're not handling and clearing receive errors (framing, parity and
overrun), we should turn them off to avoid crashing out with
ERROR_OPERATION_ABORTED in various calls if they occur. Invalid data
will then simply not end up in the buffer. This is consistent with our
current behaviour on posix/termios systems.
It might be nice to be able to inform calling code about receive errors, but I
can't see a good way to do this in a cross-platform way at the moment.
This fixes (parts of) bug #341.
Martin Ling [Wed, 25 Mar 2015 18:03:17 +0000 (18:03 +0000)]
windows: Revise management of WaitCommEvent() operations.
This fixes (at least parts of) bug #341.
Uwe Hermann [Wed, 25 Mar 2015 22:38:04 +0000 (23:38 +0100)]
Make std_baudrates[] static (only used in one file).
Uwe Hermann [Wed, 25 Mar 2015 19:28:48 +0000 (20:28 +0100)]
Various cosmetic and consistency fixes.
Uwe Hermann [Wed, 25 Mar 2015 19:29:41 +0000 (20:29 +0100)]
libserialport_internal.h: Add #include guard.
Uwe Hermann [Wed, 25 Mar 2015 19:13:57 +0000 (20:13 +0100)]
Fix some typos.
Uwe Hermann [Wed, 25 Mar 2015 13:52:54 +0000 (14:52 +0100)]
linux_termios.h: Add missing #include of "config.h".
Martin Ling [Tue, 24 Mar 2015 23:15:32 +0000 (23:15 +0000)]
Generate a config.h rather than passing defines on command line.
Fixes bug #553.
Uwe Hermann [Fri, 20 Feb 2015 17:57:08 +0000 (18:57 +0100)]
Fix misleading snprintf() arguments.
Uffe Jakobsen [Mon, 16 Feb 2015 22:07:00 +0000 (23:07 +0100)]
If present, add usb_serial to description for better identification
Uffe Jakobsen [Mon, 16 Feb 2015 13:13:01 +0000 (14:13 +0100)]
Handle enumeration of native UART ports on FreeBSD
Uffe Jakobsen [Tue, 13 Jan 2015 22:14:54 +0000 (23:14 +0100)]
Implement FreeBSD OS-specific serial port detection and query
Martin Ling [Wed, 24 Sep 2014 14:30:39 +0000 (15:30 +0100)]
windows: Fix restart of RX/error wait operation after reads.
This fixes bug #421.
Boris Gjenero [Fri, 5 Dec 2014 17:38:43 +0000 (18:38 +0100)]
Fix free() of uninitialized pointer.
Explicitly set port->usb_path to NULL, otherwise a free(port->usb_path)
can happen where port->usb_path is uninitialized.
This closes bug #512.
Aurelien Jacobs [Thu, 27 Nov 2014 16:41:23 +0000 (17:41 +0100)]
windows: Properly handle return value of SetupDiOpenDevRegKey().
This fixes bug #499.
Martin Ling [Wed, 24 Sep 2014 19:04:39 +0000 (20:04 +0100)]
linux: Check for BOTHER macro at configure time.
This fixes bug #363.
Janne Huttunen [Sat, 11 Oct 2014 09:13:41 +0000 (12:13 +0300)]
Flush only the requested buffers
Fix the sp_flush() so that it flushes only the requested buffers
also in unix.
Bert Vermeulen [Sun, 5 Oct 2014 00:38:35 +0000 (02:38 +0200)]
Fix typos.
Martin Ling [Wed, 24 Sep 2014 19:53:03 +0000 (20:53 +0100)]
windows: Fix compile issues with multiply or not defined GUIDs.
This fixes bug #416.
Aurelien Jacobs [Wed, 24 Sep 2014 10:47:58 +0000 (12:47 +0200)]
windows: Indentation (cosmetics only).
Aurelien Jacobs [Wed, 24 Sep 2014 10:44:40 +0000 (12:44 +0200)]
windows: Fix various memory leaks.
This fixes bug #419.
Aurelien Jacobs [Sat, 20 Sep 2014 19:24:31 +0000 (21:24 +0200)]
Add SP_MODE_READ_WRITE enum value.
Uwe Hermann [Sun, 7 Sep 2014 17:31:23 +0000 (19:31 +0200)]
README: Add URL to the libserialport website.
Uwe Hermann [Sun, 7 Sep 2014 17:27:02 +0000 (19:27 +0200)]
README: Mention that only MinGW-w64 works (but not MinGW).
Michael B. Trausch [Sun, 7 Sep 2014 01:39:40 +0000 (21:39 -0400)]
windows: -no-undefined is required to make a DLL.
Michael B. Trausch [Sun, 7 Sep 2014 01:34:03 +0000 (21:34 -0400)]
windows: Add -lsetupapi when building for WIN32.
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.
Aurelien Jacobs [Thu, 4 Sep 2014 18:13:55 +0000 (20:13 +0200)]
linux: remove readlinkat() dependency
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.
Uwe Hermann [Wed, 27 Aug 2014 12:56:19 +0000 (14:56 +0200)]
Fix Mac OS X build (untested).
Uwe Hermann [Wed, 27 Aug 2014 12:53:19 +0000 (14:53 +0200)]
Fix Windows build.
Martin Ling [Sun, 24 Aug 2014 13:08:00 +0000 (14:08 +0100)]
linux: Fix warning by marking vid, pid variables unsigned.
Martin Ling [Sun, 24 Aug 2014 13:00:43 +0000 (14:00 +0100)]
Compile with -pedantic.
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.
Martin Ling [Sun, 24 Aug 2014 12:59:32 +0000 (13:59 +0100)]
Revise debug macros to work in strict C99.
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.
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.
Bert Vermeulen [Wed, 20 Aug 2014 21:38:24 +0000 (23:38 +0200)]
Bump package version to 0.2.0.
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.
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).
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.
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.
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)
Uwe Hermann [Thu, 31 Jul 2014 21:09:24 +0000 (23:09 +0200)]
serialport.c: Fix an 'unused variable' compiler warning.
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.
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.
Aurelien Jacobs [Sun, 15 Jun 2014 22:40:37 +0000 (00:40 +0200)]
Introduce SP_API/SP_PRIV to mark visibility of functions.
Martin Ling [Sat, 14 Jun 2014 11:25:18 +0000 (12:25 +0100)]
Fix build for platforms without enumeration & port metadata support.
Aurelien Jacobs [Fri, 13 Jun 2014 21:52:16 +0000 (23:52 +0200)]
Move list_ports() implementations to OS-specific files.
Aurelien Jacobs [Fri, 13 Jun 2014 21:47:45 +0000 (23:47 +0200)]
Fix missing variable on macosx.
Bert Vermeulen [Wed, 11 Jun 2014 18:39:09 +0000 (20:39 +0200)]
Ignore build leftovers.
Aurelien Jacobs [Wed, 11 Jun 2014 15:21:51 +0000 (17:21 +0200)]
Check bus:address and vid:pid validity.
Martin Ling [Wed, 11 Jun 2014 14:10:29 +0000 (15:10 +0100)]
Tidy up and split most OS-specific code to separate files.
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.
Aurelien Jacobs [Fri, 30 May 2014 22:48:54 +0000 (00:48 +0200)]
Remove the udev dependency and parse the /sys hierarchy instead.
Aurelien Jacobs [Fri, 30 May 2014 21:40:45 +0000 (23:40 +0200)]
Simplify Mac OS implementation of sp_list_ports().
Aurelien Jacobs [Tue, 10 Jun 2014 20:16:16 +0000 (22:16 +0200)]
Remove useless declaration.
Aurelien Jacobs [Tue, 10 Jun 2014 20:12:21 +0000 (22:12 +0200)]
Remove duplicated include.
Aurelien Jacobs [Mon, 2 Jun 2014 10:07:50 +0000 (12:07 +0200)]
Add format string support to RETURN_ERROR() and RETURN_FAIL().
Uwe Hermann [Tue, 6 May 2014 18:49:11 +0000 (20:49 +0200)]
NEWS: Bump date.
Uwe Hermann [Sun, 13 Apr 2014 17:51:01 +0000 (19:51 +0200)]
NEWS: Update for upcoming 0.1.0 release.
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.
Uwe Hermann [Sun, 4 May 2014 19:06:31 +0000 (21:06 +0200)]
Add Doxygen @since tags to all public API functions.
Uwe Hermann [Sun, 4 May 2014 15:56:49 +0000 (17:56 +0200)]
doxygen: Updated Doxyfile to doxygen 1.8.6.
Uwe Hermann [Sun, 13 Apr 2014 17:50:38 +0000 (19:50 +0200)]
Add the usual AUTHORS file.
Martin Ling [Sat, 22 Mar 2014 07:14:49 +0000 (07:14 +0000)]
Merge pull request #1 from silverbuddy/master
Win32 issues
silverbuddy [Fri, 21 Mar 2014 17:49:22 +0000 (21:49 +0400)]
Fix malloc size (Win32)
silverbuddy [Fri, 21 Mar 2014 17:43:19 +0000 (21:43 +0400)]
Fix compilation (Win32 UNICODE)
Uwe Hermann [Wed, 12 Mar 2014 18:30:55 +0000 (19:30 +0100)]
Add runtime version querying functions.
This fixes bug #282.
Martin Ling [Fri, 3 Jan 2014 12:44:14 +0000 (13:44 +0100)]
linux_termios.c: fix check for termios speed fields.
Martin Ling [Fri, 3 Jan 2014 12:38:06 +0000 (13:38 +0100)]
linux: Speed fields may not be present in kernel termios structures.
Martin Ling [Fri, 3 Jan 2014 11:16:41 +0000 (12:16 +0100)]
Remove need to include linux_termios.h on non-Linux.
Martin Ling [Fri, 3 Jan 2014 10:52:53 +0000 (11:52 +0100)]
Only build linux_termios.c on Linux.
Uwe Hermann [Fri, 27 Dec 2013 01:44:42 +0000 (02:44 +0100)]
Makefile.am: Add Doxyfile to the generated tarball.
Uwe Hermann [Fri, 27 Dec 2013 01:39:29 +0000 (02:39 +0100)]
Doxygen: Fix a warning / incorrect parameter name.
Uwe Hermann [Fri, 27 Dec 2013 01:39:06 +0000 (02:39 +0100)]
Makefile.am: Fix 'make doc' for out-of-tree builds.
Uwe Hermann [Fri, 27 Dec 2013 01:28:10 +0000 (02:28 +0100)]
configure.ac: Cosmetics, fix typo.
Martin Ling [Fri, 20 Dec 2013 16:02:57 +0000 (16:02 +0000)]
Add API for waiting on port events.