ISF  2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
ORIENT_1.c
Go to the documentation of this file.
1 /* ###################################################################
2 ** This component module is generated by Processor Expert. Do not modify it.
3 ** Filename : ORIENT_1.c
4 ** CDE edition : Community
5 ** Project : ISF2P2_K64F_MQX_PROJ
6 ** Processor : MK64FN1M0VLL12
7 ** Component : ISF_KSDK_Sensor_Virtual_Orientation
8 ** Version : Component 02.500, Driver 01.00, CPU db: 3.00.000
9 ** Repository : My Components
10 ** Compiler : GNU C Compiler
11 ** Date/Time : 2016-10-06, 13:38, # CodeGen: 0
12 ** Abstract :
13 **
14 ** Settings :
15 ** Component Name : ORIENT_1
16 ** Fusion Configuration :
17 ** Coordinate System To Use : NED
18 ** Execute Algorithms in Parallel : 1
19 ** Output Data Period : 40000
20 ** Accelerometer Oversample Ratio : 4
21 ** Magnetometer Oversample Ratio : 4
22 ** Gyrometer Oversample Ratio : 16
23 ** Pressure Sensor Oversample Ratio : 1
24 ** Algorithms To Use : yes
25 ** Tiltmeter : no
26 ** 2D Automotive Compass : no
27 ** Rotation : no
28 ** Tilt Compensated Compass : no
29 ** Gaming Handset : no
30 ** Gyrometer Stabilized Compass : no
31 ** Pressure/Altitude : no
32 ** Sensor Selection :
33 ** Use Accelerometer : no
34 ** Use Magnetometer : no
35 ** Use Gyrometer : no
36 ** Use Pressure Sensor : no
37 ** Custom Sensor Board Mount Abstraction : no
38 ** OSTask Configuration :
39 ** FusionTask StackSize : 2000
40 ** FusionTask Priority : 9
41 ** MagCalTask StackSize : 3000
42 ** MagCalTask Priority : 12
43 ** Contents :
44 ** No public methods
45 **
46 ** For non-commercial use only.
47 (c) Copyright <company/user-name>, 2015,
48 http://www.<company>.com
49 mail: info@<company>.com
50 ** ###################################################################*/
51 /*!
52 ** @file ORIENT_1.c
53 ** @version 01.00
54 ** @brief
55 **
56 */
57 /*!
58 ** @addtogroup ORIENT_1_module ORIENT_1 module documentation
59 ** @{
60 */
61 
62 /* MODULE ORIENT_1. */
63 
64 #include "ORIENT_1.h"
67 
69 {
70  .algorithmConfig =
71  {
72  .outputDataRate = ORIENTATION_OUTPUT_PERIOD_USECS, /* time in usecs between orientation output samples */
73  .coordinateSystem = THISCOORDSYSTEM, /* use CoordinateSystem_t enums */
74  .accelOversampleRatio = ACCEL_OVERSAMPLE_RATIO, /* number of accel samples to take per orientation output */
75  .magOversampleRatio = MAG_OVERSAMPLE_RATIO, /* number of mag samples to take per orientation output */
76  .gyroOversampleRatio = GYRO_OVERSAMPLE_RATIO, /* number of gyro samples to take per orientation output */
77  .pressureOversampleRatio = PRESSURE_OVERSAMPLE_RATIO, /* number of gyro samples to take per orientation output */
78  },
79  .lowPassFilterEnabled = TRUE, /* Flag indicating whether the Euler Angle values should be filtered or not */
80  .algorithmToUse = ALGO_CHOICE, /* Enumeration value for the fusion algorithm to use in computing the orientation output */
81 };
82 
83 /*!
84  * @brief This creates the sensor adapter instance for the target sensor.
85  *
86  * @see ::isf_sm_dsa_adapter.h for details of the ::sm_DsaAdapter_t.
87  */
89 {
91  .devInfo.pSupportedSensorDataTypes = fsl_fusion_SupportedDataTypes,
92  .devInfo.nNativeDataSetSize = sizeof(fsl_orientation_DataBuffer_t),
93  .control.Initialize = &fsl_fusion_virt_3D_orient_Initialize,
94  .control.ValidateSettings = &fsl_fusion_virt_3D_orient_ValidateSettings,
95  .control.Configure = &fsl_fusion_virt_3D_orient_Configure,
96  .control.StartData = &fsl_fusion_virt_3D_orient_StartData,
97  .control.EndData = &fsl_fusion_virt_3D_orient_EndData,
98  .control.Calibrate = &fsl_fusion_virt_3D_orient_Calibrate,
99  .control.Shutdown = &fsl_fusion_virt_3D_orient_Shutdown,
100  .control.Convert = &fsl_fusion_virt_3D_orient_Convert
101 };
102 
103 /* END ORIENT_1. */
104 
105 /*!
106 ** @}
107 */
108 /*
109 ** ###################################################################
110 **
111 ** This file was created by Processor Expert 10.5 [05.21]
112 ** for the Freescale Kinetis series of microcontrollers.
113 **
114 ** ###################################################################
115 */
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:82
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.
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:88
#define GYRO_OVERSAMPLE_RATIO
Definition: fusion_config.h:25
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:24
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:32
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.
#define PRESSURE_OVERSAMPLE_RATIO
Definition: fusion_config.h:26
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:68
#define ACCEL_OVERSAMPLE_RATIO
Definition: fusion_config.h:23
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:27
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 ...