]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
fix setChannel in SLEEP state
authormmaroti <mmaroti>
Wed, 25 Feb 2009 23:27:59 +0000 (23:27 +0000)
committermmaroti <mmaroti>
Wed, 25 Feb 2009 23:27:59 +0000 (23:27 +0000)
tos/chips/rf230/RF230LayerP.nc

index 9c0a3624459c23831c40a21e984dadd8b4e1a340..4bdfb51257553ada0edb0647951767fea0d66e10 100644 (file)
@@ -324,6 +324,9 @@ implementation
                        readRegister(RF230_IRQ_STATUS); // clear the interrupt register
                        call IRQ.captureRisingEdge();
 
+                       // setChannel was ignored in SLEEP because the SPI was not working, so do it here
+                       writeRegister(RF230_PHY_CC_CCA, RF230_CCA_MODE_VALUE | channel);
+
                        writeRegister(RF230_TRX_STATE, RF230_RX_ON);
                        state = STATE_TRX_OFF_2_RX_ON;
                }