Sensorian  1.0
C API Reference Guide Library
FXOS8700CQ.c File Reference

Accelerometer / Magnetometer driver. More...

#include <unistd.h>
#include "FXOS8700CQ.h"
#include "MemoryMap.h"
#include "i2c.h"

Go to the source code of this file.

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...
 
void FXOS8700CQ_WriteByte (char reg, char value)
 Writes a value to a register. More...
 
void FXOS8700CQ_WriteByteArray (char reg, char *buffer, char length)
 Writes an array of bytes to the sensor. More...
 
char FXOS8700CQ_ReadByte (char reg)
 Starts up the sensor in Active mode. More...
 
void FXOS8700CQ_ReadByteArray (char reg, char *buffer, unsigned int length)
 Read a number of contigous bytes from the chip. More...
 

Detailed Description

Accelerometer / Magnetometer driver.

Author
D.Qendri
Date
30 May 2015

Definition in file FXOS8700CQ.c.

Function Documentation

char FXOS8700CQ_ReadByte ( char  reg)

Starts up the sensor in Active mode.

Parameters
regRegister address to read from.
Returns
data Contents of register.

Definition at line 539 of file FXOS8700CQ.c.

void FXOS8700CQ_ReadByteArray ( char  reg,
char *  buffer,
unsigned int  length 
)

Read a number of contigous bytes from the chip.

Parameters
regInitial register address to read from.
*bufferPointer to buffer array to read into.
lengthLength of buffer array
Returns
none

Definition at line 551 of file FXOS8700CQ.c.

void FXOS8700CQ_WriteByte ( char  reg,
char  value 
)

Writes a value to a register.

Parameters
regRegister address to write into.
valueData to write to register.
Returns
none

Definition at line 517 of file FXOS8700CQ.c.

void FXOS8700CQ_WriteByteArray ( char  reg,
char *  buffer,
char  length 
)

Writes an array of bytes to the sensor.

Parameters
regInitial register address to write to.
*bufferPointer to buffer array to read from.
lengthLength of buffer array
Returns
none

Definition at line 529 of file FXOS8700CQ.c.