X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Fchips%2Fcc1000%2FCC1000CsmaP.nc;h=698ab8cbd205f359ad79079c6cbb7da2718ffba4;hp=f5884fd4fb26b0c9bfa2a809e37373677c7b23b4;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 diff --git a/tos/chips/cc1000/CC1000CsmaP.nc b/tos/chips/cc1000/CC1000CsmaP.nc index f5884fd4..698ab8cb 100644 --- a/tos/chips/cc1000/CC1000CsmaP.nc +++ b/tos/chips/cc1000/CC1000CsmaP.nc @@ -507,29 +507,21 @@ implementation return (1000 * CC1K_LPL_CHECK_TIME) / sleepInterval; } - command void LowPowerListening.setLocalSleepInterval(uint16_t s) { + command void LowPowerListening.setLocalWakeupInterval(uint16_t s) { sleepTime = validateSleepInterval(s); } - command uint16_t LowPowerListening.getLocalSleepInterval() { + command uint16_t LowPowerListening.getLocalWakeupInterval() { return sleepTime; } - command void LowPowerListening.setLocalDutyCycle(uint16_t d) { - call LowPowerListening.setLocalSleepInterval(dutyToSleep(d)); - } - - command uint16_t LowPowerListening.getLocalDutyCycle() { - return sleepToDuty(call LowPowerListening.getLocalSleepInterval()); - } - - command void LowPowerListening.setRxSleepInterval(message_t *msg, uint16_t sleepIntervalMs) { + command void LowPowerListening.setRemoteWakeupInterval(message_t *msg, uint16_t sleepIntervalMs) { cc1000_metadata_t *meta = getMetadata(msg); meta->strength_or_preamble = -(int16_t)validateSleepInterval(sleepIntervalMs) - 1; } - command uint16_t LowPowerListening.getRxSleepInterval(message_t *msg) { + command uint16_t LowPowerListening.getRemoteWakeupInterval(message_t *msg) { cc1000_metadata_t *meta = getMetadata(msg); if (meta->strength_or_preamble >= 0) @@ -538,22 +530,6 @@ implementation return -(meta->strength_or_preamble + 1); } - command void LowPowerListening.setRxDutyCycle(message_t *msg, uint16_t d) { - return call LowPowerListening.setRxSleepInterval(msg, dutyToSleep(d)); - } - - command uint16_t LowPowerListening.getRxDutyCycle(message_t *msg) { - return sleepToDuty(call LowPowerListening.getRxSleepInterval(msg)); - } - - command uint16_t LowPowerListening.dutyCycleToSleepInterval(uint16_t d) { - return dutyToSleep(d); - } - - command uint16_t LowPowerListening.sleepIntervalToDutyCycle(uint16_t s) { - return sleepToDuty(s); - } - void setPreambleLength(message_t * ONE msg) { cc1000_metadata_t *meta = getMetadata(msg); uint16_t s;