| ISF 2.1 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Functions | Variables
fsl_mag3110_i2c_3D_mag module documentation

## Data Structures
struct | mag3110_DataBuffer_t
| This structure defines the dummy DSA data buffer format. More...

## Functions
isf_dsa_status_t | fsl_mag3110_i2c_3D_mag_Initialize (isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t | fsl_mag3110_i2c_3D_mag_ValidateSettings (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSubSettings)
isf_dsa_status_t | fsl_mag3110_i2c_3D_mag_Configure (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
isf_dsa_status_t | fsl_mag3110_i2c_3D_mag_StartData (isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t | fsl_mag3110_i2c_3D_mag_EndData (isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t | fsl_mag3110_i2c_3D_mag_Calibrate (isf_SensorHandle_t *pSensorHandle, void *pCalData)
isf_dsa_status_t | fsl_mag3110_i2c_3D_mag_Shutdown (isf_SensorHandle_t *pSensorHandle)
void | fsl_mag3110_i2c_3D_mag_PeriodicCallback (void *pSensorHandle)
isf_dsa_status_t | fsl_mag3110_i2c_3D_mag_Convert (volatile isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *pNativeSample, void *pConvertedSample, int32 *numBytes)
| This function coverts the raw sample data to the desired output type. More...

## Variables
isf_SensorTypes_t | mag3110_SupportedSensorTypes []
| Supported sensor and data types for MMA8652. More...
isf_SensorDataTypes_t | mag3110_SupportedDataTypes []

## Detailed Description

## Function Documentation

isf_dsa_status_t fsl_mag3110_i2c_3D_mag_Calibrate | ( | isf_SensorHandle_t * | pSensorHandle,
|  | void * | pCalData
| ) |  |

Definition at line 408 of file fsl_mag3110_i2c_3D_mag.c.

References ISF_SUCCESS.

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

Definition at line 188 of file fsl_mag3110_i2c_3D_mag.c.

References isf_SensorHandle_st::adapterStatus, BM_ERROR, bm_register_periodic_callback(), DeviceDescriptor_struct::cDescriptor, isf_SensorHandle_st::controlData, DeviceDescriptor_struct::deviceHandle, DeviceDescriptor_struct::deviceSemaphore, dm_channel_acquire_lock(), dm_channel_release_lock(), dm_device_read(), DSA_ERR_CONFIGURE, DSA_ERR_PARAM, DSA_STATE_CONFIGURED_STOPPED, DSA_STATE_INITIALIZED, fsl_mag3110_i2c_3D_mag_PeriodicCallback(), ISF_SUCCESS, mag3110_SetConfig(), mag3110_SetMode(), isf_dsa_SensorSettings_st::nSamplePeriod, isf_SensorHandle_st::pDeviceDescriptor, SENSOR_STANDBY, isf_dsa_ControlData_st::sensorSettings, and DeviceDescriptor_struct::token.

Here is the call graph for this function:

isf_dsa_status_t fsl_mag3110_i2c_3D_mag_Convert | ( | volatile isf_SensorHandle_t * | pSensorHandle,
|  | isf_SensorDataTypes_t | convertToType,
|  | isf_dsa_result_types_t | resultType,
|  | void * | pNativeSample,
|  | void * | pConvertedSample,
|  | int32 * | numBytes
| ) |  |

This function coverts the raw sample data to the desired output type.

Definition at line 563 of file fsl_mag3110_i2c_3D_mag.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_MAGNETIC_FIELD_STRENGTH_3D.

Referenced by fsl_mag3110_i2c_3D_mag_PeriodicCallback().

Here is the caller graph for this function:

isf_dsa_status_t fsl_mag3110_i2c_3D_mag_EndData | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 344 of file fsl_mag3110_i2c_3D_mag.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, ISF_SUCCESS, mag3110_SetMode(), isf_SensorHandle_st::pDeviceDescriptor, SENSOR_STANDBY, and DeviceDescriptor_struct::token.

Here is the call graph for this function:

isf_dsa_status_t fsl_mag3110_i2c_3D_mag_Initialize | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 64 of file fsl_mag3110_i2c_3D_mag.c.

References isf_SensorHandle_st::adapterStatus, mag3110_DataBuffer_t::addr, 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, ISF_SUCCESS, mag3110_DataBuffer_t::mag, mag3110_CheckId(), DeviceDescriptor_struct::pCurrentSample, isf_SensorHandle_st::pDeviceDescriptor, isf_SensorHandle_st::pSensorStaticConfig, DeviceDescriptor_struct::skipFramecnt, and mag3110_DataBuffer_t::timeStamp.

Here is the call graph for this function:

void fsl_mag3110_i2c_3D_mag_PeriodicCallback | ( | void * | pSensorHandle | ) |

Definition at line 456 of file fsl_mag3110_i2c_3D_mag.c.

References isf_SensorHandle_st::adapterStatus, isf_SensorHandle_st::controlData, DeviceDescriptor_struct::deviceHandle, DeviceDescriptor_struct::deviceSemaphore, dm_device_read(), DSA_STATE_CONFIGURED_STARTED, fsl_mag3110_i2c_3D_mag_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(), mag3110_DataBuffer_t::mag, mag3110_GetData(), 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, mag3110_DataBuffer_t::timeStamp, and TYPE_NATIVE_SENSOR_DATA_TYPE.

Referenced by fsl_mag3110_i2c_3D_mag_Configure().

Here is the call graph for this function:

Here is the caller graph for this function:

isf_dsa_status_t fsl_mag3110_i2c_3D_mag_Shutdown | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 428 of file fsl_mag3110_i2c_3D_mag.c.

References isf_SensorHandle_st::adapterStatus, bm_unregister_callback(), DSA_ERR_PARAM, DSA_STATE_INITIALIZED, ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, and DeviceDescriptor_struct::token.

Here is the call graph for this function:

isf_dsa_status_t fsl_mag3110_i2c_3D_mag_StartData | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 283 of file fsl_mag3110_i2c_3D_mag.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, mag3110_SetMode(), isf_SensorHandle_st::pDeviceDescriptor, SENSOR_ACTIVE, and DeviceDescriptor_struct::token.

Here is the call graph for this function:

isf_dsa_status_t fsl_mag3110_i2c_3D_mag_ValidateSettings | ( | isf_SensorHandle_t * | pSensorHandle,
|  | isf_dsa_SensorSettings_t * | pSubSettings
| ) |  |

Definition at line 155 of file fsl_mag3110_i2c_3D_mag.c.

References DSA_ERR_PARAM, and mag3110_ValidateConfig().

Here is the call graph for this function:

## Variable Documentation

isf_SensorDataTypes_t mag3110_SupportedDataTypes[]

Definition at line 49 of file fsl_mag3110_i2c_3D_mag.c.

isf_SensorTypes_t mag3110_SupportedSensorTypes[]

Supported sensor and data types for MMA8652.

Definition at line 48 of file fsl_mag3110_i2c_3D_mag.c.

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