]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/IPBaseStation/BaseStationC.nc
add support for IRIS (it was CC2420 specific)
[tinyos-2.x.git] / apps / IPBaseStation / BaseStationC.nc
index aa36022ef6eeec6d9ea6fdad5ae693090665e5ae..cbb067a965e02493a7a21ad4196489382de4b7fb 100644 (file)
@@ -84,10 +84,19 @@ z * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
  * @author Philip Levis
  * @date August 10 2005
  */
+#include <Ieee154.h>
 
 configuration BaseStationC {
 }
 implementation {
+
+  enum {
+    // becasue we're the only one's using the radio, we're lazy and
+    // don't acquire the resource.  For some reason, it seems to crash
+    // occasionally if we don't do this.
+    RESOURCE_IDX = unique(IEEE154_SEND_CLIENT),
+  };
+
   components MainC, BaseStationP, LedsC;
   components Ieee154MessageC as Radio;
   components SerialDispatcherC as SerialControl, Serial802_15_4C as Serial;
@@ -124,6 +133,10 @@ implementation {
   components IPAddressC;
   BaseStationP.IPAddress -> IPAddressC;
 
+#ifdef PLATFORM_IRIS
+  BaseStationP.RadioChannel -> Radio;
+#else
   components CC2420ControlC;
   BaseStationP.CC2420Config -> CC2420ControlC;
+#endif
 }