RssiFixedThresholdCMC as Cca,
new Alarm32khz16C() as Timer,
new TimerMilliC() as ReRxTimer,
- McuSleepC,
RandomLfsrC
#ifdef MAC_DEBUG
,PlatformLedsC
;
MainC.SoftwareInit -> CsmaMacP;
-
- McuSleepC.McuPowerOverride -> CsmaMacP;
SplitControl = CsmaMacP;
interface MacSend;
interface MacReceive;
interface Packet;
- interface McuPowerOverride;
}
uses {
interface StdControl as CcaStdControl;
// we don't care about urgent Resource requestes
async event void RadioResourceRequested.immediateRequested() {}
-
- /** prevent MCU from going into a too low power mode */
- async command mcu_power_t McuPowerOverride.lowestState() {
- return MSP430_POWER_LPM1;
- }
}
components MainC,
RedMacP,
RssiFixedThresholdCMC as Cca,
- new Alarm32khzC() as Timer,
- new Alarm32khzC() as SampleTimer,
+ new Alarm32khz16C() as Timer,
+ new Alarm32khz16C() as SampleTimer,
RandomLfsrC,
- McuSleepC,
- Counter32khzC;
+ Counter32khz16C as Counter;
components ActiveMessageAddressC;
RedMacP.amAddress -> ActiveMessageAddressC;
MainC.SoftwareInit -> RedMacP;
SplitControl = RedMacP;
- McuSleepC.McuPowerOverride -> RedMacP;
MacSend = RedMacP;
MacReceive = RedMacP;
Tda5250Control = RedMacP;
RedMacP.Timer -> Timer;
RedMacP.SampleTimer -> SampleTimer;
- RedMacP.Counter32khz16 -> Counter32khzC.Counter32khz16;
+ RedMacP.Counter32khz16 -> Counter;
/*
components PlatformLedsC;
RedMacP.Led0 -> PlatformLedsC.Led0;
interface SleepTime;
interface Teamgeist;
interface ChannelCongestion;
- interface McuPowerOverride;
}
uses {
interface StdControl as CcaStdControl;
SUB_FOOTER_TIME=2*BYTE_TIME, // 2 bytes crc 38400 kBit/s with 4b6b encoding
MAX_TIME_VALUE=0xFFFFFFFF,
MAXTIMERVALUE=0xFFFF, // helps to compute backoff
- //DEFAULT_SLEEP_TIME=3250,
- DEFAULT_SLEEP_TIME=6500,
+ DEFAULT_SLEEP_TIME=3250,
+ // DEFAULT_SLEEP_TIME=6500,
// DEFAULT_SLEEP_TIME=9750,
DATA_DETECT_TIME=17,
RX_SETUP_TIME=111, // time to set up receiver
async event void RadioModes.TimerModeDone() {}
async event void RadioModes.SelfPollingModeDone() {}
async event void RadioModes.PWDDDInterrupt() {}
-
- /** prevent MCU from going into a too low power mode */
- async command mcu_power_t McuPowerOverride.lowestState() {
- mcu_power_t mp;
- if(macState != SLEEP) {
- mp = MSP430_POWER_LPM1;
- }
- else {
- mp = MSP430_POWER_LPM3;
- }
- return mp;
- }
}