X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fcc2420_tkn154%2FCC2420ReceiveP.nc;h=fddf5dd68188fa47aff9b99ea45b26ad69a970a8;hb=a83f67f4c22cb8c822537e525e1d254f11c7fdb6;hp=d8f8386f2beb9efc5323568320c5db1c0f21b4e1;hpb=4bf382c560b62b21e16980e7444091554bfa90a4;p=tinyos-2.x.git diff --git a/tos/chips/cc2420_tkn154/CC2420ReceiveP.nc b/tos/chips/cc2420_tkn154/CC2420ReceiveP.nc index d8f8386f..fddf5dd6 100644 --- a/tos/chips/cc2420_tkn154/CC2420ReceiveP.nc +++ b/tos/chips/cc2420_tkn154/CC2420ReceiveP.nc @@ -210,29 +210,6 @@ implementation { signal AsyncSplitControl.stopDone(SUCCESS); } - void switchToUnbufferedMode() - { - uint16_t mdmctrol1; - call CSN.set(); - call CSN.clr(); - call MDMCTRL1.read(&mdmctrol1); - mdmctrol1 &= ~0x03; - mdmctrol1 |= 0x01; - 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(); - } - /***************** CC2420Receive Commands ****************/ /** * Start frame delimiter signifies the beginning/end of a packet @@ -281,30 +258,6 @@ implementation { } } - uint8_t mhrLength(uint8_t *fcf) - { - uint8_t idCompression; - uint8_t len = MHR_INDEX_ADDRESS; - - if (fcf[MHR_INDEX_FC1] & FC1_SECURITY_ENABLED) - return 0xFF; // not supported - idCompression = (fcf[0] & FC1_PAN_ID_COMPRESSION); - if (fcf[MHR_INDEX_FC2] & 0x08){ // short or ext. address - len += 4; // pan id + short address - if (fcf[MHR_INDEX_FC2] & 0x04) // ext. address - len += 6; // diff to short address - } - if (fcf[MHR_INDEX_FC2] & 0x80){ // short or ext. address - len += 2; - if (!idCompression) - len += 2; - if (fcf[MHR_INDEX_FC2] & 0x40) // ext. address - len += 6; // diff to short address - } - return len; - } - - /***************** RXFIFO Events ****************/ /** * We received some bytes from the SPI bus. Process them in the context