ESP-IDF
+
0
/11 examples
SourceVu will show references to
sdmmc_host_t
from the following samples and libraries:
FatFS
simple_sniffer sample
emmc sample
perf_benchmark sample
i2s_recorder sample
jpeg_decode sample
jpeg_encode sample
host sample
sdmmc sample
sdspi sample
i2s_es7210_tdm sample
Symbol previews are coming soon...
Symbols
loading...
Files
loading...
Summary
Syntax
Related
Examples
References
Call Tree
Data Use
Class Tree
Override Tree
Implementations
Instances
Lifecycle
SourceVu
ESP-IDF Framework and Examples
ESP-IDF
sdmmc_host_t
sdmmc_host_t struct
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.
Syntax
Show:
Summary
Declaration
from
sd_protocol_types.h:200
typedef
struct
{
uint32_t
flags
;
#define
SDMMC_HOST_FLAG_1BIT
BIT
(
0
)
#define
SDMMC_HOST_FLAG_4BIT
BIT
(
1
)
#define
SDMMC_HOST_FLAG_8BIT
BIT
(
2
)
#define
SDMMC_HOST_FLAG_SPI
BIT
(
3
)
#define
SDMMC_HOST_FLAG_DDR
BIT
(
4
)
#define
SDMMC_HOST_FLAG_DEINIT_ARG
BIT
(
5
)
#define
SDMMC_HOST_FLAG_ALLOC_ALIGNED_BUF
\
BIT
(
6
)
int
slot
;
int
max_freq_khz
;
#define
SDMMC_FREQ_DEFAULT
20000
#define
SDMMC_FREQ_HIGHSPEED
40000
#define
SDMMC_FREQ_PROBING
400
#define
SDMMC_FREQ_52M
52000
#define
SDMMC_FREQ_26M
26000
#define
SDMMC_FREQ_DDR50
50000
#define
SDMMC_FREQ_SDR50
100000
float
io_voltage
;
sdmmc_driver_strength_t
driver_strength
;
sdmmc_current_limit_t
current_limit
;
esp_err_t
(
*
init
)
(
void
)
;
esp_err_t
(
*
set_bus_width
)
(
int
slot
,
size_t
width
)
;
size_t
(
*
get_bus_width
)
(
int
slot
)
;
esp_err_t
(
*
set_bus_ddr_mode
)
(
int
slot
,
bool
ddr_enable
)
;
esp_err_t
(
*
set_card_clk
)
(
int
slot
,
uint32_t
freq_khz
)
;
esp_err_t
(
*
set_cclk_always_on
)
(
int
slot
,
bool
cclk_always_on
)
;
esp_err_t
(
*
do_transaction
)
(
int
slot
,
sdmmc_command_t
*
cmdinfo
)
;
union
{
esp_err_t
(
*
deinit
)
(
void
)
;
esp_err_t
(
*
deinit_p
)
(
int
slot
)
;
}
;
esp_err_t
(
*
io_int_enable
)
(
int
slot
)
;
esp_err_t
(
*
io_int_wait
)
(
int
slot
,
TickType_t
timeout_ticks
)
;
int
command_timeout_ms
;
esp_err_t
(
*
get_real_freq
)
(
int
slot
,
int
*
real_freq
)
;
sdmmc_delay_phase_t
input_delay_phase
;
esp_err_t
(
*
set_input_delay
)
(
int
slot
,
sdmmc_delay_phase_t
delay_phase
)
;
void
*
dma_aligned_buffer
;
sd_pwr_ctrl_handle_t
pwr_ctrl_handle
;
esp_err_t
(
*
get_dma_info
)
(
int
slot
,
esp_dma_mem_info_t
*
dma_mem_info
)
;
esp_err_t
(
*
is_slot_set_to_uhs1
)
(
int
slot
,
bool
*
is_uhs1
)
;
}
sdmmc_host_t
;
Fields
Field
Declared as
Description
sdmmc_host_t::flags
uint32_t
flags defining host properties.
sdmmc_host_t::slot
int
slot number, to be passed to host functions.
sdmmc_host_t::max_freq_khz
int
max frequency supported by the host.
sdmmc_host_t::io_voltage
float
I/O voltage used by the controller (voltage switching is not supported).
sdmmc_host_t::driver_strength
sdmmc_driver_strength_t
Driver Strength.
sdmmc_host_t::current_limit
sdmmc_current_limit_t
Current Limit.
sdmmc_host_t::init
esp_err_t
(
*
)
(
void
)
Host function to initialize the driver.
sdmmc_host_t::set_bus_width
esp_err_t
(
*
)
(
int
slot
,
size_t
width
)
host function to set bus width.
sdmmc_host_t::is_slot_set_to_uhs1
esp_err_t
(
*
)
(
int
slot
,
bool
*
is_uhs1
)
host slot is set to uhs1 or not.
sdmmc_host_t::get_bus_width
size_t
(
*
)
(
int
slot
)
host function to get bus width.
sdmmc_host_t::set_bus_ddr_mode
esp_err_t
(
*
)
(
int
slot
,
bool
ddr_enable
)
host function to set DDR mode.
sdmmc_host_t::set_card_clk
esp_err_t
(
*
)
(
int
slot
,
uint32_t
freq_khz
)
host function to set card clock frequency.
sdmmc_host_t::set_cclk_always_on
esp_err_t
(
*
)
(
int
slot
,
bool
cclk_always_on
)
host function to set whether the clock is always enabled.
sdmmc_host_t::do_transaction
esp_err_t
(
*
)
(
int
slot
,
sdmmc_command_t
*
cmdinfo
)
host function to do a transaction.
sdmmc_host_t::io_int_enable
esp_err_t
(
*
)
(
int
slot
)
Host function to enable SDIO interrupt line.
sdmmc_host_t::io_int_wait
esp_err_t
(
*
)
(
int
slot
,
TickType_t
timeout_ticks
)
Host function to wait for SDIO interrupt line to be active.
sdmmc_host_t::command_timeout_ms
int
timeout, in milliseconds, of a single command. Set to 0 to use the default value.
sdmmc_host_t::get_real_freq
esp_err_t
(
*
)
(
int
slot
,
int
*
real_freq
)
Host function to provide real working freq, based on SDMMC controller setup.
sdmmc_host_t::input_delay_phase
sdmmc_delay_phase_t
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.
sdmmc_host_t::set_input_delay
esp_err_t
(
*
)
(
int
slot
,
sdmmc_delay_phase_t
delay_phase
)
set input delay phase.
sdmmc_host_t::dma_aligned_buffer
void
*
Leave it NULL. Reserved for cache aligned buffers for SDIO mode.
sdmmc_host_t::pwr_ctrl_handle
sd_pwr_ctrl_handle_t
Power control handle.
sdmmc_host_t::get_dma_info
esp_err_t
(
*
)
(
int
slot
,
esp_dma_mem_info_t
*
dma_mem_info
)
host function to dma memory information.
Related Functions
Found 1 other functions taking a
sdmmc_host_t
argument:
Function
Description
sdmmc_card_init()
Probe and initialize SD/MMC card using given host
Examples
sdmmc_host_t
is referenced by 11 libraries and example projects:
References
from
examples
Call Tree
from
examples
All items filtered out
All items filtered out
Data Use
from
examples
All items filtered out
All items filtered out
Class Tree
from
examples
All items filtered out
All items filtered out
Override Tree
from
examples
All items filtered out
All items filtered out
Implementations
from
examples
All items filtered out
All items filtered out
Instances
from
examples
Lifecycle
from
examples
All items filtered out
All items filtered out