projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Explicit setRTS.
[goodfet]
/
client
/
GoodFETSPI.py
diff --git
a/client/GoodFETSPI.py
b/client/GoodFETSPI.py
index
044aea2
..
bd28019
100644
(file)
--- a/
client/GoodFETSPI.py
+++ b/
client/GoodFETSPI.py
@@
-62,6
+62,7
@@
class GoodFETSPIFlash(GoodFETSPI):
"""Grab an SPI Flash ROM's JEDEC bytes."""
data=[0x9f, 0, 0, 0];
data=self.SPItrans(data);
"""Grab an SPI Flash ROM's JEDEC bytes."""
data=[0x9f, 0, 0, 0];
data=self.SPItrans(data);
+
self.JEDECmanufacturer=ord(data[1]);
self.JEDECtype=ord(data[2]);
self.JEDECcapacity=ord(data[3]);
self.JEDECmanufacturer=ord(data[1]);
self.JEDECtype=ord(data[2]);
self.JEDECcapacity=ord(data[3]);
@@
-91,11
+92,13
@@
class GoodFETSPIFlash(GoodFETSPI):
def SPIpokebyte(self,adr,val):
self.SPIpokebytes(adr,[val]);
def SPIpokebytes(self,adr,data):
def SPIpokebyte(self,adr,val):
self.SPIpokebytes(adr,[val]);
def SPIpokebytes(self,adr,data):
- #self.SPIwriteenable();
- adranddata=[(adr&0xFF0000)>>16,
- (adr&0xFF00)>>8,
- adr&0xFF
- ]+data;
+ #Used to be 24 bits, BE, not 32 bits, LE.
+ adranddata=[adr&0xFF,
+ (adr&0xFF00)>>8,
+ (adr&0xFF0000)>>16,
+ 0, #MSB
+ ]+data;
+ #print "%06x: poking %i bytes" % (adr,len(data));
self.writecmd(0x01,0x03,
len(adranddata),adranddata);
self.writecmd(0x01,0x03,
len(adranddata),adranddata);