Console was updated to include help for commands.
authorcutsec <cutsec@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 21 Mar 2011 19:02:17 +0000 (19:02 +0000)
committercutsec <cutsec@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 21 Mar 2011 19:02:17 +0000 (19:02 +0000)
goodfet.cc was updated to include special register queries.  I forgot to update this file when I updated GoodFETCC.py
Cutaway

git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@981 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFETConsole.py
client/goodfet.cc

index 8f6eba8..a7eccd3 100644 (file)
@@ -51,6 +51,11 @@ class GoodFETConsole():
             self.prompt();
     def handle(self, str):
         """Handle a command string.  First word is command."""
+        #Lines beginning with ? are cries for help.
+        if(str[0]=="?"):  
+            print "Term Commands:"
+            print commands
+            return;
         #Lines beginning with # are comments.
         if(str[0]=="#"):  return;
         #Lines beginning with ! are Python.
index e58ec68..7293534 100755 (executable)
@@ -117,8 +117,11 @@ if(len(sys.argv)==1):
     print "%s flash $foo.hex" % sys.argv[0];
     print "%s test" % sys.argv[0];
     print "%s term" % sys.argv[0];
+    print "    use \'?\' for list of commands";
     print "%s info" % sys.argv[0];
     print "%s infotest" % sys.argv[0];
+    print "%s radioinfo [help] [REGISTER_NAME]" % sys.argv[0];
+    print "%s specfuncreg [SPECIAL_REGISTER_NAME]" % sys.argv[0];
     print "%s halt"  % sys.argv[0];
     print "%s regs" % sys.argv[0];
     print "%s dumpcode $foo.hex [0x$start 0x$stop]" % sys.argv[0];
@@ -414,6 +417,12 @@ if(sys.argv[1]=="info"):
     #print "SMAC  0x%010x" % client.RF_getsmac();
     #print "TMAC  0x%010x" % client.RF_gettmac();
 
+if(sys.argv[1]=="radioinfo"):
+    if (len(sys.argv) - 2) > 0:
+        client.CMDrs(sys.argv[2:]);
+    else:
+        client.CMDrs();
+
 if(sys.argv[1]=="regs"):
     client.CMDrs();
 
@@ -462,6 +471,12 @@ if(sys.argv[1]=="adctest"):
 if(sys.argv[1]=="config"):
     print "Config is %02x" % client.CCrd_config();
 
+if(sys.argv[1]=="specfuncreg"):
+    if len(sys.argv) > 2:
+        client.getSPR(sys.argv[2:]);
+    else:
+        client.getSPR();
+
 if(sys.argv[1]=="flash"):
      f=sys.argv[2];
      start=0;