projects
/
bertos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab10db1
)
Add missing cast.
author
batt
<batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 5 Sep 2008 17:23:37 +0000
(17:23 +0000)
committer
batt
<batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 5 Sep 2008 17:23:37 +0000
(17:23 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1796
38d2e660
-2303-0410-9eaa-
f027e97ec537
bertos/drv/adc.h
patch
|
blob
|
history
diff --git
a/bertos/drv/adc.h
b/bertos/drv/adc.h
index 91f1ebd68d7f5ace94725300d0beec24b07c8066..d34accfe0eb3ffc4839efc9eacf9463f8e8a4116 100644
(file)
--- a/
bertos/drv/adc.h
+++ b/
bertos/drv/adc.h
@@
-64,6
+64,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 */