ISF  2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
fsl_mma8491q_i2c_3D_accel.h
Go to the documentation of this file.
1 /**
2  * @file fsl_mma8491q_i2c_3D_accel.h
3  * @brief The fsl_mma8491q_i2c_3D_accel.h file contains the definitions and functions supporting the MMA8491q Sensor adapter.
4  * @copyright Copyright (c) 2015, Freescale Semiconductor, Inc.
5  * @version 01.00
6  */
7 /*!
8  ** @addtogroup fsl_mma8491q_i2c_3D_accel_module fsl_mma8491q_i2c_3D_accel module documentation
9  ** @{
10  */
11 
12 #ifndef FSL_MMA8491Q_I2C_3D_ACCEL_H_
13 #define FSL_MMA8491Q_I2C_3D_ACCEL_H_
14 #include "isf.h"
15 /* Include shared modules, which are used for whole project */
16 #include "isf_sm_types.h"
17 #include "isf_dsa_adapter.h"
18 
19 
20 /*! @brief MMA8491Q data buffer format. */
21 typedef struct
22 {
23  uint32 timestamp; //!< Time stamp value in micro-seconds.
24  int16 accel[3]; //!< Accelerometer raw data buffer. MMA8491Q supports X,Y,Z axes(3).
25  uint8 xOut; //!< The Tilt X data from the sensor.
26  uint8 yOut; //!< The Tilt Y data from the sensor.
27  uint8 zOut; //!< The Tilt Z data from the sensor.
29 
30 /*! @brief Supported sensor and data types for MMA8491q */
33 
34 /*
35  ** ===================================================================
36  ** Method : fsl_mma8491q_i2c_3D_accel_Initialize
37  ** @brief
38  **
39  ** Parameters :
40  ** NAME - DESCRIPTION
41  ** @param
42  ** isf_SensorHandle_t *pSensorHandle
43  ** @return
44  ** isf_dsa_status_t -
45  ** ===================================================================
46  */
48 
49 /*
50  ** ===================================================================
51  ** Method : fsl_mma8491q_i2c_3D_accel_ValidateSettings
52  ** @brief
53  **
54  ** Parameters :
55  ** NAME - DESCRIPTION
56  ** @param
57  ** isf_SensorHandle_t *pSensorHandle
58  ** @param
59  ** isf_SubscriptionSettings_t *pSettings
60  ** @return
61  ** isf_dsa_status_t -
62  ** ===================================================================
63  */
65 
66 /*
67  ** ===================================================================
68  ** Method : fsl_mma8491q_i2c_3D_accel_Configure
69  ** @brief
70  **
71  ** Parameters :
72  ** NAME - DESCRIPTION
73  ** @param
74  ** isf_SensorHandle_t *pSensorHandle
75  ** @param
76  ** isf_SubscriptionSettings_t *pConfigSettings
77  ** @return
78  ** isf_dsa_status_t -
79  ** ===================================================================
80  */
82 
83 /*
84  ** ===================================================================
85  ** Method : fsl_mma8491q_i2c_3D_accel_StartData
86  ** @brief
87  **
88  ** Parameters :
89  ** NAME - DESCRIPTION
90  ** @param
91  ** isf_SensorHandle_t *pSensorHandle
92  ** @return
93  ** isf_dsa_status_t -
94  ** ===================================================================
95  */
97 
98 /*
99  ** ===================================================================
100  ** Method : fsl_mma8491q_i2c_3D_accel_EndData
101  ** @brief
102  **
103  ** Parameters :
104  ** NAME - DESCRIPTION
105  ** @param
106  ** isf_SensorHandle_t *pSensorHandle
107  ** @return
108  ** isf_dsa_status_t -
109  ** ===================================================================
110  */
112 
113 /*
114  ** ===================================================================
115  ** Method : fsl_mma8491q_i2c_3D_accel_Calibrate
116  ** @brief
117  **
118  ** Parameters :
119  ** NAME - DESCRIPTION
120  ** @param
121  ** isf_SensorHandle_t *pSensorHandle
122  ** @return
123  ** isf_dsa_status_t -
124  ** ===================================================================
125  */
127 
128 /*
129  ** ===================================================================
130  ** Method : fsl_mma8491q_i2c_3D_accel_Shutdown
131  ** @brief
132  **
133  ** Parameters :
134  ** NAME - DESCRIPTION
135  ** @param
136  ** isf_SensorHandle_t *pSensorHandle
137  ** @return
138  ** isf_dsa_status_t -
139  ** ===================================================================
140  */
142 
143 /*
144  ** ===================================================================
145  ** Method : fsl_mma8491q_i2c_3D_accel_Convert
146  ** @brief The DSA interface conversion function to convert native samples to specified standard types
147  **
148  ** Parameters :
149  ** NAME - DESCRIPTION
150  ** @param
151  ** isf_SensorHandle_t *pSensorHandle
152  ** @return
153  ** void -
154  ** ===================================================================
155  */
156 isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Convert(volatile isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *nativeSample, void *convertedSample, int32 *numBytes );
157 /*
158  ** ===================================================================
159  ** Method : fsl_mma8491q_i2c_3D_accel_PeriodicCallback (component ISFDSA)
160  ** @brief The periodic callback triggered at sampling rate.
161  **
162  ** Parameters :
163  ** NAME - DESCRIPTION
164  ** @param
165  ** isf_SensorHandle_t *pSensorHandle
166  ** @return
167  ** void -
168  ** ===================================================================
169  */
170 void fsl_mma8491q_i2c_3D_accel_PeriodicCallback(void* pSensorHandle);
171 
172 /*
173  ** ===================================================================
174  ** Method : fsl_mma8491q_read_data_OneShotCallback (component ISFDSA)
175  ** @brief The One Shot callback triggered by the periodic callback for collecting data after a specific delay.
176  **
177  ** Parameters :
178  ** NAME - DESCRIPTION
179  ** @param
180  ** isf_SensorHandle_t *pSensorHandle
181  ** @return
182  ** void -
183  ** ===================================================================
184  */
185 void fsl_mma8491q_read_data_OneShotCallback(void* pSensorHandle);
186 
187 #endif
188 /* END FSL_MMA8491Q_I2C_3D_ACCEL_H_ */
189 /*!
190 ** @}
191 */
isf_status_t fsl_mma8491q_i2c_3D_accel_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
unsigned char uint8
Definition: isf_types.h:76
uint32 timestamp
Time stamp value in micro-seconds.
isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Shutdown(isf_SensorHandle_t *pSensorHandle)
This defines the DSA sensor device handle structure used to invoke the adapter access functions...
uint8 yOut
The Tilt Y data from the sensor.
isf_status_t fsl_mma8491q_i2c_3D_accel_EndData(isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
isf_SensorTypes_t
uint8 xOut
The Tilt X data from the sensor.
int32 isf_dsa_status_t
This is the Sensor Manager API return type definition.
signed short int int16
Definition: isf_types.h:73
void fsl_mma8491q_i2c_3D_accel_PeriodicCallback(void *pSensorHandle)
enum isf_dsa_result_enums isf_dsa_result_types_t
isf_status_t fsl_mma8491q_i2c_3D_accel_StartData(isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
isf_SensorDataTypes_t
Main ISF header file. Contains code common to all ISF components.
uint8 zOut
The Tilt Z data from the sensor.
MMA8491Q data buffer format.
signed long int int32
Definition: isf_types.h:74
int32 isf_status_t
ISF return status type.
Definition: isf.h:76
isf_SensorDataTypes_t mma8491q_SupportedDataTypes[]
This defines the DSA sensor configuration parameter structure configuring the sensor settings by a su...
isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Convert(volatile isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *nativeSample, void *convertedSample, int32 *numBytes)
isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Initialize(isf_SensorHandle_t *pSensorHandle)
unsigned long int uint32
Definition: isf_types.h:78
void fsl_mma8491q_read_data_OneShotCallback(void *pSensorHandle)
The isf_sm_types.h contains the collection of type definitions used in the Sensor Manager Interface a...
isf_SensorTypes_t mma8491q_SupportedSensorTypes[]
Supported sensor and data types for MMA8491q.