[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250
HplTda5250DataC.nc, NONE, 1.1.2.1 HplTda5250DataControl.nc,
NONE, 1.1.2.1 HplTda5250Data.nc, 1.1.2.4,
1.1.2.5 HplTda5250DataP.nc, 1.1.2.7, 1.1.2.8 Tda5250RadioC.nc,
1.1.2.6, 1.1.2.7 Tda5250RadioP.nc, 1.1.2.8, 1.1.2.9
Philipp Huppertz
phihup at users.sourceforge.net
Wed Aug 9 06:17:09 PDT 2006
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/txt tep122.txt,NONE,1.1.2.1
- Next message: [Tinyos-2-commits]
CVS: tinyos-2.x/tos/platforms/eyesIFX/chips/tda5250
HplTda5250DataIOC.nc, NONE, 1.1.2.1 HplTda5250DataIOP.nc, NONE,
1.1.2.1 HplTda5250DataC.nc, 1.1.2.7,
NONE Tda5250BusResourceConfigureP.nc, 1.1.2.1,
NONE 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-serv2366/tos/chips/tda5250
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
HplTda5250Data.nc HplTda5250DataP.nc Tda5250RadioC.nc
Tda5250RadioP.nc
Added Files:
Tag: tinyos-2_0_devel-BRANCH
HplTda5250DataC.nc HplTda5250DataControl.nc
Log Message:
- restructured the wiring of the tda5250 components with the msp430 uart abstraction
--- NEW FILE: HplTda5250DataC.nc ---
/*
* Copyright (c) 2004, Technische Universitat Berlin
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the Technische Universitat Berlin nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* - Revision -------------------------------------------------------------
* $Revision: 1.1.2.1 $
* $Date: 2006/08/09 13:17:06 $
* ========================================================================
*/
/**
* Controlling the TDA5250 at the HPL layer.
*
* @author Kevin Klues (klues at tkn.tu-berlin.de)
*/
configuration HplTda5250DataC {
provides {
interface Init;
interface HplTda5250Data;
interface HplTda5250DataControl;
// interface ResourceRequested;
interface Resource as Resource;
}
}
implementation {
components HplTda5250DataP,
Tda5250RadioIOC,
HplTda5250DataIOC;
Init = HplTda5250DataP;
Resource = HplTda5250DataP.Resource;
// ResourceRequested = HplTda5250Data.ResourceRequested;
HplTda5250Data = HplTda5250DataP;
HplTda5250DataControl = HplTda5250DataIOC;
HplTda5250DataP.DATA -> Tda5250RadioIOC.Tda5250RadioDATA;
HplTda5250DataP.Uart -> HplTda5250DataIOC.SerialByteComm;
HplTda5250DataP.UartResource -> HplTda5250DataIOC.Resource;
// HplTda5250DataP.UartResourceRequested -> HplTda5250DataIOC.ResourceRequested;
}
--- NEW FILE: HplTda5250DataControl.nc ---
/**
* Interface for controlling the data interface of the TDA5250 Radio.
* This interface lets you switch between Tx and Rx.
* In conjunction to this the HplTda5250Data interface
* is used for the actual receiving and sending of data.
*
* @see HplTda5250Data
* @author Philipp Huppertz (huppertz at tkn.tu-berlin.de)
*/
interface HplTda5250DataControl {
/**
* Sets the radio to transmit.
*
* @return SUCCESS on success
* FAIL otherwise.
*/
async command error_t setToTx();
/**
* Sets the radio to receive.
*
* @return SUCCESS on success
* FAIL otherwise.
*/
async command error_t setToRx();
}
Index: HplTda5250Data.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/HplTda5250Data.nc,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** HplTda5250Data.nc 3 Aug 2006 18:17:52 -0000 1.1.2.4
--- HplTda5250Data.nc 9 Aug 2006 13:17:06 -0000 1.1.2.5
***************
*** 34,38 ****
--- 34,42 ----
/**
* Interface for sending and receiving bytes of data over the TDA5250 Radio.
+ * This interface lets you receive and send bytes of data.
+ * In conjunction to this the HplTda5250DataControl interface is used to
+ * switch between receiving and sending.
*
+ * @see HplTda5250DataControl
* @author Kevin Klues (klues at tkn.tu-berlin.de)
*/
***************
*** 41,44 ****
--- 45,51 ----
/**
* Transmit a byte of data over the radio.
+ * Before you call this command you must switch
+ * the radio to Tx mode via the HplTda5250DataControl
+ * interface.
* @param data The data byte to be transmitted.
* @return SUCCESS Byte successfully transmitted.
***************
*** 65,88 ****
/**
* Signaled when a byte of data has been received from the radio.
* @param data The data byte received.
*/
async event void rxDone(uint8_t data);
-
- /**
- * Sets the radio to transmit.
- *
- * @return SUCCESS on success
- * FAIL otherwise.
- */
- async command error_t setToTx();
-
-
- /**
- * Sets the radio to receive.
- *
- * @return SUCCESS on success
- * FAIL otherwise.
- */
- async command error_t setToRx();
}
--- 72,81 ----
/**
* Signaled when a byte of data has been received from the radio.
+ * Before you call this command you must switch
+ * the radio to Rx mode via the HplTda5250DataControl
+ * interface.
* @param data The data byte received.
*/
async event void rxDone(uint8_t data);
}
Index: HplTda5250DataP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/HplTda5250DataP.nc,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -C2 -d -r1.1.2.7 -r1.1.2.8
*** HplTda5250DataP.nc 3 Aug 2006 18:17:52 -0000 1.1.2.7
--- HplTda5250DataP.nc 9 Aug 2006 13:17:06 -0000 1.1.2.8
***************
*** 43,55 ****
interface Init;
interface HplTda5250Data;
-
- // interface ResourceRequested;
interface Resource;
!
}
uses {
interface GeneralIO as DATA;
interface SerialByteComm as Uart;
- interface Msp430UartControl as UartControl;
interface Resource as UartResource;
// interface ResourceRequested as UartResourceRequested;
--- 43,52 ----
interface Init;
interface HplTda5250Data;
interface Resource;
! // interface ResourceRequested;
}
uses {
interface GeneralIO as DATA;
interface SerialByteComm as Uart;
interface Resource as UartResource;
// interface ResourceRequested as UartResourceRequested;
***************
*** 104,121 ****
// signal ResourceRequested.immediateRequested();
// }
-
- 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) {
--- 101,104 ----
Index: Tda5250RadioC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/Tda5250RadioC.nc,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -d -r1.1.2.6 -r1.1.2.7
*** Tda5250RadioC.nc 3 Aug 2006 18:17:52 -0000 1.1.2.6
--- Tda5250RadioC.nc 9 Aug 2006 13:17:06 -0000 1.1.2.7
***************
*** 73,75 ****
--- 73,77 ----
Tda5250RadioP.HplTda5250Config -> HplTda5250ConfigC;
Tda5250RadioP.HplTda5250Data -> HplTda5250DataC;
+ Tda5250RadioP.HplTda5250DataControl -> HplTda5250DataC;
+
}
Index: Tda5250RadioP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/Tda5250RadioP.nc,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -C2 -d -r1.1.2.8 -r1.1.2.9
*** Tda5250RadioP.nc 3 Aug 2006 18:17:52 -0000 1.1.2.8
--- Tda5250RadioP.nc 9 Aug 2006 13:17:06 -0000 1.1.2.9
***************
*** 56,59 ****
--- 56,60 ----
interface HplTda5250Config;
interface HplTda5250Data;
+ interface HplTda5250DataControl;
interface Resource as ConfigResource;
interface Resource as DataResource;
***************
*** 195,204 ****
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();
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/txt tep122.txt,NONE,1.1.2.1
- Next message: [Tinyos-2-commits]
CVS: tinyos-2.x/tos/platforms/eyesIFX/chips/tda5250
HplTda5250DataIOC.nc, NONE, 1.1.2.1 HplTda5250DataIOP.nc, NONE,
1.1.2.1 HplTda5250DataC.nc, 1.1.2.7,
NONE Tda5250BusResourceConfigureP.nc, 1.1.2.1,
NONE tda5250BusResourceId.h, 1.1.2.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list