You've already forked TEF6686_Driver
xrd protocol
This commit is contained in:
@@ -24,7 +24,7 @@ class BaseTEF668X:
|
||||
def send_patch(_patch: bytes):
|
||||
for i in range(0, len(_patch), 24):
|
||||
data = _patch[i:i+24]
|
||||
if self.p.write_i2c(ADDRESS, b"\x1b" + data)[1] != 0: raise Exception
|
||||
if self.p.write_i2c(ADDRESS, b"\x1b" + data)[0] != 0: raise Exception
|
||||
send_patch(bytes(patch))
|
||||
self.p.write_i2c(ADDRESS, b"\x1c\x00\x00")
|
||||
self.p.write_i2c(ADDRESS, b"\x1c\x00\x75")
|
||||
@@ -33,7 +33,7 @@ class BaseTEF668X:
|
||||
|
||||
def APPL_Get_Operation_Status(self):
|
||||
data = self.p.write_read_i2c(ADDRESS, b"\x40\x80\x01", 2)
|
||||
while data[1] != 0:
|
||||
while data[0] != 0:
|
||||
data = self.p.write_read_i2c(ADDRESS, b"\x40\x80\x01", 2)
|
||||
time.sleep(0.01)
|
||||
return data[-1]
|
||||
|
||||
Reference in New Issue
Block a user