![]() |
Synergy Software Package User's Manual
|
#include <r_spi_api.h>
Data Fields | |
| ssp_err_t(* | open )(spi_ctrl_t *p_ctrl, spi_cfg_t const *const p_cfg) |
| ssp_err_t(* | read )(spi_ctrl_t *const p_ctrl, void const *p_dest, uint32_t const length, spi_bit_width_t const bit_width) |
| ssp_err_t(* | write )(spi_ctrl_t *const p_ctrl, void const *p_src, uint32_t const length, spi_bit_width_t const bit_width) |
| ssp_err_t(* | writeRead )(spi_ctrl_t *const p_ctrl, void const *p_src, void const *p_dest, uint32_t const length, spi_bit_width_t const bit_width) |
| ssp_err_t(* | close )(spi_ctrl_t *const p_ctrl) |
| ssp_err_t(* | versionGet )(ssp_version_t *p_version) |
Shared Interface definition for SPI
| ssp_err_t(* spi_api_t::close) (spi_ctrl_t *const p_ctrl) |
Remove power to the SPI channel designated by the handle and disable the associated interrupts.
| [in] | p_ctrl | Pointer to the control block for the channel. |
| ssp_err_t(* spi_api_t::open) (spi_ctrl_t *p_ctrl, spi_cfg_t const *const p_cfg) |
Initialize a channel for SPI communication mode.
| [in,out] | p_ctrl | Pointer to user-provided storage for the control block. |
| [in] | p_cfg | Pointer to SPI configuration structure. |
| ssp_err_t(* spi_api_t::read) (spi_ctrl_t *const p_ctrl, void const *p_dest, uint32_t const length, spi_bit_width_t const bit_width) |
Receive data from an SPI device.
| [in] | p_ctrl | Pointer to the control block for the channel. |
| [in] | length | Number of units of data to be transferred (unit size specified by the bit_width). |
| [in] | bit_width | Data bit width to be transferred. |
| [out] | p_dest | Pointer to destination buffer into which data will be copied that is received from a SPI device. It is the responsibility of the caller to ensure that adequate space is available to hold the requested data count. |
| ssp_err_t(* spi_api_t::versionGet) (ssp_version_t *p_version) |
Get the version information of the underlying driver.
| [out] | p_version | pointer to memory location to return version number |
| ssp_err_t(* spi_api_t::write) (spi_ctrl_t *const p_ctrl, void const *p_src, uint32_t const length, spi_bit_width_t const bit_width) |
Transmit data to an SPI device.
| [in] | p_ctrl | Pointer to the control block for the channel. |
| [in] | p_src | Pointer to a source data buffer from which data will be transmitted to a SPI device. The argument must not be NULL. |
| [in] | length | Number of units of data to be transferred (unit size specified by the bit_width). |
| [in] | bit_width | Data bit width to be transferred. |
| ssp_err_t(* spi_api_t::writeRead) (spi_ctrl_t *const p_ctrl, void const *p_src, void const *p_dest, uint32_t const length, spi_bit_width_t const bit_width) |
Simultaneously transmit data to an SPI device while receiving data from a SPI device (full duplex).
| [in] | p_ctrl | Pointer to the control block for the channel. |
| [in] | p_src | Pointer to a source data buffer from which data will be transmitted to a SPI device. The argument must not be NULL. |
| [out] | p_dest | Pointer to destination buffer into which data will be copied that is received from a SPI device. It is the responsibility of the caller to ensure that adequate space is available to hold the requested data count. The argument must not be NULL. |
| [in] | length | Number of units of data to be transferred (unit size specified by the bit_width). |
| [in] | bit_width | Data bit width to be transferred. |