[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250
Tda5250RadioP.nc, 1.1.2.7.4.1, 1.1.2.7.4.2
Philipp Huppertz
phihup at users.sourceforge.net
Thu Oct 5 01:25:46 PDT 2006
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/le LinkEstimator.h,
1.1.2.1, 1.1.2.2 LinkEstimator.nc, 1.1.2.1,
1.1.2.2 LinkEstimatorP.nc, 1.1.2.1, 1.1.2.2
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/eyesIFX
ActiveMessageC.nc, 1.1.2.6, 1.1.2.6.2.1 eyesIFXSerialP.nc,
1.1.2.1.8.1, 1.1.2.1.8.2 .family, 1.1.2.4,
1.1.2.4.2.1 RadioDataLinkC.nc, 1.1.2.6,
1.1.2.6.2.1 Msp430Timer32khzMapC.nc, 1.1.2.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23959/tos/chips/tda5250
Modified Files:
Tag: tos-2-msp430-usart-configure-candidate
Tda5250RadioP.nc
Log Message:
- optimized version of usart configure using unions
Index: Tda5250RadioP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/Tda5250RadioP.nc,v
retrieving revision 1.1.2.7.4.1
retrieving revision 1.1.2.7.4.2
diff -C2 -d -r1.1.2.7.4.1 -r1.1.2.7.4.2
*** Tda5250RadioP.nc 14 Jul 2006 21:38:51 -0000 1.1.2.7.4.1
--- Tda5250RadioP.nc 5 Oct 2006 08:25:44 -0000 1.1.2.7.4.2
***************
*** 51,62 ****
interface Tda5250Control;
interface RadioByteComm;
! // ResourceRequest;
}
uses {
interface HplTda5250Config;
interface HplTda5250Data;
interface Resource as ConfigResource;
interface Resource as DataResource;
! //interface ResourceRequested as DataResourceRequest;
interface Alarm<T32khz, uint16_t> as DelayTimer;
--- 51,63 ----
interface Tda5250Control;
interface RadioByteComm;
! interface ResourceRequested;
}
uses {
interface HplTda5250Config;
interface HplTda5250Data;
+ interface HplTda5250DataControl;
interface Resource as ConfigResource;
interface Resource as DataResource;
! interface ResourceRequested as DataResourceRequested;
interface Alarm<T32khz, uint16_t> as DelayTimer;
***************
*** 148,152 ****
call HplTda5250Config.SetSlaveMode();
call HplTda5250Config.SetSleepMode();
! call ConfigResource.release();
atomic radioMode = RADIO_MODE_SLEEP;
signal Tda5250Control.SleepModeDone();
--- 149,154 ----
call HplTda5250Config.SetSlaveMode();
call HplTda5250Config.SetSleepMode();
! if (!(call HplTda5250Config.IsTxRxPinControlled()))
! call ConfigResource.release();
atomic radioMode = RADIO_MODE_SLEEP;
signal Tda5250Control.SleepModeDone();
***************
*** 155,159 ****
call HplTda5250Config.SetSlaveMode();
call HplTda5250Config.SetTxMode();
! call ConfigResource.release();
atomic delayTimer = TRANSMITTER_DELAY;
call DelayTimer.start(TDA5250_TRANSMITTER_SETUP_TIME);
--- 157,162 ----
call HplTda5250Config.SetSlaveMode();
call HplTda5250Config.SetTxMode();
! if (!(call HplTda5250Config.IsTxRxPinControlled()))
! call ConfigResource.release();
atomic delayTimer = TRANSMITTER_DELAY;
call DelayTimer.start(TDA5250_TRANSMITTER_SETUP_TIME);
***************
*** 162,166 ****
call HplTda5250Config.SetSlaveMode();
call HplTda5250Config.SetRxMode();
! call ConfigResource.release();
atomic delayTimer = RECEIVER_DELAY;
call DelayTimer.start(TDA5250_RECEIVER_SETUP_TIME);
--- 165,170 ----
call HplTda5250Config.SetSlaveMode();
call HplTda5250Config.SetRxMode();
! if (!(call HplTda5250Config.IsTxRxPinControlled()))
! call ConfigResource.release();
atomic delayTimer = RECEIVER_DELAY;
call DelayTimer.start(TDA5250_RECEIVER_SETUP_TIME);
***************
*** 192,201 ****
switch(mode) {
case RADIO_MODE_TX_TRANSITION:
! call HplTda5250Data.setToTx();
atomic radioMode = RADIO_MODE_TX;
signal Tda5250Control.TxModeDone();
break;
case RADIO_MODE_RX_TRANSITION:
! call HplTda5250Data.setToRx();
atomic radioMode = RADIO_MODE_RX;
signal Tda5250Control.RxModeDone();
--- 196,205 ----
switch(mode) {
case RADIO_MODE_TX_TRANSITION:
! //call HplTda5250DataControl.setToTx();
atomic radioMode = RADIO_MODE_TX;
signal Tda5250Control.TxModeDone();
break;
case RADIO_MODE_RX_TRANSITION:
! //call HplTda5250DataControl.setToRx();
atomic radioMode = RADIO_MODE_RX;
signal Tda5250Control.RxModeDone();
***************
*** 210,217 ****
}
! // async event void DataResourceRequest.requested() {
! // signal ResourceRequested.requested();
! // }
/**
--- 214,225 ----
}
! // information for higher layers that the DataResource has been requested
! async event void DataResourceRequested.requested() {
! signal ResourceRequested.requested();
! }
+ async event void DataResourceRequested.immediateRequested() {
+ signal ResourceRequested.immediateRequested();
+ }
/**
***************
*** 220,223 ****
--- 228,232 ----
*/
async command error_t Tda5250Control.TimerMode(float on_time, float off_time) {
+ radioMode_t mode;
atomic {
if(radioBusy() == FALSE) {
***************
*** 226,229 ****
--- 235,239 ----
offTime = off_time;
}
+ mode = radioMode;
}
if(radioMode == RADIO_MODE_TIMER_TRANSITION) {
***************
*** 240,247 ****
--- 250,259 ----
async command error_t Tda5250Control.ResetTimerMode() {
+ radioMode_t mode;
atomic {
if(radioBusy() == FALSE) {
radioMode = RADIO_MODE_TIMER_TRANSITION;
}
+ mode = radioMode;
}
if(radioMode == RADIO_MODE_TIMER_TRANSITION) {
***************
*** 258,261 ****
--- 270,274 ----
async command error_t Tda5250Control.SelfPollingMode(float on_time, float off_time) {
+ radioMode_t mode;
atomic {
if(radioBusy() == FALSE) {
***************
*** 264,267 ****
--- 277,281 ----
offTime = off_time;
}
+ mode = radioMode;
}
if(radioMode == RADIO_MODE_SELF_POLLING_TRANSITION) {
***************
*** 278,285 ****
--- 292,301 ----
async command error_t Tda5250Control.ResetSelfPollingMode() {
+ radioMode_t mode;
atomic {
if(radioBusy() == FALSE) {
radioMode = RADIO_MODE_SELF_POLLING_TRANSITION;
}
+ mode = radioMode;
}
if(radioMode == RADIO_MODE_SELF_POLLING_TRANSITION) {
***************
*** 298,312 ****
radioMode_t mode;
atomic{
- mode = radioMode;
if(radioBusy() == FALSE) {
! mode = radioMode = RADIO_MODE_SLEEP_TRANSITION;
}
}
if(mode == RADIO_MODE_SLEEP_TRANSITION) {
call DataResource.release();
! if (call ConfigResource.immediateRequest() == SUCCESS) {
switchConfigResource();
} else {
! call ConfigResource.request();
}
return SUCCESS;
--- 314,332 ----
radioMode_t mode;
atomic{
if(radioBusy() == FALSE) {
! radioMode = RADIO_MODE_SLEEP_TRANSITION;
}
+ mode = radioMode;
}
if(mode == RADIO_MODE_SLEEP_TRANSITION) {
call DataResource.release();
! if (call HplTda5250Config.IsTxRxPinControlled()) {
switchConfigResource();
} else {
! if (call ConfigResource.immediateRequest() == SUCCESS) {
! switchConfigResource();
! } else {
! call ConfigResource.request();
! }
}
return SUCCESS;
***************
*** 318,331 ****
radioMode_t mode;
atomic {
! if(radioBusy() == FALSE)
radioMode = RADIO_MODE_TX_TRANSITION;
}
- atomic mode = radioMode;
if(mode == RADIO_MODE_TX_TRANSITION) {
call DataResource.release();
! if (call ConfigResource.immediateRequest() == SUCCESS) {
switchConfigResource();
} else {
! call ConfigResource.request();
}
return SUCCESS;
--- 338,357 ----
radioMode_t mode;
atomic {
! if(radioBusy() == FALSE) {
radioMode = RADIO_MODE_TX_TRANSITION;
+ }
+ mode = radioMode;
}
if(mode == RADIO_MODE_TX_TRANSITION) {
call DataResource.release();
! call HplTda5250DataControl.setToTx();
! if (call HplTda5250Config.IsTxRxPinControlled()) {
switchConfigResource();
} else {
! if (call ConfigResource.immediateRequest() == SUCCESS) {
! switchConfigResource();
! } else {
! call ConfigResource.request();
! }
}
return SUCCESS;
***************
*** 340,351 ****
radioMode = RADIO_MODE_RX_TRANSITION;
}
}
- atomic mode = radioMode;
if(mode == RADIO_MODE_RX_TRANSITION) {
call DataResource.release();
! if (call ConfigResource.immediateRequest() == SUCCESS) {
switchConfigResource();
} else {
! call ConfigResource.request();
}
return SUCCESS;
--- 366,382 ----
radioMode = RADIO_MODE_RX_TRANSITION;
}
+ mode = radioMode;
}
if(mode == RADIO_MODE_RX_TRANSITION) {
call DataResource.release();
! call HplTda5250DataControl.setToRx();
! if (call HplTda5250Config.IsTxRxPinControlled()) {
switchConfigResource();
} else {
! if (call ConfigResource.immediateRequest() == SUCCESS) {
! switchConfigResource();
! } else {
! call ConfigResource.request();
! }
}
return SUCCESS;
***************
*** 404,407 ****
--- 435,442 ----
}
+ default async event void ResourceRequested.requested() {
+ }
+ default async event void ResourceRequested.immediateRequested() {
+ }
default async event void Tda5250Control.TimerModeDone(){
}
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/le LinkEstimator.h,
1.1.2.1, 1.1.2.2 LinkEstimator.nc, 1.1.2.1,
1.1.2.2 LinkEstimatorP.nc, 1.1.2.1, 1.1.2.2
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/eyesIFX
ActiveMessageC.nc, 1.1.2.6, 1.1.2.6.2.1 eyesIFXSerialP.nc,
1.1.2.1.8.1, 1.1.2.1.8.2 .family, 1.1.2.4,
1.1.2.4.2.1 RadioDataLinkC.nc, 1.1.2.6,
1.1.2.6.2.1 Msp430Timer32khzMapC.nc, 1.1.2.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list