capsules_extra::fxos8700cq

Struct Fxos8700cq

Source
pub struct Fxos8700cq<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Fxos8700cq<'a>

Source

pub fn new( i2c: &'a dyn I2CDevice, interrupt_pin1: &'a dyn InterruptPin<'a>, buffer: &'static mut [u8], ) -> Fxos8700cq<'a>

Trait Implementations§

Source§

impl Client for Fxos8700cq<'_>

Source§

fn fired(&self)

Called when an interrupt occurs. The identifier will be the same value that was passed to enable_interrupt() when the interrupt was configured.
Source§

impl I2CClient for Fxos8700cq<'_>

Source§

fn command_complete(&self, buffer: &'static mut [u8], status: Result<(), Error>)

Called when an I2C command completed. The error denotes whether the command completed successfully or if an error occured.
Source§

impl<'a> NineDof<'a> for Fxos8700cq<'a>

Source§

fn set_client(&self, client: &'a dyn NineDofClient)

Set the client to be notified when the capsule has data ready or has finished some command. This is likely called in a board’s main.rs and is set to the virtual_ninedof.rs driver.
Source§

fn read_accelerometer(&self) -> Result<(), ErrorCode>

Get a single instantaneous reading of the acceleration in the X,Y,Z directions.
Source§

fn read_magnetometer(&self) -> Result<(), ErrorCode>

Get a single instantaneous reading from the magnetometer in all three directions.
Source§

fn read_gyroscope(&self) -> Result<(), ErrorCode>

Get a single instantaneous reading from the gyroscope of the rotation around all three axes.

Auto Trait Implementations§

§

impl<'a> !Freeze for Fxos8700cq<'a>

§

impl<'a> !RefUnwindSafe for Fxos8700cq<'a>

§

impl<'a> !Send for Fxos8700cq<'a>

§

impl<'a> !Sync for Fxos8700cq<'a>

§

impl<'a> Unpin for Fxos8700cq<'a>

§

impl<'a> !UnwindSafe for Fxos8700cq<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.