X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2Fgoodfet.spiflash;h=7a187db434ae0c1c0715dcbf921187c2e243a97e;hp=e396f55ddbd88ee16f953f6f9b560e8550d8938d;hb=a07ee5d1ce0e6c0f5e53a04afed88a96b323177a;hpb=c98b9c687e78bc3e3708074f286b481a35370a07 diff --git a/client/goodfet.spiflash b/client/goodfet.spiflash index e396f55..7a187db 100755 --- a/client/goodfet.spiflash +++ b/client/goodfet.spiflash @@ -10,7 +10,7 @@ import sys; import binascii; import array; -from GoodFET import GoodFET; +from GoodFETSPI import GoodFETSPIFlash; from intelhex import IntelHex; if(len(sys.argv)==1): @@ -24,8 +24,8 @@ 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() @@ -126,13 +126,12 @@ if(sys.argv[1]=="flash"): i=start; chars=list(file.read()); - chunksize=0x80; + chunksize=0xfc; 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;