ISF  2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
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) 2015, 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 "isf.h"
19 #include "isf_sm_types.h"
20 #include "isf_dsa_adapter.h"
21 
22 /*! @brief This enumerator describes the available sample rates for the FXLS8471 accelerometer */
23 enum {
24  FSL_FXLS8471_ACCEL_800HZ = 1250, //!< 800 Hz
25  FSL_FXLS8471_ACCEL_400HZ = 2500, //!< 400 Hz
26  FSL_FXLS8471_ACCEL_200HZ = 5000, //!< 200 Hz
27  FSL_FXLS8471_ACCEL_100HZ = 10000, //!< 100 Hz
28  FSL_FXLS8471_ACCEL_50HZ = 20000, //!< 50 Hz
29  FSL_FXLS8471_ACCEL_12p5HZ = 80000, //!< 12.5 Hz
30  FSL_FXLS8471_ACCEL_6p25HZ = 160000, //!< 6.25 Hz
31  FSL_FXLS8471_ACCEL_1p56HZ = 640000 //!< 1.56 Hz
32 };
33 
34 /*! @brief This enumerator describes the available acceleration ranges for the MM865X family of accelerometers. */
35 enum {
36  FSL_FXLS8471_ACCEL_SCALE_2G = 0, //!< select +/-2G range
37  FSL_FXLS8471_ACCEL_SCALE_4G = 1, //!< select +/-4G range
38  FSL_FXLS8471_ACCEL_SCALE_8G = 2 //!< select +/-8G range
39 };
40 
41 /*! @brief This structure defines important settings.*/
42 typedef struct
43 {
44  uint8 sampleRateIndex; //!< Holds the ODR index into the rate array fsl_fxls8471_period */
46 
47 /*! @brief This structure defines the dummy DSA data buffer format.*/
48 typedef struct {
49  uint32 timeStamp; /*!< The time stamp for the data packet.*/
50  int16 accel[3]; /*!< The accelerometer data */
52 
53 /*! @brief Supported sensor and data types for FXLS8471 */
56 
57 
58 /*
59  ** ===================================================================
60  ** Method : fsl_fxls8471_i2cspi_3D_accel_Initialize
61  ** @brief
62  **
63  ** Parameters :
64  ** NAME - DESCRIPTION
65  ** @param
66  ** isf_SensorHandle_t *pSensorHandle
67  ** @return
68  ** isf_dsa_status_t -
69  ** ===================================================================
70  */
72 
73 /*
74  ** ===================================================================
75  ** Method : fsl_fxls8471_i2cspi_3D_accel_ValidateSettings
76  ** @brief
77  **
78  ** Parameters :
79  ** NAME - DESCRIPTION
80  ** @param
81  ** isf_SensorHandle_t *pSensorHandle
82  ** @param
83  ** isf_SubscriptionSettings_t *pSettings
84  ** @return
85  ** isf_dsa_status_t -
86  ** ===================================================================
87  */
89 
90 /*
91  ** ===================================================================
92  ** Method : fsl_fxls8471_i2cspi_3D_accel_Configure
93  ** @brief
94  **
95  ** Parameters :
96  ** NAME - DESCRIPTION
97  ** @param
98  ** isf_SensorHandle_t *pSensorHandle
99  ** @param
100  ** isf_SubscriptionSettings_t *pConfigSettings
101  ** @return
102  ** isf_dsa_status_t -
103  ** ===================================================================
104  */
106 
107 /*
108  ** ===================================================================
109  ** Method : fsl_fxls8471_i2cspi_3D_accel_StartData
110  ** @brief
111  **
112  ** Parameters :
113  ** NAME - DESCRIPTION
114  ** @param
115  ** isf_SensorHandle_t *pSensorHandle
116  ** @return
117  ** isf_dsa_status_t -
118  ** ===================================================================
119  */
121 
122 /*
123  ** ===================================================================
124  ** Method : fsl_fxls8471_i2cspi_3D_accel_EndData
125  ** @brief
126  **
127  ** Parameters :
128  ** NAME - DESCRIPTION
129  ** @param
130  ** isf_SensorHandle_t *pSensorHandle
131  ** @return
132  ** isf_dsa_status_t -
133  ** ===================================================================
134  */
136 
137 /*
138  ** ===================================================================
139  ** Method : fsl_fxls8471_i2cspi_3D_accel_Calibrate
140  ** @brief
141  **
142  ** Parameters :
143  ** NAME - DESCRIPTION
144  ** @param
145  ** isf_SensorHandle_t *pSensorHandle
146  ** @return
147  ** isf_dsa_status_t -
148  ** ===================================================================
149  */
151 
152 /*
153  ** ===================================================================
154  ** Method : fsl_fxls8471_i2cspi_3D_accel_Shutdown
155  ** @brief
156  **
157  ** Parameters :
158  ** NAME - DESCRIPTION
159  ** @param
160  ** isf_SensorHandle_t *pSensorHandle
161  ** @return
162  ** isf_dsa_status_t -
163  ** ===================================================================
164  */
166 
167 /*
168  ** ===================================================================
169  ** Method : fsl_fxls8471_i2cspi_3D_accel_Convert
170  ** @brief The DSA interface conversion function to convert native samples to specified standard types
171  **
172  ** Parameters :
173  ** NAME - DESCRIPTION
174  ** @param
175  ** isf_SensorHandle_t *pSensorHandle
176  ** @return
177  ** void -
178  ** ===================================================================
179  */
180 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 );
181 /*
182  ** ===================================================================
183  ** Method : fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback (component ISFDSA)
184  ** @brief
185  **
186  ** Parameters :
187  ** NAME - DESCRIPTION
188  ** @param
189  ** isf_SensorHandle_t *pSensorHandle
190  ** @return
191  ** void -
192  ** ===================================================================
193  */
194 void fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback(void* pSensorHandle);
195 
196 #endif
197 /* END FSL_FXLS8471_I2CSPI_3D_ACCEL_H_ */
198 /*!
199 ** @}
200 */
201 
unsigned char uint8
Definition: isf_types.h:76
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 */.
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.
signed short int int16
Definition: isf_types.h:73
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
Main ISF header file. Contains code common to all ISF components.
signed long int int32
Definition: isf_types.h:74
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...
unsigned long int uint32
Definition: isf_types.h:78
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)