| 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
FXOS8700_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 : FXOS8700_1.c
4 ** CDE edition : Community
5 ** Project : ISF_K64F_CW_PROJ
6 ** Processor : MK64FN1M0VLL12
7 ** Component : ISF_Sensor_FXOS8700_ECompass
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 FXOS8700_1.c
24 ** @version 01.00
25 ** @brief
26 **
27 */
28 /*!
29 ** @addtogroup FXOS8700_1_module FXOS8700_1 module documentation
30 ** @{
31 */
32
33 /* MODULE FXOS8700_1. */
34
35 #include "FXOS8700_1.h"
36
37 fxos8700_Sensor_Specific_Settings_t FXOS8700_1_Sensor_Specific_Config =
38 {
39 .accelFullScaleRange = 0, // Capture the accelerometer full-scale range for use in conversion routines.
40 .regCount = 30, // Number of register pairs to follow
41 .regPairs =
42 {
43 { FXOS8700_INT_SOURCE, 0 },
44 // Data configuration registers.
45 { FXOS8700_XYZ_DATA_CFG, (FXOS8700_SET_FIELD(HPF_OUT,0)) | (FXOS8700_SET_FIELD(FS,0)) },
46 { FXOS8700_HP_FILTER_CUTOFF, (FXOS8700_SET_FIELD(PULSE_HPF_BYP,0)) | (FXOS8700_SET_FIELD(PULSE_LPF_EN,0)) | (FXOS8700_SET_FIELD(SEL,0)) },
47 // Portrait Landscape registers.
48 { FXOS8700_PL_CFG, (FXOS8700_SET_FIELD(DBCNTM,1)) | (FXOS8700_SET_FIELD(PL_EN,0)) },
49 { FXOS8700_PL_COUNT, 0 },
50 { FXOS8700_PL_BF_ZCOMP, (FXOS8700_SET_FIELD(BKFR,1)) | (FXOS8700_SET_FIELD(ZLOCK,4)) },
51 { FXOS8700_PL_THS_REG, (FXOS8700_SET_FIELD(PL_THS,16)) | (FXOS8700_SET_FIELD(HYS,4)) },
52 // Freefall/Motion Detection registers.
53 { FXOS8700_FF_MT_CFG, (FXOS8700_SET_FIELD(ELE,0)) | (FXOS8700_SET_FIELD(OAE,0)) | (FXOS8700_SET_FIELD(ZEFE,0)) | (FXOS8700_SET_FIELD(YEFE,0)) | (FXOS8700_SET_FIELD(XEFE,0)) },
54 { FXOS8700_FF_MT_THS, (FXOS8700_SET_FIELD(DBCNTM,0)) | (FXOS8700_SET_FIELD(THS,0)) },
55 { FXOS8700_FF_MT_COUNT, 0 },
56 // Transient Detection registers.
57 { FXOS8700_TRANSIENT_CFG, 0 }, // Feature disabled by default (for now).
58 // Pulse Detection registers.
59 { FXOS8700_PULSE_CFG, 0 }, // Feature is disabled by default (for now).
60 // Auto-WAKE/SLEEP Detection registers.
61 { FXOS8700_ASLP_COUNT, 0 },
62 // System and Control registers.
63 { FXOS8700_CTRL_REG1, (FXOS8700_SET_FIELD(ASLP_RATE,0)) | (FXOS8700_SET_FIELD(DR,0)) | (FXOS8700_SET_FIELD(LNOISE,0)) | (FXOS8700_SET_FIELD(F_READ,0)) },
64 { FXOS8700_CTRL_REG2, (FXOS8700_SET_FIELD(SMODS,0)) | (FXOS8700_SET_FIELD(SLPE,0)) | (FXOS8700_SET_FIELD(MODS,0)) },
65 { FXOS8700_CTRL_REG3, 0 }, // Interrupt sources disabled, Active Low, Push-Pull Open Drain (defaults).
66 { FXOS8700_CTRL_REG4, 0 }, // Interrupts disabled (defaults).
67 { FXOS8700_CTRL_REG5, 0 }, // INT2 Pin (defaults).
68 // Calibration Offset registers.
69 { FXOS8700_OFF_X, 0 },
70 { FXOS8700_OFF_Y, 0 },
71 { FXOS8700_OFF_Z, 0 },
72 { FXOS8700_M_OFF_X_MSB, 0 },
73 { FXOS8700_M_OFF_X_LSB, 0 },
74 { FXOS8700_M_OFF_Y_MSB, 0 },
75 { FXOS8700_M_OFF_Y_LSB, 0 },
76 { FXOS8700_M_OFF_Z_MSB, 0 },
77 { FXOS8700_M_OFF_Z_LSB, 0 },
78 { FXOS8700_M_CTRL_REG2, (FXOS8700_SET_FIELD(M_AUTOINC,0)) | (FXOS8700_SET_FIELD(M_RST_CNT,3)) },
79 { FXOS8700_M_CTRL_REG2, (FXOS8700_SET_FIELD(M_AUTOINC,1)) | (FXOS8700_SET_FIELD(M_RST_CNT,3)) },
80 { FXOS8700_M_CTRL_REG3, (FXOS8700_SET_FIELD(M_RAW,0)) | (FXOS8700_SET_FIELD(M_ASLP_OS,0)) | (FXOS8700_SET_FIELD(M_THS_XYZ_UPDATE,0)) }
81 }
82 };
83
84 /*!
85 * @brief This creates the sensor adapter instance for the target sensor.
86 *
87 */
88 const isf_dsa_Adapter_t FXOS8700_1_Adapter =
89 {
90 .devInfo.pSupportedSensorTypes = fxos8700_SupportedSensorTypes,
91 .devInfo.pSupportedSensorDataTypes = fxos8700_SupportedDataTypes,
92 .devInfo.nNativeDataSetSize = sizeof(fxos8700_DataBuffer_t),
93 .control.Initialize = &fsl_fxos8700_i2cspi_6D_AccMag_Initialize,
94 .control.ValidateSettings = &fsl_fxos8700_i2cspi_6D_AccMag_ValidateSettings,
95 .control.Configure = &fsl_fxos8700_i2cspi_6D_AccMag_Configure,
96 .control.StartData = &fsl_fxos8700_i2cspi_6D_AccMag_StartData,
97 .control.EndData = &fsl_fxos8700_i2cspi_6D_AccMag_EndData,
98 .control.Calibrate = &fsl_fxos8700_i2cspi_6D_AccMag_Calibrate,
99 .control.Shutdown = &fsl_fxos8700_i2cspi_6D_AccMag_Shutdown,
100 .control.Convert = &fsl_fxos8700_i2cspi_6D_AccMag_Convert
101 };
102
103 const i2c_device_t FXOS8700_1_DeviceInfo =
104 {
105 .addrType = 0, // 7-bit addresses for now.
106 .baudRate_kbps = 400, // default baud rate (kbps).
107 .address = 30 // instance specific device address.
108 };
109
110 /* END FXOS8700_1. */
111
112 /*!
113 ** @}
114 */
115 /*
116 ** ###################################################################
117 **
118 ** This file was created by Processor Expert 10.3 [05.09]
119 ** for the Freescale Kinetis series of microcontrollers.
120 **
121 ** ###################################################################
122 */
FXOS8700_OFF_Y
Definition: fxos8700.h:60
FXOS8700_SET_FIELD
#define FXOS8700_SET_FIELD(name, val)
Definition: fxos8700.h:144
FXOS8700_M_CTRL_REG2
Definition: fxos8700.h:104
fxos8700_DataBuffer_t
This structure defines the dummy DSA data buffer format.
Definition: fsl_fxos8700_i2cspi_6D_AccMag.h:109
FXOS8700_M_OFF_Y_LSB
Definition: fxos8700.h:78
FXOS8700_TRANSIENT_CFG
Definition: fxos8700.h:41
FXOS8700_CTRL_REG4
Definition: fxos8700.h:57
FXOS8700_PL_THS_REG
Definition: fxos8700.h:36
FXOS8700_ASLP_COUNT
Definition: fxos8700.h:53
FXOS8700_M_CTRL_REG3
Definition: fxos8700.h:105
FXOS8700_CTRL_REG5
Definition: fxos8700.h:58
FXOS8700_OFF_X
Definition: fxos8700.h:59
I2CDeviceInfo
Information necessary to communicate with an I2C slave device.
Definition: fsl_i2c_master_driver.h:30
FXOS8700_PULSE_CFG
Definition: fxos8700.h:45
FXOS8700_1_DeviceInfo
const i2c_device_t FXOS8700_1_DeviceInfo
This allows access to the sensor communications specific configuration.
Definition: FXOS8700_1.c:103
FXOS8700_FF_MT_COUNT
Definition: fxos8700.h:40
fsl_fxos8700_i2cspi_6D_AccMag_Initialize
isf_dsa_status_t fsl_fxos8700_i2cspi_6D_AccMag_Initialize(isf_SensorHandle_t *pSensorHandle)
This is the concrete implementation of the FXOS8700 sensor adapter initialization.
Definition: fsl_fxos8700_i2cspi_6D_AccMag.c:155
FXOS8700_CTRL_REG3
Definition: fxos8700.h:56
FXOS8700_INT_SOURCE
Definition: fxos8700.h:28
FXOS8700_M_OFF_X_LSB
Definition: fxos8700.h:76
fxos8700_Sensor_Specific_Settings_t
Definition: fxos8700.h:438
fxos8700_SupportedSensorTypes
isf_SensorTypes_t fxos8700_SupportedSensorTypes[]
Supported sensor and data types for FXOS8700.
Definition: fsl_fxos8700_i2cspi_6D_AccMag.c:58
FXOS8700_CTRL_REG1
Definition: fxos8700.h:54
fsl_fxos8700_i2cspi_6D_AccMag_Configure
isf_dsa_status_t fsl_fxos8700_i2cspi_6D_AccMag_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
This is the concrete implementation of the FXOS8700 sensor adapter for configuration.
Definition: fsl_fxos8700_i2cspi_6D_AccMag.c:286
fsl_fxos8700_i2cspi_6D_AccMag_StartData
isf_dsa_status_t fsl_fxos8700_i2cspi_6D_AccMag_StartData(isf_SensorHandle_t *pSensorHandle)
This is the concrete implementation of the FXOS8700 sensor adapter for start Data.
Definition: fsl_fxos8700_i2cspi_6D_AccMag.c:412
FXOS8700_FF_MT_THS
Definition: fxos8700.h:39
FXOS8700_CTRL_REG2
Definition: fxos8700.h:55
isf_dsa_Adapter_st::devInfo
isf_dsa_DeviceInfoBlock_t devInfo
Definition: isf_dsa_adapter.h:146
fsl_fxos8700_i2cspi_6D_AccMag_Calibrate
isf_dsa_status_t fsl_fxos8700_i2cspi_6D_AccMag_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
This is the concrete implementation of the FXOS8700 sensor adapter for calibration ...
Definition: fsl_fxos8700_i2cspi_6D_AccMag.c:541
FXOS8700_OFF_Z
Definition: fxos8700.h:61
fsl_fxos8700_i2cspi_6D_AccMag_Convert
isf_dsa_status_t fsl_fxos8700_i2cspi_6D_AccMag_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_fxos8700_i2cspi_6D_AccMag.c:732
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
FXOS8700_M_OFF_X_MSB
Definition: fxos8700.h:75
isf_dsa_DeviceInfoBlock_st::pSupportedSensorTypes
isf_SensorTypes_t * pSupportedSensorTypes
Definition: isf_dsa_adapter.h:72
fxos8700_SupportedDataTypes
isf_SensorDataTypes_t fxos8700_SupportedDataTypes[]
Definition: fsl_fxos8700_i2cspi_6D_AccMag.c:59
FXOS8700_1_Adapter
const isf_dsa_Adapter_t FXOS8700_1_Adapter
This creates the sensor adapter instance for the target sensor.
Definition: FXOS8700_1.c:88
FXOS8700_PL_CFG
Definition: fxos8700.h:33
FXOS8700_1_Sensor_Specific_Config
fxos8700_Sensor_Specific_Settings_t FXOS8700_1_Sensor_Specific_Config
This allows access to the sensor specific configuration for the target sensor.
Definition: FXOS8700_1.c:37
FXOS8700_FF_MT_CFG
Definition: fxos8700.h:37
I2CDeviceInfo::addrType
LDD_I2C_TAddrType addrType
Definition: fsl_i2c_master_driver.h:34
FXOS8700_M_OFF_Y_MSB
Definition: fxos8700.h:77
FXOS8700_M_OFF_Z_LSB
Definition: fxos8700.h:80
fxos8700_Sensor_Specific_Settings_t::accelFullScaleRange
uint8 accelFullScaleRange
Definition: fxos8700.h:440
fsl_fxos8700_i2cspi_6D_AccMag_Shutdown
isf_dsa_status_t fsl_fxos8700_i2cspi_6D_AccMag_Shutdown(isf_SensorHandle_t *pSensorHandle)
This is the concrete implementation of the FXOS8700 sensor adapter for shutdown . ...
Definition: fsl_fxos8700_i2cspi_6D_AccMag.c:558
FXOS8700_1.h
FXOS8700_HP_FILTER_CUTOFF
Definition: fxos8700.h:31
FXOS8700_XYZ_DATA_CFG
Definition: fxos8700.h:30
FXOS8700_PL_BF_ZCOMP
Definition: fxos8700.h:35
fsl_fxos8700_i2cspi_6D_AccMag_EndData
isf_dsa_status_t fsl_fxos8700_i2cspi_6D_AccMag_EndData(isf_SensorHandle_t *pSensorHandle)
This is the concrete implementation of the FXOS8700 sensor adapter for End Data.
Definition: fsl_fxos8700_i2cspi_6D_AccMag.c:477
FXOS8700_PL_COUNT
Definition: fxos8700.h:34
FXOS8700_M_OFF_Z_MSB
Definition: fxos8700.h:79
fsl_fxos8700_i2cspi_6D_AccMag_ValidateSettings
isf_dsa_status_t fsl_fxos8700_i2cspi_6D_AccMag_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
This is the concrete implementation of the FXOS8700 sensor adapter for validating current settings...
Definition: fsl_fxos8700_i2cspi_6D_AccMag.c:245
- © Freescale Semiconductor, Inc. 2015. All Rights Reserved.