| ISF 2.1 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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) 2014, 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
25 } sensor_mode_t;
26
27 /**
28 * @brief Define the sensor internal states.
29 */
30 enum{
31 SENSOR_STATE_UNINITIALIZED,
32 SENSOR_STATE_INITIALIZED,
33 SENSOR_STATE_CONFIGURED,
34 SENSOR_STATE_STARTED,
35 };
36
37 /**
38 * @brief Define the sensor error status values.
39 */
40 enum{
41 SENSOR_ERROR_CHECKID,
42 SENSOR_ERROR_SETMODE,
43 SENSOR_ERROR_GETDATA,
44 };
45
46 /**
47 * @brief Define the sensor device descriptor.
48 */
49 typedef struct DeviceDescriptor_struct
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 LWSEM_STRUCT 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 */
60 } DeviceDescriptor_t;
61
62 #endif /* SENSORS_H_ */
uint8
unsigned char uint8
This defines uint8 as unsigned char.
Definition: isf_types.h:18
isf_dsa_adapter.h
SENSOR_ERROR_SETMODE
Definition: isf_sensors.h:42
SENSOR_STANDBY
Definition: isf_sensors.h:22
SENSOR_ACTIVE
Definition: isf_sensors.h:24
isf_bm.h
API definitions, types, and macros for the Intelligent Sensing Framework (ISF) Bus Manager (BM)...
DeviceDescriptor_t
struct DeviceDescriptor_struct DeviceDescriptor_t
Define the sensor device descriptor.
DeviceDescriptor_struct::deviceHandle
dm_DeviceDescriptor_t deviceHandle
Definition: isf_sensors.h:52
DeviceDescriptor_struct::skipFramecnt
uint8 skipFramecnt
Definition: isf_sensors.h:59
DeviceDescriptor_struct::dataBlockSize
uint16 dataBlockSize
Definition: isf_sensors.h:57
DeviceDescriptor_struct
Define the sensor device descriptor.
Definition: isf_sensors.h:49
DeviceDescriptor_struct::deviceSemaphore
LWSEM_STRUCT deviceSemaphore
Definition: isf_sensors.h:54
SENSOR_STATE_STARTED
Definition: isf_sensors.h:34
SENSOR_BOOT
Definition: isf_sensors.h:21
SENSOR_STATE_CONFIGURED
Definition: isf_sensors.h:33
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
DeviceDescriptor_struct::cDescriptor
dm_ChannelDescriptor_t cDescriptor
Definition: isf_sensors.h:51
isf_types.h
The isf_types.h file contains the ISF data type definitions and some of the globally used macros...
SENSOR_STATE_INITIALIZED
Definition: isf_sensors.h:32
DeviceDescriptor_struct::timeOut
uint16 timeOut
Definition: isf_sensors.h:58
sensor_mode_t
sensor_mode_t
Definition: isf_sensors.h:19
uint16
unsigned short uint16
This defines uint16 as unsigned short.
Definition: isf_types.h:27
SENSOR_STATE_UNINITIALIZED
Definition: isf_sensors.h:31
DeviceDescriptor_struct::pCurrentSample
void * pCurrentSample
Definition: isf_sensors.h:56
DeviceDescriptor_struct::pLock
void * pLock
Definition: isf_sensors.h:55
dm_DeviceDescriptor_struct
This structure defines a handle for the device.
Definition: isf_devmsg.h:61
SENSOR_ERROR_CHECKID
Definition: isf_sensors.h:41
isf_devmsg.h
isf_devmsg.h defines the API definitions and types for the Intelligent Sensing (ISF) Device Messaging...
SENSOR_READY
Definition: isf_sensors.h:23
dm_ChannelDescriptor_struct
This structure is a declaration of a channel descriptor type.
Definition: isf_devmsg.h:50
SENSOR_ERROR_GETDATA
Definition: isf_sensors.h:43
DeviceDescriptor_struct::token
bm_callback_token_t token
Definition: isf_sensors.h:53
- © Freescale Semiconductor, Inc. 2015. All Rights Reserved.