interface PacketField<uint8_t> as PacketRSSI;
interface PacketField<uint8_t> as PacketTimeSyncOffset;
- interface PacketTimeStamp<TRF230, uint32_t>;
- interface LocalTime<TRF230>;
+ interface PacketTimeStamp<TRadio, uint32_t>;
+ interface LocalTime<TRadio>;
interface RF230Config;
interface Tasklet;
/*----------------- CHANNEL -----------------*/
+ tasklet_async command uint8_t RadioState.getChannel()
+ {
+ return channel;
+ }
+
tasklet_async command error_t RadioState.setChannel(uint8_t c)
{
c &= RF230_CHANNEL_MASK;
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;
}