Function milli_celsius
Source pub fn milli_celsius(raw: u16) -> i32
Expand description
Converts a raw temperature word to millidegrees Celsius.
This is the datasheet’s T = -45 + 175 * S_T / (2^16 - 1) in integer arithmetic,
rounded to the nearest millidegree.
§Arguments
raw - the 16-bit temperature word.
§Returns
The temperature in millidegrees Celsius, from -45000 to 130000.