Age | Commit message (Collapse) | Author |
|
|
|
Add support to terminate blocking .wait() and .decode() method calls of
v3 decoder instances. This terminates the decoder thread's main routine
and allows to release associated resources. Cope with requested as well
as unexpected termination of decode() calls. Add debug messages to
thread related code paths.
Make sure to unblock the main thread which feeds the decoder thread.
This unbreaks situations where decoders e.g. throw "need samplerate to
decode" exceptions.
Drain Python errors which might remain from the most recent .decode()
execution, to not affect other code paths. This avoids an issue where
the creation of a new decoder instance fails in the presence of errors
from a previous run.
This fixes bug #902.
|
|
|
|
|
|
This is currently just a cosmetic change, but will make the conversion
to the PDv3 API slightly easier and more readable.
|
|
Some PDs were using a temporary workaround for (as it turned out) a
refcounting issue that was fixed in 066fbafdc3ba734a73b5f7fcfa1dbae67ddebf8a.
|
|
In 'except_out' the fail_txt variable is always non-NULL.
|
|
The ownership of the tuple reference is transferred to the caller, so
the refcount should not be increased.
|
|
PyList_SetItem steals a reference, so code calling that must either
transfer ownership or increase the refcount.
|
|
|
|
|
|
|
|
This validates the requirements that
* abs_start_samplenum continues where the previous decode ended
* abs_end_samplenum is not lower than abs_start_samplenum
Failure to meet these requirements will make v3 decoders crash.
|
|
py_conditionlist is an owned reference (it gets passed to Py_DecRef()
at the end), so we need to increment the refcount when assigning it
from the borrowed reference py_conds.
|
|
The Decoder_wait() routine will populate the .matched attribute before
returning to the caller. The srd_inst_start() routine used to setup a
.matches attribute which is unexpected. Make both routines consistently
assign to 'matched' as that is what Python decoder implementations are
referencing.
|
|
|
|
|
|
../instance.c: In function ‘srd_inst_find_by_id’:
../instance.c:485:3: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (di = srd_inst_find_by_id_stack(inst_id, tmp))
^~
|
|
srd_inst_find_by_id() previously only searched for instance IDs at the
bottom of any stacked decoders. Make it properly search all stacks,
just like srd_inst_find_by_obj() and more usefully when trying to
generate unique instance IDs.
No external API change, only the explicit behaviour of the API.
This fixes parts of bug #868.
Signed-off-by: Karl Palsson <karlp@etactica.com>
|
|
srd_inst_new() used the decoder ID as the instance ID, preventing the use
of multiple instances of the same decoder in the same session. Simply
append a numerical suffix to later instances to allow more.
Required changes to cleanup to reliably free all memory. Valgrind checked.
This fixes parts of bug #868.
Based on original work by: Soeren Apel <soeren@apelpie.net>
Signed-off-by: Karl Palsson <karlp@etactica.com>
|
|
|
|
This implementation technically uses v3 API calls, but has yet to come
up with appropriate wait() conditions, to spend less time in the decoder
and have more tedious work done in the backend.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove the FSF postal address as it might change (it did in the past).
Reference the gnu.org website instead which is more stable.
|
|
|
|
|
|
Switch to the v3 decoder API: The decode() methods takes no arguments,
instead it calls wait() and has common code find edges on input signals.
|
|
Introduce a decoder for Atmel's proprietary programming and debugging
interface which got introduced with ATxmega chips. This implementation
supports the UART style physical (two wires PDI_CLK and PDI_DATA).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|