Skip to main content

raw_from_celsius

Function raw_from_celsius 

Source
pub fn raw_from_celsius(degrees: f32) -> i16
Expand description

Builds the register value nearest a temperature in degrees Celsius.

The inverse of celsius. Rounds to the nearest count, halves away from zero, and saturates at the ±256 °C register range.

§Arguments

  • degrees - the temperature in degrees Celsius.

§Returns

The signed 16-bit register value.