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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

FXAS21002_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 : FXAS21002_1.c
4 ** CDE edition : Standard
5 ** Project : ISF2P2_K64F_MQX_PROJ
6 ** Processor : MK64FN1M0VLL12
7 ** Component : ISF_KSDK_Sensor_FXAS21002_Gyrometer
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 : FXAS21002_1
16 ** Device Address : 0x20
17 ** Comm Channel : I2C1
18 ** Allowed Full-scale Ranges : ±250 dps (FXAS21002)
19 ** Sensor Specific Configuration : yes
20 ** CTRL_REG0 : yes
21 ** BW : 0
22 ** SPIW : 0
23 ** SEL : 0
24 ** HPF_EN : 0
25 ** FS : 3
26 ** CTRL_REG1 : yes
27 ** DR : 0
28 ** CTRL_REG3 : yes
29 ** WRAPTOONE : 0
30 ** EXTCTRLEN : 0
31 ** FS_DOUBLE : 0
32 ** Contents :
33 ** No public methods
34 **
35 ** (c) Copyright <company/user-name>, 2015,
36 http://www.<company>.com
37 mail: info@<company>.com
38 ** ###################################################################*/
39 /*!
40 ** @file FXAS21002_1.c
41 ** @version 01.00
42 ** @brief
43 **
44 */
45 /*!
46 ** @addtogroup FXAS21002_1_module FXAS21002_1 module documentation
47 ** @{
48 */
49
50 /* MODULE FXAS21002_1. */
51
52 #include "FXAS21002_1.h"
53 #include "isf_target.h"
54 #include "isf.h"
55 #include "isf_util.h"
56
57
58 fxas21002_Sensor_Specific_Settings_t FXAS21002_1_Sensor_Specific_Config =
59 {
60 .gyroFullScaleRange = 3, // Capture the accelerometer full-scale range for use in conversion routines.
61 .fsdouble = 0,
62 .regCount = 4, // Number of register pairs to follow
63 .regPairs =
64 {
65 // System and Control registers.
66 { FXAS21002_CTRL_REG0, (FXAS21002_SET_FIELD(BW,0)) | (FXAS21002_SET_FIELD(SPIW,0)) | (FXAS21002_SET_FIELD(HPF_EN,0)) | (FXAS21002_SET_FIELD(FS,3)) },
67 { FXAS21002_CTRL_REG1, (FXAS21002_SET_FIELD(DR,0)) },
68 { FXAS21002_CTRL_REG2, 0 }, // Interrupt sources disabled, Active Low, Push-Pull Open Drain (defaults).
69 { FXAS21002_CTRL_REG3, (FXAS21002_SET_FIELD(WRAPTOONE,0)) | (FXAS21002_SET_FIELD(EXTCTRLEN,0)) | (FXAS21002_SET_FIELD(FSDOUBLE,0)) },
70 }
71 };
72
73 /*!
74 * @brief This creates the sensor adapter instance for the target sensor.
75 *
76 */
77 const isf_dsa_Adapter_t FXAS21002_1_Adapter =
78 {
79 .devInfo.pSupportedSensorTypes = fxas21002_SupportedSensorTypes,
80 .devInfo.pSupportedSensorDataTypes = fxas21002_SupportedDataTypes,
81 .devInfo.nNativeDataSetSize = sizeof(fxas21002_DataBuffer_t),
82 .control.Initialize = &fsl_fxas21002_i2cspi_3D_gyro_Initialize,
83 .control.ValidateSettings = &fsl_fxas21002_i2cspi_3D_gyro_ValidateSettings,
84 .control.Configure = &fsl_fxas21002_i2cspi_3D_gyro_Configure,
85 .control.StartData = &fsl_fxas21002_i2cspi_3D_gyro_StartData,
86 .control.EndData = &fsl_fxas21002_i2cspi_3D_gyro_EndData,
87 .control.Calibrate = &fsl_fxas21002_i2cspi_3D_gyro_Calibrate,
88 .control.Shutdown = &fsl_fxas21002_i2cspi_3D_gyro_Shutdown,
89 .control.Convert = &fsl_fxas21002_i2cspi_3D_gyro_Convert
90 };
91
92 const i2c_device_t FXAS21002_1_DeviceInfo =
93 {
94 .baudRate_kbps = 400, // default baud rate (kbps).
95 .address = 32 // instance specific device address.
96 };
97
98
99
100 /* END FXAS21002_1. */
101
102 /*!
103 ** @}
104 */
105 /*
106 ** ###################################################################
107 **
108 ** This file was created by Processor Expert 10.5 [05.21]
109 ** for the Freescale Kinetis series of microcontrollers.
110 **
111 ** ###################################################################
112 */
fxas21002_Sensor_Specific_Settings_t::gyroFullScaleRange
uint8 gyroFullScaleRange
Definition: fxas21002.h:213
isf_target.h
ISF board support header files.
fsl_fxas21002_i2cspi_3D_gyro_Calibrate
isf_dsa_status_t fsl_fxas21002_i2cspi_3D_gyro_Calibrate(isf_SensorHandle_t *pSensorHandle, void *pCalData)
This is the concrete implementation of the FXAS21002 sensor adapter for calibration ...
Definition: fsl_fxas21002_i2cspi_3D_gyro.c:564
FXAS21002_1_DeviceInfo
const i2c_device_t FXAS21002_1_DeviceInfo
This allows access to the sensor communications specific configuration.
Definition: FXAS21002_1.c:92
fsl_fxas21002_i2cspi_3D_gyro_EndData
isf_dsa_status_t fsl_fxas21002_i2cspi_3D_gyro_EndData(isf_SensorHandle_t *pSensorHandle)
This is the concrete implementation of the FXAS21002 sensor adapter for End Data. ...
Definition: fsl_fxas21002_i2cspi_3D_gyro.c:498
fsl_fxas21002_i2cspi_3D_gyro_Convert
isf_dsa_status_t fsl_fxas21002_i2cspi_3D_gyro_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_fxas21002_i2cspi_3D_gyro.c:727
FXAS21002_1.h
fxas21002_DataBuffer_t
This structure defines the dummy DSA data buffer format.
Definition: fsl_fxas21002_i2cspi_3D_gyro.h:25
fxas21002_SupportedSensorTypes
isf_SensorTypes_t fxas21002_SupportedSensorTypes[]
Supported sensor and data types for FXAS21002.
Definition: fsl_fxas21002_i2cspi_3D_gyro.c:54
fsl_fxas21002_i2cspi_3D_gyro_Configure
isf_dsa_status_t fsl_fxas21002_i2cspi_3D_gyro_Configure(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
This is the concrete implementation of the FXAS21002 sensor adapter for configuration.
Definition: fsl_fxas21002_i2cspi_3D_gyro.c:306
fsl_fxas21002_i2cspi_3D_gyro_StartData
isf_dsa_status_t fsl_fxas21002_i2cspi_3D_gyro_StartData(isf_SensorHandle_t *pSensorHandle)
This is the concrete implementation of the FXAS21002 sensor adapter for start Data.
Definition: fsl_fxas21002_i2cspi_3D_gyro.c:436
isf_dsa_Adapter_st::devInfo
isf_dsa_DeviceInfoBlock_t devInfo
Definition: isf_dsa_adapter.h:146
FXAS21002_CTRL_REG3
Definition: fxas21002.h:56
isf_util.h
The isf_util.h file contains the utility method declarations and macros.
FXAS21002_SET_FIELD
#define FXAS21002_SET_FIELD(name, val)
Definition: fxas21002.h:66
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
FXAS21002_1_Adapter
const isf_dsa_Adapter_t FXAS21002_1_Adapter
This creates the sensor adapter instance for the target sensor.
Definition: FXAS21002_1.c:77
FXAS21002_CTRL_REG1
Definition: fxas21002.h:54
isf_dsa_DeviceInfoBlock_st::pSupportedSensorTypes
isf_SensorTypes_t * pSupportedSensorTypes
Definition: isf_dsa_adapter.h:70
fxas21002_Sensor_Specific_Settings_t
Definition: fxas21002.h:210
fsl_fxas21002_i2cspi_3D_gyro_ValidateSettings
isf_dsa_status_t fsl_fxas21002_i2cspi_3D_gyro_ValidateSettings(isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
This is the concrete implementation of the FXAS21002 sensor adapter for validating current settings...
Definition: fsl_fxas21002_i2cspi_3D_gyro.c:267
isf.h
Main ISF header file. Contains code common to all ISF components.
fsl_fxas21002_i2cspi_3D_gyro_Shutdown
isf_dsa_status_t fsl_fxas21002_i2cspi_3D_gyro_Shutdown(isf_SensorHandle_t *pSensorHandle)
This is the concrete implementation of the FXAS21002 sensor adapter for shutdown .
Definition: fsl_fxas21002_i2cspi_3D_gyro.c:581
FXAS21002_CTRL_REG0
Definition: fxas21002.h:48
fxas21002_SupportedDataTypes
isf_SensorDataTypes_t fxas21002_SupportedDataTypes[]
Definition: fsl_fxas21002_i2cspi_3D_gyro.c:55
fsl_fxas21002_i2cspi_3D_gyro_Initialize
isf_dsa_status_t fsl_fxas21002_i2cspi_3D_gyro_Initialize(isf_SensorHandle_t *pSensorHandle)
This is the concrete implementation of the FXAS21002 sensor adapter initialization.
Definition: fsl_fxas21002_i2cspi_3D_gyro.c:181
FXAS21002_1_Sensor_Specific_Config
fxas21002_Sensor_Specific_Settings_t FXAS21002_1_Sensor_Specific_Config
This allows access to the sensor specific configuration for the target sensor.
Definition: FXAS21002_1.c:58
FXAS21002_CTRL_REG2
Definition: fxas21002.h:55
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.