ISF  2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
fsl_fxlc95000_i2cspi_pedo.h
Go to the documentation of this file.
1 /**
2 ** @file fsl_fxlc95000.h
3 ** @brief The \b fsl_fxlc95000.h file contains the definitions and functions supporting the FXLC95000 Intelligent Sensor Adapter
4  * @copyright Copyright (c) 2015, Freescale Semiconductor, Inc.
5 ** @version 01.00
6 ** @brief
7 **
8 */
9 /*!
10 ** @addtogroup fsl_fxlc95000_module fsl_fxlc95000 module documentation
11 ** @{
12 */
13 
14 #ifndef FSL_FXLC95000_I2CSPI_PEDO_H_
15 #define FSL_FXLC95000_I2CSPI_PEDO_H_
16 
17 /* Include shared modules, which are used for whole project */
18 #include "isf.h"
19 
20 #include "isf_sm_types.h"
21 #include "isf_dsa_adapter.h"
22 #include "isf_devmsg.h"
23 #include "isf_bm.h"
24 #include "fxlc95000.h"
25 
26 
27 /*! @brief This structure defines the dummy DSA data buffer format.*/
28 typedef struct {
29  uint32 timeStamp; /*!< The time stamp for the data packet.*/
30  int16 accel[3]; /*!< The accelerometer data */
31  int16 temp; /*!< The temperature data */
33 
34 
35 typedef struct {
36  dm_ChannelDescriptor_t cDescriptor; /*!< Device Messaging channel descriptor */
37  dm_DeviceDescriptor_t deviceHandle; /*!< Device messaging device handle. */
38  semaphore_t deviceSemaphore; /*!< Task synchronization mechanism for this data structure. */
39  bm_callback_token_t token; /*!< Bus Manager handle */
40  fxlc95000_DataBuffer_t* pCurrentSample; /*!< Holds the most recently read sample */
41  fxlc95000_appConfigRegister_t localCfgBuffer; /*!< Hold a local copy of the FXLC95000 App config registers */
42  uint8 localCfgBufSize; /*!< Number of bytes on the localCfgBuffer array */
43  uint8 tempReadBuffer[32]; /*!< scratch buffer for result of miscellaneous reads */
45 
46 /*! @brief Supported sensor and data types for FXLC95000 */
49 
50 /*
51 ** ===================================================================
52 ** Method : fsl_fxlc95000_Initialize (component ISFDSA)
53 ** @brief
54 **
55 ** Parameters :
56 ** NAME - DESCRIPTION
57 ** @param
58 ** void* pSensorHandle -
59 ** @return
60 ** int32_t -
61 ** ===================================================================
62 */
64 
65 /*
66 ** ===================================================================
67 ** Method : fsl_fxlc95000_ValidateSettings (component ISFDSA)
68 ** @brief
69 **
70 ** Parameters :
71 ** NAME - DESCRIPTION
72 ** @param
73 ** void* pSensorHandle -
74 ** @param
75 ** void* pSettings -
76 ** @return
77 ** int32_t -
78 ** ===================================================================
79 */
81 
82 /*
83 ** ===================================================================
84 ** Method : fsl_fxlc95000_Configure (component ISFDSA)
85 ** @brief
86 **
87 ** Parameters :
88 ** NAME - DESCRIPTION
89 ** @param
90 ** void* pSensorHandle -
91 ** @param
92 ** void* pConfigSettings -
93 ** @return
94 ** int32_t -
95 ** ===================================================================
96 */
98 
99 /*
100 ** ===================================================================
101 ** Method : fsl_fxlc95000_StartData (component ISFDSA)
102 ** @brief
103 **
104 ** Parameters :
105 ** NAME - DESCRIPTION
106 ** @param
107 ** void* pSensorHandle -
108 ** @return
109 ** int32_t -
110 ** ===================================================================
111 */
113 
114 /*
115 ** ===================================================================
116 ** Method : fsl_fxlc95000_EndData (component ISFDSA)
117 ** @brief
118 **
119 ** Parameters :
120 ** NAME - DESCRIPTION
121 ** @param
122 ** void* pSensorHandle -
123 ** @return
124 ** int32_t -
125 ** ===================================================================
126 */
128 
129 /*
130 ** ===================================================================
131 ** Method : fsl_fxlc95000_Calibrate (component ISFDSA)
132 ** @brief
133 **
134 ** Parameters :
135 ** NAME - DESCRIPTION
136 ** @param
137 ** void* pSensorHandle -
138 ** @return
139 ** int32_t -
140 ** ===================================================================
141 */
142 isf_dsa_status_t fsl_fxlc95000_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData );
143 
144 /*
145 ** ===================================================================
146 ** Method : fsl_fxlc95000_Shutdown (component ISFDSA)
147 ** @brief
148 **
149 ** Parameters :
150 ** NAME - DESCRIPTION
151 ** @param
152 ** void* pSensorHandle -
153 ** @return
154 ** int32_t -
155 ** ===================================================================
156 */
158 
159 /*
160 ** ===================================================================
161 ** Method : fsl_fxlc95000_PeriodicCallback (component ISFDSA)
162 ** @brief
163 **
164 ** Parameters :
165 ** NAME - DESCRIPTION
166 ** @param
167 ** void* pSensorHandle -
168 ** @return
169 ** void -
170 ** ===================================================================
171 */
172 void fsl_fxlc95000_PeriodicCallback(void *pSensorHandle);
173 
174 /*
175 ** ===================================================================
176  ** Method : fsl_fxlc95000_Flash (component ISFDSA)
177  ** @brief
178  **
179  ** Parameters :
180  ** NAME - DESCRIPTION
181  ** @param
182  ** void* pSensorHandle -
183  ** @param
184  ** void* pFlashData -
185  ** @param
186  ** uint8 numBytes -
187  ** @return
188  ** int32_t -
189 ** ===================================================================
190 */
191 isf_dsa_status_t fsl_fxlc95000_Flash(isf_SensorHandle_t *pSensorHandle, void *pFlashData, uint8 numBytes);
192 
193 /*
194 ** ===================================================================
195 ** Method : fsl_fxlc95000_Convert (component ISFDSA)
196 ** @brief
197 **
198 ** Parameters :
199 ** NAME - DESCRIPTION
200 ** @param
201 ** void* pSensorHandle -
202 ** @return
203 ** void -
204 ** ===================================================================
205 */
207  (
208  volatile isf_SensorHandle_t *pSensorHandle,
209  isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType,
210  void *pNativeSample,
211  void *pConvertedSample,
212  int32 *numBytes
213  );
214 
215 #endif
216 /* END FSL_FXLC95000_H_ */
217 /*!
218 ** @}
219 */
unsigned char uint8
Definition: isf_types.h:76
isf_dsa_status_t fsl_fxlc95000_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
isf_dsa_status_t fsl_fxlc95000_Flash(isf_SensorHandle_t *pSensorHandle, void *pFlashData, uint8 numBytes)
isf_SensorDataTypes_t fxlc95000_SupportedDataTypes[]
API definitions, types, and macros for the Intelligent Sensing Framework (ISF) Bus Manager (BM)...
This defines the DSA sensor device handle structure used to invoke the adapter access functions...
This structure defines the dummy DSA data buffer format.
isf_dsa_status_t fsl_fxlc95000_Convert(volatile isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *pNativeSample, void *pConvertedSample, int32 *numBytes)
This function converts the raw sample data to the desired output type.
isf_dsa_status_t fsl_fxlc95000_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
uint32 bm_callback_token_t
This type defines the Bus Manager token. Each callback registered with the Bus Manager receives a uni...
Definition: isf_bm.h:79
isf_dsa_status_t fsl_fxlc95000_EndData(isf_SensorHandle_t *pSensorHandle)
isf_SensorTypes_t
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 fxlc95000_SupportedSensorTypes[]
Supported sensor and data types for FXLC95000.
enum isf_dsa_result_enums isf_dsa_result_types_t
The fxlc95000.h contains the FXLC95000 Intelligent Sensor register definitions, access macros...
isf_SensorDataTypes_t
isf_dsa_status_t fsl_fxlc95000_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSubSettings)
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_fxlc95000_StartData(isf_SensorHandle_t *pSensorHandle)
fxlc95000_DataBuffer_t * pCurrentSample
isf_dsa_status_t fsl_fxlc95000_Initialize(isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t fsl_fxlc95000_Shutdown(isf_SensorHandle_t *pSensorHandle)
void fsl_fxlc95000_PeriodicCallback(void *pSensorHandle)
This defines the DSA sensor configuration parameter structure configuring the sensor settings by a su...
unsigned long int uint32
Definition: isf_types.h:78
fxlc95000_appConfigRegister_t localCfgBuffer
This structure defines a handle for the device.
Definition: isf_devmsg.h:61
isf_devmsg.h defines the API definitions and types for the Intelligent Sensing (ISF) Device Messaging...
The isf_sm_types.h contains the collection of type definitions used in the Sensor Manager Interface a...
This structure is a declaration of a channel descriptor type.
Definition: isf_devmsg.h:50