+ def CCpeekirambyte(self,adr):
+ """Read the contents of IRAM at an address."""
+ self.data=[adr&0xff];
+ self.writecmd(0x30,0x02, 1, self.data);
+ return ord(self.data[0]);
+ def CCpeekiramword(self,adr):
+ """Read the little-endian contents of IRAM at an address."""
+ return self.CCpeekirambyte(adr)+(
+ self.CCpeekirambyte(adr+1)<<8);
+ def CCpokeiramword(self,adr,val):
+ self.CCpokeirambyte(adr,val&0xff);
+ self.CCpokeirambyte(adr+1,(val>>8)&0xff);
+ def CCpokeirambyte(self,adr,val):
+ """Write the contents of IRAM at an address."""
+ self.data=[adr&0xff, val&0xff];
+ self.writecmd(0x30,0x02, 2, self.data);
+ return ord(self.data[0]);
+