ISF  2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
fsl_mpl3115_i2c_1D_press.h
Go to the documentation of this file.
1 /**
2  * @file fsl_mpl3115_i2c_1D_press.h
3  * @brief The \b fsl_mpl3115_i2c_1D_press.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_mpl3115_i2c_1D_press_module fsl_mpl3115_i2c_1D_press module documentation
11  ** @{
12  */
13 
14 #ifndef FSL_MPL3115_I2C_1D_PRESS_H_
15 #define FSL_MPL3115_I2C_1D_PRESS_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 MPL3115 accelerometer */
23 enum {
24  FSL_MPL3115_ACCEL_800HZ = 1250, //!< 800 Hz
25  FSL_MPL3115_ACCEL_400HZ = 2500, //!< 400 Hz
26  FSL_MPL3115_ACCEL_200HZ = 5000, //!< 200 Hz
27  FSL_MPL3115_ACCEL_100HZ = 10000, //!< 100 Hz
28  FSL_MPL3115_ACCEL_50HZ = 20000, //!< 50 Hz
29  FSL_MPL3115_ACCEL_12p5HZ = 80000, //!< 12.5 Hz
30  FSL_MPL3115_ACCEL_6p25HZ = 160000, //!< 6.25 Hz
31  FSL_MPL3115_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_MPL3115_ACCEL_SCALE_2G = 0, //!< select +/-2G range
37  FSL_MPL3115_ACCEL_SCALE_4G = 1, //!< select +/-4G range
38  FSL_MPL3115_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_mpl3115_period */
46 
47 /*! @brief This structure defines the dummy DSA data buffer format.*/
48 typedef struct
49 {
51  //!< Time stamp value in micro-seconds.
53  //!< Sensor pressure output: unsigned 20-bits justified to MSBs;
54  //!< MS 18-bits are integer Pascals; LS 2-bits are fractional Pascals.
56  //!< Sensor altitude output: 2's complement 20-bits justified to MSBs;
57  //!< MS 16-bits are integer meters; LS 4-bits are fractional meters.
59  //!< Sensor temperature output; 2's complement 12-bits justified to MSBs;
60  //!< MS 8-bits are integer degrees Celsius; LS 4-bits are fractional degrees Celsius.
62 
63 /**
64  * @brief the structure defines the OS table for MPL3115 operation.
65  */
66 typedef struct {
67  uint32 samplePeriod; /* Sample period in micro-seconds. */
68  uint8 osConfigVal; /* Corresponding to Over-sample (OS) ratio */
70 
71 /*! @brief Supported sensor and data types for MPL3115 */
74 
75 
76 /*
77  ** ===================================================================
78  ** Method : fsl_mpl3115_i2c_1D_press_Initialize
79  ** @brief
80  **
81  ** Parameters :
82  ** NAME - DESCRIPTION
83  ** @param
84  ** isf_SensorHandle_t *pSensorHandle
85  ** @return
86  ** isf_dsa_status_t -
87  ** ===================================================================
88  */
90 
91 /*
92  ** ===================================================================
93  ** Method : fsl_mpl3115_i2c_1D_press_ValidateSettings
94  ** @brief
95  **
96  ** Parameters :
97  ** NAME - DESCRIPTION
98  ** @param
99  ** isf_SensorHandle_t *pSensorHandle
100  ** @param
101  ** isf_SubscriptionSettings_t *pSettings
102  ** @return
103  ** isf_dsa_status_t -
104  ** ===================================================================
105  */
107 
108 /*
109  ** ===================================================================
110  ** Method : fsl_mpl3115_i2c_1D_press_Configure
111  ** @brief
112  **
113  ** Parameters :
114  ** NAME - DESCRIPTION
115  ** @param
116  ** isf_SensorHandle_t *pSensorHandle
117  ** @param
118  ** isf_SubscriptionSettings_t *pConfigSettings
119  ** @return
120  ** isf_dsa_status_t -
121  ** ===================================================================
122  */
124 
125 /*
126  ** ===================================================================
127  ** Method : fsl_mpl3115_i2c_1D_press_StartData
128  ** @brief
129  **
130  ** Parameters :
131  ** NAME - DESCRIPTION
132  ** @param
133  ** isf_SensorHandle_t *pSensorHandle
134  ** @return
135  ** isf_dsa_status_t -
136  ** ===================================================================
137  */
139 
140 /*
141  ** ===================================================================
142  ** Method : fsl_mpl3115_i2c_1D_press_EndData
143  ** @brief
144  **
145  ** Parameters :
146  ** NAME - DESCRIPTION
147  ** @param
148  ** isf_SensorHandle_t *pSensorHandle
149  ** @return
150  ** isf_dsa_status_t -
151  ** ===================================================================
152  */
154 
155 /*
156  ** ===================================================================
157  ** Method : fsl_mpl3115_i2c_1D_press_Calibrate
158  ** @brief
159  **
160  ** Parameters :
161  ** NAME - DESCRIPTION
162  ** @param
163  ** isf_SensorHandle_t *pSensorHandle
164  ** @return
165  ** isf_dsa_status_t -
166  ** ===================================================================
167  */
169 
170 /*
171  ** ===================================================================
172  ** Method : fsl_mpl3115_i2c_1D_press_Shutdown
173  ** @brief
174  **
175  ** Parameters :
176  ** NAME - DESCRIPTION
177  ** @param
178  ** isf_SensorHandle_t *pSensorHandle
179  ** @return
180  ** isf_dsa_status_t -
181  ** ===================================================================
182  */
184 
185 /*
186  ** ===================================================================
187  ** Method : fsl_mpl3115_i2c_1D_press_Convert
188  ** @brief The DSA interface conversion function to convert native samples to specified standard types
189  **
190  ** Parameters :
191  ** NAME - DESCRIPTION
192  ** @param
193  ** isf_SensorHandle_t *pSensorHandle
194  ** @return
195  ** void -
196  ** ===================================================================
197  */
198 isf_dsa_status_t fsl_mpl3115_i2c_1D_press_Convert(volatile isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *nativeSample, void *convertedSample, int32 *numBytes );
199 /*
200  ** ===================================================================
201  ** Method : fsl_mpl3115_i2c_1D_press_PeriodicCallback (component ISFDSA)
202  ** @brief
203  **
204  ** Parameters :
205  ** NAME - DESCRIPTION
206  ** @param
207  ** isf_SensorHandle_t *pSensorHandle
208  ** @return
209  ** void -
210  ** ===================================================================
211  */
212 void fsl_mpl3115_i2c_1D_press_PeriodicCallback(void* pSensorHandle);
213 
214 #endif
215 /* END FSL_MPL3115_I2C_1D_PRESS_H_ */
216 /*!
217 ** @}
218 */
219 
unsigned char uint8
Definition: isf_types.h:76
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_Shutdown(isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_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.
This defines the DSA sensor device handle structure used to invoke the adapter access functions...
isf_SensorTypes_t
isf_SensorDataTypes_t mpl3115_SupportedDataTypes[]
the structure defines the OS table for MPL3115 operation.
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
int32 isf_dsa_status_t
This is the Sensor Manager API return type definition.
This structure defines important settings.
This structure defines the dummy DSA data buffer format.
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
signed short int int16
Definition: isf_types.h:73
enum isf_dsa_result_enums isf_dsa_result_types_t
isf_SensorDataTypes_t
void fsl_mpl3115_i2c_1D_press_PeriodicCallback(void *pSensorHandle)
Main ISF header file. Contains code common to all ISF components.
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_StartData(isf_SensorHandle_t *pSensorHandle)
signed long int int32
Definition: isf_types.h:74
uint8 sampleRateIndex
Holds the ODR index into the rate array fsl_mpl3115_period */.
isf_SensorTypes_t mpl3115_SupportedSensorTypes[]
Supported sensor and data types for MPL3115.
This defines the DSA sensor configuration parameter structure configuring the sensor settings by a su...
unsigned long int uint32
Definition: isf_types.h:78
The isf_sm_types.h contains the collection of type definitions used in the Sensor Manager Interface a...
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_Initialize(isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_EndData(isf_SensorHandle_t *pSensorHandle)
uint32 timestamp
Time stamp value in micro-seconds.