X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Fchips%2Fcc2420%2Flowpan%2FCC2420TinyosNetworkC.nc;h=62d063153cd7904ae11eabc79316f721bca40571;hp=3581b120f0d91b0d4d8b1fc87ad2c13c2a2a3b64;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 diff --git a/tos/chips/cc2420/lowpan/CC2420TinyosNetworkC.nc b/tos/chips/cc2420/lowpan/CC2420TinyosNetworkC.nc index 3581b120..62d06315 100644 --- a/tos/chips/cc2420/lowpan/CC2420TinyosNetworkC.nc +++ b/tos/chips/cc2420/lowpan/CC2420TinyosNetworkC.nc @@ -57,11 +57,16 @@ */ #include "CC2420.h" +#include "Ieee154.h" configuration CC2420TinyosNetworkC { provides { + interface Resource[uint8_t clientId]; interface Send; interface Receive; + + interface Send as ActiveSend; + interface Receive as ActiveReceive; } uses { @@ -72,21 +77,27 @@ configuration CC2420TinyosNetworkC { implementation { -#ifdef CC2420_IFRAME_TYPE + enum { + TINYOS_N_NETWORKS = uniqueCount(RADIO_SEND_RESOURCE), + }; + + components MainC; components CC2420TinyosNetworkP; components CC2420PacketC; - - CC2420TinyosNetworkP.Send = Send; - CC2420TinyosNetworkP.Receive = Receive; + components new FcfsResourceQueueC(TINYOS_N_NETWORKS); + + CC2420TinyosNetworkP.BareSend = Send; + CC2420TinyosNetworkP.BareReceive = Receive; CC2420TinyosNetworkP.SubSend = SubSend; CC2420TinyosNetworkP.SubReceive = SubReceive; - - CC2420TinyosNetworkP.CC2420PacketBody -> CC2420PacketC; + CC2420TinyosNetworkP.Resource = Resource; + CC2420TinyosNetworkP.ActiveSend = ActiveSend; + CC2420TinyosNetworkP.ActiveReceive = ActiveReceive; -#else - Send = SubSend; - Receive = SubReceive; -#endif + CC2420TinyosNetworkP.CC2420Packet -> CC2420PacketC; + CC2420TinyosNetworkP.CC2420PacketBody -> CC2420PacketC; + CC2420TinyosNetworkP.Queue -> FcfsResourceQueueC; + MainC.SoftwareInit -> FcfsResourceQueueC; }