Create a project for TT_Mxx.

Embed: (wiki syntax)

« Back to documentation index

FXAS21000 Class Reference

FXAS21000 Class Reference

FXAS21000 gyroscope on I2C. More...

#include <FXAS21000.h>

Public Member Functions

 FXAS21000 (PinName sda, PinName scl)
 FXAS21000 constructor.
void ReadXYZ (float *a)
 Get the Gyro values as floating point degrees / second.
void ReadXYZraw (int16_t *t)
 Get the Gyro values as signed 16 bit value.
char getWhoAmI (void)
 Get the value of the WHO_AM_I register.

Detailed Description

FXAS21000 gyroscope on I2C.

Definition at line 42 of file FXAS21000.h.


Constructor & Destructor Documentation

FXAS21000 ( PinName  sda,
PinName  scl 
)

FXAS21000 constructor.

Parameters:
sdaSDA pin
sdlSCL pin

Definition at line 3 of file FXAS21000.cpp.


Member Function Documentation

char getWhoAmI ( void   )

Get the value of the WHO_AM_I register.

Returns:
DEVICE_ID value == 0xD1

Definition at line 39 of file FXAS21000.cpp.

void ReadXYZ ( float *  a )

Get the Gyro values as floating point degrees / second.

Parameters:
floatingpoint array where the results will be placed

Definition at line 46 of file FXAS21000.cpp.

void ReadXYZraw ( int16_t *  t )

Get the Gyro values as signed 16 bit value.

Parameters:
int16_tpoint array where the results will be placed

Definition at line 63 of file FXAS21000.cpp.