Nearing 16-bit clock control data.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Fri, 17 Sep 2010 20:44:38 +0000 (20:44 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Fri, 17 Sep 2010 20:44:38 +0000 (20:44 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@724 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFET.py
client/goodfet.monitor

index c3ab99e..b6d9033 100755 (executable)
@@ -465,10 +465,15 @@ class GoodFET:
             return 0;
         return 1;
     def monitorclocking(self):
-        DCOCTL=self.peekbyte(0x0056);
-        BCSCTL1=self.peekbyte(0x0057);
-        return "0x%02x, 0x%02x" % (DCOCTL, BCSCTL1);
-
+        """Return the 16-bit clocking value."""
+        return "0x%04x" % self.monitorgetclock();
+    
+    def monitorsetclock(self,clock):
+        """Set the clocking value."""
+        self.poke16(0x56, clock);
+    def monitorgetclock(self):
+        """Get the clocking value."""
+        return self.peek16(0x56);
     # The following functions ought to be implemented in
     # every client.
 
index bbed793..ea0dd68 100755 (executable)
@@ -48,6 +48,10 @@ if(sys.argv[1]=="exec"):
 if(sys.argv[1]=="info"):
     print "GoodFET with %s MCU" % client.infostring();
     print "Clocked at %s" % client.monitorclocking();
+if(sys.argv[1]=="clocktest"):
+    print "GoodFET with %s MCU" % client.infostring();
+    print "Clocked at %s" % client.monitorclocking();
+    
 if(sys.argv[1]=="ramfill"):
     client.monitor_ram_pattern();
 if(sys.argv[1]=="ramdepth"):