Skip to main content

registers_of

Function registers_of 

Source
pub fn registers_of(raw: &RawMeasurement) -> [u8; 8]
Expand description

The eight data registers a raw measurement sits in.

§Arguments

  • raw - the converter values.

§Returns

The bytes, which is what RawMeasurement::from_registers reads back.

§Examples

use pamoja_sensors::bme280::{sim, RawMeasurement};

let raw = RawMeasurement::from_registers(&sim::BURST);
assert_eq!(sim::registers_of(&raw), sim::BURST, "what it reads is what it holds");