![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
Provides init() and read() functions for the FXLS8471Q 3-axis accel. More...
#include "board.h"
#include "sensor_fusion.h"
#include "sensor_drv.h"
#include "register_io_spi.h"
#include "sensor_io_spi.h"
#include "sensor_io_i2c.h"
#include "fxls8471q.h"
#include "fxls8471q_drv.h"
#include "drivers.h"
Go to the source code of this file.
Macros | |
#define | FXLS8471Q_COUNTSPERG 8192.0 |
#define | FXLS8471Q_ACCEL_FIFO_SIZE 32 |
Functions | |
int8_t | FXLS8471Q_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8471Q_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8471Q_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
Variables | |
const registerreadlist_t | FXLS8471Q_WHO_AM_I_READ [] |
const registerreadlist_t | FXLS8471Q_F_STATUS_READ [] |
registerreadlist_t | FXLS8471Q_DATA_READ [] |
const registerwritelist_t | FXLS8471Q_Initialization [] |
const registerwritelist_t | FXLS8471Q_IDLE [] |
Provides init() and read() functions for the FXLS8471Q 3-axis accel.
Supports both I2C and SPI Interfaces. Supply sensor address=0x00 when when installing sensor for SPI. Supply I2C address otherwise.
Definition in file driver_FXLS8471Q.c.
#define FXLS8471Q_ACCEL_FIFO_SIZE 32 |
Definition at line 26 of file driver_FXLS8471Q.c.
Referenced by FXLS8471Q_Read().
#define FXLS8471Q_COUNTSPERG 8192.0 |
Definition at line 25 of file driver_FXLS8471Q.c.
Referenced by FXLS8471Q_Init().
int8_t FXLS8471Q_Idle | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
Definition at line 213 of file driver_FXLS8471Q.c.
References PhysicalSensor::addr, PhysicalSensor::bus_driver, PhysicalSensor::deviceInfo, F_USING_ACCEL, int32_t(), PhysicalSensor::isInitialized, SENSOR_ERROR_INIT, Sensor_I2C_Write(), Sensor_SPI_Write(), PhysicalSensor::slaveParams, SPI_ADDR, and status.
int8_t FXLS8471Q_Init | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
Definition at line 114 of file driver_FXLS8471Q.c.
References PhysicalSensor::addr, PhysicalSensor::bus_driver, PhysicalSensor::deviceInfo, Driver_GPIO_KSDK, F_USING_ACCEL, FXLS8471_SPI_CS, FXLS8471Q_COUNTSPERG, FXLS8471Q_SPI_CMD_LEN, FXLS8471Q_SPI_ReadPreprocess(), FXLS8471Q_SPI_WritePreprocess(), FXLS8471Q_SS_ACTIVE_VALUE, FXLS8471Q_WHO_AM_I, FXLS8471Q_WHO_AM_I_WHOAMI_VALUE, GPIO_DIRECTION_OUT, int32_t(), PhysicalSensor::isInitialized, pGPIODriver, GENERIC_DRIVER_GPIO::pin_init, spiSlaveSpecificParams_t::pReadPreprocessFN, spiSlaveSpecificParams_t::pTargetSlavePinID, spiSlaveSpecificParams_t::pWritePreprocessFN, Register_I2C_Read(), Register_SPI_Read(), SENSOR_ERROR_INIT, SENSOR_ERROR_NONE, Sensor_I2C_Write(), Sensor_SPI_Write(), PhysicalSensor::slaveParams, SPI_ADDR, spiSlaveSpecificParams_t::spiCmdLen, spiSlaveSpecificParams_t::ssActiveValue, and status.
int8_t FXLS8471Q_Read | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
Definition at line 156 of file driver_FXLS8471Q.c.
References ACCEL_FIFO_SIZE, PhysicalSensor::addr, addToFifo(), PhysicalSensor::bus_driver, CHX, CHY, CHZ, conditionSample(), PhysicalSensor::deviceInfo, F_USING_ACCEL, FXLS8471Q_ACCEL_FIFO_SIZE, PhysicalSensor::isInitialized, registerreadlist_t::numBytes, SENSOR_ERROR_INIT, SENSOR_ERROR_NONE, SENSOR_ERROR_READ, Sensor_I2C_Read(), Sensor_SPI_Read(), PhysicalSensor::slaveParams, SPI_ADDR, and status.
registerreadlist_t FXLS8471Q_DATA_READ[] |
Definition at line 41 of file driver_FXLS8471Q.c.
const registerreadlist_t FXLS8471Q_F_STATUS_READ[] |
Definition at line 35 of file driver_FXLS8471Q.c.
const registerwritelist_t FXLS8471Q_IDLE[] |
Definition at line 205 of file driver_FXLS8471Q.c.
const registerwritelist_t FXLS8471Q_Initialization[] |
Definition at line 47 of file driver_FXLS8471Q.c.
const registerreadlist_t FXLS8471Q_WHO_AM_I_READ[] |
Definition at line 29 of file driver_FXLS8471Q.c.