1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#[derive(Copy, Clone)] pub enum PressureOversampling { MeasurementSkipped = 0b00000, One = 0b00100, Two = 0b01000, Four = 0b01100, Eight = 0b10000, Sixteen = 0b11100, } impl PressureOversampling { pub fn bits(&self) -> u8 { *self as u8 } }