X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETAVR.py;h=8a9adc8d1e0e719e1811a12cccb40c400efd566c;hp=f8189bf57cb3aa09c75fb10944f54fab31af3dd0;hb=f7fdc48f01ada713d5034763a2f3395fe2a7c51b;hpb=1a28f22ced715fe03fd4a6dc6077c951f4b7efa2 diff --git a/client/GoodFETAVR.py b/client/GoodFETAVR.py index f8189bf..8a9adc8 100644 --- a/client/GoodFETAVR.py +++ b/client/GoodFETAVR.py @@ -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; @@ -57,6 +57,7 @@ class GoodFETAVR(GoodFET): 0x9406: "ATmega168", 0x9405: "ATmega169", 0x9502: "ATmega32", + 0x958a: "ATmega32U2", #TODO add the other U series. 0x9501: "ATmega323", 0x9503: "ATmega325", 0x9504: "ATmega3250", @@ -80,6 +81,9 @@ class GoodFETAVR(GoodFET): 0x9302: "ATmega85", 0x9305: "ATmega83", 0x9601: "ATmega603", + + #These are missing from the Fenceline DB. + 0x960a: "ATmega644P", }; def setup(self): @@ -116,7 +120,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,