APIs description

Doxygen complete API documentation

Doxygen documentation Link to doxygen API documentation

Parent classes

Main class MMC5983MA_SPI derives from ABSTRACT_SENSOR_SPI and ABSTRACT_BARO which are documented in ABSTRACT_SENSORS.

Available classes

MMC5983MA_SPI

class MMC5983MA_SPI : public ABSTRACT_SENSOR_SPI, public ABSTRACT_MAG

Public Functions

void setMagOdrBw(MMC5983MA_ENUM::ODR magFreq, MMC5983MA_ENUM::BW magBw)

Sets the magnetometer output data rate (ODR) and bandwidth (BW).

Parameters:
  • magFreq – The desired magnetometer output data rate.

  • magBw – The desired magnetometer bandwidth.

void setPeriodicSetTime(MMC5983MA_ENUM::PERIODIC_SET_TIME time)

Sets the periodic set time for the MMC5983MA sensor.

Parameters:

time – The periodic set time to be set.

void setPeriodicSetState(bool state)

Will enable or disable the periodic set feature of the MMC5983MA sensor.

Parameters:

state – The desired state of the periodic setting.

void setAutoSetResetState(bool state)

Enable the automatic set/reset feauture of the MMC5983MA sensor.

Parameters:

state – The desired state of the automatic set/reset feature.

void softResetSensor()

Performs a soft reset of the sensor.

void setCurrent()

Manually apply set current degaussing.

void resetCurrent()

Manually reset current degaussing.

void askForOneMagMeasure()

Asks for one magnetic measurement.

void askForOneTempMeasure()

Asks for one temperature measurement.

void activateAxis(bool activeX, bool activeYZ)

Activates or deactivates the specified axes.

Parameters:
  • activeX – Flag indicating whether to activate or deactivate the X-axis.

  • activeYZ – Flag indicating whether to activate or deactivate the Y and Z axes.

void updateBridgeOffset()

Updates the bridge offset.

The bridge offset is the value that is added to the raw magnetic measurements. The idea is to force the internal magnetization in the direction of SET field, do a measure and repeat the maneuver in the opposite direction with a RESET. The substraction of the two measurements gives the offset.

void setMeasCheckStates(bool magCheck, bool tempCheck)

Sets the measurement check states for the magnetometer and temperature sensor.

Parameters:
  • magCheck – Flag indicating whether to verify magnetometer measurement status before doing a measurement.

  • tempCheck – Flag indicating whether to verify temperature measurement status before doing a measurement.

MMC5983MA_REGISTERS

struct MMC5983MA_REGISTERS

MMC5983MA_REGISTER_VALUES

struct MMC5983MA_REGISTER_VALUES