/*#*
*#* $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.
*#*
// 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>
-
-DB(bool adc_initialized = false;)
+#include <cfg/module.h>
/**
* Read the ADC channel \a ch.
return(adc_hw_read());
}
+MOD_DEFINE(adc)
+
/**
* Initialize the ADC hardware.
*/
IRQ_SAVE_DISABLE(flags);
ADC_HW_INIT;
- DB(adc_initialized = true;)
IRQ_RESTORE(flags);
+
+ MOD_INIT(adc);
}
/*#*
*#* $Log$
+ *#* Revision 1.3 2006/09/20 17:32:46 marco
+ *#* Use MOD_* macros instead of DB.
+ *#*
*#* Revision 1.2 2006/07/19 12:56:25 bernie
*#* Convert to new Doxygen style.
*#*
#include <cfg/compiler.h>
#include <cfg/debug.h>
-/**Type for ADC return value. */
+/** Type for ADC return value. */
typedef uint16_t adcread_t;
#define adc_bits() ADC_BITS
adcread_t adc_read(uint16_t ch);
void adc_init(void);
-DB(extern bool adc_initialized;)
+
#endif /* DRV_ADC_H */