1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00
Commit Graph

13 Commits

Author SHA1 Message Date
Martin Ling
4349b1f6a2 Formatting fix for example descriptions. 2020-02-07 13:59:31 +00:00
Martin Ling
cd1a7d4361 Add example of sending and receiving data. 2020-02-07 13:59:31 +00:00
Martin Ling
a20ed2965b Add example of waiting for events. 2020-01-23 04:11:45 +00:00
Martin Ling
4720053160 Add an example of proper error handling. 2020-01-23 04:10:00 +00:00
Martin Ling
6dba844779 Add some more narrative docs on the configuration API. 2020-01-23 03:56:41 +00:00
Martin Ling
9ddf08588d Add example of how to configure a port. 2020-01-23 03:56:34 +00:00
Martin Ling
0838c979cc Use SP_API prefix for functions in libserialport.h.
For MSVC, we need to set the __declspec() for public symbols to
dllexport or dllimport, depending if we are building or using the
library. So, detect MSVC and define SP_API appropriately if found.
We use the LIBSERIALPORT_MSBUILD define to distinguish between
building and using the library, which will need to be set in the
project configuration when building the library using MS tools.

For normal client use of the header on other systems, we need to
define SP_API to nothing to avoid it being undefined, but we need
to avoid doing this in the case where we are including the header
whilst building the library with autotools and SP_API is already
set by autoconf. So define LIBSERIALPORT_ATBUILD in AM_CFLAGS,
and don't touch SP_API in the header if that's set.
2020-01-23 03:35:47 +00:00
Martin Ling
f6e32b2dfa Use a static header file, not dependent on autoconf. 2020-01-23 03:35:47 +00:00
Uwe Hermann
baba075903 libserialport.h: Add package/lib version macros.
These can be used by frontends e.g. for conditional compilation, or
simply for printing, logging to debug output, and so on.
2013-11-15 09:28:34 +01:00
Uwe Hermann
5ef8a1ed7f libserialport: Allow C++ frontends to use the lib easily. 2013-11-15 00:42:40 +01:00
Uwe Hermann
f92f1f0c20 Minor cosmetics, typos, and so on. 2013-11-15 00:42:40 +01:00
Martin Ling
32b5ac05b4 Add sp_copy_port() function. 2013-11-15 00:42:39 +01:00
Martin Ling
f6a1fb65ea Rename header to libserialport.h. 2013-11-15 00:42:39 +01:00