fix adc compile errors when HAVE_DMA is not true.

remove reference to brione_lcd.h
turn off DEBUG messages.
This commit is contained in:
anthony-a 2010-04-10 19:59:37 +00:00
parent 2e5d97366a
commit 3de90a9671
3 changed files with 6 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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