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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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 */
45 } fxls8471_Specific_Settings_t;
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 */
51 } fxls8471_DataBuffer_t;
52
53 /*! @brief Supported sensor and data types for FXLS8471 */
54 extern isf_SensorTypes_t fxls8471_SupportedSensorTypes[];
55 extern isf_SensorDataTypes_t fxls8471_SupportedDataTypes[];
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 */
71 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Initialize(isf_SensorHandle_t *pSensorHandle);
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 */
88 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings);
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 */
105 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings);
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 */
120 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_StartData(isf_SensorHandle_t *pSensorHandle);
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 */
135 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_EndData(isf_SensorHandle_t *pSensorHandle);
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 */
150 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData );
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 */
165 isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Shutdown(isf_SensorHandle_t *pSensorHandle );
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
uint8
unsigned char uint8
Definition: isf_types.h:76
isf_dsa_adapter.h
fxls8471_Specific_Settings_t
This structure defines important settings.
Definition: fsl_fxls8471_i2cspi_3D_accel.h:42
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:377
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:464
FSL_FXLS8471_ACCEL_12p5HZ
12.5 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:29
FSL_FXLS8471_ACCEL_100HZ
100 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:27
isf_SensorHandle_st
This defines the DSA sensor device handle structure used to invoke the adapter access functions...
Definition: isf_dsa_adapter.h:107
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:44
FSL_FXLS8471_ACCEL_200HZ
200 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:26
isf_SensorTypes_t
isf_SensorTypes_t
Definition: isf_sensor_types.h:14
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:590
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:224
isf_dsa_status_t
int32 isf_dsa_status_t
This is the Sensor Manager API return type definition.
Definition: isf_dsa_adapter.h:21
FSL_FXLS8471_ACCEL_400HZ
400 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:25
int16
signed short int int16
Definition: isf_types.h:73
fxls8471_SupportedSensorTypes
isf_SensorTypes_t fxls8471_SupportedSensorTypes[]
Supported sensor and data types for FXLS8471.
Definition: fsl_fxls8471_i2cspi_3D_accel.c:67
FSL_FXLS8471_ACCEL_SCALE_4G
select +/-4G range
Definition: fsl_fxls8471_i2cspi_3D_accel.h:37
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:444
fxls8471_SupportedDataTypes
isf_SensorDataTypes_t fxls8471_SupportedDataTypes[]
Definition: fsl_fxls8471_i2cspi_3D_accel.c:68
isf_SensorDataTypes_t
isf_SensorDataTypes_t
Definition: isf_sensor_types.h:61
isf.h
Main ISF header file. Contains code common to all ISF components.
int32
signed long int int32
Definition: isf_types.h:74
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:195
FSL_FXLS8471_ACCEL_SCALE_8G
select +/-8G range
Definition: fsl_fxls8471_i2cspi_3D_accel.h:38
FSL_FXLS8471_ACCEL_1p56HZ
1.56 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:31
fxls8471_DataBuffer_t::timeStamp
uint32 timeStamp
Definition: fsl_fxls8471_i2cspi_3D_accel.h:49
FSL_FXLS8471_ACCEL_6p25HZ
6.25 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:30
FSL_FXLS8471_ACCEL_SCALE_2G
select +/-2G range
Definition: fsl_fxls8471_i2cspi_3D_accel.h:36
FSL_FXLS8471_ACCEL_800HZ
800 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:24
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:315
fxls8471_DataBuffer_t
This structure defines the dummy DSA data buffer format.
Definition: fsl_fxls8471_i2cspi_3D_accel.h:48
isf_dsa_SensorSettings_st
This defines the DSA sensor configuration parameter structure configuring the sensor settings by a su...
Definition: isf_dsa_adapter.h:79
FSL_FXLS8471_ACCEL_50HZ
50 Hz
Definition: fsl_fxls8471_i2cspi_3D_accel.h:28
uint32
unsigned long int uint32
Definition: isf_types.h:78
fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback
void fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback(void *pSensorHandle)
Definition: fsl_fxls8471_i2cspi_3D_accel.c:493
isf_sm_types.h
The isf_sm_types.h contains the collection of type definitions used in the Sensor Manager Interface a...
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:101
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.