From bd10e8d78cb53a786a644ee09c3ac01bba5f0fdc Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 20 Sep 2006 17:32:46 +0000 Subject: [PATCH] Use MOD_* macros instead of DB. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@718 38d2e660-2303-0410-9eaa-f027e97ec537 --- drv/adc.c | 15 ++++++++++----- drv/adc.h | 7 +++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/drv/adc.c b/drv/adc.c index c2a4b409..6e2f1aea 100755 --- a/drv/adc.c +++ b/drv/adc.c @@ -15,6 +15,9 @@ /*#* *#* $Log$ + *#* Revision 1.4 2006/09/20 17:32:46 marco + *#* Use MOD_* macros instead of DB. + *#* *#* Revision 1.3 2006/09/13 18:30:07 bernie *#* Add a FIXME. *#* @@ -33,11 +36,10 @@ // FIXME: move CPU specific part to adc_CPU.c #include -#include -#include +#include // ASSERT() +#include // MIN() #include - -DB(bool adc_initialized = false;) +#include /** * Read the ADC channel \a ch. @@ -52,6 +54,8 @@ adcread_t adc_read(uint16_t ch) return(adc_hw_read()); } +MOD_DEFINE(adc) + /** * Initialize the ADC hardware. */ @@ -61,6 +65,7 @@ void adc_init(void) IRQ_SAVE_DISABLE(flags); ADC_HW_INIT; - DB(adc_initialized = true;) IRQ_RESTORE(flags); + + MOD_INIT(adc); } diff --git a/drv/adc.h b/drv/adc.h index 6a36683d..a24c28f6 100755 --- a/drv/adc.h +++ b/drv/adc.h @@ -15,6 +15,9 @@ /*#* *#* $Log$ + *#* Revision 1.3 2006/09/20 17:32:46 marco + *#* Use MOD_* macros instead of DB. + *#* *#* Revision 1.2 2006/07/19 12:56:25 bernie *#* Convert to new Doxygen style. *#* @@ -30,12 +33,12 @@ #include #include -/**Type for ADC return value. */ +/** Type for ADC return value. */ typedef uint16_t adcread_t; #define adc_bits() ADC_BITS adcread_t adc_read(uint16_t ch); void adc_init(void); -DB(extern bool adc_initialized;) + #endif /* DRV_ADC_H */ -- 2.25.1