
RDAIRPABPSI5UG , Rev. 2.0
34
Freescale Semiconductor, Inc.
Installing the Software and Setting up the Hardware
6.5.1
ACC API Parameters Detail Descriptions
A brief description of input and output API parameters is in the following paragraphs. Descriptions contain only a verbal description of the
parameter. Values which each variable acquires are described in the header file MMA68xx.h.
Parameters of the Acc_Init API function:
•
Spi_Channel (Acc_SpiChannelType) - logical SPI channel number (not physical SPI channel)
•
Config (Acc_ConfigType) - input configuration structure:
•
Acc_ConfSignData - this variable determines the format of acceleration data results
•
Acc_OffsetMoni - offset monitor circuit enable/disable
•
Acc_ArmOutput - mode of operation for the ARM_X/PCM_X and ARM_Y/PCM_Y pins
•
Acc_XAxisSelfTest - enable or disable the self-test circuitry for X axis
•
Acc_YAxisSelfTest - enable or disable the self-test circuitry for Y axis
•
Acc_XLowPassFilter - the low pass filter selection bits independently select a low-pass filter for X axis
•
Acc_YLowPassFilter - the low pass filter selection bits independently select a low-pass filter for Y axis
•
Acc_XArmPulseStretch - pulse stretch time for X arming outputs
•
Acc_YArmPulseStretch - pulse stretch time for Y arming outputs
•
Acc_XArm_PosWin_CountLimit - X axis positive arming window size definitions or arming count limit definitions
function (depending on the state of the Acc_ArmOutput variable)
•
Acc_YArm_PosWin_CountLimit - Y axis positive arming window size definitions or arming count limit definitions
function (depending on the state of the Acc_ArmOutput variable)
•
Acc_XArm_NegWinSize - X axis negative arming window size definitions (meaning depend on the state of the
Acc_ArmOutput variable)
•
Acc_YArm_NegWinSize - Y axis negative arming window size definitions (meaning depend on the state of the
Acc_ArmOutput variable)
•
Acc_XArmPositiveThreshold - this value contain the X axis positive threshold to be used by the arming function
•
Acc_YArmPositiveThreshold - this value contain the Y axis positive threshold to be used by the arming function
•
Acc_XArmNegativeThreshold - this value contain the X axis negative thresholds to be used by the arming function
•
Acc_YArmNegativeThreshold - this value contain the Y axis negative thresholds to be used by the arming function
Parameters of the Acc_GetStatus API function:
•
Spi_Channel (Acc_SpiChannelType) - logical SPI channel number (not physical SPI channel)
•
Status (Acc_StatusType) output status structure containing the complete status of the ACC device:
•
Acc_SerialNumber - device serial number
•
Acc_LotNumberHigh - device high lot number value
•
Acc_LotNumberMidd - device midd lot number value
•
Acc_LotNumberLow - device low lot number value
•
Acc_PartNumber - device part number
•
Acc_XPositiveTestDeflection - device self test positive deflection values for X axis
•
Acc_YPositiveTestDeflection - self test positive deflection values for Y axis
•
Acc_XFullScaleAccelerationRange - X self test magnitude selection
•
Acc_YFullScaleAccelerationRange - Y self test magnitude selection
•
Acc_DeviceReset - this device reset flag is set during device initialization following a device reset
•
Acc_X_OffsetOverRange - the offset monitor over range flag is set if the acceleration signal of the X axis reaches
the specified offset limit
Acc_ProgramCmd
Spi_Channel [in]
RegAddress [in] Data [in]
SpiResponse [out]
Acc_ReturnType
Read/write independently any IC register.
Table 23: Central Accelerometer SW Driver API (continued)