| 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
MAG3110_1.c
Go to the documentation of this file.
1 /* ###################################################################
2 ** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
3 ** Filename : MAG3110_1.c
4 ** CDE edition : Community
5 ** Project : ISF_K64F_CW_PROJ
6 ** Processor : MK64FN1M0VLL12
7 ** Component : ISF_Sensor_MAG3110_Magnetometer
8 ** Version : Component 01.000, Driver 01.00, CPU db: 3.00.000
9 ** Compiler : GNU C Compiler
10 ** Date/Time : 2015-03-03, 11:01, # CodeGen: 0
11 ** Abstract :
12 **
13 ** Settings :
14 ** Contents :
15 ** No public methods
16 **
17 ** For non-commercial use only.
18 (c) Copyright <company/user-name>, 2014
19 http://www.<company>.com
20 mail: info@<company>.com
21 ** ###################################################################*/
22 /*!
23 ** @file MAG3110_1.c
24 ** @version 01.00
25 ** @brief
26 **
27 */
28 /*!
29 ** @addtogroup MAG3110_1_module MAG3110_1 module documentation
30 ** @{
31 */
32
33 /* MODULE MAG3110_1. */
34
35 #include "MAG3110_1.h"
36 #include "mag3110.h"
37
38 mag3110_Sensor_Specific_Settings_t MAG3110_1_Sensor_Specific_Config =
39 {
40 .regCount = 8, // Number of register pairs to follow
41 .overSamplingRatio = 0,
42 .regPairs =
43 {
44 { MAG3110_OFF_X_MSB, 0 },
45 { MAG3110_OFF_X_LSB, 0 },
46 { MAG3110_OFF_Y_MSB, 0 },
47 { MAG3110_OFF_Y_LSB, 0 },
48 { MAG3110_OFF_Z_MSB, 0 },
49 { MAG3110_OFF_Z_LSB, 0 },
50 { MAG3110_CTRL_REG1, 0, },
51 { MAG3110_CTRL_REG2, (MAG3110_SET_FIELD(AUTO_MRST_EN,1)) | (MAG3110_SET_FIELD(RAW,0)) | MAG3110_SET_FIELD(MAG_RST,0) }
52 }
53 };
54
55 /*!
56 * @brief This creates the sensor adapter instance for the target sensor.
57 *
58 */
59 const isf_dsa_Adapter_t MAG3110_1_Adapter =
60 {
61 .devInfo.pSupportedSensorTypes = mag3110_SupportedSensorTypes,
62 .devInfo.pSupportedSensorDataTypes = mag3110_SupportedDataTypes,
63 .devInfo.nNativeDataSetSize = sizeof(mag3110_DataBuffer_t),
64 .control.Initialize = &fsl_mag3110_i2c_3D_mag_Initialize,
65 .control.ValidateSettings = &fsl_mag3110_i2c_3D_mag_ValidateSettings,
66 .control.Configure = &fsl_mag3110_i2c_3D_mag_Configure,
67 .control.StartData = &fsl_mag3110_i2c_3D_mag_StartData,
68 .control.EndData = &fsl_mag3110_i2c_3D_mag_EndData,
69 .control.Calibrate = &fsl_mag3110_i2c_3D_mag_Calibrate,
70 .control.Shutdown = &fsl_mag3110_i2c_3D_mag_Shutdown,
71 .control.Convert = &fsl_mag3110_i2c_3D_mag_Convert
72 };
73
74 const i2c_device_t MAG3110_1_DeviceInfo =
75 {
76 .addrType = 0, // 7-bit addresses for now.
77 .baudRate_kbps = 400, // default baud rate (kbps).
78 .address = 14 // instance specific device address.
79 };
80
81 /* END MAG3110_1. */
82
83 /*!
84 ** @}
85 */
86 /*
87 ** ###################################################################
88 **
89 ** This file was created by Processor Expert 10.3 [05.09]
90 ** for the Freescale Kinetis series of microcontrollers.
91 **
92 ** ###################################################################
93 */
MAG3110_CTRL_REG1
Definition: mag3110.h:41
MAG3110_1_DeviceInfo
const i2c_device_t MAG3110_1_DeviceInfo
This allows access to the sensor communications specific configuration.
Definition: MAG3110_1.c:74
mag3110_DataBuffer_t
This structure defines the dummy DSA data buffer format.
Definition: fsl_mag3110_i2c_3D_mag.h:30
fsl_mag3110_i2c_3D_mag_Calibrate
isf_dsa_status_t fsl_mag3110_i2c_3D_mag_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
Definition: fsl_mag3110_i2c_3D_mag.c:408
fsl_mag3110_i2c_3D_mag_Shutdown
isf_dsa_status_t fsl_mag3110_i2c_3D_mag_Shutdown(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mag3110_i2c_3D_mag.c:428
MAG3110_OFF_Z_LSB
Definition: mag3110.h:39
I2CDeviceInfo
Information necessary to communicate with an I2C slave device.
Definition: fsl_i2c_master_driver.h:30
MAG3110_OFF_Y_LSB
Definition: mag3110.h:37
fsl_mag3110_i2c_3D_mag_EndData
isf_dsa_status_t fsl_mag3110_i2c_3D_mag_EndData(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mag3110_i2c_3D_mag.c:344
fsl_mag3110_i2c_3D_mag_Initialize
isf_dsa_status_t fsl_mag3110_i2c_3D_mag_Initialize(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mag3110_i2c_3D_mag.c:64
fsl_mag3110_i2c_3D_mag_ValidateSettings
isf_dsa_status_t fsl_mag3110_i2c_3D_mag_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSubSettings)
Definition: fsl_mag3110_i2c_3D_mag.c:155
fsl_mag3110_i2c_3D_mag_Configure
isf_dsa_status_t fsl_mag3110_i2c_3D_mag_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
Definition: fsl_mag3110_i2c_3D_mag.c:188
mag3110_SupportedDataTypes
isf_SensorDataTypes_t mag3110_SupportedDataTypes[]
Definition: fsl_mag3110_i2c_3D_mag.c:49
mag3110.h
The mag3110.h contains the MAG3110 Magnetometer register definitions, access macros, and device access functions.
isf_dsa_Adapter_st::devInfo
isf_dsa_DeviceInfoBlock_t devInfo
Definition: isf_dsa_adapter.h:146
mag3110_SupportedSensorTypes
isf_SensorTypes_t mag3110_SupportedSensorTypes[]
Supported sensor and data types for MMA8652.
Definition: fsl_mag3110_i2c_3D_mag.c:48
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
mag3110_Sensor_Specific_Settings_t
Definition: mag3110.h:130
isf_dsa_DeviceInfoBlock_st::pSupportedSensorTypes
isf_SensorTypes_t * pSupportedSensorTypes
Definition: isf_dsa_adapter.h:72
MAG3110_1.h
MAG3110_SET_FIELD
#define MAG3110_SET_FIELD(name, val)
Definition: mag3110.h:52
MAG3110_OFF_Z_MSB
Definition: mag3110.h:38
fsl_mag3110_i2c_3D_mag_StartData
isf_dsa_status_t fsl_mag3110_i2c_3D_mag_StartData(isf_SensorHandle_t *pSensorHandle)
Definition: fsl_mag3110_i2c_3D_mag.c:283
I2CDeviceInfo::addrType
LDD_I2C_TAddrType addrType
Definition: fsl_i2c_master_driver.h:34
mag3110_Sensor_Specific_Settings_t::regCount
uint32 regCount
Definition: mag3110.h:133
MAG3110_CTRL_REG2
Definition: mag3110.h:42
MAG3110_OFF_X_MSB
Definition: mag3110.h:34
MAG3110_OFF_X_LSB
Definition: mag3110.h:35
MAG3110_OFF_Y_MSB
Definition: mag3110.h:36
MAG3110_1_Sensor_Specific_Config
mag3110_Sensor_Specific_Settings_t MAG3110_1_Sensor_Specific_Config
This allows access to the sensor specific configuration for the target sensor.
Definition: MAG3110_1.c:38
MAG3110_1_Adapter
const isf_dsa_Adapter_t MAG3110_1_Adapter
This creates the sensor adapter instance for the target sensor.
Definition: MAG3110_1.c:59
fsl_mag3110_i2c_3D_mag_Convert
isf_dsa_status_t fsl_mag3110_i2c_3D_mag_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_mag3110_i2c_3D_mag.c:563
- © Freescale Semiconductor, Inc. 2015. All Rights Reserved.