]> sigrok.org Git - libsigrok.git/log
libsigrok.git
3 years agouni-t-ut181a: comment on how to start a recording
Gerhard Sittig [Mon, 1 Jun 2020 08:23:38 +0000 (10:23 +0200)]
uni-t-ut181a: comment on how to start a recording

The meter allows remote controlled start of recordings, but requires a
few parameters where it's uncertain how to most appropriately get these
by means of SR_CONF_* keys.

Introduce SR_CONF_SET support for SR_CONF_DATALOG to raise awareness,
but leave the implementation empty for now. Leave a TODO comment which
discusses the meter's commands that one might want to use from here.

3 years agouni-t-ut181a: implement device driver for the UNI-T UT181A multimeter
Gerhard Sittig [Sat, 14 Dec 2019 14:14:46 +0000 (15:14 +0100)]
uni-t-ut181a: implement device driver for the UNI-T UT181A multimeter

Extend the previously introduced skeleton driver for UNI-T UT181A. Introduce
support for the full multimeter's protocol as it was documented by the ut181a
project. Which covers the retrieval of live readings, saved measurements, and
recordings, in all of the meter's modes and including relative, min/max, and
peak submodes. This implementation also parses compare mode (limits check)
responses, although it cannot express the result in terms of the session feed.

Announce the device as a multimeter as well as a thermometer, it supports
up to two probes including difference mode. When in doubt, prefer usability
over feature coverage (the driver side reflects all properties of the meter,
but not all features can get controlled by the driver). The probe routine
requires that users specify the serial port, and enable serial communication
on the meter.

Several TODO items remain. Comments in the driver code discuss limitations
of the current implementation, as well as cases where the meter's features
don't map well to sigrok's internal presentation. This implementation also
contains (optional, off by default) diagnostics for research on the serial
protocol.

3 years agouni-t-ut181a: Initial driver skeleton.
Gerhard Sittig [Fri, 13 Dec 2019 20:41:50 +0000 (21:41 +0100)]
uni-t-ut181a: Initial driver skeleton.

3 years agoasix-sigma: discuss usability of data pattern trigger specs
Gerhard Sittig [Sun, 31 May 2020 10:38:21 +0000 (12:38 +0200)]
asix-sigma: discuss usability of data pattern trigger specs

When data patterns for trigger specs span multiple bits, users may not
want to specify long lists of "<ch>=<lvl>" conditions for sigrok-cli's
--trigger option, and count channels by hand. Or click a dozen dialogs
to specify one data pattern, or modify a previous specification. Setups
with few traces may accept that, "data heavy" setups like parallel data
or address bus inspection may not.

Add comments which discuss the potential use of SR_CONF_TRIGGER_PATTERN.
Outline a syntax which may be flexible enough _and_ acceptable to users,
support data patterns and edge triggers alike, in several presentations
that serve different use cases.  This commit exclusively adds comments,
does not change behaviour.

Update a comment in the user spec to internal format trigger spec parser
to expand on hardware constraints and implementation limitations. Rename
an identifier which checks the number of edge conditions, not the number
of accepted trigger spec details.

3 years agoasix-sigma: unconditionally re-enable trigger support code
Gerhard Sittig [Sun, 31 May 2020 10:36:11 +0000 (12:36 +0200)]
asix-sigma: unconditionally re-enable trigger support code

Trigger support became operational again. Drop the compile time switch
which disabled the previously incomplete implementation.

This resolves bug #359.

3 years agoasix-sigma: complete and extend capture mode supervision
Gerhard Sittig [Sun, 31 May 2020 16:38:14 +0000 (18:38 +0200)]
asix-sigma: complete and extend capture mode supervision

Parse trigger specs early when acquisition starts, timeout calculation
needs to reflect on it. Either immediately start an acquisition timeout
for trigger-less configurations. Or prepare a timeout which spans the
post-trigger period, but only start its active period when the trigger
match was detected by the device's hardware.

Extend mode tracking during acquisition to handle other special cases.
Terminate acquisition when the user specified sample count limit exceeds
the hardware capacity, or when no limits were specified and the device's
memory is exhausted.

There is a slight inaccuracy in this approach, but the implementation
fails on the safe side. When both user specified limits and triggers are
involved, then at least the user specified time or sample count span is
provided. Usually more data is sent to the session feed, and all of the
requested period is covered. This is because of the software poll period
and the potential to start the timeout slightly late. As well as having
added some slack for hardware pipelines in the timeout calculation.

3 years agoasix-sigma: download sample memory in multiple receive calls
Gerhard Sittig [Sun, 31 May 2020 16:38:39 +0000 (18:38 +0200)]
asix-sigma: download sample memory in multiple receive calls

The previous implementation ran the complete sample memory retrieval
in a single call to the receive callback. Which in combination with
slow USB communication and deep memory could block application logic
for rather long periods of time.

Rephrase the download_capture() routine such that it can spread its
workload across multiple invocations. Run the acquisition stop and
resource allocation for the download, the interpretation of a set of
DRAM lines, and the resource cleanup, as needed. And keep calling the
download routine until completion of the interpretation of the sample
memory region of interest. The workload size per invocation may need
more adjustment.

The previous implementation could stall UI progress for some 20-30s.
This change lets users perceive UI progress while sample memory gets
retrieved and interpreted.

This resolves bug #1005.

3 years agoasix-sigma: drop obsolete "trigger countdown" in sample interpretation
Gerhard Sittig [Sun, 31 May 2020 18:13:40 +0000 (20:13 +0200)]
asix-sigma: drop obsolete "trigger countdown" in sample interpretation

Recent commits added "position tracking" for interesting spots in the
sample stream and the current iteration pointer. Which obsoletes the
counters for remaining items until trigger, the "triggered here" flags,
as well as the unfortunate "rewind a little" workaround which lacked a
comment on its motivation or implementation details.

3 years agoasix-sigma: re-enable software check for exact trigger position
Gerhard Sittig [Wed, 27 May 2020 05:02:12 +0000 (07:02 +0200)]
asix-sigma: re-enable software check for exact trigger position

The hardware provided trigger match location is inaccurate. Do check
sample values against the initial trigger condition spec for a short
range of the retrieved sample data, to refine the trigger marker's
position which is sent to the session feed.

Temporarily ignore the optional sample count limit for trigger-using
acquisitions, to reduce the diff size and simplify review. Since the
hardware transparently compresses sample data, we cannot reliably
determine where to start the download and interpretation of sample data,
and the submission to the session feed. Starting early in the sample
memory content, and sticking with the strict sample count limit, could
clip submission before the actual trigger position.

