Commented some outdated debugging strings in the maxusb firmware, added some counter...
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 2 Apr 2012 02:00:59 +0000 (02:00 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 2 Apr 2012 02:00:59 +0000 (02:00 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1130 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFETMAXUSB.py
firmware/apps/usb/maxusb.c

index 8f05d43..a6bc6fa 100644 (file)
@@ -318,9 +318,11 @@ class GoodFETMAXUSB(GoodFET):
             #Very innefficient, move this to C if performance is needed.
             for j in range(0,pktsize):
                 self.xfrdata=self.xfrdata+[self.rreg(rRCVFIFO)];
+            xfrsize=self.xfrdata[0];
             self.wreg(rHIRQ,bmRCVDAVIRQ); #Clear IRQ
             xfrlen=xfrlen+pktsize; #Add byte count to total transfer length.
             
+            print "%i / %i" % (xfrlen,xfrsize)
             
             #Packet is complete if:
             # 1. The device sent a short packet, <maxPacketSize
@@ -330,7 +332,7 @@ class GoodFETMAXUSB(GoodFET):
                 ashex="";
                 for foo in self.xfrdata:
                     ashex=ashex+(" %02x"%foo);
-                print "INPACKET EP%i==%s" % (endpoint,ashex);
+                print "INPACKET EP%i==%s (0x%02x bytes remain)" % (endpoint,ashex,xfrsize);
                 return resultcode;
 
     RETRY_LIMIT=3;
index dbe554a..e093024 100644 (file)
@@ -51,10 +51,10 @@ void maxusb_setup(){
   //Setup the configuration pins.
   //This might need some delays.
   CLRRST; //Put the chip into RESET.
-  debugstr("MAXUSB is off.");
+  //debugstr("MAXUSB is off.");
   SETSS;  //Deselect the chip, end any existing transation.
   SETRST; //Bring the chip out of RESET.
-  debugstr("MAXUSB is on.");
+  //debugstr("MAXUSB is on.");
 }