Age | Commit message (Collapse) | Author |
|
The SRD_CONF_NUM_PROBES metadata key was removed. It wasn't actually
used for anything, since this is trivially available via the configured
(or default) probe list.
The SRD_CONF_UNITSIZE key was removed. The unit size is instead derived
from the probe list: the number of probes packed into the least amount
of space possible defines the unit size.
PD changes:
* The start() method no longer takes a 'metadata' parameter.
* Metadata now comes in only via the metadata() method, which takes
a key and value. The only key defined so far is SRD_CONF_SAMPLERATE,
which is exported into the module namespace.
API changes:
* srd_session_send() now takes an end_samplenum parameter, and had its
options rearranged.
* srd_session_config_set() is now srd_session_metadata_set(). This keeps
"config" options for a future feature to allow PDs or frontends to
configure each other's options on the fly, up and down the stack.
|
|
|
|
This also fixes some unit tests that were previously failing.
|
|
Some of these also fix unit tests that were previously failing.
|
|
|
|
|
|
|
|
|
|
The struct srd_session also holds configuration parameters formerly
passed to srd_session_start().
The new call srd_session_new() takes a pointer where a newly allocated
pointer to struct srd_session will be stored. This pointer must be
passed as the first argument to all functions that require it.
The SRD_CONF_NUM_PROBES, SRD_CONF_UNITSIZE and SRD_CONF_SAMPLERATE
keys must be configured with srd_config_set() before srd_session_start()
is called.
A new call srd_session_destroy() is also available. This cleans up all
resources the session holds. This is also called from srd_exit() for
all sessions.
|
|
|
|
|
|
|
|
|
|
|
|
This matches the convention used in libsigrok. Potential other headers
might end up in libsigrokdecode/, but only libsigrokdecode.h is meant
to be #included by frontends directly.
|
|
Also, document the functions in version.c.
|
|
|
|
Decoder options are now exposed in struct srd_decoder, via a GSList
of the new struct srd_decoder_option. The 'def' field represents
the default value as set in the decoder, converted to GVariant. This
allows a library user to determine the type as well as default value.
|
|
|
|
|
|
|
|
|
|
|
|
The upcoming libsigrokdecode release should not contain any API changes
so it is compatible with existing released frontends (sigrok-cli 0.3.1).
|
|
|
|
|
|
In the protocol decoder you always get all required probes, then _all_
optional probes in the list of probes in the decode() call.
Example:
(r1, r2, r3, o1, o2, o3, o4) = pins
In this case r1-r3 are required probes, o1-o4 are optional probes.
However, the value of valid/used/specified probes will be 0 or 1,
whereas the value of probes that were not specified/assigned by the user
will be (at the moment) 42.
The PD can check for a valid probe like this:
if p in (0, 1):
...
Or check for an invalid probe:
if (p > 1):
...
The value of 42 could change to be -1 or None later.
|
|
|
|
Make it consistent with the rest of the code
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
|
|
|
|
|
|
|
|
This will ensure that any subsequent checks for pd_list == NULL work
properly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Callback function pointer typedefs end with _t.
- Variables holding callback functions are named 'cb' everywhere.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also environment variable SIGROKDECODE_DIR, if present, is prepended
to the module path.
|
|
This is better, both for consistency reasons, and also because 'data' is
a bit too generic and might be confusing, especially since we have other
'data' fields in the code in various places.
|
|
This is required in various situations and for various lib users,
especially so GUIs which might want to pass specific info via this
mechanism.
|
|
|