Removed unnecessary dependencies on py-serial for better use with the py-bluez devices.
[goodfet] / client / GoodFETAVR.py
index f8189bf..4749d06 100644 (file)
@@ -5,7 +5,7 @@
 #
 # This code is being rewritten and refactored.  You've been warned!
 
-import sys, time, string, cStringIO, struct, glob, serial, os;
+import sys, time, string, cStringIO, struct, glob, os;
 
 from GoodFET import GoodFET;
 
@@ -80,6 +80,9 @@ class GoodFETAVR(GoodFET):
         0x9302: "ATmega85",
         0x9305: "ATmega83",
         0x9601: "ATmega603",
+        
+        #These are missing from the Fenceline DB.
+        0x960a: "ATmega644P",
         };
     
     def setup(self):
@@ -116,7 +119,8 @@ class GoodFETAVR(GoodFET):
         """Read the target's lockbits."""
         self.writecmd(self.AVRAPP,0x92,1,[bits]);
         return self.lockbits();
-    
+    def lock(self):
+        self.setlockbits(0xFC);
     def eeprompeek(self, adr):
         """Read a byte of the target's EEPROM."""
         self.writecmd(self.AVRAPP,0x81 ,2,