[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250
HplTda5250DataP.nc, 1.1.2.12, 1.1.2.13 Tda5250RadioP.nc,
1.1.2.15, 1.1.2.16
Philipp Huppertz
phihup at users.sourceforge.net
Thu Nov 30 05:33:39 PST 2006
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv4175/tos/chips/tda5250
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
HplTda5250DataP.nc Tda5250RadioP.nc
Log Message:
- setModeTx/Rx no must be called before requesting (configuring the device) :
reason: UartControl removed, now uart mode is set in configure
Index: HplTda5250DataP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/HplTda5250DataP.nc,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -C2 -d -r1.1.2.12 -r1.1.2.13
*** HplTda5250DataP.nc 7 Nov 2006 23:15:09 -0000 1.1.2.12
--- HplTda5250DataP.nc 30 Nov 2006 13:33:36 -0000 1.1.2.13
***************
*** 124,139 ****
async command error_t HplTda5250DataControl.setToTx() {
- if(call UartResource.isOwner() == FALSE)
- return FAIL;
call UartDataControl.setToTx();
- call Uart.disableReceiveInterrupt();
return SUCCESS;
}
async command error_t HplTda5250DataControl.setToRx() {
- if(call UartResource.isOwner() == FALSE)
- return FAIL;
call UartDataControl.setToRx();
- call Uart.enableReceiveInterrupt();
return SUCCESS;
}
--- 124,133 ----
Index: Tda5250RadioP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/Tda5250RadioP.nc,v
retrieving revision 1.1.2.15
retrieving revision 1.1.2.16
diff -C2 -d -r1.1.2.15 -r1.1.2.16
*** Tda5250RadioP.nc 27 Nov 2006 15:31:39 -0000 1.1.2.15
--- Tda5250RadioP.nc 30 Nov 2006 13:33:36 -0000 1.1.2.16
***************
*** 194,209 ****
atomic mode = radioMode;
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();
! break;
! default:
! break;
}
}
--- 194,207 ----
atomic mode = radioMode;
switch(mode) {
! case RADIO_MODE_TX_TRANSITION:
! atomic radioMode = RADIO_MODE_TX;
! signal Tda5250Control.TxModeDone();
! break;
! case RADIO_MODE_RX_TRANSITION:
! atomic radioMode = RADIO_MODE_RX;
! signal Tda5250Control.RxModeDone();
! break;
! default:
! break;
}
}
***************
*** 335,349 ****
}
if(mode == RADIO_MODE_TX_TRANSITION) {
! call DataResource.release();
! if (call HplTda5250Config.IsTxRxPinControlled()) {
! switchConfigResource();
} else {
! if (call ConfigResource.immediateRequest() == SUCCESS) {
! switchConfigResource();
! } else {
! call ConfigResource.request();
! }
}
! return SUCCESS;
}
return FAIL;
--- 333,348 ----
}
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;
}
return FAIL;
***************
*** 359,373 ****
}
if(mode == RADIO_MODE_RX_TRANSITION) {
! call DataResource.release();
! if (call HplTda5250Config.IsTxRxPinControlled()) {
! switchConfigResource();
! } else {
! if (call ConfigResource.immediateRequest() == SUCCESS) {
! switchConfigResource();
! } else {
! call ConfigResource.request();
! }
! }
! return SUCCESS;
}
return FAIL;
--- 358,373 ----
}
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;
}
return FAIL;
***************
*** 402,445 ****
atomic { delay = delayTimer; }
switch (delay) {
! case RSSISTABLE_DELAY :
! signal Tda5250Control.RssiStable();
! break;
! case RECEIVER_DELAY :
! delayTimer = RSSISTABLE_DELAY;
! call DelayTimer.start(TDA5250_RSSI_STABLE_TIME-TDA5250_RECEIVER_SETUP_TIME);
! if (call DataResource.immediateRequest() == SUCCESS) {
! switchDataResource();
! } else {
! call DataResource.request();
! }
! break;
! case TRANSMITTER_DELAY :
! if (call DataResource.immediateRequest() == SUCCESS) {
! switchDataResource();
! } else {
! call DataResource.request();
! }
! break;
}
! }
! default async event void ResourceRequested.requested() {
! }
! default async event void ResourceRequested.immediateRequested() {
! }
! default async event void Tda5250Control.TimerModeDone(){
! }
! default async event void Tda5250Control.SelfPollingModeDone(){
! }
! default async event void Tda5250Control.RxModeDone(){
! }
! default async event void Tda5250Control.TxModeDone(){
! }
! default async event void Tda5250Control.SleepModeDone(){
! }
! default async event void Tda5250Control.PWDDDInterrupt() {
! }
! default async event void RadioByteComm.rxByteReady(uint8_t data) {
! }
! default async event void RadioByteComm.txByteReady(error_t error) {
! }
}
--- 402,446 ----
atomic { delay = delayTimer; }
switch (delay) {
! case RSSISTABLE_DELAY :
! signal Tda5250Control.RssiStable();
! break;
! case RECEIVER_DELAY :
! delayTimer = RSSISTABLE_DELAY;
! call DelayTimer.start(TDA5250_RSSI_STABLE_TIME-TDA5250_RECEIVER_SETUP_TIME);
! if (call DataResource.immediateRequest() == SUCCESS) {
! switchDataResource();
! } else {
! call DataResource.request();
! }
! break;
! case TRANSMITTER_DELAY :
! if (call DataResource.immediateRequest() == SUCCESS) {
! switchDataResource();
! } else {
! call DataResource.request();
! }
! break;
}
! }
!
! default async event void ResourceRequested.requested() {
! }
! default async event void ResourceRequested.immediateRequested() {
! }
! default async event void Tda5250Control.TimerModeDone(){
! }
! default async event void Tda5250Control.SelfPollingModeDone(){
! }
! default async event void Tda5250Control.RxModeDone(){
! }
! default async event void Tda5250Control.TxModeDone(){
! }
! default async event void Tda5250Control.SleepModeDone(){
! }
! default async event void Tda5250Control.PWDDDInterrupt() {
! }
! default async event void RadioByteComm.rxByteReady(uint8_t data) {
! }
! default async event void RadioByteComm.txByteReady(error_t error) {
! }
}
More information about the Tinyos-2-commits
mailing list