Sensorian  1.0
C API Reference Guide Library
Accelerometer and Magnetometer

Functions

void FXOS8700CQ_Initialize (void)
 Initialize FXOS8700CQ, configure for an output rate of 200Hz with a +/- 2g scale. More...
 
char FXOS8700CQ_ReadStatusReg (void)
 Return the value of the status register. More...
 
void FXOS8700CQ_ActiveMode (void)
 Starts up the sensor in Active mode. More...
 
char FXOS8700CQ_StandbyMode (void)
 Starts up the sensor in Active mode. More...
 
void FXOS8700CQ_HybridMode (void)
 Configure the sensor in hybrid mode both the accelerometer and the magnetometer are active for data output. More...
 
char FXOS8700CQ_GetChipMode (void)
 Returns current mode of the chip. More...
 
char FXOS8700CQ_ID (void)
 Returns the chip ID. More...
 
void FXOS8700CQ_ConfigureAccelerometer (void)
 Configure the accelerometer for data output. More...
 
void FXOS8700CQ_PollAccelerometer (rawdata_t *accel_data)
 Accelerometer data is left justified. More...
 
void FXOS8700CQ_HighPassFilter (char status)
 Enables or disables higpass filter on accelerometer data. More...
 
void FXOS8700CQ_FullScaleRange (range_t range)
 Configures the full scale range of the Accelerometer. More...
 
void FXOS8700CQ_SetAccelerometerDynamicRange (range_t range)
 Returns current mode of the chip. More...
 
void FXOS8700CQ_ConfigureMagnetometer (void)
 Configure the magnetometer for data output. More...
 
void FXOS8700CQ_PollMagnetometer (rawdata_t *mag_data)
 Return the raw magnetometer data. More...
 
char FXOS8700CQ_MagnetometerStatus (void)
 Get magnetometer status. More...
 
void FXOS8700CQ_GetData (rawdata_t *accel_data, rawdata_t *magn_data)
 Get raw data from both accelerometer and magnetometer. More...
 
void FXOS8700CQ_FIFOMode (mode_t mode)
 Returns current mode of the chip. More...
 
char FXOS8700CQ_GetODR (void)
 Get output data rate. More...
 
void FXOS8700CQ_SetODR (char DataRateValue)
 Set output data rate. More...
 
char FXOS8700CQ_GetTemperature (void)
 Returns the silicon die chip temperature. More...
 
char FXOS8700CQ_GetOrientation (void)
 Returns current mode of the chip. More...
 
void FXOS8700CQ_ConfigureOrientation (void)
 Configure Orientation mode. More...
 
void FXOS8700CQ_ConfigureGenericTapMode (void)
 Configure Single Tap mode. More...
 
void FXOS8700CQ_ConfigureSingleTapMode (void)
 Configure Single Tap mode. More...
 
void FXOS8700CQ_ConfigureDoubleTapMode (void)
 DoubleTap_LowPowerMode_NoLPF_400HzODR. More...
 

Detailed Description

These functions expose the accelerometer and magnetometer functionality

Function Documentation

void FXOS8700CQ_ActiveMode ( void  )

Starts up the sensor in Active mode.

Returns
none

Definition at line 69 of file FXOS8700CQ.c.

void FXOS8700CQ_ConfigureAccelerometer ( void  )

Configure the accelerometer for data output.

Returns
none

Definition at line 126 of file FXOS8700CQ.c.

void FXOS8700CQ_ConfigureDoubleTapMode ( void  )

DoubleTap_LowPowerMode_NoLPF_400HzODR.

Returns
none

Definition at line 490 of file FXOS8700CQ.c.

void FXOS8700CQ_ConfigureGenericTapMode ( void  )

Configure Single Tap mode.

Returns
none

Definition at line 444 of file FXOS8700CQ.c.

void FXOS8700CQ_ConfigureMagnetometer ( void  )

Configure the magnetometer for data output.

Returns
none

Definition at line 202 of file FXOS8700CQ.c.

void FXOS8700CQ_ConfigureOrientation ( void  )

Configure Orientation mode.

Returns
none

