Mohamed Moawya / SnakeGame

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

FXOS8700QMagnetometer Class Reference

FXOS8700QMagnetometer Class Reference

FXOS8700QMagnetometer interface. More...

#include <FXOS8700Q.h>

Inherits FXOS8700Q.

Public Member Functions

virtual int16_t getX (int16_t &x) const
 Get the x data in counts.
virtual int16_t getY (int16_t &y) const
 Get the y data in counts.
virtual int16_t getZ (int16_t &z) const
 Get the z data in counts.
virtual float getX (float &x) const
 Get the x data in units.
virtual float getY (float &y) const
 Get the y data in units.
virtual float getZ (float &z) const
 Get the z data in units.
virtual void getAxis (motion_data_counts_t &xyz) const
 Get the x,y,z data in counts.
virtual void getAxis (motion_data_units_t &xyz) const
 Get the x,y,z data in units.
void readRegs (uint8_t addr, uint8_t *data, uint32_t len) const
 Read a device register.
uint8_t whoAmI (void) const
 Read the ID from a whoAmI register.
virtual void enable (void) const
 Enable the sensor for operation.
virtual void disable (void) const
 disable the sensors operation
virtual uint32_t sampleRate (uint32_t frequency) const
 Set the sensor sample rate.
virtual uint32_t dataReady (void) const
 Tells of new data is ready.

Detailed Description

FXOS8700QMagnetometer interface.

Definition at line 147 of file FXOS8700Q.h.


Member Function Documentation

uint32_t dataReady ( void   ) const [virtual, inherited]

Tells of new data is ready.

Returns:
The amount of data samples ready to be read from a device

Implements MotionSensor.

Definition at line 101 of file FXOS8700Q.cpp.

void disable ( void   ) const [virtual, inherited]

disable the sensors operation

Implements MotionSensor.

Definition at line 92 of file FXOS8700Q.cpp.

void enable ( void   ) const [virtual, inherited]

Enable the sensor for operation.

Implements MotionSensor.

Definition at line 83 of file FXOS8700Q.cpp.

void getAxis ( motion_data_counts_t xyz ) const [virtual]

Get the x,y,z data in counts.

Parameters:
xyzA referene to the variable to put the data in, 0 denotes not used

Implements MotionSensor.

Definition at line 215 of file FXOS8700Q.cpp.

void getAxis ( motion_data_units_t xyz ) const [virtual]

Get the x,y,z data in units.

Parameters:
xyzA referene to the variable to put the data in, 0 denotes not used

Implements MotionSensor.

Definition at line 224 of file FXOS8700Q.cpp.

float getX ( float &  x ) const [virtual]

Get the x data in units.

Parameters:
xA referene to the variable to put the data in, 0 denotes not used
Returns:
The x data in units

Implements MotionSensor.

Definition at line 197 of file FXOS8700Q.cpp.

int16_t getX ( int16_t &  x ) const [virtual]

Get the x data in counts.

Parameters:
xA referene to the variable to put the data in, 0 denotes not used
Returns:
The x data in counts

Implements MotionSensor.

Definition at line 179 of file FXOS8700Q.cpp.

float getY ( float &  y ) const [virtual]

Get the y data in units.

Parameters:
yA referene to the variable to put the data in, 0 denotes not used
Returns:
The y data in units

Implements MotionSensor.

Definition at line 203 of file FXOS8700Q.cpp.

int16_t getY ( int16_t &  y ) const [virtual]

Get the y data in counts.

Parameters:
yA referene to the variable to put the data in, 0 denotes not used
Returns:
The y data in counts

Implements MotionSensor.

Definition at line 185 of file FXOS8700Q.cpp.

int16_t getZ ( int16_t &  z ) const [virtual]

Get the z data in counts.

Parameters:
zA referene to the variable to put the data in, 0 denotes not used
Returns:
The z data in counts

Implements MotionSensor.

Definition at line 191 of file FXOS8700Q.cpp.

float getZ ( float &  z ) const [virtual]

Get the z data in units.

Parameters:
zA referene to the variable to put the data in, 0 denotes not used
Returns:
The z data in units

Implements MotionSensor.

Definition at line 209 of file FXOS8700Q.cpp.

void readRegs ( uint8_t  addr,
uint8_t *  data,
uint32_t  len 
) const [inherited]

Read a device register.

Parameters:
addrThe address to read from
dataThe data to read from it
lenThe amount of data to read from it
Returns:
0 if successful, negative number otherwise

Definition at line 56 of file FXOS8700Q.cpp.

uint32_t sampleRate ( uint32_t  frequency ) const [virtual, inherited]

Set the sensor sample rate.

Parameters:
frequencyThe desires sample frequency
Returns:
The amount of error in Hz between desired and actual frequency

Implements MotionSensor.

Definition at line 108 of file FXOS8700Q.cpp.

uint8_t whoAmI ( void   ) const [inherited]

Read the ID from a whoAmI register.

Returns:
The device whoAmI register contents

Definition at line 63 of file FXOS8700Q.cpp.