* 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;
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
}