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.
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] hDevice SPI interface context handle (admw_SpiOpen)
Definition at line 174 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] pConfig Pointer to platform-specific SPI interface details [out] phDevice Pointer to return a SPI interface context handle
- Returns:
- Status
- ADMW_SUCCESS Call completed successfully
- ADMW_NO_MEM Failed to allocate memory for interface context
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] hDevice SPI interface context handle (admw_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
- ADMW_SUCCESS Call completed successfully
- ADMW_FAILURE Failed to complete SPI transfer
Definition at line 138 of file admw_spi.cpp.
Generated on Wed Jul 13 2022 03:04:55 by
