
RDAIRPABPSI5UG , Rev. 2.0
Freescale Semiconductor
33
Installing the Software and Setting up the Hardware
Parameters of the Asbc_GetGpoStatus API function:
•
Spi_Channel (Asbc_SpiChannelType) - logical SPI channel number (not physical SPI channel)
•
GpoChannel (Asbc_GpoChannelType) - selected GPO pin
•
Status (Asbc_GpoStatusType) output structure containing the status of the selected output:
•
Asbc_GpoDriverConfig - HS/LS driver configuration selection
•
Asbc_GpoDriverOn13 - driver ON 1/3 VPWR comparator result
•
Asbc_GpoDriverOn23 - driver ON 2/3 VPWR comparator result
•
Asbc_GpoDriverOff13 - driver OFF 1/3 VPWR comparator result
•
Asbc_GpoDriverOff23 - driver OFF 2/3 VPWR comparator result
Parameters of the Asbc_ReadSensor API function:
•
Spi_Channel (Asbc_SpiChannelType) - logical SPI channel number (not physical SPI channel)
•
SequenceIdentifier (Asbc_PSI5SequenceIdentifierType) - PSI5 sequence identifier (used for synchronizing samples)
•
LogicalChannel (Asbc_PSI5LogicalChannelType) - PSI5 logical channel selection
•
SensorData (unit16) - data from selected satellite sensor
•
SensorStatus (Asbc_SensorStatusType) - satellite sensor response status
Parameters of the Asbc_FeedWatchdog API function:
•
Spi_Channel (Asbc_SpiChannelType) - logical SPI channel number (not physical SPI channel)
•
WD_Polarity (Asbc_WdLevelType) - watchdog polarity value
Parameters of the Asbc_ProgramCmd API function:
•
Spi_Channel (Asbc_SpiChannelType) - logical SPI channel number (not physical SPI channel)
•
Command (Asbc_SpiChannelType) - non sensor command
•
Data (unit16) - data
•
SpiResponse (unit16) - response to the sent command
6.5 Central Accelerometer Driver
The Central Accelerometer Driver (ACC) is created as a separate software module. The main advantage is full HW abstraction and API
independence used in the MCU family. The driver API covers the entire functionality of the main accelerometer, which means all
accelerometer functionality can be controlled using API functions.
The ACC Driver is dependent on the BSD layer (basic SPI driver), and on the GPIO driver (General Purpose Input/Output), which provides
basic functions for controlling input/output MCU pins.
Table 23: Central Accelerometer SW Driver API
Function Name
Function Parameters
Return Type
Function Description
Acc_Init
Spi_Channel [in]
*Config [in]
Acc_ReturnType
Initialize the central accelerometer device and returns the
confirmation of initialization. Multiple initialization configuration is
supported via the Config parameter.
Acc_GetStatus
Spi_Channel [in]
*Status [out]
Acc_ReturnType
Return the whole status of the Mesquite accelerometer device.
Acc_GetAccelData
Spi_Channel [in]
AccelCmdX [in]
AccelCmdY [in]
*Status [out]
Acc_ReturnType
Read the X and Y axis accelerometer moving values and other
necessary statuses.