| commit | f954105ed02dc4e7b21439ab8ee21ffdb1de50bd | [log] [tgz] |
|---|---|---|
| author | Martin Hoff <martin.hoff@silabs.com> | Fri Sep 19 14:54:25 2025 +0200 |
| committer | Chris Friedt <chrisfriedt@gmail.com> | Thu Oct 09 12:42:56 2025 -0400 |
| tree | 82fa9dfca4206db583d47f641eba4d5d2cb89129 | |
| parent | 528e732aadb6c38829f7a5be1b937943819e0013 [diff] |
drivers: adc: enhance millivolt conversion with 64-bit support This commit updates the adc_raw_to_millivolts function to use 64-bit arithmetic. It is necessary when the intermediate result is higher than the maximum value of uint32_t. It also adds a range check to ensure the conversion result does not exceed the limits of int32_t, providing an assertion message for out-of-range values. Signed-off-by: Martin Hoff <martin.hoff@silabs.com>