From 767a9aeef1edd9398e273dcc1deebb97e15ea14a Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Mon, 17 Feb 2014 13:49:59 +0100 Subject: [PATCH 1/2] Use platform configuration for CC2420/CC2520 SFD on MSP430 based platforms --- cpu/msp430/cc2420-arch-sfd.c | 2 +- cpu/msp430/cc2520-arch-sfd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/msp430/cc2420-arch-sfd.c b/cpu/msp430/cc2420-arch-sfd.c index 49c979ce2..f7535b276 100644 --- a/cpu/msp430/cc2420-arch-sfd.c +++ b/cpu/msp430/cc2420-arch-sfd.c @@ -59,7 +59,7 @@ void cc2420_arch_sfd_init(void) { /* Need to select the special function! */ - P4SEL = BV(CC2420_SFD_PIN); + CC2420_SFD_PORT(SEL) = BV(CC2420_SFD_PIN); /* start timer B - 32768 ticks per second */ TBCTL = TBSSEL_1 | TBCLR; diff --git a/cpu/msp430/cc2520-arch-sfd.c b/cpu/msp430/cc2520-arch-sfd.c index 5eb35cedb..bafa11b1c 100644 --- a/cpu/msp430/cc2520-arch-sfd.c +++ b/cpu/msp430/cc2520-arch-sfd.c @@ -58,7 +58,7 @@ void cc2520_arch_sfd_init(void) { /* Need to select the special function! */ - P4SEL = BV(CC2520_SFD_PIN); + CC2520_SFD_PORT(SEL) = BV(CC2520_SFD_PIN); /* start timer B - 32768 ticks per second */ TBCTL = TBSSEL_1 | TBCLR; From b13b5fc9ac636b6806162bbf9dd1db96c2d97b10 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Tue, 18 Feb 2014 11:42:02 +0100 Subject: [PATCH 2/2] Fixed typo to correctly print the radio channel at startup --- platform/sky/contiki-sky-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/sky/contiki-sky-main.c b/platform/sky/contiki-sky-main.c index 646110b31..4df32e57e 100644 --- a/platform/sky/contiki-sky-main.c +++ b/platform/sky/contiki-sky-main.c @@ -338,7 +338,7 @@ main(int argc, char **argv) NETSTACK_MAC.name, NETSTACK_RDC.name, CLOCK_SECOND / (NETSTACK_RDC.channel_check_interval() == 0? 1: NETSTACK_RDC.channel_check_interval()), - CC2420_CONF_CCA_THRESH); + CC2420_CONF_CHANNEL); #endif /* WITH_UIP6 */ #if !WITH_UIP && !WITH_UIP6