From: Uwe Hermann Date: Sat, 1 Feb 2014 23:20:57 +0000 (+0100) Subject: rtc8564: Define annotation rows. X-Git-Tag: libsigrokdecode-0.3.0~121 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3161ab5a3569f88e6e9fadfd9d8e54f53620f104;p=libsigrokdecode.git rtc8564: Define annotation rows. --- 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)