Sample program for interfacing with PNI's RM3100 Breakout Board
RM3100MagDriver.cpp File Reference
Sensor driver for RM3100 magnetometer. More...
Go to the source code of this file.
Functions | |
SensorStatus | mag_enable_interrupts () |
Enables the interrupt request from the sensor. | |
SensorStatus | mag_disable_interrupts () |
Disables the interrupt request from the sensor. | |
SensorPowerMode | mag_set_power_mode (SensorPowerMode mode) |
If possible, sets the sensor to the requested power mode. | |
SensorStatus | mag_initialize_sensor () |
Initializes the sensor into a known state. | |
SensorPowerMode | mag_get_power_mode () |
Used to determine the current power mode of the sensor. | |
unsigned short | mag_get_sample_rate () |
Retrieves the mset sample rate of the sensor. |
Detailed Description
Sensor driver for RM3100 magnetometer.
- Date:
- 03/03/2017 (C) 2017 PNI Corp
This sample code is provided "as is" without express or implied warranty.
Definition in file RM3100MagDriver.cpp.
Function Documentation
SensorStatus mag_disable_interrupts | ( | ) |
Disables the interrupt request from the sensor.
- Returns:
- Status of the sensor.
Definition at line 51 of file RM3100MagDriver.cpp.
SensorStatus mag_enable_interrupts | ( | ) |
Enables the interrupt request from the sensor.
- Returns:
- Status of the sensor. Not supported in AKM8975
Definition at line 33 of file RM3100MagDriver.cpp.
SensorPowerMode mag_get_power_mode | ( | ) |
Used to determine the current power mode of the sensor.
- Returns:
- The current power mode of the sensor.
Definition at line 145 of file RM3100MagDriver.cpp.
unsigned short mag_get_sample_rate | ( | ) |
Retrieves the mset sample rate of the sensor.
- Returns:
- The actual sample rate of the sensor.
Definition at line 207 of file RM3100MagDriver.cpp.
SensorStatus mag_initialize_sensor | ( | ) |
Initializes the sensor into a known state.
- Return values:
-
SensorOK The sensor has already been initialized SensorErrorUnexpectedDevice The sensor did not return expected results. SensorUnknownError An unknown error has occured.
Definition at line 97 of file RM3100MagDriver.cpp.
SensorPowerMode mag_set_power_mode | ( | SensorPowerMode | mode ) |
If possible, sets the sensor to the requested power mode.
*
- Parameters:
-
mode The requested sensor mode.
- Returns:
- The actual state the sensor was set to.
Definition at line 66 of file RM3100MagDriver.cpp.
Generated on Wed Jul 13 2022 23:44:02 by 1.7.2