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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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.
28 } mma8491q_DataBuffer_t;
29
30 /*! @brief Supported sensor and data types for MMA8491q */
31 extern isf_SensorTypes_t mma8491q_SupportedSensorTypes[];
32 extern isf_SensorDataTypes_t mma8491q_SupportedDataTypes[];
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 */
47 isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Initialize(isf_SensorHandle_t *pSensorHandle);
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 */
64 isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings);
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 */
81 isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings);
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 */
96 isf_status_t fsl_mma8491q_i2c_3D_accel_StartData(isf_SensorHandle_t *pSensorHandle);
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 */
111 isf_status_t fsl_mma8491q_i2c_3D_accel_EndData(isf_SensorHandle_t *pSensorHandle);
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 */
126 isf_status_t fsl_mma8491q_i2c_3D_accel_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData );
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 */
141 isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Shutdown(isf_SensorHandle_t *pSensorHandle );
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 */
fsl_mma8491q_i2c_3D_accel_Calibrate
isf_status_t fsl_mma8491q_i2c_3D_accel_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
Definition: fsl_mma8491q_i2c_3D_accel.c:249
uint8
unsigned char uint8
Definition: isf_types.h:76
isf_dsa_adapter.h
mma8491q_DataBuffer_t::timestamp
uint32 timestamp
Time stamp value in micro-seconds.
Definition: fsl_mma8491q_i2c_3D_accel.h:23
fsl_mma8491q_i2c_3D_accel_Shutdown
isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Shutdown(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mma8491q_i2c_3D_accel.c:360
isf_SensorHandle_st
This defines the DSA sensor device handle structure used to invoke the adapter access functions...
Definition: isf_dsa_adapter.h:107
mma8491q_DataBuffer_t::yOut
uint8 yOut
The Tilt Y data from the sensor.
Definition: fsl_mma8491q_i2c_3D_accel.h:26
fsl_mma8491q_i2c_3D_accel_EndData
isf_status_t fsl_mma8491q_i2c_3D_accel_EndData(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mma8491q_i2c_3D_accel.c:307
fsl_mma8491q_i2c_3D_accel_ValidateSettings
isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
Definition: fsl_mma8491q_i2c_3D_accel.c:158
isf_SensorTypes_t
isf_SensorTypes_t
Definition: isf_sensor_types.h:14
mma8491q_DataBuffer_t::xOut
uint8 xOut
The Tilt X data from the sensor.
Definition: fsl_mma8491q_i2c_3D_accel.h:25
isf_dsa_status_t
int32 isf_dsa_status_t
This is the Sensor Manager API return type definition.
Definition: isf_dsa_adapter.h:21
int16
signed short int int16
Definition: isf_types.h:73
fsl_mma8491q_i2c_3D_accel_PeriodicCallback
void fsl_mma8491q_i2c_3D_accel_PeriodicCallback(void *pSensorHandle)
Definition: fsl_mma8491q_i2c_3D_accel.c:396
isf_dsa_result_types_t
enum isf_dsa_result_enums isf_dsa_result_types_t
fsl_mma8491q_i2c_3D_accel_StartData
isf_status_t fsl_mma8491q_i2c_3D_accel_StartData(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mma8491q_i2c_3D_accel.c:260
fsl_mma8491q_i2c_3D_accel_Configure
isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
Definition: fsl_mma8491q_i2c_3D_accel.c:169
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.
mma8491q_DataBuffer_t::zOut
uint8 zOut
The Tilt Z data from the sensor.
Definition: fsl_mma8491q_i2c_3D_accel.h:27
mma8491q_DataBuffer_t
MMA8491Q data buffer format.
Definition: fsl_mma8491q_i2c_3D_accel.h:21
int32
signed long int int32
Definition: isf_types.h:74
isf_status_t
int32 isf_status_t
ISF return status type.
Definition: isf.h:76
mma8491q_SupportedDataTypes
isf_SensorDataTypes_t mma8491q_SupportedDataTypes[]
Definition: fsl_mma8491q_i2c_3D_accel.c:61
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_mma8491q_i2c_3D_accel_Convert
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)
Definition: fsl_mma8491q_i2c_3D_accel.c:531
fsl_mma8491q_i2c_3D_accel_Initialize
isf_dsa_status_t fsl_mma8491q_i2c_3D_accel_Initialize(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mma8491q_i2c_3D_accel.c:64
uint32
unsigned long int uint32
Definition: isf_types.h:78
fsl_mma8491q_read_data_OneShotCallback
void fsl_mma8491q_read_data_OneShotCallback(void *pSensorHandle)
Definition: fsl_mma8491q_i2c_3D_accel.c:432
isf_sm_types.h
The isf_sm_types.h contains the collection of type definitions used in the Sensor Manager Interface a...
mma8491q_SupportedSensorTypes
isf_SensorTypes_t mma8491q_SupportedSensorTypes[]
Supported sensor and data types for MMA8491q.
Definition: fsl_mma8491q_i2c_3D_accel.c:60
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.