Expand description
§SDCard Driver
§References:
Copied from rCore-Tutorial-v3/os/src/drivers/block/sdcard.rs
- Author: wyfcyx
- License: GPL-3.0 license
Modified by Gerrnperl
§Dependencies:
- Gerrnperl/k210-hal
- (forked from wyfcyx/k210-hal)
- (forked from riscv-rust/k210-hal)
- (forked from wyfcyx/k210-hal)
- wyfcyx/k210-pac
- (forked from riscv-rust/k210-pac)
- Gerrnperl/k210-soc
- (forked from wyfcyx/k210-soc)
§License of the dependencies:
Copyright 2019 RISC-V team
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.Structs§
- Card Identification Data: CID Register
- Card Specific Data: CSD Register
- Card information
Enums§
- SD commands
Constants§
- SD_CS 🔒CS value passed to SPI controller, this is a dummy value as SPI0_CS3 is not mapping to anything in the FPIOA
- GPIOHS GPIO number to use for controlling the SD card CS pin
- Data token start byte, Start Multiple Block Read
- Data token start byte, Start Multiple Block Write
- Data token start byte, Start Single Block Read
- Data token start byte, Start Single Block Write
Functions§
- io_init 🔒Connect pins to internal functions