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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

MPL3115_1.c
Go to the documentation of this file.
1 /* ###################################################################
2 ** This component module is generated by Processor Expert. Do not modify it.
3 ** Filename : MPL3115_1.c
4 ** CDE edition : Community
5 ** Project : ISF2P2_K64F_MQX_PROJ
6 ** Processor : MK64FN1M0VLL12
7 ** Component : ISF_KSDK_Sensor_MPL3115_Pressure
8 ** Version : Component 02.500, Driver 01.00, CPU db: 3.00.000
9 ** Repository : My Components
10 ** Compiler : GNU C Compiler
11 ** Date/Time : 2016-10-06, 13:38, # CodeGen: 0
12 ** Abstract :
13 **
14 ** Settings :
15 ** Component Name : MPL3115_1
16 ** Sensor Specific Configuration : yes
17 ** BAR_IN : 50663
18 ** CTRL_REG1 : yes
19 ** OS : 0
20 ** OFF_P : 0
21 ** OFF_T : 0
22 ** Device Address : 0x60
23 ** Comm Channel : I2C1
24 ** Contents :
25 ** No public methods
26 **
27 ** For non-commercial use only.
28 (c) Copyright <company/user-name>, 2015,
29 http://www.<company>.com
30 mail: info@<company>.com
31 ** ###################################################################*/
32 /*!
33 ** @file MPL3115_1.c
34 ** @version 01.00
35 ** @brief
36 **
37 */
38 /*!
39 ** @addtogroup MPL3115_1_module MPL3115_1 module documentation
40 ** @{
41 */
42
43 /* MODULE MPL3115_1. */
44
45 #include "MPL3115_1.h"
46 #include "mpl3115.h"
47
48 mpl3115_Sensor_Specific_Settings_t MPL3115_1_Sensor_Specific_Config =
49 {
50 .regCount = 28, // Number of register pairs to follow
51 .regPairs =
52 {
53 // Data configuration registers.
54 { MPL3115_F_SETUP, 0 },
55 { MPL3115_PT_DATA_CFG, (MPL3115_SET_FIELD(DREM,1)) | (MPL3115_SET_FIELD(PDEFE,1)) | (MPL3115_SET_FIELD(TDEFE,1)) },
56 { MPL3115_BAR_IN_MSB, 197 },
57 { MPL3115_BAR_IN_LSB, 231 },
58 { MPL3115_P_ARM_MSB, 0 },
59 { MPL3115_P_ARM_LSB, 0 },
60 { MPL3115_T_ARM, 0 },
61 { MPL3115_P_ARM_WND_MSB, 0 },
62 { MPL3115_P_ARM_WND_LSB, 0 },
63 { MPL3115_T_ARM_WND, 0 },
64 { MPL3115_P_MIN_MSB, 0 },
65 { MPL3115_P_MIN_CSB, 0 },
66 { MPL3115_P_MIN_LSB, 0 },
67 { MPL3115_P_MAX_MSB, 0 },
68 { MPL3115_P_MAX_CSB, 0 },
69 { MPL3115_P_MAX_LSB, 0 },
70 { MPL3115_T_MIN_MSB, 0 },
71 { MPL3115_T_MIN_LSB, 0 },
72 { MPL3115_T_MAX_MSB, 0 },
73 { MPL3115_T_MAX_LSB, 0 },
74 { MPL3115_CTRL_REG1, (MPL3115_SET_FIELD(OS,0)) },
75 { MPL3115_CTRL_REG2, 0 },
76 { MPL3115_CTRL_REG3, 0 },
77 { MPL3115_CTRL_REG4, 0 },
78 { MPL3115_CTRL_REG5, 0 },
79 { MPL3115_OFF_P, 0 },
80 { MPL3115_OFF_T, 0 },
81 { MPL3115_OFF_H, 0 }
82 }
83 };
84
85 /*!
86 * @brief This creates the sensor adapter instance for the target sensor.
87 *
88 */
89 const isf_dsa_Adapter_t MPL3115_1_Adapter =
90 {
91 .devInfo.pSupportedSensorTypes = mpl3115_SupportedSensorTypes,
92 .devInfo.pSupportedSensorDataTypes = mpl3115_SupportedDataTypes,
93 .devInfo.nNativeDataSetSize = sizeof(mpl3115_DataBuffer_t),
94 .control.Initialize = &fsl_mpl3115_i2c_1D_press_Initialize,
95 .control.ValidateSettings = &fsl_mpl3115_i2c_1D_press_ValidateSettings,
96 .control.Configure = &fsl_mpl3115_i2c_1D_press_Configure,
97 .control.StartData = &fsl_mpl3115_i2c_1D_press_StartData,
98 .control.EndData = &fsl_mpl3115_i2c_1D_press_EndData,
99 .control.Calibrate = &fsl_mpl3115_i2c_1D_press_Calibrate,
100 .control.Shutdown = &fsl_mpl3115_i2c_1D_press_Shutdown,
101 .control.Convert = &fsl_mpl3115_i2c_1D_press_Convert
102 };
103
104 const i2c_device_t MPL3115_1_DeviceInfo =
105 {
106 .baudRate_kbps = 400, // default baud rate (kbps).
107 .address = 96 // instance specific device address.
108 };
109
110
111 /* END MPL3115_1. */
112
113 /*!
114 ** @}
115 */
116 /*
117 ** ###################################################################
118 **
119 ** This file was created by Processor Expert 10.5 [05.21]
120 ** for the Freescale Kinetis series of microcontrollers.
121 **
122 ** ###################################################################
123 */
MPL3115_OFF_T
Definition: mpl3115.h:71
MPL3115_CTRL_REG3
Definition: mpl3115.h:67
fsl_mpl3115_i2c_1D_press_Shutdown
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_Shutdown(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mpl3115_i2c_1D_press.c:571
MPL3115_F_SETUP
Definition: mpl3115.h:42
MPL3115_T_MAX_LSB
Definition: mpl3115.h:64
MPL3115_1.h
fsl_mpl3115_i2c_1D_press_Convert
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_Convert(volatile isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *pNativeSample, void *pConvertedSample, int32 *numBytes)
This function coverts the raw sample data to the desired output type.
Definition: fsl_mpl3115_i2c_1D_press.c:713
MPL3115_T_ARM_WND
Definition: mpl3115.h:54
MPL3115_P_ARM_WND_LSB
Definition: mpl3115.h:53
MPL3115_P_MAX_MSB
Definition: mpl3115.h:60
mpl3115_SupportedDataTypes
isf_SensorDataTypes_t mpl3115_SupportedDataTypes[]
Definition: fsl_mpl3115_i2c_1D_press.c:168
MPL3115_CTRL_REG4
Definition: mpl3115.h:68
MPL3115_P_MIN_LSB
Definition: mpl3115.h:57
mpl3115_Sensor_Specific_Settings_t
Definition: mpl3115.h:230
MPL3115_P_MAX_LSB
Definition: mpl3115.h:62
fsl_mpl3115_i2c_1D_press_Configure
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
Definition: fsl_mpl3115_i2c_1D_press.c:330
fsl_mpl3115_i2c_1D_press_Calibrate
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
Definition: fsl_mpl3115_i2c_1D_press.c:551
isf_dsa_Adapter_st::devInfo
isf_dsa_DeviceInfoBlock_t devInfo
Definition: isf_dsa_adapter.h:146
mpl3115_DataBuffer_t
This structure defines the dummy DSA data buffer format.
Definition: fsl_mpl3115_i2c_1D_press.h:48
MPL3115_T_ARM
Definition: mpl3115.h:51
fsl_mpl3115_i2c_1D_press_ValidateSettings
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
Definition: fsl_mpl3115_i2c_1D_press.c:301
MPL3115_OFF_H
Definition: mpl3115.h:72
MPL3115_P_ARM_WND_MSB
Definition: mpl3115.h:52
MPL3115_P_ARM_LSB
Definition: mpl3115.h:50
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
MPL3115_CTRL_REG2
Definition: mpl3115.h:66
MPL3115_T_MIN_MSB
Definition: mpl3115.h:58
MPL3115_BAR_IN_LSB
Definition: mpl3115.h:48
MPL3115_CTRL_REG5
Definition: mpl3115.h:69
mpl3115.h
The mpl3115.h contains the MPL3115 Pressure sensor register definitions, access macros, and device access functions.
isf_dsa_DeviceInfoBlock_st::pSupportedSensorTypes
isf_SensorTypes_t * pSupportedSensorTypes
Definition: isf_dsa_adapter.h:70
MPL3115_P_MIN_CSB
Definition: mpl3115.h:56
MPL3115_1_Adapter
const isf_dsa_Adapter_t MPL3115_1_Adapter
This creates the sensor adapter instance for the target sensor.
Definition: MPL3115_1.c:89
MPL3115_BAR_IN_MSB
Definition: mpl3115.h:47
MPL3115_P_ARM_MSB
Definition: mpl3115.h:49
MPL3115_SET_FIELD
#define MPL3115_SET_FIELD(name, val)
Definition: mpl3115.h:81
fsl_mpl3115_i2c_1D_press_StartData
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_StartData(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mpl3115_i2c_1D_press.c:421
MPL3115_P_MAX_CSB
Definition: mpl3115.h:61
MPL3115_T_MAX_MSB
Definition: mpl3115.h:63
MPL3115_1_DeviceInfo
const i2c_device_t MPL3115_1_DeviceInfo
This allows access to the sensor communications specific configuration.
Definition: MPL3115_1.c:104
MPL3115_OFF_P
Definition: mpl3115.h:70
mpl3115_SupportedSensorTypes
isf_SensorTypes_t mpl3115_SupportedSensorTypes[]
Supported sensor and data types for MPL3115.
Definition: fsl_mpl3115_i2c_1D_press.c:167
MPL3115_PT_DATA_CFG
Definition: mpl3115.h:46
MPL3115_P_MIN_MSB
Definition: mpl3115.h:55
MPL3115_1_Sensor_Specific_Config
mpl3115_Sensor_Specific_Settings_t MPL3115_1_Sensor_Specific_Config
This allows access to the sensor specific configuration for the target sensor.
Definition: MPL3115_1.c:48
mpl3115_Sensor_Specific_Settings_t::regCount
uint32 regCount
Definition: mpl3115.h:232
fsl_mpl3115_i2c_1D_press_Initialize
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_Initialize(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mpl3115_i2c_1D_press.c:206
MPL3115_CTRL_REG1
Definition: mpl3115.h:65
MPL3115_T_MIN_LSB
Definition: mpl3115.h:59
fsl_mpl3115_i2c_1D_press_EndData
isf_dsa_status_t fsl_mpl3115_i2c_1D_press_EndData(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mpl3115_i2c_1D_press.c:484
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.