From: Uwe Hermann Date: Tue, 11 Mar 2014 23:51:06 +0000 (+0100) Subject: Various PDs: Minor option related fixes. X-Git-Tag: libsigrokdecode-0.3.0~48 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b0918d40e285e7782f4e86356c41648dc748e477;p=libsigrokdecode.git Various PDs: Minor option related fixes. --- diff --git a/decoders/can/pd.py b/decoders/can/pd.py index 51b7a72..af8168c 100644 --- a/decoders/can/pd.py +++ b/decoders/can/pd.py @@ -33,8 +33,8 @@ class Decoder(srd.Decoder): {'id': 'can_rx', 'name': 'CAN RX', 'desc': 'CAN bus line'}, ) options = ( - {'id': 'bitrate', 'desc': 'Bitrate', 'default': 1000000}, # 1Mbit/s - {'id': 'sample_point', 'desc': 'Sample point', 'default': 70.0}, # 70% + {'id': 'bitrate', 'desc': 'Bitrate (bits/s)', 'default': 1000000}, + {'id': 'sample_point', 'desc': 'Sample point (%)', 'default': 70.0}, ) annotations = ( ('data', 'CAN payload data'), diff --git a/decoders/lm75/pd.py b/decoders/lm75/pd.py index bdd8cb0..449916a 100644 --- a/decoders/lm75/pd.py +++ b/decoders/lm75/pd.py @@ -49,8 +49,9 @@ class Decoder(srd.Decoder): inputs = ['i2c'] outputs = ['lm75'] options = ( - {'id': 'sensor', 'desc': 'Sensor type', 'default': 'lm75'}, - {'id': 'resolution', 'desc': 'Resolution', 'default': 9, + {'id': 'sensor', 'desc': 'Sensor type', 'default': 'lm75', + 'values': ('lm75',)}, + {'id': 'resolution', 'desc': 'Resolution (bits)', 'default': 9, 'values': (9, 10, 11, 12)}, ) annotations = ( diff --git a/decoders/onewire_link/pd.py b/decoders/onewire_link/pd.py index d603dba..ceb5da2 100644 --- a/decoders/onewire_link/pd.py +++ b/decoders/onewire_link/pd.py @@ -37,33 +37,24 @@ class Decoder(srd.Decoder): ) options = ( {'id': 'overdrive', - 'desc': 'Overdrive mode', - 'default': 'no'}, + 'desc': 'Overdrive mode', 'default': 'no', 'values': ('yes', 'no')}, # Time options (specified in microseconds): {'id': 'cnt_normal_bit', - 'desc': 'Normal mode sample bit time (μs)', - 'default': 15}, + 'desc': 'Normal mode sample bit time (μs)', 'default': 15}, {'id': 'cnt_normal_slot', - 'desc': 'Normal mode data slot time (μs)', - 'default': 60}, + 'desc': 'Normal mode data slot time (μs)', 'default': 60}, {'id': 'cnt_normal_presence', - 'desc': 'Normal mode sample presence time (μs)', - 'default': 75}, + 'desc': 'Normal mode sample presence time (μs)', 'default': 75}, {'id': 'cnt_normal_reset', - 'desc': 'Normal mode reset time (μs)', - 'default': 480}, + 'desc': 'Normal mode reset time (μs)', 'default': 480}, {'id': 'cnt_overdrive_bit', - 'desc': 'Overdrive mode sample bit time (μs)', - 'default': 2}, + 'desc': 'Overdrive mode sample bit time (μs)', 'default': 2}, {'id': 'cnt_overdrive_slot', - 'desc': 'Overdrive mode data slot time (μs)', - 'default': 7.3}, + 'desc': 'Overdrive mode data slot time (μs)', 'default': 7.3}, {'id': 'cnt_overdrive_presence', - 'desc': 'Overdrive mode sample presence time (μs)', - 'default': 10}, + 'desc': 'Overdrive mode sample presence time (μs)', 'default': 10}, {'id': 'cnt_overdrive_reset', - 'desc': 'Overdrive mode reset time (μs)', - 'default': 48}, + 'desc': 'Overdrive mode reset time (μs)', 'default': 48}, ) annotations = ( ('bit', 'Bit'), diff --git a/decoders/parallel/pd.py b/decoders/parallel/pd.py index cae269f..330d514 100644 --- a/decoders/parallel/pd.py +++ b/decoders/parallel/pd.py @@ -74,9 +74,8 @@ class Decoder(srd.Decoder): options = ( {'id': 'clock_edge', 'desc': 'Clock edge to sample on', 'default': 'rising', 'values': ('rising', 'falling')}, - {'id': 'wordsize', 'desc': 'Word size of the data', - 'default': 1}, - {'id': 'endianness', 'desc': 'Endianness of the data', + {'id': 'wordsize', 'desc': 'Data wordsize', 'default': 1}, + {'id': 'endianness', 'desc': 'Data endianness', 'default': 'little', 'values': ('little', 'big')}, ) annotations = ( diff --git a/decoders/spi/pd.py b/decoders/spi/pd.py index d0e3409..7d84b3d 100644 --- a/decoders/spi/pd.py +++ b/decoders/spi/pd.py @@ -84,9 +84,9 @@ class Decoder(srd.Decoder): 'values': (0, 1)}, {'id': 'cpha', 'desc': 'Clock phase', 'default': 0, 'values': (0, 1)}, - {'id': 'bitorder', 'desc': 'Bit order within the SPI data', + {'id': 'bitorder', 'desc': 'Bit order', 'default': 'msb-first', 'values': ('msb-first', 'lsb-first')}, - {'id': 'wordsize', 'desc': 'Word size of SPI data', 'default': 8}, + {'id': 'wordsize', 'desc': 'Word size', 'default': 8}, ) annotations = ( ('miso-data', 'MISO data'), diff --git a/decoders/usb_packet/pd.py b/decoders/usb_packet/pd.py index 61acd4f..5dbbcdb 100644 --- a/decoders/usb_packet/pd.py +++ b/decoders/usb_packet/pd.py @@ -152,7 +152,8 @@ class Decoder(srd.Decoder): inputs = ['usb_signalling'] outputs = ['usb_packet'] options = ( - {'id': 'signalling', 'desc': 'Signalling', 'default': 'full-speed'}, + {'id': 'signalling', 'desc': 'Signalling', + 'default': 'full-speed', 'values': ('full-speed', 'low-speed')}, ) annotations = ( ('sync-ok', 'SYNC'),