From 539ba29d21bf675ace6866b5f78de145affa6982 Mon Sep 17 00:00:00 2001 From: travisutk Date: Tue, 25 Sep 2012 08:55:06 +0000 Subject: [PATCH] Changing the resyncing rules. This might improve behavior, but it might also be painful. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1274 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFET.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/GoodFET.py b/client/GoodFET.py index 74f6e5d..3d2d91b 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -140,6 +140,7 @@ class GoodFET: """Open the serial port""" # Make timeout None to wait forever, 0 for non-blocking mode. import serial; + fixserial=False; if os.name=='nt' and sys.version.find('64 bit')!=-1: print "WARNING: PySerial requires a 32-bit Python build in Windows."; @@ -194,8 +195,9 @@ class GoodFET: #print "'%s'!=\n'%s'" % (self.data,"http://goodfet.sf.net/"); if attemptlimit is not None and attempts >= attemptlimit: return - elif attempts>2: - print "Resyncing. See the GoodFET FAQ about missing info flash."; + elif attempts==2: + print "See the GoodFET FAQ about missing info flash."; + self.serialport.setTimeout(0.2); #self.serialport.flushInput() #self.serialport.flushOutput() @@ -573,6 +575,9 @@ class GoodFET: self.writecmd(0,0x03,3,self.data); return ord(self.data[0]); def poke16(self,address,value): + """Set a word of memory by the monitor.""" + self.MONpoke16(address,value); + def MONpoke16(self,address,value): """Set a word of memory by the monitor.""" self.pokebyte(address,value&0xFF); self.pokebyte(address,(value>>8)&0xFF); -- 2.20.1