+ def flashpeek(self, adr):
+ """Read a byte of the target's Flash memory."""
+ self.writecmd(self.AVRAPP,0x02 ,2,
+ [ (adr&0xFF), (adr>>8)]
+ );#little-endian address
+ return ord(self.data[0]);
+ def flashpeekblock(self, adr):
+ """Read a byte of the target's Flash memory."""
+ self.writecmd(self.AVRAPP,0x02 ,4,
+ [ (adr&0xFF), (adr>>8) &0xFF, 0x80, 0x00]
+ );
+ return self.data;
+