[][src]Struct esp_idf_sys::spi_bus_config_t

#[repr(C)]
pub struct spi_bus_config_t {
    pub mosi_io_num: c_int,
    pub miso_io_num: c_int,
    pub sclk_io_num: c_int,
    pub quadwp_io_num: c_int,
    pub quadhd_io_num: c_int,
    pub max_transfer_sz: c_int,
    pub flags: u32,
    pub intr_flags: c_int,
}

@brief This is a configuration structure for a SPI bus.

You can use this structure to specify the GPIO pins of the bus. Normally, the driver will use the GPIO matrix to route the signals. An exception is made when all signals either can be routed through the IO_MUX or are -1. In that case, the IO_MUX is used, allowing for >40MHz speeds.

@note Be advised that the slave driver does not use the quadwp/quadhd lines and fields in spi_bus_config_t refering to these lines will be ignored and can thus safely be left uninitialized.

Fields

mosi_io_num: c_int

< GPIO pin for Master Out Slave In (=spi_d) signal, or -1 if not used.

miso_io_num: c_int

< GPIO pin for Master In Slave Out (=spi_q) signal, or -1 if not used.

sclk_io_num: c_int

< GPIO pin for Spi CLocK signal, or -1 if not used.

quadwp_io_num: c_int

< GPIO pin for WP (Write Protect) signal which is used as D2 in 4-bit communication modes, or -1 if not used.

quadhd_io_num: c_int

< GPIO pin for HD (HolD) signal which is used as D3 in 4-bit communication modes, or -1 if not used.

max_transfer_sz: c_int

< Maximum transfer size, in bytes. Defaults to 4094 if 0.

flags: u32

< Abilities of bus to be checked by the driver. Or-ed value of SPICOMMON_BUSFLAG_* flags.

intr_flags: c_int

< Interrupt flag for the bus to set the priority, and IRAM attribute, see esp_intr_alloc.h. Note that the EDGE, INTRDISABLED attribute are ignored by the driver. Note that if ESP_INTR_FLAG_IRAM is set, ALL the callbacks of the driver, and their callee functions, should be put in the IRAM.

Trait Implementations

impl Debug for spi_bus_config_t[src]

impl Copy for spi_bus_config_t[src]

impl Clone for spi_bus_config_t[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]