Difference between revisions of "Libserialport"
(Added description for enabling debug output.) |
(build instructions depend on the platform, reference the README file) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:libserialport}} | {{DISPLAYTITLE:libserialport}} | ||
'''libserialport''' is a minimal, cross-platform shared library written in C that is intended to take care of the OS-specific details when writing software that uses serial ports. | '''libserialport''' (sometimes abbreviated as "sp") is a minimal, cross-platform shared library written in C that is intended to take care of the OS-specific details when writing software that uses serial ports. | ||
It is licensed under the terms of the GNU Lesser General Public License, version 3 or later. | It is licensed under the terms of the '''GNU Lesser General Public License, version 3 or later'''. | ||
'''''Note:''' While libserialport is hosted on sigrok.org (and sigrok uses libserialport), this is a completely independent library that can be used by other projects as well. The libserialport library does '''not''' depend on any sigrok related libraries or projects.'' | |||
== Supported operating systems == | == Supported operating systems == | ||
Line 8: | Line 10: | ||
* Linux | * Linux | ||
* Mac OS X | * Mac OS X | ||
* FreeBSD | |||
* Windows | * Windows | ||
* Android | * Android | ||
Line 14: | Line 17: | ||
You can browse the [http://sigrok.org/api/libserialport/unstable/index.html API documentation] of the library online. | You can browse the [http://sigrok.org/api/libserialport/unstable/index.html API documentation] of the library online. | ||
== Distribution packages == | |||
See [[Downloads#Binaries_and_distribution_packages|Downloads]]. | |||
== Getting the code == | == Getting the code == | ||
Line 21: | Line 28: | ||
You can also [http://sigrok.org/gitweb/?p=libserialport.git;a=tree browse the source code] via gitweb. | You can also [http://sigrok.org/gitweb/?p=libserialport.git;a=tree browse the source code] via gitweb. | ||
== | == Building from source == | ||
Navigate to the directory where the source code resides. Make sure to also check the README file in the source tree in case this wiki page isn't up to date. | |||
These are typical instructions for UNIX style environments. Your specific environment may differ. Check the doc files which reside in the source tree. | |||
$ '''./autogen.sh''' | $ '''./autogen.sh''' | ||
Line 32: | Line 38: | ||
$ '''make''' | $ '''make''' | ||
$ '''sudo make install''' | $ '''sudo make install''' | ||
'''Note:''' The libserialport project does not depend on other libraries to build/use. But build tools will be required (the specific set depends on your platform). | |||
== Debugging == | |||
To examine problems related to libserialport, verbose debug output can be enabled by setting the environment variable '''LIBSERIALPORT_DEBUG''' to any value. | |||
__NOTOC__ | __NOTOC__ | ||
[[Category:APIs]] |
Latest revision as of 13:59, 14 November 2020
libserialport (sometimes abbreviated as "sp") is a minimal, cross-platform shared library written in C that is intended to take care of the OS-specific details when writing software that uses serial ports.
It is licensed under the terms of the GNU Lesser General Public License, version 3 or later.
Note: While libserialport is hosted on sigrok.org (and sigrok uses libserialport), this is a completely independent library that can be used by other projects as well. The libserialport library does not depend on any sigrok related libraries or projects.
Supported operating systems
- Linux
- Mac OS X
- FreeBSD
- Windows
- Android
API documentation
You can browse the API documentation of the library online.
Distribution packages
See Downloads.
Getting the code
$ git clone git://sigrok.org/libserialport
You can also browse the source code via gitweb.
Building from source
Navigate to the directory where the source code resides. Make sure to also check the README file in the source tree in case this wiki page isn't up to date.
These are typical instructions for UNIX style environments. Your specific environment may differ. Check the doc files which reside in the source tree.
$ ./autogen.sh $ ./configure $ make $ sudo make install
Note: The libserialport project does not depend on other libraries to build/use. But build tools will be required (the specific set depends on your platform).
Debugging
To examine problems related to libserialport, verbose debug output can be enabled by setting the environment variable LIBSERIALPORT_DEBUG to any value.