X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Ftda5250%2Fmac%2FCsmaMacC.nc;h=4810c5a5339fe939af016830a7ae6e726f90920b;hb=a17321a72cfe58782f13e2b27afff01fae9b9e39;hp=4a246cbec90ebc26d92e6aa5936918d256c4fdb3;hpb=1ba974b83d19fc41bf80acd52726f36f7f1df297;p=tinyos-2.x.git diff --git a/tos/chips/tda5250/mac/CsmaMacC.nc b/tos/chips/tda5250/mac/CsmaMacC.nc index 4a246cbe..4810c5a5 100644 --- a/tos/chips/tda5250/mac/CsmaMacC.nc +++ b/tos/chips/tda5250/mac/CsmaMacC.nc @@ -25,47 +25,58 @@ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * -*/ + */ /** - * Confuguration for the CsmaMac. + * Configuration for the CsmaMac. * * @author: Kevin Klues (klues@tkn.tu-berlin.de) * @author: Andreas Koepke (koepke@tkn.tu-berlin.de) * @author: Philipp Huppertz (huppertz@tkn.tu-berlin.de) */ + +// #define MAC_DEBUG configuration CsmaMacC { provides { interface SplitControl; interface MacSend; interface MacReceive; + interface Packet; } uses { interface PhySend as PacketSend; interface PhyReceive as PacketReceive; - + interface Packet as SubPacket; interface Tda5250Control; interface UartPhyControl; + interface RadioTimeStamping; } } implementation { - components MainC, + components Tda5250RadioC, CsmaMacP, RssiFixedThresholdCMC as Cca, - new Alarm32khzC() as Timer, - RandomLfsrC, - PlatformLedsC; - - MainC.SoftwareInit -> CsmaMacP; - + new Alarm32khz16C() as Timer, + new TimerMilliC() as ReRxTimer, + DuplicateC, + TimeDiffC, + LocalTimeC, + RandomLfsrC +#ifdef MAC_DEBUG + ,PlatformLedsC +#endif + ; + SplitControl = CsmaMacP; MacSend = CsmaMacP; MacReceive = CsmaMacP; Tda5250Control = CsmaMacP; UartPhyControl = CsmaMacP; + RadioTimeStamping = CsmaMacP; + CsmaMacP = Packet; + CsmaMacP = SubPacket; CsmaMacP = PacketSend; CsmaMacP = PacketReceive; @@ -73,12 +84,26 @@ implementation { CsmaMacP.ChannelMonitor -> Cca.ChannelMonitor; CsmaMacP.ChannelMonitorData -> Cca.ChannelMonitorData; CsmaMacP.ChannelMonitorControl -> Cca.ChannelMonitorControl; + CsmaMacP.RssiAdcResource -> Cca.RssiAdcResource; + + components ActiveMessageAddressC; + CsmaMacP.amAddress -> ActiveMessageAddressC; + CsmaMacP.Random -> RandomLfsrC; + CsmaMacP.RadioResourceRequested -> Tda5250RadioC.ResourceRequested; + CsmaMacP.Timer -> Timer; - CsmaMacP.Led0 -> PlatformLedsC.Led0; - CsmaMacP.Led1 -> PlatformLedsC.Led1; - CsmaMacP.Led2 -> PlatformLedsC.Led2; - CsmaMacP.Led3 -> PlatformLedsC.Led3; + + CsmaMacP.ReRxTimer -> ReRxTimer; + + CsmaMacP.Duplicate -> DuplicateC; + CsmaMacP.TimeDiff16 -> TimeDiffC; + CsmaMacP.LocalTime32kHz -> LocalTimeC; + +#ifdef MACM_DEBUG + components new SerialDebugC() as SD; + CsmaMacP.SerialDebug -> SD; +#endif }