Struct kernel::services::sdmmc::SdCardClient
source · pub struct SdCardClient {
handle: KernelHandle<SdmmcService>,
reply: Reusable<Envelope<Result<Response, Error>>>,
}
Expand description
A client for SD memory cards using the SdmmcService
.
Fields§
§handle: KernelHandle<SdmmcService>
§reply: Reusable<Envelope<Result<Response, Error>>>
Implementations§
source§impl SdCardClient
impl SdCardClient
sourcepub async fn from_registry(
kernel: &'static Kernel,
) -> Result<Self, ConnectError<SdmmcService>>
pub async fn from_registry( kernel: &'static Kernel, ) -> Result<Self, ConnectError<SdmmcService>>
Obtain an SdCardClient
If the SdmmcService
hasn’t been registered yet, we will retry until it
has been registered.
sourcepub async fn from_registry_no_retry(
kernel: &'static Kernel,
) -> Result<Self, ConnectError<SdmmcService>>
pub async fn from_registry_no_retry( kernel: &'static Kernel, ) -> Result<Self, ConnectError<SdmmcService>>
Obtain an SdCardClient
Does NOT attempt to get an SdmmcService
handle more than once.
Prefer SdCardClient::from_registry
unless you will not be spawning one
around the same time as obtaining a client.
async fn cmd(&mut self, cmd: Command) -> Result<Response, Error>
sourcepub async fn initialize(&mut self) -> Result<CardType, Error>
pub async fn initialize(&mut self) -> Result<CardType, Error>
Initialize the card
sourcepub async fn get_cid(&mut self) -> Result<CardIdentification, Error>
pub async fn get_cid(&mut self) -> Result<CardIdentification, Error>
Get the card identification register
sourcepub async fn get_rca(&mut self) -> Result<RelativeCardAddress, Error>
pub async fn get_rca(&mut self) -> Result<RelativeCardAddress, Error>
Get the relative card address
sourcepub async fn select(
&mut self,
rca: RelativeCardAddress,
) -> Result<CardStatus, Error>
pub async fn select( &mut self, rca: RelativeCardAddress, ) -> Result<CardStatus, Error>
Toggle the card between stand-by and transfer state
sourcepub async fn set_wide_bus(
&mut self,
rca: RelativeCardAddress,
) -> Result<CardStatus, Error>
pub async fn set_wide_bus( &mut self, rca: RelativeCardAddress, ) -> Result<CardStatus, Error>
Use 4 data lanes
Auto Trait Implementations§
impl Freeze for SdCardClient
impl !RefUnwindSafe for SdCardClient
impl Send for SdCardClient
impl Sync for SdCardClient
impl Unpin for SdCardClient
impl !UnwindSafe for SdCardClient
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.