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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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"
65 #include "isf_sensor_configuration.h"
66 #include "fsl_fusion_virt_3D_orient.h"
67
68 fsl_fusion_Sensor_Specific_Settings_t ORIENT_1_Sensor_Specific_Config =
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 */
88 const isf_dsa_Adapter_t ORIENT_1_Adapter =
89 {
90 .devInfo.pSupportedSensorTypes = fsl_fusion_SupportedSensorTypes,
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 */
fsl_fusion_virt_3D_orient_Initialize
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.
Definition: fsl_fusion_virt_3D_orient.c:154
fsl_fusion_Sensor_Specific_Settings_t
Definition: fsl_fusion_virt_3D_orient.h:129
ORIENTATION_OUTPUT_PERIOD_USECS
#define ORIENTATION_OUTPUT_PERIOD_USECS
Definition: fusion_config.h:20
TRUE
#define TRUE
Definition: isf_types.h:82
ORIENT_1.h
fsl_fusion_SupportedDataTypes
isf_SensorDataTypes_t fsl_fusion_SupportedDataTypes[]
Definition: fsl_fusion_virt_3D_orient.c:102
fsl_fusion_virt_3D_orient_Configure
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.
Definition: fsl_fusion_virt_3D_orient.c:394
fsl_orientation_DataBuffer_t
Definition: fsl_fusion_virt_3D_orient.h:77
fsl_fusion_SupportedSensorTypes
isf_SensorTypes_t fsl_fusion_SupportedSensorTypes[]
Supported sensor and data types for the orientation sensor.
Definition: fsl_fusion_virt_3D_orient.c:92
ORIENT_1_Adapter
const isf_dsa_Adapter_t ORIENT_1_Adapter
This creates the sensor adapter instance for the target sensor.
Definition: ORIENT_1.c:88
GYRO_OVERSAMPLE_RATIO
#define GYRO_OVERSAMPLE_RATIO
Definition: fusion_config.h:25
isf_sensor_configuration.h
The isf_sensor_configuration.h contains the enumerated list of Digital Sensor Abstraction (DSA) senso...
fsl_fusion_virt_3D_orient_Shutdown
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 ...
Definition: fsl_fusion_virt_3D_orient.c:759
MAG_OVERSAMPLE_RATIO
#define MAG_OVERSAMPLE_RATIO
Definition: fusion_config.h:24
fsl_fusion_virt_3D_orient_EndData
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.
Definition: fsl_fusion_virt_3D_orient.c:649
isf_dsa_Adapter_st::devInfo
isf_dsa_DeviceInfoBlock_t devInfo
Definition: isf_dsa_adapter.h:146
isf_dsa_Adapter_st
This defines the DSA adapter structure required for static initialization of the concrete instance of...
Definition: isf_dsa_adapter.h:144
isf_dsa_DeviceInfoBlock_st::pSupportedSensorTypes
isf_SensorTypes_t * pSupportedSensorTypes
Definition: isf_dsa_adapter.h:70
fsl_fusion_Sensor_Specific_Settings_t::algorithmConfig
fusion_algorithmConfig_t algorithmConfig
Definition: fsl_fusion_virt_3D_orient.h:130
THISCOORDSYSTEM
#define THISCOORDSYSTEM
Definition: fusion_config.h:32
fsl_fusion_virt_3D_orient_ValidateSettings
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...
Definition: fsl_fusion_virt_3D_orient.c:322
fsl_fusion_virt_3D_orient_StartData
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.
Definition: fsl_fusion_virt_3D_orient.c:555
fsl_fusion_virt_3D_orient.h
PRESSURE_OVERSAMPLE_RATIO
#define PRESSURE_OVERSAMPLE_RATIO
Definition: fusion_config.h:26
ORIENT_1_Sensor_Specific_Config
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
ACCEL_OVERSAMPLE_RATIO
#define ACCEL_OVERSAMPLE_RATIO
Definition: fusion_config.h:23
fusion_algorithmConfig_t::outputDataRate
uint32 outputDataRate
Definition: fusion_types.h:265
fsl_fusion_virt_3D_orient_Convert
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: fsl_fusion_virt_3D_orient.c:1257
ALGO_CHOICE
#define ALGO_CHOICE
Definition: fusion_config.h:27
fsl_fusion_virt_3D_orient_Calibrate
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 ...
Definition: fsl_fusion_virt_3D_orient.c:742
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.