[−][src]Struct usbd_mass_storage::MscClass
USB Mass Storage Class Device
So far only tested with the Bulk Only protocol and the SCSI transparent command set - see Scsi and Bulk Only Transport
Methods
impl<'_, B: UsbBus> MscClass<'_, B>
[src]
pub fn new(
alloc: &UsbBusAllocator<B>,
max_packet_size: u16,
subclass: InterfaceSubclass,
protocol: InterfaceProtocol
) -> MscClass<B>
[src]
alloc: &UsbBusAllocator<B>,
max_packet_size: u16,
subclass: InterfaceSubclass,
protocol: InterfaceProtocol
) -> MscClass<B>
pub fn max_packet_size(&self) -> u16
[src]
pub fn read_packet(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
pub fn write_packet(&mut self, buf: &[u8]) -> Result<usize>
[src]
pub fn correct_interface_number(&self, interface_number: u16) -> bool
[src]
Trait Implementations
impl<'_, B: UsbBus> UsbClass<B> for MscClass<'_, B>
[src]
fn get_configuration_descriptors(
&self,
writer: &mut DescriptorWriter
) -> Result<()>
[src]
&self,
writer: &mut DescriptorWriter
) -> Result<()>
fn reset(&mut self)
[src]
fn control_in(&mut self, xfer: ControlIn<B>)
[src]
fn control_out(&mut self, xfer: ControlOut<B>)
[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 poll(&mut self)
[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> Send for MscClass<'a, B>
impl<'a, B> Sync for MscClass<'a, B>
impl<'a, B> Unpin for MscClass<'a, B>
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>,