ISSDK  1.8
IoT Sensing Software Development Kit
Macros | Functions | Variables
driver_FXOS8700.c File Reference

Provides init() and read() functions for the FXOS8700 6-axis accel plus mag. More...

#include "board.h"
#include "sensor_fusion.h"
#include "sensor_io_i2c.h"
#include "fxos8700.h"
#include "fxos8700_drv.h"
#include "drivers.h"
#include "status.h"
Include dependency graph for driver_FXOS8700.c:

Go to the source code of this file.

Macros

#define FXOS8700_ACCEL_FIFO_SIZE   32
 FXOS8700 (accel), MMA8652, FXLS8952 all have 32 element FIFO. More...
 
#define FXOS8700_MAG_FIFO_SIZE   1
 FXOS8700 (mag), MAG3110 have no FIFO so equivalent to 1 element FIFO. More...
 
#define FXOS8700_COUNTSPERG   8192.0
 
#define FXOS8700_COUNTSPERUT   10
 

Functions

int8_t FXOS8700_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg)
 
int8_t FXOS8700_ReadMagData (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg)
 
int8_t FXOS8700_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg)
 
int8_t FXOS8700_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg)
 

Variables

const registerreadlist_t FXOS8700_WHO_AM_I_READ []
 
const registerreadlist_t FXOS8700_F_STATUS_READ []
 
registerreadlist_t FXOS8700_DATA_READ []
 
const registerwritelist_t FXOS8700_Initialization []
 
const registerwritelist_t FXOS8700_FULL_IDLE []
 

Detailed Description

Provides init() and read() functions for the FXOS8700 6-axis accel plus mag.

Definition in file driver_FXOS8700.c.

Macro Definition Documentation

◆ FXOS8700_ACCEL_FIFO_SIZE

#define FXOS8700_ACCEL_FIFO_SIZE   32

FXOS8700 (accel), MMA8652, FXLS8952 all have 32 element FIFO.

Definition at line 21 of file driver_FXOS8700.c.

Referenced by FXOS8700_Init().

◆ FXOS8700_COUNTSPERG

#define FXOS8700_COUNTSPERG   8192.0

Definition at line 123 of file driver_FXOS8700.c.

Referenced by FXOS8700_Init().

◆ FXOS8700_COUNTSPERUT

#define FXOS8700_COUNTSPERUT   10

Definition at line 124 of file driver_FXOS8700.c.

Referenced by FXOS8700_Init().

◆ FXOS8700_MAG_FIFO_SIZE

#define FXOS8700_MAG_FIFO_SIZE   1

FXOS8700 (mag), MAG3110 have no FIFO so equivalent to 1 element FIFO.

Definition at line 22 of file driver_FXOS8700.c.

Function Documentation

◆ FXOS8700_Idle()

int8_t FXOS8700_Idle ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ FXOS8700_Init()

int8_t FXOS8700_Init ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ FXOS8700_Read()

int8_t FXOS8700_Read ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Definition at line 249 of file driver_FXOS8700.c.

References FXOS8700_ReadMagData().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FXOS8700_ReadMagData()

int8_t FXOS8700_ReadMagData ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Variable Documentation

◆ FXOS8700_DATA_READ

registerreadlist_t FXOS8700_DATA_READ[]
Initial value:
=
{
{ .readFrom = FXOS8700_OUT_X_MSB, .numBytes = 6 }, __END_READ_DATA__
}
#define __END_READ_DATA__
Definition: sensor_drv.h:51

Definition at line 37 of file driver_FXOS8700.c.

◆ FXOS8700_F_STATUS_READ

const registerreadlist_t FXOS8700_F_STATUS_READ[]
Initial value:
=
{
{ .readFrom = FXOS8700_STATUS, .numBytes = 1 }, __END_READ_DATA__
}
#define __END_READ_DATA__
Definition: sensor_drv.h:51

Definition at line 31 of file driver_FXOS8700.c.

◆ FXOS8700_FULL_IDLE

const registerwritelist_t FXOS8700_FULL_IDLE[]
Initial value:
=
{
{ FXOS8700_CTRL_REG1, 0x00, 0x01 },
}
#define __END_WRITE_DATA__
Definition: sensor_drv.h:45

Definition at line 268 of file driver_FXOS8700.c.

◆ FXOS8700_Initialization

const registerwritelist_t FXOS8700_Initialization[]

Definition at line 43 of file driver_FXOS8700.c.

◆ FXOS8700_WHO_AM_I_READ

const registerreadlist_t FXOS8700_WHO_AM_I_READ[]
Initial value:
=
{
{ .readFrom = FXOS8700_WHO_AM_I, .numBytes = 1 }, __END_READ_DATA__
}
#define __END_READ_DATA__
Definition: sensor_drv.h:51

Definition at line 25 of file driver_FXOS8700.c.