Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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] |
| 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:
-
xyz A 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:
-
xyz A 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:
-
x A 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:
-
x A 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:
-
y A 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:
-
y A 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:
-
z A 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:
-
z A 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:
-
addr The address to read from data The data to read from it len The 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:
-
frequency The 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.
Generated on Wed Jul 13 2022 01:33:25 by
1.7.2