Struct esp_idf_svc::hal::sys::sdmmc_host_t

source ·
#[repr(C)]
pub struct sdmmc_host_t {
Show 18 fields pub flags: u32, pub slot: i32, pub max_freq_khz: i32, pub io_voltage: f32, pub init: Option<unsafe extern "C" fn() -> i32>, pub set_bus_width: Option<unsafe extern "C" fn(_: i32, _: usize) -> i32>, pub get_bus_width: Option<unsafe extern "C" fn(_: i32) -> usize>, pub set_bus_ddr_mode: Option<unsafe extern "C" fn(_: i32, _: bool) -> i32>, pub set_card_clk: Option<unsafe extern "C" fn(_: i32, _: u32) -> i32>, pub set_cclk_always_on: Option<unsafe extern "C" fn(_: i32, _: bool) -> i32>, pub do_transaction: Option<unsafe extern "C" fn(_: i32, _: *mut sdmmc_command_t) -> i32>, pub __bindgen_anon_1: sdmmc_host_t__bindgen_ty_1, pub io_int_enable: Option<unsafe extern "C" fn(_: i32) -> i32>, pub io_int_wait: Option<unsafe extern "C" fn(_: i32, _: u32) -> i32>, pub command_timeout_ms: i32, pub get_real_freq: Option<unsafe extern "C" fn(_: i32, _: *mut i32) -> i32>, pub input_delay_phase: u32, pub set_input_delay: Option<unsafe extern "C" fn(_: i32, _: u32) -> i32>,
}
Expand description

SD/MMC Host description

This structure defines properties of SD/MMC host and functions of SD/MMC host which can be used by upper layers.

Fields§

§flags: u32

< flags defining host properties

§slot: i32

< slot number, to be passed to host functions

§max_freq_khz: i32

< max frequency supported by the host

§io_voltage: f32

< I/O voltage used by the controller (voltage switching is not supported)

§init: Option<unsafe extern "C" fn() -> i32>

< Host function to initialize the driver

§set_bus_width: Option<unsafe extern "C" fn(_: i32, _: usize) -> i32>

< host function to set bus width

§get_bus_width: Option<unsafe extern "C" fn(_: i32) -> usize>

< host function to get bus width

§set_bus_ddr_mode: Option<unsafe extern "C" fn(_: i32, _: bool) -> i32>

< host function to set DDR mode

§set_card_clk: Option<unsafe extern "C" fn(_: i32, _: u32) -> i32>

< host function to set card clock frequency

§set_cclk_always_on: Option<unsafe extern "C" fn(_: i32, _: bool) -> i32>

< host function to set whether the clock is always enabled

§do_transaction: Option<unsafe extern "C" fn(_: i32, _: *mut sdmmc_command_t) -> i32>

< host function to do a transaction

§__bindgen_anon_1: sdmmc_host_t__bindgen_ty_1§io_int_enable: Option<unsafe extern "C" fn(_: i32) -> i32>

< Host function to enable SDIO interrupt line

§io_int_wait: Option<unsafe extern "C" fn(_: i32, _: u32) -> i32>

< Host function to wait for SDIO interrupt line to be active

§command_timeout_ms: i32

< timeout, in milliseconds, of a single command. Set to 0 to use the default value.

§get_real_freq: Option<unsafe extern "C" fn(_: i32, _: *mut i32) -> i32>

< Host function to provide real working freq, based on SDMMC controller setup

§input_delay_phase: u32

< input delay phase, this will only take into effect when the host works in SDMMC_FREQ_HIGHSPEED or SDMMC_FREQ_52M. Driver will print out how long the delay is

§set_input_delay: Option<unsafe extern "C" fn(_: i32, _: u32) -> i32>

< set input delay phase

Trait Implementations§

source§

impl Clone for sdmmc_host_t

source§

fn clone(&self) -> sdmmc_host_t

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for sdmmc_host_t

source§

fn default() -> sdmmc_host_t

Returns the “default value” for a type. Read more
source§

impl Copy for sdmmc_host_t

Auto Trait Implementations§

§

impl Freeze for sdmmc_host_t

§

impl RefUnwindSafe for sdmmc_host_t

§

impl Send for sdmmc_host_t

§

impl Sync for sdmmc_host_t

§

impl Unpin for sdmmc_host_t

§

impl UnwindSafe for sdmmc_host_t

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> CloneToUninit for T
where T: Copy,

§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.