ISF  2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
fsl_mma955x_i2cspi_pedo.c File Reference
#include <isf.h>
#include <isf_types.h>
#include <isf_sm_api.h>
#include <isf_dsa_adapter.h>
#include <isf_bm.h>
#include <isf_sensor_types.h>
#include <isf_fifo.h>
#include <isf_pedometer_types.h>
#include <isf_comm.h>
#include <isf_util.h>
#include <isf_sensors.h>
#include "mma955x.h"
#include "fsl_mma955x_i2cspi_pedo.h"
#include "Ac_Fixed_utils.h"
Include dependency graph for fsl_mma955x_i2cspi_pedo.c:

Go to the source code of this file.

Functions

void mma955xSetSamplingRate (uint32 index)
 
void mma955x_ValidateConfig (int32_t *status, isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSubSettings)
 This function validates the configuration for the MAG3110 sensor. More...
 
int32 mma955x_GetData (int32_t *status, isf_SensorHandle_t *pSensorHandle, void *pBuffer)
 This function retrieves the raw data from the MAG3110 sensor. More...
 
int32 mma955x_GetPedometerData (isf_SensorHandle_t *pSensorHandle, mma955x_PedometerData_t *pData)
 
int32 mma955x_GetConfig (isf_SensorHandle_t *pSensorHandle, mma955x_appConfigRegister_t *pConfig)
 
int32 mma955x_read (dm_DeviceDescriptor_t *pDeviceHandle, int32 offset, int32 numBytes, uint8 *pBuffer)
 
int32 mma955x_send (dm_DeviceDescriptor_t *pDeviceHandle, const mma955x_CommandList_t *aCommandList)
 
uint8 mma955x_waitForCoCo (dm_DeviceDescriptor_t *pDeviceHandle)
 
isf_dsa_status_t fsl_mma955x_Initialize (isf_SensorHandle_t *pSensorHandle)
 
isf_dsa_status_t fsl_mma955x_ValidateSettings (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSubSettings)
 
isf_dsa_status_t fsl_mma955x_Configure (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
 
isf_dsa_status_t fsl_mma955x_StartData (isf_SensorHandle_t *pSensorHandle)
 
isf_dsa_status_t fsl_mma955x_EndData (isf_SensorHandle_t *pSensorHandle)
 
isf_dsa_status_t fsl_mma955x_Calibrate (isf_SensorHandle_t *pSensorHandle, void *pCalData)
 
isf_dsa_status_t fsl_mma955x_Shutdown (isf_SensorHandle_t *pSensorHandle)
 
void fsl_mma955x_PeriodicCallback (void *pSensorHandle)
 
isf_dsa_status_t fsl_mma955x_Convert (volatile isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *pNativeSample, void *pConvertedSample, int32 *numBytes)
 This function converts the raw sample data to the desired output type. More...
 
int32 mma955x_WriteConfig (isf_SensorHandle_t *pSensorHandle, mma955x_appConfigRegister_t *pConfig)
 

Variables

isf_SensorTypes_t mma955x_SupportedSensorTypes [] = { TYPE_ACCELEROMETER_3D, TYPE_NATIVE_SENSOR_TYPE }
 Supported sensor and data types. More...
 
isf_SensorDataTypes_t mma955x_SupportedDataTypes [] = { TYPE_RAW_ACCELERATION_3D, TYPE_NATIVE_SENSOR_DATA_TYPE }
 

Function Documentation

int32 mma955x_GetData ( int32_t *  status,
isf_SensorHandle_t pSensorHandle,
void *  pBuffer 
)

This function retrieves the raw data from the MAG3110 sensor.

Definition at line 618 of file fsl_mma955x_i2cspi_pedo.c.

References mma955x_DeviceDescriptor_t::deviceHandle, mma955x_read(), isf_SensorHandle_st::pDeviceDescriptor, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, and SENSOR_ERROR_GETDATA.

Referenced by fsl_mma955x_PeriodicCallback().

Here is the call graph for this function:

Here is the caller graph for this function:

int32 mma955x_read ( dm_DeviceDescriptor_t pDeviceHandle,
int32  offset,
int32  numBytes,
uint8 pBuffer 
)

Definition at line 747 of file fsl_mma955x_i2cspi_pedo.c.

References dm_channel_acquire_lock(), dm_channel_release_lock(), dm_device_read(), ISF_SUCCESS, and dm_DeviceDescriptor_struct::pChannelDescriptor.

Referenced by mma955x_GetConfig(), mma955x_GetData(), and mma955x_GetPedometerData().

Here is the call graph for this function:

Here is the caller graph for this function:

void mma955x_ValidateConfig ( int32_t *  status,
isf_SensorHandle_t pSensorHandle,
isf_dsa_SensorSettings_t pSubSettings 
)

This function validates the configuration for the MAG3110 sensor.

Definition at line 599 of file fsl_mma955x_i2cspi_pedo.c.

References mma955x_DeviceDescriptor_t::deviceHandle, ISF_SUCCESS, mma955x_send(), isf_SensorHandle_st::pDeviceDescriptor, SensorConfig_st::pSensorSpecificSettings, and isf_SensorHandle_st::pSensorStaticConfig.

Referenced by fsl_mma955x_ValidateSettings().

Here is the call graph for this function:

Here is the caller graph for this function:

uint8 mma955x_waitForCoCo ( dm_DeviceDescriptor_t pDeviceHandle)

Definition at line 792 of file fsl_mma955x_i2cspi_pedo.c.

References dm_device_read(), and ISF_SUCCESS.

Referenced by mma955x_send().

Here is the call graph for this function:

Here is the caller graph for this function: