#[repr(C)]pub struct SPIController {
pub data: RW<u8>,
pub control: RW<u8>,
}Expand description
SPI controller connected to the SD card connector
The speed of the clock output of the SPI controller can be controlled by the ‘Slow Clock’ bit.
When this bit is 0 the clock is 12.5MHz, when 1 the clock is about 390kHz.
The slow clock speed is to be used during the initialization phase of the SD card.
Some SD cards require a clock less than 400kHz during part of the initialization.
A transfer can be started by writing to SPI_DATA.
While the transfer is in progress the BUSY bit will be set.
After the transfer is done, the result can be read from the SPI_DATA register.
The chip select can be controlled by writing the SELECT bit.
Writing 1 will assert the chip-select (logic-0) and writing 0 will release the chip-select (logic-1).
Fields§
§data: RW<u8>§control: RW<u8>Auto Trait Implementations§
impl !Freeze for SPIController
impl !RefUnwindSafe for SPIController
impl Send for SPIController
impl !Sync for SPIController
impl Unpin for SPIController
impl UnwindSafe for SPIController
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