Created z1 platform; radio seems to work.
[goodfet] / client / GoodFETCCSPI.py
index 0068e3e..43001b8 100644 (file)
@@ -135,8 +135,8 @@ class GoodFETCCSPI(GoodFET):
         fsctrl=0x8000; #self.peek(0x18)&(~0x3FF);
         fsctrl=fsctrl+int(mhz-2048)
         self.poke(0x18,fsctrl);
-        self.strobe(0x02);//SCAL
-        self.strobe(0x03);//SRXON
+        self.strobe(0x02);#SCAL
+        self.strobe(0x03);#SRXON
     def RF_getfreq(self):
         """Get the frequency in Hz."""
         fsctrl=self.peek(0x18);
@@ -188,9 +188,10 @@ class GoodFETCCSPI(GoodFET):
         #self.strobe(0x09);
         return;
     
-    def RF_reflexjam(self):
+    def RF_reflexjam(self,duration=0):
         """Place the device into reflexive jamming mode."""
-        data = "";
+        data = [duration&0xff,
+                (duration>>8)&0xff];
         self.writecmd(self.CCSPIAPP,0xA0,len(data),data);
         return;