components IPAddressC;
BaseStationP.IPAddress -> IPAddressC;
+#ifdef PLATFORM_IRIS
+ BaseStationP.RadioChannel -> Radio;
+#else
components CC2420ControlC;
BaseStationP.CC2420Config -> CC2420ControlC;
+#endif
}
*/
#ifndef SIM
-#include "CC2420.h"
#endif
#include "AM.h"
#include "Serial.h"
interface PacketLink;
interface LowPowerListening;
+
+#ifdef PLATFORM_IRIS
+ interface RadioChannel;
+#else
interface CC2420Config;
+#endif
interface Leds;
case CONFIG_ECHO:
break;
case CONFIG_SET_PARM:
+#ifdef PLATFORM_IRIS
+ // we should check the return value, hope it works
+ call RadioChannel.setChannel(cmd->rf.channel);
+ call IPAddress.setShortAddr(cmd->rf.addr);
+#else
call CC2420Config.setChannel(cmd->rf.channel);
// IPAddress calls sync() for you, I think, so we'll put it second
call IPAddress.setShortAddr(cmd->rf.addr);
call CC2420Config.sync();
+#endif
radioRetries = cmd->retx.retries;
radioDelay = cmd->retx.delay;
break;
return msg;
}
-
+#ifdef PLATFORM_IRIS
+ event void RadioChannel.setChannelDone() { }
+#else
event void CC2420Config.syncDone(error_t error) {
-
}
+#endif
event void ConfigureSend.sendDone(message_t *msg, error_t error) {
echo_busy = FALSE;