From 705f8cc45174dbccc663dd764a8a34fb02a342f4 Mon Sep 17 00:00:00 2001 From: joxe Date: Wed, 23 Jun 2010 10:19:15 +0000 Subject: [PATCH] fixed naming of SPI and CC2420 related code --- cpu/msp430/cc2420-arch-sfd.c | 7 ++++--- cpu/msp430/cc2420-arch.c | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cpu/msp430/cc2420-arch-sfd.c b/cpu/msp430/cc2420-arch-sfd.c index 69ae6510d..82d71db16 100644 --- a/cpu/msp430/cc2420-arch-sfd.c +++ b/cpu/msp430/cc2420-arch-sfd.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)$Id: cc2420-arch-sfd.c,v 1.3 2010/01/26 10:20:16 adamdunkels Exp $ + * @(#)$Id: cc2420-arch-sfd.c,v 1.4 2010/06/23 10:19:15 joxe Exp $ */ #include @@ -34,6 +34,7 @@ #include "dev/spi.h" #include "dev/cc2420.h" +#include "contiki-conf.h" volatile uint8_t cc2420_arch_sfd_counter; volatile uint16_t cc2420_arch_sfd_start_time; @@ -48,7 +49,7 @@ cc24240_timerb1_interrupt(void) ENERGEST_ON(ENERGEST_TYPE_IRQ); /* always read TBIV to clear IFG */ tbiv = TBIV; - if(SFD_IS_1) { + if(CC2420_SFD_IS_1) { cc2420_arch_sfd_counter++; cc2420_arch_sfd_start_time = TBCCR1; } else { @@ -62,7 +63,7 @@ void cc2420_arch_sfd_init(void) { /* Need to select the special function! */ - P4SEL = BV(SFD); + P4SEL = BV(CC2420_SFD_PIN); /* start timer B - 32768 ticks per second */ TBCTL = TBSSEL_1 | TBCLR; diff --git a/cpu/msp430/cc2420-arch.c b/cpu/msp430/cc2420-arch.c index fc40f0ee7..50a59da1a 100644 --- a/cpu/msp430/cc2420-arch.c +++ b/cpu/msp430/cc2420-arch.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)$Id: cc2420-arch.c,v 1.8 2010/05/10 11:32:44 nifi Exp $ + * @(#)$Id: cc2420-arch.c,v 1.9 2010/06/23 10:19:15 joxe Exp $ */ #include @@ -47,7 +47,7 @@ #endif /*---------------------------------------------------------------------------*/ -interrupt(PORT1_VECTOR) +interrupt(CC2420_IRQ_VECTOR) cc24240_port1_interrupt(void) { ENERGEST_ON(ENERGEST_TYPE_IRQ); @@ -64,12 +64,14 @@ cc2420_arch_init(void) spi_init(); /* all input by default, set these as output */ - P4DIR |= BV(CSN) | BV(VREG_EN) | BV(RESET_N); + CC2420_CSN_PORT(DIR) |= BV(CC2420_CSN_PIN); + CC2420_VREG_PORT(DIR) |= BV(CC2420_VREG_PIN); + CC2420_RESET_PORT(DIR) |= BV(CC2420_RESET_PIN); #if CONF_SFD_TIMESTAMPS cc2420_arch_sfd_init(); #endif - SPI_DISABLE(); /* Unselect radio. */ + CC2420_SPI_DISABLE(); /* Unselect radio. */ } /*---------------------------------------------------------------------------*/