ISF  2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
isf_sensors.h
Go to the documentation of this file.
1 /**
2  * @file isf_sensors.h
3  *
4  * @brief \b isf_sensors.h contains the ISF Generic Sensor definitions and data structures
5  * required when a client task accesses accelerometer sensor data via the Sensor Manager API.
6  *
7  * @copyright Copyright (c) 2015, Freescale Semiconductor, Inc.
8  */
9 
10 #ifndef SENSORS_H_
11 #define SENSORS_H_
12 
13 #include <isf_types.h>
14 #include <isf_devmsg.h>
15 #include <isf_bm.h>
16 #include <isf_dsa_adapter.h>
17 
18 /* @brief Define the sensor operational modes */
19 typedef enum
20 {
21  SENSOR_BOOT, // Sensor is powered down
22  SENSOR_STANDBY, // Sensor is in low-power standby
23  SENSOR_READY, // Sensor is ready for measurement
24  SENSOR_ACTIVE // Sensor is actively measurementing
26 
27 /**
28  * @brief Define the sensor internal states.
29  */
30 enum{
35 };
36 
37 /**
38  * @brief Define the sensor error status values.
39  */
40 enum{
44 };
45 
46 /**
47  * @brief Define the sensor device descriptor.
48  */
50 {
51  dm_ChannelDescriptor_t cDescriptor; /*!< Device Messaging channel descriptor */
52  dm_DeviceDescriptor_t deviceHandle; /*!< Device messaging device handle. */
53  bm_callback_token_t token; /*!< Bus Manager handle */
54  semaphore_t deviceSemaphore; /*!< Task synchronization mechanism for this data structure. */
55  void *pLock; /*!< Handle for internal lock */
56  void *pCurrentSample; /*!< Pointer to the sensor current sample buffer. */
57  uint16 dataBlockSize; /*!< Sensor data buffer size */
58  uint16 timeOut; /*!< Device timeout in microseconds */
59  uint8 skipFramecnt; /*!< Bad frames to skip */
61 
62 #endif /* SENSORS_H_ */
unsigned char uint8
Definition: isf_types.h:76
API definitions, types, and macros for the Intelligent Sensing Framework (ISF) Bus Manager (BM)...
struct DeviceDescriptor_struct DeviceDescriptor_t
Define the sensor device descriptor.
dm_DeviceDescriptor_t deviceHandle
Definition: isf_sensors.h:52
Define the sensor device descriptor.
Definition: isf_sensors.h:49
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
dm_ChannelDescriptor_t cDescriptor
Definition: isf_sensors.h:51
The isf_types.h file contains the ISF data type definitions and some of the globally used macros...
sensor_mode_t
Definition: isf_sensors.h:19
unsigned short int uint16
Definition: isf_types.h:77
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...
semaphore_t deviceSemaphore
Definition: isf_sensors.h:54
This structure is a declaration of a channel descriptor type.
Definition: isf_devmsg.h:50
bm_callback_token_t token
Definition: isf_sensors.h:53