From 5240519dd94c928c6b6068d83a3a84fab426e729 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sun, 1 Apr 2012 21:43:22 +0100 Subject: [PATCH] Renamed a config define to better match contiki's naming philosophy --- cpu/cc2430/dev/cc2430_rf.c | 14 +++++++------- cpu/cc2430/dev/cc2430_rf.h | 2 +- cpu/cc2430/dev/cc2430_rf_intr.c | 2 +- platform/cc2530dk/contiki-conf.h | 4 ++-- platform/sensinode/contiki-conf.h | 6 +++--- platform/sensinode/contiki-sensinode-main.c | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cpu/cc2430/dev/cc2430_rf.c b/cpu/cc2430/dev/cc2430_rf.c index 934bb7a23..835365afe 100644 --- a/cpu/cc2430/dev/cc2430_rf.c +++ b/cpu/cc2430/dev/cc2430_rf.c @@ -98,7 +98,7 @@ uint8_t rf_error = 0; #endif /*---------------------------------------------------------------------------*/ -#if !SHORTCUTS_CONF_NETSTACK +#if !NETSTACK_CONF_SHORTCUTS PROCESS(cc2430_rf_process, "CC2430 RF driver"); #endif /*---------------------------------------------------------------------------*/ @@ -152,7 +152,7 @@ flush_rx() cc2430_rf_command(ISFLUSHRX); cc2430_rf_command(ISFLUSHRX); -#if !SHORTCUTS_CONF_NETSTACK +#if !NETSTACK_CONF_SHORTCUTS IEN2 |= RFIE; #endif #if CC2430_RFERR_INTERRUPT @@ -338,7 +338,7 @@ init(void) RFIF &= ~(IRQ_FIFOP); S1CON &= ~(RFIF_0 | RFIF_1); -#if !SHORTCUTS_CONF_NETSTACK +#if !NETSTACK_CONF_SHORTCUTS IEN2 |= RFIE; #endif @@ -351,7 +351,7 @@ init(void) RF_RX_LED_OFF(); rf_initialized = 1; -#if !SHORTCUTS_CONF_NETSTACK +#if !NETSTACK_CONF_SHORTCUTS process_start(&cc2430_rf_process, NULL); #endif @@ -476,7 +476,7 @@ read(void *buf, unsigned short bufsize) #endif /* CC2420_CONF_CHECKSUM */ /* Don't interrupt us while emptying the FIFO */ -#if !SHORTCUTS_CONF_NETSTACK +#if !NETSTACK_CONF_SHORTCUTS IEN2 &= ~RFIE; #endif #if CC2430_RFERR_INTERRUPT @@ -576,7 +576,7 @@ read(void *buf, unsigned short bufsize) RF_RX_LED_OFF(); -#if !SHORTCUTS_CONF_NETSTACK +#if !NETSTACK_CONF_SHORTCUTS IEN2 |= RFIE; #endif #if CC2430_RFERR_INTERRUPT @@ -688,7 +688,7 @@ const struct radio_driver cc2430_rf_driver = off, }; /*---------------------------------------------------------------------------*/ -#if !SHORTCUTS_CONF_NETSTACK +#if !NETSTACK_CONF_SHORTCUTS /*---------------------------------------------------------------------------*/ PROCESS_THREAD(cc2430_rf_process, ev, data) { diff --git a/cpu/cc2430/dev/cc2430_rf.h b/cpu/cc2430/dev/cc2430_rf.h index f64129e09..eecb26ead 100644 --- a/cpu/cc2430/dev/cc2430_rf.h +++ b/cpu/cc2430/dev/cc2430_rf.h @@ -77,7 +77,7 @@ int8_t cc2430_rf_channel_set(uint8_t channel); uint8_t cc2430_rf_power_set(uint8_t new_power); void cc2430_rf_set_addr(unsigned pan, unsigned addr, const uint8_t *ieee_addr); -#if !SHORTCUTS_CONF_NETSTACK +#if !NETSTACK_CONF_SHORTCUTS extern void cc2430_rf_ISR( void ) __interrupt (RF_VECTOR); #endif #if CC2430_RFERR_INTERRUPT diff --git a/cpu/cc2430/dev/cc2430_rf_intr.c b/cpu/cc2430/dev/cc2430_rf_intr.c index 296024115..510c93f1a 100644 --- a/cpu/cc2430/dev/cc2430_rf_intr.c +++ b/cpu/cc2430/dev/cc2430_rf_intr.c @@ -50,7 +50,7 @@ uint8_t rf_error = 0; PROCESS_NAME(cc2430_rf_process); -#if !SHORTCUTS_CONF_NETSTACK +#if !NETSTACK_CONF_SHORTCUTS /*---------------------------------------------------------------------------*/ /** * RF interrupt service routine. diff --git a/platform/cc2530dk/contiki-conf.h b/platform/cc2530dk/contiki-conf.h index 9713ca56e..647cb39b3 100644 --- a/platform/cc2530dk/contiki-conf.h +++ b/platform/cc2530dk/contiki-conf.h @@ -69,9 +69,9 @@ * - process_post_synch() in tcpip_uipcall (we call the relevant pthread) * - mac_call_sent_callback() is replaced with sent() in various places * - * These are good things to do, we reduce stack usage, RAM size and code size + * These are good things to do, they reduce stack usage and prevent crashes */ -#define SHORTCUTS_CONF_NETSTACK 1 +#define NETSTACK_CONF_SHORTCUTS 1 /* * Sensors diff --git a/platform/sensinode/contiki-conf.h b/platform/sensinode/contiki-conf.h index 3148605de..278ba74de 100644 --- a/platform/sensinode/contiki-conf.h +++ b/platform/sensinode/contiki-conf.h @@ -82,15 +82,15 @@ * When set, the RF driver is no longer a contiki process and the RX ISR is * disabled. Instead of polling the radio process when data arrives, we * periodically check for data by directly invoking the driver from main() - + * * When set, this directive also configures the following bypasses: * - process_post_synch() in tcpip_input() (we call packet_input()) * - process_post_synch() in tcpip_uipcall (we call the relevant pthread) * - mac_call_sent_callback() is replaced with sent() in various places * - * These are good things to do, we reduce stack usage, RAM size and code size + * These are good things to do, they reduce stack usage and prevent crashes */ -#define SHORTCUTS_CONF_NETSTACK 1 +#define NETSTACK_CONF_SHORTCUTS 1 /* * Sensors diff --git a/platform/sensinode/contiki-sensinode-main.c b/platform/sensinode/contiki-sensinode-main.c index dbe481900..66d2d0e75 100644 --- a/platform/sensinode/contiki-sensinode-main.c +++ b/platform/sensinode/contiki-sensinode-main.c @@ -32,7 +32,7 @@ PROCESS_NAME(viztool_process); PROCESS_NAME(batmon_process); #endif -#if SHORTCUTS_CONF_NETSTACK +#if NETSTACK_CONF_SHORTCUTS static __data int len; #endif @@ -306,7 +306,7 @@ main(void) #endif r = process_run(); } while(r > 0); -#if SHORTCUTS_CONF_NETSTACK +#if NETSTACK_CONF_SHORTCUTS len = NETSTACK_RADIO.pending_packet(); if(len) { packetbuf_clear();