From: travisutk Date: Fri, 4 Sep 2009 02:08:57 +0000 (+0000) Subject: Nothing major. X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=da2dad53f6596dbb3049ad14044b9b754dbf4245 Nothing major. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@114 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/client/GoodFET.py b/client/GoodFET.py index 5a7ab02..f80a46d 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -10,6 +10,7 @@ import sys, time, string, cStringIO, struct, glob, serial, os; class GoodFET: + """GoodFET Client Library""" def __init__(self, *args, **kargs): self.data=[0]; def timeout(self): @@ -47,7 +48,7 @@ class GoodFET: if(self.verb!=0x7F): print "Verb %02x is wrong. Incorrect firmware?" % self.verb; #print "Connected." - def writecmd(self, app, verb, count, data=[], blocks=1): + def writecmd(self, app, verb, count=0, data=[], blocks=1): """Write a command and some data to the GoodFET.""" self.serialport.write(chr(app)); self.serialport.write(chr(verb)); @@ -152,7 +153,6 @@ class GoodFET: def SPIsetup(self): """Moved the FET into the SPI application.""" self.writecmd(0x01,0x10,0,self.data); #SPI/SETUP - def SPItrans8(self,byte): """Read and write 8 bits by SPI.""" @@ -207,14 +207,6 @@ class GoodFET: 0]; self.SPItrans(data); return ord(self.data[4]); -# def SPIpeekblock(self,adr): -# """Grab a block from an SPI Flash ROM. Block size is unknown""" -# data=[(adr&0xFF0000)>>16, -# (adr&0xFF00)>>8, -# adr&0xFF]; - -# self.writecmd(0x01,0x02,3,data); -# return self.data; def SPIpeekblock(self,adr,blocks=1): """Grab a few block from an SPI Flash ROM. Block size is unknown""" data=[(adr&0xFF0000)>>16, @@ -260,6 +252,7 @@ class GoodFET: if device==0: device="???" return "%s %s" % (man,device); + def MSP430setup(self): """Move the FET into the MSP430 JTAG application.""" print "Initializing MSP430.";