[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250
HplTda5250DataP.nc, 1.1.2.6, 1.1.2.6.4.1
Vlado Handziski
vlahan at users.sourceforge.net
Thu Jul 13 13:38:23 PDT 2006
- Previous message: [Tinyos-2-commits]
CVS: tinyos-2.x/doc/html install-tinyos.html, 1.3,
1.4 upgrade-tinyos.html, 1.3, 1.4
- Next message: [Tinyos-2-commits]
CVS: tinyos-2.x/tos/platforms/eyesIFX/chips/tda5250
tda5250BusResourceSettings.h, NONE, 1.1.2.1 HplTda5250DataC.nc,
1.1.2.6, 1.1.2.6.4.1 Tda5250RegCommC.nc, 1.1.2.5,
1.1.2.5.4.1 tda5250BusResourceId.h, 1.1.2.2, 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-serv20128/tos/chips/tda5250
Modified Files:
Tag: tos-2-msp430-usart-configure-candidate
HplTda5250DataP.nc
Log Message:
TDA5250 update for the new Msp430UartControl/Configure interfaces
Index: HplTda5250DataP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/HplTda5250DataP.nc,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.6.4.1
diff -C2 -d -r1.1.2.6 -r1.1.2.6.4.1
*** HplTda5250DataP.nc 31 May 2006 13:53:02 -0000 1.1.2.6
--- HplTda5250DataP.nc 13 Jul 2006 20:38:21 -0000 1.1.2.6.4.1
***************
*** 32,38 ****
--- 32,42 ----
*/
+ #include <msp430usart.h>
+ #include <tda5250BusResourceSettings.h>
+
/**
* HplTda5250DataP module
*
+ * @author Philipp Hupertz (huppertz at tkn.tu-berlin.de)
* @author Kevin Klues (klues at tkn.tu-berlin.de)
*/
***************
*** 42,52 ****
interface Init;
interface HplTda5250Data;
interface Resource;
}
uses {
interface GeneralIO as DATA;
! // FIXME: platform dependence at HPL-level!
! interface HplMsp430Usart as Usart;
! interface HplMsp430UsartInterrupts as UsartInterrupts;
interface Resource as UartResource;
}
--- 46,59 ----
interface Init;
interface HplTda5250Data;
+ interface Msp430UartConfigure as UartResourceConfigure;
+ //interface ResourceRequested;
interface Resource;
+
}
uses {
interface GeneralIO as DATA;
! interface SerialByteComm as Uart;
! interface Msp430UartControl as UartControl;
! //interface ResourceRequested;
interface Resource as UartResource;
}
***************
*** 78,88 ****
return EBUSY;
}
- call Usart.setModeUART();
return SUCCESS;
}
async command void Resource.release() {
- call Usart.disableRxIntr();
- call Usart.disableTxIntr();
call UartResource.release();
}
--- 85,92 ----
***************
*** 93,150 ****
event void UartResource.granted() {
- call Usart.setModeUART();
signal Resource.granted();
}
!
! async command error_t HplTda5250Data.tx(uint8_t data) {
! if(call UartResource.isOwner() == FALSE)
! return FAIL;
! call Usart.tx(data);
! return SUCCESS;
! }
!
! async command bool HplTda5250Data.isTxDone() {
! if(call UartResource.isOwner() == FALSE)
! return FAIL;
! return call Usart.isTxEmpty();
! }
!
! async command error_t HplTda5250Data.enableTx() {
! if(call UartResource.isOwner() == FALSE)
! return FAIL;
! call Usart.setModeUART_TX();
! call Usart.setClockSource(SSEL_SMCLK);
! call Usart.setClockRate(UBR_SMCLK_38400, UMCTL_SMCLK_38400);
! call Usart.enableTxIntr();
! return SUCCESS;
}
!
! async command error_t HplTda5250Data.disableTx() {
if(call UartResource.isOwner() == FALSE)
return FAIL;
! call Usart.disableUARTTx();
! call Usart.disableTxIntr();
return SUCCESS;
}
! async command error_t HplTda5250Data.enableRx() {
! if(call UartResource.isOwner() == FALSE)
! return FAIL;
! call Usart.setModeUART_RX();
! call Usart.setClockSource(SSEL_SMCLK);
! call Usart.setClockRate(UBR_SMCLK_38400, UMCTL_SMCLK_38400);
! call Usart.enableRxIntr();
! return SUCCESS;
}
! async command error_t HplTda5250Data.disableRx() {
if(call UartResource.isOwner() == FALSE)
return FAIL;
! call Usart.disableUARTRx();
! call Usart.disableRxIntr();
! return SUCCESS;
}
! async event void UsartInterrupts.txDone() {
if(call UartResource.isOwner() == FALSE)
return;
--- 97,133 ----
event void UartResource.granted() {
signal Resource.granted();
}
!
! // async event void ResourceRequested.requested() {
! // signal Resource.requested();
! // }
!
!
! async command msp430_uart_config_t UartResourceConfigure.getConfig() {
! return tda5250_uart_config;
}
!
! async command error_t HplTda5250Data.setToTx() {
if(call UartResource.isOwner() == FALSE)
return FAIL;
! call UartControl.setModeTx();
return SUCCESS;
}
! async command error_t HplTda5250Data.setToRx() {
! if(call UartResource.isOwner() == FALSE)
! return FAIL;
! call UartControl.setModeRx();
! return SUCCESS;
}
! async command error_t HplTda5250Data.tx(uint8_t data) {
if(call UartResource.isOwner() == FALSE)
return FAIL;
! return call Uart.put(data);
}
! async event void Uart.putDone() {
if(call UartResource.isOwner() == FALSE)
return;
***************
*** 152,156 ****
}
! async event void UsartInterrupts.rxDone(uint8_t data) {
if(call UartResource.isOwner() == FALSE)
return;
--- 135,139 ----
}
! async event void Uart.get(uint8_t data) {
if(call UartResource.isOwner() == FALSE)
return;
- Previous message: [Tinyos-2-commits]
CVS: tinyos-2.x/doc/html install-tinyos.html, 1.3,
1.4 upgrade-tinyos.html, 1.3, 1.4
- Next message: [Tinyos-2-commits]
CVS: tinyos-2.x/tos/platforms/eyesIFX/chips/tda5250
tda5250BusResourceSettings.h, NONE, 1.1.2.1 HplTda5250DataC.nc,
1.1.2.6, 1.1.2.6.4.1 Tda5250RegCommC.nc, 1.1.2.5,
1.1.2.5.4.1 tda5250BusResourceId.h, 1.1.2.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list