From 67e7254e877a394c0d0804e5376f5cb778e2b1fa Mon Sep 17 00:00:00 2001 From: travisutk Date: Fri, 8 Oct 2010 18:37:18 +0000 Subject: [PATCH] Block fetching for the Chipcon from XDATA/CODE memory. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@752 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFETCC.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/GoodFETCC.py b/client/GoodFETCC.py index 3e16ca7..2bcf90d 100644 --- a/client/GoodFETCC.py +++ b/client/GoodFETCC.py @@ -229,12 +229,12 @@ class GoodFETCC(GoodFET): def CCdebuginstr(self,instr): self.writecmd(self.APP,0x88,len(instr),instr); return ord(self.data[0]); - def peekblock(self,address,length,memory="vn"): + def peekblock(self,adr,length,memory="vn"): """Return a block of data.""" - data=range(0,length); - for foo in range(0,length): - data[foo]=self.peek8(address+foo,memory); - return data; + data=[adr&0xff, (adr&0xff00)>>8, + length&0xFF,(length&0xFF00)>>8]; + self.writecmd(self.APP,0x91,4,data); + return [ord(x) for x in self.data] def peek8(self,address, memory="code"): if(memory=="code" or memory=="flash" or memory=="vn"): return self.CCpeekcodebyte(address); -- 2.20.1