pub struct SDCard<SPI> {
spi: SPI,
spi_cs: u32,
cs_gpionum: u8,
}Fields§
§spi: SPI§spi_cs: u32§cs_gpionum: u8Implementations§
Source§impl<X: SPI> SDCard<X>
impl<X: SPI> SDCard<X>
pub fn new(spi: X, spi_cs: u32, cs_gpionum: u8) -> Self
fn CS_HIGH(&self)
fn CS_LOW(&self)
fn HIGH_SPEED_ENABLE(&self)
fn lowlevel_init(&self)
fn write_data(&self, data: &[u8])
fn read_data(&self, data: &mut [u8])
fn send_cmd(&self, cmd: CMD, arg: u32, crc: u8)
fn end_cmd(&self)
fn get_response(&self) -> u8
fn get_dataresponse(&self) -> u8
fn get_csdregister(&self) -> Result<SDCardCSD, ()>
fn get_cidregister(&self) -> Result<SDCardCID, ()>
fn get_cardinfo(&self) -> Result<SDCardInfo, ()>
pub fn init(&self) -> Result<SDCardInfo, InitError>
pub fn read_sector(&self, data_buf: &mut [u8], sector: u32) -> Result<(), ()>
pub fn write_sector(&self, data_buf: &[u8], sector: u32) -> Result<(), ()>
Auto Trait Implementations§
impl<SPI> Freeze for SDCard<SPI>where
SPI: Freeze,
impl<SPI> RefUnwindSafe for SDCard<SPI>where
SPI: RefUnwindSafe,
impl<SPI> Send for SDCard<SPI>where
SPI: Send,
impl<SPI> Sync for SDCard<SPI>where
SPI: Sync,
impl<SPI> Unpin for SDCard<SPI>where
SPI: Unpin,
impl<SPI> UnwindSafe for SDCard<SPI>where
SPI: UnwindSafe,
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