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

Gyroscope Interface. More...

Structures

struct  GYROSCOPE_STATE
 Gyroscope state. More...
 

Functions

int32_t Gyroscope_Initialize (void)
 Initialize gyroscope. More...
 
int32_t Gyroscope_Uninitialize (void)
 De-initialize gyroscope. More...
 
int32_t Gyroscope_GetState (GYROSCOPE_STATE *pState)
 Get gyroscope state. More...
 

Description

Gyroscope Interface.


Data Structure Documentation

◆ GYROSCOPE_STATE

struct GYROSCOPE_STATE

Gyroscope state.

Structure for (X,Y,Z) angular speed.

Data Fields
int32_t x X Axis Angular Speed in mdps (1/1000 deg/sec)
int32_t y Y Axis Angular Speed in mdps (1/1000 deg/sec)
int32_t z Z Axis Angular Speed in mdps (1/1000 deg/sec)

Function Documentation

◆ Gyroscope_GetState()

int32_t Gyroscope_GetState ( GYROSCOPE_STATE pState)

Get gyroscope state.

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

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

◆ Gyroscope_Initialize()

int32_t Gyroscope_Initialize ( void  )

Initialize gyroscope.

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

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

◆ Gyroscope_Uninitialize()

int32_t Gyroscope_Uninitialize ( void  )

De-initialize gyroscope.

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

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