summaryrefslogtreecommitdiff
path: root/decoders/i2s
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-05-10 09:34:13 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2012-05-10 09:34:13 +0200
commitdd93276bf6b7537b65cab270f66666bf23fbc585 (patch)
treed0aa8d6b59fcb742e07d293833bac3e3fd822320 /decoders/i2s
parent29590b14fc508a0b951ea0b87e98f7741808bab0 (diff)
downloadlibsigrokdecode-dd93276bf6b7537b65cab270f66666bf23fbc585.tar.gz
libsigrokdecode-dd93276bf6b7537b65cab270f66666bf23fbc585.zip
srd: Support for one or more optional probes.
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.
Diffstat (limited to 'decoders/i2s')
0 files changed, 0 insertions, 0 deletions