diff --git a/platform/esb/dev/tr1001-gcr.c b/platform/esb/dev/tr1001-gcr.c index 5c73e00f1..a65a16f4e 100644 --- a/platform/esb/dev/tr1001-gcr.c +++ b/platform/esb/dev/tr1001-gcr.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: tr1001-gcr.c,v 1.3 2006/10/09 11:56:13 adamdunkels Exp $ + * @(#)$Id: tr1001-gcr.c,v 1.4 2006/10/09 21:05:37 nifi Exp $ */ /** * \addtogroup esb @@ -94,6 +94,8 @@ static unsigned short tr1001_rxlen = 0; */ volatile unsigned char tr1001_rxstate = RXSTATE_READY; +static u8_t radio_active; + static u16_t rxcrc, rxcrctmp; /* @@ -612,6 +614,8 @@ tr1001_send(u8_t *packet, u16_t len) /* Prepare the transmission. */ prepare_transmission(NUM_SYNCHBYTES); + radio_active = 1; + crc16 = 0xffff; gcr_init(); @@ -764,5 +768,17 @@ tr1001_sstrength_value(unsigned int type) } #endif /* TR1001_STATISTICS */ /*---------------------------------------------------------------------------*/ +unsigned char +tr1001_active(void) +{ + return radio_active; +} +/*--------------------------------------------------------------------------*/ +void +tr1001_clear_active(void) +{ + radio_active = 0; +} +/*--------------------------------------------------------------------------*/ /** @} */ /** @} */ diff --git a/platform/esb/dev/tr1001.h b/platform/esb/dev/tr1001.h index 8106a9ae8..fe2b21c35 100644 --- a/platform/esb/dev/tr1001.h +++ b/platform/esb/dev/tr1001.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: tr1001.h,v 1.2 2006/10/09 11:56:13 adamdunkels Exp $ + * @(#)$Id: tr1001.h,v 1.3 2006/10/09 21:05:37 nifi Exp $ */ #ifndef __TR1001_H__ #define __TR1001_H__ @@ -149,6 +149,8 @@ unsigned short tr1001_packets_ok(void); unsigned short tr1001_packets_dropped(void); void tr1001_clear_packets(void); unsigned short tr1001_sstrength_value(unsigned int type); +unsigned char tr1001_active(void); +void tr1001_clear_active(void); #endif /* TR1001_STATISTICS */ #endif /* __TR1001_H__ */