X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETCCSPI.py;h=82de15d223cc77167d0753f9ecb67599d3a58243;hp=31aaae0e63d925ef614309c78fe09bbb82025b60;hb=da2bf3601df073b3df905461679168f4b7777b08;hpb=e199893f6b2a5c503abac8ebc074483246999a5e diff --git a/client/GoodFETCCSPI.py b/client/GoodFETCCSPI.py index 31aaae0..82de15d 100644 --- a/client/GoodFETCCSPI.py +++ b/client/GoodFETCCSPI.py @@ -132,6 +132,11 @@ class GoodFETCCSPI(GoodFET): fsctrl=self.peek(0x18); mhz=2048+(fsctrl&0x3ff) return mhz*1000000; + def RF_setchan(self,channel): + if channel < 11 and channel > 26: + print "Only 802.15.4 channels 11 to 26 are currently supported."; + else: + self.RF_setfreq( ( (channel-11)*5 + 2405 ) * 1000000 ); def RF_getsmac(self): """Return the source MAC address.""" return 0xdeadbeef;