- def RF_rxpacket_old(self):
- """Get a packet from the radio. Returns None if none is waiting. In
- order to not require the SFD, FIFO, or FIFOP lines, this
- implementation works by comparing the buffer to the older
- contents.
- """
- self.strobe(0x03); #SRXON
- self.strobe(0x08); #SFLUSHRX
-
- buffer=range(0,0xff);
- buffer[0]=0x3F | 0x40; #RXFIFO
- buffer=self.trans(buffer);
-
- new=False;
- for foo in range(0,ord(buffer[0])):
- if buffer[foo]!=self.lastpacket[foo]:
- new=True;
- if not new:
- return None;
-
-
- self.lastpacket=buffer;
- return buffer;
+ def RF_txpacket(self,packet):
+ """Send a packet through the radio."""
+ self.writecmd(self.CCSPIAPP,0x81,len(packet),packet);
+ #time.sleep(1);
+ #self.strobe(0x09);
+ return;
+