- #print "mdmctrl0 was %04x" % mdmctrl0;
- mdmctrl0=mdmctrl0&(~0x800);
- #print "mdmctrl0 is now %04x" % mdmctrl0;
+ if promiscuous>0:
+ mdmctrl0=mdmctrl0&(~0x800);
+ else:
+ mdmctrl0=mdmctrl0|0x800;
+ self.poke(0x11,mdmctrl0);
+ return;
+ def RF_autocrc(self,autocrc=1):
+ mdmctrl0=self.peek(0x11);
+ if autocrc==0:
+ mdmctrl0=mdmctrl0&(~0x0020);
+ else:
+ mdmctrl0=mdmctrl0|0x0020;
+ self.poke(0x11,mdmctrl0);
+ return;
+ def RF_autoack(self,autoack=1):
+ mdmctrl0=self.peek(0x11);
+ if autoack==0:
+ mdmctrl0=mdmctrl0&(~0x0010);
+ else:
+ mdmctrl0=mdmctrl0|0x0010;