[][src]Struct qmc5883l::QMC5883L

pub struct QMC5883L<I2C> { /* fields omitted */ }

QMC5883L driver

Methods

impl<I2C, E> QMC5883L<I2C> where
    I2C: WriteRead<Error = E> + Write<Error = E>, 
[src]

pub fn new(i2c: I2C) -> Result<Self, Error<E>>[src]

Creates a new QMC5883L device from an I2C peripheral; begins with a soft reset.

pub fn reset(&mut self) -> Result<(), E>[src]

Soft reset the device.

pub fn set_field_range(&mut self, rng: FieldRange) -> Result<(), E>[src]

Set the device field range.

pub fn set_oversample(&mut self, osr: OversampleRate) -> Result<(), E>[src]

Set the device oversampling rate.

pub fn set_output_data_rate(&mut self, odr: OutputDataRate) -> Result<(), E>[src]

Set the device output data rate.

pub fn continuous(&mut self) -> Result<(), E>[src]

Put device in continous mode.

pub fn standby(&mut self) -> Result<(), E>[src]

Put device in standby mode.

pub fn enable_interrupt(&mut self) -> Result<(), E>[src]

Enable interrupt pin.

pub fn disable_interrupt(&mut self) -> Result<(), E>[src]

Disable interrupt pin.

pub fn temp(&mut self) -> Result<i16, E>[src]

Read temperature sensor; temperature coefficient is about 100 LSB/°C.

pub fn mag(&mut self) -> Result<(i16, i16, i16), Error<E>>[src]

Read raw (x,y,z) from magnetometer.

Auto Trait Implementations

impl<I2C> Send for QMC5883L<I2C> where
    I2C: Send

impl<I2C> Sync for QMC5883L<I2C> where
    I2C: Sync

impl<I2C> Unpin for QMC5883L<I2C> where
    I2C: Unpin

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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