#define SPICOMMON_BUSFLAG_SLAVE 0 ///< Initialize I/O in slave mode
#define SPICOMMON_BUSFLAG_MASTER (1<<0) ///< Initialize I/O in master mode
#define SPICOMMON_BUSFLAG_IOMUX_PINS (1<<1) ///< Check using iomux pins. Or indicates the pins are configured through the IO mux rather than GPIO matrix.
#define SPICOMMON_BUSFLAG_GPIO_PINS (1<<2) ///< Force the signals to be routed through GPIO matrix. Or indicates the pins are routed through the GPIO matrix.
#define SPICOMMON_BUSFLAG_SCLK (1<<3) ///< Check existing of SCLK pin. Or indicates CLK line initialized.
#define SPICOMMON_BUSFLAG_MISO (1<<4) ///< Check existing of MISO pin. Or indicates MISO line initialized.
#define SPICOMMON_BUSFLAG_MOSI (1<<5) ///< Check existing of MOSI pin. Or indicates MOSI line initialized.
#define SPICOMMON_BUSFLAG_DUAL (1<<6) ///< Check MOSI and MISO pins can output. Or indicates bus able to work under DIO mode.
#define SPICOMMON_BUSFLAG_WPHD (1<<7) ///< Check existing of WP and HD pins. Or indicates WP & HD pins initialized.
#define SPICOMMON_BUSFLAG_QUAD (SPICOMMON_BUSFLAG_DUAL|SPICOMMON_BUSFLAG_WPHD) ///< Check existing of MOSI/MISO/WP/HD pins as output. Or indicates bus able to work under QIO mode.
#define SPICOMMON_BUSFLAG_IO4_IO7 (1<<8) ///< Check existing of IO4~IO7 pins. Or indicates IO4~IO7 pins initialized.
#define SPICOMMON_BUSFLAG_OCTAL (SPICOMMON_BUSFLAG_QUAD|SPICOMMON_BUSFLAG_IO4_IO7) ///< Check existing of MOSI/MISO/WP/HD/SPIIO4/SPIIO5/SPIIO6/SPIIO7 pins as output. Or indicates bus able to work under octal mode.
intmosi_io_num;///< GPIO pin for Master Out Slave In (=spi_d) signal, or -1 if not used.
intdata0_io_num;///< GPIO pin for spi data0 signal in quad/octal mode, or -1 if not used.
};
union{
intmiso_io_num;///< GPIO pin for Master In Slave Out (=spi_q) signal, or -1 if not used.
intdata1_io_num;///< GPIO pin for spi data1 signal in quad/octal mode, or -1 if not used.
};
intsclk_io_num;///< GPIO pin for SPI Clock signal, or -1 if not used.
union{
intquadwp_io_num;///< GPIO pin for WP (Write Protect) signal, or -1 if not used.
intdata2_io_num;///< GPIO pin for spi data2 signal in quad/octal mode, or -1 if not used.
};
union{
intquadhd_io_num;///< GPIO pin for HD (Hold) signal, or -1 if not used.
intdata3_io_num;///< GPIO pin for spi data3 signal in quad/octal mode, or -1 if not used.
};
intdata4_io_num;///< GPIO pin for spi data4 signal in octal mode, or -1 if not used.
intdata5_io_num;///< GPIO pin for spi data5 signal in octal mode, or -1 if not used.
intdata6_io_num;///< GPIO pin for spi data6 signal in octal mode, or -1 if not used.
intdata7_io_num;///< GPIO pin for spi data7 signal in octal mode, or -1 if not used.
intmax_transfer_sz;///< Maximum transfer size, in bytes. Defaults to 4092 if 0 when DMA enabled, or to `SOC_SPI_MAXIMUM_BUFFER_SIZE` if DMA is disabled.
uint32_tflags;///< Abilities of bus to be checked by the driver. Or-ed value of ``SPICOMMON_BUSFLAG_*`` flags.
intintr_flags;/**< Interrupt flag for the bus to set the priority, and IRAM attribute, see