summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
Diffstat (limited to 'decoders')
-rw-r--r--decoders/uart/pd.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/decoders/uart/pd.py b/decoders/uart/pd.py
index 802c593..7a43ee4 100644
--- a/decoders/uart/pd.py
+++ b/decoders/uart/pd.py
@@ -58,6 +58,9 @@ TX = 1
# 'none' is _not_ allowed as value for 'parity_type'.
def parity_ok(parity_type, parity_bit, data, num_data_bits):
+ if parity_type == 'ignore':
+ return True
+
# Handle easy cases first (parity bit is always 1 or 0).
if parity_type == 'zero':
return parity_bit == 0
@@ -100,9 +103,7 @@ class Decoder(srd.Decoder):
{'id': 'num_data_bits', 'desc': 'Data bits', 'default': 8,
'values': (5, 6, 7, 8, 9)},
{'id': 'parity_type', 'desc': 'Parity type', 'default': 'none',
- 'values': ('none', 'odd', 'even', 'zero', 'one')},
- {'id': 'parity_check', 'desc': 'Check parity?', 'default': 'yes',
- 'values': ('yes', 'no')},
+ 'values': ('none', 'odd', 'even', 'zero', 'one', 'ignore')},
{'id': 'num_stop_bits', 'desc': 'Stop bits', 'default': 1.0,
'values': (0.0, 0.5, 1.0, 1.5)},
{'id': 'bit_order', 'desc': 'Bit order', 'default': 'lsb-first',