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

264 Commits

Author SHA1 Message Date
Martin Ling
8f189c4c0f Remove sp_ prefix from private port data structure. 2013-11-18 20:04:54 +00:00
Martin Ling
348e23ccbb Tidy up static functions. 2013-11-18 20:02:30 +00:00
Martin Ling
8f471c669f Make sure OS handles are set correctly for unopened / closed ports. 2013-11-18 20:00:15 +00:00
Martin Ling
c6754b4517 Get Xon/Xoff status on Windows. 2013-11-18 19:55:43 +00:00
Martin Ling
e33ab9aaf2 Refactor port configuration code. 2013-11-18 19:52:37 +00:00
Martin Ling
067417af4f Add sp_get_config() function. 2013-11-16 20:55:53 +00:00
Martin Ling
7e6fb0152c Update documentation. 2013-11-15 11:43:07 +00:00
Martin Ling
a33d84f6a0 Remove disused flowcontrol field from sp_port_config. 2013-11-15 11:43:07 +00:00
Martin Ling
da2748bfb3 Eliminate lengthy switch/case blocks for baudrates. 2013-11-15 11:43:07 +00:00
Martin Ling
18fc2dd12b Add sp_set_flowcontrol helper function. 2013-11-15 11:43:07 +00:00
Martin Ling
824dcb4561 Store control bits in sp_port_data on Unix. 2013-11-15 11:43:07 +00:00
Martin Ling
e96d8bd288 Split up prototypes in include file for clarity. 2013-11-15 11:43:07 +00:00
Martin Ling
9069c2fbb2 Add functions for setting individual port parameters. 2013-11-15 11:43:07 +00:00
Martin Ling
9cb98459a8 Apply sane termios settings at port open time. 2013-11-15 11:43:07 +00:00
Martin Ling
80186526b2 Add prototypes for config helper functions. 2013-11-15 11:43:07 +00:00
Martin Ling
9f90173cbd Retrieve current control line settings in start_config. 2013-11-15 11:43:07 +00:00
Martin Ling
d514a26f81 New API for serial control lines. 2013-11-15 11:43:07 +00:00
Martin Ling
cbf628c7fe Move cfset{i,o}speed() calls to set_baudrate(). 2013-11-15 11:43:07 +00:00
Martin Ling
a46f0960a2 Use negative values in sp_port_config to retain existing settings. 2013-11-15 11:43:07 +00:00
Martin Ling
d1202734fb Replace sp_set_params with sp_set_config, which takes a struct. 2013-11-15 11:43:07 +00:00
Uwe Hermann
728f6de510 Use new project URL. 2013-11-15 11:36:14 +01:00
Uwe Hermann
e4bffe06c2 pkg-config file: Use Requires.private to fix static build.
Any libs needed when building static binaries must be listed in the
'Requires.private' field of the installed pkg-config file libserialport.pc.

Currently, this is libudev (but only when building on/for Linux).
2013-11-15 09:28:34 +01: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
a3d4a56e15 configure.ac: Drop unneeded AC_MSG_ERROR.
The default behaviour of PKG_CHECK_MODULES is to abort with an error
anyway, but it will also print a more usable error message and hints
for the user about how to use PKG_CONFIG_PATH and so on.
2013-11-15 00:42:40 +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
8094e4a0ce Divide sp_set_params into separate helper functions. 2013-11-15 00:42:40 +01:00
Martin Ling
767c5ba80e Include <stdio.h> on Windows for sprintf, used in sp_open. 2013-11-15 00:42:40 +01:00
Martin Ling
d1d566f27f Support 6-bit data on Unix. 2013-11-15 00:42:40 +01:00
Martin Ling
e4cc1a537a Set data bits on Windows. 2013-11-15 00:42:39 +01:00
Martin Ling
32b5ac05b4 Add sp_copy_port() function. 2013-11-15 00:42:39 +01:00
Martin Ling
99945a1fb5 On Windows, prefix port names with '\\.\' to work with ports above COM9. 2013-11-15 00:42:39 +01:00
Martin Ling
f6a1fb65ea Rename header to libserialport.h. 2013-11-15 00:42:39 +01:00
Martin Ling
d9573bad9a Fix enumeration on Windows. 2013-11-15 00:42:39 +01:00
Martin Ling
0d34b4519c Fix enumeration on OS X. 2013-11-15 00:42:39 +01:00
Martin Ling
c45eb4bee2 Update documentation. 2013-11-15 00:42:39 +01:00
Martin Ling
f9796bcb86 Remove outdated inline documentation, README is now authoritative. 2013-11-15 00:42:39 +01:00
Martin Ling
b9a462bb47 Clarify return values of sp_get_port_by_name() and sp_list_ports(). 2013-11-15 00:42:39 +01:00
Martin Ling
25ab82f6c0 Clarify documentation for sp_read() and sp_write(). 2013-11-15 00:42:38 +01:00
Martin Ling
0161932884 Update documentation. 2013-11-15 00:42:38 +01:00
Martin Ling
e3b2f7a4e3 Add sp_free_port() function. 2013-11-15 00:42:38 +01:00
Martin Ling
77f262c4f9 Make sp_list_ports and sp_get_port_by_name return int. 2013-11-15 00:42:38 +01:00
Martin Ling
d4babed247 Add sp_get_port_by_name() function. 2013-11-15 00:42:38 +01:00
Martin Ling
5919c9134a Port name string length now no longer needs to be passed around. 2013-11-15 00:42:38 +01:00
Martin Ling
8b532d9c1e Handle conversion of unicode names to char * on Windows. 2013-11-15 00:42:38 +01:00
Martin Ling
d54e90047b Identify ports by sp_port structure, not name. 2013-11-15 00:42:38 +01:00
Martin Ling
24c1a4bb05 Always return an empty port list unless allocation fails. 2013-11-15 00:42:38 +01:00
Martin Ling
e9a2f9c9d3 Add SP_ERR_MEM failure code. 2013-11-15 00:42:38 +01:00
Martin Ling
1ebf4347e0 Fix building on OSX and Linux. 2013-11-15 00:42:37 +01:00
Martin Ling
bdfb5b8c08 Rename "name" to "value" to be more consistent with Windows terminology. 2013-11-15 00:42:37 +01:00