import binascii;
import array;
-from GoodFET import GoodFET;
+from GoodFETSPI import GoodFETSPIFlash;
from intelhex import IntelHex;
if(len(sys.argv)==1):
print "%s poke 0x$adr 0x$val" % sys.argv[0];
sys.exit();
-#Initailize FET and set baud rate
-client=GoodFET();
+#Initialize FET and set baud rate
+client=GoodFETSPIFlash();
client.serInit()
i=start;
chars=list(file.read());
+
+ #N.B., chunksize must be an even fraction of 0x100.
chunksize=0x80;
while i<=stop:
bytes=range(0,chunksize);
for j in range(0,chunksize):
bytes[j]=ord(chars[i+j]);
- #client.SPIpokebyte(i,ord(chars[i]));
client.SPIpokebytes(i,bytes);
i+=chunksize;