mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-13 07:48:30 +00:00
block_device: added empty implementation, will be needed once we figure out mass storage
This commit is contained in:
parent
110641ff76
commit
3300a1b87d
2 changed files with 19 additions and 0 deletions
17
services/usb-device-xous/src/block_device.rs
Normal file
17
services/usb-device-xous/src/block_device.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
pub struct BlockDevice{}
|
||||
|
||||
impl usbd_scsi::BlockDevice for BlockDevice {
|
||||
const BLOCK_BYTES: usize = 512;
|
||||
|
||||
fn read_block(&self, lba: u32, block: &mut [u8]) -> Result<(), usbd_scsi::BlockDeviceError> {
|
||||
Err(usbd_scsi::BlockDeviceError::HardwareError)
|
||||
}
|
||||
|
||||
fn write_block(&mut self, lba: u32, block: &[u8]) -> Result<(), usbd_scsi::BlockDeviceError> {
|
||||
Err(usbd_scsi::BlockDeviceError::WriteError)
|
||||
}
|
||||
|
||||
fn max_lba(&self) -> u32 {
|
||||
512
|
||||
}
|
||||
}
|
||||
|
|
@ -20,6 +20,8 @@ mod spinal_udc;
|
|||
use packed_struct::PackedStructSlice;
|
||||
#[cfg(any(feature="precursor", feature="renode"))]
|
||||
use spinal_udc::*;
|
||||
#[cfg(any(feature="precursor", feature="renode"))]
|
||||
mod block_device;
|
||||
|
||||
#[cfg(not(target_os = "xous"))]
|
||||
mod hosted;
|
||||
|
|
|
|||
Loading…
Reference in a new issue