19 Commits

Author SHA1 Message Date
Florian Klink
fc008312b5 Remove trailing whitespaces
Most of them appear in the disclaimers, but some are in the code as
well.
2014-03-19 09:16:07 +01:00
Jef Driesen
456365366c Decode the IrDA device address as little endian.
This is only a cosmetic change, to make the IrDA device address on
Windows consistent with the address Linux. There is no functional
difference because the address is always serialized and deserialized
internally, and applications shouldn't care about the actual number.

Anyway, the difference in endianness is easy to notice because the
Uwatec Smart family of devices use the serial number as the IrDA device
address. On Linux, the address was identical to the serial number, while
on Windows the byte order was reversed.
2013-08-05 22:45:48 +02:00
Jef Driesen
3d82c5f9cd Add logging to the IrDA communication. 2013-08-05 22:45:48 +02:00
Jef Driesen
113d2e4706 Fix a redefinition warning for the ERROR macro.
Apparantly, the windows wingdi.h header file already defines the
ERROR macro. By defining the NOGDI macro before including the
windows.h header file, we can prevent the wingdi.h file from being
included and thus avoid the warning. We don't need that header for
anything anyway.

Because the libusb header file includes the windows.h file
explicitly, it needs the same fix.
2012-12-13 20:02:08 +01:00
Jef Driesen
30feb3b3ed Remove the obsolete error functions. 2012-08-27 23:08:38 +02:00
Jef Driesen
ffad80316c Integrate the context object in the IrDA code. 2012-08-27 23:08:38 +02:00
Jef Driesen
c5105a3788 Remove the IrDA init and cleanup functions.
The Windows WSAStartup() and WSACleanup() functions are now called
automatically when opening and closing IrDA sockets. This causes no
problems because these functions are reference counted and can be called
multiple times.

In practice nothing changes because the Uwatec Smart backend already
called these functions for every connection.
2012-08-27 23:02:44 +02:00
Jef Driesen
e65025b501 Separate private and public headers.
The public header files are moved to a new subdirectory, to separate
the definition of the public interface from the actual implementation.
Using an identical directory layout as the final installation has the
advantage that the example code can be build outside the project tree
without any modifications to the #include statements.
2012-06-21 21:39:24 +02:00
Jef Driesen
887d744e6d Use a more consistent typedef in the serial and irda backends. 2010-10-04 23:08:39 +02:00
Jef Driesen
39f3a5b757 Retry the discovery a few times when no devices are found. 2009-03-20 08:48:17 +00:00
Jef Driesen
ce705f8244 Use the new byte order functions everywhere. 2009-03-11 10:18:28 +00:00
Jef Driesen
c55bbede1d Fixed some warnings related to missing initializers. 2009-01-06 21:44:40 +00:00
Jef Driesen
5cde8bdb52 Declare functions with no arguments as void. 2009-01-06 13:09:19 +00:00
Jef Driesen
0d30a07f5b Always use the ANSI variant of the Windows functions.
The current api is not compatible with the wide character data type that 
is required for the unicode variant.
2008-12-04 15:10:25 +00:00
Jef Driesen
6129164629 Use the non-standard _snprintf() function for msvc. 2008-12-04 15:10:14 +00:00
Jef Driesen
596af5a17b Add LGPL license headers. 2008-10-05 20:14:18 +00:00
Jef Driesen
dfeea21c36 Add explicit casts to improve type safety. 2008-09-03 08:51:07 +00:00
Jef Driesen
4b2a3918fd Fixed some compiler warnings. 2008-06-20 13:43:19 +00:00
Jef Driesen
0312351bac Reorganization to separate the library and the test applications. 2008-06-04 13:30:55 +00:00