[][src]Struct hmc5983::HMC5983

pub struct HMC5983<SI> { /* fields omitted */ }

Implementations

impl<SI, CommE, PinE> HMC5983<SI> where
    SI: SensorInterface<InterfaceError = Error<CommE, PinE>>, 
[src]

pub fn new_with_interface(sensor_interface: SI) -> Self[src]

pub fn init(
    &mut self,
    delay_source: &mut impl DelayMs<u8>
) -> Result<(), Error<CommE, PinE>>
[src]

pub fn set_gain(&mut self, gain: GainSetting) -> Result<(), Error<CommE, PinE>>[src]

Set the mag gain, which determines the range

pub fn set_all_config_a(
    &mut self,
    mode: MeasurementModeSetting,
    odr: OdrSetting,
    averaging: SampleAvgSetting,
    temp_enabled: bool
) -> Result<(), Error<CommE, PinE>>
[src]

Set all of the Config A register settings

pub fn get_mag_vector(&mut self) -> Result<[i16; 3], Error<CommE, PinE>>[src]

pub fn get_temperature(&mut self) -> Result<i16, Error<CommE, PinE>>[src]

Read temperature from device Result is degrees Celsius

Auto Trait Implementations

impl<SI> Send for HMC5983<SI> where
    SI: Send

impl<SI> Sync for HMC5983<SI> where
    SI: Sync

impl<SI> Unpin for HMC5983<SI> where
    SI: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.