X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Fadc.c;h=22ec7636020453119cf5d875218297c5cd18804c;hb=9ba9dcf2a59a952609e19154e11de3e2478cbf42;hp=c775e16175f0c86ba62e2fffd00e5dd92e3f14fe;hpb=4e5ed47bad71f6730e6a041cbe00418d458d0c9c;p=bertos.git diff --git a/drv/adc.c b/drv/adc.c old mode 100755 new mode 100644 index c775e161..22ec7636 --- a/drv/adc.c +++ b/drv/adc.c @@ -1,8 +1,33 @@ -/*! +/** * \file * * * \version $Id$ @@ -15,6 +40,15 @@ /*#* *#* $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. + *#* + *#* Revision 1.2 2006/07/19 12:56:25 bernie + *#* Convert to new Doxygen style. + *#* *#* Revision 1.1 2005/06/27 21:28:31 bernie *#* Import ADC driver. *#* @@ -23,15 +57,16 @@ #include #include + +// FIXME: move CPU specific part to adc_CPU.c #include -#include -#include +#include // ASSERT() +#include // MIN() #include +#include -DB(bool adc_initialized = false;) - -/*! +/** * Read the ADC channel \a ch. */ adcread_t adc_read(uint16_t ch) @@ -44,7 +79,9 @@ adcread_t adc_read(uint16_t ch) return(adc_hw_read()); } -/*! +MOD_DEFINE(adc) + +/** * Initialize the ADC hardware. */ void adc_init(void) @@ -53,6 +90,7 @@ void adc_init(void) IRQ_SAVE_DISABLE(flags); ADC_HW_INIT; - DB(adc_initialized = true;) IRQ_RESTORE(flags); + + MOD_INIT(adc); }