mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-28 23:09:46 +01:00
86d751d4d3
In `dac_util_map(...)` the expression `((value - min) * UINT16_MAX)` was cast to a 16 bit unsigned, then divided by `(max - min)`. This means that anytime `(value - min) != 0` the numerator was truncated prior to being divided and then returned. This patch modifies the expression so that the downcast to 16 bits is performed as the last operation. |
||
---|---|---|
.. | ||
adc_util.c | ||
dac_util.c | ||
Kconfig | ||
Makefile |