PMSIS API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
spi.h File Reference

Data Structures

struct  pi_spi_conf
 

Enumerations

enum  pi_spi_wordsize_e
 Wordsize of the SPI bitstream elements. More...
 
enum  pi_spi_polarity_e
 
enum  pi_spi_phase_e
 
enum  pi_spi_ioctl_e
 Possible parameters which can be set through the pi_spi_control API function. More...
 
enum  pi_spi_flags_e
 Specifies additional behaviors for transfers. More...
 

Functions

void pi_spi_conf_init (struct pi_spi_conf *conf)
 Initialize an SPI master configuration with default values. More...
 
int pi_spi_open (struct pi_device *device)
 Open an SPI device. More...
 
void pi_spi_close (struct pi_device *device)
 Close an opened SPI device. More...
 
void pi_spi_ioctl (struct pi_device *device, uint32_t cmd, void *arg)
 Dynamically change the device configuration. More...
 
void pi_spi_send (struct pi_device *device, void *data, size_t len, pi_spi_flags_e flag)
 Enqueue a write copy to the SPI (from Chip to SPI device). More...
 
void pi_spi_receive (struct pi_device *device, void *data, size_t len, pi_spi_flags_e flag)
 Enqueue a read copy to the SPI (from Chip to SPI device). More...
 
void pi_spi_transfer (struct pi_device *device, void *tx_data, void *rx_data, size_t len, pi_spi_flags_e flag)
 Enqueue a read and write copy to the SPI (using full duplex mode). More...
 
void pi_spi_send_async (struct pi_device *device, void *data, size_t len, pi_spi_flags_e flag, pi_task_t *task)
 Enqueue an asynchronous write copy to the SPI (from Chip to SPI device). More...
 
void pi_spi_receive_async (struct pi_device *device, void *data, size_t len, pi_spi_flags_e flag, pi_task_t *task)
 Enqueue an asynchronous read copy to the SPI (from Chip to SPI device). More...
 
void pi_spi_transfer_async (struct pi_device *device, void *tx_data, void *rx_data, size_t len, pi_spi_flags_e flag, pi_task_t *task)
 Enqueue an asynchronous read and write copy to the SPI (using full duplex mode). More...