-/*!
+/**
* \file
* <!--
* Copyright 2005 Develer S.r.l. (http://www.develer.com/)
/*#*
*#* $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.
*#*
#include <drv/adc.h>
#include <drv/timer.h>
+
+// FIXME: move CPU specific part to adc_CPU.c
#include <hw_adc.h>
-#include <cfg/debug.h>
-#include <cfg/macros.h>
+#include <cfg/debug.h> // ASSERT()
+#include <cfg/macros.h> // MIN()
#include <cfg/compiler.h>
+#include <cfg/module.h>
-DB(bool adc_initialized = false;)
-
-/*!
+/**
* Read the ADC channel \a ch.
*/
adcread_t adc_read(uint16_t ch)
return(adc_hw_read());
}
-/*!
+MOD_DEFINE(adc)
+
+/**
* Initialize the ADC hardware.
*/
void adc_init(void)
IRQ_SAVE_DISABLE(flags);
ADC_HW_INIT;
- DB(adc_initialized = true;)
IRQ_RESTORE(flags);
+
+ MOD_INIT(adc);
}