From 3de90a9671a0f5d023a361a3894a716e41c1fe6f Mon Sep 17 00:00:00 2001 From: anthony-a Date: Sat, 10 Apr 2010 19:59:37 +0000 Subject: [PATCH] fix adc compile errors when HAVE_DMA is not true. remove reference to brione_lcd.h turn off DEBUG messages. --- cpu/cc2430/dev/adc.c | 5 ++++- cpu/cc2430/dev/cc2430_rf.c | 3 +-- cpu/cc2430/dev/cc2430_rf_intr.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cpu/cc2430/dev/adc.c b/cpu/cc2430/dev/adc.c index 9c22fd521..eda932a2a 100644 --- a/cpu/cc2430/dev/adc.c +++ b/cpu/cc2430/dev/adc.c @@ -17,9 +17,10 @@ #include "dev/adc.h" #include "dev/dma.h" - +#ifdef HAVE_DMA xDMAHandle adc_dma=0xff; unsigned int *adc_dma_dest; +#endif /*---------------------------------------------------------------------------*/ void adc_init(void) __banked @@ -41,12 +42,14 @@ void adc_init(void) __banked /* power down 15MHz RC clock */ SLEEP |= OSC_PD; /* printf("pwr down hfrc\n",SLEEP); */ +#ifdef HAVE_DMA /* preconfigure adc_dma before calling adc_init if a different dma type is desired. */ if (adc_dma==0xff) { dma_init(); /* config DMA channel to copy results to single location */ adc_dma=dma_config2(ADC_DMA_CONFIG_CHANNEL, &ADC_SHADOW, DMA_NOINC, adc_dma_dest, DMA_NOINC, 1, 1, DMA_VLEN_LEN, DMA_RPT, DMA_T_ADC_CHALL, 0); } +#endif } /* single sample trigger */ void adc_single_shot(void) __banked diff --git a/cpu/cc2430/dev/cc2430_rf.c b/cpu/cc2430/dev/cc2430_rf.c index 6abee71f6..8afdd5f4b 100644 --- a/cpu/cc2430/dev/cc2430_rf.c +++ b/cpu/cc2430/dev/cc2430_rf.c @@ -52,8 +52,7 @@ extern void (* receiver_callback)(const struct radio_driver *); #define RF_TX_LED_ON() #define RF_TX_LED_OFF() #endif -#include "dev/brione_lcd.h" -#define DEBUG 1 +#define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) #else diff --git a/cpu/cc2430/dev/cc2430_rf_intr.c b/cpu/cc2430/dev/cc2430_rf_intr.c index 70162b68e..62be60688 100644 --- a/cpu/cc2430/dev/cc2430_rf_intr.c +++ b/cpu/cc2430/dev/cc2430_rf_intr.c @@ -23,7 +23,7 @@ #include "net/rime/packetbuf.h" #include "net/rime/rimestats.h" -#define DEBUG 1 +#define DEBUG 0 #if DEBUG #define PRINTF(...) printf(__VA_ARGS__) #else