summaryrefslogtreecommitdiffstats
path: root/libtoprammer/main.py
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2013-06-16 20:36:00 +0200
committerMichael Buesch <m@bues.ch>2013-06-16 20:36:00 +0200
commit46b4d210eb05b659761681362a636025514ff4e6 (patch)
tree68e0ffe2255a7ec292d4d5f82623f9896a0a1890 /libtoprammer/main.py
parenta96a314d18d7135c785f15516142a2f101583f44 (diff)
downloadtoprammer-46b4d210eb05b659761681362a636025514ff4e6.tar.xz
toprammer-46b4d210eb05b659761681362a636025514ff4e6.zip
Add support for more Microchip and Atmel microcontrollers
Implementation by Pavel Štemberk <stemberk@gmail.com> Signed-off-by: Michael Buesch <m@bues.ch>
Diffstat (limited to 'libtoprammer/main.py')
-rw-r--r--libtoprammer/main.py17
1 files changed, 17 insertions, 0 deletions
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
bues.ch cgit interface