Struct capsules::fxos8700cq::Fxos8700cq
[−]
[src]
pub struct Fxos8700cq<'a> {
i2c: &'a I2CDevice,
interrupt_pin1: &'a Pin,
state: Cell<State>,
buffer: TakeCell<'static, [u8]>,
callback: Cell<Option<&'static NineDofClient>>,
}Fields
i2c: &'a I2CDevice
interrupt_pin1: &'a Pin
state: Cell<State>
buffer: TakeCell<'static, [u8]>
callback: Cell<Option<&'static NineDofClient>>
Methods
impl<'a> Fxos8700cq<'a>[src]
pub fn new(
i2c: &'a I2CDevice,
interrupt_pin1: &'a Pin,
buffer: &'static mut [u8]
) -> Fxos8700cq<'a>[src]
i2c: &'a I2CDevice,
interrupt_pin1: &'a Pin,
buffer: &'static mut [u8]
) -> Fxos8700cq<'a>
fn start_read_accel(&self)[src]
fn start_read_magnetometer(&self)[src]
Trait Implementations
impl<'a> Client for Fxos8700cq<'a>[src]
fn fired(&self, _: usize)[src]
Called when an interrupt occurs. The identifier will be the same value that was passed to enable_interrupt() when the interrupt was configured. Read more
impl<'a> I2CClient for Fxos8700cq<'a>[src]
fn command_complete(&self, buffer: &'static mut [u8], _error: Error)[src]
Called when an I2C command completed. The error denotes whether the command completed successfully or if an error occured. Read more
impl<'a> NineDof for Fxos8700cq<'a>[src]
fn set_client(&self, client: &'static NineDofClient)[src]
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. Read more
fn read_accelerometer(&self) -> ReturnCode[src]
Get a single instantaneous reading of the acceleration in the X,Y,Z directions. Read more
fn read_magnetometer(&self) -> ReturnCode[src]
Get a single instantaneous reading from the magnetometer in all three directions. Read more
fn read_gyroscope(&self) -> ReturnCode[src]
Get a single instantaneous reading from the gyroscope of the rotation around all three axes. Read more