Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of AdiSense1000 by
ADISENSE Host SPI interface functions
[ADISENSE Host Portability Layer]
Typedefs | |
typedef void * | ADI_SENSE_SPI_HANDLE |
Functions | |
ADI_SENSE_RESULT | adi_sense_SpiOpen (ADI_SENSE_PLATFORM_SPI_CONFIG *pConfig, ADI_SENSE_SPI_HANDLE *phDevice) |
Open the SPI interface and allocate resources. | |
void | adi_sense_SpiClose (ADI_SENSE_SPI_HANDLE hDevice) |
Close SPI interface and free resources. | |
ADI_SENSE_RESULT | adi_sense_SpiTransfer (ADI_SENSE_SPI_HANDLE hDevice, void *pTxData, void *pRxData, unsigned nLength, bool bCsHold) |
Transfer data to slave device. |
Typedef Documentation
typedef void* ADI_SENSE_SPI_HANDLE |
A handle used in all API functions to identify the SPI interface context
Definition at line 56 of file adi_sense_spi.h.
Function Documentation
void adi_sense_SpiClose | ( | ADI_SENSE_SPI_HANDLE | hDevice ) |
Close SPI interface and free resources.
- Parameters:
-
[in] hDevice SPI interface context handle (adi_sense_SpiOpen)
Definition at line 195 of file adi_sense_spi.cpp.
ADI_SENSE_RESULT adi_sense_SpiOpen | ( | ADI_SENSE_PLATFORM_SPI_CONFIG * | pConfig, |
ADI_SENSE_SPI_HANDLE * | phDevice | ||
) |
Open the SPI interface and allocate resources.
- Parameters:
-
[in] pConfig Pointer to platform-specific SPI interface details [out] phDevice Pointer to return a SPI interface context handle
- Returns:
- Status
- ADI_SENSE_SUCCESS Call completed successfully
- ADI_SENSE_NO_MEM Failed to allocate memory for interface context
Definition at line 151 of file adi_sense_spi.cpp.
ADI_SENSE_RESULT adi_sense_SpiTransfer | ( | ADI_SENSE_SPI_HANDLE | hDevice, |
void * | pTxData, | ||
void * | pRxData, | ||
unsigned | nLength, | ||
bool | bCsHold | ||
) |
Transfer data to slave device.
- Parameters:
-
[in] hDevice SPI interface context handle (adi_sense_SpiOpen) [in] pTxData Transmit data buffer, or NULL for read-only transfers [in] pRxData Receive data buffer, or NULL for write-only transfers [in] nLength Number of bytes to transfer [in] bCsHold Leave the chip-select asserted when the transfer is done
- Returns:
- Status
- ADI_SENSE_SUCCESS Call completed successfully
- ADI_SENSE_FAILURE Failed to complete SPI transfer
Definition at line 174 of file adi_sense_spi.cpp.
Generated on Wed Jul 13 2022 13:02:05 by
