[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/serial
SerialActiveMessageP.nc, 1.1.2.10,
1.1.2.10.2.1 SerialDispatcherC.nc, 1.1.2.9.10.1,
1.1.2.9.10.2 Serial.h, 1.1.2.12, 1.1.2.12.2.1 SerialP.nc,
1.1.2.10, 1.1.2.10.2.1
Philipp Huppertz
phihup at users.sourceforge.net
Thu Oct 5 01:37:49 PDT 2006
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/usart
HplMsp430I2C0C.nc, NONE, 1.1.4.2 HplMsp430I2C0P.nc, NONE,
1.1.4.2 HplMsp430I2CInterrupts.nc, NONE,
1.1.4.2 HplMsp430I2C.nc, NONE, 1.1.4.2 Msp430I2C0P.nc, NONE,
1.1.4.2 Msp430I2CC.nc, NONE, 1.1.4.2 Msp430I2CConfigure.nc,
NONE, 1.1.4.2 Msp430I2CP.nc, NONE, 1.1.4.2 HplMsp430Usart0C.nc,
1.1.2.5.4.2, 1.1.2.5.4.3 HplMsp430Usart0P.nc, 1.1.2.5.4.2,
1.1.2.5.4.3 HplMsp430Usart1C.nc, 1.1.2.6.4.2,
1.1.2.6.4.3 HplMsp430Usart1P.nc, 1.1.2.4.4.2,
1.1.2.4.4.3 HplMsp430UsartInterrupts.nc, 1.1.2.1.4.2,
1.1.2.1.4.3 HplMsp430Usart.nc, 1.1.2.4.4.2,
1.1.2.4.4.3 Msp430Spi0C.nc, 1.1.2.7.4.2,
1.1.2.7.4.3 Msp430Spi1C.nc, 1.1.2.2,
1.1.2.3 Msp430SpiConfigure.nc, 1.1.2.2,
1.1.2.3 Msp430SpiDma0P.nc, 1.1.2.2.4.1,
1.1.2.2.4.2 Msp430SpiDma1P.nc, 1.1.2.1,
1.1.2.2 Msp430SpiDmaP.nc, 1.1.2.1.4.2,
1.1.2.1.4.3 Msp430SpiNoDma0P.nc, 1.1.2.2.4.1,
1.1.2.2.4.2 Msp430SpiNoDma1P.nc, 1.1.2.1,
1.1.2.2 Msp430SpiNoDmaP.nc, 1.1.2.1.4.2,
1.1.2.1.4.3 Msp430Uart0C.nc, 1.1.2.2, 1.1.2.3 Msp430Uart0P.nc,
1.1.2.2, 1.1.2.3 Msp430Uart1C.nc, 1.1.2.7.4.2,
1.1.2.7.4.3 Msp430Uart1P.nc, 1.1.2.2,
1.1.2.3 Msp430UartConfigure.nc, 1.1.2.2,
1.1.2.3 Msp430UartP.nc, 1.1.2.7.4.2,
1.1.2.7.4.3 Msp430Usart0C.nc, 1.1.2.2.4.1,
1.1.2.2.4.2 Msp430Usart1C.nc, 1.1.2.1, 1.1.2.2 msp430usart.h,
1.1.2.1.10.2, 1.1.2.1.10.3 Msp430UsartShare0P.nc, 1.1.2.2.4.1,
1.1.2.2.4.2 Msp430UsartShare1P.nc, 1.1.2.1,
1.1.2.2 Msp430UsartShareP.nc, 1.1.2.1, 1.1.2.1.4.1 Uart1C.nc,
1.1.2.3, 1.1.2.3.8.1 Msp430UartControl.nc, 1.1.2.1, NONE
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/eyesIFX/byte_radio
RssiFixedThresholdCMC.nc, 1.1.2.2,
1.1.2.2.2.1 RssiFixedThresholdCMP.nc, 1.1.2.3,
1.1.2.3.2.1 UartPhyC.nc, 1.1.2.3, 1.1.2.3.2.1 UartPhyP.nc,
1.1.2.6, 1.1.2.6.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/serial
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29037/tos/lib/serial
Modified Files:
Tag: tos-2-msp430-usart-configure-candidate
SerialActiveMessageP.nc SerialDispatcherC.nc Serial.h
SerialP.nc
Log Message:
- optimized usart configure using unions
Index: SerialActiveMessageP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/serial/SerialActiveMessageP.nc,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.10.2.1
diff -C2 -d -r1.1.2.10 -r1.1.2.10.2.1
*** SerialActiveMessageP.nc 25 May 2006 17:38:06 -0000 1.1.2.10
--- SerialActiveMessageP.nc 5 Oct 2006 08:37:46 -0000 1.1.2.10.2.1
***************
*** 55,62 ****
uint8_t len) {
serial_header_t* header = getHeader(msg);
! header->addr = dest;
header->type = id;
header->length = len;
! header->group = TOS_AM_GROUP;
return call SubSend.send(msg, len);
}
--- 55,67 ----
uint8_t len) {
serial_header_t* header = getHeader(msg);
! header->dest = dest;
! // Do not set the source address or group, as doing so
! // prevents transparent bridging. Need a better long-term
! // solution for this.
! //header->src = call AMPacket.address();
! //header->group = TOS_AM_GROUP;
header->type = id;
header->length = len;
!
return call SubSend.send(msg, len);
}
***************
*** 129,138 ****
command am_addr_t AMPacket.destination(message_t* amsg) {
serial_header_t* header = getHeader(amsg);
! return header->addr;
}
command void AMPacket.setDestination(message_t* amsg, am_addr_t addr) {
serial_header_t* header = getHeader(amsg);
! header->addr = addr;
}
--- 134,153 ----
command am_addr_t AMPacket.destination(message_t* amsg) {
serial_header_t* header = getHeader(amsg);
! return header->dest;
! }
!
! command am_addr_t AMPacket.source(message_t* amsg) {
! serial_header_t* header = getHeader(amsg);
! return header->src;
}
command void AMPacket.setDestination(message_t* amsg, am_addr_t addr) {
serial_header_t* header = getHeader(amsg);
! header->dest = addr;
! }
!
! command void AMPacket.setSource(message_t* amsg, am_addr_t addr) {
! serial_header_t* header = getHeader(amsg);
! header->src = addr;
}
Index: Serial.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/serial/Serial.h,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.12.2.1
diff -C2 -d -r1.1.2.12 -r1.1.2.12.2.1
*** Serial.h 15 May 2006 16:44:17 -0000 1.1.2.12
--- Serial.h 5 Oct 2006 08:37:46 -0000 1.1.2.12.2.1
***************
*** 111,115 ****
typedef nx_struct serial_header {
! nx_am_addr_t addr;
nx_uint8_t length;
nx_am_group_t group;
--- 111,116 ----
typedef nx_struct serial_header {
! nx_am_addr_t dest;
! nx_am_addr_t src;
nx_uint8_t length;
nx_am_group_t group;
Index: SerialP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/serial/SerialP.nc,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.10.2.1
diff -C2 -d -r1.1.2.10 -r1.1.2.10.2.1
*** SerialP.nc 15 Jun 2006 06:03:50 -0000 1.1.2.10
--- SerialP.nc 5 Oct 2006 08:37:46 -0000 1.1.2.10.2.1
***************
*** 1,3 ****
- // $Id$
/*
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By
--- 1,2 ----
***************
*** 671,676 ****
case TXSTATE_INFO:
atomic {
- uint8_t nextByte;
-
txResult = call SerialFrameComm.putData(txBuf[txIndex].buf);
txCRC = crcByte(txCRC,txBuf[txIndex].buf);
--- 670,673 ----
***************
*** 678,689 ****
if (txIndex == TX_DATA_INDEX){
nextByte = signal SendBytePacket.nextByte();
}
! if (txBuf[txIndex].state == BUFFER_COMPLETE || txByteCnt >= SERIAL_MTU){
txState = TXSTATE_FCS1;
}
- else { /* never called on ack b/c ack is BUFFER_COMPLETE initially */
- txBuf[txIndex].buf = nextByte;
- }
}
break;
--- 675,690 ----
if (txIndex == TX_DATA_INDEX){
+ uint8_t nextByte;
nextByte = signal SendBytePacket.nextByte();
+ if (txBuf[txIndex].state == BUFFER_COMPLETE || txByteCnt >= SERIAL_MTU){
+ txState = TXSTATE_FCS1;
+ }
+ else { /* never called on ack b/c ack is BUFFER_COMPLETE initially */
+ txBuf[txIndex].buf = nextByte;
+ }
}
! else { // TX_ACK_INDEX
txState = TXSTATE_FCS1;
}
}
break;
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/usart
HplMsp430I2C0C.nc, NONE, 1.1.4.2 HplMsp430I2C0P.nc, NONE,
1.1.4.2 HplMsp430I2CInterrupts.nc, NONE,
1.1.4.2 HplMsp430I2C.nc, NONE, 1.1.4.2 Msp430I2C0P.nc, NONE,
1.1.4.2 Msp430I2CC.nc, NONE, 1.1.4.2 Msp430I2CConfigure.nc,
NONE, 1.1.4.2 Msp430I2CP.nc, NONE, 1.1.4.2 HplMsp430Usart0C.nc,
1.1.2.5.4.2, 1.1.2.5.4.3 HplMsp430Usart0P.nc, 1.1.2.5.4.2,
1.1.2.5.4.3 HplMsp430Usart1C.nc, 1.1.2.6.4.2,
1.1.2.6.4.3 HplMsp430Usart1P.nc, 1.1.2.4.4.2,
1.1.2.4.4.3 HplMsp430UsartInterrupts.nc, 1.1.2.1.4.2,
1.1.2.1.4.3 HplMsp430Usart.nc, 1.1.2.4.4.2,
1.1.2.4.4.3 Msp430Spi0C.nc, 1.1.2.7.4.2,
1.1.2.7.4.3 Msp430Spi1C.nc, 1.1.2.2,
1.1.2.3 Msp430SpiConfigure.nc, 1.1.2.2,
1.1.2.3 Msp430SpiDma0P.nc, 1.1.2.2.4.1,
1.1.2.2.4.2 Msp430SpiDma1P.nc, 1.1.2.1,
1.1.2.2 Msp430SpiDmaP.nc, 1.1.2.1.4.2,
1.1.2.1.4.3 Msp430SpiNoDma0P.nc, 1.1.2.2.4.1,
1.1.2.2.4.2 Msp430SpiNoDma1P.nc, 1.1.2.1,
1.1.2.2 Msp430SpiNoDmaP.nc, 1.1.2.1.4.2,
1.1.2.1.4.3 Msp430Uart0C.nc, 1.1.2.2, 1.1.2.3 Msp430Uart0P.nc,
1.1.2.2, 1.1.2.3 Msp430Uart1C.nc, 1.1.2.7.4.2,
1.1.2.7.4.3 Msp430Uart1P.nc, 1.1.2.2,
1.1.2.3 Msp430UartConfigure.nc, 1.1.2.2,
1.1.2.3 Msp430UartP.nc, 1.1.2.7.4.2,
1.1.2.7.4.3 Msp430Usart0C.nc, 1.1.2.2.4.1,
1.1.2.2.4.2 Msp430Usart1C.nc, 1.1.2.1, 1.1.2.2 msp430usart.h,
1.1.2.1.10.2, 1.1.2.1.10.3 Msp430UsartShare0P.nc, 1.1.2.2.4.1,
1.1.2.2.4.2 Msp430UsartShare1P.nc, 1.1.2.1,
1.1.2.2 Msp430UsartShareP.nc, 1.1.2.1, 1.1.2.1.4.1 Uart1C.nc,
1.1.2.3, 1.1.2.3.8.1 Msp430UartControl.nc, 1.1.2.1, NONE
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/eyesIFX/byte_radio
RssiFixedThresholdCMC.nc, 1.1.2.2,
1.1.2.2.2.1 RssiFixedThresholdCMP.nc, 1.1.2.3,
1.1.2.3.2.1 UartPhyC.nc, 1.1.2.3, 1.1.2.3.2.1 UartPhyP.nc,
1.1.2.6, 1.1.2.6.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list