OpenCores
URL https://opencores.org/ocsvn/usb_dongle_fpga/usb_dongle_fpga/trunk

Subversion Repositories usb_dongle_fpga

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 41 to Rev 42
    Reverse comparison

Rev 41 → Rev 42

/trunk/sw/dongle.py
934,7 → 934,7
print 'File size %iK '%(size/1024)
f.close()
except IOError:
print "IO Error on file open"
print "IO Error on file open. File missing or no premission to open."
sys.exit()
#clear blockLock bits
don.write_command(0x0060) # 0x0098
945,6 → 945,10
wordSize = (size+ (size&1))>> 1 # round byte count up and make word address
endBlock = don.get_block_no(mode.address+wordSize - 1)
startBlock = don.get_block_no(mode.address)
if endBlock > 32:
print "Given file does not fit into remaining space. File size is %i KB"%(size/1024)
print "Space left from given offset is %i KB"%((4*1024*1024-mode.address*2)/1024)
sys.exit()
i=startBlock
print 'Erasing from block %i to %i '%(i,endBlock)
while i <= endBlock:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.