Age | Commit message (Collapse) | Author |
|
None of the PDs use this.
|
|
|
|
|
|
|
|
|
|
|
|
Use the "if not self.samplerate" form, which catches both the case
where self.samplerate is None, as well as the case where it is 0.
This is also consistent with all the other PDs.
|
|
For consistency with other decoders, convert all the double quotes around
strings to single quotes.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
|
|
This fixes bug #461.
|
|
|
|
PID decoding is normally done in the packet layer, but the signalling
layer has to switch behaviour on detection of an PREamble PID.
|
|
|
|
|
|
If the oldsym is not set to 'J' before entering IDLE state, the SOP
detection will never trigger
|
|
If a packet had any errors, the usb_signalling PD will not send an EOP
but an ERR message. Wait for the next SOP in both cases.
|
|
If a device or host did not receive a handshake 18 bit times after the
EOP, there was a transmission error and the host may repeat the
transmission
|
|
In automatic mode, the bus is assumed to be in IDLE state. After a
RESET, the bus state is checked again.
|
|
Resets are at least 10ms at the root hub downstream facing port and
2.5us at the device (root hub reset may be shortened by itermediate
hubs).
Keep-alive is a low-speed only signalling condition, as low-speed has no
SOFs to inhibit devices to enter suspend
|
|
Instead of centering the block around the sampleposition, which shows
some visual glitches due to rounding, use the edge positions already
known. Remove unused halfbit symbol.
|
|
Only SE0 and J are valid symbols during EOP
|
|
Do not call get_eop() from get_bit(), but directly issue the symbol. As
get_eop() is only called during the GET EOP state, the SE0 is implicit and
there is no need to save it into the syms array.
|
|
|
|
More than six consecutive 1's are an error
|
|
No need to replicate the symbol formatting in several places
|
|
|
|
|
|
|
|
|
|
Decode and packetize the Biphase Mark Coding (aka differential Manchester)
as used in the Universal Serial Bus Power Delivery Specification Revision 2.0
v1.1, then decode the packet content.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
|
|
(this PD is indeed stacked on top of SPI)
|
|
|
|
This issue was discovered via the newly added unit tests.
|
|
|
|
1. Show Frame Error on the Start bit
2. Don't overwrite framing errors with (valid) start/stop bit info
|
|
|
|
This is needed for e.g. g_slist_free_full(), which incidentally
has been in use for a while already.
|
|
Create a utility function for loading a Python module by its name
in UTF-8.
|
|
|
|
Limit usage of the Python C API to the stable ABI subset as defined
by PEP 384. This removes some type definitions and functions which
libsigrokdecode made use of. Convert all affected code to suitable
API alternatives. Also fix a few leaks that became apparent while
working on the code.
The most visible change is that PyTypeObject is now an opaque type.
Thus, the custom Decoder and srd_logic types are now created on the
heap via an alternative API. Unfortunately, since tp_name is now
inaccessible, type names had to be removed from the log output.
Stack traces after Python exceptions are now formatted by calling
into Python, since the trace object C API is no longer available.
|
|
The new decoder stacks on top of the usb_packet PD. It adds one new
annotation row, and is able to save the decoded data as PCAP trace.
It has been successfully tested against all traces in sigrok-dumps and
some more traces.
|
|
|
|
|
|
USB low/full speed allows for frequency tolerance of 1.5%/0.25%. At
maximum packet size (sync + PID + data + CRC16) of 12 bytes/1027 bytes
this amounts to 1.4 bits/20 bits, so the decoder has to lock to the
actual symbol frequency to avoid any symbol misdetections.
The signal is sampled twice, once at the symbol center and once at
the expected edge position. Comparing the symbol at both positions gives
an indication if the current bit width is too low or too high. Adjust
accordingly.
|
|
In case CRC validation fails, an crc5-err/crc16-err annotation is issued,
instead of crc5-ok/crc16-ok, and the error is noted in the annotation
text.
|
|
There is a small typo in the rfm12 protocol decoder that I just noticed:
|
|
Rely on the compiler include path instead.
|
|
Avoid confusion resulting from using the same macro name for
different purposes.
|
|
|
|
|
|
Don't mess with colon-separated search path strings -- instead,
simply prepend items to the sys.path list object. Also keep the
internal decoder path list in the same order as the items added
to sys.path.
|