X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fcc2420%2Fcsma%2FCC2420CsmaP.nc;h=42e087c86ed40bccdcddaa2e1932a6f7cabeaae3;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hp=540982f13262d9714185357005c753c0e57e6350;hpb=3ecb3b5210e3967ef0b2ea1eb8ba9c9e9d9906e1;p=tinyos-2.x.git diff --git a/tos/chips/cc2420/csma/CC2420CsmaP.nc b/tos/chips/cc2420/csma/CC2420CsmaP.nc index 540982f1..42e087c8 100644 --- a/tos/chips/cc2420/csma/CC2420CsmaP.nc +++ b/tos/chips/cc2420/csma/CC2420CsmaP.nc @@ -34,7 +34,7 @@ * @version $Revision$ $Date$ */ -module CC2420CsmaP { +module CC2420CsmaP @safe() { provides interface SplitControl; provides interface Send; @@ -72,7 +72,6 @@ implementation { /****************** Prototypes ****************/ task void startDone_task(); - task void startDone_task(); task void stopDone_task(); task void sendDone_task(); @@ -135,7 +134,11 @@ implementation { } header->length = len + CC2420_SIZE; +#ifdef CC2420_HW_SECURITY + header->fcf &= ((1 << IEEE154_FCF_ACK_REQ)|(1 << IEEE154_FCF_SECURITY_ENABLED)); +#else header->fcf &= 1 << IEEE154_FCF_ACK_REQ; +#endif header->fcf |= ( ( IEEE154_TYPE_DATA << IEEE154_FCF_FRAME_TYPE ) | ( 1 << IEEE154_FCF_INTRAPAN ) | ( IEEE154_ADDR_SHORT << IEEE154_FCF_DEST_ADDR_MODE ) | @@ -144,7 +147,7 @@ implementation { metadata->ack = FALSE; metadata->rssi = 0; metadata->lqi = 0; - metadata->timesync = FALSE; + //metadata->timesync = FALSE; metadata->timestamp = CC2420_INVALID_TIMESTAMP; ccaOn = TRUE; @@ -157,7 +160,7 @@ implementation { command void* Send.getPayload(message_t* m, uint8_t len) { if (len <= call Send.maxPayloadLength()) { - return (void* COUNT_NOK(len))m->data; + return (void* COUNT_NOK(len ))(m->data); } else { return NULL;