]> sigrok.org Git - libserialport.git/blob - README
Return SP_ERR_SUPP from sp_list_ports() on unsupported platforms.
[libserialport.git] / README
1 -------------------------------------------------------------------------------
2 libserialport: cross-platform library for accessing serial ports
3 -------------------------------------------------------------------------------
4
5 libserialport is a minimal library written in C that is intended to take care
6 of the OS-specific details when writing software that uses serial ports.
7
8 By writing your serial code to use libserialport, you enable it to work
9 transparently on any platform supported by the library.
10
11 The operations that are supported are:
12
13 - Port enumeration (obtaining a list of serial ports on the system).
14 - Opening and closing ports.
15 - Setting port parameters (baud rate, parity, etc).
16 - Reading, writing and flushing data.
17 - Obtaining error information.
18
19 libserialport is an open source project released under the LGPL3+ license.
20
21 Status
22 ======
23
24 The library should build and work on any Windows or Unix-based system. If it
25 does not, please submit a bug.
26
27 Enumeration is currently only implemented on Windows, Mac OS X and Linux. On
28 other systems enumeration is not supported, but ports can still be opened by
29 name and then used.
30
31 If you know how to enumerate available ports on another OS, please submit a bug
32 with this information, or better still a patch implementing it.
33
34 Future
35 ======
36
37 Future versions will add additional API calls for obtaining metadata about a
38 port, e.g. for USB devices the USB VID and PID of the underlying device.
39
40 Dependencies
41 ============
42
43 On Linux, libudev is required. On other systems no other libraries are required.
44
45 The libudev dependency could be eliminated in favour of direct sysfs queries at
46 the cost of some brevity. This is not currently a priority but if you feel like
47 doing this feel free to submit a patch.
48
49 Building
50 ========
51
52 The package uses a GNU style build system and requires a Unix style shell.
53 On Windows it can be built with the MinGW toolchain and MSYS environment.
54
55 Run "./autogen.sh" to generate the build system, "./configure" to setup, then
56 "make" to build the library and "make install" to install it.
57
58 API
59 ===
60
61 Doxygen API documentation is included.