From: andreaskoepke Date: Wed, 18 Jun 2008 01:25:54 +0000 (+0000) Subject: remove conflicting entry X-Git-Tag: release_tinyos_2_1_0_0~254 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=43391cb22bb15d98d9bb4c6cc766410c662762eb;p=tinyos-2.x.git remove conflicting entry --- diff --git a/tos/chips/tda5250/Tda5250RadioP.nc b/tos/chips/tda5250/Tda5250RadioP.nc index a1ea56a8..de20682e 100644 --- a/tos/chips/tda5250/Tda5250RadioP.nc +++ b/tos/chips/tda5250/Tda5250RadioP.nc @@ -55,6 +55,9 @@ module Tda5250RadioP { interface RadioByteComm; interface ResourceRequested; interface ClkDiv; +#ifdef LNDW + interface RfPower; +#endif } uses { interface HplTda5250Config; @@ -79,6 +82,27 @@ implementation { radioMode_t radioMode; // Current Mode of the Radio float onTime, offTime; +#ifdef LNDW + norace bool rfpowerdirty = FALSE; + norace uint8_t rfpower = INITIAL_RF_POWER; + task void setRfPower() { + uint8_t rp, rd; + atomic { + rp = rfpower; + rd = rfpowerdirty; + } + if(rd) { + if(call ConfigResource.immediateRequest() == SUCCESS) { + call HplTda5250Config.SetRFPower(rp); + atomic rfpowerdirty = FALSE; + } + else { + post setRfPower(); + } + } + } +#endif + /**************** Radio Init *****************/ command error_t Init.init() { radioMode = RADIO_MODE_OFF; @@ -156,6 +180,9 @@ implementation { call HplTda5250Config.SetSleepMode(); atomic radioMode = RADIO_MODE_SLEEP; signal Tda5250Control.SleepModeDone(); +#ifdef LNDW + if(rfpowerdirty) post setRfPower(); +#endif break; case RADIO_MODE_TX_TRANSITION: call HplTda5250Config.SetSlaveMode(); @@ -454,4 +481,13 @@ implementation { } default async event void ClkDiv.stopping() { } +#ifdef LNDW + async command error_t RfPower.set(uint8_t setting) { + atomic { + rfpower = setting; + rfpowerdirty = TRUE; + } + return SUCCESS; + } +#endif } diff --git a/tos/chips/tda5250/mac/RedMacP.nc b/tos/chips/tda5250/mac/RedMacP.nc index c34bcdae..6d07f267 100644 --- a/tos/chips/tda5250/mac/RedMacP.nc +++ b/tos/chips/tda5250/mac/RedMacP.nc @@ -147,10 +147,10 @@ implementation SUB_HEADER_TIME=PHY_HEADER_TIME + sizeof(message_header_t)*BYTE_TIME, SUB_FOOTER_TIME=2*BYTE_TIME, // 2 bytes crc // DEFAULT_SLEEP_TIME=1625, - DEFAULT_SLEEP_TIME=2048, + // DEFAULT_SLEEP_TIME=2048, // DEFAULT_SLEEP_TIME=4096, // DEFAULT_SLEEP_TIME=8192, - // DEFAULT_SLEEP_TIME=16384, + DEFAULT_SLEEP_TIME=16384, // DEFAULT_SLEEP_TIME=32768U, // DEFAULT_SLEEP_TIME=65535U, DATA_DETECT_TIME=17, @@ -163,8 +163,8 @@ implementation ACK_DURATION = SUB_HEADER_TIME + SUB_FOOTER_TIME, NAV_FACTOR = 4, #ifndef MAC_EVAL - MAX_SHORT_RETRY=3, - MAX_LONG_RETRY=7, + MAX_SHORT_RETRY=9, + MAX_LONG_RETRY=3, ADD_NAV = 2, INCREASE_BACKOFF = TRUE, #endif