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

- Main Page
- Modules
- Data Structures
- Files

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
fsl_Sensor_Analog_1_Functions module documentation

## Data Structures
struct | AnalogVoltagetoOutputConvTable_t
struct | Analog_1_device_t
| This structure stores sample Information necessary to communicate with non I2C slave device. More...
struct | Analog_1_DataBuffer_t
| This structure defines the dummy DSA data buffer format. More...
struct | Analog_1_SensorData_Fixed_t
struct | Analog_1_SensorData_Float_t
| Standard fixed type for three axis accelerometers. More...
struct | Analog_1_Sensor_Specific_Settings_t

## Macros
#define | Analog_1_CONVERT_FLOAT_FACTOR (1.0F/32767.0F)
#define | Analog_1_CONVERT_FIXED_FACTOR (32767)
#define | NUM_MESSAGES 64
#define | MSG_SIZE 1
#define | __fsl_Sensor_Analog_1_Functions_H_
#define | MAX_ADC_CHANNELS 6
#define | Analog_1_DATA_TYPE Analog_1_DataBuffer_t
#define | __fsl_Sensor_Analog_1_Functions_H__
#define | Analog_1_SET_FIELD(name, val) (((val)<<Analog_1_##name##_SHIFT)&(Analog_1_##name##_MASK))
#define | Analog_1_GET_FIELD(name, val) ((val&Analog_1_##name##_MASK)>>Analog_1_##name##_SHIFT)

## Typedefs
typedef int32 | Analog_1_Status_t
| SENSOR internal return codes. More...
typedef int32 | isf_Analog_1_fixed_data_t
typedef float | isf_Analog_1_float_data_t

## Enumerations
enum | { Analog_1_SUCCESS, Analog_1_DATA_OVERWRITE, Analog_1_ERROR }

