pub struct Channel<'d, I: Instance, D: Direction, T: Type> { /* private fields */ }Expand description
USB endpoint. Only implements single buffer mode.
Implementations§
Source§impl<'d, I: Instance, D: Direction, T: Type> Channel<'d, I, D, T>
impl<'d, I: Instance, D: Direction, T: Type> Channel<'d, I, D, T>
pub fn activate_rx(&mut self)
pub fn activate_tx(&mut self)
pub fn disable_rx(&mut self)
Trait Implementations§
Source§impl<'d, I: Instance, T: Type, D: Direction> UsbChannel<T, D> for Channel<'d, I, D, T>
impl<'d, I: Instance, T: Type, D: Direction> UsbChannel<T, D> for Channel<'d, I, D, T>
Source§async fn control_in(
&mut self,
setup: &SetupPacket,
buf: &mut [u8],
) -> Result<usize, ChannelError>
async fn control_in( &mut self, setup: &SetupPacket, buf: &mut [u8], ) -> Result<usize, ChannelError>
Send IN control request. Read more
Source§async fn control_out(
&mut self,
setup: &SetupPacket,
buf: &[u8],
) -> Result<(), ChannelError>
async fn control_out( &mut self, setup: &SetupPacket, buf: &[u8], ) -> Result<(), ChannelError>
Send OUT control request
Source§fn retarget_channel(
&mut self,
addr: u8,
endpoint: &EndpointInfo,
_pre: bool,
) -> Result<(), HostError>
fn retarget_channel( &mut self, addr: u8, endpoint: &EndpointInfo, _pre: bool, ) -> Result<(), HostError>
Retargets channel to a new endpoint, may error if the underlying driver runs out of resources
Source§async fn request_in(&mut self, buf: &mut [u8]) -> Result<usize, ChannelError>where
D: IsIn,
async fn request_in(&mut self, buf: &mut [u8]) -> Result<usize, ChannelError>where
D: IsIn,
Send IN request of type other from control
For interrupt channels this will return the result of the next successful interrupt poll
Source§async fn request_out(
&mut self,
buf: &[u8],
ensure_transaction_end: bool,
) -> Result<(), ChannelError>where
D: IsOut,
async fn request_out(
&mut self,
buf: &[u8],
ensure_transaction_end: bool,
) -> Result<(), ChannelError>where
D: IsOut,
Send OUT request of type other from control
ensure_transaction_end: Send a zero length packet at the end of transaction if last packet is of max size.
Source§fn set_timeout(&mut self, _: TimeoutConfig)
fn set_timeout(&mut self, _: TimeoutConfig)
Configure the timeouts of this channel.
Auto Trait Implementations§
impl<'d, I, D, T> Freeze for Channel<'d, I, D, T>
impl<'d, I, D, T> RefUnwindSafe for Channel<'d, I, D, T>
impl<'d, I, D, T> Send for Channel<'d, I, D, T>
impl<'d, I, D, T> Sync for Channel<'d, I, D, T>
impl<'d, I, D, T> Unpin for Channel<'d, I, D, T>
impl<'d, I, D, T> !UnwindSafe for Channel<'d, I, D, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more