summaryrefslogtreecommitdiff
path: root/decoders/rtc8564
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-02-02 00:20:57 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2014-02-02 00:30:27 +0100
commit3161ab5a3569f88e6e9fadfd9d8e54f53620f104 (patch)
tree53ad168c4b9462de96d589e70abbb965189ac346 /decoders/rtc8564
parenta4289441eda34163f7e38f44367c4e888eb81eb1 (diff)
downloadlibsigrokdecode-3161ab5a3569f88e6e9fadfd9d8e54f53620f104.tar.gz
libsigrokdecode-3161ab5a3569f88e6e9fadfd9d8e54f53620f104.zip
rtc8564: Define annotation rows.
Diffstat (limited to 'decoders/rtc8564')
-rw-r--r--decoders/rtc8564/pd.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/decoders/rtc8564/pd.py b/decoders/rtc8564/pd.py
index 0aa7952..3c8404a 100644
--- a/decoders/rtc8564/pd.py
+++ b/decoders/rtc8564/pd.py
@@ -52,7 +52,13 @@ class Decoder(srd.Decoder):
['reg-0x08', 'Register 0x08'],
['read', 'Read date/time'],
['write', 'Write date/time'],
+ ['bits', 'Bits'],
]
+ annotation_rows = (
+ ('bits', 'Bits', (11,)),
+ ('regs', 'Registers', tuple(range(0, 8 + 1))),
+ ('date-time', 'Date/time', (9, 10)),
+ )
def __init__(self, **kwargs):
self.state = 'IDLE'
@@ -102,7 +108,7 @@ class Decoder(srd.Decoder):
self.seconds = bcd2int(b & 0x7f)
self.putx([2, ['Seconds: %d' % self.seconds]])
vl = 1 if (b & (1 << 7)) else 0
- self.putx([2, ['Voltage low (VL) bit: %d' % vl]])
+ self.putx([11, ['Voltage low (VL) bit: %d' % vl]])
def handle_reg_0x03(self, b): # Minutes
self.minutes = bcd2int(b & 0x7f)