Board Support  Version 1.0
Functions available when using the Board Software Components
Magnetometer

Magnetometer Interface. More...

Structures

struct  MAGNETOMETER_STATE
 Magnetometer state. More...
 

Functions

int32_t Magnetometer_Initialize (void)
 Initialize magnetometer. More...
 
int32_t Magnetometer_Uninitialize (void)
 De-initialize magnetometer. More...
 
int32_t Magnetometer_GetState (MAGNETOMETER_STATE *pState)
 Get magnetometer state. More...
 

Description

Magnetometer Interface.


Data Structure Documentation

◆ MAGNETOMETER_STATE

struct MAGNETOMETER_STATE

Magnetometer state.

Structure for (X,Y,Z) magnetic flux density. The values are measured in 1/10 uT.

Data Fields
int32_t x X Axis Magnetic flux density in 1/10 uT.
int32_t y Y Axis Magnetic flux density in 1/10 uT.
int32_t z Z Axis Magnetic flux density in 1/10 uT.

Function Documentation

◆ Magnetometer_GetState()

int32_t Magnetometer_GetState ( MAGNETOMETER_STATE pState)

Get magnetometer state.

The function reads the magnetometer state and writes the data into pState. The parameter pState is a pointer to the structure MAGNETOMETER_STATE. The function returns an integer value of 0 on success, and -1 on error.

Parameters
[out]pStatepointer to MAGNETOMETER_STATE structure
Returns
  • 0: function succeeded
  • -1: function failed

◆ Magnetometer_Initialize()

int32_t Magnetometer_Initialize ( void  )

Initialize magnetometer.


The function initializes the magnetometer interface and returns an integer value of 0 on success, and -1 on error.

Returns
  • 0: function succeeded
  • -1: function failed

◆ Magnetometer_Uninitialize()

int32_t Magnetometer_Uninitialize ( void  )

De-initialize magnetometer.

The function de-initializes the magnetometer interface and returns an integer value of 0 on success, and -1 on error.

Returns
  • 0: function succeeded
  • -1: function failed