From: scipio Date: Mon, 16 Jun 2008 22:45:07 +0000 (+0000) Subject: Support for I-frames is on by default. X-Git-Tag: release_tinyos_2_1_0_0~279 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=81f1bef4c045127874d88fe2737cc1bf84e57d0b Support for I-frames is on by default. Fix TinyOSNetworkP to support changes to Receive and getPayload(). --- diff --git a/tos/chips/cc2420/CC2420.h b/tos/chips/cc2420/CC2420.h index 83cee7c2..a3413ec2 100644 --- a/tos/chips/cc2420/CC2420.h +++ b/tos/chips/cc2420/CC2420.h @@ -38,6 +38,10 @@ typedef uint8_t cc2420_status_t; +#ifndef TFRAMES_ENABLED +#define CC2420_IFRAME_TYPE +#endif + /** * CC2420 header. An I-frame (interoperability frame) header has an * extra network byte specified by 6LowPAN @@ -119,10 +123,10 @@ typedef nx_struct cc2420_packet_t { #endif /** - * The 6LowPAN ID has yet to be defined for a TinyOS network. + * The 6LowPAN NALP ID for a TinyOS network is 63 (TEP 125). */ #ifndef TINYOS_6LOWPAN_NETWORK_ID -#define TINYOS_6LOWPAN_NETWORK_ID 0x0 +#define TINYOS_6LOWPAN_NETWORK_ID 0x3f #endif diff --git a/tos/chips/cc2420/lowpan/CC2420TinyosNetworkP.nc b/tos/chips/cc2420/lowpan/CC2420TinyosNetworkP.nc index 0bd6dc58..6c2570c4 100644 --- a/tos/chips/cc2420/lowpan/CC2420TinyosNetworkP.nc +++ b/tos/chips/cc2420/lowpan/CC2420TinyosNetworkP.nc @@ -71,26 +71,8 @@ implementation { return call SubSend.maxPayloadLength(); } - command void* Send.getPayload(message_t* msg) { - return call SubSend.getPayload(msg); - } - - /***************** Receive Commands ****************/ - command void* Receive.getPayload(message_t* msg, uint8_t* len) { - return call SubReceive.getPayload(msg, len); - } - - command uint8_t Receive.payloadLength(message_t* msg) { - return call SubReceive.payloadLength(msg); - } - - /***************** NonTinyosReceive Commands ****************/ - command void* NonTinyosReceive.getPayload[uint8_t networkId](message_t* msg, uint8_t* len) { - return call SubReceive.getPayload(msg, len); - } - - command uint8_t NonTinyosReceive.payloadLength[uint8_t networkId](message_t* msg) { - return call SubReceive.payloadLength(msg); + command void* Send.getPayload(message_t* msg, uint8_t len) { + return call SubSend.getPayload(msg, len); } /***************** SubSend Events *****************/