Adds client support for the Apimote, which uses the RTS line instead of the DTR line.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Tue, 24 Jul 2012 01:01:11 +0000 (01:01 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Tue, 24 Jul 2012 01:01:11 +0000 (01:01 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1203 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFET.py

index 0275569..e0d575d 100755 (executable)
@@ -205,6 +205,13 @@ class GoodFET:
                     self.telosBReset();
                 elif (os.environ.get("board")=='zolertiaz1' or  os.environ.get("board")=='z1'):
                     self.bslResetZ1();
                     self.telosBReset();
                 elif (os.environ.get("board")=='zolertiaz1' or  os.environ.get("board")=='z1'):
                     self.bslResetZ1();
+                elif (os.environ.get("board")=='apimote'):
+                    #Explicitly set RTS and DTR to halt board.
+                    self.serialport.setRTS(1);
+                    self.serialport.setDTR(1);
+                    #RTS pin, not DTR is used for reset.
+                    self.serialport.setRTS(0);
+                    #print "Resetting Apimote not yet tested.";
                 else:
                     #Explicitly set RTS and DTR to halt board.
                     self.serialport.setRTS(1);
                 else:
                     #Explicitly set RTS and DTR to halt board.
                     self.serialport.setRTS(1);