Board Support  Version 1.0
Functions available when using the Board Software Components
 All Data Structures Functions Variables Groups Pages
Accelerometer

Accelerometer Interface. More...

Structures

struct  ACCELEROMETER_STATE
 Accelerometer state. More...
 

Functions

int32_t Accelerometer_Initialize (void)
 Initialize accelerometer.
 
int32_t Accelerometer_Uninitialize (void)
 De-initialize accelerometer.
 
int32_t Accelerometer_GetState (ACCELEROMETER_STATE *pState)
 Get accelerometer state.
 

Description

Accelerometer Interface.


Data Structure Documentation

struct ACCELEROMETER_STATE

Accelerometer state.

Structure for (X,Y,Z) acceleration.

Data Fields
int32_t x X Axis Acceleration in mg (1/1000 g)
int32_t y Y Axis Acceleration in mg (1/1000 g)
int32_t z Z Axis Acceleration in mg (1/1000 g)

Function Documentation

int32_t Accelerometer_GetState ( ACCELEROMETER_STATE pState)

Get accelerometer state.

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

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

int32_t Accelerometer_Initialize ( void  )

Initialize accelerometer.

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

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

int32_t Accelerometer_Uninitialize ( void  )

De-initialize accelerometer.

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

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