![]() |
ISF
2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
|
#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"
Go to the source code of this file.
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 } |
int32 mma955x_GetConfig | ( | isf_SensorHandle_t * | pSensorHandle, |
mma955x_appConfigRegister_t * | pConfig | ||
) |
Definition at line 672 of file fsl_mma955x_i2cspi_pedo.c.
References mma955x_appConfigRegister_t::activity_count_threshold, mma955x_readConfigResponseBuffer_t::configData, mma955x_DeviceDescriptor_t::deviceHandle, mma955x_read(), mma955x_send(), isf_SensorHandle_st::pDeviceDescriptor, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, SENSOR_ERROR_GETDATA, mma955x_appConfigRegister_t::sleep_count_threshold, mma955x_appConfigRegister_t::sleep_maximum, and mma955x_appConfigRegister_t::sleep_minimum.
Referenced by fsl_mma955x_Initialize().
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().
int32 mma955x_GetPedometerData | ( | isf_SensorHandle_t * | pSensorHandle, |
mma955x_PedometerData_t * | pData | ||
) |
Definition at line 637 of file fsl_mma955x_i2cspi_pedo.c.
References mma955x_PedometerData_t::calories, mma955x_DeviceDescriptor_t::deviceHandle, mma955x_PedometerData_t::distance, mma955x_read(), mma955x_send(), isf_SensorHandle_st::pDeviceDescriptor, mma955x_PedometerData_t::pedometer_status_register, readPedometerResponseBuffer_t::pedometerData, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, SENSOR_ERROR_GETDATA, mma955x_PedometerData_t::sleep_count, mma955x_PedometerData_t::speed, and mma955x_PedometerData_t::step_count.
Referenced by fsl_mma955x_PeriodicCallback().
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().
int32 mma955x_send | ( | dm_DeviceDescriptor_t * | pDeviceHandle, |
const mma955x_CommandList_t * | aCommandList | ||
) |
Definition at line 761 of file fsl_mma955x_i2cspi_pedo.c.
References mma955x_CommandList_t::commands, dm_channel_acquire_lock(), dm_channel_release_lock(), dm_device_write(), ISF_SUCCESS, mma955x_waitForCoCo(), mma955x_Command_t::nByteWrite, mma955x_CommandList_t::numCommands, mma955x_Command_t::offset, dm_DeviceDescriptor_struct::pChannelDescriptor, and mma955x_Command_t::pWriteBuffer.
Referenced by fsl_mma955x_Configure(), fsl_mma955x_EndData(), fsl_mma955x_Initialize(), fsl_mma955x_Shutdown(), fsl_mma955x_StartData(), mma955x_GetConfig(), mma955x_GetPedometerData(), and mma955x_ValidateConfig().
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().
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().
int32 mma955x_WriteConfig | ( | isf_SensorHandle_t * | pSensorHandle, |
mma955x_appConfigRegister_t * | pConfig | ||
) |
Definition at line 705 of file fsl_mma955x_i2cspi_pedo.c.
References mma955x_appConfigRegister_t::activity_count_threshold, mma955x_DeviceDescriptor_t::deviceHandle, dm_channel_acquire_lock(), dm_channel_release_lock(), dm_device_write(), ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, SENSOR_ERROR_GETDATA, mma955x_appConfigRegister_t::sleep_count_threshold, mma955x_appConfigRegister_t::sleep_maximum, and mma955x_appConfigRegister_t::sleep_minimum.