Change md2_end prototype. Remove a unneeded memcpy in md2_end. Add comments.
[bertos.git] / drv / adc.c
index c775e16175f0c86ba62e2fffd00e5dd92e3f14fe..6e2f1aeaf38f3f40e30e1c64f94d6f7ea0468349 100755 (executable)
--- a/drv/adc.c
+++ b/drv/adc.c
@@ -1,4 +1,4 @@
-/*!
+/**
  * \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)
@@ -44,7 +54,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 +65,7 @@ void adc_init(void)
        IRQ_SAVE_DISABLE(flags);
 
        ADC_HW_INIT;
-       DB(adc_initialized = true;)
        IRQ_RESTORE(flags);
+
+       MOD_INIT(adc);
 }