Struct esp32::SDHOST

source ·
pub struct SDHOST { /* private fields */ }
Expand description

SD/MMC Host Controller

Implementations§

source§

impl SDHOST

source

pub const PTR: *const RegisterBlock = {0x3ff68000 as *const sdhost::RegisterBlock}

Pointer to the register block

source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

source

pub unsafe fn steal() -> Self

Steal an instance of this peripheral

Safety

Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.

Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.

Methods from Deref<Target = RegisterBlock>§

source

pub fn ctrl(&self) -> &CTRL

0x00 - Control register

source

pub fn clkdiv(&self) -> &CLKDIV

0x08 - Clock divider configuration register

source

pub fn clksrc(&self) -> &CLKSRC

0x0c - Clock source selection register

source

pub fn clkena(&self) -> &CLKENA

0x10 - Clock enable register

source

pub fn tmout(&self) -> &TMOUT

0x14 - Data and response timeout configuration register

source

pub fn ctype(&self) -> &CTYPE

0x18 - Card bus width configuration register

source

pub fn blksiz(&self) -> &BLKSIZ

0x1c - Card data block size configuration register

source

pub fn bytcnt(&self) -> &BYTCNT

0x20 - Data transfer length configuration register

source

pub fn intmask(&self) -> &INTMASK

0x24 - SDIO interrupt mask register

source

pub fn cmdarg(&self) -> &CMDARG

0x28 - Command argument data register

source

pub fn cmd(&self) -> &CMD

0x2c - Command and boot configuration register

source

pub fn resp0(&self) -> &RESP0

0x30 - Response data register

source

pub fn resp1(&self) -> &RESP1

0x34 - Long response data register

source

pub fn resp2(&self) -> &RESP2

0x38 - Long response data register

source

pub fn resp3(&self) -> &RESP3

0x3c - Long response data register

source

pub fn mintsts(&self) -> &MINTSTS

0x40 - Masked interrupt status register

source

pub fn rintsts(&self) -> &RINTSTS

0x44 - Raw interrupt status register

source

pub fn status(&self) -> &STATUS

0x48 - SD/MMC status register

source

pub fn fifoth(&self) -> &FIFOTH

0x4c - FIFO configuration register

source

pub fn cdetect(&self) -> &CDETECT

0x50 - Card detect register

source

pub fn wrtprt(&self) -> &WRTPRT

0x54 - Card write protection (WP) status register

source

pub fn tcbcnt(&self) -> &TCBCNT

0x5c - Transferred byte count register

source

pub fn tbbcnt(&self) -> &TBBCNT

0x60 - Transferred byte count register

source

pub fn debnce(&self) -> &DEBNCE

0x64 - Debounce filter time configuration register

source

pub fn usrid(&self) -> &USRID

0x68 - User ID (scratchpad) register

source

pub fn verid(&self) -> &VERID

0x6c - Version ID (scratchpad) register

source

pub fn hcon(&self) -> &HCON

0x70 - Hardware feature register

source

pub fn uhs(&self) -> &UHS

0x74 - UHS-1 register

source

pub fn rst_n(&self) -> &RST_N

0x78 - Card reset register

source

pub fn bmod(&self) -> &BMOD

0x80 - Burst mode transfer configuration register

source

pub fn pldmnd(&self) -> &PLDMND

0x84 - Poll demand configuration register

source

pub fn dbaddr(&self) -> &DBADDR

0x88 - Descriptor base address register

source

pub fn idsts(&self) -> &IDSTS

0x8c - IDMAC status register

source

pub fn idinten(&self) -> &IDINTEN

0x90 - IDMAC interrupt enable register

source

pub fn dscaddr(&self) -> &DSCADDR

0x94 - Host descriptor address pointer

source

pub fn bufaddr(&self) -> &BUFADDR

0x98 - Host buffer address pointer register

source

pub fn cardthrctl(&self) -> &CARDTHRCTL

0x100 - Card Threshold Control register

source

pub fn emmcddr(&self) -> &EMMCDDR

0x10c - eMMC DDR register

source

pub fn enshift(&self) -> &ENSHIFT

0x110 - Enable Phase Shift register

source

pub fn buffifo(&self) -> &BUFFIFO

0x200 - CPU write and read transmit data by FIFO

source

pub fn clk_edge_sel(&self) -> &CLK_EDGE_SEL

0x800 - SDIO control register.

Trait Implementations§

source§

impl Debug for SDHOST

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for SDHOST

§

type Target = RegisterBlock

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl Send for SDHOST

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

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

§

type Error = Infallible

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

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

Performs the conversion.
source§

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.
source§

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

Performs the conversion.