ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ORIENT_1.c
Go to the documentation of this file.
1 /* ###################################################################
2 ** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
3 ** Filename : ORIENT_1.c
4 ** CDE edition : Community
5 ** Project : ISF_K64F_CW_PROJ
6 ** Processor : MK64FN1M0VLL12
7 ** Component : ISF_Sensor_Virtual_Orientation
8 ** Version : Component 01.000, Driver 01.00, CPU db: 3.00.000
9 ** Compiler : GNU C Compiler
10 ** Date/Time : 2015-03-03, 11:01, # CodeGen: 0
11 ** Abstract :
12 **
13 ** Settings :
14 ** Contents :
15 ** No public methods
16 **
17 ** For non-commercial use only.
18 (c) Copyright <company/user-name>, 2014
19 http://www.<company>.com
20 mail: info@<company>.com
21 ** ###################################################################*/
22 /*!
23 ** @file ORIENT_1.c
24 ** @version 01.00
25 ** @brief
26 **
27 */
28 /*!
29 ** @addtogroup ORIENT_1_module ORIENT_1 module documentation
30 ** @{
31 */
32 
33 /* MODULE ORIENT_1. */
34 
35 #include "ORIENT_1.h"
38 
40 {
41  .algorithmConfig =
42  {
43  .outputDataRate = ORIENTATION_OUTPUT_PERIOD_USECS, /* time in usecs between orientation output samples */
44  .coordinateSystem = THISCOORDSYSTEM, /* use CoordinateSystem_t enums */
45  .accelOversampleRatio = ACCEL_OVERSAMPLE_RATIO, /* number of accel samples to take per orientation output */
46  .magOversampleRatio = MAG_OVERSAMPLE_RATIO, /* number of mag samples to take per orientation output */
47  .gyroOversampleRatio = GYRO_OVERSAMPLE_RATIO, /* number of gyro samples to take per orientation output */
48  },
49  .accelerometerSensorId = DSA_MMA865x_1, /* Index into the gSensorList array for the accel to use */
50  .magnetometerSensorId = DSA_MAG3110_1, /* Index into the gSensorList array for the mag to use */
51  .gyroSensorId = DSA_FXAS21002_1, /* Index into the gSensorList array for the gyro to use */
52  .lowPassFilterEnabled = TRUE, /* Flag indicating whether the Euler Angle values should be filtered or not */
53  .algorithmToUse = ALGO_CHOICE, /* Enumeration value for the fusion algorithm to use in computing the orientation output */
54 };
55 
56 /*!
57  * @brief This creates the sensor adapter instance for the target sensor.
58  *
59  * @see ::isf_sm_dsa_adapter.h for details of the ::sm_DsaAdapter_t.
60  */
62 {
64  .devInfo.pSupportedSensorDataTypes = fsl_fusion_SupportedDataTypes,
65  .devInfo.nNativeDataSetSize = sizeof(fsl_orientation_DataBuffer_t),
66  .control.Initialize = &fsl_fusion_virt_3D_orient_Initialize,
67  .control.ValidateSettings = &fsl_fusion_virt_3D_orient_ValidateSettings,
68  .control.Configure = &fsl_fusion_virt_3D_orient_Configure,
69  .control.StartData = &fsl_fusion_virt_3D_orient_StartData,
70  .control.EndData = &fsl_fusion_virt_3D_orient_EndData,
71  .control.Calibrate = &fsl_fusion_virt_3D_orient_Calibrate,
72  .control.Shutdown = &fsl_fusion_virt_3D_orient_Shutdown,
73  .control.Convert = &fsl_fusion_virt_3D_orient_Convert
74 };
75 /*
76 ** ===================================================================
77 ** Method : ORIENT_1_OnTask (component ISF_Sensor_Virtual_Orientation)
78 **
79 ** Description :
80 ** This method is internal. It is used by Processor Expert only.
81 ** ===================================================================
82 */
83 void Fusion_Task_task(uint32_t task_init_data)
84 {
85  _task_block();
86 
87  fsl_fusion_task(_task_get_parameter());
88 }
89 
90 /*
91 ** ===================================================================
92 ** Method : ORIENT_1_OnTask (component ISF_Sensor_Virtual_Orientation)
93 **
94 ** Description :
95 ** This method is internal. It is used by Processor Expert only.
96 ** ===================================================================
97 */
98 void MagCal_Task_task(uint32_t task_init_data)
99 {
100  _task_block();
101 
102  fsl_MagCal_task(_task_get_parameter());
103 }
104 
105 /* END ORIENT_1. */
106 
107 /*!
108 ** @}
109 */
110 /*
111 ** ###################################################################
112 **
113 ** This file was created by Processor Expert 10.3 [05.09]
114 ** for the Freescale Kinetis series of microcontrollers.
115 **
116 ** ###################################################################
117 */
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.
#define ORIENTATION_OUTPUT_PERIOD_USECS
Definition: fusion_config.h:20
#define TRUE
Definition: isf_types.h:52
isf_SensorDataTypes_t fsl_fusion_SupportedDataTypes[]
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.
void fsl_MagCal_task(uint32_t task_init_data)
isf_SensorTypes_t fsl_fusion_SupportedSensorTypes[]
Supported sensor and data types for the orientation sensor.
const isf_dsa_Adapter_t ORIENT_1_Adapter
This creates the sensor adapter instance for the target sensor.
Definition: ORIENT_1.c:61
#define GYRO_OVERSAMPLE_RATIO
Definition: fusion_config.h:24
The isf_sensor_configuration.h contains the enumerated list of Digital Sensor Abstraction (DSA) senso...
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 ...
#define MAG_OVERSAMPLE_RATIO
Definition: fusion_config.h:23
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.
isf_dsa_DeviceInfoBlock_t devInfo
This defines the DSA adapter structure required for static initialization of the concrete instance of...
isf_SensorTypes_t * pSupportedSensorTypes
#define THISCOORDSYSTEM
Definition: fusion_config.h:37
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...
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.
void fsl_fusion_task(uint32_t task_init_data)
void Fusion_Task_task(uint32_t task_init_data)
Definition: ORIENT_1.c:83
fsl_fusion_Sensor_Specific_Settings_t ORIENT_1_Sensor_Specific_Config
This allows access to the sensor specific configuration for the target sensor.
Definition: ORIENT_1.c:39
#define ACCEL_OVERSAMPLE_RATIO
Definition: fusion_config.h:22
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.
#define ALGO_CHOICE
Definition: fusion_config.h:26
void MagCal_Task_task(uint32_t task_init_data)
Definition: ORIENT_1.c:98
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 ...