X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Frtc8564%2Fpd.py;h=728cae6500c98f45e2e51be98863f40a679b8a63;hp=3abd1d8b8ed8f288b82ba08af16f3c2bad027ef9;hb=847e488b37fe5c85c4d1aa4930ced34c24ca5b03;hpb=be465111b552c7c2a2262ac49758a30a8bf1b1d5 diff --git a/decoders/rtc8564/pd.py b/decoders/rtc8564/pd.py index 3abd1d8..728cae6 100644 --- a/decoders/rtc8564/pd.py +++ b/decoders/rtc8564/pd.py @@ -18,8 +18,6 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -# Epson RTC-8564 JE/NB protocol decoder - import sigrokdecode as srd # Return the specified BCD number (max. 8 bits) as integer. @@ -37,13 +35,13 @@ class Decoder(srd.Decoder): outputs = ['rtc8564'] probes = [] optional_probes = [ - {'id': 'clkout', 'name': 'CLKOUT', 'desc': 'TODO.'}, - {'id': 'clkoe', 'name': 'CLKOE', 'desc': 'TODO.'}, - {'id': 'int', 'name': 'INT#', 'desc': 'TODO.'}, + {'id': 'clkout', 'name': 'CLKOUT', 'desc': 'Clock output'}, + {'id': 'clkoe', 'name': 'CLKOE', 'desc': 'Clock output enable'}, + {'id': 'int', 'name': 'INT#', 'desc': 'Interrupt'}, ] options = {} annotations = [ - ['Text', 'Human-readable text'], + ['text', 'Human-readable text'], ] def __init__(self, **kwargs): @@ -56,12 +54,9 @@ class Decoder(srd.Decoder): self.years = -1 def start(self): - # self.out_proto = self.register(srd.OUTPUT_PYTHON) + # self.out_python = self.register(srd.OUTPUT_PYTHON) self.out_ann = self.register(srd.OUTPUT_ANN) - def report(self): - pass - def putx(self, data): self.put(self.ss, self.es, self.out_ann, data) @@ -147,12 +142,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'