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.
Fork of ReferredCoursework2016 by
MagneticSensor Class Reference
An abstract class for a magnetometer. More...
#include <MagneticSensor.h>
Inherits GenericSensor.
Inherited by LIS3MDL.
Public Member Functions | |
virtual int | Get_M_Axes (int32_t *pData)=0 |
Get current magnetometer magnetic X/Y/Z-axes values in standard data units [mgauss]. | |
virtual int | Get_M_AxesRaw (int16_t *pData)=0 |
Get current magnetometer raw data X/Y/Z-axes values in device sepcific LSB units. | |
virtual int | Init (void *ptr)=0 |
Initialization of sensor. | |
virtual int | ReadID (uint8_t *id)=0 |
Get ID of sensor. |
Detailed Description
An abstract class for a magnetometer.
Definition at line 49 of file MagneticSensor.h.
Member Function Documentation
virtual int Get_M_Axes | ( | int32_t * | pData ) | [pure virtual] |
Get current magnetometer magnetic X/Y/Z-axes values in standard data units [mgauss].
- Parameters:
-
[out] pData Pointer to where to store magnetic values to. pData must point to an array of (at least) three elements, where: pData[0] corresponds to X-axis, pData[1] corresponds to Y-axis, and pData[2] corresponds to Z-axis.
- Returns:
- 0 in case of success, an error code otherwise
Implemented in LIS3MDL.
virtual int Get_M_AxesRaw | ( | int16_t * | pData ) | [pure virtual] |
Get current magnetometer raw data X/Y/Z-axes values in device sepcific LSB units.
- Parameters:
-
[out] pData Pointer to where to store magnetometer raw data to. pData must point to an array of (at least) three elements, where: pData[0] corresponds to X-axis, pData[1] corresponds to Y-axis, and pData[2] corresponds to Z-axis.
- Returns:
- 0 in case of success, an error code otherwise
Implemented in LIS3MDL.
virtual int Init | ( | void * | ptr ) | [pure virtual, inherited] |
Generated on Sat Jul 16 2022 05:47:22 by
