goodfet.msp430 selftest is working!
[goodfet] / client / GoodFET.py
index 7e32773..ab6ac30 100755 (executable)
@@ -96,7 +96,7 @@ class GoodFET:
                 if hwid.index('FTDI')==0:
                     port=comport;
                     #print "Using FTDI port %s" % port
-                    
+        
         
         self.serialport = serial.Serial(
             port,
@@ -195,6 +195,10 @@ class GoodFET:
                         print "# DEBUG %s" % self.serialport.read(self.count)
                            elif self.verb==0xFE:
                         print "# DEBUG 0x%x" % struct.unpack(fmt[self.count-1], self.serialport.read(self.count))[0]
+                    elif self.verb==0xFD:
+                        #Do nothing, just wait so there's no timeout.
+                        print "# NOP.";
+                        
                     sys.stdout.flush();
                 else:
                     self.data=self.serialport.read(self.count);
@@ -277,6 +281,9 @@ class GoodFET:
     def peekword(self,address):
         """Read a word of memory from the monitor."""
         return self.peekbyte(address)+(self.peekbyte(address+1)<<8);
+    def peek(self,address):
+        """Read a word of memory from the monitor."""
+        return self.peekbyte(address)+(self.peekbyte(address+1)<<8);
     def pokebyte(self,address,value):
         """Set a byte of memory by the monitor."""
         self.data=[address&0xff,address>>8,value];