hikey: hisi-idt.py: remove deprecated setTimeout
am: 05700adf6b
* commit '05700adf6b849ce20fa75924e889446d18255384':
hikey: hisi-idt.py: remove deprecated setTimeout
Change-Id: Icd025165fa49d50d4d5c815e773f84d83c2d32a9
diff --git a/installer/hisi-idt.py b/installer/hisi-idt.py
index 071d495..832f81c 100644
--- a/installer/hisi-idt.py
+++ b/installer/hisi-idt.py
@@ -3,6 +3,7 @@
import os
import os.path
+
import serial, time
import array
import sys, getopt
@@ -113,7 +114,7 @@
print 'failed'
def sendstartframe(self):
- self.s.setTimeout(0.01)
+ self.s.timeout = 0.01
data = array.array('B', self.startframe[self.chip]).tostring()
crc = self.calc_crc(data)
data += chr((crc >> 8)&0xff)
@@ -121,7 +122,7 @@
self.sendframe(data,10000)
def sendheadframe(self,length,address):
- self.s.setTimeout(0.03)
+ self.s.timeout = 0.03
self.headframe[self.chip][4] = (length>>24)&0xff
self.headframe[self.chip][5] = (length>>16)&0xff
self.headframe[self.chip][6] = (length>>8)&0xff
@@ -141,7 +142,7 @@
def senddataframe(self,seq,data):
- self.s.setTimeout(0.15)
+ self.s.timeout = 0.15
head = chr(0xDA)
head += chr(seq&0xFF)
head += chr((~seq)&0xFF)