summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2020-07-18 21:08:34 +0200
committerMichael Buesch <m@bues.ch>2020-07-19 13:10:07 +0200
commit59fdc59df0ca3d0aa82b96101048195359e5ab31 (patch)
tree48b7c72ef7cd2670394f81a7336a218d620162e3
parentb247949540eed9ec783b19a4f5dd7d72d1e6b952 (diff)
downloadtoprammer-59fdc59df0ca3d0aa82b96101048195359e5ab31.tar.xz
toprammer-59fdc59df0ca3d0aa82b96101048195359e5ab31.zip
python3: Use integer division
Signed-off-by: Michael Buesch <m@bues.ch>
-rw-r--r--libtoprammer/chips/microchip16/microchip16_common.py10
-rw-r--r--libtoprammer/chips/microchip16/pic24f04ka200dip14.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f04ka200sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f04ka201dip20.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f04ka201sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f04kl100dip14.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f04kl100sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f04kl101dip20.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f04kl101sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl200dip14.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl200sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl201dip20.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl201sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl301dip20.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl301sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl302dip28.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl302sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl401dip20.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl401sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl402dip28.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f08kl402sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f16kl401dip20.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f16kl401sip6.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f16kl402dip28.py2
-rw-r--r--libtoprammer/chips/microchip16/pic24f16kl402sip6.py2
-rw-r--r--libtoprammer/chips/microchip8/microchip8_18_common.py2
-rw-r--r--libtoprammer/chips/microchip8/microchip8_18f97j60family.py4
27 files changed, 32 insertions, 32 deletions
diff --git a/libtoprammer/chips/microchip16/microchip16_common.py b/libtoprammer/chips/microchip16/microchip16_common.py
index 301c34a..7f929ab 100644
--- a/libtoprammer/chips/microchip16/microchip16_common.py
+++ b/libtoprammer/chips/microchip16/microchip16_common.py
@@ -194,13 +194,13 @@ class Chip_Microchip16_common(Chip):
# return self.readSequentialBlock(0x0 , nrWords/2, "Reading Progmem")
# something wrong for packed PM reading below
self.enterPM()
- self.progressMeterInit("Reading flash", nrWords / 2)
+ self.progressMeterInit("Reading flash", nrWords // 2)
self.BufferedBytes = 0
self.Image = b""
self.executeCode(self.codeExitResetVector)
self.executeCode(self.getCodeInitializeTBLPAG(0, 6))
self.executeCode(self.codeInitializeW7toVISI)
- for wordAddrHalf in range(0, nrWords / 2):
+ for wordAddrHalf in range(0, nrWords // 2):
self.executeCode((0xBA0B96, 0x0, 0x0))
self.readREGOUTword()
# Microchip's bug in the documentation
@@ -241,7 +241,7 @@ class Chip_Microchip16_common(Chip):
return self.readSequentialBlock(self.eepromStartAddress , nrWords, "Reading EEPROM")
def readFuse(self):
- return self.readSequentialBlock(self.configWordAddr, self.fuseBytes / 2, "Reading Config Words")
+ return self.readSequentialBlock(self.configWordAddr, self.fuseBytes // 2, "Reading Config Words")
def tmp_readSignature(self):
self.enterPM()
@@ -347,10 +347,10 @@ class Chip_Microchip16_common(Chip):
if len(image) > nrWords * 2:
self.throwError("Invalid flash image size {:d} (expected <={:d})".format(len(image), 2 * nrWords))
self.enterPM()
- self.progressMeterInit("Writing eeprom", len(image) / 2)
+ self.progressMeterInit("Writing eeprom", len(image) // 2)
self.executeCode(self.codeExitResetVector)
self.executeCode(self.getCodeSetNVMCON(0x4004))
- for addr in range(0, len(image) / 2):
+ for addr in range(0, len(image) // 2):
self.progressMeter(addr)
WD = (byte2int(image[addr * 2 + 1]) << 8) | byte2int(image[addr * 2 + 0])
if WD != 0xFFFF:
diff --git a/libtoprammer/chips/microchip16/pic24f04ka200dip14.py b/libtoprammer/chips/microchip16/pic24f04ka200dip14.py
index 5e84503..79accde 100644
--- a/libtoprammer/chips/microchip16/pic24f04ka200dip14.py
+++ b/libtoprammer/chips/microchip16/pic24f04ka200dip14.py
@@ -41,7 +41,7 @@ class Chip_Pic24f04ka200dip14(Chip_Microchip16_common):
chipPinGND=13,
signature=b"\x02\x0d",
# flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
+ flashPageSize=0xAFE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f04ka200sip6.py b/libtoprammer/chips/microchip16/pic24f04ka200sip6.py
index 3eba029..5f3c5c8 100644
--- a/libtoprammer/chips/microchip16/pic24f04ka200sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f04ka200sip6.py
@@ -46,7 +46,7 @@ class Chip_Pic24f04ka200sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x02\x0d",
# flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
+ flashPageSize=0xAFE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f04ka201dip20.py b/libtoprammer/chips/microchip16/pic24f04ka201dip20.py
index 7d7aa4a..09a6805 100644
--- a/libtoprammer/chips/microchip16/pic24f04ka201dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f04ka201dip20.py
@@ -41,7 +41,7 @@ class Chip_Pic24f04ka201dip20(Chip_Microchip16_common):
chipPinGND=19,
signature=b"\x00\x0d",
# flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
+ flashPageSize=0xAFE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f04ka201sip6.py b/libtoprammer/chips/microchip16/pic24f04ka201sip6.py
index 3beddd7..43857e8 100644
--- a/libtoprammer/chips/microchip16/pic24f04ka201sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f04ka201sip6.py
@@ -46,7 +46,7 @@ class Chip_Pic24f04ka201sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x00\x0d",
# flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
+ flashPageSize=0xAFE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f04kl100dip14.py b/libtoprammer/chips/microchip16/pic24f04kl100dip14.py
index a0e40b8..3436aaa 100644
--- a/libtoprammer/chips/microchip16/pic24f04kl100dip14.py
+++ b/libtoprammer/chips/microchip16/pic24f04kl100dip14.py
@@ -41,7 +41,7 @@ class Chip_Pic24f04kl100dip14(Chip_Microchip16_common):
chipPinGND=13,
signature=b"\x01\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
+ flashPageSize=0xAFE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f04kl100sip6.py b/libtoprammer/chips/microchip16/pic24f04kl100sip6.py
index 37532fc..1191e85 100644
--- a/libtoprammer/chips/microchip16/pic24f04kl100sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f04kl100sip6.py
@@ -46,7 +46,7 @@ class Chip_Pic24f04kl100sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x01\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
+ flashPageSize=0xAFE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f04kl101dip20.py b/libtoprammer/chips/microchip16/pic24f04kl101dip20.py
index 39a606e..ae0508b 100644
--- a/libtoprammer/chips/microchip16/pic24f04kl101dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f04kl101dip20.py
@@ -41,7 +41,7 @@ class Chip_Pic24f04kl101dip20(Chip_Microchip16_common):
chipPinGND=19,
signature=b"\x02\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
+ flashPageSize=0xAFE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f04kl101sip6.py b/libtoprammer/chips/microchip16/pic24f04kl101sip6.py
index f71cda9..5d7983a 100644
--- a/libtoprammer/chips/microchip16/pic24f04kl101sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f04kl101sip6.py
@@ -46,7 +46,7 @@ class Chip_Pic24f04kl101sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x02\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0xAFE / 2 + 2,
+ flashPageSize=0xAFE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl200dip14.py b/libtoprammer/chips/microchip16/pic24f08kl200dip14.py
index 133b317..3d3dafe 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl200dip14.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl200dip14.py
@@ -41,7 +41,7 @@ class Chip_Pic24f08kl200dip14(Chip_Microchip16_common):
chipPinGND=13,
signature=b"\x05\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x15FE / 2 + 2,
+ flashPageSize=0x15FE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl200sip6.py b/libtoprammer/chips/microchip16/pic24f08kl200sip6.py
index 8f458be..b143d9f 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl200sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl200sip6.py
@@ -46,7 +46,7 @@ class Chip_Pic24f08kl200sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x05\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x15FE / 2 + 2,
+ flashPageSize=0x15FE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl201dip20.py b/libtoprammer/chips/microchip16/pic24f08kl201dip20.py
index 62cd6da..bb8f8b1 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl201dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl201dip20.py
@@ -41,7 +41,7 @@ class Chip_Pic24f08kl201dip20(Chip_Microchip16_common):
chipPinGND=19,
signature=b"\x06\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x15FE / 2 + 2,
+ flashPageSize=0x15FE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl201sip6.py b/libtoprammer/chips/microchip16/pic24f08kl201sip6.py
index 76171f3..46d8f0c 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl201sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl201sip6.py
@@ -46,7 +46,7 @@ class Chip_Pic24f08kl201sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x06\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x15FE / 2 + 2,
+ flashPageSize=0x15FE // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl301dip20.py b/libtoprammer/chips/microchip16/pic24f08kl301dip20.py
index 7fad647..0ed38c5 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl301dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl301dip20.py
@@ -41,7 +41,7 @@ class Chip_Pic24f08kl301dip20(Chip_Microchip16_common):
chipPinGND=19,
signature=b"\x0a\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
+ flashPageSize=0x2bfe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl301sip6.py b/libtoprammer/chips/microchip16/pic24f08kl301sip6.py
index dc8fd1e..b338d32 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl301sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl301sip6.py
@@ -46,7 +46,7 @@ class Chip_Pic24f08kl301sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x0a\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
+ flashPageSize=0x2bfe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl302dip28.py b/libtoprammer/chips/microchip16/pic24f08kl302dip28.py
index 849f27e..00703ba 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl302dip28.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl302dip28.py
@@ -41,7 +41,7 @@ class Chip_Pic24f08kl302dip28(Chip_Microchip16_common):
chipPinGND=27,
signature=b"\x00\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x15fe / 2 + 2,
+ flashPageSize=0x15fe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl302sip6.py b/libtoprammer/chips/microchip16/pic24f08kl302sip6.py
index dc37d7f..4196ab1 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl302sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl302sip6.py
@@ -46,7 +46,7 @@ class Chip_Pic24f08kl302sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x00\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x15fe / 2 + 2,
+ flashPageSize=0x15fe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl401dip20.py b/libtoprammer/chips/microchip16/pic24f08kl401dip20.py
index 8758233..48223b8 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl401dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl401dip20.py
@@ -39,7 +39,7 @@ class Chip_Pic24f08kl401dip20(Chip_Microchip16_common):
chipPinGND=19,
signature=b"\x0e\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
+ flashPageSize=0x2bfe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl401sip6.py b/libtoprammer/chips/microchip16/pic24f08kl401sip6.py
index 4578d63..6cef46c 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl401sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl401sip6.py
@@ -44,7 +44,7 @@ class Chip_Pic24f08kl401sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x0e\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
+ flashPageSize=0x2bfe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl402dip28.py b/libtoprammer/chips/microchip16/pic24f08kl402dip28.py
index 7b2c4f2..76e1257 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl402dip28.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl402dip28.py
@@ -39,7 +39,7 @@ class Chip_Pic24f08kl402dip28(Chip_Microchip16_common):
chipPinGND=27,
signature=b"\x04\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x15fe / 2 + 2,
+ flashPageSize=0x15fe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f08kl402sip6.py b/libtoprammer/chips/microchip16/pic24f08kl402sip6.py
index 67a13e8..df28ed9 100644
--- a/libtoprammer/chips/microchip16/pic24f08kl402sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f08kl402sip6.py
@@ -44,7 +44,7 @@ class Chip_Pic24f08kl402sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x04\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x15fe / 2 + 2,
+ flashPageSize=0x15fe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f16kl401dip20.py b/libtoprammer/chips/microchip16/pic24f16kl401dip20.py
index 7e6e85a..4b3d97f 100644
--- a/libtoprammer/chips/microchip16/pic24f16kl401dip20.py
+++ b/libtoprammer/chips/microchip16/pic24f16kl401dip20.py
@@ -39,7 +39,7 @@ class Chip_Pic24f16kl401dip20(Chip_Microchip16_common):
chipPinGND=19,
signature=b"\x1e\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
+ flashPageSize=0x2bfe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f16kl401sip6.py b/libtoprammer/chips/microchip16/pic24f16kl401sip6.py
index 65c6a7c..f514e79 100644
--- a/libtoprammer/chips/microchip16/pic24f16kl401sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f16kl401sip6.py
@@ -44,7 +44,7 @@ class Chip_Pic24f16kl401sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x1e\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
+ flashPageSize=0x2bfe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f16kl402dip28.py b/libtoprammer/chips/microchip16/pic24f16kl402dip28.py
index 646b16a..89655ac 100644
--- a/libtoprammer/chips/microchip16/pic24f16kl402dip28.py
+++ b/libtoprammer/chips/microchip16/pic24f16kl402dip28.py
@@ -39,7 +39,7 @@ class Chip_Pic24f16kl402dip28(Chip_Microchip16_common):
chipPinGND=27,
signature=b"\x14\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
+ flashPageSize=0x2bfe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip16/pic24f16kl402sip6.py b/libtoprammer/chips/microchip16/pic24f16kl402sip6.py
index dedb383..a1906c8 100644
--- a/libtoprammer/chips/microchip16/pic24f16kl402sip6.py
+++ b/libtoprammer/chips/microchip16/pic24f16kl402sip6.py
@@ -44,7 +44,7 @@ class Chip_Pic24f16kl402sip6(Chip_Microchip16_common):
chipPinGND = 8,
signature=b"\x14\x4b",
# flashPageSize (in number of 24bit words)
- flashPageSize=0x2bfe / 2 + 2,
+ flashPageSize=0x2bfe // 2 + 2,
# flashPageSize=0x40,
flashPages=1,
# eepromPageSize (in 16bit words)
diff --git a/libtoprammer/chips/microchip8/microchip8_18_common.py b/libtoprammer/chips/microchip8/microchip8_18_common.py
index a4ffab2..3ae3d6a 100644
--- a/libtoprammer/chips/microchip8/microchip8_18_common.py
+++ b/libtoprammer/chips/microchip8/microchip8_18_common.py
@@ -150,7 +150,7 @@ class Chip_Microchip8_18_common(Chip):
(len(image), self.userIDLocationSize))
self.enterPM()
self.executeCode((0x8EA6, 0x9CA6))
- self.progressMeterInit(infoText, len(image) / 8)
+ self.progressMeterInit(infoText, len(image) // 8)
for blockAddr in range(0, len(image), self.writeBufferSize):
#print("addr:{:x}".format(startAddr+blockAddr))
self.executeCode(self.getCodeAddrToTBLPTR(startAddr+blockAddr))
diff --git a/libtoprammer/chips/microchip8/microchip8_18f97j60family.py b/libtoprammer/chips/microchip8/microchip8_18f97j60family.py
index 8270792..6894534 100644
--- a/libtoprammer/chips/microchip8/microchip8_18f97j60family.py
+++ b/libtoprammer/chips/microchip8/microchip8_18f97j60family.py
@@ -94,10 +94,10 @@ class microchip8_18f97j60family(Chip_Microchip8_18_common):
(len(image), self.userIDLocationSize))
self.enterPM()
self.executeCode((0x8EA6, 0x9CA6))
- self.progressMeterInit(infoText, len(image) / 8)
+ self.progressMeterInit(infoText, len(image) // 8)
self.executeCode(self.getCodeAddrToTBLPTR(startAddr))
for blockAddr in range(0, len(image), 8):
self.write8bytes(image[blockAddr:])
self.progressMeter(blockAddr)
self.progressMeterFinish()
- self.exitPM() \ No newline at end of file
+ self.exitPM()
bues.ch cgit interface