Microchip® Advanced Software Framework

SPI configuration structure.

Configuration structure for an SPI instance. This structure should be initialized by the spi_get_config_defaults function before being modified by the user application.

#include <spi.h>

Data Fields

enum spi_character_size character_size
 SPI character size. More...
 
enum spi_data_order data_order
 Data order. More...
 
enum gclk_generator generator_source
 GCLK generator to use as clock source. More...
 
bool master_slave_select_enable
 Enable Master Slave Select. More...
 
enum spi_mode mode
 SPI mode. More...
 
union {
   struct spi_master_config   master
 Master specific configuration. More...
 
   struct spi_slave_config   slave
 Slave specific configuration. More...
 
mode_specific
 Union for slave or master specific configuration. More...
 
enum spi_signal_mux_setting mux_setting
 MUX setting. More...
 
uint32_t pinmux_pad0
 PAD0 pinmux. More...
 
uint32_t pinmux_pad1
 PAD1 pinmux. More...
 
uint32_t pinmux_pad2
 PAD2 pinmux. More...
 
uint32_t pinmux_pad3
 PAD3 pinmux. More...
 
bool receiver_enable
 Enable receiver. More...
 
bool run_in_standby
 Enabled in sleep modes. More...
 
bool select_slave_low_detect_enable
 Enable Slave Select Low Detect. More...
 
enum spi_transfer_mode transfer_mode
 Transfer mode. More...
 

enum spi_character_size spi_config::character_size
enum spi_data_order spi_config::data_order
enum gclk_generator spi_config::generator_source

GCLK generator to use as clock source.

Referenced by spi_get_config_defaults(), and spi_init().

bool spi_config::master_slave_select_enable

Enable Master Slave Select.

Referenced by _spi_check_config(), _spi_set_config(), and spi_get_config_defaults().

bool spi_config::receiver_enable

Enable receiver.

Referenced by _spi_check_config(), _spi_set_config(), and spi_get_config_defaults().

bool spi_config::run_in_standby

Enabled in sleep modes.

Referenced by _spi_check_config(), _spi_set_config(), and spi_get_config_defaults().

bool spi_config::select_slave_low_detect_enable

Enable Slave Select Low Detect.

Referenced by _spi_check_config(), _spi_set_config(), and spi_get_config_defaults().

struct spi_slave_config spi_config::slave
enum spi_transfer_mode spi_config::transfer_mode