![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
Provides function prototypes for driver level interfaces. More...
#include "Driver_I2C.h"
#include "Driver_SPI.h"
Go to the source code of this file.
Functions | |
SysTick Macros | |
The ARM SysTick counter is used to time various fusion options. Timings are then conveyed to the NXP Sensor Fusion Toolbox, where they are displayed for the developer. These functions should be portable to any ARM M0+, M3, M4 or M4F device. If you are using a different CPU architecture, you will need to provide an equivalent set of macros, remove the macro calls from the fusion routines, or define a set of empty macros. | |
void | ARM_systick_enable (void) |
void | ARM_systick_start_ticks (int32_t *pstart) |
int32_t | ARM_systick_elapsed_ticks (int32_t start_ticks) |
void | ARM_systick_delay_ms (uint32_t iSystemCoreClock, uint32_t delay_ms) |
Sensor Drivers | |
Each physical sensor must be provided with one initialization function and one "read" function. These must be installed by the user using the installSensor method defined in SensorFusionGlobals. By "physical sensor", we mean either individual sensor type (such as a 3-axis accelerometer) or a combo-sensor such as the NXP FXOS8700 6-axis accel plus mag. The init() function for each sensor is responsible for initializing all sensors contained in that package. The read() function is responsible for reading those same sensors and moving the results into the standard structures contained within the SensorFusionGlobals object. | |
int8_t | MPL3115_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXOS8700_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXAS21002_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MMA8652_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8952_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MAG3110_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MMA8451_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8471Q_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8962_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8972_Init (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MPL3115_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXOS8700_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXAS21002_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MMA8652_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8952_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MAG3110_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MMA8451_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8471Q_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8962_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8972_Read (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MPL3115_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXOS8700_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXAS21002_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MMA8652_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8952_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MAG3110_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | MMA8451_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8471Q_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8962_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
int8_t | FXLS8972_Idle (struct PhysicalSensor *sensor, SensorFusionGlobals *sfg) |
Provides function prototypes for driver level interfaces.
Users who are not using NXP hardware will need to supply their own drivers in place of those defined here.
Definition in file drivers.h.
void ARM_systick_delay_ms | ( | uint32_t | iSystemCoreClock, |
uint32_t | delay_ms | ||
) |
Definition at line 54 of file driver_systick.c.
References ARM_systick_elapsed_ticks(), and ARM_systick_start_ticks().
Referenced by initializeFusionEngine().
Definition at line 43 of file driver_systick.c.
References SYST_CVR, and SYST_RVR.
Referenced by ARM_systick_delay_ms(), and fFuseSensors().
void ARM_systick_enable | ( | void | ) |
Definition at line 26 of file driver_systick.c.
References SYST_CSR, and SYST_RVR.
Referenced by initializeFusionEngine().
void ARM_systick_start_ticks | ( | int32_t * | pstart | ) |
Definition at line 34 of file driver_systick.c.
References SYST_CVR.
Referenced by ARM_systick_delay_ms(), and fFuseSensors().
int8_t FXAS21002_Idle | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXAS21002_Init | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXAS21002_Read | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
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.
int8_t FXLS8952_Idle | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXLS8952_Init | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXLS8952_Read | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXLS8962_Idle | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXLS8962_Init | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXLS8962_Read | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXLS8972_Idle | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXLS8972_Init | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXLS8972_Read | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t FXOS8700_Idle | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
Definition at line 280 of file driver_FXOS8700.c.
References PhysicalSensor::addr, PhysicalSensor::bus_driver, PhysicalSensor::deviceInfo, F_USING_ACCEL, F_USING_MAG, int32_t(), MagSensor::isEnabled, PhysicalSensor::isInitialized, SensorFusionGlobals::Mag, SENSOR_ERROR_INIT, Sensor_I2C_Write(), and status.
int8_t FXOS8700_Init | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
Definition at line 130 of file driver_FXOS8700.c.
References ACCEL_FIFO_SIZE, PhysicalSensor::addr, addToFifo(), PhysicalSensor::bus_driver, CHX, CHY, CHZ, conditionSample(), PhysicalSensor::deviceInfo, F_USING_ACCEL, F_USING_MAG, MagSensor::fCountsPeruT, MagSensor::fuTPerCount, FXOS8700_ACCEL_FIFO_SIZE, FXOS8700_COUNTSPERG, FXOS8700_COUNTSPERUT, FXOS8700_OUT_X_MSB, FXOS8700_WHO_AM_I, FXOS8700_WHO_AM_I_PROD_VALUE, MagSensor::iCountsPeruT, int32_t(), MagSensor::isEnabled, PhysicalSensor::isInitialized, MagSensor::iWhoAmI, SensorFusionGlobals::Mag, registerreadlist_t::numBytes, registerreadlist_t::readFrom, Register_I2C_Read(), SENSOR_ERROR_INIT, SENSOR_ERROR_NONE, SENSOR_ERROR_READ, Sensor_I2C_Read(), Sensor_I2C_Write(), sfg, and status.
Referenced by main().
int8_t FXOS8700_Read | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
Definition at line 249 of file driver_FXOS8700.c.
References FXOS8700_ReadMagData().
Referenced by main().
int8_t MAG3110_Idle | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
Definition at line 147 of file driver_MAG3110.c.
References PhysicalSensor::addr, PhysicalSensor::bus_driver, PhysicalSensor::deviceInfo, F_USING_MAG, int32_t(), MagSensor::isEnabled, PhysicalSensor::isInitialized, SensorFusionGlobals::Mag, SENSOR_ERROR_INIT, Sensor_I2C_Write(), and status.
int8_t MAG3110_Init | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
Definition at line 82 of file driver_MAG3110.c.
References PhysicalSensor::addr, PhysicalSensor::bus_driver, PhysicalSensor::deviceInfo, F_USING_MAG, MagSensor::fCountsPeruT, MagSensor::fuTPerCount, MagSensor::iCountsPeruT, int32_t(), MagSensor::isEnabled, PhysicalSensor::isInitialized, MagSensor::iWhoAmI, SensorFusionGlobals::Mag, MAG3110_COUNTSPERUT, MAG3110_WHO_AM_I, MAG3110_WHOAMI_VALUE, Register_I2C_Read(), SENSOR_ERROR_INIT, SENSOR_ERROR_NONE, Sensor_I2C_Write(), and status.
Referenced by main().
int8_t MAG3110_Read | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
Definition at line 113 of file driver_MAG3110.c.
References PhysicalSensor::addr, addToFifo(), PhysicalSensor::bus_driver, CHX, CHY, CHZ, conditionSample(), PhysicalSensor::deviceInfo, F_USING_MAG, PhysicalSensor::isInitialized, SensorFusionGlobals::Mag, MAG_FIFO_SIZE, SENSOR_ERROR_INIT, SENSOR_ERROR_NONE, Sensor_I2C_Read(), and status.
Referenced by main().
int8_t MMA8451_Idle | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t MMA8451_Init | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t MMA8451_Read | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t MMA8652_Idle | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t MMA8652_Init | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t MMA8652_Read | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t MPL3115_Idle | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t MPL3115_Init | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |
int8_t MPL3115_Read | ( | struct PhysicalSensor * | sensor, |
SensorFusionGlobals * | sfg | ||
) |