+def pkernCHIPERASE():
+ sendByte(0x15)
+ if (recvByte() != 0x45):
+ raise Exception
+ print "wait..."
+ if (recvByte() != 0x23):
+ raise Exception
+ print "Chip erasing done."
+
+def pkernERASE(address, size):
+ sendByte(0x12)
+ if (recvByte() != 0x11):
+ raise Exception
+ sendDWord(address)
+ sendWord(size)
+ if (recvByte() != 0x18):
+ raise Exception
+ print "Erasing done."
+
+