if self.options['direction'] not in ('both', 'read', 'write'):
raise Exception('Invalid direction (valid: read/write/both).')
if self.options['direction'] not in ('both', 'read', 'write'):
raise Exception('Invalid direction (valid: read/write/both).')
# packet comes along. At some point before that STOP condition, there
# will have been an ADDRESS READ or ADDRESS WRITE which contains the
# packet comes along. At some point before that STOP condition, there
# will have been an ADDRESS READ or ADDRESS WRITE which contains the
# If that slave shall be filtered, output the cache (all packets from
# START to STOP) as proto 'i2c', otherwise drop it.
def decode(self, ss, es, data):
cmd, databyte = data
# If that slave shall be filtered, output the cache (all packets from
# START to STOP) as proto 'i2c', otherwise drop it.
def decode(self, ss, es, data):
cmd, databyte = data
self.packets.append([ss, es, data])
if cmd in ('ADDRESS READ', 'ADDRESS WRITE'):
self.packets.append([ss, es, data])
if cmd in ('ADDRESS READ', 'ADDRESS WRITE'):
for p in self.packets:
self.put(p[0], p[1], self.out_proto, p[2])
self.packets = []
else:
for p in self.packets:
self.put(p[0], p[1], self.out_proto, p[2])
self.packets = []
else: