S32 SDK
flexio_spi_driver.h File Reference
#include <stddef.h>
#include <stdbool.h>
#include "device_registers.h"
#include "flexio.h"
#include "edma_driver.h"
#include "callbacks.h"

Go to the source code of this file.

Data Structures

struct  flexio_spi_master_user_config_t
 Master configuration structure. More...
 
struct  flexio_spi_slave_user_config_t
 Slave configuration structure. More...
 
struct  flexio_spi_master_state_t
 Master internal context structure. More...
 

Typedefs

typedef flexio_spi_master_state_t flexio_spi_slave_state_t
 Slave internal context structure. More...
 

Enumerations

enum  flexio_spi_transfer_bit_order_t { FLEXIO_SPI_TRANSFER_MSB_FIRST = 0U, FLEXIO_SPI_TRANSFER_LSB_FIRST = 1U }
 Order in which the data bits are transferred Implements : flexio_spi_transfer_bit_order_t_Class. More...
 
enum  flexio_spi_transfer_size_t { FLEXIO_SPI_TRANSFER_1BYTE = 1U, FLEXIO_SPI_TRANSFER_2BYTE = 2U, FLEXIO_SPI_TRANSFER_4BYTE = 4U }
 Size of transferred data in bytes Implements : flexio_spi_transfer_size_t_Class. More...
 

Functions

FLEXIO_SPI Driver
status_t FLEXIO_SPI_DRV_MasterInit (uint32_t instance, const flexio_spi_master_user_config_t *userConfigPtr, flexio_spi_master_state_t *master)
 Initialize the FLEXIO_SPI master mode driver. More...
 
status_t FLEXIO_SPI_DRV_MasterDeinit (flexio_spi_master_state_t *master)
 De-initialize the FLEXIO_SPI master mode driver. More...
 
status_t FLEXIO_SPI_DRV_MasterSetBaudRate (flexio_spi_master_state_t *master, uint32_t baudRate)
 Set the baud rate for any subsequent SPI communication. More...
 
status_t FLEXIO_SPI_DRV_MasterGetBaudRate (flexio_spi_master_state_t *master, uint32_t *baudRate)
 Get the currently configured baud rate. More...
 
status_t FLEXIO_SPI_DRV_MasterTransfer (flexio_spi_master_state_t *master, const uint8_t *txData, uint8_t *rxData, uint32_t dataSize)
 Perform a non-blocking SPI master transaction. More...
 
status_t FLEXIO_SPI_DRV_MasterTransferBlocking (flexio_spi_master_state_t *master, const uint8_t *txData, uint8_t *rxData, uint32_t dataSize, uint32_t timeout)
 Perform a blocking SPI master transaction. More...
 
status_t FLEXIO_SPI_DRV_MasterTransferAbort (flexio_spi_master_state_t *master)
 Aborts a non-blocking SPI master transaction. More...
 
status_t FLEXIO_SPI_DRV_MasterGetStatus (flexio_spi_master_state_t *master, uint32_t *bytesRemaining)
 Get the status of the current non-blocking SPI master transaction. More...
 
status_t FLEXIO_SPI_DRV_SlaveInit (uint32_t instance, const flexio_spi_slave_user_config_t *userConfigPtr, flexio_spi_slave_state_t *slave)
 Initialize the FLEXIO_SPI slave mode driver. More...
 
static status_t FLEXIO_SPI_DRV_SlaveDeinit (flexio_spi_slave_state_t *slave)
 De-initialize the FLEXIO_SPI slave mode driver. More...
 
static status_t FLEXIO_SPI_DRV_SlaveTransfer (flexio_spi_slave_state_t *slave, const uint8_t *txData, uint8_t *rxData, uint32_t dataSize)
 Perform a non-blocking SPI slave transaction. More...
 
static status_t FLEXIO_SPI_DRV_SlaveTransferBlocking (flexio_spi_slave_state_t *slave, const uint8_t *txData, uint8_t *rxData, uint32_t dataSize, uint32_t timeout)
 Perform a blocking SPI slave transaction. More...
 
static status_t FLEXIO_SPI_DRV_SlaveTransferAbort (flexio_spi_slave_state_t *slave)
 Aborts a non-blocking SPI slave transaction. More...
 
static status_t FLEXIO_SPI_DRV_SlaveGetStatus (flexio_spi_slave_state_t *slave, uint32_t *bytesRemaining)
 Get the status of the current non-blocking SPI slave transaction. More...