Introduce the HAVE_SERIAL_COMM identifier, which gets derived from, but
need not be identical to the HAVE_LIBSERIALPORT condition.
Derive the NEED_SERIAL automake condition from the general availability
of serial communication not the specific libserialport library.
Adjust source code references. Stick with HAVE_LIBSERIALPORT where the
specific library is meant, but switch to HAVE_SERIAL_COMM where the
availability of serial communication in general is meant.
Add an indirection between the common serial communication code and the
libserialport specific support code. Prepare the use of alternative
transports like USB HID in the future. Decide in the open() routine
which transport to use for subsequent operations (based on port names).
In theory only the transport specific layer depends on the libserialport
library's availability. In this implementation all support for serial
communication still depends on the HAVE_LIBSERIALPORT preprocessor
symbol. This needs to get addressed in later commits.
Eliminate a direct libserialport dependency in the OLS device driver.
Use libsigrok's internal serial layer's API instead to check for the
availability of receive data.
Add a serial_has_receive_data() routine to the serial layer's API which
returns the number of (known to be) available RX data bytes. Implement
support in the libserialport specific code.
Introduce a new serial_libsp.c source file, and move code from serial.c
there which is specific to libserialport. Keep the existing serial.c API
in place, this is a pure internal refactoring.
Adjust a little whitespace while we are here. Rearrange long lines to
keep related parameter groups adjacent (like pointer and size, or UART
frame length and flow control). Consistently reduce indentation of
continuation lines.
Store the most recent successfully applied set of parameters for serial
communication. Re-use these values as a fallback to calculate timeouts,
when the underlying transport fails to provide the current settings.
The rohde-schwarz-sme-0x device driver used to unconditionally reference
a libserialport header file. Remove that reference, it's not needed in
this specific driver.
Build support has changed to use linker sections for driver registration.
Update the subsection in the HACKING document which discusses the manual
addition of device drivers, to match what the new-driver script does for
driver authors.
Don't exit with an error if the FPGA is detected as unsupported.
Just issue a warning with the detected version and continue. I have such
a clone and it works with the original Saleae software and with sigrok
despite the fact that its FPGA version is 0xff.
Explicitly use SRCDIR and BUILDDIR in Doxyfile files to reference input
files. This seems to be a sufficient fix for an issue where the build
would fail when libsigrok/ was located in a directory that was a symlink.
This fixes bug #547.
Their commands are very similar to the U123x series, they just
add some more modes and the second channel. So use the re-functions
and just extend them where necessary.
Log reading not supported yet.
Basic testing done with a U1272A.
- fix the resolution of the CONF?-response:
the resolution is given with 6 decimal places
(instead of 8) like this:
VOLT +5.000000E+00,+1.000000E-04
- add more measurement modes that are possible with the meter:
CONT,COND,TEMP,PULS
It's important to remain aware that the serial layer's flush and drain
semantics differs from e.g. filesystem calls. The libserialport API is
said to follow the termios example.
Extend comments in the libsigrok API, to not depend on the libserialport
layer and the availability of its documentation. This raises awareness
during maintenance of sigrok device drivers, as well as the pending
addition of alternative transports for serial communication.
Adjust the doxygen comment for the read line routine while we are here.
Add "in" and "out" attributes for routine parameters.
The src/hardware/ subdirectory exclusively contains device drivers these
days, while common support code has moved to the src/dmm/, src/lcr/,
src/scale/, etc directories or src/ itself. Adjust comments in the
libsigrok-internal.h declaration blocks which reference source files.
Just allocate the memory needed to hold the very variable's size. No
need to duplicate the variable's type. Reduces redundancy and increases
robustness during maintenance.
Use g_malloc0() in sr_serial_new() to make sure all of the structure is
initialized.
src/hardware/sysclk-sla5032/protocol.c: In function ‘la_start_acquisition’:
src/hardware/sysclk-sla5032/protocol.c:244:8: warning: implicit declaration of function ‘max’ [-Wimplicit-function-declaration]
pre = max(pre, 2);
^~~