X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Fadc.c;h=ce2a9e223396376d4d5770b4560ba2464d3adbae;hb=77c1d6ba65a199f60faa0e0a68e63ef0eb87677c;hp=c2a4b409265532a052ed7acfaa785d68cb014921;hpb=3da0dee2a5b209dcf3a6160468ed82ef24584d16;p=bertos.git diff --git a/drv/adc.c b/drv/adc.c old mode 100755 new mode 100644 index c2a4b409..ce2a9e22 --- a/drv/adc.c +++ b/drv/adc.c @@ -1,6 +1,31 @@ /** * \file * @@ -15,6 +40,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 +61,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 +79,8 @@ adcread_t adc_read(uint16_t ch) return(adc_hw_read()); } +MOD_DEFINE(adc) + /** * Initialize the ADC hardware. */ @@ -61,6 +90,7 @@ void adc_init(void) IRQ_SAVE_DISABLE(flags); ADC_HW_INIT; - DB(adc_initialized = true;) IRQ_RESTORE(flags); + + MOD_INIT(adc); }