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

- Main Page
- Modules
- Data Structures
- Files

Macros | Functions | Variables
FXAS21002_2 module documentation

## Macros
#define | FSL_SENSOR_SPI_CMD_LENG 0x1
#define | FXAS21002_2_DATA_TYPE fxas21002_DataBuffer_t

## Functions
isf_status_t | fsl_leon_spi_slave_init (void)
isf_status_t | fsl_leon_spi_slave_write_preprocess (void *pCmdOut, uint32 offset, uint32 size, void *pWritebuffer)
isf_status_t | fsl_leon_spi_slave_write_postprocess (void *pCmdOut)
isf_status_t | fsl_leon_spi_slave_read_preprocess (void *pCmdOut, uint32 offset, uint32 size)
isf_status_t | fsl_leon_spi_slave_read_postprocess (void *pCmdOut, void *pDataOut)

## Variables
fxas21002_Sensor_Specific_Settings_t | FXAS21002_2_Sensor_Specific_Config
| This allows access to the sensor specific configuration for the target sensor. More...
const isf_dsa_Adapter_t | FXAS21002_2_Adapter
| This creates the sensor adapter instance for the target sensor. More...
spi_master_slaveInfo_t | fsl_spi_sensor_type_FXAS21002_2
const spi_master_CommSpecificInfo_t | FXAS21002_2_DeviceInfo
| This allows access to the sensor communications specific configuration. More...
fxas21002_Sensor_Specific_Settings_t | FXAS21002_2_Sensor_Specific_Config
| This allows access to the sensor specific configuration for the target sensor. More...
const isf_dsa_Adapter_t | FXAS21002_2_Adapter
| This allows access to the sensor adapter instance for the target sensor. More...
const spi_master_CommSpecificInfo_t | FXAS21002_2_DeviceInfo
| This allows access to the sensor communications specific configuration. More...

## Detailed Description

## Macro Definition Documentation

#define FSL_SENSOR_SPI_CMD_LENG 0x1

Definition at line 102 of file FXAS21002_2.c.

Referenced by fsl_leon_spi_slave_read_postprocess(), fsl_leon_spi_slave_read_preprocess(), and fsl_leon_spi_slave_write_preprocess().

#define FXAS21002_2_DATA_TYPE fxas21002_DataBuffer_t

Definition at line 69 of file FXAS21002_2.h.

## Function Documentation

isf_status_t fsl_leon_spi_slave_init | ( | void |  | ) |

Definition at line 141 of file FXAS21002_2.c.

References ISF_SUCCESS, and ResetSensor_OutConfig0.

isf_status_t fsl_leon_spi_slave_read_postprocess | ( | void * | pCmdOut,
|  | void * | pDataOut
| ) |  |

Definition at line 202 of file FXAS21002_2.c.

References FSL_SENSOR_SPI_CMD_LENG, ISF_MEM_CPY, ISF_SUCCESS, J1_1, spi_mater_SlaveCmd::pReadBuffer, and spi_mater_SlaveCmd::size.

isf_status_t fsl_leon_spi_slave_read_preprocess | ( | void * | pCmdOut,
|  | uint32 | offset,
|  | uint32 | size
| ) |  |

Definition at line 181 of file FXAS21002_2.c.

References FSL_SENSOR_SPI_CMD_LENG, ISF_SUCCESS, J1_1, spi_mater_SlaveCmd::pReadBuffer, spi_mater_SlaveCmd::pWriteBuffer, and spi_mater_SlaveCmd::size.

isf_status_t fsl_leon_spi_slave_write_postprocess | ( | void * | pCmdOut | ) |

Definition at line 173 of file FXAS21002_2.c.

References ISF_SUCCESS, and J1_1.

isf_status_t fsl_leon_spi_slave_write_preprocess | ( | void * | pCmdOut,
|  | uint32 | offset,
|  | uint32 | size,
|  | void * | pWritebuffer
| ) |  |

Definition at line 149 of file FXAS21002_2.c.

References FSL_SENSOR_SPI_CMD_LENG, ISF_MEM_CPY, ISF_SUCCESS, J1_1, spi_mater_SlaveCmd::pReadBuffer, spi_mater_SlaveCmd::pWriteBuffer, and spi_mater_SlaveCmd::size.

## Variable Documentation

spi_master_slaveInfo_t fsl_spi_sensor_type_FXAS21002_2

Initial value:
= {
.slaveinit = (fnslaveinit_t)&fsl_leon_spi_slave_init,
.writepreProcess = (fnwritepreProcessing_t)fsl_leon_spi_slave_write_preprocess,
.writepostProcess = (fnwritepostProcossing_t)fsl_leon_spi_slave_write_postprocess,
.readpreProcess = (fnreadpreProcessing_t)fsl_leon_spi_slave_read_preprocess,
.readpostProcess = (fnreadpostProcossing_t)fsl_leon_spi_slave_read_postprocess
}
fsl_leon_spi_slave_write_postprocess
isf_status_t fsl_leon_spi_slave_write_postprocess(void *pCmdOut)
Definition: FXAS21002_2.c:173
fnwritepreProcessing_t
isf_status_t(* fnwritepreProcessing_t)(void *cmdOut, uint32 offset, uint32 size, void *writebuffer)
Definition: isf_spi_master_types.h:45
fsl_leon_spi_slave_read_postprocess
isf_status_t fsl_leon_spi_slave_read_postprocess(void *pCmdOut, void *pDataOut)
Definition: FXAS21002_2.c:202
fnwritepostProcossing_t
isf_status_t(* fnwritepostProcossing_t)(void *cmd)
Definition: isf_spi_master_types.h:46
fnreadpreProcessing_t
isf_status_t(* fnreadpreProcessing_t)(void *cmdout, uint32 offset, uint32 size)
Definition: isf_spi_master_types.h:47
fsl_leon_spi_slave_read_preprocess
isf_status_t fsl_leon_spi_slave_read_preprocess(void *pCmdOut, uint32 offset, uint32 size)
Definition: FXAS21002_2.c:181
fnreadpostProcossing_t
isf_status_t(* fnreadpostProcossing_t)(void *cmd, void *dataOut)
Definition: isf_spi_master_types.h:48
fsl_leon_spi_slave_write_preprocess
isf_status_t fsl_leon_spi_slave_write_preprocess(void *pCmdOut, uint32 offset, uint32 size, void *pWritebuffer)
Definition: FXAS21002_2.c:149
fsl_leon_spi_slave_init
isf_status_t fsl_leon_spi_slave_init(void)
Definition: FXAS21002_2.c:141
fnslaveinit_t
isf_status_t(* fnslaveinit_t)(void)
Definition: isf_spi_master_types.h:44

