From 4ff9d0bb0bb80cd165b5d57ae0f46c79fdd710ee Mon Sep 17 00:00:00 2001 From: asterix Date: Tue, 22 Mar 2011 13:08:45 +0000 Subject: [PATCH] Fix log message. Add define for temperature sensor. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4789 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/cortex-m3/drv/adc_sam3.c | 8 ++++---- bertos/cpu/cortex-m3/io/sam3_adc.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bertos/cpu/cortex-m3/drv/adc_sam3.c b/bertos/cpu/cortex-m3/drv/adc_sam3.c index 512e978d..303689f1 100644 --- a/bertos/cpu/cortex-m3/drv/adc_sam3.c +++ b/bertos/cpu/cortex-m3/drv/adc_sam3.c @@ -143,13 +143,13 @@ void adc_hw_init(void) ADC_MR |= ((ADC_PRESCALER << ADC_PRESCALER_SHIFT) & ADC_PRESCALER_MASK); LOG_INFO("prescaler[%ld]\n", ADC_PRESCALER); ADC_MR |= ((CONFIG_ADC_SUT << ADC_STARTUP_SHIFT) & ADC_STARTUP_MASK); - LOG_INFO("starup[%d]\n", ADC_SUT512); + LOG_INFO("starup[%d]\n", CONFIG_ADC_SUT); ADC_MR |= ((CONFIG_ADC_STTLING << ADC_SETTLING_SHIFT) & ADC_SETTLING_MASK); - LOG_INFO("sttime[%d]\n", ADC_AST17); + LOG_INFO("sttime[%d]\n", CONFIG_ADC_STTLING); ADC_MR |= ((CONFIG_ADC_TRACKTIM << ADC_TRACKTIM_SHIFT) & ADC_TRACKTIM_MASK); - LOG_INFO("tracking[%d]\n", 0); + LOG_INFO("tracking[%d]\n", CONFIG_ADC_TRACKTIM); ADC_MR |= ((CONFIG_ADC_TRANSFER << ADC_TRANSFER_SHIFT) & ADC_TRANSFER_MASK); - LOG_INFO("tranfer[%d]\n", 1); + LOG_INFO("tranfer[%d]\n", CONFIG_ADC_TRANSFER); /* Register and enable irq for adc. */ sysirq_setHandler(INT_ADC, adc_conversion_end_irq); diff --git a/bertos/cpu/cortex-m3/io/sam3_adc.h b/bertos/cpu/cortex-m3/io/sam3_adc.h index 47fcaed4..30bac49f 100644 --- a/bertos/cpu/cortex-m3/io/sam3_adc.h +++ b/bertos/cpu/cortex-m3/io/sam3_adc.h @@ -248,6 +248,7 @@ #define ADC_ACR_OFF 0x00000094 ///< Analog control register offeset. #define ADC_ACR (*((reg32_t *)(ADC_BASE + ADC_ACR_OFF))) ///< Analog control register. #define ADC_TSON 4 ///< Temperature Sensor On. +#define ADC_TEMPERATURE_CH 15 ///< Channel where is the internal sensor temperature /* \} */ #endif /* SAM3_ADC_H */ -- 2.25.1