X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFET.py;h=c3ab99e6d8a5b3a662e5ab6e0c99ef8dc07c0f1d;hp=154bd389d98de4f1f533b3a5b27004230d1e5473;hb=9d5e232f68b4c21dcad52b5aa0d014de3ef5eed0;hpb=8eed366711c123dbd740b0bc0d5ca0e0c0d770e8 diff --git a/client/GoodFET.py b/client/GoodFET.py index 154bd38..c3ab99e 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -288,7 +288,7 @@ class GoodFET: except TypeError: if self.connected: print "Error: waiting for serial read timed out (most likely)."; - print "This shouldn't happen after syncing. Exiting for safety."; + print "This shouldn't happen after syncing. Exiting for safety."; sys.exit(-1) return self.data; #Glitching stuff. @@ -313,8 +313,11 @@ class GoodFET: """Time the execution of a verb.""" if data==None: data=[]; self.data=[app&0xff, verb&0xFF]+data; + print "Timing app %02x verb %02x." % (app,verb); self.writecmd(self.GLITCHAPP,0x82,len(self.data),self.data); - return ord(self.data[0])+(ord(self.data[1])<<8); + time=ord(self.data[0])+(ord(self.data[1])<<8); + print "Timed to be %i." % time; + return time; def glitchVoltages(self,low=0x0880, high=0x0fff): """Set glitching voltages. (0x0fff is max.)""" self.data=[low&0xff, (low>>8)&0xff,