This implementation provides _at least_ the requested amount of data,
and does cover the spot of interest (the trigger position). This, and
the trigger support's having become operational again, is considered an
important improvement. The inaccuracy is considered acceptable for now.
Trigger-less acquisition does enforce the exact sample count limit.

3 years agoasix-sigma: rephrase sample memory iteration position and trigger check
Gerhard Sittig [Wed, 27 May 2020 05:06:45 +0000 (07:06 +0200)]
asix-sigma: rephrase sample memory iteration position and trigger check

Rephrase how the sample memory iteration position gets tracked, increment
after every event slot already. Update the "last seen sample" status more
often (an event slot can hold several sample items). Arrange for a period
of time where software will check sample data for trigger matches. This
improves the precision of the hardware provided trigger match location.

Do send hardware provided trigger locations to the session feed even if
the software check found no match on the data content. This covers user
initiated button presses (which can unblock the acquisition when the
application provided trigger condition never matches).

Note that this implementation does manage the window of supervision, but
does not yet check the sample values against the trigger condition. This
gets added later.

3 years agoasix-sigma: rework outer sample download loop (DRAM lines iteration)
Gerhard Sittig [Wed, 27 May 2020 04:41:21 +0000 (06:41 +0200)]
asix-sigma: rework outer sample download loop (DRAM lines iteration)

Factor USB data transfer out of the code path which interprets sample
memory content. Keep internal state of sample memory download in the
device context. This eliminates local variables, and ideally allows a
future implementation to spread chunked downloads across several read
callbacks, which would improve UI responsiveness.

Update comments while we are here. Address minor portability nits (ull
suffix vs UINT64_C macro). The inner loops (iterating clusters and their
events which contain individual samples) are not affected by this commit.

3 years agoasix-sigma: more trigger LUT download rephrase, think 16bit entities
Gerhard Sittig [Mon, 18 May 2020 20:09:39 +0000 (22:09 +0200)]
asix-sigma: more trigger LUT download rephrase, think 16bit entities

Further rephrase the sigma_write_trigger_lut() routine. It's helpful to
"think" in BE16 quantities to improve readability of LUT address and
parameter downloads. Better matches the vendor's documentation. Also use
a better name for the "trigger select 2" register content.

3 years agoasix-sigma: concentrate more sample memory interpretation params
Gerhard Sittig [Mon, 18 May 2020 18:11:02 +0000 (20:11 +0200)]
asix-sigma: concentrate more sample memory interpretation params

Start moving parameters into the device context which are related to the
interpretation of sample memory content. This can simplify error paths,
allow to release resources late. And ideally sample memory download and
interpretation could spread across several receive callbacks, improving
UI responsiveness. Also makes total and current dimensions available to
deeper nesting levels in the interpretation, which currently don't have
access to these details.

3 years agoasix-sigma: concentrate parameters for sample memory interpretation
Gerhard Sittig [Wed, 13 May 2020 05:53:04 +0000 (07:53 +0200)]
asix-sigma: concentrate parameters for sample memory interpretation

Create a sub struct in the device context which keeps those parameters
which are related to sample memory interpretation. Which also obsoletes
the 'state' struct and only leaves the 'state' enum as a remainder.

Use the "samples per event" condition instead of the samplerate when
extracting a number of samples from an event's storage. Rename the
de-interleaving routines to better reflect their purpose.

3 years agoasix-sigma: force strict boolen arith in LUT item manipulation
Gerhard Sittig [Sun, 17 May 2020 14:50:42 +0000 (16:50 +0200)]
asix-sigma: force strict boolen arith in LUT item manipulation

Mechanically adjust the add_trigger_function() routine to address nits,
attempt to improve maintainability.

Raise awareness of the fact that strict binary arithmetics is done (bit
operators are used), the strict 0..1 set of values needs to be enforced,
and mere "logical truthness" is not good enough in this spot. Explicitly
check for bit positions instead of "shifting out" the bit of interest
and have the 0/1 value result nearly by coincidence.

Extend comments. Group related instructions and separate them from other
groups. Reduce the scope of the rather generic i, j, tmp named variables
which are just too easy to get wrong.

3 years agoasix-sigma: use more helpers for bit mask creation
Gerhard Sittig [Sun, 17 May 2020 18:00:21 +0000 (20:00 +0200)]
asix-sigma: use more helpers for bit mask creation

Rename macros to better reflect which of them check a bit position, and
which span a bit field of given width. Adjust more call sites to use the
macros. This takes tedium out of maintenance as well as review. Has the
minor benefit of somewhat shortening text lines, and eliminating nested
parentheses (or getting perceived as if it would).

3 years agoasix-sigma: rephrase limits management, use sub structure
Gerhard Sittig [Sun, 17 May 2020 16:49:27 +0000 (18:49 +0200)]
asix-sigma: rephrase limits management, use sub structure

Move the acquisition limits related variables into a sub struct within
the device context. Over time they became numerous, and might grow more
in the future.

3 years agoasix-sigma: track whether triggers were specified when acquisition started
Gerhard Sittig [Sun, 17 May 2020 14:15:54 +0000 (16:15 +0200)]
asix-sigma: track whether triggers were specified when acquisition started

There are several separate conditions which the driver needs to tell
apart. There is a compile time switch whether trigger support shall be
built in. There is the condition whether acquisition start involved a
user provided trigger spec. And there is the hardware flag whether a
previously configured trigger condition matched and where its position
is.

Only accept user provided trigger specs when trigger support is builtin.
(The get/set/list availability and spec passing is done in applications
outside of the library, we better check just to make sure.) Only setup
the trigger related hardware parameters when a spec was provided. Only
check for trigger positions when the hardware detected a match.

3 years agoasix-sigma: enable trigger support code (development HACK)
Gerhard Sittig [Sat, 2 May 2020 16:38:44 +0000 (18:38 +0200)]
asix-sigma: enable trigger support code (development HACK)

Enable the compile time option which builds trigger support code into
the asix-sigma driver. This is a development hack. Trigger support in
the driver is incomplete and currently not operational.

3 years agoasix-sigma: data type nits, minor variable renames
Gerhard Sittig [Sun, 17 May 2020 14:04:29 +0000 (16:04 +0200)]
asix-sigma: data type nits, minor variable renames

Address remaining data type nits. Use more appropriate types for sizes
and counters and indices, as well as for booleans.

Prefer more verbose variable names in a few spots to avoid the rather
generic 'i' symbol, especially in complex code paths with deeply nested
flow control or with long distances between declaration and use. Re-use
an existing buffer in the acquisition start for command sequences which
setup trigger in/out as well as clock parameters.

Introduce some variables which may seem unnecessary. But these are
useful for research during maintenance.

This is a mechanical adjustment, behaviour does not change.

