X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFET.py;h=952ae98f10332a2e3e1f00f582c44c1ea011ab1d;hp=9c111617cc7463eb96dd34f034212c99e31cd424;hb=92560226caf1a463eb144324978b0a390327e09e;hpb=9e13b1450d770a5645468221d0eacc1533d654a9;ds=sidebyside diff --git a/client/GoodFET.py b/client/GoodFET.py index 9c11161..952ae98 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -139,6 +139,14 @@ class GoodFET: 0]; self.SPItrans(data); return ord(self.data[4]); + def SPIpeekblock(self,adr): + """Grab a byte from an SPI Flash ROM.""" + data=[(adr&0xFF0000)>>16, + (adr&0xFF00)>>8, + adr&0xFF]; + + self.writecmd(0x01,0x02,3,data); + return self.data; def SPIjedecmanstr(self): """Grab the JEDEC manufacturer string. Call after SPIjedec()."""