From 46b4d210eb05b659761681362a636025514ff4e6 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Sun, 16 Jun 2013 20:36:00 +0200 Subject: Add support for more Microchip and Atmel microcontrollers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implementation by Pavel Štemberk Signed-off-by: Michael Buesch --- libtoprammer/main.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libtoprammer/main.py') diff --git a/libtoprammer/main.py b/libtoprammer/main.py index 54a72e1..9d44d4c 100644 --- a/libtoprammer/main.py +++ b/libtoprammer/main.py @@ -384,6 +384,23 @@ class TOP(object): self.chip.writeRAM(image) self.flushCommands() self.printDebug("Done writing the image.") + + def readUserIdLocation(self): + """Reads the User ID Location and returns it.""" + self.printDebug("Reading UIL from chip...") + self.checkChip() + image = self.chip.readUserIdLocation() + self.flushCommands() + self.printDebug("Done reading %d bytes." % len(image)) + return image + + def writeUserIdLocation(self, image): + """Writes the User ID Location image to the chip.""" + self.printDebug("Writing %d bytes to UIL of the chip..." % len(image)) + self.checkChip() + self.chip.writeUserIdLocation(image) + self.flushCommands() + self.printDebug("Done writing the image.") def cmdDelay(self, seconds): """Send a delay request to the device. Note that this causes the -- cgit v1.2.3