3 years agoasix-sigma: prepare configuration re-use across sigrok sessions
Gerhard Sittig [Sat, 16 May 2020 20:08:08 +0000 (22:08 +0200)]
asix-sigma: prepare configuration re-use across sigrok sessions

Introduce the required infrastructure to store successfully applied
configuration data in hardware registers. This lets the probe phase of
the next sigrok session pick up where the previous session left. Which
improves usability, and increases performance by eliminating delays in
the acquisition start, by not repeating unnecessary firmware uploads.

The vendor documentation suggests there would be FPGA registers that are
available for application use ("plugin configuration"). Unfortunately
experiments show that registers beyond address 0x0f don't hold the data
which was written to them. As do unused registers in the first page. So
the desirable feature is not operational in this implementation. There
could be different netlist versions which I'm not aware of, or there
could be flaws in this driver implementation. This needs more attention.

3 years agoasix-sigma: nits in the hardware configuration declaration
Gerhard Sittig [Wed, 13 May 2020 05:51:48 +0000 (07:51 +0200)]
asix-sigma: nits in the hardware configuration declaration

Stop assuming that C language variables whould have a specific memory
layout that applications could rely on. Use normal data types in higher
abstraction layers, drop non-portable bit fields. Use existing macros
for the creation of bit masks of a given width.

3 years agosw_limits: start msec timeout period only after start() call
Gerhard Sittig [Sun, 31 May 2020 09:22:07 +0000 (11:22 +0200)]
sw_limits: start msec timeout period only after start() call

When application code used the common SW limits API, the call sequence
of init() then set() then check() already kept expiring, which is rather
unexpected. The timeout period should only start when start() is called,
check() should not signal expiration before the start() call.

The specific use case is the combination of an msecs timeout and capture
ratio when triggers are used. The post-trigger period only starts when
the trigger match was seen, even though its length is already known when
the acquisition starts. It's desirable to run the start() call for the
post-trigger timeout late, and not terminate the acquisition before the
trigger match.

3 years agoserial: accept bitrate only serialcomm= spec, default to 8n1 frames
Gerhard Sittig [Sun, 31 May 2020 13:23:19 +0000 (15:23 +0200)]
serial: accept bitrate only serialcomm= spec, default to 8n1 frames

The previous implementation considered both the UART bitrate and the
frame format mandatory, users had to specify "/8n1" as well just to
change the bitrate.

This commit makes the frame format optional, and defaults to 8n1 which
is so popular these days. When specified, the frame format still needs
to preceed the other optional flow and handshake flags, for maximum
backwards compatibility, and equal robustness in the process of parsing
serialcomm= specs.

Unfortunately device drivers cannot specify their preferred or default
UART frame format. Which means that users still need to provide these
when a device does not use 8n1. This is not a regression, the previous
implementation always needed the frame format spec.

3 years agoasix-sigma: update comment on channel names (vendor doc says "1-16")
Gerhard Sittig [Sat, 23 May 2020 05:41:55 +0000 (07:41 +0200)]
asix-sigma: update comment on channel names (vendor doc says "1-16")

Eliminate doubt from a comment on ASIX SIGMA's channel names which was
introduced in commit d261dbbfcc73. Publicly available documentation does
agree their names start at "1" and go up to "16".

3 years agoasix-sigma: add support for external clock
Gerhard Sittig [Sat, 16 May 2020 17:37:52 +0000 (19:37 +0200)]
asix-sigma: add support for external clock

The 50MHz netlist supports the use of an external clock. Any of the 16
channels can use any of its edges to have another sample taken from all
the other pins. It's nice that the hardware does track timestamps, which
results in an exact reproduction of the input signals' timing with 20ns
resolution, although the clock is externally provided and need not have
a fixed rate.

3 years agoasix-sigma: more trigger spec to register values conversion sync with doc
Gerhard Sittig [Sat, 16 May 2020 16:07:37 +0000 (18:07 +0200)]
asix-sigma: more trigger spec to register values conversion sync with doc

Rephrase more parts of sigma_build_basic_trigger() to closer match the
vendor documentation. Use the M3Q name. Be explicit about "parameters"
setup (even if that means to assign zero values, comments help there).
Using three BE16 items for the parameters improves readability.

3 years agoasix-sigma: rephrase trigger LUT creation (mechanical change)
Gerhard Sittig [Sat, 16 May 2020 15:04:51 +0000 (17:04 +0200)]
asix-sigma: rephrase trigger LUT creation (mechanical change)

Rephrase the sigma_build_basic_trigger() and build_lut_entry() routines
to hopefully improve readability. Avoid the use of short and generic
identifiers which are just too easy to confuse with each other and the
1 literal and negation operator in deeply nested loops and complex
expressions that span several text lines. Reduce indentation where
appropriate. Concentrate initialization and use of variables such that
reviewers need less context for verification.

This is a purely mechanical change, the function of triggers remains
untested for now. Setting "selres" in that spot is suspicious, too.

3 years agoasix-sigma: rephrase trigger LUT upload to hardware for readability
Gerhard Sittig [Sat, 16 May 2020 14:27:25 +0000 (16:27 +0200)]
asix-sigma: rephrase trigger LUT upload to hardware for readability

Rephrase the sigma_write_trigger_lut() routine to work on "a higher
level" of abstraction. Avoid short and most of all generic variable
names. Use identifiers that are closer to the vendor documentation.

3 years agoasix-sigma: rephrase and extend register access for readability
Gerhard Sittig [Sat, 16 May 2020 10:13:38 +0000 (12:13 +0200)]
asix-sigma: rephrase and extend register access for readability

Reduce the probability of errors during maintenance, and also increase
readability. Replace open coded nibble extraction and bit positions by
accessor helpers and symbolic identifiers. Adjust existing math where it
did not match the vendor documentation. Always communicate 8bit register
addresses, don't assume that application use remains within a specific
"page". Provide more FPGA register access primitives so that call sites
need not re-invent FPGA command sequence construction. Remove remaining
open coded endianess conversion in DRAM access.

3 years agoasix-sigma: rephrase firmware dependent param upload at acquisition start
Gerhard Sittig [Sat, 16 May 2020 08:23:15 +0000 (10:23 +0200)]
asix-sigma: rephrase firmware dependent param upload at acquisition start

The 100/200MHz supporting FPGA netlists differ in their register set
from 50MHz netlists. Adjust the parameter download at acquisition start.

Raise awareness of the "TriggerSelect" and "TriggerSelect2" difference
(the former only exists in 50MHz netlists, the latter's meaning differs
between firmware variants). "ClockSelect" semantics also differs between
netlists. Stop sending four bytes to a register that is just one byte
deep, channel selection happened to work by mere coincidence.

