Skip to main content

temperature_offset_word

Function temperature_offset_word 

Source
pub fn temperature_offset_word(milli_celsius: u32) -> u16
Expand description

Encodes a temperature offset as the set_temperature_offset word.

Table 13: word = T_offset [°C] * 2^16 / 175, rounded to the nearest. The word scale is 2^16, unlike the measurement’s 2^16 - 1.

§Arguments

  • milli_celsius - the offset in milli-degrees Celsius; the offset is never negative.

§Returns

The 16-bit offset word.