summaryrefslogtreecommitdiffstats
path: root/libtoprammer/chips/microchip8
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2013-10-13 23:57:07 +0200
committerMichael Buesch <m@bues.ch>2013-10-13 23:57:07 +0200
commit262fabccc9fe221c615abd2bce8e197df20dd325 (patch)
treef22591d4ebf477eae10058acb35ac20f6d769172 /libtoprammer/chips/microchip8
parenta0a13089d20e96236b9d92ab7a8f2aa9ac868723 (diff)
downloadtoprammer-262fabccc9fe221c615abd2bce8e197df20dd325.tar.xz
toprammer-262fabccc9fe221c615abd2bce8e197df20dd325.zip
Use byte2int() instead of ord()
Signed-off-by: Michael Buesch <m@bues.ch>
Diffstat (limited to 'libtoprammer/chips/microchip8')
-rw-r--r--libtoprammer/chips/microchip8/microchip8_common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libtoprammer/chips/microchip8/microchip8_common.py b/libtoprammer/chips/microchip8/microchip8_common.py
index 3496547..ec0be85 100644
--- a/libtoprammer/chips/microchip8/microchip8_common.py
+++ b/libtoprammer/chips/microchip8/microchip8_common.py
@@ -219,7 +219,7 @@ class Chip_Microchip8_common(Chip):
self.progressMeter(wordAddr)
# do not swap following two lines
WD = (byte2int(image[wordAddr * 2 + 1]) << 8) | byte2int(image[wordAddr * 2 + 0])
- if(WD != (ord(self.defaultWord[1]) << 8) + ord(self.defaultWord[0])):
+ if(WD != (byte2int(self.defaultWord[1]) << 8) + byte2int(self.defaultWord[0])):
self.send6bitWriteInstruction(self.CMD_LOAD_DATA_FOR_PGM, WD)
self.top.cmdDelay(self.delayTdly)
self.sendWriteFlashInstr()
@@ -264,7 +264,7 @@ class Chip_Microchip8_common(Chip):
self.progressMeter(word)
# do not swap following two lines
WD = (byte2int(image[word * 2 + 1]) << 8) | byte2int(image[word * 2 + 0])
- if(WD != (ord(self.defaultWord[1]) << 8) + ord(self.defaultWord[0])):
+ if(WD != (byte2int(self.defaultWord[1]) << 8) + byte2int(self.defaultWord[0])):
self.send6bitWriteInstruction(self.CMD_LOAD_DATA_FOR_PGM, WD)
self.sendWriteFlashInstr()
self.incrementPC(1)
bues.ch cgit interface