X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Fadc.c;h=22ec7636020453119cf5d875218297c5cd18804c;hb=70fbca7abd15ab931dc82119f5b0b8f7b3fe1596;hp=dffb9ce47f3b2ad488a4a6c4234161ed8371fcf0;hpb=bcf38f772b397e7a8ba781a69aacb9380e54b32a;p=bertos.git diff --git a/drv/adc.c b/drv/adc.c old mode 100755 new mode 100644 index dffb9ce4..22ec7636 --- a/drv/adc.c +++ b/drv/adc.c @@ -1,8 +1,33 @@ /** * \file * * * \version $Id$ @@ -15,6 +40,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 +57,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 +79,8 @@ adcread_t adc_read(uint16_t ch) return(adc_hw_read()); } +MOD_DEFINE(adc) + /** * Initialize the ADC hardware. */ @@ -56,6 +90,7 @@ void adc_init(void) IRQ_SAVE_DISABLE(flags); ADC_HW_INIT; - DB(adc_initialized = true;) IRQ_RESTORE(flags); + + MOD_INIT(adc); }