- elif cmd in ('ADDRESS READ', 'ADDRESS WRITE'):
- if self.options['address'] in (0, data):
- # We want this tranfer.
- self.state = 'transfer'
- elif self.state == 'transfer':
- if cmd in ('DATA READ', 'DATA WRITE'):
- self.put(ss, es, self.out_proto, data)
+
+ # TODO: START->STOP chunks with both read and write (Repeat START)
+ # Otherwise, send out the whole chunk of I2C packets.
+ for p in self.packets:
+ self.put(p[0], p[1], self.out_proto, p[2])
+
+ self.packets = []