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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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 */
32 } fxlc95000_DataBuffer_t;
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 */
44 } fxlc95000_DeviceDescriptor_t;
45
46 /*! @brief Supported sensor and data types for FXLC95000 */
47 extern isf_SensorTypes_t fxlc95000_SupportedSensorTypes[];
48 extern isf_SensorDataTypes_t fxlc95000_SupportedDataTypes[];
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 */
63 isf_dsa_status_t fsl_fxlc95000_Initialize( isf_SensorHandle_t *pSensorHandle);
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 */
80 isf_dsa_status_t fsl_fxlc95000_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSubSettings);
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 */
97 isf_dsa_status_t fsl_fxlc95000_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings);
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 */
112 isf_dsa_status_t fsl_fxlc95000_StartData(isf_SensorHandle_t *pSensorHandle );
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 */
127 isf_dsa_status_t fsl_fxlc95000_EndData(isf_SensorHandle_t *pSensorHandle );
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 */
157 isf_dsa_status_t fsl_fxlc95000_Shutdown(isf_SensorHandle_t *pSensorHandle );
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 */
206 isf_dsa_status_t fsl_fxlc95000_Convert
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 */
uint8
unsigned char uint8
Definition: isf_types.h:76
fsl_fxlc95000_Calibrate
isf_dsa_status_t fsl_fxlc95000_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
Definition: fsl_fxlc95000_i2cspi_pedo.c:376
isf_dsa_adapter.h
fsl_fxlc95000_Flash
isf_dsa_status_t fsl_fxlc95000_Flash(isf_SensorHandle_t *pSensorHandle, void *pFlashData, uint8 numBytes)
Definition: fsl_fxlc95000_i2cspi_pedo.c:530
fxlc95000_SupportedDataTypes
isf_SensorDataTypes_t fxlc95000_SupportedDataTypes[]
Definition: fsl_fxlc95000_i2cspi_pedo.c:28
isf_bm.h
API definitions, types, and macros for the Intelligent Sensing Framework (ISF) Bus Manager (BM)...
isf_SensorHandle_st
This defines the DSA sensor device handle structure used to invoke the adapter access functions...
Definition: isf_dsa_adapter.h:107
fxlc95000_DeviceDescriptor_t::deviceHandle
dm_DeviceDescriptor_t deviceHandle
Definition: fsl_fxlc95000_i2cspi_pedo.h:37
fxlc95000_DataBuffer_t
This structure defines the dummy DSA data buffer format.
Definition: fsl_fxlc95000_i2cspi_pedo.h:28
fsl_fxlc95000_Convert
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.
Definition: fsl_fxlc95000_i2cspi_pedo.c:652
fsl_fxlc95000_Configure
isf_dsa_status_t fsl_fxlc95000_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
Definition: fsl_fxlc95000_i2cspi_pedo.c:166
fxlc95000_DeviceDescriptor_t::localCfgBufSize
uint8 localCfgBufSize
Definition: fsl_fxlc95000_i2cspi_pedo.h:42
bm_callback_token_t
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
fsl_fxlc95000_EndData
isf_dsa_status_t fsl_fxlc95000_EndData(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_fxlc95000_i2cspi_pedo.c:315
isf_SensorTypes_t
isf_SensorTypes_t
Definition: isf_sensor_types.h:14
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
fxlc95000_SupportedSensorTypes
isf_SensorTypes_t fxlc95000_SupportedSensorTypes[]
Supported sensor and data types for FXLC95000.
Definition: fsl_fxlc95000_i2cspi_pedo.c:27
isf_dsa_result_types_t
enum isf_dsa_result_enums isf_dsa_result_types_t
fxlc95000.h
The fxlc95000.h contains the FXLC95000 Intelligent Sensor register definitions, access macros...
isf_SensorDataTypes_t
isf_SensorDataTypes_t
Definition: isf_sensor_types.h:61
fxlc95000_DeviceDescriptor_t::token
bm_callback_token_t token
Definition: fsl_fxlc95000_i2cspi_pedo.h:39
fsl_fxlc95000_ValidateSettings
isf_dsa_status_t fsl_fxlc95000_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSubSettings)
Definition: fsl_fxlc95000_i2cspi_pedo.c:133
isf.h
Main ISF header file. Contains code common to all ISF components.
int32
signed long int int32
Definition: isf_types.h:74
fxlc95000_DataBuffer_t::temp
int16 temp
Definition: fsl_fxlc95000_i2cspi_pedo.h:31
fxlc95000_appConfigRegister_t
Definition: fxlc95000.h:30
fsl_fxlc95000_StartData
isf_dsa_status_t fsl_fxlc95000_StartData(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_fxlc95000_i2cspi_pedo.c:256
fxlc95000_DeviceDescriptor_t::pCurrentSample
fxlc95000_DataBuffer_t * pCurrentSample
Definition: fsl_fxlc95000_i2cspi_pedo.h:40
fsl_fxlc95000_Initialize
isf_dsa_status_t fsl_fxlc95000_Initialize(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_fxlc95000_i2cspi_pedo.c:56
fxlc95000_DeviceDescriptor_t::deviceSemaphore
semaphore_t deviceSemaphore
Definition: fsl_fxlc95000_i2cspi_pedo.h:38
fsl_fxlc95000_Shutdown
isf_dsa_status_t fsl_fxlc95000_Shutdown(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_fxlc95000_i2cspi_pedo.c:396
fxlc95000_DataBuffer_t::timeStamp
uint32 timeStamp
Definition: fsl_fxlc95000_i2cspi_pedo.h:29
fxlc95000_DeviceDescriptor_t::cDescriptor
dm_ChannelDescriptor_t cDescriptor
Definition: fsl_fxlc95000_i2cspi_pedo.h:36
fsl_fxlc95000_PeriodicCallback
void fsl_fxlc95000_PeriodicCallback(void *pSensorHandle)
Definition: fsl_fxlc95000_i2cspi_pedo.c:431
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
fxlc95000_DeviceDescriptor_t
Definition: fsl_fxlc95000_i2cspi_pedo.h:35
uint32
unsigned long int uint32
Definition: isf_types.h:78
fxlc95000_DeviceDescriptor_t::localCfgBuffer
fxlc95000_appConfigRegister_t localCfgBuffer
Definition: fsl_fxlc95000_i2cspi_pedo.h:41
dm_DeviceDescriptor_struct
This structure defines a handle for the device.
Definition: isf_devmsg.h:61
isf_devmsg.h
isf_devmsg.h defines the API definitions and types for the Intelligent Sensing (ISF) Device Messaging...
isf_sm_types.h
The isf_sm_types.h contains the collection of type definitions used in the Sensor Manager Interface a...
dm_ChannelDescriptor_struct
This structure is a declaration of a channel descriptor type.
Definition: isf_devmsg.h:50
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.