![]() |
ISF
2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
|
Data Structures | |
struct | fsl_orientation_DataBuffer_t |
struct | fsl_fusion_Sensor_Specific_Settings_t |
struct | fsl_fusion_DeviceDescriptor_t |
Functions | |
isf_dsa_status_t | fsl_fusion_virt_3D_orient_Initialize (isf_SensorHandle_t *pSensorHandle) |
This is the concrete implementation of the orientation sensor adapter initialization. More... | |
isf_dsa_status_t | fsl_fusion_virt_3D_orient_ValidateSettings (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSubSettings) |
This is the concrete implementation of the orientation sensor adapter for validating current settings. More... | |
isf_dsa_status_t | fsl_fusion_virt_3D_orient_Configure (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings) |
This is the concrete implementation of the fusion sensor adapter configuration function. More... | |
isf_dsa_status_t | fsl_fusion_virt_3D_orient_StartData (isf_SensorHandle_t *pSensorHandle) |
This is the concrete implementation of the orientation sensor adapter for start Data. More... | |
isf_dsa_status_t | fsl_fusion_virt_3D_orient_EndData (isf_SensorHandle_t *pSensorHandle) |
This is the concrete implementation of the orientation sensor adapter for End Data. More... | |
isf_dsa_status_t | fsl_fusion_virt_3D_orient_Calibrate (isf_SensorHandle_t *pSensorHandle, void *pCalData) |
This is the concrete implementation of the orientation sensor adapter for calibration . More... | |
isf_dsa_status_t | fsl_fusion_virt_3D_orient_Shutdown (isf_SensorHandle_t *pSensorHandle) |
This is the concrete implementation of the orientation sensor adapter for shutdown . More... | |
void | fsl_fusion_virt_3D_orient_PeriodicCallback (void *pSensorHandle) |
The orientation sensor adapter's periodic processing function. More... | |
isf_dsa_status_t | fsl_fusion_virt_3D_orient_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... | |
void | fsl_MagCal_task (uint32_t task_init_data) |
void | fsl_fusion_task (uint32_t task_init_data) |
Variables | |
isf_SensorTypes_t | fsl_fusion_SupportedSensorTypes [] |
Supported sensor and data types for MMA8652. More... | |
isf_SensorDataTypes_t | fsl_fusion_SupportedDataTypes [] |
void fsl_fusion_task | ( | uint32_t | task_init_data | ) |
Definition at line 1144 of file fsl_fusion_virt_3D_orient.c.
References FALSE, fsl_fusion_virt_3D_orient_PeriodicCallback(), Fusion_Init(), fsl_fusion_DeviceDescriptor_t::fusionState, HYBRID_SENSOR_DATA_READY_EVENT, isf_SensorHandle_st::pDeviceDescriptor, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, SENSOR_DATA_READY_EVENT, fsl_fusion_DeviceDescriptor_t::sensorLWEvent, and isf_SensorHandle_st::signalledEvents.
Referenced by fsl_fusion_virt_3D_orient_Initialize().
isf_dsa_status_t fsl_fusion_virt_3D_orient_Calibrate | ( | isf_SensorHandle_t * | pSensorHandle, |
void * | pCalData | ||
) |
This is the concrete implementation of the orientation sensor adapter for calibration .
The FXAS21000 does not provide the capability to be dynamically calibrated. Therefore, this function simply returns success.
[in] | pSensorHdl | This is a void pointer to the instance of the orientation sensor adapter. |
ISF_SUCCESS | is returned when the device is calibrated properly. Note: Currently, there is no return error type defined for this API. |
Definition at line 742 of file fsl_fusion_virt_3D_orient.c.
References ISF_SUCCESS.
isf_dsa_status_t fsl_fusion_virt_3D_orient_Configure | ( | isf_SensorHandle_t * | pSensorHandle, |
isf_dsa_SensorSettings_t * | pSensorSettings | ||
) |
This is the concrete implementation of the fusion sensor adapter configuration function.
This function resets the fusion state and calls the underlying AGM adapter's Configure functions.
[in] | pSensorHdl | This is a void pointer to the instance of the fusion sensor adapter. |
[in] | pConfig | The reference to the sensor configuration settings. |
ISF_SUCCESS | is returned when the device is configured successfully. |
DSA_ERR_CONFIGURE | is returned when the provided configuration settings could not be applied. |
Definition at line 394 of file fsl_fusion_virt_3D_orient.c.
References fusion_algorithmConfig_t::accelOversampleRatio, isf_SensorHandle_st::adapterStatus, fsl_fusion_Sensor_Specific_Settings_t::algorithmConfig, configure_sensor(), fsl_fusion_DeviceDescriptor_t::deviceSemaphore, DSA_ERR_PARAM, DSA_RESULT_TYPE_RAW_COUNTS, DSA_STATE_CONFIGURED_STOPPED, DSA_STATE_INITIALIZED, fusion_algorithmConfig_t::gyroOversampleRatio, ISF_SUCCESS, fusion_algorithmConfig_t::magOversampleRatio, isf_SubscriptionSettings_t::nFifoDepth, isf_SubscriptionSettings_t::nSamplePeriod, isf_dsa_SensorSettings_st::nSamplePeriod, isf_SubscriptionSettings_t::nSettingsToUse, isf_SensorHandle_st::pDeviceDescriptor, fusion_algorithmConfig_t::pressureOversampleRatio, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, isf_SubscriptionSettings_t::resultFormat, isf_SubscriptionSettings_t::resultType, TYPE_MAGNETIC_FIELD_STRENGTH_3D, TYPE_NATIVE_SENSOR_DATA_TYPE, TYPE_RAW_ACCELERATION_3D, and TYPE_ROTATIONAL_RATE_3D.
isf_dsa_status_t fsl_fusion_virt_3D_orient_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 1257 of file fsl_fusion_virt_3D_orient.c.
References DSA_ERR_BAD_RESULT_TYPE, DSA_ERR_BAD_SENSOR_DATA_TYPE, DSA_RESULT_TYPE_ENG_FLOAT, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, TYPE_ALTITUDE, TYPE_DIR_COSINE_MATRIX, TYPE_EULER_3D, TYPE_MAGNETIC_FIELD_STRENGTH_3D, TYPE_QUATERNION, TYPE_RAW_ACCELERATION_3D, TYPE_ROTATIONAL_RATE_3D, and TYPE_TEMPERATURE.
Referenced by fsl_fusion_virt_3D_orient_PeriodicCallback().
isf_dsa_status_t fsl_fusion_virt_3D_orient_EndData | ( | isf_SensorHandle_t * | pSensorHandle | ) |
This is the concrete implementation of the orientation sensor adapter for End Data.
This function tells the Bus Manager to stop the callbacks and disable data collection.
[in] | pSensorHdl | This is a void pointer to the instance of the orientation sensor adapter. |
ISF_SUCCESS | is returned when the data collection stopped successfully. |
DSA_ERR_PARAM | is returned when a wrong parameter is passed into the function such as an invalid or NULL parameter. |
Definition at line 649 of file fsl_fusion_virt_3D_orient.c.
References isf_SensorHandle_st::adapterStatus, fsl_fusion_DeviceDescriptor_t::deviceSemaphore, DSA_ERR_END_DATA, DSA_ERR_PARAM, DSA_STATE_CONFIGURED_STOPPED, ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, and stop_sensor().
isf_dsa_status_t fsl_fusion_virt_3D_orient_Initialize | ( | isf_SensorHandle_t * | pSensorHandle | ) |
This is the concrete implementation of the orientation sensor adapter initialization.
This function allocates memory for the device descriptor.
[in] | pSensorHandle | This is a void pointer to the instance of the orientation sensor adapter. |
ISF_SUCCESS | is returned when the device is initialized properly. |
DSA_ERR_PARAM | is returned when a wrong parameter was passed into the function, i.e. an invalid or NULL parameter. |
DSA_ERR_INITIALIZE | is returned when the driver could not be initialized successfully. |
Definition at line 154 of file fsl_fusion_virt_3D_orient.c.
References ACCEL_DATA_READY_EVENT, fusion_algorithmConfig_t::accelOversampleRatio, isf_SensorHandle_st::adapterStatus, fsl_fusion_Sensor_Specific_Settings_t::algorithmConfig, fusion_state_t::algorithmToUse, fsl_fusion_Sensor_Specific_Settings_t::algorithmToUse, fsl_fusion_DeviceDescriptor_t::deviceSemaphore, DSA_ERR_INITIALIZE, DSA_ERR_PARAM, DSA_STATE_INITIALIZED, DSA_STATE_NOT_INITIALIZED, fsl_fusion_task(), fsl_MagCal_task(), fsl_fusion_DeviceDescriptor_t::fusionState, GYRO_DATA_READY_EVENT, fusion_algorithmConfig_t::gyroOversampleRatio, HYBRID_SENSOR_DATA_READY_EVENT, init_sensor(), isf_fifo_init(), MAG_DATA_READY_EVENT, fsl_fusion_DeviceDescriptor_t::MagCalEventStruct, fusion_algorithmConfig_t::magOversampleRatio, isf_SensorHandle_st::pDeviceDescriptor, PRESSURE_DATA_READY_EVENT, fusion_algorithmConfig_t::pressureOversampleRatio, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, SENSOR_DATA_READY_EVENT, fsl_fusion_DeviceDescriptor_t::sensorDataReady, and fsl_fusion_DeviceDescriptor_t::sensorLWEvent.
void fsl_fusion_virt_3D_orient_PeriodicCallback | ( | void * | pSensorHandle | ) |
The orientation sensor adapter's periodic processing function.
This function is invoked periodically whenever new sensor data is available from its underlying sensors.
[in] | pSensorHdl | This is a void pointer to the instance of the orientation sensor adapter. |
Definition at line 801 of file fsl_fusion_virt_3D_orient.c.
References isf_Acceleration3D_RawCount_t::accel, ACCEL_DATA_READY_EVENT, ACCEL_GET_HAL_X_VALUE, ACCEL_GET_HAL_Y_VALUE, ACCEL_GET_HAL_Z_VALUE, ACCEL_HAL_X_INDEX, ACCEL_HAL_Y_INDEX, ACCEL_HAL_Z_INDEX, isf_Meters1D_float_t::altitude, isf_AngularVelocity3D_RawCount_t::angularVelocity, isf_SensorHandle_st::controlData, convert_sensor_data(), DSA_RESULT_TYPE_ENG_FLOAT, isf_MagneticFieldStrength3D_RawCount_t::fieldStrength, fsl_fusion_virt_3D_orient_Convert(), Fusion_Init(), Fusion_Run(), fsl_fusion_DeviceDescriptor_t::fusionState, GYRO_DATA_READY_EVENT, GYRO_GET_HAL_X_VALUE, GYRO_GET_HAL_Y_VALUE, GYRO_GET_HAL_Z_VALUE, GYRO_HAL_X_INDEX, GYRO_HAL_Y_INDEX, GYRO_HAL_Z_INDEX, isf_fifo_el_clear(), isf_fifo_el_get_insert_pointer(), isf_fifo_el_increment(), isf_fifo_el_traverse(), ISF_FIFO_FULL, isf_fifo_lock(), ISF_FIFO_NO_MORE_ENTRIES, isf_fifo_unlock(), iUpdateMagnetometerBuffer(), MAG_DATA_READY_EVENT, MAG_GET_HAL_X_VALUE, MAG_GET_HAL_Y_VALUE, MAG_HAL_X_INDEX, MAG_HAL_Y_INDEX, MAG_HAL_Z_INDEX, MAGCAL_EVENT_FLAG, fsl_fusion_DeviceDescriptor_t::MagCalEventStruct, isf_dsa_ControlData_st::nEventFieldIndex, OVERSAMPLE_RATIO, isf_SensorHandle_st::pDeviceDescriptor, isf_dsa_ControlData_st::pEventGroup, PRESSURE_DATA_MASK, PRESSURE_DATA_READY_EVENT, isf_dsa_SensorSettings_st::pSampleBufferInfo, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, isf_dsa_SensorSettings_st::resultFormat, isf_dsa_SensorSettings_st::resultType, SENSOR_DATA_READY_EVENT, fsl_fusion_DeviceDescriptor_t::sensorDataReady, isf_dsa_ControlData_st::sensorSettings, isf_SensorHandle_st::signalledEvents, isf_DegreesCelsius1D_float_t::temperature, isf_Meters1D_float_t::timestamp, isf_AngularVelocity3D_RawCount_t::timestamp, isf_Acceleration3D_RawCount_t::timestamp, isf_MagneticFieldStrength3D_RawCount_t::timestamp, TYPE_ALTITUDE, TYPE_NATIVE_SENSOR_DATA_TYPE, TYPE_TEMPERATURE, X, Y, and Z.
Referenced by fsl_fusion_task().
isf_dsa_status_t fsl_fusion_virt_3D_orient_Shutdown | ( | isf_SensorHandle_t * | pSensorHandle | ) |
This is the concrete implementation of the orientation sensor adapter for shutdown .
[in] | pSensorHdl | This is a void pointer to the instance of the orientation sensor adapter. |
ISF_SUCCESS | is returned when the device is calibrated properly. Note: Currently, there is no return error type defined for this API. |
Definition at line 759 of file fsl_fusion_virt_3D_orient.c.
References isf_SensorHandle_st::adapterStatus, DSA_ERR_PARAM, DSA_STATE_INITIALIZED, ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, and shutdown_sensor().
isf_dsa_status_t fsl_fusion_virt_3D_orient_StartData | ( | isf_SensorHandle_t * | pSensorHandle | ) |
This is the concrete implementation of the orientation sensor adapter for start Data.
This function tells the Bus Manager to start the callbacks periodically as defined in the bus configuration and enable the data collection.
[in] | pSensorHdl | This is a void pointer to the instance of the orientation sensor adapter. |
ISF_SUCCESS | is returned when the data collection callback triggered successfully. |
DSA_ERR_PARAM | is returned when a wrong parameter is passed into the function such as an invalid or NULL parameter. |
Definition at line 555 of file fsl_fusion_virt_3D_orient.c.
References isf_SensorHandle_st::adapterStatus, fsl_fusion_DeviceDescriptor_t::deviceSemaphore, DSA_ERR_PARAM, DSA_ERR_START_DATA, DSA_STATE_CONFIGURED_STARTED, DSA_STATE_CONFIGURED_STOPPED, ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, and start_sensor().
isf_dsa_status_t fsl_fusion_virt_3D_orient_ValidateSettings | ( | isf_SensorHandle_t * | pSensorHandle, |
isf_dsa_SensorSettings_t * | pSensorSettings | ||
) |
This is the concrete implementation of the orientation sensor adapter for validating current settings.
This function is responsible for validating the current settings and if the current settings are not valid settings, it provides the best suitable settings.
[in] | pSensorHdl | This is a void pointer to the instance of the orientation sensor adapter. |
[in] | pSettings | The reference to the sensor settings. |
ISF_SUCCESS | is returned when the device settings are successfully validated. |
::SM_DSA_RET_SETTINGS_CHANGED | is returned when the current settings have been changed. |
< Sample period in microseconds
< Sample period in microseconds
< The desired data type of the subscription
Definition at line 322 of file fsl_fusion_virt_3D_orient.c.
References DSA_ERR_BAD_SENSOR_DATA_TYPE, DSA_ERR_PARAM, DSA_ERR_VALIDATE_SETTINGS, DSA_RESULT_TYPE_ENG_FLOAT, ISF_SUCCESS, isf_dsa_SensorSettings_st::nSamplePeriod, isf_SensorHandle_st::pDeviceDescriptor, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, isf_dsa_SensorSettings_st::resultFormat, isf_dsa_SensorSettings_st::resultType, TYPE_ALTITUDE, TYPE_DIR_COSINE_MATRIX, TYPE_EULER_3D, TYPE_MAGNETIC_FIELD_STRENGTH_3D, TYPE_NATIVE_SENSOR_DATA_TYPE, TYPE_QUATERNION, TYPE_RAW_ACCELERATION_3D, TYPE_ROTATIONAL_RATE_3D, and TYPE_TEMPERATURE.
void fsl_MagCal_task | ( | uint32_t | task_init_data | ) |
Definition at line 1225 of file fsl_fusion_virt_3D_orient.c.
References FALSE, fsl_fusion_DeviceDescriptor_t::fusionState, MAGCAL_EVENT_FLAG, MagCal_Run(), fsl_fusion_DeviceDescriptor_t::MagCalEventStruct, and isf_SensorHandle_st::pDeviceDescriptor.
Referenced by fsl_fusion_virt_3D_orient_Initialize().
isf_SensorDataTypes_t fsl_fusion_SupportedDataTypes[] |
Definition at line 102 of file fsl_fusion_virt_3D_orient.c.
isf_SensorTypes_t fsl_fusion_SupportedSensorTypes[] |
Supported sensor and data types for MMA8652.
Supported sensor and data types for MMA8652.
Definition at line 92 of file fsl_fusion_virt_3D_orient.c.