Definition at line 103 of file FXAS21002_2.c.

const isf_dsa_Adapter_t FXAS21002_2_Adapter

This allows access to the sensor adapter instance for the target sensor.

This allows access to the sensor adapter instance for the target sensor.

Definition at line 86 of file FXAS21002_2.c.

const isf_dsa_Adapter_t FXAS21002_2_Adapter

Initial value:
=
{
.devInfo.pSupportedSensorTypes = fxas21002_SupportedSensorTypes,
.devInfo.pSupportedSensorDataTypes = fxas21002_SupportedDataTypes,
.devInfo.nNativeDataSetSize = sizeof(fxas21002_DataBuffer_t),
.control.Initialize = &fsl_fxas21002_i2cspi_3D_gyro_Initialize,
.control.ValidateSettings = &fsl_fxas21002_i2cspi_3D_gyro_ValidateSettings,
.control.Configure = &fsl_fxas21002_i2cspi_3D_gyro_Configure,
.control.StartData = &fsl_fxas21002_i2cspi_3D_gyro_StartData,
.control.EndData = &fsl_fxas21002_i2cspi_3D_gyro_EndData,
.control.Calibrate = &fsl_fxas21002_i2cspi_3D_gyro_Calibrate,
.control.Shutdown = &fsl_fxas21002_i2cspi_3D_gyro_Shutdown,
.control.Convert = &fsl_fxas21002_i2cspi_3D_gyro_Convert
}
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
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_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
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
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_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

This creates the sensor adapter instance for the target sensor.

This allows access to the sensor adapter instance for the target sensor.

Definition at line 86 of file FXAS21002_2.c.

const spi_master_CommSpecificInfo_t FXAS21002_2_DeviceInfo

This allows access to the sensor communications specific configuration.

Definition at line 112 of file FXAS21002_2.c.

const spi_master_CommSpecificInfo_t FXAS21002_2_DeviceInfo

Initial value:
=
{
.busConfig =
{
.timeout = 1000U,
.device =
{
.bitsPerSec = 500000U,
.dataBusConfig.bitsPerFrame = 8U,
.dataBusConfig.clkPolarity = kDspiClockPolarity_ActiveHigh,
.dataBusConfig.clkPhase = kDspiClockPhase_FirstEdge,
.dataBusConfig.direction = kDspiMsbFirst,
},
.userConfig =
{
.whichCtar = kDspiCtar0,
.isSckContinuous = false,
.isChipSelectContinuous = false,
.whichPcs = kDspiPcs0,
.pcsPolarity = kDspiPcs_ActiveHigh,
},
},
.pSlaveInfo = &fsl_spi_sensor_type_FXAS21002_2
}
fsl_spi_sensor_type_FXAS21002_2
spi_master_slaveInfo_t fsl_spi_sensor_type_FXAS21002_2
Definition: FXAS21002_2.c:103

This allows access to the sensor communications specific configuration.

Definition at line 112 of file FXAS21002_2.c.

fxas21002_Sensor_Specific_Settings_t FXAS21002_2_Sensor_Specific_Config

Initial value:
=
{
.gyroFullScaleRange = 3,
.fsdouble = 0,
.regCount = 4,
.regPairs =
{
{ FXAS21002_CTRL_REG0, (FXAS21002_SET_FIELD(BW,0)) | (FXAS21002_SET_FIELD(SPIW,0)) | (FXAS21002_SET_FIELD(HPF_EN,0)) | (FXAS21002_SET_FIELD(FS,3)) },
{ FXAS21002_CTRL_REG1, (FXAS21002_SET_FIELD(DR,0)) },
{ FXAS21002_CTRL_REG2, 0 },
{ FXAS21002_CTRL_REG3, (FXAS21002_SET_FIELD(WRAPTOONE,0)) | (FXAS21002_SET_FIELD(EXTCTRLEN,0)) | (FXAS21002_SET_FIELD(FSDOUBLE,0)) },
}
}
FXAS21002_CTRL_REG3
Definition: fxas21002.h:56
FXAS21002_SET_FIELD
#define FXAS21002_SET_FIELD(name, val)
Definition: fxas21002.h:66
FXAS21002_CTRL_REG1
Definition: fxas21002.h:54
FXAS21002_CTRL_REG0
Definition: fxas21002.h:48
FXAS21002_CTRL_REG2
Definition: fxas21002.h:55

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

Definition at line 67 of file FXAS21002_2.c.

fxas21002_Sensor_Specific_Settings_t FXAS21002_2_Sensor_Specific_Config

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

Definition at line 67 of file FXAS21002_2.c.

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