Commit 014c56c3 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

work on protocol extension

parent 8a9dd032
conv-ttl-blo-gw @ 3c5f741a
Subproject commit f362dfd4d4efc14b239a8ed1df2bf1c7febb740b
Subproject commit 3c5f741a866087421609c6900e5489df4925fe4b
......@@ -77,7 +77,11 @@ class VBCP:
def write(self, addr, val):
self.write_cnt += 1
reg = addr/4 + 1
cmd = "iic4wr %d %d %x\r\n" % (self.slot, reg, val)
sl = (0x40 | ((~self.slot) & 0x1f)) << 1
print '%02x' % sl
cmd = "iic4wr %x %x %x %x %x %x %x %x %x %x %x\r\n" % (sl, (addr & 0xff00) >> 8, addr & 0xff, val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7])
print cmd
#cmd = "writereg %d %d %x\r\n" % (self.slot, reg, val)
self.handle.send(cmd)
_strip_resp(self.handle.recv(30))
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment