ISSDK  1.8
IoT Sensing Software Development Kit
drivers.h File Reference

Provides function prototypes for driver level interfaces. More...

#include "Driver_I2C.h"
#include "Driver_SPI.h"
Include dependency graph for drivers.h:
This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

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.

Function Documentation

◆ ARM_systick_delay_ms()

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().

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

◆ ARM_systick_elapsed_ticks()

int32_t ARM_systick_elapsed_ticks ( int32_t  start_ticks)

Definition at line 43 of file driver_systick.c.

References SYST_CVR, and SYST_RVR.

Referenced by ARM_systick_delay_ms(), and fFuseSensors().

Here is the caller graph for this function:

◆ ARM_systick_enable()

void ARM_systick_enable ( void  )

Definition at line 26 of file driver_systick.c.

References SYST_CSR, and SYST_RVR.

Referenced by initializeFusionEngine().

Here is the caller graph for this function:

◆ ARM_systick_start_ticks()

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().

Here is the caller graph for this function:

◆ FXAS21002_Idle()

int8_t FXAS21002_Idle ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ FXAS21002_Init()

int8_t FXAS21002_Init ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Referenced by main().

Here is the caller graph for this function:

◆ FXAS21002_Read()

int8_t FXAS21002_Read ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Referenced by main().

Here is the caller graph for this function:

◆ FXLS8471Q_Idle()

int8_t FXLS8471Q_Idle ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ FXLS8471Q_Init()

int8_t FXLS8471Q_Init ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ FXLS8471Q_Read()

int8_t FXLS8471Q_Read ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ FXLS8952_Idle()

int8_t FXLS8952_Idle ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ FXLS8952_Init()

int8_t FXLS8952_Init ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Referenced by main().

Here is the caller graph for this function:

◆ FXLS8952_Read()

int8_t FXLS8952_Read ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Referenced by main().

Here is the caller graph for this function:

◆ FXLS8962_Idle()

int8_t FXLS8962_Idle ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ FXLS8962_Init()

int8_t FXLS8962_Init ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Referenced by main().

Here is the caller graph for this function:

◆ FXLS8962_Read()

int8_t FXLS8962_Read ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Referenced by main().

Here is the caller graph for this function:

◆ FXLS8972_Idle()

int8_t FXLS8972_Idle ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ FXLS8972_Init()

int8_t FXLS8972_Init ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ FXLS8972_Read()

int8_t FXLS8972_Read ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ 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:

◆ MAG3110_Idle()

int8_t MAG3110_Idle ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ MAG3110_Init()

int8_t MAG3110_Init ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ MAG3110_Read()

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().

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

◆ MMA8451_Idle()

int8_t MMA8451_Idle ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ MMA8451_Init()

int8_t MMA8451_Init ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ MMA8451_Read()

int8_t MMA8451_Read ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ MMA8652_Idle()

int8_t MMA8652_Idle ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ MMA8652_Init()

int8_t MMA8652_Init ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Referenced by main().

Here is the caller graph for this function:

◆ MMA8652_Read()

int8_t MMA8652_Read ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Referenced by main().

Here is the caller graph for this function:

◆ MPL3115_Idle()

int8_t MPL3115_Idle ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

◆ MPL3115_Init()

int8_t MPL3115_Init ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Referenced by main().

Here is the caller graph for this function:

◆ MPL3115_Read()

int8_t MPL3115_Read ( struct PhysicalSensor sensor,
SensorFusionGlobals sfg 
)

Referenced by main().

Here is the caller graph for this function: