summaryrefslogtreecommitdiffstats
path: root/libtoprammer/chips/m24cxxdip8.py
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2012-04-29 11:48:38 +0200
committerMichael Buesch <m@bues.ch>2012-04-29 11:48:38 +0200
commite873dcc6c19a8a41d5f217570941551715fd29a5 (patch)
tree95934b0acf454185725e600a0bf1a90819a500ae /libtoprammer/chips/m24cxxdip8.py
parentab51bb23b3609597636bca518b6c3848cd65ce22 (diff)
downloadtoprammer-e873dcc6c19a8a41d5f217570941551715fd29a5.tar.xz
toprammer-e873dcc6c19a8a41d5f217570941551715fd29a5.zip
m24cxx: Remove addr-ok bit from addresses
Signed-off-by: Michael Buesch <m@bues.ch>
Diffstat (limited to 'libtoprammer/chips/m24cxxdip8.py')
-rw-r--r--libtoprammer/chips/m24cxxdip8.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/libtoprammer/chips/m24cxxdip8.py b/libtoprammer/chips/m24cxxdip8.py
index 8d3f156..6a813a5 100644
--- a/libtoprammer/chips/m24cxxdip8.py
+++ b/libtoprammer/chips/m24cxxdip8.py
@@ -106,14 +106,14 @@ class Chip_m24cXXdip8_common(Chip):
self.progressMeterFinish()
def __readData(self):
- self.top.cmdFPGARead(0x10)
+ self.top.cmdFPGARead(0)
def __setData(self, dataByte):
- self.top.cmdFPGAWrite(0x12, dataByte & 0xFF)
+ self.top.cmdFPGAWrite(2, dataByte & 0xFF)
def __setAddress(self, address, writeMode):
# Address base
- self.top.cmdFPGAWrite(0x11, address & 0xFF)
+ self.top.cmdFPGAWrite(1, address & 0xFF)
# Address extension
sizeMask = self.eepromSize - 1
assert(sizeMask & ~0x7FF == 0)
@@ -148,7 +148,7 @@ class Chip_m24cXXdip8_common(Chip):
WC=WC)
def __runCommand(self, command, busyWait=False):
- self.top.cmdFPGAWrite(0x10, command & 0xFF)
+ self.top.cmdFPGAWrite(0, command & 0xFF)
if busyWait:
self.__busyWait()
else:
@@ -168,7 +168,7 @@ class Chip_m24cXXdip8_common(Chip):
self.throwError("Timeout in busywait.")
def __getStatusFlags(self):
- self.top.cmdFPGARead(0x11)
+ self.top.cmdFPGARead(1)
stat = self.top.cmdReadBufferReg8()
busy0 = bool(stat & 0x01)
busy1 = bool(stat & 0x02)
@@ -190,7 +190,7 @@ class Chip_m24cXXdip8_common(Chip):
value |= (1 << 5)
if WC:
value |= (1 << 6)
- self.top.cmdFPGAWrite(0x13, value)
+ self.top.cmdFPGAWrite(3, value)
class Chip_m24c01dip8(Chip_m24cXXdip8_common):
def __init__(self):
bues.ch cgit interface