From 262fabccc9fe221c615abd2bce8e197df20dd325 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Sun, 13 Oct 2013 23:57:07 +0200 Subject: Use byte2int() instead of ord() Signed-off-by: Michael Buesch --- libtoprammer/chips/microchip8/microchip8_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libtoprammer/chips') 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) -- cgit v1.2.3