From e873dcc6c19a8a41d5f217570941551715fd29a5 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Sun, 29 Apr 2012 11:48:38 +0200 Subject: m24cxx: Remove addr-ok bit from addresses Signed-off-by: Michael Buesch --- libtoprammer/chips/m24cxxdip8.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libtoprammer/chips') 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): -- cgit v1.2.3