Bumped Mbed FW version to 01.20.0080

Embed: (wiki syntax)

« Back to documentation index

ADMW Host SPI interface functions

ADMW Host SPI interface functions
[ADMW Host Portability Layer]

Typedefs

typedef void * ADMW_SPI_HANDLE

Functions

ADMW_RESULT admw_SpiOpen (ADMW_PLATFORM_SPI_CONFIG *pConfig, ADMW_SPI_HANDLE *phDevice)
 Open the SPI interface and allocate resources.
void admw_SpiClose (ADMW_SPI_HANDLE hDevice)
 Close SPI interface and free resources.
ADMW_RESULT admw_SpiTransfer (ADMW_SPI_HANDLE hDevice, void *pTxData, void *pRxData, unsigned nLength, bool bCsHold)
 Transfer data to slave device.

Typedef Documentation

typedef void* ADMW_SPI_HANDLE

A handle used in all API functions to identify the SPI interface context

Definition at line 56 of file admw_spi.h.


Function Documentation

void admw_SpiClose ( ADMW_SPI_HANDLE  hDevice )

Close SPI interface and free resources.

Parameters:
[in]hDeviceSPI interface context handle (admw_SpiOpen)

Definition at line 171 of file admw_spi.cpp.

ADMW_RESULT admw_SpiOpen ( ADMW_PLATFORM_SPI_CONFIG *  pConfig,
ADMW_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 71 of file admw_spi.cpp.

ADMW_RESULT admw_SpiTransfer ( ADMW_SPI_HANDLE  hDevice,
void *  pTxData,
void *  pRxData,
unsigned  nLength,
bool  bCsHold 
)

Transfer data to slave device.

Parameters:
[in]hDeviceSPI interface context handle (admw_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 138 of file admw_spi.cpp.