![]() |
ISF
2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
|
Data Structures | |
struct | fxls8471_Specific_Settings_t |
This structure defines important settings. More... | |
struct | fxls8471_DataBuffer_t |
This structure defines the dummy DSA data buffer format. More... | |
Macros | |
#define | BYTES_FOR_FULL_READ 7 |
This function retrieves the raw data from the FXLS8471 sensor. More... | |
Typedefs | |
typedef int32 | fxls8471_status_t |
Enumerations | |
enum | { FSL_FXLS8471_ACCEL_800HZ = 1250, FSL_FXLS8471_ACCEL_400HZ = 2500, FSL_FXLS8471_ACCEL_200HZ = 5000, FSL_FXLS8471_ACCEL_100HZ = 10000, FSL_FXLS8471_ACCEL_50HZ = 20000, FSL_FXLS8471_ACCEL_12p5HZ = 80000, FSL_FXLS8471_ACCEL_6p25HZ = 160000, FSL_FXLS8471_ACCEL_1p56HZ = 640000 } |
This enumerator describes the available sample rates for the FXLS8471 accelerometer. More... | |
enum | { FSL_FXLS8471_ACCEL_SCALE_2G = 0, FSL_FXLS8471_ACCEL_SCALE_4G = 1, FSL_FXLS8471_ACCEL_SCALE_8G = 2 } |
This enumerator describes the available acceleration ranges for the MM865X family of accelerometers. More... | |
Functions | |
void | fxls8471_Reset (int32_t *status, void *pSensorHandle) |
This function resets the FXLS8471 sensor resulting in a default configuration for all registers. More... | |
void | fxls8471_CheckId (int32_t *status, void *pSensorHandle) |
This function validates the FXLS8471 sensor is connected via the I2C bus. More... | |
void | fxls8471_SetMode (int32_t *status, void *pSensorHandle, int32_t Mode) |
This function sets the FXLS8471 part to the requested mode. More... | |
void | fxls8471_ValidateConfig (int32_t *status, void *pSensorHandle, void *pSettings) |
This function validates the configuration for the FXLS8471 sensor. More... | |
isf_dsa_status_t | fxls8471_GetConfig (isf_dsa_SensorSettings_t *pRequiredSettings, DeviceDescriptor_t *pDeviceDes) |
This function obtains the configuration register values for a given user configuration of the FXLS8471. If the configuration has changed then it returns true and saves the new configuration. More... | |
isf_dsa_status_t | fxls8471_SetConfig (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pConfigSettings) |
This function sets the FXLS8471 sensor configuration. More... | |
isf_dsa_status_t | fxls8471_GetData (isf_SensorHandle_t *pSensorHandle, void *pBuffer) |
isf_dsa_status_t | fsl_fxls8471_i2cspi_3D_accel_Initialize (isf_SensorHandle_t *pSensorHandle) |
isf_dsa_status_t | fsl_fxls8471_i2cspi_3D_accel_ValidateSettings (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings) |
isf_dsa_status_t | fsl_fxls8471_i2cspi_3D_accel_Configure (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings) |
isf_dsa_status_t | fsl_fxls8471_i2cspi_3D_accel_StartData (isf_SensorHandle_t *pSensorHandle) |
isf_dsa_status_t | fsl_fxls8471_i2cspi_3D_accel_EndData (isf_SensorHandle_t *pSensorHandle) |
isf_dsa_status_t | fsl_fxls8471_i2cspi_3D_accel_Calibrate (isf_SensorHandle_t *pSensorHandle, void *pCalData) |
isf_dsa_status_t | fsl_fxls8471_i2cspi_3D_accel_Shutdown (isf_SensorHandle_t *pSensorHandle) |
void | fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback (void *pSensorHandle) |
isf_dsa_status_t | fsl_fxls8471_i2cspi_3D_accel_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. More... | |
Variables | |
struct { | |
float floatFactor | |
float floatOffset | |
int32 fixedFactor | |
int32 fixedOffset | |
} | fxls8471AccelConvTable [] |
isf_SensorTypes_t | fxls8471_SupportedSensorTypes [] = { TYPE_ACCELEROMETER_3D, TYPE_NATIVE_SENSOR_TYPE } |
Supported sensor and data types for FXLS8471. More... | |
isf_SensorDataTypes_t | fxls8471_SupportedDataTypes [] = { TYPE_RAW_ACCELERATION_3D, TYPE_NATIVE_SENSOR_DATA_TYPE } |
isf_SensorTypes_t | fxls8471_SupportedSensorTypes [] |
Supported sensor and data types for FXLS8471. More... | |
isf_SensorDataTypes_t | fxls8471_SupportedDataTypes [] |
#define BYTES_FOR_FULL_READ 7 |
This function retrieves the raw data from the FXLS8471 sensor.
Definition at line 804 of file fsl_fxls8471_i2cspi_3D_accel.c.
Referenced by fxls8471_GetData().
typedef int32 fxls8471_status_t |
Definition at line 70 of file fsl_fxls8471_i2cspi_3D_accel.c.
anonymous enum |
This enumerator describes the available sample rates for the FXLS8471 accelerometer.
Definition at line 27 of file fsl_fxls8471_i2cspi_3D_accel.h.
anonymous enum |
This enumerator describes the available acceleration ranges for the MM865X family of accelerometers.
Enumerator | |
---|---|
FSL_FXLS8471_ACCEL_SCALE_2G |
select +/-2G range |
FSL_FXLS8471_ACCEL_SCALE_4G |
select +/-4G range |
FSL_FXLS8471_ACCEL_SCALE_8G |
select +/-8G range |
Definition at line 39 of file fsl_fxls8471_i2cspi_3D_accel.h.
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Calibrate | ( | isf_SensorHandle_t * | pSensorHandle, |
void * | pCalData | ||
) |
Definition at line 449 of file fsl_fxls8471_i2cspi_3D_accel.c.
References ISF_SUCCESS.
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Configure | ( | isf_SensorHandle_t * | pSensorHandle, |
isf_dsa_SensorSettings_t * | pSensorSettings | ||
) |
Definition at line 236 of file fsl_fxls8471_i2cspi_3D_accel.c.
References isf_SensorHandle_st::adapterStatus, BM_ERROR, bm_register_periodic_callback(), DeviceDescriptor_struct::cDescriptor, isf_SensorHandle_st::controlData, DeviceDescriptor_struct::deviceSemaphore, dm_channel_acquire_lock(), dm_channel_release_lock(), DSA_ERR_CONFIGURE, DSA_ERR_PARAM, DSA_STATE_CONFIGURED_STOPPED, DSA_STATE_INITIALIZED, fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback(), fxls8471_SetConfig(), fxls8471_SetMode(), ISF_SUCCESS, isf_dsa_SensorSettings_st::nSamplePeriod, isf_SensorHandle_st::pDeviceDescriptor, SENSOR_STANDBY, isf_dsa_ControlData_st::sensorSettings, and DeviceDescriptor_struct::token.
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_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 at line 592 of file fsl_fxls8471_i2cspi_3D_accel.c.
References DSA_ERR_BAD_RESULT_TYPE, DSA_ERR_BAD_SENSOR_DATA_TYPE, DSA_RESULT_TYPE_ENG_FIXED, DSA_RESULT_TYPE_ENG_FLOAT, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, and TYPE_RAW_ACCELERATION_3D.
Referenced by fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback().
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_EndData | ( | isf_SensorHandle_t * | pSensorHandle | ) |
Definition at line 385 of file fsl_fxls8471_i2cspi_3D_accel.c.
References isf_SensorHandle_st::adapterStatus, BM_ERROR, bm_stop(), DeviceDescriptor_struct::deviceSemaphore, DSA_ERR_END_DATA, DSA_ERR_PARAM, DSA_STATE_CONFIGURED_STARTED, DSA_STATE_CONFIGURED_STOPPED, fxls8471_SetMode(), ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, SENSOR_STANDBY, and DeviceDescriptor_struct::token.
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Initialize | ( | isf_SensorHandle_t * | pSensorHandle | ) |
Definition at line 100 of file fsl_fxls8471_i2cspi_3D_accel.c.
References fxls8471_DataBuffer_t::accel, isf_SensorHandle_st::adapterStatus, spi_master_CommSpecificInfo_t::busConfig, DeviceDescriptor_struct::cDescriptor, SensorConfig_st::channelId, COMM_STATE_INIT, COMM_STATE_OK, SensorConfig_st::commInfo, DeviceDescriptor_struct::deviceHandle, DeviceDescriptor_struct::deviceSemaphore, dm_channel_configure(), dm_channel_get_state(), dm_channel_init(), dm_channel_start(), dm_device_open(), DSA_ERR_INITIALIZE, DSA_ERR_PARAM, DSA_STATE_INITIALIZED, DSA_STATE_NOT_INITIALIZED, fxls8471_CheckId(), ISF_SUCCESS, DeviceDescriptor_struct::pCurrentSample, isf_SensorHandle_st::pDeviceDescriptor, isf_SensorHandle_st::pSensorStaticConfig, spi_master_CommSpecificInfo_t::pSlaveInfo, DeviceDescriptor_struct::skipFramecnt, and fxls8471_DataBuffer_t::timeStamp.
void fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback | ( | void * | pSensorHandle | ) |
Definition at line 498 of file fsl_fxls8471_i2cspi_3D_accel.c.
References fxls8471_DataBuffer_t::accel, isf_SensorHandle_st::adapterStatus, isf_SensorHandle_st::controlData, DeviceDescriptor_struct::deviceSemaphore, DSA_STATE_CONFIGURED_STARTED, fsl_fxls8471_i2cspi_3D_accel_Convert(), fxls8471_GetData(), isf_fifo_el_get_insert_pointer(), isf_fifo_el_increment(), ISF_FIFO_FULL, isf_fifo_lock(), isf_fifo_unlock(), isf_time_util_get_usec(), isf_dsa_ControlData_st::nEventFieldIndex, DeviceDescriptor_struct::pCurrentSample, isf_SensorHandle_st::pDeviceDescriptor, isf_dsa_ControlData_st::pEventGroup, isf_dsa_SensorSettings_st::pSampleBufferInfo, isf_dsa_SensorSettings_st::resultFormat, isf_dsa_SensorSettings_st::resultType, isf_dsa_ControlData_st::sensorSettings, DeviceDescriptor_struct::skipFramecnt, fxls8471_DataBuffer_t::timeStamp, and TYPE_NATIVE_SENSOR_DATA_TYPE.
Referenced by fsl_fxls8471_i2cspi_3D_accel_Configure().
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_Shutdown | ( | isf_SensorHandle_t * | pSensorHandle | ) |
Definition at line 469 of file fsl_fxls8471_i2cspi_3D_accel.c.
References isf_SensorHandle_st::adapterStatus, bm_unregister_callback(), DSA_ERR_PARAM, DSA_STATE_INITIALIZED, ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, and DeviceDescriptor_struct::token.
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_StartData | ( | isf_SensorHandle_t * | pSensorHandle | ) |
Definition at line 325 of file fsl_fxls8471_i2cspi_3D_accel.c.
References isf_SensorHandle_st::adapterStatus, BM_ERROR, bm_start(), DeviceDescriptor_struct::deviceSemaphore, DSA_ERR_PARAM, DSA_ERR_START_DATA, DSA_STATE_CONFIGURED_STARTED, DSA_STATE_CONFIGURED_STOPPED, FALSE, fxls8471_SetMode(), ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, SENSOR_ACTIVE, and DeviceDescriptor_struct::token.
isf_dsa_status_t fsl_fxls8471_i2cspi_3D_accel_ValidateSettings | ( | isf_SensorHandle_t * | pSensorHandle, |
isf_dsa_SensorSettings_t * | pSensorSettings | ||
) |
Definition at line 207 of file fsl_fxls8471_i2cspi_3D_accel.c.
References DSA_ERR_PARAM, and fxls8471_ValidateConfig().
void fxls8471_CheckId | ( | int32_t * | status, |
void * | pSensorHandle | ||
) |
This function validates the FXLS8471 sensor is connected via the I2C bus.
Definition at line 695 of file fsl_fxls8471_i2cspi_3D_accel.c.
References DeviceDescriptor_struct::deviceHandle, dm_device_read(), FXLS8471_WHO_AM_I, FXLS8471_WHOAMI_VALUE, ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, and SENSOR_ERROR_CHECKID.
Referenced by fsl_fxls8471_i2cspi_3D_accel_Initialize().
isf_dsa_status_t fxls8471_GetConfig | ( | isf_dsa_SensorSettings_t * | pRequiredSettings, |
DeviceDescriptor_t * | pDeviceDes | ||
) |
This function obtains the configuration register values for a given user configuration of the FXLS8471. If the configuration has changed then it returns true and saves the new configuration.
[out] | pRequiredSettings | update the data period in settings |
[out] | pDeviceDes | update the data rate in the generic sensor structure for this device |
0 | is returned when the configuration is valid. |
1 | is returned when the configuration is modified. |
Definition at line 887 of file fsl_fxls8471_i2cspi_3D_accel.c.
References DSA_RET_SETTINGS_CHANGED, FALSE, FSL_FXLS8471_ACCEL_800HZ, isf_dsa_SensorSettings_st::nSamplePeriod, fxls8471_Specific_Settings_t::sampleRateIndex, and TRUE.
Referenced by fxls8471_ValidateConfig().
isf_dsa_status_t fxls8471_GetData | ( | isf_SensorHandle_t * | pSensorHandle, |
void * | pBuffer | ||
) |
Definition at line 806 of file fsl_fxls8471_i2cspi_3D_accel.c.
References BYTES_FOR_FULL_READ, DeviceDescriptor_struct::deviceHandle, dm_device_read(), FXLS8471_GET_FIELD, FXLS8471_STATUS, ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, and SENSOR_ERROR_GETDATA.
Referenced by fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback().
void fxls8471_Reset | ( | int32_t * | status, |
void * | pSensorHandle | ||
) |
This function resets the FXLS8471 sensor resulting in a default configuration for all registers.
Definition at line 665 of file fsl_fxls8471_i2cspi_3D_accel.c.
References DeviceDescriptor_struct::deviceHandle, dm_device_write(), DSA_ERR_INITIALIZE, FXLS8471_ASLP_COUNT, FXLS8471_CTRL_REG2, FXLS8471_RST_MASK, ISF_SUCCESS, and isf_SensorHandle_st::pDeviceDescriptor.
isf_dsa_status_t fxls8471_SetConfig | ( | isf_SensorHandle_t * | pSensorHandle, |
isf_dsa_SensorSettings_t * | pConfigSettings | ||
) |
This function sets the FXLS8471 sensor configuration.
Definition at line 838 of file fsl_fxls8471_i2cspi_3D_accel.c.
References DeviceDescriptor_struct::deviceHandle, dm_device_write(), DSA_ERR_CONFIGURE, FXLS8471_CTRL_REG1, FXLS8471_ERROR, FXLS8471_SET_FIELD, ISF_SUCCESS, isf_SensorHandle_st::pDeviceDescriptor, SensorConfig_st::pSensorSpecificSettings, isf_SensorHandle_st::pSensorStaticConfig, and fxls8471_Specific_Settings_t::sampleRateIndex.
Referenced by fsl_fxls8471_i2cspi_3D_accel_Configure().
void fxls8471_SetMode | ( | int32_t * | status, |
void * | pSensorHandle, | ||
int32_t | Mode | ||
) |
This function sets the FXLS8471 part to the requested mode.
Definition at line 740 of file fsl_fxls8471_i2cspi_3D_accel.c.
References DeviceDescriptor_struct::deviceHandle, and isf_SensorHandle_st::pDeviceDescriptor.
Referenced by fsl_fxls8471_i2cspi_3D_accel_Configure(), fsl_fxls8471_i2cspi_3D_accel_EndData(), and fsl_fxls8471_i2cspi_3D_accel_StartData().
void fxls8471_ValidateConfig | ( | int32_t * | status, |
void * | pSensorHandle, | ||
void * | pSettings | ||
) |
This function validates the configuration for the FXLS8471 sensor.
Definition at line 718 of file fsl_fxls8471_i2cspi_3D_accel.c.
References DSA_RET_SETTINGS_CHANGED, fxls8471_GetConfig(), ISF_SUCCESS, and isf_SensorHandle_st::pDeviceDescriptor.
Referenced by fsl_fxls8471_i2cspi_3D_accel_ValidateSettings().
int32 fixedFactor |
Definition at line 58 of file fsl_fxls8471_i2cspi_3D_accel.c.
int32 fixedOffset |
Definition at line 59 of file fsl_fxls8471_i2cspi_3D_accel.c.
float floatFactor |
Definition at line 56 of file fsl_fxls8471_i2cspi_3D_accel.c.
float floatOffset |
Definition at line 57 of file fsl_fxls8471_i2cspi_3D_accel.c.
isf_SensorDataTypes_t fxls8471_SupportedDataTypes[] |
Definition at line 67 of file fsl_fxls8471_i2cspi_3D_accel.c.
isf_SensorDataTypes_t fxls8471_SupportedDataTypes[] = { TYPE_RAW_ACCELERATION_3D, TYPE_NATIVE_SENSOR_DATA_TYPE } |
Definition at line 67 of file fsl_fxls8471_i2cspi_3D_accel.c.
isf_SensorTypes_t fxls8471_SupportedSensorTypes[] |
Supported sensor and data types for FXLS8471.
Definition at line 66 of file fsl_fxls8471_i2cspi_3D_accel.c.
isf_SensorTypes_t fxls8471_SupportedSensorTypes[] = { TYPE_ACCELEROMETER_3D, TYPE_NATIVE_SENSOR_TYPE } |
Supported sensor and data types for FXLS8471.
Definition at line 66 of file fsl_fxls8471_i2cspi_3D_accel.c.
const { ... } fxls8471AccelConvTable[] |