Struct esp_idf_sys::sdmmc_host_t
source · [−]#[repr(C)]pub struct sdmmc_host_t {Show 14 fields
pub flags: u32,
pub slot: c_int,
pub max_freq_khz: c_int,
pub io_voltage: f32,
pub init: Option<unsafe extern "C" fn() -> esp_err_t>,
pub set_bus_width: Option<unsafe extern "C" fn(slot: c_int, width: usize) -> esp_err_t>,
pub get_bus_width: Option<unsafe extern "C" fn(slot: c_int) -> usize>,
pub set_bus_ddr_mode: Option<unsafe extern "C" fn(slot: c_int, ddr_enable: bool) -> esp_err_t>,
pub set_card_clk: Option<unsafe extern "C" fn(slot: c_int, freq_khz: u32) -> esp_err_t>,
pub do_transaction: Option<unsafe extern "C" fn(slot: c_int, cmdinfo: *mut sdmmc_command_t) -> esp_err_t>,
pub __bindgen_anon_1: sdmmc_host_t__bindgen_ty_1,
pub io_int_enable: Option<unsafe extern "C" fn(slot: c_int) -> esp_err_t>,
pub io_int_wait: Option<unsafe extern "C" fn(slot: c_int, timeout_ticks: TickType_t) -> esp_err_t>,
pub command_timeout_ms: c_int,
}
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: c_int
< slot number, to be passed to host functions
max_freq_khz: c_int
< 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() -> esp_err_t>
< Host function to initialize the driver
set_bus_width: Option<unsafe extern "C" fn(slot: c_int, width: usize) -> esp_err_t>
< host function to set bus width
get_bus_width: Option<unsafe extern "C" fn(slot: c_int) -> usize>
< host function to get bus width
set_bus_ddr_mode: Option<unsafe extern "C" fn(slot: c_int, ddr_enable: bool) -> esp_err_t>
< host function to set DDR mode
set_card_clk: Option<unsafe extern "C" fn(slot: c_int, freq_khz: u32) -> esp_err_t>
< host function to set card clock frequency
do_transaction: Option<unsafe extern "C" fn(slot: c_int, cmdinfo: *mut sdmmc_command_t) -> esp_err_t>
< host function to do a transaction
__bindgen_anon_1: sdmmc_host_t__bindgen_ty_1
io_int_enable: Option<unsafe extern "C" fn(slot: c_int) -> esp_err_t>
< Host function to enable SDIO interrupt line
io_int_wait: Option<unsafe extern "C" fn(slot: c_int, timeout_ticks: TickType_t) -> esp_err_t>
< Host function to wait for SDIO interrupt line to be active
command_timeout_ms: c_int
< timeout, in milliseconds, of a single command. Set to 0 to use the default value.
Trait Implementations
sourceimpl Clone for sdmmc_host_t
impl Clone for sdmmc_host_t
sourcefn clone(&self) -> sdmmc_host_t
fn clone(&self) -> sdmmc_host_t
Returns a copy of the value. Read more
1.0.0fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for sdmmc_host_t
impl Default for sdmmc_host_t
impl Copy for sdmmc_host_t
Auto Trait Implementations
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> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more