]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/eyesIFX/byte_radio/Uart4b6bPhyP.nc
stm25p: fix seek error
[tinyos-2.x.git] / tos / platforms / eyesIFX / byte_radio / Uart4b6bPhyP.nc
index dce79576a1fb2df597f2cebc611ac65ccf759a65..8976f47d6b34fe8c9bbaa6a05dabde7b957a185e 100644 (file)
@@ -83,7 +83,7 @@ implementation
     /* constants */
     enum {
         PREAMBLE_LENGTH=2,
-        BYTE_TIME=ENCODED_32KHZ_BYTE_TIME+3,
+        BYTE_TIME=TDA5250_32KHZ_BYTE_TIME+3,
         PREAMBLE_BYTE=0x55,
         SYNC_BYTE=0xFF,
         SFD_BYTE=0x83,
@@ -304,6 +304,7 @@ implementation
                             bufByte |= data & 0x03;
                             bufByte <<= 2;
                             phyState = STATE_DATA_MIDDLE;
+                            call RxByteTimer.stop();
                             signal PhyPacketRx.recvHeaderDone(SUCCESS);
                             call RxByteTimer.start(byteTime);
                         }
@@ -313,6 +314,7 @@ implementation
                     }
                     else {
                         phyState = STATE_DATA_HIGH;
+                        call RxByteTimer.stop();
                         signal PhyPacketRx.recvHeaderDone(SUCCESS);
                         call RxByteTimer.start(byteTime);
                     }
@@ -334,6 +336,7 @@ implementation
                     decodedByte = sixBitToNibble[((bufByte & 0x0f)<<2) | (data >> 4)];
                     if(decodedByte != ILLEGAL_CODE) {
                         phyState = STATE_DATA_LOW;
+                        call RxByteTimer.stop();
                         signal SerializerRadioByteComm.rxByteReady((bufByte & 0xf0) | decodedByte);
                         bufByte = (data & 0x0f) << 2;
                         call RxByteTimer.start(byteTime);
@@ -349,6 +352,7 @@ implementation
                         decodedByte = sixBitToNibble[data & 0x3f];
                         if(decodedByte != ILLEGAL_CODE) {
                             phyState = STATE_DATA_HIGH;
+                            call RxByteTimer.stop();
                             signal SerializerRadioByteComm.rxByteReady(bufByte | decodedByte);
                             call RxByteTimer.start(byteTime);
                         }