Eliminate a few more magic numbers, unobfuscate respective code paths.
Though some questions remain (trigger related, not a blocker for now,
needs to get addressed later).

3 years agoasix-sigma: keep remaining samplerate handling in protocol.c
Gerhard Sittig [Fri, 15 May 2020 11:59:29 +0000 (13:59 +0200)]
asix-sigma: keep remaining samplerate handling in protocol.c

Make the list of supported samplerates an internal detail of the
protocol.c source file. Have the api.c source file retrieve the list
as well as the currently configured value by means of query routines.

Ideally the current rate could get retrieved from hardware at runtime.
A future driver implementation could do that. This version sticks with
the lowest supported rate, as in the previous version.

3 years agoasix-sigma: cosmetics, sort protocol.h function groups
Gerhard Sittig [Fri, 15 May 2020 11:40:26 +0000 (13:40 +0200)]
asix-sigma: cosmetics, sort protocol.h function groups

Sort "semi public" routines and "global data" of the asix-sigma driver
in the protocol.h header file by their use. Add comments. This improves
maintenance of the driver source.

3 years agoasix-sigma: prepare FTDI open/close for "optional open"
Gerhard Sittig [Fri, 15 May 2020 11:29:20 +0000 (13:29 +0200)]
asix-sigma: prepare FTDI open/close for "optional open"

Move all of the FTDI connection handling from api.c to protocol.c, and
prepare "forced" and "optional" open/close. This allows future driver
code to gracefully handle situations where FPGA registers need to get
accessed, while the caller may be inside or outside the "opened" period
of the session. This is motivated by automatic netlist type and sample
rate detection, to avoid the cost of repeated firmware uploads.

3 years agoasix-sigma: improve error propagation, increase robustness
Gerhard Sittig [Fri, 15 May 2020 10:13:32 +0000 (12:13 +0200)]
asix-sigma: improve error propagation, increase robustness

Detect more error conditions, and unbreak those code paths where wrong
data was forwarded. It's essential to tell the USB communication layer,
sigrok API error codes, and glib mainloop receive callbacks apart. Since
the compiler won't notice, maintainers have to be extra careful.

Rephrase diagnostics messages. The debug and spew levels are intended
for developers, but the error/warn/info levels will get presented to
users, should read more fluently and speak from the application's POV.
Allow long text lines in source code, to not break string literals which
users will report and developers need to search for (this matches Linux
kernel coding style).

This commit also combines the retrieval of sample memory fill level,
trigger position, and status flags. Since these values span an adjacent
set of FPGA registers. Which reduces USB communication overhead, and
simplifies error handling. The helper routine considers the retrieval
of each of these values as optional from the caller's perspective, to
simplify other use cases (mode check during acquisition, before sample
download after acquisition has stopped).

INIT pin sensing after PROG pin pulsing was reworked, to handle the
technicalities of the FTDI chip and its USB communication and the FTDI
library which is an external dependency of this device driver. Captures
of USB traffic suggest that pin state is communicated at arbitrary times.

3 years agoasix-sigma: style nits, expression complexity, information locality
Gerhard Sittig [Fri, 15 May 2020 07:06:40 +0000 (09:06 +0200)]
asix-sigma: style nits, expression complexity, information locality

Address minor style nits to improve readability and simplify review. The
sizeof() expressions need not duplicate data type details. Concentrate
the assignment to, update of, and evaluation of variables in closer
proximity to reduce potential for errors during maintenance. Separate
the gathering of input data and the check for their availability from
each other, to simplify expressions and better reflect the logic's flow.

3 years agoasix-sigma: update copyright notice for recent non-trivial changes
Gerhard Sittig [Wed, 13 May 2020 16:52:32 +0000 (18:52 +0200)]
asix-sigma: update copyright notice for recent non-trivial changes

3 years agoasix-sigma: more u16 sample memory access nits (timestamps, values)
Gerhard Sittig [Wed, 13 May 2020 16:26:54 +0000 (18:26 +0200)]
asix-sigma: more u16 sample memory access nits (timestamps, values)

Further "flatten" the DRAM layout's declaration for sample data. Declare
timestamps and sample data as uint16_t, keep accessing them via endianess
aware conversion routines. Accessing a larger integer in smaller quantities
is perfectly fine, the inverse direction would be problematic.

3 years agoasix-sigma: improve robustness of parameter upload to hardware
Gerhard Sittig [Tue, 12 May 2020 19:51:10 +0000 (21:51 +0200)]
asix-sigma: improve robustness of parameter upload to hardware

Keep application data in its logical presentation in C language struct
fields. Explicitly convert to raw byte streams by means of endianess
aware conversion helpers. Don't assume a specific memory layout for
C language variables any longer. This improves portability, and
reliability of hardware access across compiler versions and build
configurations.

This change also unobfuscates the "disabled channels" arithmetics in
the sample rate dependent logic. Passes read-only pointers to write
routines. Improves buffer size checks. Reduces local buffer size for
DRAM reads. Rewords comments on "decrement then subtract 64" during
trigger/stop position gathering. Unobfuscates access to sample data
after download (timestamps, and values). Covers a few more occurances
of magic numbers for memory organization.

Prefer masks over shift counts for hardware register bit fields, to
improve consistency of the declaration block and code instructions.
Improve maintenability of the LA mode initiation after FPGA netlist
configuration (better match written data and read-back expectation,
eliminate magic literals that are hidden in nibbles).

3 years agoasix-sigma: style nits, devc in routine signatures, long text lines
Gerhard Sittig [Tue, 12 May 2020 18:09:54 +0000 (20:09 +0200)]
asix-sigma: style nits, devc in routine signatures, long text lines

Move the 'devc' parameter to the front in routine signatures for the
remaining locations which were not adjusted yet. Reduce indentation of
continuation lines, especially in long routine signatures. Try to not
break string literals in diagnostics messages, rephrase some of the
messages. Massage complex formulae for the same reason.

Whitespace changes a lot, word positions move on text lines. See a
corresponding whitespace ignoring and/or word diff for the essence of
the change.

3 years agoasix-sigma: reword list of sample rates, (try to) use 1/2/5 steps
Gerhard Sittig [Tue, 12 May 2020 19:57:13 +0000 (21:57 +0200)]
asix-sigma: reword list of sample rates, (try to) use 1/2/5 steps

The driver got extended in a previous commit to accept any hardware
supported samplerate in the setter API, although the list call does
suggest a discrete set of rates (a subset of the hardware capabilities).
Update a comment to catch up with the implementation.

