summaryrefslogtreecommitdiff
path: root/decoders/spi
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-08-10 09:22:29 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2014-08-14 17:44:20 +0200
commitf04964c696336f5699a099bbd64785f199d91f4c (patch)
tree78c63f1f0c5c4ac6d2e0b022bc9d463a43f40300 /decoders/spi
parent8aeedf9ee376f1b48fe9c42924ebf34f9c8c2ddd (diff)
downloadlibsigrokdecode-f04964c696336f5699a099bbd64785f199d91f4c.tar.gz
libsigrokdecode-f04964c696336f5699a099bbd64785f199d91f4c.zip
spi/nrf24l01/uart: Use ChannelError exception.
Rename the old MissingDataError to the clearer ChannelError. Also, add ChannelError in the UART decoder.
Diffstat (limited to 'decoders/spi')
-rw-r--r--decoders/spi/pd.py4
-rw-r--r--decoders/spi/test/test.conf4
2 files changed, 4 insertions, 4 deletions
diff --git a/decoders/spi/pd.py b/decoders/spi/pd.py
index 374d22b..97d5571 100644
--- a/decoders/spi/pd.py
+++ b/decoders/spi/pd.py
@@ -63,7 +63,7 @@ spi_mode = {
class SamplerateError(Exception):
pass
-class MissingDataError(Exception):
+class ChannelError(Exception):
pass
class Decoder(srd.Decoder):
@@ -279,6 +279,6 @@ class Decoder(srd.Decoder):
# Either MISO or MOSI (but not both) can be omitted.
if not (self.have_miso or self.have_mosi):
- raise MissingDataError('Either MISO or MOSI (or both) pins required.')
+ raise ChannelError('Either MISO or MOSI (or both) pins required.')
self.find_clk_edge(miso, mosi, clk, cs)
diff --git a/decoders/spi/test/test.conf b/decoders/spi/test/test.conf
index 53edfeb..a74611d 100644
--- a/decoders/spi/test/test.conf
+++ b/decoders/spi/test/test.conf
@@ -36,8 +36,8 @@ test exception_samplerate
input misc/no-samplerate.sr
output spi exception match SamplerateError
-test exception_missing_datapins
+test exception_channel
protocol-decoder spi channel cs=1 channel clk=0
input spi/spi-count-msb.sr
- output spi exception match MissingDataError
+ output spi exception match ChannelError