From: mmaroti Date: Wed, 25 Feb 2009 23:27:59 +0000 (+0000) Subject: fix setChannel in SLEEP state X-Git-Tag: rc_6_tinyos_2_1_1~483 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=067846106218ec3bae21124aff89a302e05af43e fix setChannel in SLEEP state --- diff --git a/tos/chips/rf230/RF230LayerP.nc b/tos/chips/rf230/RF230LayerP.nc index 9c0a3624..4bdfb512 100644 --- a/tos/chips/rf230/RF230LayerP.nc +++ b/tos/chips/rf230/RF230LayerP.nc @@ -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; }