Intel® Quark™ Microcontroller Software Interface
1.4.0
Intel® Quark™ Microcontroller BSP
|
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... | |
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.
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.
[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 |
void* qm_spi_async_transfer_t::rx |
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 |
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().