diff options
Diffstat (limited to 'decoders/ds1307')
-rw-r--r-- | decoders/ds1307/__init__.py | 1 | ||||
-rw-r--r-- | decoders/ds1307/pd.py | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/decoders/ds1307/__init__.py b/decoders/ds1307/__init__.py index 5bc28c3..70980a6 100644 --- a/decoders/ds1307/__init__.py +++ b/decoders/ds1307/__init__.py @@ -24,4 +24,3 @@ real-time clock (RTC) specific registers and commands. ''' from .pd import * - diff --git a/decoders/ds1307/pd.py b/decoders/ds1307/pd.py index 1a49f9a..77effbf 100644 --- a/decoders/ds1307/pd.py +++ b/decoders/ds1307/pd.py @@ -1,6 +1,6 @@ ## ## This file is part of the libsigrokdecode project. -## +## ## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> ## Copyright (C) 2013 Matt Ranostay <mranostay@gmail.com> ## @@ -81,7 +81,7 @@ class Decoder(srd.Decoder): self.putx([0, ['Day of Week: %s' % days_of_week[self.days - 1]]]) def handle_reg_0x04(self, b): # Date - self.date = bcd2int(b & 0x3f) + self.date = bcd2int(b & 0x3f) self.putx([0, ['Days: %d' % self.date]]) def handle_reg_0x05(self, b): # Month @@ -89,7 +89,7 @@ class Decoder(srd.Decoder): self.putx([0, ['Months: %d' % self.months]]) def handle_reg_0x06(self, b): # Year - self.years = bcd2int(b & 0xff) + 2000; + self.years = bcd2int(b & 0xff) + 2000 self.putx([0, ['Years: %d' % self.years]]) def handle_reg_0x07(self, b): # Control Register @@ -164,4 +164,3 @@ class Decoder(srd.Decoder): self.state = 'IDLE' else: pass # TODO? - |