Add boards/ && clippy

This commit is contained in:
Yifan Wu 2022-01-24 23:23:03 -08:00
parent 26bc01f3bc
commit 60143939d4
20 changed files with 89 additions and 89 deletions

View file

@ -1,15 +1,13 @@
mod sdcard;
mod virtio_blk;
pub use virtio_blk::VirtIOBlock;
pub use sdcard::SDCardWrapper;
use alloc::sync::Arc;
use easy_fs::BlockDevice;
use lazy_static::*;
#[cfg(feature = "board_qemu")]
type BlockDeviceImpl = virtio_blk::VirtIOBlock;
#[cfg(feature = "board_k210")]
type BlockDeviceImpl = sdcard::SDCardWrapper;
use crate::board::BlockDeviceImpl;
lazy_static! {
pub static ref BLOCK_DEVICE: Arc<dyn BlockDevice> = Arc::new(BlockDeviceImpl::new());