| ISF 2.2 rev 5 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

Data Structures | Functions | Variables
fsl_mma8491q_i2c_3D_accel module documentation

## Data Structures
struct | mma8491q_DataBuffer_t
| MMA8491Q data buffer format. More...

## Functions
isf_dsa_status_t | fsl_mma8491q_i2c_3D_accel_Initialize (isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t | fsl_mma8491q_i2c_3D_accel_ValidateSettings (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
isf_dsa_status_t | fsl_mma8491q_i2c_3D_accel_Configure (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
isf_status_t | fsl_mma8491q_i2c_3D_accel_StartData (isf_SensorHandle_t *pSensorHandle)
isf_status_t | fsl_mma8491q_i2c_3D_accel_EndData (isf_SensorHandle_t *pSensorHandle)
isf_status_t | fsl_mma8491q_i2c_3D_accel_Calibrate (isf_SensorHandle_t *pSensorHandle, void *pCalData)
isf_dsa_status_t | fsl_mma8491q_i2c_3D_accel_Shutdown (isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t | fsl_mma8491q_i2c_3D_accel_Convert (volatile isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *nativeSample, void *convertedSample, int32 *numBytes)
void | fsl_mma8491q_i2c_3D_accel_PeriodicCallback (void *pSensorHandle)
void | fsl_mma8491q_read_data_OneShotCallback (void *pSensorHandle)

## Variables
isf_SensorTypes_t | mma8491q_SupportedSensorTypes []
| Supported sensor and data types for MMA8491q. More...
isf_SensorDataTypes_t | mma8491q_SupportedDataTypes []

## Detailed Description

## Function Documentation

isf_status_t fsl_mma8491q_i2c_3D_accel_Calibrate | ( | isf_SensorHandle_t * | pSensorHandle,
|  | void * | pCalData
| ) |  |

Definition at line 249 of file fsl_mma8491q_i2c_3D_accel.c.

References DSA_ERR_PARAM, and ISF_SUCCESS.

isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Configure | ( | isf_SensorHandle_t * | pSensorHandle,
|  | isf_dsa_SensorSettings_t * | pSensorSettings
| ) |  |

Definition at line 169 of file fsl_mma8491q_i2c_3D_accel.c.

References isf_SensorHandle_st::adapterStatus, BM_ERROR, bm_register_periodic_callback(), DeviceDescriptor_struct::cDescriptor, isf_SensorHandle_st::controlData, DeviceDescriptor_struct::deviceSemaphore, dm_channel_acquire_lock(), dm_channel_release_lock(), DSA_ERR_CONFIGURE, DSA_ERR_PARAM, DSA_STATE_CONFIGURED_STOPPED, DSA_STATE_INITIALIZED, fsl_mma8491q_i2c_3D_accel_PeriodicCallback(), fsl_mma8491q_read_data_OneShotCallback(), ISF_SUCCESS, mma8491q_mode, MMA8491Q_SHUTDOWN, isf_dsa_SensorSettings_st::nSamplePeriod, isf_SensorHandle_st::pDeviceDescriptor, isf_dsa_ControlData_st::sensorSettings, T_ON_8491Q_MICROSECONDS, and DeviceDescriptor_struct::token.

Here is the call graph for this function:

isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Convert | ( | volatile isf_SensorHandle_t * | pSensorHandle,
|  | isf_SensorDataTypes_t | convertToType,
|  | isf_dsa_result_types_t | resultType,
|  | void * | nativeSample,
|  | void * | convertedSample,
|  | int32 * | numBytes
| ) |  |

Definition at line 531 of file fsl_mma8491q_i2c_3D_accel.c.

References DSA_ERR_BAD_RESULT_TYPE, DSA_ERR_BAD_SENSOR_DATA_TYPE, DSA_RESULT_TYPE_ENG_FIXED, DSA_RESULT_TYPE_ENG_FLOAT, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, and TYPE_RAW_ACCELERATION_3D.

Referenced by fsl_mma8491q_read_data_OneShotCallback().

Here is the caller graph for this function:

isf_status_t fsl_mma8491q_i2c_3D_accel_EndData | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 307 of file fsl_mma8491q_i2c_3D_accel.c.

References isf_SensorHandle_st::adapterStatus, BM_ERROR, bm_stop(), DeviceDescriptor_struct::deviceSemaphore, DSA_ERR_END_DATA, DSA_ERR_PARAM, DSA_STATE_CONFIGURED_STARTED, DSA_STATE_CONFIGURED_STOPPED, en_pin, ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, and DeviceDescriptor_struct::token.

Here is the call graph for this function:

isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Initialize | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 64 of file fsl_mma8491q_i2c_3D_accel.c.

References mma8491q_DataBuffer_t::accel, isf_SensorHandle_st::adapterStatus, DeviceDescriptor_struct::cDescriptor, SensorConfig_st::channelId, COMM_STATE_OK, SensorConfig_st::commInfo, DeviceDescriptor_struct::deviceHandle, DeviceDescriptor_struct::deviceSemaphore, dm_channel_get_state(), dm_channel_init(), dm_channel_start(), dm_device_open(), DSA_ERR_INITIALIZE, DSA_ERR_PARAM, DSA_STATE_INITIALIZED, DSA_STATE_NOT_INITIALIZED, en_pin, ISF_SUCCESS, mma8491q_CheckId(), DeviceDescriptor_struct::pCurrentSample, isf_SensorHandle_st::pDeviceDescriptor, isf_SensorHandle_st::pSensorStaticConfig, DeviceDescriptor_struct::skipFramecnt, mma8491q_DataBuffer_t::timestamp, mma8491q_DataBuffer_t::xOut, mma8491q_DataBuffer_t::yOut, and mma8491q_DataBuffer_t::zOut.

Here is the call graph for this function:

void fsl_mma8491q_i2c_3D_accel_PeriodicCallback | ( | void * | pSensorHandle | ) |

Definition at line 396 of file fsl_mma8491q_i2c_3D_accel.c.

References isf_SensorHandle_st::adapterStatus, bm_start(), DeviceDescriptor_struct::deviceSemaphore, DSA_STATE_CONFIGURED_STARTED, en_pin, FALSE, MMA8491Q_ACTIVE, mma8491q_mode, MMA8491Q_SHUTDOWN, and isf_SensorHandle_st::pDeviceDescriptor.

Referenced by fsl_mma8491q_i2c_3D_accel_Configure().

Here is the call graph for this function:

Here is the caller graph for this function:

isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Shutdown | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 360 of file fsl_mma8491q_i2c_3D_accel.c.

References isf_SensorHandle_st::adapterStatus, BM_ERROR, bm_unregister_callback(), DSA_ERR_END_DATA, DSA_ERR_PARAM, DSA_ERR_SHUTDOWN, DSA_STATE_INITIALIZED, ISF_SUCCESS, mma8491q_mode, MMA8491Q_SHUTDOWN, isf_SensorHandle_st::pDeviceDescriptor, and DeviceDescriptor_struct::token.

Here is the call graph for this function:

isf_status_t fsl_mma8491q_i2c_3D_accel_StartData | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 260 of file fsl_mma8491q_i2c_3D_accel.c.

References isf_SensorHandle_st::adapterStatus, BM_ERROR, bm_start(), DeviceDescriptor_struct::deviceSemaphore, DSA_ERR_PARAM, DSA_ERR_START_DATA, DSA_STATE_CONFIGURED_STARTED, DSA_STATE_CONFIGURED_STOPPED, FALSE, ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, and DeviceDescriptor_struct::token.

Here is the call graph for this function:

isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_ValidateSettings | ( | isf_SensorHandle_t * | pSensorHandle,
|  | isf_dsa_SensorSettings_t * | pSensorSettings
| ) |  |

Definition at line 158 of file fsl_mma8491q_i2c_3D_accel.c.

References DSA_ERR_PARAM, and ISF_SUCCESS.

void fsl_mma8491q_read_data_OneShotCallback | ( | void * | pSensorHandle | ) |

Definition at line 432 of file fsl_mma8491q_i2c_3D_accel.c.

References mma8491q_DataBuffer_t::accel, isf_SensorHandle_st::adapterStatus, bm_stop(), isf_SensorHandle_st::controlData, DeviceDescriptor_struct::deviceSemaphore, DSA_STATE_CONFIGURED_STARTED, en_pin, fsl_mma8491q_i2c_3D_accel_Convert(), isf_fifo_el_get_insert_pointer(), isf_fifo_el_increment(), ISF_FIFO_FULL, isf_fifo_lock(), isf_fifo_unlock(), isf_time_util_get_usec(), MMA8491Q_ACTIVE, MMA8491Q_DATA_SUCCESS, mma8491q_getAccelData(), mma8491q_mode, MMA8491Q_SHUTDOWN, isf_dsa_ControlData_st::nEventFieldIndex, DeviceDescriptor_struct::pCurrentSample, isf_SensorHandle_st::pDeviceDescriptor, isf_dsa_ControlData_st::pEventGroup, isf_dsa_SensorSettings_st::pSampleBufferInfo, isf_dsa_SensorSettings_st::resultFormat, isf_dsa_SensorSettings_st::resultType, isf_dsa_ControlData_st::sensorSettings, DeviceDescriptor_struct::skipFramecnt, mma8491q_DataBuffer_t::timestamp, TYPE_NATIVE_SENSOR_DATA_TYPE, x_out_pin, mma8491q_DataBuffer_t::xOut, y_out_pin, mma8491q_DataBuffer_t::yOut, z_out_pin, and mma8491q_DataBuffer_t::zOut.

Referenced by fsl_mma8491q_i2c_3D_accel_Configure().

Here is the call graph for this function:

Here is the caller graph for this function:

## Variable Documentation

isf_SensorDataTypes_t mma8491q_SupportedDataTypes[]

Definition at line 61 of file fsl_mma8491q_i2c_3D_accel.c.

isf_SensorTypes_t mma8491q_SupportedSensorTypes[]

Supported sensor and data types for MMA8491q.

Definition at line 60 of file fsl_mma8491q_i2c_3D_accel.c.

- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.