X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETCCSPI.py;fp=client%2FGoodFETCCSPI.py;h=10e94bece1b50ca4da59bb8f681dbb448555081f;hp=394c7f637f24d506bfddb2e918c70cfdc49760a5;hb=945e0c205122421188e9ee25c973b9236f2e4038;hpb=071c67ecf78d9588c08fb7f0ca1b736a965f852f diff --git a/client/GoodFETCCSPI.py b/client/GoodFETCCSPI.py index 394c7f6..10e94be 100644 --- a/client/GoodFETCCSPI.py +++ b/client/GoodFETCCSPI.py @@ -256,7 +256,15 @@ class GoodFETCCSPI(GoodFET): mdmctrl0=mdmctrl0|0x800; self.poke(0x11,mdmctrl0); return; - + def RF_autocrc(self,autocrc=1): + mdmctrl0=self.peek(0x11); + return; + if autocrc==1: + mdmctrl0=mdmctrl0&(~0x0020); + else: + mdmctrl0=mdmctrl0|0x0020; + self.poke(0x11,mdmctrl0); + return; packetlen=16; def RF_setpacketlen(self,len=16): """Set the number of bytes in the expected payload."""