[Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/eyesIFX/byte_radio
RssiFixedThresholdCMP.nc, 1.1.2.2, 1.1.2.3 UartPhyC.nc,
1.1.2.2, 1.1.2.3 UartPhyP.nc, 1.1.2.2, 1.1.2.3
Philipp Huppertz
phihup at users.sourceforge.net
Thu Jun 8 08:31:07 PDT 2006
- Previous message: [Tinyos-2-commits]
CVS: tinyos-2.x/tos/lib/byte_radio LinkLayerP.nc, 1.1.2.2,
1.1.2.3 MacReceive.nc, 1.1.2.1, 1.1.2.2 MacSend.nc, 1.1.2.1,
1.1.2.2 PacketSerializerP.nc, 1.1.2.6, 1.1.2.7 PhyReceive.nc,
1.1.2.1, 1.1.2.2 PhySend.nc, 1.1.2.1, 1.1.2.2
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/micaz
ActiveMessageC.nc, 1.1.2.7, 1.1.2.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/platforms/eyesIFX/byte_radio
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19280/tos/platforms/eyesIFX/byte_radio
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
RssiFixedThresholdCMP.nc UartPhyC.nc UartPhyP.nc
Log Message:
- fixed a bug in UartPhy and some more on PacketSerializer
- added some documentaion to interfaces
- BEWARE: radio strangely only works when compiled with "debug" option.
Index: RssiFixedThresholdCMP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/eyesIFX/byte_radio/Attic/RssiFixedThresholdCMP.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** RssiFixedThresholdCMP.nc 7 Jun 2006 19:54:53 -0000 1.1.2.2
--- RssiFixedThresholdCMP.nc 8 Jun 2006 15:31:05 -0000 1.1.2.3
***************
*** 57,61 ****
}
implementation
! { /* Measure internal voltage every 5s */
#define VOLTAGE_SAMPLE_INTERVALL 5000
--- 57,63 ----
}
implementation
! {
! //#define CM_DEBUG // debug...
! /* Measure internal voltage every 5s */
#define VOLTAGE_SAMPLE_INTERVALL 5000
***************
*** 138,141 ****
--- 140,156 ----
/***************** Helper function *************/
+ #ifdef CM_DEBUG
+ void signalFailure() {
+ atomic {
+ for(;;) {
+ ;
+ }
+ }
+ }
+ #else
+ inline void signalFailure() {
+ };
+ #endif
+
int16_t computeSNR() {
uint32_t delta;
***************
*** 153,163 ****
return snr;
}
- void signalFailure() {
- atomic {
- for(;;) {
- ;
- }
- }
- }
/**************** Init *******************/
command error_t Init.init() {
--- 168,171 ----
***************
*** 189,193 ****
// if(call Rssi.read() != SUCCESS) post RssiReadTask();
if(call Rssi.read() != SUCCESS) signalFailure();
! // call Led3.clr();
}
--- 197,201 ----
// if(call Rssi.read() != SUCCESS) post RssiReadTask();
if(call Rssi.read() != SUCCESS) signalFailure();
! // call Led3.set();
}
***************
*** 203,207 ****
event void Rssi.readDone(error_t result, uint16_t data) {
if(result == SUCCESS) {
! // call Led3.set();
// call RssiAdcResource.release();
rssi = data;
--- 211,215 ----
event void Rssi.readDone(error_t result, uint16_t data) {
if(result == SUCCESS) {
! // call Led3.clr();
// call RssiAdcResource.release();
rssi = data;
Index: UartPhyC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/eyesIFX/byte_radio/Attic/UartPhyC.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** UartPhyC.nc 31 May 2006 16:32:43 -0000 1.1.2.2
--- UartPhyC.nc 8 Jun 2006 15:31:05 -0000 1.1.2.3
***************
*** 59,62 ****
--- 59,63 ----
new Alarm32khzC() as RxByteTimer,
UartPhyP,
+ // PlatformLedsC,
MainC;
***************
*** 69,71 ****
--- 70,74 ----
UartPhyP.RxByteTimer -> RxByteTimer;
+ // PlatformLedsC.Led0 <- UartPhyP.Led0;
+ // PlatformLedsC.Led1 <- UartPhyP.Led1;
}
Index: UartPhyP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/eyesIFX/byte_radio/Attic/UartPhyP.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** UartPhyP.nc 7 Jun 2006 19:54:53 -0000 1.1.2.2
--- UartPhyP.nc 8 Jun 2006 15:31:05 -0000 1.1.2.3
***************
*** 56,59 ****
--- 56,61 ----
interface RadioByteComm;
interface Alarm<T32khz, uint16_t> as RxByteTimer;
+ // interface GeneralIO as Led0;
+ // interface GeneralIO as Led1;
}
}
***************
*** 90,93 ****
--- 92,96 ----
void ReceiveNextByte(uint8_t data);
+
/* Radio Init */
command error_t Init.init(){
***************
*** 145,150 ****
async event void RxByteTimer.fired() {
! // no bytes have arrived, so...
! resetState();
}
--- 148,152 ----
async event void RxByteTimer.fired() {
! resetState();
}
***************
*** 159,164 ****
async command void SerializerRadioByteComm.txByte(uint8_t data) {
bufByte = data;
- call RadioByteComm.txByte(manchesterEncodeNibble((bufByte & 0xf0) >> 4));
phyState = STATE_DATA_LOW;
}
--- 161,166 ----
async command void SerializerRadioByteComm.txByte(uint8_t data) {
bufByte = data;
phyState = STATE_DATA_LOW;
+ call RadioByteComm.txByte(manchesterEncodeNibble((bufByte & 0xf0) >> 4));
}
***************
*** 224,230 ****
break;
case STATE_DATA_LOW:
! call RadioByteComm.txByte(manchesterEncodeNibble(bufByte & 0x0f));
! phyState = STATE_DATA_HIGH;
! break;
case STATE_FOOTER_START:
// maybe there will be a time.... we will need this.
--- 226,232 ----
break;
case STATE_DATA_LOW:
! phyState = STATE_DATA_HIGH;
! call RadioByteComm.txByte(manchesterEncodeNibble(bufByte & 0x0f));
! break;
case STATE_FOOTER_START:
// maybe there will be a time.... we will need this.
***************
*** 255,259 ****
if(data != PREAMBLE_BYTE) {
if (data == SFD_BYTE) {
! signal PhyPacketRx.recvHeaderDone(SUCCESS);
phyState = STATE_DATA_HIGH;
} else {
--- 257,261 ----
if(data != PREAMBLE_BYTE) {
if (data == SFD_BYTE) {
! signal PhyPacketRx.recvHeaderDone(SUCCESS);
phyState = STATE_DATA_HIGH;
} else {
***************
*** 288,295 ****
if(decodedByte != 0xff) {
bufByte |= decodedByte;
- signal SerializerRadioByteComm.rxByteReady(bufByte);
phyState = STATE_DATA_HIGH;
} else {
! resetState();
}
break;
--- 290,297 ----
if(decodedByte != 0xff) {
bufByte |= decodedByte;
phyState = STATE_DATA_HIGH;
+ signal SerializerRadioByteComm.rxByteReady(bufByte);
} else {
! resetState();
}
break;
- Previous message: [Tinyos-2-commits]
CVS: tinyos-2.x/tos/lib/byte_radio LinkLayerP.nc, 1.1.2.2,
1.1.2.3 MacReceive.nc, 1.1.2.1, 1.1.2.2 MacSend.nc, 1.1.2.1,
1.1.2.2 PacketSerializerP.nc, 1.1.2.6, 1.1.2.7 PhyReceive.nc,
1.1.2.1, 1.1.2.2 PhySend.nc, 1.1.2.1, 1.1.2.2
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/micaz
ActiveMessageC.nc, 1.1.2.7, 1.1.2.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list