[−][src]Struct qmc5883l::QMC5883L
QMC5883L driver
Methods
impl<I2C, E> QMC5883L<I2C> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
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,
I2C: Send,
impl<I2C> Sync for QMC5883L<I2C> where
I2C: Sync,
I2C: Sync,
impl<I2C> Unpin for QMC5883L<I2C> where
I2C: Unpin,
I2C: Unpin,
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,