ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 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 */
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 */
56 
57 /*! @brief Supported sensor and data types for FXLS8471 */
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  */
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  */
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  */
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  */
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  */
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  */
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  */
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 
unsigned char uint8
This defines uint8 as unsigned char.
Definition: isf_types.h:18
This structure defines important settings.
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_EndData(isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Shutdown(isf_SensorHandle_t *pSensorHandle)
This defines the DSA sensor device handle structure used to invoke the adapter access functions...
uint8 sampleRateIndex
Holds the ODR index into the rate array fsl_fxls8471_period */.
unsigned long uint32
This defines uint32 as unsigned long.
Definition: isf_types.h:36
isf_SensorTypes_t
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.
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
int32 isf_dsa_status_t
This is the Sensor Manager API return type definition.
isf_SensorTypes_t fxls8471_SupportedSensorTypes[]
Supported sensor and data types for FXLS8471.
enum isf_dsa_result_enums isf_dsa_result_types_t
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
isf_SensorDataTypes_t fxls8471_SupportedDataTypes[]
isf_SensorDataTypes_t
long int32
This defines int32 as long.
Definition: isf_types.h:32
short int16
This defines int16 as short.
Definition: isf_types.h:23
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_StartData(isf_SensorHandle_t *pSensorHandle)
This structure defines the dummy DSA data buffer format.
This defines the DSA sensor configuration parameter structure configuring the sensor settings by a su...
void fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback(void *pSensorHandle)
The isf_sm_types.h contains the collection of type definitions used in the Sensor Manager Interface a...
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Initialize(isf_SensorHandle_t *pSensorHandle)