From: Gareth McMullin Date: Thu, 1 Dec 2011 17:44:42 +0000 (+1300) Subject: srd: Changed nunchuk and transitioncounter to new registraion api. X-Git-Tag: libsigrokdecode-0.1.0~249 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2b7d0e2bf5147025e9d76d14e266b9905503b957;p=libsigrokdecode.git srd: Changed nunchuk and transitioncounter to new registraion api. --- diff --git a/decoders/nunchuk.py b/decoders/nunchuk.py index 128b10e..e53d0de 100644 --- a/decoders/nunchuk.py +++ b/decoders/nunchuk.py @@ -65,6 +65,7 @@ def sampleiter(data, unitsize): yield(Sample(data[i:i+unitsize])) class Decoder(): + id = 'nunchuk' name = 'Nunchuk' longname = 'Nintendo Wii Nunchuk decoder' desc = 'Decodes the Nintendo Wii Nunchuk I2C-based protocol.' @@ -183,3 +184,5 @@ class Decoder(): import sigrok +sigrok.register(Decoder) + diff --git a/decoders/spi.py b/decoders/spi.py index d9891b3..9c0be9a 100644 --- a/decoders/spi.py +++ b/decoders/spi.py @@ -33,9 +33,9 @@ def sampleiter(data, unitsize): class Decoder(): id = 'spi' - name = 'SPI Decoder' + name = 'SPI' desc = '...desc...' - longname = '...longname...' + longname = 'Serial Peripheral Interface (SPI) bus' longdesc = '...longdesc...' author = 'Gareth McMullin' email = 'gareth@blacksphere.co.nz' diff --git a/decoders/transitioncounter.py b/decoders/transitioncounter.py index 2ad3f52..3946d4b 100644 --- a/decoders/transitioncounter.py +++ b/decoders/transitioncounter.py @@ -30,6 +30,7 @@ def sampleiter(data, unitsize): yield(Sample(data[i:i+unitsize])) class Decoder(): + id = 'transitioncounter' name = 'Transition counter' longname = '...' desc = 'Counts rising/falling edges in the signal.' @@ -109,3 +110,5 @@ class Decoder(): import sigrok +sigrok.register(Decoder) +