summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-01-11 00:52:54 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2012-01-12 01:47:51 +0100
commit56202222ed83ff030239bb23be8296574674c4f7 (patch)
tree952f2f85abdf674933f84c4e7c2bc5b1ed18ef8c
parentd0e93c76e381eff58ca23949301f781b24ba4a8b (diff)
downloadlibsigrokdecode-56202222ed83ff030239bb23be8296574674c4f7.tar.gz
libsigrokdecode-56202222ed83ff030239bb23be8296574674c4f7.zip
srd: Drop duplicate SRD_ prefix from ANN/PROTO.
Using srd.SRD_OUTPUT_ANN is unneeded, srd.OUTPUT_ANN is better/shorter.
-rw-r--r--decoders/ddc.py2
-rw-r--r--decoders/i2c.py4
-rw-r--r--decoders/mx25lxx05d.py4
-rw-r--r--decoders/nunchuk.py4
-rw-r--r--decoders/pan1321.py4
-rw-r--r--decoders/spi.py4
-rw-r--r--decoders/srd_usb.py4
-rw-r--r--decoders/transitioncounter.py4
-rw-r--r--decoders/uart.py4
-rw-r--r--module_sigrokdecode.c6
10 files changed, 20 insertions, 20 deletions
diff --git a/decoders/ddc.py b/decoders/ddc.py
index a628565..36d5c4a 100644
--- a/decoders/ddc.py
+++ b/decoders/ddc.py
@@ -45,7 +45,7 @@ class Decoder(srd.Decoder):
self.state = None
def start(self, metadata):
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'ddc')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'ddc')
def decode(self, start_sample, end_sample, i2c_data):
try:
diff --git a/decoders/i2c.py b/decoders/i2c.py
index b8c56f7..11ee9b5 100644
--- a/decoders/i2c.py
+++ b/decoders/i2c.py
@@ -160,8 +160,8 @@ class Decoder(srd.Decoder):
self.oldsda = None
def start(self, metadata):
- self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'i2c')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'i2c')
+ self.out_proto = self.add(srd.OUTPUT_PROTO, 'i2c')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'i2c')
def report(self):
pass
diff --git a/decoders/mx25lxx05d.py b/decoders/mx25lxx05d.py
index 4a87fa4..3f0dc18 100644
--- a/decoders/mx25lxx05d.py
+++ b/decoders/mx25lxx05d.py
@@ -177,8 +177,8 @@ class Decoder(srd.Decoder):
self.out = []
def start(self, metadata):
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'mx25lxx05d')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'mx25lxx05d')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'mx25lxx05d')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'mx25lxx05d')
def report(self):
pass
diff --git a/decoders/nunchuk.py b/decoders/nunchuk.py
index 86ec171..63fadc2 100644
--- a/decoders/nunchuk.py
+++ b/decoders/nunchuk.py
@@ -84,8 +84,8 @@ class Decoder(srd.Decoder):
self.databytecount = 0
def start(self, metadata):
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'nunchuk')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'nunchuk')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'nunchuk')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'nunchuk')
def report(self):
pass
diff --git a/decoders/pan1321.py b/decoders/pan1321.py
index 2d86679..3174ffe 100644
--- a/decoders/pan1321.py
+++ b/decoders/pan1321.py
@@ -54,8 +54,8 @@ class Decoder(srd.Decoder):
self.cmd = ''
def start(self, metadata):
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'pan1321')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'pan1321')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'pan1321')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'pan1321')
def report(self):
pass
diff --git a/decoders/spi.py b/decoders/spi.py
index 9d3940e..3262aa4 100644
--- a/decoders/spi.py
+++ b/decoders/spi.py
@@ -44,8 +44,8 @@ class Decoder(srd.Decoder):
self.bytesreceived = 0
def start(self, metadata):
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'spi')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'spi')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'spi')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'spi')
def report(self):
return 'SPI: %d bytes received' % self.bytesreceived
diff --git a/decoders/srd_usb.py b/decoders/srd_usb.py
index c6e6627..f7afa65 100644
--- a/decoders/srd_usb.py
+++ b/decoders/srd_usb.py
@@ -122,8 +122,8 @@ class Decoder(srd.Decoder):
def start(self, metadata):
self.rate = metadata['samplerate']
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'usb')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'usb')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'usb')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'usb')
if self.rate < 48000000:
raise Exception("Sample rate not sufficient for USB decoding")
# Initialise decoder state.
diff --git a/decoders/transitioncounter.py b/decoders/transitioncounter.py
index 6092258..5b12927 100644
--- a/decoders/transitioncounter.py
+++ b/decoders/transitioncounter.py
@@ -40,8 +40,8 @@ class Decoder(srd.Decoder):
self.lastsample = None
def start(self, metadata):
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'transitioncounter')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'transitioncounter')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'transitioncounter')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'transitioncounter')
def report(self):
pass
diff --git a/decoders/uart.py b/decoders/uart.py
index 4546521..24b5ba3 100644
--- a/decoders/uart.py
+++ b/decoders/uart.py
@@ -255,8 +255,8 @@ class Decoder(srd.Decoder):
def start(self, metadata):
self.samplerate = metadata['samplerate']
- self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'uart')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'uart')
+ self.out_proto = self.add(srd.OUTPUT_PROTO, 'uart')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'uart')
# TODO
### self.baudrate = metadata['baudrate']
diff --git a/module_sigrokdecode.c b/module_sigrokdecode.c
index d2ffb07..426cf49 100644
--- a/module_sigrokdecode.c
+++ b/module_sigrokdecode.c
@@ -230,13 +230,13 @@ PyMODINIT_FUNC PyInit_sigrokdecode(void)
return NULL;
/* expose output types as symbols in the sigrokdecode module */
- if(PyModule_AddObject(mod, "SRD_OUTPUT_ANN",
+ if(PyModule_AddObject(mod, "OUTPUT_ANN",
PyLong_FromLong(SRD_OUTPUT_ANN)) == -1)
return NULL;
- if(PyModule_AddObject(mod, "SRD_OUTPUT_PROTO",
+ if(PyModule_AddObject(mod, "OUTPUT_PROTO",
PyLong_FromLong(SRD_OUTPUT_PROTO)) == -1)
return NULL;
- if(PyModule_AddObject(mod, "SRD_OUTPUT_BINARY",
+ if(PyModule_AddObject(mod, "OUTPUT_BINARY",
PyLong_FromLong(SRD_OUTPUT_BINARY)) == -1)
return NULL;