Struct dps310::Config

source ·
pub struct Config { /* private fields */ }
Expand description

Configuration struct

Implementations§

source§

impl Config

source

pub fn new() -> Self

Creates a new configuration object with default values

source

pub fn pres_rate(&mut self, rate: PressureRate) -> &mut Self

source

pub fn pres_res(&mut self, res: PressureResolution) -> &mut Self

source

pub fn temp_rate(&mut self, rate: TemperatureRate) -> &mut Self

source

pub fn temp_res(&mut self, res: TemperatureResolution) -> &mut Self

source

pub fn int_hl(&mut self, int_on_sdo_pin: bool) -> &mut Self

Interrupt (on SDO pin) active level

source

pub fn int_fifo(&mut self, int_on_fifo: bool) -> &mut Self

source

pub fn int_temp(&mut self, int_on_temp: bool) -> &mut Self

source

pub fn int_pres(&mut self, int_on_pres: bool) -> &mut Self

source

pub fn temp_shift(&mut self, temp_shift_enable: bool) -> &mut Self

Set temperature result bit-shift, Must be set to true when oversampling rate > 8 times

source

pub fn pres_shift(&mut self, pres_shift_enable: bool) -> &mut Self

Set pressure result bit-shift, Must be set to true when oversampling rate > 8 times

source

pub fn fifo(&mut self, interrupt_on_full: bool, enable: bool) -> &mut Self

Set fifo options

source

pub fn spi_mode(&mut self, three_wire: bool) -> &mut Self

Set SPI mode (false -> 4 wire, true -> 3 wire interface)

Trait Implementations§

source§

impl Clone for Config

source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for Config

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.