X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Fadc.c;h=6e2f1aeaf38f3f40e30e1c64f94d6f7ea0468349;hb=46ac2c9347e738ee3c23109b83d522023ac4e7c9;hp=dffb9ce47f3b2ad488a4a6c4234161ed8371fcf0;hpb=bcf38f772b397e7a8ba781a69aacb9380e54b32a;p=bertos.git diff --git a/drv/adc.c b/drv/adc.c index dffb9ce4..6e2f1aea 100755 --- a/drv/adc.c +++ b/drv/adc.c @@ -15,6 +15,12 @@ /*#* *#* $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. *#* @@ -26,13 +32,14 @@ #include #include + +// 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. @@ -47,6 +54,8 @@ adcread_t adc_read(uint16_t ch) return(adc_hw_read()); } +MOD_DEFINE(adc) + /** * Initialize the ADC hardware. */ @@ -56,6 +65,7 @@ void adc_init(void) IRQ_SAVE_DISABLE(flags); ADC_HW_INIT; - DB(adc_initialized = true;) IRQ_RESTORE(flags); + + MOD_INIT(adc); }