Sean Wilson / Mbed OS AdiSense1000_V21

Fork of AdiSense1000 by PoC_Team

Embed: (wiki syntax)

« Back to documentation index

ADISENSE Host SPI interface functions

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]hDeviceSPI 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]pConfigPointer to platform-specific SPI interface details
[out]phDevicePointer to return a SPI interface context handle
Returns:
Status

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]hDeviceSPI interface context handle (adi_sense_SpiOpen)
[in]pTxDataTransmit data buffer, or NULL for read-only transfers
[in]pRxDataReceive data buffer, or NULL for write-only transfers
[in]nLengthNumber of bytes to transfer
[in]bCsHoldLeave the chip-select asserted when the transfer is done
Returns:
Status

Definition at line 174 of file adi_sense_spi.cpp.