]> sigrok.org Git - libsigrok.git/commit - src/libsigrok-internal.h
serial: prepare for the absence of libserialport
authorGerhard Sittig <redacted>
Sun, 28 Jan 2018 17:07:38 +0000 (18:07 +0100)
committerUwe Hermann <redacted>
Sun, 2 Jun 2019 18:39:02 +0000 (20:39 +0200)
commit1ac8c2181b0390c601278ad05bab93dd1c801734
tree7e5c9798ac28692170b2f2348f48f43a5a1dc9f3
parentbb15350e594bcbf5e25e30df0a8ceb31a795a36a
serial: prepare for the absence of libserialport

Only reference the libserialport header when the library is available.
Allow to always compile the serial.c source file, but optionally end
up with an empty implementation. Make the sr_serial_dev_inst symbol
available outside of HAVE_SERIAL_COMM such that empty stub code can
compile. This prepares the introduction of alternative transports for
serial communication, while all of them remain optional.

The libsigrok serial layer internally uses parity and flow control
symbols which are provided by libserialport. Optionally locally declare
these symbols when libserialport is not available.
src/libsigrok-internal.h
src/serial.c