Add sdcard driver based on k210-rust crates && adjust clock freq.
This commit is contained in:
parent
eca5ee2eb7
commit
c5cf3aa83e
7 changed files with 783 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
|||
mod virtio_blk;
|
||||
mod sdcard;
|
||||
|
||||
use lazy_static::*;
|
||||
use alloc::sync::Arc;
|
||||
|
@ -12,6 +13,9 @@ pub trait BlockDevice : Send + Sync + Any {
|
|||
#[cfg(feature = "board_qemu")]
|
||||
type BlockDeviceImpl = virtio_blk::VirtIOBlock;
|
||||
|
||||
#[cfg(feature = "board_k210")]
|
||||
type BlockDeviceImpl = sdcard::SDCardWrapper;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref BLOCK_DEVICE: Arc<dyn BlockDevice> = Arc::new(BlockDeviceImpl::new());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue