From: travisutk Date: Thu, 9 Dec 2010 19:00:14 +0000 (+0000) Subject: Added CC1110 radio strobes. Will be useful for generalizing things later. X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=18498457d8d67364c94972b01edd768808c78227 Added CC1110 radio strobes. Will be useful for generalizing things later. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@778 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/client/GoodFETCC.py b/client/GoodFETCC.py index b14b713..3fe5870 100644 --- a/client/GoodFETCC.py +++ b/client/GoodFETCC.py @@ -145,9 +145,32 @@ class GoodFETCC(GoodFET): self.shellcode(code); return; def RF_idle(self): - RFST=0xDFE1 - self.pokebyte(RFST,0x04); #Return to idle state. + """Move the radio to its idle state.""" + self.CC_RFST_IDLE(); + return; + #Chipcon RF strobes. CC1110 specific + RFST_IDLE=0x04; + RFST_RX=0x02; + RFST_TX=0x03; + RFST_CAL=0x01; + def CC_RFST_IDLE(self): + """Switch the radio to idle mode, clearing overflows and errors.""" + self.CC_RFST(self.RFST_IDLE); + def CC_RFST_TX(self): + """Switch the radio to TX mode.""" + self.CC_RFST(self.RFST_TX); + def CC_RFST_RX(self): + """Switch the radio to RX mode.""" + self.CC_RFST(self.RFST_RX); + def CC_RFST_CAL(self): + """Calibrate strobe the radio.""" + self.CC_RFST(self.RFST_CAL); + def CC_RFST(self,state=RFST_IDLE): + RFST=0xDFE1 + self.pokebyte(RFST,state); #Return to idle state. + return; + def config_simpliciti(self,band="none"): self.pokebysym("FSCTRL1" , 0x08) # Frequency synthesizer control. self.pokebysym("FSCTRL0" , 0x00) # Frequency synthesizer control. diff --git a/client/goodfet.cc b/client/goodfet.cc index 10ed3cf..14709b3 100755 --- a/client/goodfet.cc +++ b/client/goodfet.cc @@ -119,7 +119,6 @@ if(sys.argv[1]=="reflex"): print "JAMMING JAMMING JAMMING JAMMING"; if(sys.argv[1]=="sniffsimpliciti"): - #Reversal of transmitter code from nRF_CMD.c of OpenBeacon #TODO remove all poke() calls. client.CC1110_crystal();