]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/ds1307/pd.py
All PDs: Drop unneeded comments.
[libsigrokdecode.git] / decoders / ds1307 / pd.py
index 169dbc30c3ec87d3aaf3cdf813e71144ce649f48..8e8a70807ee7cf18c391de0888164fe51bda5669 100644 (file)
@@ -19,8 +19,6 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-# Dallas DS1307 RTC protocol decoder
-
 import sigrokdecode as srd
 
 days_of_week = [
@@ -63,11 +61,8 @@ class Decoder(srd.Decoder):
         self.months = -1
         self.years = -1
 
-    def start(self, metadata):
-        self.out_ann = self.add(srd.OUTPUT_ANN, 'ds1307')
-
-    def report(self):
-        pass
+    def start(self):
+        self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def putx(self, data):
         self.put(self.ss, self.es, self.out_ann, data)
@@ -106,12 +101,12 @@ class Decoder(srd.Decoder):
     def decode(self, ss, es, data):
         cmd, databyte = data
 
-        # Store the start/end samples of this I2C packet.
+        # Store the start/end samples of this I²C packet.
         self.ss, self.es = ss, es
 
         # State machine.
         if self.state == 'IDLE':
-            # Wait for an I2C START condition.
+            # Wait for an I²C START condition.
             if cmd != 'START':
                 return
             self.state = 'GET SLAVE ADDR'