def recvChecksum():
global last_checksum
- # get checksum
last_checksum = recvByte()
last_checksum |= (recvByte() << 8)
# get checksum
recvChecksum()
+# TODO: test this function!
+def cmdCALL(address):
+ # send CALL command
+ sendByte(0x01)
+ if (recvByte() != 0xF1):
+ raise Exception
+ sendByte(0x04)
+ if (recvByte() != 0x84):
+ raise Exception
+ # tell desired address
+ sendDWord(address)
+ # wait for return parameter - not needed here!
+ #return recvByte()
+
+# TODO: test this function!
+def cmdCHECKSUM():
+ # call CHECKSUM command
+ sendByte(0x01)
+ if (recvByte() != 0xF1):
+ raise Exception
+ sendByte(0x05)
+ if (recvByte() != 0x84):
+ raise Exception
+ # get checksum
+ recvChecksum()
+
def cmdBAUDRATE(baudrate):
global last_checksum
sys.exit(0)
"""
+#cmdCALL(0x00030000)
+cmdCALL(0x00033ffc)
+sys.exit(0)
+
+# read something from the IRAM
+#print cmdREAD(0x00030000, 32)
+
+#data = []
+#for i in range(0, 32):
+# data.append(i)
+#cmdWRITE(0x00030000, 32, data)
+
# write something to the begin of the IRAM
data_wr = []