xfer.py

Go to the documentation of this file.
00001 import time
00002 import USBP
00003 
00004 # Open the Protoboard Version 1
00005 c = USBP.PBRD01()  
00006 
00007 print 'INIT USB'
00008 c.initUSB()
00009 
00010 # Load Firmware will auto Re-enumerate
00011 print 'LOAD FX2 Firmware'
00012 err = c.loadFxFirmware('usbp_v1.hex')
00013 if err != 0:
00014     exit
00015 #time.sleep(2) # Can Take some time for windos to reenumerate
00016               # \todo Change library not to return until windows OK??
00017               
00018 # Load the FPGA
00019 print 'Configure FPGA....'
00020 err = c.configFPGA('pugboard_top.bit')
00021 if err != 0:
00022     exit
00023 print 'Config OK'
00024 
00025 for q in range(1000):
00026     for i in range(255):
00027         print "Xfer " + str(i) 
00028         c.xferFPGA(i)
00029         time.sleep(.100)

Generated on Mon Mar 5 20:44:19 2007 for usbp by  doxygen 1.5.1-p1