144 accel_data->
x = (raw[0] << 8) | raw[1];
145 accel_data->
y = (raw[2] << 8) | raw[3];
146 accel_data->
z = (raw[4] << 8) | raw[5];
219 mag_data->
x = (raw[0] << 8) | raw[1];
220 mag_data->
y = (raw[2] << 8) | raw[3];
221 mag_data->
z = (raw[4] << 8) | raw[5];
245 magn_data->
x = (raw[0] << 8) | raw[1];
246 magn_data->
y = (raw[2] << 8) | raw[3];
247 magn_data->
z = (raw[4] << 8) | raw[5];
249 accel_data->
x = (raw[6] << 8) | raw[7];
250 accel_data->
y = (raw[8] << 8) | raw[9];
251 accel_data->
z = (raw[10] << 8) | raw[11];
284 unsigned char odr = 0;
331 CTRL_REG1_Data &= 0xFE;
337 CTRL_REG1_Data &= 0xC7;
338 CTRL_REG1_Data |= 0x20;
349 PL_BF_ZCOMP_Data &= 0x3F;
351 PL_BF_ZCOMP_Data |= 0x00;
352 PL_BF_ZCOMP_Data |= 0x40;
353 PL_BF_ZCOMP_Data |= 0x80;
354 PL_BF_ZCOMP_Data |= 0xC0;
358 PL_BF_ZCOMP_Data &= 0xF8;
359 PL_BF_ZCOMP_Data |= 0x00;
373 P_L_THS_Data &= 0x07;
376 P_L_THS_Data |= (0x07)<<3;
391 P_L_THS_Data &= 0xF8;
393 P_L_THS_Data |= 0x02;
408 CTRL_REG4_Data |= 0x10;
420 CTRL_REG5_Data &= 0xEF;
421 CTRL_REG5_Data |= 0x10;
435 CTRL_REG1_Data |= 0x01;
481 CTRL_REG1_Data |= 0x01;
504 CTRL_REG1_Data |= 0x01;
char FXOS8700CQ_GetTemperature(void)
Returns the silicon die chip temperature.
void FXOS8700CQ_FIFOMode(mode_t mode)
Returns current mode of the chip.
char FXOS8700CQ_GetChipMode(void)
Returns current mode of the chip.
void FXOS8700CQ_ConfigureOrientation(void)
Configure Orientation mode.
unsigned char buffer[256]
void FXOS8700CQ_ConfigureGenericTapMode(void)
Configure Single Tap mode.
void FXOS8700CQ_ReadByteArray(char reg, char *buffer, unsigned int length)
Read a number of contigous bytes from the chip.
void FXOS8700CQ_HighPassFilter(char status)
Enables or disables higpass filter on accelerometer data.
void FXOS8700CQ_HybridMode(void)
Configure the sensor in hybrid mode both the accelerometer and the magnetometer are active for data o...
char FXOS8700CQ_MagnetometerStatus(void)
Get magnetometer status.
Structure encapsulating triple axis raw data.
#define FXOS8700CQ_READ_LEN
void FXOS8700CQ_ConfigureSingleTapMode(void)
Configure Single Tap mode.
void FXOS8700CQ_ConfigureAccelerometer(void)
Configure the accelerometer for data output.
void I2C_WriteByteArray(char reg, char *data, unsigned int length)
Writes a buffer array to the registers.
void FXOS8700CQ_WriteByteArray(char reg, char *buffer, char length)
Writes an array of bytes to the sensor.
void FXOS8700CQ_PollAccelerometer(rawdata_t *accel_data)
Accelerometer data is left justified.
Register memory map header.
void FXOS8700CQ_SetODR(char DataRateValue)
Set output data rate.
void FXOS8700CQ_ConfigureDoubleTapMode(void)
DoubleTap_LowPowerMode_NoLPF_400HzODR.
void I2C_WriteByteRegister(unsigned char reg, unsigned char data)
Writes a byte value to a register address.
void FXOS8700CQ_ActiveMode(void)
Starts up the sensor in Active mode.
void FXOS8700CQ_FullScaleRange(range_t range)
Configures the full scale range of the Accelerometer.
#define HYB_DATA_RATE_50HZ
void FXOS8700CQ_ConfigureMagnetometer(void)
Configure the magnetometer for data output.
void FXOS8700CQ_PollMagnetometer(rawdata_t *mag_data)
Return the raw magnetometer data.
char FXOS8700CQ_ReadStatusReg(void)
Return the value of the status register.
void FXOS8700CQ_Initialize(void)
Initialize FXOS8700CQ, configure for an output rate of 200Hz with a +/- 2g scale. ...
#define M_HYB_AUTOINC_MASK
char FXOS8700CQ_ReadByte(char reg)
Starts up the sensor in Active mode.
void FXOS8700CQ_SetAccelerometerDynamicRange(range_t range)
Returns current mode of the chip.
char FXOS8700CQ_GetOrientation(void)
Returns current mode of the chip.
unsigned char I2C_ReadByteRegister(char reg)
Reads a byte from a register.
void FXOS8700CQ_WriteByte(char reg, char value)
Writes a value to a register.
void FXOS8700CQ_GetData(rawdata_t *accel_data, rawdata_t *magn_data)
Get raw data from both accelerometer and magnetometer.
char FXOS8700CQ_StandbyMode(void)
Starts up the sensor in Active mode.
void I2C_ReadByteArray(char reg, char *buffer, unsigned int length)
Initializes the I2C peripheral.
char FXOS8700CQ_ID(void)
Returns the chip ID.
#define HYB_ASLP_RATE_25HZ
char FXOS8700CQ_GetODR(void)
Get output data rate.