[−][src]Struct usbd_scsi::Scsi
Methods
impl<'_, B: UsbBus, BD: BlockDevice> Scsi<'_, B, BD>
[src]
pub fn new<V: AsRef<[u8]>, P: AsRef<[u8]>, R: AsRef<[u8]>>(
alloc: &UsbBusAllocator<B>,
max_packet_size: u16,
block_device: BD,
vendor_identification: V,
product_identification: P,
product_revision_level: R
) -> Scsi<B, BD>
[src]
alloc: &UsbBusAllocator<B>,
max_packet_size: u16,
block_device: BD,
vendor_identification: V,
product_identification: P,
product_revision_level: R
) -> Scsi<B, BD>
Creates a new Scsi block device
block_device
provides reading and writing of blocks to the underlying filesystem
vendor_identification
is an ASCII string that forms part of the SCSI inquiry response.
Should come from t10. Any semi-unique non-blank
string should work fine for local development. Panics if > 8 characters are supplied.
product_identification
is an ASCII string that forms part of the SCSI inquiry response.
Vendor (probably you...) defined so pick whatever you want. Panics if > 16 characters
are supplied.
product_revision_level
is an ASCII string that forms part of the SCSI inquiry response.
Vendor (probably you...) defined so pick whatever you want. Typically a version number.
Panics if > 4 characters are supplied.
Trait Implementations
impl<'_, B: UsbBus, BD: BlockDevice> UsbClass<B> for Scsi<'_, B, BD>
[src]
fn get_configuration_descriptors(
&self,
writer: &mut DescriptorWriter
) -> UsbResult<()>
[src]
&self,
writer: &mut DescriptorWriter
) -> UsbResult<()>
fn reset(&mut self)
[src]
fn control_in(&mut self, xfer: ControlIn<B>)
[src]
fn control_out(&mut self, xfer: ControlOut<B>)
[src]
fn poll(&mut self)
[src]
fn get_bos_descriptors(&self, writer: &mut BosWriter) -> Result<(), UsbError>
[src]
fn get_string(&self, index: StringIndex, lang_id: u16) -> Option<&str>
[src]
fn endpoint_setup(&mut self, addr: EndpointAddress)
[src]
fn endpoint_out(&mut self, addr: EndpointAddress)
[src]
fn endpoint_in_complete(&mut self, addr: EndpointAddress)
[src]
Auto Trait Implementations
impl<'a, B, BD> Send for Scsi<'a, B, BD> where
BD: Send,
BD: Send,
impl<'a, B, BD> Sync for Scsi<'a, B, BD> where
BD: Sync,
BD: Sync,
impl<'a, B, BD> Unpin for Scsi<'a, B, BD> where
BD: Unpin,
BD: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,