#[repr(C)]pub struct sdspi_device_config_t {
pub host_id: spi_host_device_t,
pub gpio_cs: gpio_num_t,
pub gpio_cd: gpio_num_t,
pub gpio_wp: gpio_num_t,
pub gpio_int: gpio_num_t,
pub gpio_wp_polarity: bool,
pub duty_cycle_pos: u16,
pub wait_for_miso: i8,
}Expand description
Extra configuration for SD SPI device.
Fields§
§host_id: spi_host_device_t< SPI host to use, SPIx_HOST (see spi_types.h).
gpio_cs: gpio_num_t< GPIO number of CS signal
gpio_cd: gpio_num_t< GPIO number of card detect signal
gpio_wp: gpio_num_t< GPIO number of write protect signal
gpio_int: gpio_num_t< GPIO number of interrupt line (input) for SDIO card.
gpio_wp_polarity: bool< GPIO write protect polarity 0 means “active low”, i.e. card is protected when the GPIO is low; 1 means “active high”, i.e. card is protected when GPIO is high.
duty_cycle_pos: u16< Duty cycle of positive clock, in 1/256th increments (128 = 50%/50% duty). Setting this to 0 (=not setting it) is equivalent to setting this to 128.
wait_for_miso: i8< Timeout value in the driver will be waiting for MISO to be high before sending commands. Possible values are the following: 0: default value (40ms); -1: no waiting (0ms); 1-127: timeout in ms; else: invalid value, default will be used. This can be used to speed up transactions in certain scenarios but should not be needed if correct pull-up resistors are used. Use with care on devices where multiple SPI slaves use the same SPI bus.
Trait Implementations§
Source§impl Clone for sdspi_device_config_t
impl Clone for sdspi_device_config_t
Source§fn clone(&self) -> sdspi_device_config_t
fn clone(&self) -> sdspi_device_config_t
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for sdspi_device_config_t
impl Debug for sdspi_device_config_t
Source§impl Default for sdspi_device_config_t
impl Default for sdspi_device_config_t
impl Copy for sdspi_device_config_t
Auto Trait Implementations§
impl Freeze for sdspi_device_config_t
impl RefUnwindSafe for sdspi_device_config_t
impl Send for sdspi_device_config_t
impl Sync for sdspi_device_config_t
impl Unpin for sdspi_device_config_t
impl UnsafeUnpin for sdspi_device_config_t
impl UnwindSafe for sdspi_device_config_t
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)