| ISF 2.1 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
fsl_fxls8471_i2cspi_3D_accel.h
Go to the documentation of this file.
1 /**
2 * @file fsl_fxls8471_i2cspi_3D_accel.h
3 * @brief The \b fsl_fxls8471_i2cspi_3D_accel.h file contains the definitions and functions supporting the MMA8652 Sensor adapter header file
4 * @copyright Copyright (c) 2014, Freescale Semiconductor, Inc.
5 * @version 01.00
6 * @brief
7 *
8 */
9 /*!
10 ** @addtogroup fsl_fxls8471_i2cspi_3D_accel_module fsl_fxls8471_i2cspi_3D_accel module documentation
11 ** @{
12 */
13
14 #ifndef FSL_FXLS8471_I2CSPI_3D_ACCEL_H_
15 #define FSL_FXLS8471_I2CSPI_3D_ACCEL_H_
16
17 /* Include shared modules, which are used for whole project */
18 #include "PE_Types.h"
19 #include "PE_Error.h"
20 #include "PE_Const.h"
21 #include "IO_Map.h"
22 #include "Cpu.h"
23 #include "isf_sm_types.h"
24 #include "isf_dsa_adapter.h"
25
26 /*! @brief This enumerator describes the available sample rates for the FXLS8471 accelerometer */
27 enum {
28 FSL_FXLS8471_ACCEL_800HZ = 1250, //!< 800 Hz
29 FSL_FXLS8471_ACCEL_400HZ = 2500, //!< 400 Hz
30 FSL_FXLS8471_ACCEL_200HZ = 5000, //!< 200 Hz
31 FSL_FXLS8471_ACCEL_100HZ = 10000, //!< 100 Hz
32 FSL_FXLS8471_ACCEL_50HZ = 20000, //!< 50 Hz
33 FSL_FXLS8471_ACCEL_12p5HZ = 80000, //!< 12.5 Hz
34 FSL_FXLS8471_ACCEL_6p25HZ = 160000, //!< 6.25 Hz
35 FSL_FXLS8471_ACCEL_1p56HZ = 640000 //!< 1.56 Hz
36 };
37
38 /*! @brief This enumerator describes the available acceleration ranges for the MM865X family of accelerometers. */
39 enum {
40 FSL_FXLS8471_ACCEL_SCALE_2G = 0, //!< select +/-2G range
41 FSL_FXLS8471_ACCEL_SCALE_4G = 1, //!< select +/-4G range
42 FSL_FXLS8471_ACCEL_SCALE_8G = 2 //!< select +/-8G range
43 };
44
45 /*! @brief This structure defines important settings.*/
46 typedef struct
47 {
48 uint8 sampleRateIndex; //!< Holds the ODR index into the rate array fsl_fxls8471_period */
49 } fxls8471_Specific_Settings_t;
50
51 /*! @brief This structure defines the dummy DSA data buffer format.*/
52 typedef struct {
53 uint32 timeStamp; /*!< The time stamp for the data packet.*/
54 int16 accel[3]; /*!< The accelerometer data */
55 } fxls8471_DataBuffer_t;
56
57 /*! @brief Supported sensor and data types for FXLS8471 */
58 extern isf_SensorTypes_t fxls8471_SupportedSensorTypes[];
59 extern isf_SensorDataTypes_t fxls8471_SupportedDataTypes[];
60
61
62 /*
63 ** ===================================================================
64 ** Method : fsl_fxls8471_i2cspi_3D_accel_Initialize
65 ** @brief
66 **
67 ** Parameters :
68 ** NAME - DESCRIPTION
69 ** @param
70 ** isf_SensorHandle_t *pSensorHandle
71 ** @return
72 ** isf_dsa_status_t -
73 ** ===================================================================
74 */
75 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Initialize(isf_SensorHandle_t *pSensorHandle);
76
77 /*
78 ** ===================================================================
79 ** Method : fsl_fxls8471_i2cspi_3D_accel_ValidateSettings
80 ** @brief
81 **
82 ** Parameters :
83 ** NAME - DESCRIPTION
84 ** @param
85 ** isf_SensorHandle_t *pSensorHandle
86 ** @param
87 ** isf_SubscriptionSettings_t *pSettings
88 ** @return
89 ** isf_dsa_status_t -
90 ** ===================================================================
91 */
92 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings);
93
94 /*
95 ** ===================================================================
96 ** Method : fsl_fxls8471_i2cspi_3D_accel_Configure
97 ** @brief
98 **
99 ** Parameters :
100 ** NAME - DESCRIPTION
101 ** @param
102 ** isf_SensorHandle_t *pSensorHandle
103 ** @param
104 ** isf_SubscriptionSettings_t *pConfigSettings
105 ** @return
106 ** isf_dsa_status_t -
107 ** ===================================================================
108 */
109 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings);
110
111 /*
112 ** ===================================================================
113 ** Method : fsl_fxls8471_i2cspi_3D_accel_StartData
114 ** @brief
115 **
116 ** Parameters :
117 ** NAME - DESCRIPTION
118 ** @param
119 ** isf_SensorHandle_t *pSensorHandle
120 ** @return
121 ** isf_dsa_status_t -
122 ** ===================================================================
123 */
124 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_StartData(isf_SensorHandle_t *pSensorHandle);
125
126 /*
127 ** ===================================================================
128 ** Method : fsl_fxls8471_i2cspi_3D_accel_EndData
129 ** @brief
130 **
131 ** Parameters :
132 ** NAME - DESCRIPTION
133 ** @param
134 ** isf_SensorHandle_t *pSensorHandle
135 ** @return
136 ** isf_dsa_status_t -
137 ** ===================================================================
138 */
139 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_EndData(isf_SensorHandle_t *pSensorHandle);
140
141 /*
142 ** ===================================================================
143 ** Method : fsl_fxls8471_i2cspi_3D_accel_Calibrate
144 ** @brief
145 **
146 ** Parameters :
147 ** NAME - DESCRIPTION
148 ** @param
149 ** isf_SensorHandle_t *pSensorHandle
150 ** @return
151 ** isf_dsa_status_t -
152 ** ===================================================================
153 */
154 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData );
155
156 /*
157 ** ===================================================================
158 ** Method : fsl_fxls8471_i2cspi_3D_accel_Shutdown
159 ** @brief
160 **
161 ** Parameters :
162 ** NAME - DESCRIPTION
163 ** @param
164 ** isf_SensorHandle_t *pSensorHandle
165 ** @return
166 ** isf_dsa_status_t -
167 ** ===================================================================
168 */
169 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Shutdown(isf_SensorHandle_t *pSensorHandle );
170
171 /*
172 ** ===================================================================
173 ** Method : fsl_fxls8471_i2cspi_3D_accel_Convert
174 ** @brief The DSA interface conversion function to convert native samples to specified standard types
175 **
176 ** Parameters :
177 ** NAME - DESCRIPTION
178 ** @param
179 ** isf_SensorHandle_t *pSensorHandle
180 ** @return
181 ** void -
182 ** ===================================================================
183 */
184 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Convert(volatile isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *nativeSample, void *convertedSample, int32 *numBytes );
185 /*
186 ** ===================================================================
187 ** Method : fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback (component ISFDSA)
188 ** @brief
189 **
190 ** Parameters :
191 ** NAME - DESCRIPTION
192 ** @param
193 ** isf_SensorHandle_t *pSensorHandle
194 ** @return
195 ** void -
196 ** ===================================================================
197 */
198 void fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback(void* pSensorHandle);
199
200 #endif
201 /* END FSL_FXLS8471_I2CSPI_3D_ACCEL_H_ */
202 /*!
203 ** @}
204 */
205
FSL_FXLS8471_ACCEL_SCALE_8G
select +/-8G range
Definition: fsl_fxls8471_i2cspi_3D_accel.h:42
uint8
unsigned char uint8
This defines uint8 as unsigned char.
Definition: isf_types.h:18
isf_dsa_adapter.h
fxls8471_Specific_Settings_t
This structure defines important settings.
Definition: fsl_fxls8471_i2cspi_3D_accel.h:46
fsl_fxls8471_i2cspi_3D_accel_EndData
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_EndData(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_fxls8471_i2cspi_3D_accel.c:385
FSL_FXLS8471_ACCEL_50HZ
50 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:32
fsl_fxls8471_i2cspi_3D_accel_Shutdown
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Shutdown(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_fxls8471_i2cspi_3D_accel.c:469
isf_SensorHandle_st
This defines the DSA sensor device handle structure used to invoke the adapter access functions...
Definition: isf_dsa_adapter.h:109
FSL_FXLS8471_ACCEL_SCALE_2G
select +/-2G range
Definition: fsl_fxls8471_i2cspi_3D_accel.h:40
fxls8471_Specific_Settings_t::sampleRateIndex
uint8 sampleRateIndex
Holds the ODR index into the rate array fsl_fxls8471_period */.
Definition: fsl_fxls8471_i2cspi_3D_accel.h:48
FSL_FXLS8471_ACCEL_12p5HZ
12.5 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:33
uint32
unsigned long uint32
This defines uint32 as unsigned long.
Definition: isf_types.h:36
FSL_FXLS8471_ACCEL_400HZ
400 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:29
isf_SensorTypes_t
isf_SensorTypes_t
Definition: isf_sensor_types.h:14
FSL_FXLS8471_ACCEL_6p25HZ
6.25 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:34
fsl_fxls8471_i2cspi_3D_accel_Convert
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_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_fxls8471_i2cspi_3D_accel.c:592
fsl_fxls8471_i2cspi_3D_accel_Configure
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
Definition: fsl_fxls8471_i2cspi_3D_accel.c:236
isf_dsa_status_t
int32 isf_dsa_status_t
This is the Sensor Manager API return type definition.
Definition: isf_dsa_adapter.h:23
fxls8471_SupportedSensorTypes
isf_SensorTypes_t fxls8471_SupportedSensorTypes[]
Supported sensor and data types for FXLS8471.
Definition: fsl_fxls8471_i2cspi_3D_accel.c:66
FSL_FXLS8471_ACCEL_200HZ
200 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:30
isf_dsa_result_types_t
enum isf_dsa_result_enums isf_dsa_result_types_t
fsl_fxls8471_i2cspi_3D_accel_Calibrate
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
Definition: fsl_fxls8471_i2cspi_3D_accel.c:449
FSL_FXLS8471_ACCEL_SCALE_4G
select +/-4G range
Definition: fsl_fxls8471_i2cspi_3D_accel.h:41
fxls8471_SupportedDataTypes
isf_SensorDataTypes_t fxls8471_SupportedDataTypes[]
Definition: fsl_fxls8471_i2cspi_3D_accel.c:67
isf_SensorDataTypes_t
isf_SensorDataTypes_t
Definition: isf_sensor_types.h:61
FSL_FXLS8471_ACCEL_1p56HZ
1.56 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:35
int32
long int32
This defines int32 as long.
Definition: isf_types.h:32
int16
short int16
This defines int16 as short.
Definition: isf_types.h:23
fsl_fxls8471_i2cspi_3D_accel_ValidateSettings
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
Definition: fsl_fxls8471_i2cspi_3D_accel.c:207
fxls8471_DataBuffer_t::timeStamp
uint32 timeStamp
Definition: fsl_fxls8471_i2cspi_3D_accel.h:53
fsl_fxls8471_i2cspi_3D_accel_StartData
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_StartData(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_fxls8471_i2cspi_3D_accel.c:325
fxls8471_DataBuffer_t
This structure defines the dummy DSA data buffer format.
Definition: fsl_fxls8471_i2cspi_3D_accel.h:52
isf_dsa_SensorSettings_st
This defines the DSA sensor configuration parameter structure configuring the sensor settings by a su...
Definition: isf_dsa_adapter.h:81
FSL_FXLS8471_ACCEL_800HZ
800 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:28
fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback
void fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback(void *pSensorHandle)
Definition: fsl_fxls8471_i2cspi_3D_accel.c:498
isf_sm_types.h
The isf_sm_types.h contains the collection of type definitions used in the Sensor Manager Interface a...
FSL_FXLS8471_ACCEL_100HZ
100 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:31
fsl_fxls8471_i2cspi_3D_accel_Initialize
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Initialize(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_fxls8471_i2cspi_3D_accel.c:100
- © Freescale Semiconductor, Inc. 2015. All Rights Reserved.