+ def strobe(self,reg=0x00):
+ """Strobes a strobe register, returning the status."""
+ data=[reg];
+ self.trans(data);
+ return ord(self.data[0]);
+ def CC_RFST_IDLE(self):
+ """Switch the radio to idle mode, clearing overflows and errors."""
+ self.strobe(0x06); #SRXOFF
+ def CC_RFST_TX(self):
+ """Switch the radio to TX mode."""
+ self.strobe(0x04); #0x05 for CCA
+ def CC_RFST_RX(self):
+ """Switch the radio to RX mode."""
+ self.strobe(0x03);
+ def CC_RFST_CAL(self):
+ """Calibrate strobe the radio."""
+ self.strobe(0x02);
+ def CC_RFST(self,state=0x00):
+ self.strobe(state);
+ return;
+ def peek(self,reg,bytes=2):