Drop the 250kHz item, it's too close to 200kHz. Add a 2MHz item to
achieve a more consistent 1/2/5 sequence in each decade. Unfortunately
50MHz and an integer divider will never result in 20MHz, that's why
25MHz is an exception to this rule (has been before, just "stands out
more perceivably" in this adjusted sequence).

3 years agoasix-sigma: improve robustness of firmware download, delay and retry
Gerhard Sittig [Tue, 12 May 2020 05:59:54 +0000 (07:59 +0200)]
asix-sigma: improve robustness of firmware download, delay and retry

Running several firmware uploads in quick repetition sometimes failed.
It's essential to stop the active netlist from preventing the FPGA's
getting reconfigured (FTDI to FPGA pins are so few, and shared). Delays
in a single iteration of the initiation sequence improves reliability.
Retries of the sequence are belt and suspenders on top of that.

Before the change, failure to configure was roughly one in ten. After
the change, several thousand reconfigurations passed without failure.

3 years agoasix-sigma: eliminate magic numbers in firmware file references
Gerhard Sittig [Tue, 12 May 2020 05:20:17 +0000 (07:20 +0200)]
asix-sigma: eliminate magic numbers in firmware file references

Use symbolic identifiers to select firmware images, which eliminates
magic 0/1/2 position numbers in the list of files, improves readability
and also improves robustness. Move 'devc' to 'ctx' and before other
arguments in routine signatures while we are here.

3 years agoasix-sigma: mark FPGA config phase in "state" of dev context
Gerhard Sittig [Sun, 10 May 2020 18:06:16 +0000 (20:06 +0200)]
asix-sigma: mark FPGA config phase in "state" of dev context

FPGA configuration (netlist upload) of ASIX SIGMA devices is rather
special a phase, and deserves its own state in the device context's
"state" tracking. Not only is the logic analyzer not available during
this period, the FTDI cable is also put into bitbanging mode instead
of regular data communication in FIFO mode, and netlist configuration
takes a considerable amount of time (tenths of a second).

3 years agoasix-sigma: rework time/count limits support, accept more samplerates
Gerhard Sittig [Sun, 10 May 2020 14:45:17 +0000 (16:45 +0200)]
asix-sigma: rework time/count limits support, accept more samplerates

Use common support for SW limits, and untangle the formerly convoluted
logic for sample count or time limits. Accept user provided samplerate
values when the hardware supports them, also those which are not listed.

The previous implementation mapped sample count limits to timeout specs
which depend on the samplerate. The order of applications' calls into
the config set routines is unspecified, the use of one common storage
space led to an arbitrary resulting value for the msecs limit, and loss
of user specified values for read-back.

Separate the input which was specified by applications, from limits
which were derived from this input and determine the acquisition phase's
duration, from sample count limits which apply to sample data download
and session feed submission after the acquisition finished. This allows
to configure the values in any order, to read back previously configured
values, and to run arbitrary numbers of acquisition and download cycles
without losing input specs.

This commit also concentrates all the limits related computation in a
single location at the start of the acquisition. Moves the submission
buffer's count limit container to the device context where the other
limits are kept as well. Renames the samplerate variable, and drops an
aggressive check for supported rates (now uses hardware constraints as
the only condition). Removes an unused variable in the device context.

3 years agoasix-sigma: rephrase submission of logic data to session feed
Gerhard Sittig [Sun, 10 May 2020 07:14:41 +0000 (09:14 +0200)]
asix-sigma: rephrase submission of logic data to session feed

Introduce a 4MiB session feed submission buffer in the device context.
This reduces the number of API calls and improves performance of srzip
archive creation.

This change also eliminates complex logic which manipulates a previously
created buffer's length and data position, to split the queued data when
a trigger position was involed. The changed implementation results in a
data flow from sample memory to the session feed which feels more natural
during review, and better lends itself to future trigger support code.

Use common SW limits support for the optional sample count limit. Move
'sdi' and 'devc' parameters to the front to match conventions. Reduce
indentation in routine signatures while we are here.

This implementation is prepared to handle trigger positions, but for now
disables the specific logic which checks for trigger condition matches
to improve the trigger marker's resolution. This will get re-enabled in
a later commit.

3 years agoasix-sigma: eliminate magic numbers in sample memory access
Gerhard Sittig [Sat, 9 May 2020 18:23:23 +0000 (20:23 +0200)]
asix-sigma: eliminate magic numbers in sample memory access

Add more symbolic identifiers, and rename some of the existing names for
access to SIGMA sample memory. This eliminates magic numbers and reduces
redundancy and potential for errors during maintenance.

This commit also concentrates DRAM layout related declarations in the
header file in a single location, which previously were scattered, and
separated registers from their respective bit fields.

Extend comments on the difference of events versus sample data.

3 years agoasix-sigma: move FPGA commands before register layout declaration
Gerhard Sittig [Sat, 9 May 2020 16:59:40 +0000 (18:59 +0200)]
asix-sigma: move FPGA commands before register layout declaration

Move the FPGA commands (which can access registers, and sample memory)
declarations before the register layout declaration. Which then no
longer separates the registers declarations from their bit fields.
Update comments on the register set while we are here.

3 years agoasix-sigma: rephrase some of the FPGA command exchange
Gerhard Sittig [Sat, 9 May 2020 16:28:02 +0000 (18:28 +0200)]
asix-sigma: rephrase some of the FPGA command exchange

Eliminate a few magic numbers in FPGA commands, use symbolic identifiers
for automatic register address increments, and DRAM access bank selects.
Improve grouping of related declarations in the header file.

3 years agoasix-sigma: sync FPGA register names with documentation
Gerhard Sittig [Sat, 9 May 2020 15:16:13 +0000 (17:16 +0200)]
asix-sigma: sync FPGA register names with documentation

Rename source code identifiers for FPGA registers to closer match the
vendor's documentation.

3 years agoasix-sigma: eliminate magic numbers in FPGA configuration
Gerhard Sittig [Fri, 8 May 2020 14:54:28 +0000 (16:54 +0200)]
asix-sigma: eliminate magic numbers in FPGA configuration

Slightly rephrase and comment on the FPGA configuration of the ASIX
SIGMA logic analyzer. Use symbolic pin names to eliminate magic numbers.
Concentrate FPGA related comments in a single spot, tell the Xilinx FPGA
from FTDI cable (uses bitbang mode for slave serial configuration).

This fixes typos in the PROG pulse and INIT check (tests D5 and comments
on D6). Also removes the most probably undesired 100s timeout in the
worst case (100M us, 10K iterations times 10ms delay). Obsoletes labels
for error paths. Drops a few empty lines to keep related instruction
blocks together. Includes other style nits.

3 years agoasix-sigma: rework scan for USB devices, add support for conn= specs
Gerhard Sittig [Sun, 3 May 2020 15:02:17 +0000 (17:02 +0200)]
asix-sigma: rework scan for USB devices, add support for conn= specs

Stick with the FTDI library for data acquisition, and most of all for
firmware upload (bitbang is needed during FPGA configuration). Removing
this dependency is more complex, and needs to get addressed later.

Re-use common USB support during scan before open, which also allows to
select devices if several of them are connected. Either of "conn=vid.pid"
or "conn=bus.addr" formats are supported and were tested.

This implementation detects and displays SIGMA and SIGMA2 devices. Though
their function is identical, users may want to see the respective device
name. Optionally detect OMEGA devices, too (compile time option, off by
default), though they currently are not supported beyond detection. They
just show up during scans for ASIX logic analyzers, and users may want to
have them listed, too, for awareness.

This implementation also improves robustness when devices get disconnected
between scan and use. The open and close routines now always create the
FTDI contexts after the code has moved out of the scan phase, where common
USB support code is used.

This resolves bug #841.

3 years agoasix-sigma: nits in the list of firmware files
Gerhard Sittig [Sat, 2 May 2020 16:37:03 +0000 (18:37 +0200)]
asix-sigma: nits in the list of firmware files

Eliminate an unnecessary magic number for the maximum filename length of
SIGMA netlists. Use a more compact source code phrase to "unclutter" the
list of filenames and their features/purpose. Move the filesize limit to
the list of files to simplify future maintenance.

3 years agostrutil: introduce sr_atol_base() conversion helper (non-decimal)
Gerhard Sittig [Sun, 3 May 2020 14:38:13 +0000 (16:38 +0200)]
strutil: introduce sr_atol_base() conversion helper (non-decimal)

Introduce a text to number conversion routine which is more general than
sr_atol() is. It accepts non-decimal numbers, with optional caller given
or automatic base, including 0b for binary. It is not as strict and can
return the position after the number, so that callers can optionally
support suffix notations (units, or scale factors, or multiple separated
numbers in the same text string).

3 years agotests: extend endianess conversion tests to also cover inline routines
Gerhard Sittig [Wed, 27 May 2020 17:53:09 +0000 (19:53 +0200)]
tests: extend endianess conversion tests to also cover inline routines

Cover the recently introduced inline routines which back the preprocessor
macros for endianess conversion. Add test sequences for read and write
routines for different data types of different sizes, different endianess
formats and signedness, and include those routines which increment the
read/write position.

3 years agolibsigrok-internal.h: add 24bit little endian reader helper
Gerhard Sittig [Tue, 12 May 2020 21:16:05 +0000 (23:16 +0200)]
libsigrok-internal.h: add 24bit little endian reader helper

Add another endianess conversion helper which reads 24bit values in
little endian format.

3 years agolibsigrok-internal.h: rephrase endianess conversion helpers
Gerhard Sittig [Sat, 2 May 2020 16:31:48 +0000 (18:31 +0200)]
libsigrok-internal.h: rephrase endianess conversion helpers

Address style, robustness, and usability nits in the common endianess
conversion helpers in the libsigrok-internal.h header file. Rephrase
preprocessor macros as static inline C language functions to eliminate
side effects, and improve data type safety. Provide macros under the
previous names for backwards compatibility, so that call sites can
migrate to the routines at their discretion (or not at all).

Performance is not affected. Inline routines are identically accessible
to compiler optimizers as preprocessor macros with their text expansion
are. Resulting machine code should be the same.

Introduce variants which also increment the read or write position in
the byte stream after data transfer. This reduces more redundancy at
call sites.

3 years agotests: also cover endianess conversion helpers
Gerhard Sittig [Sun, 10 May 2020 20:37:29 +0000 (22:37 +0200)]
tests: also cover endianess conversion helpers

Introduce a new tests/conv.c source file which exercises the endianess
conversion macros. It's assumed that some use cases may break their
operation, fortunately these edge cases were not seen before, or the
unreliable operation went unnoticed. This test raises awareness of the
implementation's constraints.

This is a start, the test sequence will benefit from adding some more
cases to increase coverage.

3 years agohp-3478a: Fix glib variant ref count in SET MQ request.
Frank Stettner [Sun, 3 May 2020 09:55:05 +0000 (11:55 +0200)]
hp-3478a: Fix glib variant ref count in SET MQ request.

3 years agoscpi-dmm: Fix coding style.
Frank Stettner [Sun, 3 May 2020 08:57:35 +0000 (10:57 +0200)]
scpi-dmm: Fix coding style.

3 years agoserial-dmm: Added support for Metex ME-21 multimeters
Tobias Faeth [Tue, 26 May 2020 19:07:42 +0000 (21:07 +0200)]
serial-dmm: Added support for Metex ME-21 multimeters

3 years agoudev: Add FTDI FT4232 VID/PID.
Uwe Hermann [Sat, 2 May 2020 14:20:32 +0000 (16:20 +0200)]
udev: Add FTDI FT4232 VID/PID.

3 years agoftdi-la: Add FT4232H PID:VID.
Sergey Rzhevsky [Sun, 12 Apr 2020 20:52:38 +0000 (23:52 +0300)]
ftdi-la: Add FT4232H PID:VID.

3 years agorigol-ds: Added support for the DS1202Z-E
Richard [Fri, 17 Apr 2020 13:30:13 +0000 (13:30 +0000)]
rigol-ds: Added support for the DS1202Z-E

3 years agohameg-hmo: use common helper to setup description of an analog value
Gerhard Sittig [Wed, 18 Mar 2020 14:54:29 +0000 (15:54 +0100)]
hameg-hmo: use common helper to setup description of an analog value

Replace an open coded sequence of assignments to an aggregate of several
related structures. Prefer the common sr_analog_init() routine instead.

3 years agouni-t-ut32x: drop redundant close and free at end of scan
Gerhard Sittig [Sat, 14 Dec 2019 08:27:15 +0000 (09:27 +0100)]
uni-t-ut32x: drop redundant close and free at end of scan

The UT32x driver requires a user spec for the connection. The device
cannot get identified, that's why successful open/close for the port
will suffice. Lack of an input spec as well as failure in the early
scan phase will terminate the scan routine early.

When we reach the end of the scan which creates the device instance
and registers it with the list of found devices, the port already
is closed and the list of devices will never be empty. Remove the
redundant close call and the dead branch which frees the serial port.

3 years agoscpi-dmm: fix glib variant ref count in SET MQ request
Gerhard Sittig [Mon, 16 Dec 2019 10:26:56 +0000 (11:26 +0100)]
scpi-dmm: fix glib variant ref count in SET MQ request

3 years agoFix compiler warnings related to -Wcast-function-type.
Uwe Hermann [Sat, 2 May 2020 14:11:42 +0000 (16:11 +0200)]
Fix compiler warnings related to -Wcast-function-type.

This fixes bug #1297.

3 years agosiglent-sds: Fix various compiler warnings.
Uwe Hermann [Sat, 2 May 2020 13:39:26 +0000 (15:39 +0200)]
siglent-sds: Fix various compiler warnings.

  src/hardware/siglent-sds/protocol.c: In function 'siglent_sds_get_digital':
  src/hardware/siglent-sds/protocol.c:382:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          if (data_low_channels->len <= samples_index) {
                                     ^
  src/hardware/siglent-sds/protocol.c:391:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          if (data_high_channels->len <= samples_index) {
                                      ^
  src/hardware/siglent-sds/protocol.c:417:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (long index = 0; index < tmp_samplebuf->len; index++) {
                                  ^
  In file included from src/hardware/siglent-sds/protocol.c:37:0:
  src/hardware/siglent-sds/protocol.c: In function 'siglent_sds_receive':
  src/hardware/siglent-sds/protocol.h:28:20: warning: format '%li' expects argument of type 'long int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
   #define LOG_PREFIX "siglent-sds"
                      ^
  ./src/libsigrok-internal.h:815:41: note: in expansion of macro 'LOG_PREFIX'
   #define sr_dbg(...) sr_log(SR_LOG_DBG,  LOG_PREFIX ": " __VA_ARGS__)
                                           ^
  src/hardware/siglent-sds/protocol.c:564:6: note: in expansion of macro 'sr_dbg'
        sr_dbg("Requesting: %li bytes.", devc->num_samples - devc->num_block_bytes);
        ^
  src/hardware/siglent-sds/protocol.c: In function 'siglent_sds_get_dev_cfg_horizontal':
  src/hardware/siglent-sds/protocol.h:28:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
   #define LOG_PREFIX "siglent-sds"
                      ^
  ./src/libsigrok-internal.h:815:41: note: in expansion of macro 'LOG_PREFIX'
   #define sr_dbg(...) sr_log(SR_LOG_DBG,  LOG_PREFIX ": " __VA_ARGS__)
                                           ^
  src/hardware/siglent-sds/protocol.c:933:2: note: in expansion of macro 'sr_dbg'
    sr_dbg("Current memory depth: %lu.", devc->memory_depth_analog);
    ^

4 years agobt/bt_bluez: Implement retry if rfcomm sockets are busy
Andreas Sandberg [Mon, 24 Feb 2020 22:46:35 +0000 (22:46 +0000)]
bt/bt_bluez: Implement retry if rfcomm sockets are busy

There are cases where the connect() call returns EBUSY when trying to
connect to a device. This has been observed when sampling an RDTech
UM24C. In this case, scanning the device works fine. However, when
sampling the device, Sigrok first scans the device, then closes the
connection and re-opens it to sample the device. If the close/open
calls happen in close successions, the Bluetooth stack sometimes
returns EBUSY.

Work around this issue by retrying if the connect() returns EBUSY.

Signed-off-by: Andreas Sandberg <redacted>
4 years agomodbus: Close device after scan
v1ne [Wed, 8 Apr 2020 15:05:16 +0000 (17:05 +0200)]
modbus: Close device after scan

Since the device should be closed after the scan, close it in sr_modbus_scan.
Alternatively, every single driver could close the device after calling
sr_modbus_scan. This causes duplicated code, is prone to forgetting it and it
wasn't the calling driver who opened the device in the first place.

This change unbreaks maynuo-m97 and rdtech-dps.

4 years agoscpi-pps: fixed out-of-bounds array access...
Florian Schmidt [Wed, 8 Apr 2020 10:24:48 +0000 (12:24 +0200)]
scpi-pps: fixed out-of-bounds array access...

when accessing devc->device->channels in config_list().
this array has to be accessed via the "hw_output_idx"

This fixes bug #1533.

4 years agocenter-3xx: Fix incorrect values due to endianness issue.
Uwe Hermann [Thu, 9 Apr 2020 21:51:16 +0000 (23:51 +0200)]
center-3xx: Fix incorrect values due to endianness issue.

Replace RL16S with RB16S, the values are big-endian.

This is related to the recently-fixed bug #1463.

4 years agoUse std_session_send_df_frame_begin()/_end() where possible.
Uwe Hermann [Wed, 8 Apr 2020 21:49:38 +0000 (23:49 +0200)]
Use std_session_send_df_frame_begin()/_end() where possible.

4 years agostd: Rename std_session_send_frame_begin/_end().
Uwe Hermann [Wed, 8 Apr 2020 21:35:44 +0000 (23:35 +0200)]
std: Rename std_session_send_frame_begin/_end().

4 years agoUse std_session_send_df_trigger() where possible.
Uwe Hermann [Wed, 8 Apr 2020 21:21:39 +0000 (23:21 +0200)]
Use std_session_send_df_trigger() where possible.

4 years agostd: Factor out send_df_without_payload() helper.
Uwe Hermann [Wed, 8 Apr 2020 21:11:15 +0000 (23:11 +0200)]
std: Factor out send_df_without_payload() helper.

4 years agostd: Add std_session_send_df_trigger().
Uwe Hermann [Wed, 8 Apr 2020 21:02:04 +0000 (23:02 +0200)]
std: Add std_session_send_df_trigger().

4 years agozeroplus-logic-cube: Fix an issue when changing triggers.
Uwe Hermann [Wed, 8 Apr 2020 20:46:23 +0000 (22:46 +0200)]
zeroplus-logic-cube: Fix an issue when changing triggers.

Changing triggers (e.g. from low to high) would sometimes cause the
acquisition to seemingly "hang" due to missing variable initializations
(in reality the device would wait for incorrect triggers and/or on
incorrect channels).

This fixes bug #1535.

4 years agozeroplus-logic-cube: Enable edge-triggering capabilities.
Jan Metzger [Fri, 14 Feb 2020 07:38:27 +0000 (08:38 +0100)]
zeroplus-logic-cube: Enable edge-triggering capabilities.

This fixes bug #1334.

4 years agokorad-kaxxxxp: Add support for RND KA3005P V5.5 power supply
Christian Fruth [Sun, 5 Apr 2020 09:26:35 +0000 (11:26 +0200)]
korad-kaxxxxp: Add support for RND KA3005P V5.5 power supply

4 years agokorad-kaxxxxp: Add support for TENMA 72-2540 V5.2 power supply
Peter van der Perk [Mon, 6 Apr 2020 12:14:06 +0000 (14:14 +0200)]
korad-kaxxxxp: Add support for TENMA 72-2540 V5.2 power supply

4 years agoudev: Add TIAO USB Multi Protocol Adapter (TUMPA) VID/PID.
Uwe Hermann [Mon, 6 Apr 2020 22:53:46 +0000 (00:53 +0200)]
udev: Add TIAO USB Multi Protocol Adapter (TUMPA) VID/PID.

4 years agoftdi-la: add TUMPA VID:PID and JTAG pin names
Tom Matthews [Mon, 30 Mar 2020 17:32:12 +0000 (18:32 +0100)]
ftdi-la: add TUMPA VID:PID and JTAG pin names

4 years agordtech-dps: Make it work in SmuView
v1ne [Fri, 3 Apr 2020 01:51:09 +0000 (03:51 +0200)]
rdtech-dps: Make it work in SmuView

Without the mutex, concurrent reception from the ModBus port leads to CRC
errors.

4 years agocenter-3xx: use common signed LE16 conversion for temperature value
Gerhard Sittig [Mon, 23 Dec 2019 16:00:13 +0000 (17:00 +0100)]
center-3xx: use common signed LE16 conversion for temperature value

Prefer the common conversion helper for little endian 16bit signed data.
The previous local implementation only worked for positive values, and
yielded incorrect results for negative temperatures.

This fixes bug #1463.

4 years agoserial-dmm/uni-t-dmm: Add UNI-T UT804 DMM definitions
Elen Eisendle [Sat, 8 Feb 2020 20:24:23 +0000 (21:24 +0100)]
serial-dmm/uni-t-dmm: Add UNI-T UT804 DMM definitions

4 years agoinput/trace32_ad: Fix pod_data uninitialised warning
Andreas Sandberg [Mon, 24 Feb 2020 23:03:25 +0000 (23:03 +0000)]
input/trace32_ad: Fix pod_data uninitialised warning

Signed-off-by: Andreas Sandberg <redacted>
4 years agogwinstek-gpd: Fix use of uninitialized variable
Andreas Sandberg [Wed, 25 Mar 2020 09:16:31 +0000 (09:16 +0000)]
gwinstek-gpd: Fix use of uninitialized variable

Signed-off-by: Andreas Sandberg <redacted>
4 years agobindings/cxx: Include missing header file
Juan M. Bello-Rivas [Mon, 30 Mar 2020 02:27:24 +0000 (19:27 -0700)]
bindings/cxx: Include missing header file

Including the `functional` header is necessary in order to use `std::function` in the definition of `LogCallbackFunction` when compiling with gcc 7.3.0.

4 years agobindings/ruby: Disable Ruby bindings until we have a fix for #1526.
Uwe Hermann [Sat, 4 Apr 2020 20:14:48 +0000 (22:14 +0200)]
bindings/ruby: Disable Ruby bindings until we have a fix for #1526.

The Ruby bindings currently don't build (at least with Ruby 2.7
and/or SWIG 4.x). Disable them as a temporary workaround until we
have a more permanent fix.

4 years agoconfigure.ac: Also check for "swig4.0".
Uwe Hermann [Sat, 4 Apr 2020 20:00:17 +0000 (22:00 +0200)]
configure.ac: Also check for "swig4.0".

4 years agobindings/java: Fix build issue with SWIG 4.x.
Uwe Hermann [Sat, 4 Apr 2020 19:54:13 +0000 (21:54 +0200)]
bindings/java: Fix build issue with SWIG 4.x.

Tested with SWIG 3.x and SWIG 4.x.

This fixes bug #1527.

4 years agoDoxygen: Fix various warnings.
Uwe Hermann [Wed, 25 Mar 2020 19:11:06 +0000 (20:11 +0100)]
Doxygen: Fix various warnings.

  src/resource.c:414: warning: unbalanced grouping commands

  conversion.c:81: warning: argument 'lo_thr' from the argument list of sr_a2l_schmitt_trigger has multiple @param documentation sections

  src/analog.c:611: warning: return value 'SR_ERR_ARG' of sr_rational_div has multiple documentation sections

  src/device.c:205: warning: explicit link request to 'TRUE' could not be resolved
  src/device.c:205: warning: explicit link request to 'FALSE' could not be resolved
  src/device.c:231: warning: explicit link request to 'TRUE' could not be resolved
  src/device.c:231: warning: explicit link request to 'FALSE' could not be resolved

  src/serial.c:246: warning: explicit link request to 'NULL' could not be resolved

  src/strutil.c:602: warning: explicit link request to 'NULL' could not be resolved

  src/device.c:94: warning: unable to resolve reference to 'sr_channel_free()' for \ref command

  src/strutil.c:597: warning: unable to resolve reference to 'sr_hexdump_free()' for \ref command
  src/strutil.c:622: warning: unable to resolve reference to 'sr_hexdump_new()' for \ref command

  src/device.c:430: warning: The following parameters of sr_dev_inst_channel_add(struct sr_dev_inst *sdi, int index, int type, const char *name) are not documented: parameter 'sdi'

  src/session.c:163: warning: The following parameters of fd_source_new(struct sr_session *session, void *key, gintptr fd, int events, int timeout_ms) are not documented: parameter 'events'

4 years agoDoxygen: Properly mark a few symbols as private.
Uwe Hermann [Tue, 24 Mar 2020 19:09:02 +0000 (20:09 +0100)]
Doxygen: Properly mark a few symbols as private.

(otherwise these end up in the API docs)

Remove all @internal markings, only use @private where needed.

4 years agobindings/python/Doxyfile: Set OPTIMIZE_OUTPUT_JAVA to NO.
Uwe Hermann [Tue, 24 Mar 2020 21:38:21 +0000 (22:38 +0100)]
bindings/python/Doxyfile: Set OPTIMIZE_OUTPUT_JAVA to NO.

4 years agoDoxyfile_internal: Fix various settings and paths.
Uwe Hermann [Tue, 24 Mar 2020 18:42:29 +0000 (19:42 +0100)]
Doxyfile_internal: Fix various settings and paths.

4 years agoDoxyfile: Predefine HAVE_SERIAL_COMM for serial docs.
Uwe Hermann [Wed, 25 Mar 2020 18:37:23 +0000 (19:37 +0100)]
Doxyfile: Predefine HAVE_SERIAL_COMM for serial docs.

Without this, src/serial.c API docs won't be generated.

4 years agoDoxyfile: Fix/update path and file references.
Uwe Hermann [Tue, 24 Mar 2020 18:31:26 +0000 (19:31 +0100)]
Doxyfile: Fix/update path and file references.

4 years agoDoxyfile: Bring back the workaround for bug #1422.
Uwe Hermann [Tue, 24 Mar 2020 19:17:31 +0000 (20:17 +0100)]
Doxyfile: Bring back the workaround for bug #1422.