Intel® Quark™ Microcontroller Software Interface 1.4.0 Intel® Quark™ Microcontroller BSP

- Main Page
- Modules
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Data Fields

Data Fields
qm_spi_async_transfer_t Struct Reference
SPI

SPI aynchronous transfer type. More...

`#include <qm_spi.h>`

## Data Fields
void * | tx
| Write data. More...
void * | rx
| Read data. More...
uint16_t | tx_len
| Number of data frames to write. More...
uint16_t | rx_len
| Number of data frames to read. More...
bool | keep_enabled
| Keep device on once transfer is done. More...
void(* | callback )(void *data, int error, qm_spi_status_t status, uint16_t len)
| Transfer callback. More...
void * | callback_data
| Callback user data. More...

## Detailed Description

SPI aynchronous transfer type.

If the frame size is 8 bits or less, 1 byte is needed per data frame. If the frame size is 9-16 bits, 2 bytes are needed per data frame and frames of more than 16 bits require 4 bytes. In each case, the least significant bits are sent while the extra bits are discarded. The most significant bits of the frame are sent first.

Definition at line 145 of file qm_spi.h.

## Field Documentation

void(* qm_spi_async_transfer_t::callback)(void *data, int error, qm_spi_status_t status, uint16_t len)

Transfer callback.

Called after all data is transmitted/received or if the driver detects an error during the SPI transfer. For slave device it also allows the application to update transfer information by calling the qm_spi_irq_update function.

Parameters

  [in] | data | The callback user data.
  [in] | error | 0 on success. Negative errno for possible error codes.
  [in] | status | SPI driver status.
  [in] | len | Length of the SPI transfer if successful, 0 otherwise.

Definition at line 167 of file qm_spi.h.

Referenced by qm_spi_irq_transfer_terminate().

void* qm_spi_async_transfer_t::callback_data

Callback user data.

Definition at line 169 of file qm_spi.h.

Referenced by qm_spi_irq_transfer_terminate().

bool qm_spi_async_transfer_t::keep_enabled

Keep device on once transfer is done.

Definition at line 150 of file qm_spi.h.

void* qm_spi_async_transfer_t::rx

Read data.

Definition at line 147 of file qm_spi.h.

Referenced by qm_spi_dma_transfer().

uint16_t qm_spi_async_transfer_t::rx_len

Number of data frames to read.

Definition at line 149 of file qm_spi.h.

Referenced by qm_spi_dma_transfer(), qm_spi_irq_transfer(), and qm_spi_irq_update().

void* qm_spi_async_transfer_t::tx

Write data.

Definition at line 146 of file qm_spi.h.

Referenced by qm_spi_dma_transfer().

uint16_t qm_spi_async_transfer_t::tx_len

Number of data frames to write.

Definition at line 148 of file qm_spi.h.

Referenced by qm_spi_dma_transfer(), qm_spi_irq_transfer(), and qm_spi_irq_update().