X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Fadc_at91.c;h=b385184ea7c4a3fd9a442143ce9d726155698b36;hb=b3f61b96f21a6d4c491a65e607c5f41fdb028363;hp=3ebbfa75be80dd25d186b8f0cb606b74f4006c58;hpb=bdcc52e5f18159cadc413c53dd14ef468a6de376;p=bertos.git diff --git a/bertos/cpu/arm/drv/adc_at91.c b/bertos/cpu/arm/drv/adc_at91.c index 3ebbfa75..b385184e 100644 --- a/bertos/cpu/arm/drv/adc_at91.c +++ b/bertos/cpu/arm/drv/adc_at91.c @@ -30,7 +30,6 @@ * * --> * - * * \brief ADC hardware-specific implementation * * This ADC module should be use both whit kernel or none. @@ -42,7 +41,6 @@ * * * \version $Id$ - * * \author Daniele Basile */ @@ -54,16 +52,16 @@ #include #include -// Define logging setting (for cfg/log.h module). +// Define log settings for cfg/log.h. #define LOG_LEVEL ADC_LOG_LEVEL -#define LOG_VERBOSITY ADC_LOG_VERBOSITY +#define LOG_FORMAT ADC_LOG_FORMAT #include #include #include -#if CONFIG_KERNEL +#if CONFIG_KERN #include #include #include @@ -106,7 +104,7 @@ ADC_IER = BV(ADC_DRDY); } -#endif /* CONFIG_KERNEL */ +#endif /* CONFIG_KERN */ /** @@ -131,14 +129,14 @@ INLINE uint16_t adc_hw_read(void) { ASSERT(!(ADC_SR & ADC_EOC_MASK)); - #if CONFIG_KERNEL + #if CONFIG_KERN adc_process = proc_current(); #endif // Start convertion ADC_CR = BV(ADC_START); - #if CONFIG_KERNEL + #if CONFIG_KERN // Ensure IRQs enabled. ASSERT(IRQ_ENABLED()); sig_wait(SIG_ADC_COMPLETE); @@ -195,7 +193,7 @@ INLINE void adc_hw_init(void) ADC_MR |= ((ADC_COMPUTED_SHTIME << ADC_SHTIME_SHIFT) & ADC_SHTIME_MASK); LOG_INFO("shtime[%ld]\n", (ADC_COMPUTED_SHTIME << ADC_SHTIME_SHIFT) & ADC_SHTIME_MASK); - #if CONFIG_KERNEL + #if CONFIG_KERN //Register and enable irq for adc. adc_enable_irq(); #endif