Minor fix: spacing
[bertos.git] / bertos / drv / adc.h
index 91f1ebd68d7f5ace94725300d0beec24b07c8066..78f3e81d41e5ef8409e21030fb962fbf53f6d5d3 100644 (file)
  *
  * -->
  *
- * \version $Id$
+ * \brief Analog to Digital Converter driver (ADC).
  *
- * \brief ADC driver (interface)
- *
- * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
+ *
+ * $WIZ$ module_name = "adc"
+ * $WIZ$ module_configuration = "bertos/cfg/cfg_adc.h"
+ * $WIZ$ module_supports = "not atmega103"
  */
 
 
@@ -64,6 +65,6 @@ void adc_init(void);
  * \note \a y1, \a y2 can be negative, and put in ascending or descending order as well.
  * \note \a data and \a y2 are evaluated only once, \a y1 twice.
  */
-#define ADC_RANGECONV(data, y1, y2) ((((data) * ((y2) - (y1))) / ((1 << ADC_BITS) - 1)) + (y1))
+#define ADC_RANGECONV(data, y1, y2) (((((int32_t)(data)) * ((y2) - (y1))) / ((1 << ADC_BITS) - 1)) + (y1))
 
 #endif /* DRV_ADC_H */