summaryrefslogtreecommitdiff
path: root/decoders/rtc8564/pd.py
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-02-02 00:40:23 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2014-02-02 00:40:23 +0100
commit3d1901418abc422d949dfd20c633af5c881620d7 (patch)
tree86cf1930103300b4a437bb24f053cfba6ce2db37 /decoders/rtc8564/pd.py
parent3161ab5a3569f88e6e9fadfd9d8e54f53620f104 (diff)
downloadlibsigrokdecode-3d1901418abc422d949dfd20c633af5c881620d7.tar.gz
libsigrokdecode-3d1901418abc422d949dfd20c633af5c881620d7.zip
rtc8564: Handle register 0x06 (weekday).
Diffstat (limited to 'decoders/rtc8564/pd.py')
-rw-r--r--decoders/rtc8564/pd.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/decoders/rtc8564/pd.py b/decoders/rtc8564/pd.py
index 3c8404a..e919148 100644
--- a/decoders/rtc8564/pd.py
+++ b/decoders/rtc8564/pd.py
@@ -66,6 +66,7 @@ class Decoder(srd.Decoder):
self.minutes = -1
self.seconds = -1
self.days = -1
+ self.weekdays = -1
self.months = -1
self.years = -1
@@ -122,8 +123,9 @@ class Decoder(srd.Decoder):
self.days = bcd2int(b & 0x3f)
self.putx([5, ['Days: %d' % self.days]])
- def handle_reg_0x06(self, b): # Day counter
- pass
+ def handle_reg_0x06(self, b): # Weekdays
+ self.weekdays = bcd2int(b & 0x07)
+ self.putx([6, ['Weekdays: %d' % self.weekdays]])
def handle_reg_0x07(self, b): # Months / century
# TODO: Handle century bit.