}
class Decoder(srd.Decoder):
- api_version = 1
+ api_version = 2
id = 'onewire_network'
name = '1-Wire network layer'
longname = '1-Wire serial communication bus (network layer)'
license = 'gplv2+'
inputs = ['onewire_link']
outputs = ['onewire_network']
- annotations = [
- ['text', 'Human-readable text'],
- ]
+ annotations = (
+ ('text', 'Human-readable text'),
+ )
def __init__(self, **kwargs):
self.beg = 0
if self.onewire_collect(8, val, ss, es) == 0:
return
self.putx([0, ['ROM error data: 0x%02x' % self.data]])
- else:
- raise Exception('Invalid state: %s' % self.state)
# Data collector.
def onewire_collect(self, length, val, ss, es):