Definition at line 328 of file FXOS8700CQ.c.

void FXOS8700CQ_ConfigureSingleTapMode ( void  )

Configure Single Tap mode.

Returns
none

Definition at line 467 of file FXOS8700CQ.c.

void FXOS8700CQ_FIFOMode ( mode_t  mode)

Returns current mode of the chip.

Parameters
modeFIFO mode
Returns
none

Definition at line 273 of file FXOS8700CQ.c.

void FXOS8700CQ_FullScaleRange ( range_t  range)

Configures the full scale range of the Accelerometer.

Parameters
rangefull scale range.
Returns
mode

Definition at line 164 of file FXOS8700CQ.c.

char FXOS8700CQ_GetChipMode ( void  )

Returns current mode of the chip.

Returns
mode Current status mode of the chip.

Definition at line 106 of file FXOS8700CQ.c.

void FXOS8700CQ_GetData ( rawdata_t accel_data,
rawdata_t magn_data 
)

Get raw data from both accelerometer and magnetometer.

Parameters
*accel_dataPointer to accelerometer data to read into.
*magn_dataPointer to magnetometer data to read into.
Returns
none

Definition at line 240 of file FXOS8700CQ.c.

char FXOS8700CQ_GetODR ( void  )

Get output data rate.

Returns
ODR Output data rate settings

Definition at line 282 of file FXOS8700CQ.c.

char FXOS8700CQ_GetOrientation ( void  )

Returns current mode of the chip.

Returns
mode Orientation mode

Definition at line 318 of file FXOS8700CQ.c.

char FXOS8700CQ_GetTemperature ( void  )

Returns the silicon die chip temperature.

Returns
temp Chip temperature

Definition at line 307 of file FXOS8700CQ.c.

void FXOS8700CQ_HighPassFilter ( char  status)

Enables or disables higpass filter on accelerometer data.

Parameters
statusEnable or disable status
Returns
none

Definition at line 154 of file FXOS8700CQ.c.

void FXOS8700CQ_HybridMode ( void  )

Configure the sensor in hybrid mode both the accelerometer and the magnetometer are active for data output.

Returns
none

Definition at line 91 of file FXOS8700CQ.c.

char FXOS8700CQ_ID ( void  )

Returns the chip ID.

Returns
Chip ID , should be 0xC7

Definition at line 116 of file FXOS8700CQ.c.

void FXOS8700CQ_Initialize ( void  )

Initialize FXOS8700CQ, configure for an output rate of 200Hz with a +/- 2g scale.

Returns
none

Definition at line 42 of file FXOS8700CQ.c.

char FXOS8700CQ_MagnetometerStatus ( void  )

Get magnetometer status.

Returns
Status Magnetometer status.

Definition at line 228 of file FXOS8700CQ.c.

void FXOS8700CQ_PollAccelerometer ( rawdata_t accel_data)

Accelerometer data is left justified.

Parameters
*accel_dataPointer to accelerometer data to read into.
Returns
none

Definition at line 140 of file FXOS8700CQ.c.

void FXOS8700CQ_PollMagnetometer ( rawdata_t mag_data)

Return the raw magnetometer data.

Parameters
mag_dataPointer to structure containing the 16 bit magnetometer data
Returns
none

Definition at line 215 of file FXOS8700CQ.c.

char FXOS8700CQ_ReadStatusReg ( void  )

Return the value of the status register.

Returns
STATUS register value

Definition at line 60 of file FXOS8700CQ.c.

void FXOS8700CQ_SetAccelerometerDynamicRange ( range_t  range)

Returns current mode of the chip.

Parameters
rangeDynamic range settings of the accelerometer.
Returns
mode

Definition at line 174 of file FXOS8700CQ.c.

void FXOS8700CQ_SetODR ( char  DataRateValue)

Set output data rate.

Parameters
DataRateValue
Returns
none

Definition at line 294 of file FXOS8700CQ.c.

char FXOS8700CQ_StandbyMode ( void  )

Starts up the sensor in Active mode.

Returns
none

Definition at line 79 of file FXOS8700CQ.c.