| 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_dsa_utils.h
Go to the documentation of this file.
1 /*
2 * @file isf_dsa_utils.h
3 *
4 * @brief The \b isf_dsa_utils.h file contains declarations for the static
5 * ISF Digital Sensor Abstraction utility functions
6 *
7 * @copyright Copyright (c) 2014, Freescale Semiconductor, Inc.
8 */
9
10 #ifndef ISF_DSA_UTILS_H_
11 #define ISF_DSA_UTILS_H_
12
13 #include "isf_dsa_adapter.h"
14 #include "isf_sensor_types.h"
15
16 /*
17 ** The following functions are available to be called for all sensor adapters implementing the
18 ** ISF DSA interface.
19 */
20
21 /*!
22 * @brief This function returns the supported sensor types for the specified adapter.
23 * The first call to isf_dsa_get_sensor_types() should be made with *sensorListIdx == 0.
24 The function automatically increments the sensorListIdx value allowing subsequent calls
25 to return additional supported types.
26 The function sets sensorListIdx back to zero when no more new sensor types are available.
27 This allows calls in the form of:
28 uint8 sensorListIdx = 0;
29 isf_dsa_SensorType_t sensorType;
30
31 do {
32 sensorType = isf_dsa_get_sensor_types(isf_dsa_Adapter_t *adapter, &sensorListIdx );
33 handleSensorType(sensorType);
34 while (!sensorListIdx);
35 */
36 isf_SensorTypes_t isf_dsa_get_sensor_types ( isf_dsa_Adapter_t *adapter, uint8 *sensorListIdx);
37
38
39
40 /*!
41 * @brief This function returns the supported sensor data types for the specified adapter.
42 * The first call to isf_dsa_get_sensor_data_types() should be made with sensorListIdx == 0.
43 The function automatically increments the sensorListIdx value allowing subsequent calls
44 to return additional supported types.
45 The function sets sensorListIdx back to zero when no more new sensor types are available.
46 This allows calls in the form of:
47 uint8 sensorListIdx = 0;
48 isf_dsa_SensorDataType_t sensorDataType;
49
50 do {
51 sensorDataType = isf_dsa_get_sensor_data_types(isf_dsa_Adapter_t *adapter, &sensorListIdx );
52 handleSensorDataType(sensorDataType);
53 } while (!sensorListIdx);
54 */
55 isf_SensorDataTypes_t isf_dsa_get_sensor_data_types ( isf_dsa_Adapter_t *adapter, uint8 *sensorDataListIdx);
56
57 /*!
58 * @brief Returns the number of bytes required to hold the sensor's native data type.
59 Note that using the sensor's native data type violates the sensor type abstraction
60 and potentially limits any code using it to working with only that particular sensor.
61 It is recognized, however, that having access to the native data type may be useful in some
62 applications and this is why support for it is made available here.
63 */
64 uint32 isf_dsa_get_sizeof_native_data_type( isf_dsa_Adapter_t *adapter);
65
66
67 /*!
68 * @brief Returns a pointer to an adapter's Convert function which may be used to convert
69 * native data samples to supported standard data types.
70 */
71 isf_dsa_data_converter_t *isf_dsa_get_data_converter ( isf_dsa_Adapter_t *adapter );
72
73
74 /*!
75 * @brief Returns a pointer to an adapter's Info structure that contains things like
76 * the adapter identifier
77 */
78 const isf_dsa_DeviceInfoBlock_t *isf_dsa_get_info ( isf_dsa_Adapter_t *adapter );
79
80
81 #endif /* ISF_DSA_UTILS_H_ */
uint8
unsigned char uint8
This defines uint8 as unsigned char.
Definition: isf_types.h:18
isf_dsa_adapter.h
isf_dsa_get_sensor_types
isf_SensorTypes_t isf_dsa_get_sensor_types(isf_dsa_Adapter_t *adapter, uint8 *sensorListIdx)
This function returns the supported sensor types for the specified adapter. The first call to isf_dsa...
Definition: isf_dsa_utils.c:35
isf_dsa_get_data_converter
isf_dsa_data_converter_t * isf_dsa_get_data_converter(isf_dsa_Adapter_t *adapter)
Returns a pointer to an adapter's Convert function which may be used to convert native data samples t...
Definition: isf_dsa_utils.c:90
isf_dsa_data_converter_t
isf_dsa_status_t( isf_dsa_data_converter_t)(volatile isf_SensorHandle_t *, isf_SensorDataTypes_t, isf_dsa_result_types_t, void *, void *, int32 *numBytes)
Definition: isf_dsa_adapter.h:122
isf_dsa_DeviceInfoBlock_st
This defines the DSA adapter device information block.
Definition: isf_dsa_adapter.h:70
uint32
unsigned long uint32
This defines uint32 as unsigned long.
Definition: isf_types.h:36
isf_dsa_get_sensor_data_types
isf_SensorDataTypes_t isf_dsa_get_sensor_data_types(isf_dsa_Adapter_t *adapter, uint8 *sensorDataListIdx)
This function returns the supported sensor data types for the specified adapter. The first call to is...
Definition: isf_dsa_utils.c:62
isf_SensorTypes_t
isf_SensorTypes_t
Definition: isf_sensor_types.h:14
isf_sensor_types.h
The isf_sensor_types.h contains the enumerated list of sensor types used by ISF.
isf_dsa_Adapter_st
This defines the DSA adapter structure required for static initialization of the concrete instance of...
Definition: isf_dsa_adapter.h:144
isf_SensorDataTypes_t
isf_SensorDataTypes_t
Definition: isf_sensor_types.h:61
isf_dsa_get_info
const isf_dsa_DeviceInfoBlock_t * isf_dsa_get_info(isf_dsa_Adapter_t *adapter)
Returns a pointer to an adapter's Info structure that contains things like the adapter identifier...
Definition: isf_dsa_utils.c:100
isf_dsa_get_sizeof_native_data_type
uint32 isf_dsa_get_sizeof_native_data_type(isf_dsa_Adapter_t *adapter)
Returns the number of bytes required to hold the sensor's native data type. Note that using the senso...
Definition: isf_dsa_utils.c:80
- © Freescale Semiconductor, Inc. 2015. All Rights Reserved.