## Functions
void | Analog_1__Void_ ()
isf_dsa_status_t | Analog_1_float_converter (Analog_1_Sensor_Specific_Settings_t *pSensorSpecificConfig, Analog_1_DataBuffer_t *nativeSample, void *vpConvertedSample)
isf_dsa_status_t | Analog_1_fixed_converter (Analog_1_Sensor_Specific_Settings_t *pSensorSpecificConfig, Analog_1_DataBuffer_t *nativeSample, void *vpConvertedSample)
isf_dsa_status_t | fsl_Sensor_Analog_1_Convert (isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *pNativeSample, void *pConvertedSample, int32_t *numBytes)
isf_dsa_status_t | fsl_Sensor_Analog_1_Configure (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
isf_dsa_status_t | fsl_Sensor_Analog_1_ValidateSettings (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
isf_dsa_status_t | fsl_Sensor_Analog_1_Initialize (isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t | fsl_Sensor_Analog_1_StartData (isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t | fsl_Sensor_Analog_1_EndData (isf_SensorHandle_t *pSensorHandle)
isf_dsa_status_t | fsl_Sensor_Analog_1_Shutdown (isf_SensorHandle_t *pSensorHandle)
void | Analog_1_fsl_Sensor_Generic_Analog_Convert (void *pSensorHandle, uint32_t convertToType, uint8_t resultType, void *pNativeSample, void *pConvertedSample, int32_t *numBytes, int8_t *retValue)
void | Analog_1_fsl_Sensor_Generic_AnalogCallback (void *pSensorHandle)
void | Analog_1_fsl_Sensor_Generic_Analog_Shutdown (void *pSensorHandle, int8_t *retValue)
void | Analog_1_fsl_Sensor_Generic_Analog_EndData (void *pSensorHandle, int8_t *retValue)
void | Analog_1_fsl_Sensor_Generic_Analog_StartData (void *pSensorHandle, int8_t *retValue)
void | Analog_1_fsl_Sensor_Generic_Analog_Configure (void *pSensorHandle, void *pSensorSettings, int8_t *retValue)
void | Analog_1_fsl_Sensor_Generic_Analog_ValidateSettings (void *pSensorHandle, void *pSensorSettings, int8_t *retValue)
void | Analog_1_fsl_Sensor_Generic_Analog_Initialize (void *pSensorHandle, int8_t *retValue)

## Variables
uint8_t | sensorType = 0
uint8_t | numGpios = 1
uint8_t | configuredADCh = 1
uint32_t | operating_mode
const Analog_1_device_t | Analog_1_DeviceInfo
| This allows access to the sensor communications specific configuration. More...
Analog_1_Sensor_Specific_Settings_t | Analog_1_Sensor_Specific_Config
| This allows access to the sensor specific configuration for the target sensor. More...
isf_SensorTypes_t | Analog_1_SupportedSensorTypes []
| Supported sensor and data types for the Sensor. More...
isf_SensorDataTypes_t | Analog_1_SupportedDataTypes []

## Detailed Description

## Macro Definition Documentation

#define __fsl_Sensor_Analog_1_Functions_H_

Definition at line 109 of file fsl_Sensor_Analog_1_Functions.h.

#define __fsl_Sensor_Analog_1_Functions_H__

Definition at line 151 of file fsl_Sensor_Analog_1_Functions.h.

#define Analog_1_CONVERT_FIXED_FACTOR (32767)

Definition at line 59 of file fsl_Sensor_Analog_1_Functions.c.

Referenced by Analog_1_fixed_converter().

#define Analog_1_CONVERT_FLOAT_FACTOR (1.0F/32767.0F)

Definition at line 58 of file fsl_Sensor_Analog_1_Functions.c.

Referenced by Analog_1_float_converter().

#define Analog_1_DATA_TYPE Analog_1_DataBuffer_t

Definition at line 135 of file fsl_Sensor_Analog_1_Functions.h.

#define Analog_1_GET_FIELD | ( |  | name,
|  |  | val
| ) |  | ((val&Analog_1_##name##_MASK)>>Analog_1_##name##_SHIFT)

Definition at line 175 of file fsl_Sensor_Analog_1_Functions.h.

#define Analog_1_SET_FIELD | ( |  | name,
|  |  | val
| ) |  | (((val)<<Analog_1_##name##_SHIFT)&(Analog_1_##name##_MASK))

Definition at line 174 of file fsl_Sensor_Analog_1_Functions.h.

#define MAX_ADC_CHANNELS 6

Definition at line 111 of file fsl_Sensor_Analog_1_Functions.h.

#define MSG_SIZE 1

Definition at line 61 of file fsl_Sensor_Analog_1_Functions.c.

#define NUM_MESSAGES 64

Definition at line 60 of file fsl_Sensor_Analog_1_Functions.c.

## Typedef Documentation

typedef int32 Analog_1_Status_t

SENSOR internal return codes.

Definition at line 123 of file fsl_Sensor_Analog_1_Functions.h.

typedef int32 isf_Analog_1_fixed_data_t

Definition at line 124 of file fsl_Sensor_Analog_1_Functions.h.

typedef float isf_Analog_1_float_data_t

Definition at line 125 of file fsl_Sensor_Analog_1_Functions.h.

## Enumeration Type Documentation

anonymous enum

Enumerator
Analog_1_SUCCESS |
Analog_1_DATA_OVERWRITE |
Analog_1_ERROR |

Definition at line 161 of file fsl_Sensor_Analog_1_Functions.h.

## Function Documentation

void Analog_1__Void_ | ( |  | ) |

Definition at line 55 of file fsl_Sensor_Analog_1_Functions.c.

isf_dsa_status_t Analog_1_fixed_converter | ( | Analog_1_Sensor_Specific_Settings_t * | pSensorSpecificConfig,
|  | Analog_1_DataBuffer_t * | nativeSample,
|  | void * | vpConvertedSample
| ) |  |

Definition at line 146 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_CONVERT_FIXED_FACTOR, configuredADCh, AnalogVoltagetoOutputConvTable_t::convFactor, Analog_1_DataBuffer_t::data, ISF_SUCCESS, AnalogVoltagetoOutputConvTable_t::offset, Analog_1_SensorData_Fixed_t::sensorData, Analog_1_DataBuffer_t::timeStamp, and Analog_1_SensorData_Fixed_t::timestamp.

Referenced by Analog_1_fsl_Sensor_Generic_Analog_Convert().

Here is the caller graph for this function:

isf_dsa_status_t Analog_1_float_converter | ( | Analog_1_Sensor_Specific_Settings_t * | pSensorSpecificConfig,
|  | Analog_1_DataBuffer_t * | nativeSample,
|  | void * | vpConvertedSample
| ) |  |

Definition at line 131 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_CONVERT_FLOAT_FACTOR, configuredADCh, AnalogVoltagetoOutputConvTable_t::convFactor, Analog_1_DataBuffer_t::data, ISF_SUCCESS, AnalogVoltagetoOutputConvTable_t::offset, Analog_1_SensorData_Float_t::sensorData, Analog_1_DataBuffer_t::timeStamp, and Analog_1_SensorData_Float_t::timestamp.

Referenced by Analog_1_fsl_Sensor_Generic_Analog_Convert().

Here is the caller graph for this function:

void Analog_1_fsl_Sensor_Generic_Analog_Configure | ( | void * | pSensorHandle,
|  | void * | pSensorSettings,
|  | int8_t * | retValue
| ) |  |

Definition at line 529 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_fsl_Sensor_Generic_AnalogCallback(), BM_ERROR, bm_register_periodic_callback(), DeviceDescriptor_struct::deviceSemaphore, DSA_ERR_CONFIGURE, DSA_ERR_PARAM, DSA_STATE_CONFIGURED_STOPPED, DSA_STATE_INITIALIZED, ISF_SUCCESS, and DeviceDescriptor_struct::token.

Referenced by fsl_Sensor_Analog_1_Configure().

Here is the call graph for this function:

Here is the caller graph for this function:

void Analog_1_fsl_Sensor_Generic_Analog_Convert | ( | void * | pSensorHandle,
|  | uint32_t | convertToType,
|  | uint8_t | resultType,
|  | void * | pNativeSample,
|  | void * | pConvertedSample,
|  | int32_t * | numBytes,
|  | int8_t * | retValue
| ) |  |

Definition at line 225 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_fixed_converter(), Analog_1_float_converter(), DSA_ERR_BAD_RESULT_TYPE, DSA_ERR_BAD_SENSOR_DATA_TYPE, DSA_RESULT_TYPE_ENG_FIXED, DSA_RESULT_TYPE_ENG_FLOAT, TYPE_PRESSURE, and TYPE_RAW_ACCELERATION_3D.

Referenced by fsl_Sensor_Analog_1_Convert().

Here is the call graph for this function:

Here is the caller graph for this function:

void Analog_1_fsl_Sensor_Generic_Analog_EndData | ( | void * | pSensorHandle,
|  | int8_t * | retValue
| ) |  |

Definition at line 414 of file fsl_Sensor_Analog_1_Functions.c.

References DeviceDescriptor_struct::deviceSemaphore, DSA_ERR_END_DATA, DSA_ERR_PARAM, DSA_STATE_CONFIGURED_STOPPED, and ISF_SUCCESS.

Referenced by fsl_Sensor_Analog_1_EndData().

Here is the caller graph for this function:

void Analog_1_fsl_Sensor_Generic_Analog_Initialize | ( | void * | pSensorHandle,
|  | int8_t * | retValue
| ) |  |

Definition at line 623 of file fsl_Sensor_Analog_1_Functions.c.

References ADC1_InitConfig0, AnalogVoltagetoOutputConvTable_t::convFactor, Analog_1_DataBuffer_t::data, DeviceDescriptor_struct::deviceSemaphore, DSA_ERR_INITIALIZE, DSA_ERR_PARAM, DSA_STATE_INITIALIZED, DSA_STATE_NOT_INITIALIZED, FSL_ADC1, ISF_SUCCESS, AnalogVoltagetoOutputConvTable_t::offset, DeviceDescriptor_struct::pCurrentSample, and Analog_1_DataBuffer_t::timeStamp.

Referenced by fsl_Sensor_Analog_1_Initialize().

Here is the caller graph for this function:

void Analog_1_fsl_Sensor_Generic_Analog_Shutdown | ( | void * | pSensorHandle,
|  | int8_t * | retValue
| ) |  |

Definition at line 380 of file fsl_Sensor_Analog_1_Functions.c.

References DSA_ERR_PARAM, DSA_STATE_INITIALIZED, FSL_ADC1, and ISF_SUCCESS.

Referenced by fsl_Sensor_Analog_1_Shutdown().

Here is the caller graph for this function:

void Analog_1_fsl_Sensor_Generic_Analog_StartData | ( | void * | pSensorHandle,
|  | int8_t * | retValue
| ) |  |

Definition at line 470 of file fsl_Sensor_Analog_1_Functions.c.

References ADC1_ChnConfig0, DeviceDescriptor_struct::deviceSemaphore, DSA_ERR_PARAM, DSA_ERR_START_DATA, DSA_STATE_CONFIGURED_STARTED, DSA_STATE_CONFIGURED_STOPPED, FSL_ADC1, and ISF_SUCCESS.

Referenced by fsl_Sensor_Analog_1_StartData().

Here is the caller graph for this function:

void Analog_1_fsl_Sensor_Generic_Analog_ValidateSettings | ( | void * | pSensorHandle,
|  | void * | pSensorSettings,
|  | int8_t * | retValue
| ) |  |

Definition at line 598 of file fsl_Sensor_Analog_1_Functions.c.

References DSA_ERR_PARAM, and ISF_SUCCESS.

Referenced by fsl_Sensor_Analog_1_ValidateSettings().

Here is the caller graph for this function:

void Analog_1_fsl_Sensor_Generic_AnalogCallback | ( | void * | pSensorHandle | ) |

Definition at line 283 of file fsl_Sensor_Analog_1_Functions.c.

References isf_SensorHandle_st::adapterStatus, configuredADCh, isf_SensorHandle_st::controlData, Analog_1_DataBuffer_t::data, DeviceDescriptor_struct::deviceSemaphore, DSA_STATE_CONFIGURED_STARTED, FSL_ADC1, fsl_Sensor_Analog_1_Convert(), isf_fifo_el_get_insert_pointer(), isf_fifo_el_increment(), ISF_FIFO_FULL, isf_fifo_lock(), isf_fifo_unlock(), isf_time_util_get_usec(), isf_dsa_ControlData_st::nEventFieldIndex, DeviceDescriptor_struct::pCurrentSample, isf_SensorHandle_st::pDeviceDescriptor, isf_dsa_ControlData_st::pEventGroup, isf_dsa_SensorSettings_st::pSampleBufferInfo, isf_dsa_SensorSettings_st::resultFormat, isf_dsa_SensorSettings_st::resultType, isf_dsa_ControlData_st::sensorSettings, Analog_1_DataBuffer_t::timeStamp, and TYPE_NATIVE_SENSOR_DATA_TYPE.

Referenced by Analog_1_fsl_Sensor_Generic_Analog_Configure().

Here is the call graph for this function:

Here is the caller graph for this function:

isf_dsa_status_t fsl_Sensor_Analog_1_Configure | ( | isf_SensorHandle_t * | pSensorHandle,
|  | isf_dsa_SensorSettings_t * | pSensorSettings
| ) |  |

Definition at line 168 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_fsl_Sensor_Generic_Analog_Configure().

Here is the call graph for this function:

isf_dsa_status_t fsl_Sensor_Analog_1_Convert | ( | isf_SensorHandle_t * | pSensorHandle,
|  | isf_SensorDataTypes_t | convertToType,
|  | isf_dsa_result_types_t | resultType,
|  | void * | pNativeSample,
|  | void * | pConvertedSample,
|  | int32_t * | numBytes
| ) |  |

Definition at line 162 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_fsl_Sensor_Generic_Analog_Convert().

Referenced by Analog_1_fsl_Sensor_Generic_AnalogCallback().

Here is the call graph for this function:

Here is the caller graph for this function:

isf_dsa_status_t fsl_Sensor_Analog_1_EndData | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 192 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_fsl_Sensor_Generic_Analog_EndData().

Here is the call graph for this function:

isf_dsa_status_t fsl_Sensor_Analog_1_Initialize | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 180 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_fsl_Sensor_Generic_Analog_Initialize().

Here is the call graph for this function:

isf_dsa_status_t fsl_Sensor_Analog_1_Shutdown | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 198 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_fsl_Sensor_Generic_Analog_Shutdown().

Here is the call graph for this function:

isf_dsa_status_t fsl_Sensor_Analog_1_StartData | ( | isf_SensorHandle_t * | pSensorHandle | ) |

Definition at line 186 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_fsl_Sensor_Generic_Analog_StartData().

Here is the call graph for this function:

isf_dsa_status_t fsl_Sensor_Analog_1_ValidateSettings | ( | isf_SensorHandle_t * | pSensorHandle,
|  | isf_dsa_SensorSettings_t * | pSensorSettings
| ) |  |

Definition at line 174 of file fsl_Sensor_Analog_1_Functions.c.

References Analog_1_fsl_Sensor_Generic_Analog_ValidateSettings().

Here is the call graph for this function:

## Variable Documentation

const Analog_1_device_t Analog_1_DeviceInfo

Initial value:
=
{
.dummy = 0,
.address = NULL
}

This allows access to the sensor communications specific configuration.

Dummy non i2c device settings.

Definition at line 70 of file fsl_Sensor_Analog_1_Functions.c.

Analog_1_Sensor_Specific_Settings_t Analog_1_Sensor_Specific_Config

Initial value:
=
{
.fullScaleRange = 0,
.offset = 0,
}

This allows access to the sensor specific configuration for the target sensor.

Definition at line 78 of file fsl_Sensor_Analog_1_Functions.c.

isf_SensorDataTypes_t Analog_1_SupportedDataTypes[]

Initial value:
=
{
TYPE_RAW_ACCELERATION_3D, TYPE_PRESSURE, TYPE_NATIVE_SENSOR_DATA_TYPE
}
TYPE_PRESSURE
Definition: isf_sensor_types.h:99
TYPE_RAW_ACCELERATION_3D
Definition: isf_sensor_types.h:71
TYPE_NATIVE_SENSOR_DATA_TYPE
Definition: isf_sensor_types.h:63

Definition at line 91 of file fsl_Sensor_Analog_1_Functions.c.

isf_SensorTypes_t Analog_1_SupportedSensorTypes[]

Initial value:
=
{
TYPE_ACCELEROMETER_3D, TYPE_DIFFERENTIAL_PRESSURE_SENSOR, TYPE_NATIVE_SENSOR_TYPE
}
TYPE_NATIVE_SENSOR_TYPE
Definition: isf_sensor_types.h:15
TYPE_ACCELEROMETER_3D
Definition: isf_sensor_types.h:20
TYPE_DIFFERENTIAL_PRESSURE_SENSOR
Definition: isf_sensor_types.h:45

Supported sensor and data types for the Sensor.

Supported sensor and data types.

Definition at line 86 of file fsl_Sensor_Analog_1_Functions.c.

uint8_t configuredADCh = 1

Definition at line 65 of file fsl_Sensor_Analog_1_Functions.c.

Referenced by Analog_1_fixed_converter(), Analog_1_float_converter(), and Analog_1_fsl_Sensor_Generic_AnalogCallback().

uint8_t numGpios = 1

Definition at line 64 of file fsl_Sensor_Analog_1_Functions.c.

uint32_t operating_mode

Definition at line 67 of file fsl_Sensor_Analog_1_Functions.c.

uint8_t sensorType = 0

Definition at line 63 of file fsl_Sensor_Analog_1_Functions.c.

- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.