Struct embassy_usb::InterfaceAltBuilder
source · pub struct InterfaceAltBuilder<'a, 'd, D: Driver<'d>> { /* private fields */ }
Expand description
Interface alternate setting builder.
Implementations§
source§impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D>
impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D>
sourcepub fn interface_number(&self) -> InterfaceNumber
pub fn interface_number(&self) -> InterfaceNumber
Get the interface number.
sourcepub fn alt_setting_number(&self) -> u8
pub fn alt_setting_number(&self) -> u8
Get the alternate setting number.
sourcepub fn descriptor(&mut self, descriptor_type: u8, descriptor: &[u8])
pub fn descriptor(&mut self, descriptor_type: u8, descriptor: &[u8])
Add a custom descriptor to this alternate setting.
Descriptors are written in the order builder functions are called. Note that some classes care about the order.
sourcepub fn endpoint_bulk_in(&mut self, max_packet_size: u16) -> D::EndpointIn
pub fn endpoint_bulk_in(&mut self, max_packet_size: u16) -> D::EndpointIn
Allocate a BULK IN endpoint and write its descriptor.
Descriptors are written in the order builder functions are called. Note that some classes care about the order.
sourcepub fn endpoint_bulk_out(&mut self, max_packet_size: u16) -> D::EndpointOut
pub fn endpoint_bulk_out(&mut self, max_packet_size: u16) -> D::EndpointOut
Allocate a BULK OUT endpoint and write its descriptor.
Descriptors are written in the order builder functions are called. Note that some classes care about the order.
sourcepub fn endpoint_interrupt_in(
&mut self,
max_packet_size: u16,
interval_ms: u8
) -> D::EndpointIn
pub fn endpoint_interrupt_in( &mut self, max_packet_size: u16, interval_ms: u8 ) -> D::EndpointIn
Allocate a INTERRUPT IN endpoint and write its descriptor.
Descriptors are written in the order builder functions are called. Note that some classes care about the order.
sourcepub fn endpoint_interrupt_out(
&mut self,
max_packet_size: u16,
interval_ms: u8
) -> D::EndpointOut
pub fn endpoint_interrupt_out( &mut self, max_packet_size: u16, interval_ms: u8 ) -> D::EndpointOut
Allocate a INTERRUPT OUT endpoint and write its descriptor.
sourcepub fn endpoint_isochronous_in(
&mut self,
max_packet_size: u16,
interval_ms: u8
) -> D::EndpointIn
pub fn endpoint_isochronous_in( &mut self, max_packet_size: u16, interval_ms: u8 ) -> D::EndpointIn
Allocate a ISOCHRONOUS IN endpoint and write its descriptor.
Descriptors are written in the order builder functions are called. Note that some classes care about the order.
sourcepub fn endpoint_isochronous_out(
&mut self,
max_packet_size: u16,
interval_ms: u8
) -> D::EndpointOut
pub fn endpoint_isochronous_out( &mut self, max_packet_size: u16, interval_ms: u8 ) -> D::EndpointOut
Allocate a ISOCHRONOUS OUT endpoint and write its descriptor.