Sensor Fusion Library 0.6.1
Orientation sensing for Espressif (ESP32, ESP8266) processors
Loading...
Searching...
No Matches
Classes | Macros | Functions
driver_fxos8700.h File Reference

Describes the fxos8700 driver interface and structures. More...

#include <stdint.h>
#include "driver_sensors_types.h"
Include dependency graph for driver_fxos8700.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fxos8700_i2c_sensorhandle_t
 This defines the sensor specific information for I2C. More...
 
struct  fxos8700_accelmagdata_t
 This structure defines the fxos8700 raw data buffer. More...
 
struct  fxos8700_acceldata_t
 This structure defines the fxos8700 raw accel data buffer. More...
 

Macros

#define FXOS8700_SPI_MAX_MSG_SIZE   (64)
 The MAX size of SPI message.
 
#define FXOS8700_SPI_CMD_LEN   (2)
 The size of the Sensor specific SPI Header.
 
#define FXOS8700_SS_ACTIVE_VALUE   SPI_SS_ACTIVE_LOW
 Is the Slave Select Pin Active Low or High.
 

Functions

int32_t FXOS8700_I2C_Initialize (fxos8700_i2c_sensorhandle_t *pSensorHandle, uint8_t index, uint16_t sAddress, uint8_t whoAmi)
 The interface function to initialize the sensor.
 
void FXOS8700_I2C_SetIdleTask (fxos8700_i2c_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)
 : The interface function to set the I2C Idle Task.
 
int32_t FXOS8700_I2C_Configure (fxos8700_i2c_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList)
 The interface function to configure the sensor.
 
int32_t FXOS8700_I2C_ReadData (fxos8700_i2c_sensorhandle_t *pSensorHandle, const registerReadlist_t *pReadList, uint8_t *pBuffer)
 The interface function to read the sensor data.
 
int32_t FXOS8700_I2C_Deinit (fxos8700_i2c_sensorhandle_t *pSensorHandle)
 The interface function to De Initialize sensor..
 

Detailed Description

Describes the fxos8700 driver interface and structures.

Definition in file driver_fxos8700.h.

Macro Definition Documentation

◆ FXOS8700_SPI_CMD_LEN

#define FXOS8700_SPI_CMD_LEN   (2)

The size of the Sensor specific SPI Header.

Definition at line 61 of file driver_fxos8700.h.

◆ FXOS8700_SPI_MAX_MSG_SIZE

#define FXOS8700_SPI_MAX_MSG_SIZE   (64)

The MAX size of SPI message.

Definition at line 57 of file driver_fxos8700.h.

◆ FXOS8700_SS_ACTIVE_VALUE

#define FXOS8700_SS_ACTIVE_VALUE   SPI_SS_ACTIVE_LOW

Is the Slave Select Pin Active Low or High.

Definition at line 65 of file driver_fxos8700.h.

Function Documentation

◆ FXOS8700_I2C_Configure()

int32_t FXOS8700_I2C_Configure ( fxos8700_i2c_sensorhandle_t pSensorHandle,
const registerwritelist_t pRegWriteList 
)

The interface function to configure the sensor.

This function configure the sensor with requested ODR, Range and registers in the regsiter pair array.

Parameters
[in]pSensorHandlehandle to the sensor.
[in]pRegWriteListpointer to the register list. @constraints This can be called any number of times only after FXOS8700_I2C_Initialize(). Application has to ensure that previous instances of these APIs have exited before invocation. @reeentrant No
Returns
FXOS8700_I2C_Configure() returns the status .

◆ FXOS8700_I2C_Deinit()

int32_t FXOS8700_I2C_Deinit ( fxos8700_i2c_sensorhandle_t pSensorHandle)

The interface function to De Initialize sensor..

This function made sensor in a power safe state and de initialize its handle.

Parameters
[in]pSensorHandlehandle to the sensor. @constraints This can be called only after FXOS8700_I2C_Initialize(). Application has to ensure that previous instances of these APIs have exited before invocation. @reeentrant No
Returns
FXOS8700_I2C_Deinit() returns the status .

◆ FXOS8700_I2C_Initialize()

int32_t FXOS8700_I2C_Initialize ( fxos8700_i2c_sensorhandle_t pSensorHandle,
uint8_t  index,
uint16_t  sAddress,
uint8_t  whoAmi 
)

The interface function to initialize the sensor.

This function initializes the sensor and sensor handle.

Parameters
[in]pSensorHandlehandle to the sensor.
[in]indexthe I2C device number.
[in]sAddressslave address of the device on the bus.
[in]whoamiWHO_AM_I value of the device. @constraints This should be the first API to be called. Application has to ensure that previous instances of these APIs have exited before invocation. @reeentrant No
Returns
FXOS8700_I2C_Initialize() returns the status .

◆ FXOS8700_I2C_ReadData()

int32_t FXOS8700_I2C_ReadData ( fxos8700_i2c_sensorhandle_t pSensorHandle,
const registerReadlist_t pReadList,
uint8_t *  pBuffer 
)

The interface function to read the sensor data.

This function read the sensor data out from the device and returns raw data in a byte stream.

Parameters
[in]pSensorHandlehandle to the sensor.
[in]pReadListpointer to the list of device registers and values to read.
[out]pBufferbuffer which holds raw sensor data.This buffer may be back to back databuffer based command read in the list. @constraints This can be called any number of times only after FXOS8700_I2C_Initialize(). Application has to ensure that previous instances of these APIs have exited before invocation. @reeentrant No
Returns
FXOS8700_I2C_ReadData() returns the status .

◆ FXOS8700_I2C_SetIdleTask()

void FXOS8700_I2C_SetIdleTask ( fxos8700_i2c_sensorhandle_t pSensorHandle,
registeridlefunction_t  idleTask,
void *  userParam 
)

: The interface function to set the I2C Idle Task.

Parameters
[in]fxos8700_i2c_sensorhandle_t *pSensorHandle, handle to the sensor handle.
[in]registeridlefunction_t idleTask, function pointer to the function to execute on I2C Idle Time.
[in]void *userParam, the pointer to the user idle ftask parameters.
Returns
void. @constraints This can be called any number of times only after FXOS8700_I2C_Initialize(). Application has to ensure that previous instances of these APIs have exited before invocation. @reeentrant No