From 5623ad827ba552f01793e9f6f533ece33bc783fb Mon Sep 17 00:00:00 2001 From: dak664 Date: Sat, 18 Dec 2010 20:49:00 +0000 Subject: [PATCH] Enable radio off and sleep modes. --- cpu/avr/radio/rf230bb/rf230bb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cpu/avr/radio/rf230bb/rf230bb.c b/cpu/avr/radio/rf230bb/rf230bb.c index 61f966206..3e29d85d0 100644 --- a/cpu/avr/radio/rf230bb/rf230bb.c +++ b/cpu/avr/radio/rf230bb/rf230bb.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: rf230bb.c,v 1.21 2010/12/15 19:32:49 dak664 Exp $ + * @(#)$Id: rf230bb.c,v 1.22 2010/12/18 20:49:00 dak664 Exp $ */ /* * This code is almost device independent and should be easy to port. @@ -106,7 +106,8 @@ struct timestamp { #if JACKDAW #define RADIOALWAYSON 1 #else -//#define RADIOALWAYSON 1 +#define RADIOALWAYSON 0 +#define RADIOSLEEPSWHENOFF 1 #endif #define DEBUG 0 @@ -462,6 +463,7 @@ on(void) #else radio_set_trx_state(RX_ON); #endif + // flushrx(); // DEBUGFLOW('O'); RF230_receive_on = 1; @@ -485,7 +487,7 @@ off(void) /* Force the device into TRX_OFF. */ radio_reset_state_machine(); -#if 0 //optionally sleep +#if RADIOSLEEPSWHENOFF /* Sleep Radio */ hal_set_slptr_high(); RF230_sleeping = 1;