]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420_tkn154/CC2420ControlP.nc
- removed some unused code
[tinyos-2.x.git] / tos / chips / cc2420_tkn154 / CC2420ControlP.nc
index 6b8eac0df8130ce505c22c22c076e676d9725aaf..030f8afcf21ca8f1e364544f1e636a957e0610ce 100644 (file)
@@ -73,10 +73,7 @@ module CC2420ControlP {
   uses interface CC2420Strobe as SFLUSHRX;
   uses interface CC2420Register as TXCTRL;
   uses interface AMPacket;
-  
   uses interface Resource as SpiResource;
-
-  uses interface Leds;
   uses interface FrameUtility;
 }
 
@@ -160,31 +157,6 @@ implementation {
     signal Resource.granted();
   }
 
-  void switchToUnbufferedMode()
-  {
-    uint16_t mdmctrol1;
-    call CSN.set();
-    call CSN.clr();
-    call MDMCTRL1.read(&mdmctrol1);
-    call CSN.set();
-    mdmctrol1 &= ~0x0003;
-    mdmctrol1 |= 0x0000;
-    call CSN.clr();
-    call MDMCTRL1.write(mdmctrol1);
-    call CSN.set();
-  }
-
-  void switchToBufferedMode()
-  {
-    uint16_t mdmctrol1;
-    call CSN.set();
-    call CSN.clr();
-    call MDMCTRL1.read(&mdmctrol1);
-    mdmctrol1 &= ~0x03;
-    call MDMCTRL1.write(mdmctrol1);
-    call CSN.set();
-  }
-
   /***************** CC2420Power Commands ****************/
   async command error_t CC2420Power.startVReg() {
     atomic {
@@ -290,7 +262,7 @@ implementation {
         // Always read at least one byte from the RXFIFO before 
         // issuing the SFLUSHRX command strobe" (CC2420 Datasheet)
         call CSN.clr();
-        call RXFIFO_REGISTER.read(&dummy); // reading 1 byte would be enough...
+        call RXFIFO_REGISTER.read(&dummy); // reading the byte
         call CSN.set();
         call CSN.clr();
         // "SFLUSHRX command strobe should be issued twice to ensure 
@@ -398,6 +370,7 @@ implementation {
   async command bool CC2420Config.needsSync(){
     atomic return m_needsSync;
   }
+
   /**
    * Sync must be called to commit software parameters configured on
    * the microcontroller (through the CC2420Config interface) to the
@@ -449,10 +422,6 @@ implementation {
   /***************** StartupAlarm Events ****************/
   async event void StartupAlarm.fired() {
     if ( m_state == S_VREG_STARTING ) {
-      cc2420_status_t status;
-      do {
-       status = call SNOP.strobe();  
-      } while (!(status & CC2420_STATUS_XOSC16M_STABLE));
       m_state = S_VREG_STARTED;
       call RSTN.clr();
       call RSTN.set();